Task execution method, and method and apparatus for training task execution model

By extracting a set of value information using a preset key after receiving an instruction and executing subtasks sequentially, the problem of low efficiency in multi-intent recognition in existing technologies is solved, and efficient and accurate task execution is achieved.

WO2026000183A1PCT designated stage Publication Date: 2026-01-02BOE TECHNOLOGY GROUP CO LTD

Patent Information

Application Number
PCT/CN2024/101381
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In existing technologies, users need to input explicit instructions step by step to achieve multi-intent recognition, which makes it difficult to guarantee the efficiency of instruction execution.

Method used

By responding to received instructions, information is extracted from the text using multiple preset keys, a set of value information is generated, multiple sub-tasks are determined, and the sub-tasks are executed sequentially based on their relationships to achieve the target task.

Benefits of technology

It improved the efficiency and accuracy of task execution, ensured the coherence and correctness of task decomposition, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024101381_02012026_PF_FP_ABST
    Figure CN2024101381_02012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a task execution method, and a method and apparatus for training a task execution model, which can be applied to the technical fields of artificial intelligence, natural language processing and large models. The method comprises: in response to having received an instruction for executing a target task, on the basis of a plurality of preset keys, performing information extraction on text corresponding to the instruction, so as to obtain a value information set, wherein the types of the preset keys comprise at least one of the following: an instruction object for indicating a subject in the text, an instruction action for indicating a predicate in the text and an instruction parameter for indicating an object in the text, and value information corresponding to the instruction object is used for representing an object required for executing the target task, value information corresponding to the instruction action represents an action required for executing the target task, and value information corresponding to the instruction parameter represents a parameter related to the object or the action; on the basis of the value information set, determining a plurality of sub-tasks used for implementing the target task; and on the basis of an association relationship between the plurality of sub-tasks, sequentially executing the plurality of sub-tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Task execution method, and training method and device for model used for task execution TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of artificial intelligence technology, natural language processing technology and large model technology, and more particularly, to a task execution method, and a training method and device for a model used for task execution. BACKGROUND

[0002] With the development of artificial intelligence technology, users can use machine learning models to solve various problems. For example, a machine learning model can be used to process instructions of a user to realize recognition of the user's intention. However, for multi-intention recognition, the user still needs to input multiple explicit instructions step by step, which is difficult to guarantee the efficiency of instruction execution.

[0003] SUMMARY

[0004] Therefore, the present disclosure provides a task execution method, and a training method and device for a model used for task execution.

[0005] According to an aspect of the present disclosure, a task execution method is provided, including: in response to receiving an instruction for executing a target task, performing information extraction on a text corresponding to the instruction according to a plurality of preset keys, to obtain a value information set, wherein the types of the preset keys include at least one of an instruction object for indicating a subject in the text, an instruction action for indicating a predicate in the text, and an instruction parameter for indicating an object in the text; the value information set includes a plurality of value information, the value information corresponding to the instruction object is used to represent an object required for executing the target task, the value information corresponding to the instruction action is used to represent an action required for executing the target task, and the value information corresponding to the instruction parameter is used to represent a parameter related to the object or the action; determining a plurality of sub-tasks for realizing the target task according to the value information set; and executing the plurality of sub-tasks in sequence based on an association relationship between the plurality of sub-tasks, wherein the association relationship is used to represent an execution order of the plurality of sub-tasks.

[0006] According to an aspect of the present disclosure, a training method for a model used for task execution is provided, including: in response to receiving a sample instruction for executing a sample task, performing information extraction on a sample text corresponding to the sample instruction according to a plurality of sample preset keys, to obtain a sample value information set, wherein the sample instruction corresponds to a plurality of actual sub-tasks; determining a plurality of sample sub-tasks for realizing the sample task according to the sample value information set; determining a loss function value according to the plurality of sample sub-tasks and the plurality of actual sub-tasks; and adjusting model parameters of the model according to the loss function value, to obtain the model used for task execution.

[0007] According to another aspect of the present disclosure, there is provided a task execution apparatus, comprising: a first information extraction module configured to, in response to receiving an instruction for executing a target task, perform information extraction on a text corresponding to the instruction according to a plurality of preset keys, to obtain a set of value information, wherein the types of the preset keys comprise at least one of an instruction object for indicating a subject in the text, an instruction action for indicating a predicate in the text, and an instruction parameter for indicating an object in the text; the set of value information comprises a plurality of value information, the value information corresponding to the instruction object is configured to represent an object required for executing the target task, the value information corresponding to the instruction action is configured to represent an action required for executing the target task, and the value information corresponding to the instruction parameter is configured to represent a parameter related to the object or the action; a first determination module configured to determine a plurality of sub-tasks for realizing the target task according to the set of value information; and a task execution module configured to sequentially execute the plurality of sub-tasks based on an association relationship between the plurality of sub-tasks, wherein the association relationship is configured to represent an execution order of the plurality of sub-tasks.

[0008] According to another aspect of the present disclosure, there is provided a training apparatus for a model for task execution, comprising: a second information extraction module configured to, in response to receiving a sample instruction for executing a sample task, perform information extraction on a sample text corresponding to the sample instruction according to at least one sample preset key, to obtain a set of sample value information, wherein the sample instruction corresponds to a plurality of actual sub-tasks; a second determination module configured to determine a plurality of sample sub-tasks for realizing the sample task according to the set of sample value information; a third determination module configured to determine a loss function value according to the plurality of sample sub-tasks and the plurality of actual sub-tasks; and an adjustment module configured to adjust model parameters of the model according to the loss function value, to obtain the model for task execution.

[0009] According to another aspect of the present disclosure, there is provided an electronic device, comprising: one or more processors; a memory configured to store one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement a method as described in the present disclosure.

[0010] According to another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement a method as described in the present disclosure.

[0011] According to another aspect of the present disclosure, there is provided a computer program product comprising computer executable instructions that, when executed by a processor, implement a method as described in the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0012] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:

[0013] FIG. 1 schematically illustrates a system architecture to which a task execution method and a training method of a model for task execution according to an embodiment of the present disclosure can be applied;

[0014] FIG. 2 schematically illustrates a flowchart of a task execution method according to an embodiment of the present disclosure;

[0015] FIG. 3 schematically illustrates an example schematic diagram of a task execution process according to an embodiment of the present disclosure;

[0016] FIG. 4A schematically illustrates an example schematic diagram of a task execution process according to another embodiment of the present disclosure;

[0017] FIG. 4B schematically illustrates a schematic diagram of a task execution process according to an embodiment of the present disclosure;

[0018] FIG. 5A schematically illustrates an example schematic diagram of a task execution process according to another embodiment of the present disclosure;

[0019] FIG. 5B schematically illustrates a schematic diagram of a task execution according to another embodiment of the present disclosure;

[0020] FIG. 6A schematically illustrates an example schematic diagram of a task execution process according to another embodiment of the present disclosure;

[0021] FIG. 6B schematically illustrates a schematic diagram of a task execution according to another embodiment of the present disclosure;

[0022] FIG. 7 schematically illustrates an example schematic diagram of a task execution process according to another embodiment of the present disclosure;

[0023] FIG. 8 schematically illustrates a flowchart of a training method of a model for task execution according to an embodiment of the present disclosure;

[0024] FIG. 9 schematically illustrates an example schematic diagram of determining a plurality of sample subtask processes according to a set of sample value information according to an embodiment of the present disclosure;

[0025] FIG. 10A schematically illustrates an example schematic diagram of an information extraction task execution process according to an embodiment of the present disclosure;

[0026] FIG. 10B schematically illustrates an example schematic diagram of an information completion task execution process according to an embodiment of the present disclosure;

[0027] FIG. 10C schematically illustrates an example schematic diagram of an information inference task execution process according to an embodiment of the present disclosure;

[0028] FIG. 10D schematically shows an example schematic diagram of an information ranking task execution process according to an embodiment of the present disclosure;

[0029] FIG. 11A schematically shows a structural schematic diagram of a large model for task execution according to an embodiment of the present disclosure;

[0030] FIG. 11B schematically shows a structural schematic diagram of an attention layer according to an embodiment of the present disclosure;

[0031] FIG. 11C schematically shows a structural schematic diagram of a multi-layer perception layer according to an embodiment of the present disclosure;

[0032] FIG. 12 schematically shows a block diagram of a task execution apparatus according to an embodiment of the present disclosure;

[0033] FIG. 13 schematically shows a block diagram of a training apparatus of a model for task execution according to an embodiment of the present disclosure; and

[0034] FIG. 14 schematically shows a block diagram of an electronic device suitable for implementing a task execution method and a training method of a model for task execution according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it is to be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of embodiments of the present disclosure. However, it will be apparent to one skilled in the art that one or more embodiments can be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques have been omitted to avoid unnecessarily obscuring the concept of the present disclosure.

[0036] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present disclosure. The terms "include", "comprise", and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0037] All terms used herein (including technical and scientific terms) have meanings commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present specification, and should not be interpreted in an idealized or overly formal manner.

[0038] In the case of using expressions similar to "at least one of A, B, and C, etc.", it is generally intended to include any of A, B, and C alone, or in any combination, as well as the system including at least one of A, B, and C, etc.

[0039] In the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations, necessary security measures are taken, and the public order and good customs are not violated.

[0040] In the technical solutions of the present disclosure, the authorization or consent of the user is obtained before acquiring or collecting user personal information.

[0041] In one example, the user instruction can include a voice type instruction, and the voice type instruction can be processed based on a natural language processing (NLP) technology to identify the user intent, so as to realize real-time voice control based on the user instruction. However, each operation step in the above voice control process needs to rely on the user's thinking and the explicit instruction given by the user, that is, the identification of multiple intents still needs the user to input multiple explicit instructions step by step, and it is difficult to guarantee the efficiency of instruction execution.

[0042] The present disclosure provides a task execution method and a training method and device of a model for task execution, which can be applied to the fields of artificial intelligence technology, natural language processing technology and large model technology. The task execution method comprises: in response to receiving an instruction for executing a target task, performing information extraction on a text corresponding to the instruction according to a plurality of preset keys to obtain a value information set, wherein the types of the preset keys include at least one of the following: an instruction object for indicating a subject in the text, an instruction action for indicating a predicate in the text, and an instruction parameter for indicating an object in the text; the value information set includes a plurality of value information, the value information corresponding to the instruction object is used to represent an object required for executing the target task, the value information corresponding to the instruction action is used to represent an action required for executing the target task, and the value information corresponding to the instruction parameter is used to represent a parameter related to the object or the action; determining a plurality of sub-tasks for implementing the target task according to the value information set; and sequentially executing the plurality of sub-tasks based on an association relationship between the plurality of sub-tasks, wherein the association relationship is used to represent an execution order of the plurality of sub-tasks.

[0043] FIG. 1 schematically shows a system architecture to which a task execution method and a training method of a model for task execution can be applied according to an embodiment of the present disclosure. It should be noted that FIG. 1 only shows an example of a system architecture to which the embodiments of the present disclosure can be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0044] As shown in FIG. 1, the system architecture 100 according to the embodiment can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0045] A user can use at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0046] The first terminal device 101, the second terminal device 102, the third terminal device 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.

[0047] The server 105 can be a server providing various services, such as a background management server supporting a website browsed by a user using the first terminal device 101, the second terminal device 102, the third terminal device 103 (only as an example). The background management server can analyze and process received user requests and other data, and feed back the processing results (such as web pages, information or data generated or obtained according to user requests, etc.) to the terminal device.

[0048] It should be noted that the task execution method and the training method of the model for task execution provided in the embodiments of the present disclosure can generally be executed by the server 105. Correspondingly, the task execution apparatus and the training apparatus of the model for task execution provided in the embodiments of the present disclosure can generally be arranged in the server 105. The task execution method and the training method of the model for task execution provided in the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Correspondingly, the task execution apparatus and the training apparatus of the model for task execution provided in the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0049] Alternatively, the task execution method and the training method of the model for task execution provided in the embodiments of the present disclosure can also be executed by the first terminal device 101, the second terminal device 102 or the third terminal device 103, or can also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103. Correspondingly, the task execution apparatus and the training apparatus of the model for task execution provided in the embodiments of the present disclosure can also be arranged in the first terminal device 101, the second terminal device 102 or the third terminal device 103, or can also be arranged in other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103.

[0050] It should be understood that the number of terminal devices, networks and servers in FIG. 1 is merely illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

[0051] It should be noted that the serial numbers of the various operations in the following methods are only used to represent the operations for description, and should not be regarded as representing the execution sequence of the various operations. Unless explicitly indicated, the method does not need to be executed in the order shown.

[0052] FIG. 2 schematically shows a flowchart of a task execution method according to an embodiment of the present disclosure.

[0053] As shown in FIG. 2, the task execution method 200 includes operations S210-S230.

[0054] In operation S210, in response to receiving the instruction for performing the target task, information extraction is performed on the text corresponding to the instruction according to a plurality of preset keys, to obtain a value information set, wherein the types of the preset keys include at least one of an instruction object for indicating a subject in the text, an instruction action for indicating a predicate in the text, and an instruction parameter for indicating an object in the text; the value information set includes a plurality of value information, the value information corresponding to the instruction object is used to represent an object required for performing the target task, the value information corresponding to the instruction action is used to represent an action required for performing the target task, and the value information corresponding to the instruction parameter is used to represent a parameter related to the object or the action.

[0055] In operation S220, a plurality of sub-tasks for implementing the target task are determined according to the value information set.

[0056] In operation S230, the plurality of sub-tasks are sequentially executed based on an association relationship between the plurality of sub-tasks, wherein the association relationship is used to represent an execution order of the plurality of sub-tasks.

[0057] After obtaining the received instruction, the instruction can be processed to obtain the text corresponding to the instruction. The type of the instruction and the processing manner can be configured according to actual business requirements, which is not limited herein. The type of the instruction can include one of the following: text, voice, and video. For example, in the case of receiving a voice instruction, a voice recognition tool can be used to process the voice instruction to obtain the text corresponding to the instruction. Through the voice instruction, remote voice control can be achieved, thereby improving the flexibility of the interactive scene. Alternatively, in the case of receiving a video instruction, a text extraction tool can be used to process the video instruction to obtain the text corresponding to the instruction.

[0058] The text corresponding to the instruction can be subjected to information extraction according to a plurality of preset keys to obtain a value information set. The value information set can include value information corresponding to each preset key. The preset key can refer to a unique identifier for uniquely identifying the associated value information in the data structure. The value information can refer to a data item associated with the key. The value information set can be in JSON (JavaScript Object Notation) format. Thus, the fuzzy control instruction can be materialized.

[0059] In one example, the type of the preset key can include one of the following: an instruction object for indicating a subject in the text, an instruction action for indicating a predicate in the text, and an instruction parameter for indicating an object in the text. In this case, the value information corresponding to the instruction object can be used to represent the object required to perform the target task, the value information corresponding to the instruction action can be used to represent the action required to perform the target task, and the value information corresponding to the instruction parameter can be used to represent the parameter related to the object or the action. The value information related to the preset key is a necessary parameter for task execution, which can be used to help the system to implement task execution.

[0060] For example, the text corresponding to the instruction is "help me change the pen to red", based on the semantic analysis result, it can be determined that the "instruction function" implemented by the text is "color", the value information corresponding to the "instruction object" is the subject "pen" in the text, the value information corresponding to the "instruction action" is the predicate "change" in the text, and the value information corresponding to the "instruction parameter" is the object "red" in the text. Therefore, the value information set corresponding to "help me change the pen to red" is: {"instruction object": "pen", "instruction action": "change", "instruction parameter": "red"}.

[0061] It can be understood that when completing a certain task, the human brain will first decompose the task into multiple operation steps, and then execute each operation step. Correspondingly, the use behavior of software can also be imitated by the large model to form the execution logic of the large model for the current software function. Through the semantic analysis function based on the large model, the target function expected to be implemented by the instruction can be obtained, and the operation steps for solving the implementation of the target function are given. Since the operation steps of the function have a certain logical sequence, the implementation of the function is consistent with the thinking chain technology of the large model, and thus after obtaining the value information set, multiple sub-tasks for implementing the target task can be determined according to the value information set, so as to align the artificial operation steps with the function implementation. On this basis, since the association relationship can represent the execution order of the multiple sub-tasks, the multiple sub-tasks are executed in sequence according to the association relationship between the multiple sub-tasks, and the hardware device is guided to perform function scheduling, so that the target task can be decomposed by analyzing the user demand rather than an explicit instruction, and multiple sub-tasks are obtained to achieve the function expected to be implemented by the target task.

[0062] For example, taking the above text corresponding to the instruction "help me change the pen to red" as an example, according to the value information set corresponding to the text, it can be determined that the target task for implementing color change includes sub-task 1: changing the color of the pen to red. On this basis, by executing the above sub-task 1, the target task with the function of color change can be implemented.

[0063] For another example, the text corresponding to the instruction is "help me change a pen with a thinner nib", based on the semantic analysis result, it can be determined that the "instruction function" implemented by the text is "thickness", and the value information set corresponding to "help me change a pen with a thinner nib" is: {"instruction object": "pen", "instruction action": "change", "instruction parameter": "NULL"}. According to the value information set corresponding to the text, it can be determined that the target task for implementing the thickness change includes subtask 1: select the model of the pen -> subtask 2: adjust the thickness parameter of the pen. On this basis, by sequentially executing the above subtask 1 and subtask 2, the target task with the function of thickness change can be implemented.

[0064] According to the embodiments of the present disclosure, by extracting information from the text corresponding to the received instruction according to the plurality of preset keys, the text corresponding to the instruction can be quickly parsed into a language that can be processed by hardware, and by determining a plurality of subtasks for implementing the target task based on the extracted value information set, various complex instructions can be flexibly handled. On this basis, by sequentially executing a plurality of subtasks based on the association relationship between the plurality of subtasks, the coherence and correctness of task execution can be ensured, and the efficiency and accuracy of task execution are improved.

[0065] It can be understood that, in order to further improve the accuracy of task execution, before extracting information from the text corresponding to the instruction according to the plurality of preset keys, the level of the instruction can be determined first, so as to determine different task execution modes according to the instruction. The following will be further described in combination with FIG. 3.

[0066] FIG. 3 schematically shows an example schematic diagram of a task execution process according to an embodiment of the present disclosure.

[0067] As shown in FIG. 3, in 300, after obtaining the text corresponding to the instruction 301, the text can be subjected to semantic analysis processing to obtain a semantic analysis result 302. The semantic analysis result 302 can be used to represent the target function expected to be implemented by the instruction 301 and the level of the instruction. The level of the instruction 301 can be used to represent the degree of ambiguity of the instruction 301. For example, the level can include at least one of the following: a first-level instruction 303_1 representing an explicit instruction, a second-level instruction 303_2 representing a function jump instruction, a third-level instruction 303_3 representing a complex instruction, and others 303_4. The others 303_4 can refer to non-instructional rhetoric, i.e., no need for auxiliary user operation.

[0068] The first-level instruction 303_1 can refer to an instruction including specific information such as instruction object, instruction action and instruction parameter. For example, "help me change the pen to red" includes instruction object "pen", instruction action "change" and instruction parameter "color: red", and it can be determined that the instruction is a first-level instruction 303_1.

[0069] The secondary instruction 303_2 can refer to an instruction including an instruction object and an instruction action, but lacking an instruction parameter. For example, "I want to change the color of the pen" includes an instruction object "pen" and an instruction action "change", but lacks an instruction parameter, needs to perform a function jump, and can be determined as the secondary instruction 303_2.

[0070] The tertiary instruction 303_3 can refer to an instruction lacking an explicit instruction object, an instruction action, and an instruction parameter, and needing an auxiliary operation of a user to realize some implicit functions. For example, "There is a data that is important" does not include an instruction object, an instruction action, and an instruction parameter, but needs an auxiliary operation of a user, and can be determined as the tertiary instruction 303_3.

[0071] After receiving the instruction 301, the instruction 301 can be classified based on the above rules to obtain the level of the instruction 301. For example, the primary instruction 303_1 can output A, the secondary instruction 303_2 can output B, the tertiary instruction 303_3 can output C, and the others 303_4 can output D. On this basis, the subsequent processing mode can be determined according to the level of the instruction 301.

[0072] For example, in the case where the level of the instruction 301 is the others 303_4, the task execution process can be terminated. Alternatively, in the case where the level of the instruction 301 includes one of the primary instruction 303_1, the secondary instruction 303_2, and the tertiary instruction 303_3, information extraction can be performed on the text corresponding to the instruction 301 to obtain a value information set 304. According to the value information set 304, a plurality of sub-tasks 305 for realizing a target task are determined. On this basis, the plurality of sub-tasks 305 can be executed in sequence based on an association relationship representing an execution order of the plurality of sub-tasks. After the plurality of sub-tasks 305 are executed, operation S310 can be performed. In operation S310, it is determined whether the target function is realized. If yes, the task execution process can be ended; if no, the value information set 304 can be updated, and the above process can be re-executed based on the updated value information set 304 until it is determined that the target function is realized.

[0073] In one example, the types of the preset keys can include at least one of an instruction object (i.e., object) for indicating a subject in the text, an instruction action (i.e., action) for indicating a predicate in the text, and an instruction parameter (i.e., parameters) for indicating an object in the text.

[0074] For each preset key, the text can be detected based on the preset key to obtain the position of the value information corresponding to the preset key. For example, subject detection can be performed on the text to obtain the position of the value information corresponding to the instruction object in the text, and the value information representing the object required to perform the target task is extracted based on the position. Alternatively, predicate detection can be performed on the text to obtain the position of the value information corresponding to the instruction action in the text, and the value information representing the action required to perform the target task is extracted based on the position. Alternatively, object detection can be performed on the text to obtain the position of the value information corresponding to the instruction parameter in the text, and the value information representing the parameter related to the object or the action is extracted based on the position. On this basis, the value information set 304 can be generated according to the plurality of preset keys and the value information of each preset key.

[0075] In one example, the above task execution process can be implemented based on a large model. By relying on the strong semantic understanding and generation capability of the large model, the classification of the instruction is performed, and different function jump strategies are used according to different levels of the instruction, so that the text corresponding to the instruction is parsed into a language that can be processed by hardware, thereby improving the quality of user voice control and enhancing user experience.

[0076] According to the embodiments of the present disclosure, by detecting the text according to the preset key, the position of the value information corresponding to each preset key in the text can be accurately located, thereby ensuring the accuracy of the extraction. After determining the position of each value information, the corresponding value information is extracted from the text according to the position, and the structured value information set can be generated by integrating the plurality of preset keys and the value information corresponding thereto. The value information set can clearly show the key information in the text, and provides convenience for subsequent task decomposition and execution.

[0077] The above describes how to determine the level of the instruction. The task execution process of the present disclosure for a first-level instruction will be further described below in combination with FIG. 4A and FIG. 4B.

[0078] FIG. 4A schematically shows an example schematic diagram of a task execution process according to another embodiment of the present disclosure; and FIG. 4B schematically shows a schematic diagram of a task execution process according to an embodiment of the present disclosure.

[0079] In combination with FIG. 4A and FIG. 4B, in the case where the user wants to change the color of the pen, the voice device 406 can be instructed 401 to "help me change the pen to red". After receiving the instruction 401, the instruction 401 can be classified to obtain the level of the instruction 401. In the case where the instruction 401 belongs to the first-level instruction 402, the text corresponding to the instruction 401 can be information extracted according to a plurality of preset keys to obtain the value information set 403. For example, the value information set 403 is { "instruction object": "pen", "instruction action": "change", "instruction parameter": "red"}.

[0080] After obtaining the value information set 403, operation S410 can be performed. In operation S410, it is determined whether the number of value information satisfies a third predetermined condition. The third predetermined condition can be configured according to actual business needs, which is not limited here. For example, the third predetermined condition can be set to a preset threshold, which can be 3.

[0081] If not, an information completion request 404 can be initiated, and the value information set 403 can be updated according to the received completion information. In one example, the plurality of preset keys can include M preset keys, the value information set can include N preset keys and value information corresponding to each of the N preset keys, and the information completion request 404 can include (M-N) to-be-completed keys, which are determined according to the M preset keys and the N preset keys included in the value information set. M and N are both positive integers and M>N. The user can feed back the completion information after receiving the information completion request. In response to receiving the completion information, the (M-N) to-be-completed keys can be information extracted from the completion information to obtain value information corresponding to each of the (M-N) to-be-completed keys. On this basis, the value information set 403 can be updated according to the value information corresponding to each of the (M-N) to-be-completed keys to obtain an updated value information set.

[0082] For example, the instruction 401 is "change to red". After receiving the instruction 401, the value information set 403 is obtained by information extraction of the instruction 401, which is { "instruction action": "change", "instruction parameter": "red"}. In this case, since the number of value information in the value information set 403 does not satisfy the third predetermined condition, i.e., the value information corresponding to "instruction object" is missing in the instruction 401, an information completion request 404 for obtaining the "instruction object" can be generated. The user can feed back the completion information "pen" to the voice device 406 after receiving the information completion request 404, so that the "instruction object" "pen" can be obtained. On this basis, the value information set 403 can be updated to obtain an updated value information set 403, which is { "instruction object": "pen", "instruction action": "change", "instruction parameter": "red"}.

[0083] If yes, a plurality of sub-tasks 405 for implementing the target task can be determined according to the value information set 403. On this basis, the plurality of sub-tasks 405 can be executed in sequence based on the association relationship between the plurality of sub-tasks 405, the previous note color is retained, the function of flashing the pen as red and retreating to the whiteboard is implemented, so as to change the color of the pen to red.

[0084] According to the embodiments of the present disclosure, by detecting whether the number of value information in the value information set meets the predetermined condition, and automatically initiating an information completion request when it is found that the information is incomplete, the data integrity and accuracy of subsequent processing are ensured. By comparing the M preset keys and the N preset keys in the value information set, the (M-N) keys to be completed can be accurately determined, and the efficiency and accuracy of information completion are improved. On this basis, after receiving the completion information fed back by the user, the corresponding value information is efficiently extracted from the completion information according to the (M-N) keys to be completed, and is integrated into the original value information set, so that the updated value information set can improve the efficiency of information processing, and also ensures the data integrity and consistency. In addition, since the number and type of preset keys can be flexibly adjusted according to actual needs, the scalability of task execution is improved.

[0085] The task execution process for the first-level instruction is described above, and the task execution process for the second-level instruction of the present disclosure will be further described below in combination with FIG. 5A and FIG. 5B.

[0086] FIG. 5A schematically shows an example schematic diagram of a task execution process according to another embodiment of the present disclosure; and FIG. 5B schematically shows a schematic diagram of task execution according to another embodiment of the present disclosure.

[0087] In combination with FIG. 5A and FIG. 5B, in the case where the user wants to change the color of the pen, the voice device 506 can be instructed 501 to say the instruction “help me change the color of the pen”. After receiving the instruction 501, the instruction 501 can be classified to obtain the level of the instruction 501. Since the instruction 501 does not explicitly indicate which color needs to be changed, it can be determined that the instruction 501 belongs to the second-level instruction 502. In the case where the instruction 501 belongs to the second-level instruction 502, the text corresponding to the instruction 501 can be subjected to information extraction according to a plurality of preset keys to obtain a value information set 503. For example, the value information set 503 is {“instruction object”: “pen”, “instruction action”: “change”, “instruction parameter”: “NULL”}.

[0088] After obtaining the value information set 503, a plurality of sub-tasks 504 for implementing the target task can be determined according to the value information set 503. On this basis, the plurality of sub-tasks can be executed in sequence based on the association relationship between the plurality of sub-tasks, and the color palette 507 is directly displayed to allow the user to select by clicking.

[0089] The task execution process for the secondary instruction is described above, and the task execution process for the tertiary instruction of the present disclosure will be further described below in combination with FIGS. 6A and 6B.

[0090] FIG. 6A schematically shows an example schematic diagram of a task execution process according to another embodiment of the present disclosure; and FIG. 6B schematically shows a schematic diagram of task execution according to another embodiment of the present disclosure.

[0091] As shown in FIGS. 6A and 6B, the task execution process can be implemented based on a large model. By using a large model based on a Chain of Thought technology, a function action can be decomposed according to a demand target of an instruction, and a planning or a step of execution can be given in a logical order. The task execution process based on the Chain of Thought technology is as follows.

[0092] The user can speak the instruction 601 "help me divide the blackboard into four parts and use different colored pens" to the voice device 608. After receiving the instruction 601, semantic analysis can be performed on the instruction 601 to obtain a semantic analysis result. In a case where the semantic analysis result represents that the text corresponding to the instruction 601 meets a first predetermined condition, function matching can be performed on the text. The first predetermined condition can be configured according to actual business requirements, which is not limited herein. For example, the first predetermined condition can be that the instruction 601 is a tertiary instruction 602.

[0093] The function matching can refer to a process of matching a target function of the text with at least one candidate function pre-configured. The target function can refer to a function expected to be implemented by the instruction 601. The at least one candidate function can be a candidate function that is archived and corresponds to a corresponding candidate description information and a candidate service content. In an example, the semantic analysis result of the text and the at least one candidate description information can be matched respectively to obtain a similarity matching result. The similarity matching result can be used to represent the similarity degree between the semantic analysis result and the candidate description information. For example, the semantic analysis result can include a first keyword in the text corresponding to the instruction 601, and the candidate description information can include a second keyword related to the candidate function, so that the similarity between the first keyword and the second keyword can be determined. On this basis, the candidate function corresponding to the candidate description information with the highest similarity degree can be determined as the target function.

[0094] According to an embodiment of the present disclosure, by comparing the semantic analysis result of the text with the plurality of candidate description information, the candidate description information most consistent with the text intention can be quickly and accurately identified, and the efficiency and accuracy of function determination are improved. On this basis, the target function expressed by the text is determined through the similarity matching result. This helps the system to subsequently perform corresponding operations or provide services according to the target function, can intelligently respond to user needs, and is conducive to improving the service quality and efficiency.

[0095] At least one candidate function and candidate service content corresponding to each candidate function can be pre-configured, as shown in Table 1 below. It should be noted that, in order to maintain a good interactive experience, the design principle of the candidate service content is to reduce the number of operations required by the user to reach the candidate function as much as possible, and the candidate service content corresponding to each candidate function can include 3-5 operation steps.

[0096] The candidate service content can include operation steps required to be performed to implement the candidate function. After determining the target function of the text, the function matching result can be determined according to the target function of the text and the at least one candidate function. The function matching result can be used to represent the matching between the target function and the candidate function. After determining that there is a candidate function in the at least one candidate function that matches the target function, the text can be updated according to the candidate service content corresponding to the candidate function to obtain an updated text 604.

[0097] Table 1

[0098] After determining the candidate function that matches the target function, a text template related to the candidate function can be obtained. The text template can include a service precondition and at least one candidate service content. The service precondition can refer to a prerequisite condition or requirement that must be met before using or starting a certain function. The service precondition can include at least one of the following: a condition related to system requirements, a condition related to data preparation, and a condition related to permission settings, etc. For example, the condition related to system requirements can include at least one of the following: an operating system version, a hardware requirement, and a dependent software, etc. The condition related to data preparation can include at least one of the following: an input data format, data integrity, and data preprocessing, etc. The condition related to permission settings can include at least one of the following: user permissions and system permissions, etc. After obtaining the text template, the text template can be filled based on the text to obtain an updated text. By setting the candidate function and the text template related to the candidate function, the model can be helped to understand in advance whether a certain function is available, and the precondition of the function is understood in advance, so that effective sub-tasks can be sorted out.

[0099] For example, the function matching result 603 represents that the candidate function matched with the instruction 601 is "change a new whiteboard", and the candidate service content corresponding to "change a new whiteboard" is "1, save the current whiteboard; 2, open a new whiteboard". Therefore, the text corresponding to the instruction 601 can be updated to obtain the updated text 604, which includes "step 1: save the information of the current whiteboard; step 2: create a new whiteboard; step 3: divide the whiteboard into four areas; step 4: randomly assign different color traces in the four areas".

[0100] After obtaining the updated text 604, the updated text 604 can be information extracted according to a plurality of preset keys to obtain a value information set 605. For example, the value information set 605 is { "instruction object": "whiteboard", "instruction action": "save"; "instruction object": "whiteboard", "instruction action": "open"}. According to the value information set 605, a plurality of sub-tasks 606 for implementing a target task can be determined. On this basis, the plurality of sub-tasks can be executed in sequence based on the association relationship representing the execution order of the plurality of sub-tasks, that is, saving the current whiteboard, opening a new whiteboard, dividing the new whiteboard into four areas, and randomly assigning different color traces in different areas.

[0101] In another example, after obtaining the value information set, at least one to-be-called component and a calling order for implementing a target function can be determined according to a plurality of preset keys. The to-be-called component can include at least one of the following: a link, a button, a menu, or a user interface element of an application, and the like. The calling order can represent a logical relationship between at least one calling component for implementing a target function. On this basis, the plurality of value information and at least one to-be-called component can be filled into a task template related to the target function according to the calling order to obtain a plurality of sub-tasks.

[0102] According to the embodiments of the present disclosure, at least one to-be-called component required for implementing a target function is intelligently determined through preset keys, and the plurality of value information and at least one to-be-called component are filled into a task template related to the target function according to the calling order to obtain a plurality of sub-tasks, which can ensure that the logical relationship and dependency relationship between each to-be-called component are properly handled, and the correctness and efficiency of task execution are ensured.

[0103] For example, taking the instruction "I want to practice calligraphy" as an example, the semantic parsing results determine that this instruction belongs to the third level, with the target function being "practice writing." The components to be called include the whiteboard and the calligraphy brush. Further analysis shows that the calling order of at least one of the components is to call the whiteboard first, followed by the calligraphy brush. That is, the value information set is {"Instruction Object": "Whiteboard", "Instruction Action": "Open"; "Instruction Object": "Calligraphy Brush", "Instruction Action": "Select"}. Based on this, the value information set can be used to determine at least one subtask to achieve "practice writing," including: Subtask 1, Open the whiteboard; Subtask 2, Select a calligraphy brush model. This helps the user prepare all the necessary conditions to achieve the target function of "practice writing."

[0104] According to embodiments of this disclosure, when the semantic parsing result meets predetermined conditions, intelligent matching is performed based on the target function of the text and the provided candidate functions. This accurately identifies candidate functions that match the target function, providing a clear direction for subsequent text processing. By obtaining a text template related to the candidate function and filling the template based on the original text, rich materials and a flexible framework are provided for text updates. Updated text can be generated quickly, which is beneficial to improving the efficiency and flexibility of subsequent task execution.

[0105] It is understandable that, in order to further improve the accuracy of task execution, a requirements document can be provided in advance. The following will further explain another task execution method provided in this disclosure, with reference to Figure 7.

[0106] Figure 7 schematically illustrates an example of a task execution process according to another embodiment of the present disclosure.

[0107] As shown in Figure 7, in step 700, after obtaining the text corresponding to instruction 701, semantic parsing processing can be performed on the text to obtain semantic parsing result 702. Based on semantic parsing result 702, instruction 701 can be classified. If instruction 701 belongs to other categories 703_1, the task execution process can be terminated. If instruction 701 belongs to a preset level 703_2, before processing instruction 701 using the large model, a preset document 704 can be provided to the large model, allowing it to perform step-by-step reasoning with reference, which can improve the flexibility and scalability of reasoning. Preset level 703_2 can include one of level 1, level 2, and level 3 instructions. The definitions of level 1, level 2, and level 3 instructions have been explained above and will not be repeated here.

[0108] The function matching result 705 of the instruction 701 is determined based on the preset document 704. In a case where the function matching result 705 represents that there is a candidate function matching the target function among at least one candidate function, the text corresponding to the instruction 701 can be updated according to the candidate service content corresponding to the candidate function, to obtain an updated text 706. After obtaining the updated text 706, the information extraction can be performed on the updated text 706 according to a plurality of preset keys, to obtain a value information set 707. After obtaining the value information set 707, operation S710 can be performed.

[0109] In operation S710, whether the number of value information satisfies a third predetermined condition is determined. If not, an information completion request 708 can be initiated, and the value information set 707 is updated according to the received completion information to obtain an updated value information set. If yes, a plurality of sub-tasks 709 for implementing the target task can be determined according to the value information set 707. On this basis, the plurality of sub-tasks 709 can be sequentially executed based on the association relationship between the plurality of sub-tasks. After the plurality of sub-tasks 709 are executed, operation S720 can be performed.

[0110] In operation S720, whether the target function is implemented is determined. If yes, the task execution process ends; if not, the value information set 707 is updated, and the above process is re-executed based on the updated value information set 304 until it is determined that the target function is implemented.

[0111] It can be understood that the task execution process provided by the present disclosure is described above, and how to train a large model for task execution of the present disclosure will be further described in combination with FIG. 8.

[0112] FIG. 8 schematically shows a flowchart of a training method of a model for task execution according to an embodiment of the present disclosure.

[0113] As shown in FIG. 8, the training method 800 of the model for task execution includes operations S810-S840.

[0114] In operation S810, in response to receiving a sample instruction for executing a sample task, information extraction is performed on a sample text corresponding to the sample instruction according to a plurality of sample preset keys to obtain a sample value information set, wherein the sample instruction corresponds to a plurality of actual sub-tasks.

[0115] In operation S820, a plurality of sample sub-tasks for implementing the sample task are determined according to the sample value information set.

[0116] In operation S830, a loss function value is determined according to the plurality of sample sub-tasks and the plurality of actual sub-tasks.

[0117] At operation S840, the model parameters of the pre-constructed large model are adjusted according to the loss function value, to obtain a large model for task execution.

[0118] A large model (LLM) refers to a machine learning model with a large number of parameters and complex structures trained based on a large-scale corpus. Such models can be applied to processing large-scale data and complex problems.

[0119] The descriptions of the sample instructions, sample preset keys, sample texts, sample value information sets, and sample sub-tasks can refer to the related content of the instructions, preset keys, texts, value information sets, and sub-tasks described above, and will not be repeated here.

[0120] According to embodiments of the present disclosure, by introducing sample sub-tasks and actual sub-tasks to determine the loss function value, the large model can be continuously adjusted and optimized during the learning process, thereby better adapting to different instructions and service scenarios, enhancing the generalization ability of the large model, and enabling it to more accurately execute various instructions.

[0121] The training process of the model for task execution provided by the present disclosure will be further described below in conjunction with FIGS. 9, 10A-10D.

[0122] FIG. 9 schematically shows an example schematic diagram of a process of determining a plurality of sample sub-tasks according to a sample value information set according to an embodiment of the present disclosure.

[0123] It should be noted in advance that the task round can correspond to the chain-of-thought (COT) reasoning capability of the large model. The COT reasoning capability can refer to a process of embodying the reasoning process inside the model, i.e., helping the model to understand and decompose the problem step by step, splitting the problem into a plurality of task rounds in a certain order, executing each task round in turn, and thereby outputting the final reasoning result. In the COT reasoning process, the order of data needs to be maintained so that the model can reason in a certain order. Specifically, the reasoning result of each task round is based on the reasoning result of the previous task round, i.e., for each task round, the model input corresponding to the task round is the historical information of the previous task round and the prompt word information of the current task round. The historical information can include the prompt word information of the previous task round and the sample output result of the previous task round.

[0124] As shown in FIG. 9, in 900, for each task round, the prompt information corresponding to the task round can be pre-set. Taking at least one sample subtask belonging to P task rounds as an example, the determination process of the at least one sample subtask is sequentially explained from the 0th task round, the 1st task round,..., the i-th task round,..., and the Pth task round. i is a positive integer, and 1≤i≤P. In this case, the prompt information can include the prompt information 902 of the 0th task round, the prompt information 904 of the 1st task round,..., the prompt information 908 of the i-th task round,..., and the prompt information 912 of the Pth task round.

[0125] For the 0th task round, the sample instruction 901 and the prompt information 902 of the 0th task round can be input into the model to obtain a sample value information set 903.

[0126] For the 1st task round, the execution of the 1st task round needs to depend on the 0th task round. The sample value information set 903 and the prompt information 904 of the 1st task round can be input into the model to obtain a sample output result 905 of the 1st task round.

[0127] By analogy, for the i-th task round, the execution of the i-th task round needs to depend on the (i-1)th task round. The prompt information 906 of the (i-1)th task round, the sample output result 907 of the (i-1)th task round, and the prompt information 908 of the i-th task round can be input into the model to obtain a sample output result 909 of the i-th task round.

[0128] By analogy, for the Pth task round, the execution of the Pth task round needs to depend on the (P-1)th task round. The prompt information 910 of the (P-1)th task round, the sample output result 911 of the (P-1)th task round, and the prompt information 912 of the Pth task round can be input into the model to obtain a sample output result 913 of the Pth task round. On this basis, the sample output result 913 of the Pth task round can be determined as at least one sample subtask 914.

[0129] It can be understood that the above describes how to determine a plurality of sample subtasks according to a sample value information set, and the task execution of the present disclosure will be further described below with reference to FIGS. 10A-10D, taking P=4 and the 4 task rounds including an information extraction task, an information completion task, an information inference task, and an information sorting task as an example.i

[0130] FIG. 10A schematically shows an example schematic diagram of an information extraction task execution process according to an embodiment of the present disclosure.

[0131] As shown in FIG. 10A, in 1000A, taking the prompt word information 1002 of the 0th task round as an example, the prompt word information 1002 of the 0th task round is "information extraction on user instruction", that is, the 0th task round is an information extraction task, the sample instruction 1001 "divide the whiteboard into four parts and assign pen color" and the prompt word information 1002 of the 0th task round are input into the model to obtain the sample value information set 1003.

[0132] FIG. 10B schematically shows an example schematic diagram of an information completion task execution process according to an embodiment of the present disclosure.

[0133] As shown in FIG. 10B, in 1000B, taking the prompt word information 1005 of the 1st task round as an example, the prompt word information 1005 of the 1st task round is "complete the missing information according to the user instruction: ask questions about the missing information respectively and give the corresponding answers", that is, the 1st task round is an information completion task.

[0134] Since the execution of the 1st task round depends on the 0th task round, that is, the information completion task depends on the information extraction task, the prompt word information 1002 and the sample value information set 1003 of the information extraction task can be used as the historical question and answer information 1004 of the information extraction task. On this basis, the historical question and answer information 1004 of the information extraction task and the prompt word information 1005 of the information completion task can be input into the model to obtain the sample output result 1006 of the information completion task.

[0135] It should be noted that the information completion task is determined for unknown parameter information in the sample value information set 1003, and is used to infer using a large model to complete the parameter information in the sample value information set 1003. For example, the unknown parameter information in the sample value information set 1003 is the information corresponding to the instruction object "pen color", the instruction action "assign" and the instruction parameter "?", so the model can generate the question "How many colors are assigned to the pen color?" according to the sample value information set 1003, and obtain the answer "According to the user instruction, the pen color should be assigned four colors to correspond to the divided four whiteboards" according to the semantic analysis result, and determine the above question and answer as the sample output result 1006 of the information completion task.

[0136] FIG. 10C schematically shows an example schematic diagram of an information inference task execution process according to an embodiment of the present disclosure.

[0137] As shown in FIG. 10C, in 1000C, taking the prompt word information 1008 of the 2nd task round as an example, the prompt word information 1008 of the 2nd task round is "determine the precondition of the instruction action according to the current state of the instruction object", that is, the 2nd task round is an information inference task.

[0138] Since the execution of the second task round depends on the first task round, and the execution of the first task round depends on the zeroth task round, that is, the information inference task depends on the information completion task, and the information completion task depends on the information extraction task, the prompt word information 1002 and the sample value information set 1003 of the information extraction task, the prompt word information 1005 of the information completion task, and the sample output result 1006 of the information completion task can be used as the historical question and answer information 1007 of the information inference task. On this basis, the historical question and answer information 1007 of the information inference task and the prompt word information 1008 of the information inference task can be input into the model to obtain the sample output result 1009 of the information inference task.

[0139] It should be noted that the information inference task is used to infer the preconditions of the instruction object performing the instruction action according to the state of the instruction object. In one example, the state of the instruction object can be obtained from the state storage knowledge base. The state storage knowledge base can be used to store at least one instruction object and the current state of each instruction object. For example, the current state of the instruction object “whiteboard” is “there are traces”, and the current state of the instruction object “color tray” is “closed”. In another example, in the case of not caring about the current state of the instruction object, but only needing to achieve the final effect, the experience knowledge learned by the model and the external documents can be used for reasoning to determine the preconditions of the instruction object and the instruction action.

[0140] On this basis, the model can perform forward reasoning according to the current state of the instruction object and the instruction action to be performed based on the historical question and answer information 1007 and the prompt word information 1008 of the information inference task, so as to obtain the answer “according to the state of the instruction object, it is inferred that: the precondition for dividing the whiteboard is to open the whiteboard; the precondition for opening the whiteboard is to save the current whiteboard; the precondition for the trace color is to open the color tray”, and determine the above answer as the sample output result 1009 of the information inference task.

[0141] FIG. 10D schematically shows an example schematic diagram of an information sorting task execution process according to an embodiment of the present disclosure.

[0142] As shown in FIG. 10D, in 1000D, taking the prompt word information 1011 of the third task round as “preconditions and operations to be performed, prioritize the instruction object and the instruction action” as an example, that is, the third task round is an information sorting task.

[0143] Since the execution of the third task round depends on the second task round, the execution of the second task round depends on the first task round, and the execution of the first task round depends on the zeroth task round, the information ordering task depends on the information inference task, the information inference task depends on the information completion task, and the information completion task depends on the information extraction task. Therefore, the prompt word information 1002 and the sample value information set 1003 of the information extraction task, the prompt word information 1005 of the information completion task, the sample output result 1006 of the information completion task, the prompt word information 1008 of the information inference task, and the sample output result 1009 of the information inference task can be used as the historical question and answer information 1010 of the information ordering task. On this basis, the historical question and answer information 1010 of the information ordering task and the prompt word information 1011 of the information ordering task can be input into the model to obtain the sample output result 1012 of the information ordering task.

[0144] It should be noted that the information ordering task is used to sort all operation steps after the preconditions of the instruction object are inferred, so as to ensure the ordered execution of each operation step and thus ensure the correct execution of the target task. Therefore, based on the historical question and answer information 1010 and the prompt word information 1011 of the information ordering task, the model can sort all operation steps to obtain the answer “To implement the user instruction, the operation steps to be executed in sequence are as follows: 1, save the current whiteboard; 2, open a new whiteboard; 3, automatically split the whiteboard; 4, open the palette; 5, assign a pen color”, and determine the above answer as the sample output result 1012 of the information ordering task.

[0145] After obtaining the sample output result 1012 of the information ordering task, each operation step in the sample output result 1012 can be analyzed respectively to obtain a subtask corresponding to each operation step, thereby obtaining a plurality of subtasks 1013 for implementing the target task.

[0146] For example, for operation step 1 "save the current whiteboard", it can be parsed to obtain subtask 1 "{ "object" : "whiteboard", "action" : "save "}". Alternatively, for operation step 2 "open a new whiteboard", it can be parsed to obtain subtask 2 "{ "object" : "whiteboard", "action" : "open "}". Alternatively, for operation step 3 "whiteboard automatic split", it can be parsed to obtain subtask 3 "{ "object" : "whiteboard", "action" : "split", "number" : "4 "}". Alternatively, for operation step 4 "open the palette", it can be parsed to obtain subtask 4 "{ "object" : "palette", "action" : "open "}". Alternatively, for operation step 5 "allocate ink color", it can be parsed to obtain subtask 5 "{ "object" : "ink color", "action" : "allocate", "number" : "4 "}".

[0147] On this basis, the plurality of subtasks 1013 can be executed in turn based on the association relationship, thereby realizing the execution of the target task.

[0148] FIG. 11A schematically shows a structural schematic diagram of a model for task execution according to an embodiment of the present disclosure.

[0149] As shown in FIG. 11A, in 1100A, the model 1101 includes at least one submodel, and each submodel includes a first subnetwork and a second subnetwork. For example, the model 1101 can include a submodel 1101_1, a submodel 1101_2,..., and a submodel 1101_T. The structure of each submodel is described below taking the submodel 1101_2 as an example.

[0150] In one example, the input vector can be input to the first sub-network to obtain the intermediate processing vector, and the input vector can be the target processing vector output by the last adjacent sub-model. For example, the first sub-network can include a first normalization layer 1102_1 and an attention layer 1102_2. The first normalization layer 1102_1 can be used to normalize the activation function in the training process, specifically to normalize the input hidden layer vector to reduce the influence of outliers and reduce the internal bias in the training process. The attention layer 1102_2 can be used to assign a larger weight to tokens with greater semantic correlation in the input vector and a smaller weight to tokens with smaller semantic correlation, thereby helping the model to understand which parts of the input vector to pay more attention to. The processing process of the first sub-network includes: inputting the input vector to the first normalization layer 1102_1 to obtain a first normalized vector; inputting the first normalized vector to the attention layer 1102_2 to obtain an attention vector; and on this basis, fusing the first normalized vector and the attention vector to obtain the intermediate processing vector. The intermediate processing vector can refer to a vector obtained by weighting the input vector, and the intermediate processing vector contains more semantic information than the input vector. In another example, the intermediate processing vector can be input to the second sub-network to obtain the target processing vector, and the target processing vector can be used as the input vector of the next adjacent sub-model. For example, the second sub-network can include a second normalization layer 1102_3 and a multi-layer perception layer 1102_4. The multi-layer perception layer 1102_4 can be used to mine the nonlinear relationship between semantics. The processing process of the second sub-network includes: inputting the intermediate processing vector to the second normalization layer 1102_3 to obtain a second normalized vector; inputting the second normalized vector to the multi-layer perception layer 1102_4 to obtain a multi-layer perception vector; and on this basis, fusing the second normalized vector and the multi-layer perception vector to obtain the target processing vector. The target processing vector can refer to a vector obtained by further extracting semantic features based on the input vector.

[0151] The first normalization layer 1102_1 and the second normalization layer 1102_3 can be configured according to actual business requirements, which are not limited herein. For example, the first normalization layer 1102_1 and the second normalization layer 1102_3 can be implemented based on root mean squared error normalization (RMSNorm).

[0152] FIG. 11B schematically shows a structure diagram of an attention layer according to an embodiment of the present disclosure.

[0153] As shown in FIG. 11B, in 1100B, the attention vector obtaining process is illustrated by taking the attention layer 1102_2 as an example.

[0154] In one example, the attention layer can be implemented based on rotary position encoding (RoPE). Rotary position encoding can refer to providing position information by assigning each position a unique rotation matrix, and rotary position encoding can better capture the position relationship in the text sequence by combining the advantages of absolute position encoding and relative position encoding, that is, the model can learn the relationship between knowledge points in long text. For example, taking a text of more than 50 rounds of dialogue as an example, the first 10 rounds are related to the recommendation of a travel route, the middle 30 rounds are related to a movie, and the 41st round is again related to the recommendation of a travel route. At this time, the large model can determine that the content of the conversation is about the topic of the recommendation of a travel route according to the text of the multi-round dialogue, and can also answer important information such as the location, route and hotel of the first 10 rounds, thereby realizing cross-length text understanding.

[0155] The first standardized vector 1103 can be processed to obtain a query matrix 1104_1, a key matrix 1104_2, and a value matrix 1104_3. The query matrix 1104_1 is subjected to position enhancement processing to obtain a position-enhanced query matrix 1105. The key matrix 1104_2 is subjected to position enhancement processing to obtain a position-enhanced key matrix 1106. The position-enhanced query matrix and the position-enhanced key matrix are subjected to fusion processing to obtain an attention weight matrix 1107. On this basis, the attention weight matrix 1107 and the value matrix 1104_3 are subjected to fusion processing to obtain an attention vector 1108.

[0156] FIG. 11C schematically shows a structural diagram of a multi-layer perception layer according to an embodiment of the present disclosure.

[0157] As shown in FIG. 11C, in 1100C, the obtaining process of the multi-layer perception vector is illustrated by taking the multi-layer perception layer 1102_4 as an example.

[0158] In one example, the multi-layer perception layer 1102_4 can include an upward linear transformation unit 1110, a gating unit 1111, an activation function 1112, and a downward linear transformation unit 1113. The second standardized vector 1109 can be input into the multi-layer perception layer 1102_4 to obtain a multi-layer perception vector 1114. For example, the calculation manners of the upward linear transformation unit 1110, the gating unit 1111, and the downward linear transformation unit 1113 are shown in the following formula (1) and formula (2). Based on formula (1) and formula (2), the calculation manner of the activation function 1112 is shown in the following formula (3) and formula (4). FFN(x, W1, W2, b1, b2) = max(0, xW1 + b1)W2 + b2 (1) Swishβ (x) = xσ(βx) (4)

[0159] wherein x represents a second standardized vector, σ represents a sigmoid function, represents an element-wise multiplication, W1 represents a first weight matrix of an upward linear transformation unit, W2 represents a second weight matrix of a downward linear transformation unit, b1 represents a first bias vector of the upward linear transformation unit, b2 represents a second bias vector of the downward linear transformation unit, σ(xW1+b1) serves as a gate to control the output of (xW2+b2), and β represents a specified constant.

[0160] According to an embodiment of the present disclosure, by performing position enhancement processing on the query matrix and the key matrix, the position information of the elements in the sequence can be captured, and the understanding ability of the data can be improved. By determining the attention weight matrix according to the position-enhanced query matrix and the key matrix, it can be accurately identified which part of the data is more important, which helps to focus on the key information in the data. On this basis, by determining the attention vector according to the attention weight matrix and the value matrix, since the attention vector fuses the key information and the corresponding weight in the data, it can provide high-quality feature representation for subsequent tasks.

[0161] In one example, a branch can be established beside the large model 1101 based on the Low-Rank Adaptation of Large Language Models (LoRA) technology to realize fine-tuning of the large model. The Low-Rank Adaptation of Large Language Models technology can refer to freezing the model parameters of the pre-constructed large model, adding an additional network layer branch to the large model under the condition of freezing the original model parameters, training only the parameters of the newly added network layer branch, and then fine-tuning the model parameters of the pre-constructed large model with feedback data. Since the model fine-tuning is performed on the basis of freezing the original model parameters, and the number of newly added parameters is small, the loss of pre-learned knowledge of the large model can be reduced, and new knowledge can be added, so that the cost is significantly reduced.

[0162] In one example, when the model makes a prediction, it can use the information of the first K-1 words as prior information, without considering the Kth and subsequent information, to realize the prediction of the Kth word. By taking the kth token as the target of the K-1th, the loss function value is calculated as shown in the following formula (5).

[0163] wherein loss represents a loss function value, m represents the number of words in a sample subtask, and k represents the kth word.

[0164] To prevent overfitting of the loss function, regularization can also be combined, and the gradient of the loss function is calculated, and the model parameters of the pre-constructed model are adjusted based on the gradient, and then the adjusted model is continuously trained until the predetermined end condition is met to obtain the model for task execution. The predetermined condition can include at least one of the loss function value convergence and the training round reaching the maximum training round.

[0165] FIG. 12 schematically shows a block diagram of a task execution apparatus according to an embodiment of the present disclosure.

[0166] As shown in FIG. 12, the task execution apparatus 1200 can include a first information extraction module 1210, a first determination module 1220, and a task execution module 1230.

[0167] The first information extraction module 1210 is configured to, in response to receiving an instruction for executing a target task, perform information extraction on a text corresponding to the instruction according to a plurality of preset keys to obtain a value information set, wherein the types of the preset keys include at least one of an instruction object for indicating a subject in the text, an instruction action for indicating a predicate in the text, and an instruction parameter for indicating an object in the text; and the value information set includes a plurality of value information, the value information corresponding to the instruction object is used to represent an object required for executing the target task, the value information corresponding to the instruction action is used to represent an action required for executing the target task, and the value information corresponding to the instruction parameter is used to represent a parameter related to the object or the action.

[0168] The first determination module 1220 is configured to determine a plurality of sub-tasks for implementing the target task according to the value information set.

[0169] The task execution module 1230 is configured to sequentially execute the plurality of sub-tasks based on an association relationship between the plurality of sub-tasks, wherein the association relationship is used to represent an execution order of the plurality of sub-tasks.

[0170] FIG. 13 schematically shows a block diagram of a training apparatus of a model for task execution according to an embodiment of the present disclosure.

[0171] As shown in FIG. 13, the training apparatus 1300 of the model for task execution can include a second information extraction module 1310, a second determination module 1320, a third determination module 1330, and an adjustment module 1340.

[0172] The second information extraction module 1310 is configured to, in response to receiving a sample instruction for executing a sample task, perform information extraction on a sample text corresponding to the sample instruction according to a plurality of sample preset keys to obtain a sample value information set, wherein the sample instruction corresponds to a plurality of actual sub-tasks.

[0173] The second determining module 1320 is configured to determine a plurality of sample sub-tasks for implementing the sample task according to the sample value information set.

[0174] The third determining module 1330 is configured to determine a loss function value according to the plurality of sample sub-tasks and the plurality of actual sub-tasks.

[0175] The adjusting module 1340 is configured to adjust model parameters of the pre-constructed large model according to the loss function value to obtain the large model for task execution.

[0176] Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure, or at least part of any one or more of the modules, sub-modules, units, sub-units can be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be at least partially implemented as a hardware circuit, for example, a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of hardware or firmware through integration or packaging of a circuit, or in any one of software, hardware, and firmware or in an appropriate combination of any one or more of them. Alternatively, one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be at least partially implemented as a computer program module that can perform corresponding functions when the computer program module is run.

[0177] For example, any multiple of the first information extraction module 1210, the first determination module 1220, and the task execution module 1230, or any multiple of the second information extraction module 1310, the second determination module 1320, the third determination module 1330, and the adjustment module 1340 can be combined in one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Or, at least part of the function of one or more of the modules / units / sub-units can be combined with at least part of the function of other modules / units / sub-units, and implemented in one module / unit / sub-unit. According to embodiments of the present disclosure, at least one of the first information extraction module 1210, the first determination module 1220, and the task execution module 1230, or at least one of the second information extraction module 1310, the second determination module 1320, the third determination module 1330, and the adjustment module 1340 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, etc. hardware or firmware, or in any one of software, hardware, and firmware implementation or in a proper combination of any of them. Or, at least one of the first information extraction module 1210, the first determination module 1220, and the task execution module 1230, or at least one of the second information extraction module 1310, the second determination module 1320, the third determination module 1330, and the adjustment module 1340 can be at least partially implemented as a computer program module that can perform corresponding functions when the computer program module is run.

[0178] It should be noted that the task execution device part in the embodiments of the present disclosure corresponds to the task execution method part in the embodiments of the present disclosure, and the description of the task execution device part is specifically referred to the task execution method part, which will not be repeated here. The training device part of the model for task execution in the embodiments of the present disclosure corresponds to the training method part of the model for task execution in the embodiments of the present disclosure, and the description of the training device part of the model for task execution is specifically referred to the training method part of the model for task execution, which will not be repeated here.

[0179] FIG. 14 schematically shows a block diagram of an electronic device suitable for implementing the task execution method and the training method of the model for task execution according to an embodiment of the present disclosure. The electronic device shown in FIG. 14 is only one example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.

[0180] As shown in FIG. 14, the computer electronic device 1400 according to an embodiment of the present disclosure includes a processor 1401 which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 1402 or a program loaded into a random access memory (RAM) 1403 from a storage section 1409. The processor 1401 can include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chipset and / or a special purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), and the like. The processor 1401 can also include an on-board memory for cache use. The processor 1401 can include a single processing unit or multiple processing units to perform the different actions of the method processes according to embodiments of the present disclosure.

[0181] In the RAM 1403, various programs and data required for the operation of the electronic device 1400 are stored. The processor 1401, the ROM 1402, and the RAM 1403 are connected to each other via a bus 1404. The processor 1401 performs various operations of the method processes according to embodiments of the present disclosure by executing the programs in the ROM 1402 and / or the RAM 1403. Note that the programs can also be stored in one or more memories other than the ROM 1402 and the RAM 1403. The processor 1401 can also perform various operations of the method processes according to embodiments of the present disclosure by executing the programs stored in the one or more memories.

[0182] According to an embodiment of the present disclosure, the electronic device 1400 can further include an input / output (I / O) interface 1405 which is also connected to the bus 1404. The electronic device 1400 can further include one or more of the following components connected to the input / output (I / O) interface 1405: an input section 1406 including a keyboard, a mouse, etc.; an output section 1407 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a network interface card such as a LAN card, a modem, etc. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the input / output (I / O) interface 1405 as necessary. A removable media 1411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1410 as necessary, so that a computer program read out therefrom is installed in the storage section 1408 as necessary.

[0183] According to an embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure can be implemented as a computer software program. For example, the embodiment of the present disclosure includes a computer program product including a computer program carried on a computer-readable storage medium, the computer program containing program codes for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network by the communication part 1409, and / or installed from the detachable medium 1411. When the computer program is executed by the processor 1401, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0184] The present disclosure also provides a computer-readable storage medium, which can be included in the device / apparatus / system described in the above-mentioned embodiments, or exist separately without being assembled into the device / apparatus / system. The above-mentioned computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiment of the present disclosure.

[0185] According to an embodiment of the present disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. For example, it can include but is not limited to portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any appropriate combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with a task execution system, apparatus or device.

[0186] For example, according to an embodiment of the present disclosure, the computer-readable storage medium can include one or more memories other than the ROM 1402 and / or the RAM 1403 and / or the ROM 1402 and the RAM 1403 described above.

[0187] The embodiment of the present disclosure also includes a computer program product including a computer program containing program codes for executing the method provided by the embodiment of the present disclosure, which is used to make the electronic device implement the task execution method and the training method of the model for task execution provided by the embodiment of the present disclosure when the computer program product is running on the electronic device.

[0188] When the computer program is executed by the processor 1401, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0189] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1409, and / or installed from the removable medium 1411. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0190] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0191] 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 the present disclosure. 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 a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may 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. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not expressly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0192] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A task execution method, comprising: In response to receiving an instruction for performing a target task, information is extracted from the text corresponding to the instruction based on multiple preset keys to obtain a set of value information. The preset keys include at least one of the following types: an instruction object indicating the subject of the text, an instruction action indicating the predicate of the text, and an instruction parameter indicating the object of the text. The set of value information includes multiple value information items: the value information corresponding to the instruction object is used to characterize the object required to perform the target task; the value information corresponding to the instruction action is used to characterize the action required to perform the target task; and the value information corresponding to the instruction parameter is used to characterize parameters related to the object or the action. Based on the set of value information, multiple subtasks for achieving the target task are determined; and Based on the relationships between the multiple subtasks, the multiple subtasks are executed sequentially, wherein the relationships are used to characterize the execution order of the multiple subtasks.

2. The method according to claim 1, wherein, In response to receiving an instruction for executing a target task, the text corresponding to the instruction is extracted based on multiple preset keys to obtain a set of value information, including: For each preset key, the text is detected based on the preset key to obtain the position of the value information corresponding to the preset key; based on the position, the value information is extracted from the text; and The value information set is generated based on the plurality of preset keys and the value information of each preset key.

3. The method according to claim 1 further includes, before extracting information from the text corresponding to the instruction based on a plurality of preset keys to obtain a set of value information: Perform semantic parsing on the text to obtain the semantic parsing results; If the semantic parsing result indicates that the text conforms to a first predetermined condition, a function matching result is determined based on the target function of the text and at least one candidate function, wherein... The function matching result is used to characterize the matching situation between the target function and the candidate function; as well as In response to the function matching result indicating that there is a candidate function among the at least one candidate function that matches the target function, the text is updated according to the candidate service content corresponding to the candidate function to obtain the updated text.

4. The method according to claim 3, wherein, The step of updating the text based on the candidate service content corresponding to the candidate function to obtain the updated text includes: Obtain a text template related to the candidate function, wherein the text template includes service prerequisites and at least one candidate service content; and The updated text is obtained by filling the text template with the text.

5. The method according to claim 3, further comprising: If the semantic parsing result indicates that the text meets the second predetermined condition, the execution of the instruction is terminated.

6. The method according to claim 1 or 2, wherein, The plurality of preset keys includes M preset keys, and the value information set includes N preset keys and value information corresponding to each of the N preset keys, where M and N are both positive integers, and M>N; The method further includes, before determining the multiple subtasks for implementing the target task based on the set of value information: In response to the fact that the number of value information in the value information set does not meet the third predetermined condition, an information completion request is initiated, wherein the information completion request includes (MN) keys to be completed, and the (MN) keys to be completed are determined based on the M preset keys and the N preset keys included in the value information set; In response to receiving completion information, based on the (MN) keys to be completed, information extraction is performed on the completion information to obtain the value information of each of the (MN) keys to be completed, wherein the completion information is returned by the user after receiving the information completion request; and Based on the value information of each of the (MN) keys to be completed, the set of value information is updated to obtain the updated set of value information.

7. The method according to claim 1, wherein, The value information set includes multiple preset keys and value information corresponding to each of the multiple preset keys; The step of determining multiple subtasks for achieving the target task based on the set of value information includes: Based on the plurality of preset keys, at least one component to be invoked and the invocation order for implementing the target function are determined; as well as According to the calling order, the multiple value information and the at least one component to be called are filled into the task template related to the target function to obtain the multiple subtasks.

8. The method according to claim 3 or 7, wherein, The target function is determined in the following way: Based on the semantic parsing results of the text and at least one candidate descriptive information, a similarity matching result is determined; and The function corresponding to the candidate description information that matches the semantic parsing result as indicated by the similarity matching result is determined as the target function.

9. A method for training a model for task execution, comprising: In response to receiving a sample instruction for executing a sample task, information is extracted from the sample text corresponding to the sample instruction based on multiple sample preset keys to obtain a set of sample value information, wherein the sample instruction corresponds to multiple actual sub-tasks; Based on the set of sample value information, multiple sample subtasks are determined to implement the sample task; Based on the multiple sample subtasks and the multiple actual subtasks, determine the loss function value; and Based on the loss function value, the model parameters are adjusted to obtain the model used for task execution.

10. The method according to claim 9, wherein, The multiple sample subtasks belong to P task rounds; The step of determining multiple sample sub-tasks for implementing the sample task based on the sample value information set includes: Based on the prompt word information and the set of sample value information, determine the sample output result of the Pth task round; as well as Based on the sample output results of the Pth task round, the multiple sample sub-tasks are determined.

11. The method according to claim 10, wherein, The pre-set prompt information includes the prompt information for each of the P task rounds; The step of determining the sample output result of the Pth task round based on the prompt word information and the sample value information set includes repeating the following operations until i = P, where i is a positive integer and 1 ≤ i ≤ P: When i=1, the sample value information set is processed according to the prompt word information of the first task round to obtain the sample output result of the first task round; as well as When \(1 < i\leq P\), according to the prompt information of the \(i\)-th task round, the prompt information of the \((i - 1)\)-th task round and the sample output result of the \((i - 1)\)-th task round are processed to obtain the sample output result of the \(i\)-th task round.

12. The method according to claim 10, wherein, The model includes at least one sub-model, and each sub-model includes a first sub-network and a second sub-network; For each task round, the first sub-network is used to process the input vector to obtain an intermediate processing vector. Among them, the first sub-network includes a first normalization layer and an attention layer, and the intermediate processing vector is determined according to the first normalization vector obtained by the first normalization layer processing the input vector and the attention vector obtained by the attention layer processing the first normalization vector; and The second sub-network is used to process the intermediate processing vector to obtain a target processing vector. Among them, the second sub-network includes a second normalization layer and a multi-layer perceptron layer, and the target processing vector is determined according to the second normalization vector obtained by the second normalization layer processing the intermediate processing vector and the multi-layer percept ron vector obtained by the multi-layer perceptron layer processing the second normalization vector.

13. The method according to claim 12, wherein, The attention vector is obtained by the following method: According to the first normalization vector, a query matrix, a key matrix, and a value matrix are determined; Perform position enhancement processing on the query matrix and the key matrix respectively to obtain a position-enhanced query matrix and a position-enhanced key matrix; According to the position-enhanced query matrix and the position-enhanced key matrix, an attention weight matrix is determined; And According to the attention weight matrix and the value matrix, the attention vector is determined.

14. A task execution device, including: A first information extraction module, configured to, in response to receiving an instruction for executing a target task, extract information from the text corresponding to the instruction according to multiple preset keys to obtain a value information set. The types of the preset keys include at least one of the following: an instruction object for indicating the subject in the text, an instruction action for indicating the predicate in the text, and an instruction parameter for indicating the object in the text. The value information set includes multiple value information. The value information corresponding to the instruction object is used to represent the object required for executing the target task, the value information corresponding to the instruction action is used to represent the action required for executing the target task, and the value information corresponding to the instruction parameter is used to represent the parameter related to the object or the action; A first determination module, configured to determine multiple subtasks for implementing the target task according to the value information set; and A task execution module, configured to sequentially execute the multiple subtasks based on the association relationship between the multiple subtasks, where the association relationship is used to represent the execution order of the multiple subtasks.

15. A training device for a model for task execution, including: The second information extraction module is used to respond to receiving a sample instruction for executing a sample task, and extract information from the sample text corresponding to the sample instruction according to multiple sample preset keys to obtain a set of sample value information, wherein the sample instruction corresponds to multiple actual sub-tasks. The second determining module is used to determine multiple sample sub-tasks for implementing the sample task based on the sample value information set. The third determining module is used to determine the loss function value based on the plurality of sample sub-tasks and the plurality of actual sub-tasks; and The adjustment module is used to adjust the model parameters of the model according to the loss function value, so as to obtain the model used for task execution.

16. An electronic device comprising: One or more processors; Memory, used to store one or more instructions. When the one or more instructions are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 8 or claims 9 to 13.

17. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8 or claims 9 to 12.

18. A computer program product comprising computer-executable instructions, which, when executed, are used to implement the method of any one of claims 1 to 8 or claims 9 to 13.

Citation Information

Patent Citations

  • Video push model training method and device, server and storage medium

    CN113596528A

  • Method for establishing pre-training language model and semantic analysis method and device

    CN114547329A

  • Business model generation method and device based on business requirements

    CN114638221A

  • Prediction model training method and device, data analysis method and device and medium

    CN115393094A

  • Learning device, learning method, and program

    WO2021250754A1

Cited By

  • A task scheduling method and device, electronic equipment and storage medium

    CN122431903A