Management method and device of instruction type task, electronic equipment and storage medium
By responding to user voice commands, determining and confirming tasks, and adjusting task queues with real-time updated preset tasks and user feedback, the problem of high training costs and chaotic execution of task-based Q&A models is solved, and efficient and accurate task management is achieved.
Patent Information
- Application Number
- CN202510408161.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-11
AI Technical Summary
The task-based question-and-answer model requires a large amount of data to be marked during training, resulting in high cost and complex data. At the same time, the model performs tasks when the user intends to speak in multiple intentions.
By responding to user voice commands, determine the task to be confirmed and adjust the task queue order based on user feedback confirmation information, use a fixed number of real-time update preset tasks to match, generate inquiry statements to obtain missing parameters, and give priority to the execution of urgent user tasks.
It reduces the cost of model training, improves the accuracy of task matching and the order of execution, avoids task chaos, enhances user interaction, and focuses on user intentions.
Smart Images

Figure CN120295733A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of task management, and particularly to a method, apparatus, electronic device, and storage medium for managing instruction-based tasks. Background Art
[0002] Task-based question-and-answer models need a large amount of labeled data for training to cover all possible scenarios, so that the task-based question-and-answer model can quickly determine the instruction-based task expected by the user based on a voice instruction of the user.
[0003] Since a large amount of labeled data is required in the early stage of the task-based question-and-answer model, the cost of model training is relatively high, and the model data will become complicated. At the same time, if the voice instruction of the user is an instruction for expecting to execute a multi-intent task, the related task-based question-and-answer model will have a situation of chaotic task execution. Summary of the Invention
[0004] In view of the above problems, this application provides a method, apparatus, electronic device, and storage medium for managing instruction-based tasks, which are used to quickly determine the instruction-based task in the user's voice instruction and manage the order of the tasks to be executed in the message queue through the confirmation information fed back by the user.
[0005] According to one aspect of this application, a method for managing instruction-based tasks is provided. The management method includes: in response to a voice instruction of a user, determining a task to be confirmed for output from a plurality of preset tasks according to the instruction information represented by the voice instruction, so that the user determines whether the task to be confirmed is the task to be executed specified by the voice instruction; wherein, the plurality of preset tasks are a fixed number of tasks determined from an updated task set; if so, and the task to be executed is not stored in the task queue, adding the task to be executed as the last task to be executed output in the task queue; if so, and the task to be executed is stored in the task queue, adjusting the task to be executed to be the first task to be executed output in the task queue.
[0006] In an optional manner, the management method further includes: detecting whether a task parameter of the first task to be executed output in the task queue is missing; if missing, generating an inquiry statement required for output based on the missing task parameter to obtain supplementary information output by the user in response to the inquiry statement, and extracting the required missing parameter from the supplementary information until the task parameters of the first task to be executed output are complete; calling a preset interface to execute the first task to be executed with complete task parameters until the execution is successful or the number of execution times reaches a preset number of times.
[0007] In an alternative manner, detecting whether task parameters of the earliest output task to be executed in the task queue are missing includes: detecting the value of each task parameter corresponding to the earliest output task to be executed in the task queue, and detecting whether the parameter filling value corresponding to the earliest output task to be executed is less than a preset value; wherein, the parameter filling value is based on the ratio of the number of already supplemented parameters to the total number of supplemented parameters required for execution; if the value of any task parameter is empty and the parameter filling value is less than the preset value, it indicates that the task parameters of the earliest output task to be executed in the task queue are missing.
[0008] In an alternative manner, generating an inquiry statement required for output based on the missing task parameters includes: matching the corresponding preset inquiry fields based on the missing task parameters; inputting the corresponding preset inquiry fields into a preset function function corresponding to the missing task parameters to generate an inquiry statement required for output.
[0009] In an alternative manner, determining a task to be confirmed for output from multiple preset tasks according to the instruction information represented by the voice instruction includes: matching the instruction information represented by the voice instruction with multiple preset task descriptions; wherein, each preset task description corresponds to a corresponding preset task; and outputting the preset task corresponding to the preset task description with the highest matching degree as the task to be confirmed.
[0010] In an alternative manner, performing a matching operation between the instruction information represented by the voice instruction and multiple preset task descriptions includes: if the instruction information represented by the voice instruction fails to match all preset task descriptions, outputting a prompt voice to prompt the user to reissue the voice instruction.
[0011] In an alternative manner, the management method further includes: training an evaluation model based on a preset number of training samples to obtain a trained evaluation model; wherein, the training samples include task samples and task descriptions corresponding to the task samples; inputting the tasks in the updated task set into the trained evaluation model to obtain scores for each task; and selecting the fixed number of initial tasks from the tasks with scores from high to low as the multiple preset tasks.
[0012] According to another aspect of the present application, a management device for instruction-based tasks is provided. The management device includes: a response module, configured to respond to a user's voice instruction, and determine a to-be-confirmed task from a plurality of preset tasks according to the instruction information represented by the voice instruction, and output the to-be-confirmed task to enable the user to determine whether the to-be-confirmed task is the to-be-executed task specified by the voice instruction; wherein the plurality of preset tasks are a fixed number of tasks determined from an updated task set; an adding module, configured to, if so, and the to-be-executed task is not stored in the task queue, add the to-be-executed task as the last to-be-executed task output in the task queue; an adjusting module, configured to, if so, and the to-be-executed task is stored in the task queue, adjust the to-be-executed task to be the first to-be-executed task output in the task queue.
[0013] According to one aspect of the present application, an electronic device is provided, including: a controller; a memory, configured to store one or more programs, and when the one or more programs are executed by the controller, to execute the above management method.
[0014] According to one aspect of the present application, a computer-readable storage medium is further provided, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the above management method.
[0015] According to one aspect of the present application, a computer program product or a computer program is further provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above management method.
[0016] The present application does not need to add preset tasks for task matching of user voice instructions, that is, it does not need to adapt to the matching scenario by adding a large amount of labeled data, but instead updates a fixed number of preset tasks in real time to ensure the matching adaptability of the preset tasks in real time. At the same time, according to the confirmation information fed back by the user, it is determined whether the to-be-confirmed task is the to-be-executed task, so as to strengthen the information interaction with the user, avoid deviating from the intention of the instruction information represented by the voice instruction, and adaptively adjust the output order of the to-be-executed task according to the confirmation result and the storage status of the task queue, so as to focus on the management of the instruction-based tasks of the user voice instruction and avoid the disorder of the order of the to-be-executed tasks.
[0017] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically given below. Brief Description of the Drawings
[0018] The drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 is a schematic flowchart of a method for managing instruction-based tasks shown in an exemplary embodiment of the present application.
[0020] Figure 2 is based on Figure 1 Another schematic flowchart of a method for managing instruction-based tasks shown in the exemplary embodiment.
[0021] Figure 3 is based on Figure 1 Another schematic flowchart of a method for managing instruction-based tasks shown in the exemplary embodiment.
[0022] Figure 4 is based on Figures 1 to 3 Another schematic flowchart of a method for managing instruction-based tasks shown in any of the exemplary embodiments.
[0023] Figure 5 is a schematic diagram of the application scenario of the method for managing instruction-based tasks of the present application.
[0024] Figure 6 is a schematic structural diagram of an instruction-based task management device shown in an exemplary embodiment of the present application.
[0025] Figure 7 is a schematic structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application. Detailed Description of the Embodiments
[0026] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0027] The block diagrams shown in the accompanying drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0028] The flowcharts shown in the accompanying drawings are only exemplary illustrations, and do not necessarily include all content and operations / steps, nor do they necessarily need to be executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.
[0029] As used in this application, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0030] The task-based question-and-answer model requires a large amount of labeled data in the early stage, resulting in a high cost for model training and making the model data complicated. At the same time, if the user's voice instruction is an instruction for performing a multi-intent task, the relevant task-based question-and-answer model will have a situation of chaotic task execution.
[0031] For this reason, one aspect of this application provides a management method for instruction-based tasks. For details, please refer to Figure 1 , Figure 1 is a schematic flowchart of a management method for instruction-based tasks shown in an exemplary embodiment of this application. This management method at least includes S110 to S130, which are introduced in detail as follows:
[0032] S110: In response to the user's voice instruction, according to the instruction information represented by the voice instruction, determine the to-be-confirmed task from multiple preset tasks for output, so that the user can determine whether the to-be-confirmed task is the to-be-executed task specified by the voice instruction; among them, the multiple preset tasks are a fixed number of tasks determined from the updated task set.
[0033] A voice instruction is an instruction-based statement issued by the user carrying the user's intention, and the instruction information it represents includes, but is not limited to, the intention or task that the user expects to execute, and information such as the execution time. The voice instruction can be an imperative statement, an interrogative statement, etc. For example, the voice instruction can be "Please book a flight ticket", or "What are the steps to book a flight ticket on the mobile phone?".
[0034] The related technology directly determines the task that the user expects to execute based on a voice command of the user. In this way, relatively large errors are likely to occur, and there are relatively high requirements for the coverage scenarios, quantity, etc. of the sample data (preset tasks). This application strengthens the information interaction with the user, extracts the intention of the user (i.e., the task to be confirmed) based on the command information represented by the voice command. In order to avoid understanding deviations, the task to be confirmed is returned to the user so that the user can confirm whether the task to be confirmed is the task that the user expects to execute, that is, by obtaining the confirmation information of the user to reconfirm the recognized task to be confirmed, and avoid deviating from the intention of the command information represented by the voice command, thereby improving the accuracy of recognizing the voice command. Exemplarily, the voice command is "What are the steps to book a flight on the mobile phone?", and the determined task to be confirmed is "Book a flight on the mobile phone", then the query statement is output: "Do you want to book a flight on the mobile phone? If so, please reply yes, otherwise, please reply no.", to obtain the confirmation result of the user; if the user answers: "Yes", it indicates that the task to be confirmed is the task that the user expects to execute, that is, the task to be confirmed is the task to be executed specified by the voice command.
[0035] In addition, the number of preset tasks used for task matching in this application is fixed, and the preset tasks are tasks determined from a task set that is updated in real time. For example, the number of preset tasks is 100. As the requirements of the scenario change, or the task change trend represented by the command, the task set is adaptively updated. Instead of blindly increasing the number of preset tasks, the inapplicable tasks are replaced in real time, so that the task matching process is more lightweight.
[0036] S120: If it is yes, and there is no task to be executed stored in the task queue, then add the task to be executed as the last output task to be executed in the task queue.
[0037] This application introduces a task queue to manage the output order of multiple tasks to be executed. The task queue outputs the tasks to be executed in sequence, so that each task to be executed is executed in sequence; among them, the task queue follows the principle of first in, first out, that is, the task to be executed stored in the task queue first is output first, thus ensuring the orderliness of the execution order of the tasks to be executed.
[0038] If the confirmation result feedback by the user indicates that the task to be confirmed is the task to be executed specified by the voice command, and there is no such task to be executed stored in the task queue, it indicates that the task to be executed is a newly added task that the user expects to execute, and it is stored in the task queue, and is defaulted to the last output task to be executed in the current task queue.
[0039] S130: If it is yes, and there is a task to be executed stored in the task queue, then adjust the task to be executed to the first output task to be executed in the task queue.
[0040] If the confirmation result fed back by the user indicates that the task to be confirmed is the task to be executed specified by the voice command, and the task to be executed is stored in the task queue, then it indicates that the task to be executed has been configured with a corresponding output order, that is, the task to be executed corresponding to the voice command is already in the output arrangement of the task queue; on another level, it indicates that the same task to be executed has been repeatedly recognized, and it can be perceived that the user is eager to execute the task to be executed. The present application adjusts the position of the task to be executed in the task queue so that it is the first task to be executed output in the current task queue, focuses on the user's current voice command, and outputs the task to be executed from the task queue first, so as to respond to the user's urgent needs first, thereby improving user satisfaction.
[0041] This embodiment does not need to add preset tasks for task matching of user voice commands, that is, it does not need to adapt the matching scene by adding a large amount of annotated data, but updates a fixed number of preset tasks in real time to ensure the matching adaptability of the preset tasks in real time. At the same time, it determines whether the task to be confirmed is a task to be executed based on the confirmation information fed back by the user, so as to strengthen the information interaction with the user, avoid deviation from the intention of the instruction information represented by the voice command, and adaptively adjust the output order of the tasks to be executed based on the confirmation result and the storage status of the task queue, so as to focus on the management of the instruction-type tasks of the user's voice command and avoid confusion in the order of the tasks to be executed.
[0042] The related technology lacks execution management of tasks to be executed, which leads to execution confusion or omission of related tasks to be executed.
[0043] To this end, in another exemplary embodiment of the present application, how to execute each task to be executed in the task queue is described in detail. Figure 2 , Figure 2 is based on Figure 1 The exemplary embodiment shown is a flow chart of another method for managing command-type tasks. Figure 1 Based on the S110 to S130 shown, at least S210 to S230 are also included, which are described in detail as follows:
[0044] S210: Detect whether the task parameters of the first task to be executed outputted in the task queue are missing.
[0045] The first pending tasks output by the task queue are the tasks that need to be executed urgently. When executing pending tasks, the support of relevant task parameters is required to ensure that the pending tasks are executed smoothly. Among them, task parameters are the relevant parameters required when executing tasks, including but not limited to the execution time, execution action, execution object and other parameters of the pending tasks.
[0046] S220: If there is a missing parameter, an inquiry statement required for output will be generated based on the missing task parameter to obtain supplementary information output by the user in response to the inquiry statement, and the required missing parameter will be extracted from the supplementary information until the task parameters of the to-be-executed task output first are complete.
[0047] If a task parameter is missing, the to-be-executed task may be executed unsuccessfully, or the execution may be terminated or incomplete. To ensure the smooth execution of the to-be-executed task, an inquiry statement can be generated based on a preset format so that the user is aware of the missing task parameter and replies with corresponding supplementary information. Thus, the execution entity of this application can extract the corresponding missing parameter from the supplementary information. By analogy, multiple rounds of inquiries can be made until all missing task parameters are supplemented.
[0048] The following is a detailed introduction on how to generate an inquiry statement required for output based on the missing task parameter:
[0049] Match the corresponding preset inquiry field based on the missing task parameter; input the corresponding preset inquiry field into the preset function corresponding to the missing task parameter to generate the inquiry statement required for output.
[0050] Among them, both the preset inquiry field and the preset function are corresponding to the corresponding missing task parameter. By setting the corresponding relationship between them, the corresponding preset inquiry field and preset function can be quickly matched according to the missing task parameter.
[0051] Exemplarily, if the missing task parameter is the leave date in the leave task, the corresponding preset inquiry fields are "start date of leave" and "end date of leave". Inputting them into the following preset function can automatically generate an inquiry statement: "Please provide the start date and end date of the leave".
[0052] <Function function>Leave< / Function function>
[0053] <Missing parameter>
[0054] {
[0055] "start_date":{
[0056] "type":"string",
[0057] "description":"Leave start date, YYYY-MM-DD"
[0058] },
[0059] "end_date":{
[0060] "type":"string",
[0061] "description": "End date of leave, YYYY-MM-DD"
[0062] },
[0063] }
[0064] < / Missing parameter>
[0065] S230: Call the preset interface to execute the first output task to be executed with complete task parameters until the execution is successful or the number of executions reaches the preset number of times.
[0066] The first output task to be executed in the task queue is also the first task to be executed. This application can execute the task to be executed through a preset structure. If the execution is successful, the value of exec_state (execution result) of the task to be executed is success. If the execution fails, the preset interface is called again to execute the task to be executed, and so on until the value of exec_state is updated to success. If the execution is still not successful after reaching the preset number of times, the value of exec_state is updated to fail to end the execution of the task to be tested.
[0067] This embodiment provides a method for obtaining task parameters before executing a task to be executed. By generating an interrogation statement for missing parameters, the missing parameters in the user's supplementary information are captured, so that through multiple interactions with the user, the task parameters required for execution are improved. At the same time, this embodiment further introduces the method of executing a task to be executed, that is, calling a preset interface to execute, and setting a preset number of times to provide multiple execution opportunities to avoid inaccurate execution results due to too few execution times.
[0068] In some embodiments, the above S210 at least includes S211 to S212, which are introduced in detail as follows:
[0069] S211: Detect the value of each task parameter corresponding to the first output task to be executed in the task queue, and detect whether the parameter filling value corresponding to the first output task to be executed is less than the preset value; wherein, the parameter filling value is based on the ratio of the number of supplemented parameters to the total number of supplemented parameters required for execution.
[0070] During the execution of the task to be executed, three important parameters are involved, including Parameter (task parameter set), param_state (parameter filling value), and exec_state (execution result). Among them, the value of the task parameter is the direct parameter indicating whether it is missing. For example, if the value of a certain task parameter is None, it indicates that the task parameter is empty, that is, the task parameter is missing. The parameter filling value is the filling progress of the task parameters required to execute the task to be executed. If the task parameters are complete, the parameter filling value is the maximum value. The execution result includes two results: success and failure, and param_state = the number of filled parameters / the total number of missing parameters.
[0071] The preset value can be adjusted according to the actual scenario. If it is to ensure the completeness of the task parameters, it can be set to 100%, that is, the parameter filling needs to be completed 100% to meet one of the conditions for the completeness of the task parameters. By detecting the value of the task parameter and the parameter filling value, the detection result of whether the task parameter is missing can be made more accurate.
[0072] S212: If the value of any task parameter is empty and the parameter filling value is less than the preset value, it indicates that the task parameters of the first output task to be executed in the task queue are missing.
[0073] In this application, the value of each task parameter is detected, and the filling progress of the entire task parameter also needs to be monitored. Only when all task parameters are not empty and the parameter filling value reaches the preset value can it be determined that the task parameters of the corresponding task to be executed are complete.
[0074] Exemplarily, traverse all task parameters in Parameter to determine the task parameters with empty values as missing parameters; if a task parameter with an empty value is detected and the parameter filling value does not reach the preset value, it is determined that the task parameters of the current task to be executed are missing, and the missing task parameters need to be further supplemented to ensure the smooth execution of the current task to be executed.
[0075] The reference of the related task-based Q&A model for speech command recognition depends on the task name, that is, directly matching the text information extracted from the speech command with the preset task name. Due to the diversity of Chinese expressions: synonymous words, different expression patterns with the same meaning, etc., it is easy to miss matches. To solve this technical problem, the related technologies are all constantly increasing the number of preset task names, which will make the model too heavy.
[0076] For this reason, in another exemplary embodiment of this application, a lightweight task matching method is introduced in detail. For details, please refer to Figure 3 , Figure 3 is based on Figure 1Schematic flowchart of another method for managing instruction-based tasks shown in the exemplary embodiment. This management method, in S110 as shown in Figure 1 includes at least S310 to S320, which are introduced in detail as follows:
[0077] S310: Match the instruction information represented by the voice instruction with multiple preset task descriptions; where each preset task description corresponds to a corresponding preset task.
[0078] This application does not directly match the instruction information with the preset task names, but introduces preset task descriptions to perform task matching on the instruction information. Because the preset task descriptions can cover tasks with the same meaning but different names, to avoid missing preset tasks with the same meaning due to different expressions during the matching process, thereby improving the accuracy of task matching.
[0079] The instruction information may match successfully with at least one preset task. Here, the so-called "matching successfully" means the case where the matching degree reaches a preset value. For example, the case where the matching degree reaches 70% is defined as the case of successful matching.
[0080] If the instruction information represented by the voice instruction fails to match all the preset task descriptions, a prompt voice is output to prompt the user to issue the voice instruction again. This situation may be caused by the user's poor expression, enabling the user to reorganize the voice and issue the instruction again. This situation may also be that the field involved in the voice instruction has a large difference from the field of the preset task, and preset tasks with the same field can be replaced for task matching, thereby ensuring the smooth progress of task matching.
[0081] Each preset task description corresponds to at least one preset task. For example, the preset task description: "The hotel reservation function is designed to reserve a hotel for the user" corresponds to the preset tasks including: "Reserve a hotel", "Activate the hotel reservation function", "Search for a hotel", etc.
[0082] S320: Output the preset task corresponding to the preset task description with the highest matching degree as the task to be confirmed.
[0083] In order to match more accurate preset tasks, the matching degrees can be sorted to determine the preset task description with the highest matching degree, and the corresponding preset task is used as the task to be confirmed.
[0084] In some embodiments, multiple preset tasks corresponding to the preset task description with the highest matching degree can also be filtered. For example, the instruction information represented by the voice command is: "Search for a nearby hotel", and the preset task description with the highest matching degree is "The hotel reservation function is designed to reserve a hotel for users". Then, the preset task with the highest matching degree: "Search for a hotel" is selected from the corresponding preset tasks: "Reserve a hotel", "Open the hotel reservation function", "Search for a hotel" as the task to be confirmed.
[0085] In this embodiment, according to the preset task description and the instruction information represented by the voice command, the corresponding task to be confirmed is accurately determined. Compared with the matching method directly based on the preset task name in the related art, this embodiment can avoid the occurrence of missed matching, thereby improving the accuracy of the task to be confirmed.
[0086] In another exemplary embodiment of the present application, the origin of the preset task is introduced in detail. For details, please refer to Figure 4 , Figure 4 is a schematic flowchart of another instruction-based task management method shown in any of the exemplary embodiments shown in Figures 1 to 3 The management method at least further includes S410 to S430, which are introduced in detail as follows:
[0087] S410: Train an evaluation model based on a preset number of training samples to obtain a trained evaluation model; wherein, the training samples include task samples and task descriptions corresponding to the task samples.
[0088] S420: Input the tasks in the updated task set into the trained evaluation model to obtain the scores of each task.
[0089] S430: Select a fixed number of initial tasks as multiple preset tasks from the tasks with scores from high to low.
[0090] Exemplarily, use cross-encoder as the evaluation model and use thousands of training samples annotated by the business to train the evaluation model, thereby obtaining a trained evaluation model. Examples of the training samples are as follows:
[0091] {"question": "What are the steps to book a flight on the mobile phone?", "task description": "The flight reservation function is designed to reserve a hotel for users", "label": 1}
[0092] {"question": "What are the steps to book a flight on the mobile phone?", "task description": "The hotel reservation function is designed to reserve a hotel for users", "label": 0}
[0093] Among them, "1" indicates that the question and the task description point to the same task, and "0" indicates that the question and the task description are not the same task.
[0094] Input the tasks in the updated task set into the trained evaluation model to score each task and obtain the scores of each sentence; each sentence includes a preset task and a task description corresponding to the preset task. An example of the scoring result is as follows:
[0095] {"Question": "What are the steps to book a flight on the mobile phone?", "Task description": "The flight booking function is designed to book hotels for users", "Score": 0.98}
[0096] {"Question": "What are the steps to book a flight on the mobile phone?", "Task description": "The hotel booking function is designed to book hotels for users", "Score": 0.01}
[0097] Based on the scores, following the principle of descending scores, select the top K tasks as the current preset tasks.
[0098] This application uses a small number of preset tasks without setting or adding a large number of preset tasks to identify the command-type tasks in the voice commands. Instead, it scores each current task based on the trained model to select a fixed number of tasks with higher scores as the preset tasks to achieve the purpose of lightweight task management.
[0099] In another exemplary embodiment of this application, an exemplary description of the application scenarios of the above-mentioned multiple management methods is provided. For details, please refer to Figure 5 , Figure 5 is a schematic diagram of the application scenario of the management method for command-type tasks of this application. It includes user 100, display interface 200, and task-based question-and-answer system 300. This application does not limit the connection method between them. The task-based question-and-answer system 300 serves as the execution subject of the management method shown in any of the above exemplary embodiments to execute any of the above management methods. An exemplary description is as follows:
[0100] The user 100 issues a voice command to the task-based question-and-answer system 300. The task-based question-and-answer model in the task-based question-and-answer system 300 responds to the voice command, determines the task to be confirmed from multiple preset tasks in the preset task set and outputs it, and outputs it to the display interface 200 or broadcasts an inquiry statement by voice so that the user 100 can determine whether the task to be confirmed is the task to be executed specified by the voice command; if so, detect the task detection module in the task-based question-and-answer system 300 to detect whether the task queue stores the task to be executed; if it exists, adjust the task to be executed to the task to be executed that is output first in the task queue; if it does not exist, add the task to be executed as the task to be executed that is output last in the task queue.
[0101] The task status management module in the task-based question-answering system 300 detects whether the task parameters of the currently first-output task to be executed in the task queue are missing; if missing, the task status management module generates an inquiry statement required for output based on the missing task parameters, outputs it to the display interface 200 or broadcasts the inquiry statement by voice, so as to obtain the supplementary information output by the user in response to the inquiry statement, and extracts the required missing parameters from the supplementary information until the task parameters of the first-output task to be executed are complete.
[0102] Another aspect of the present application also provides a management device for instruction-type tasks, as Figure 6 shown Figure 6 is a schematic structural diagram of a management device for instruction-type tasks shown in an exemplary embodiment of the present application.
[0103] The management device 600 includes:
[0104] A response module 610, configured to respond to a voice instruction of a user, and determine a task to be confirmed from a plurality of preset tasks for output according to the instruction information represented by the voice instruction, so that the user can determine whether the task to be confirmed is the task to be executed specified by the voice instruction; wherein, the plurality of preset tasks are a fixed number of tasks determined from the updated task set;
[0105] An adding module 630, configured to, if so, and if there is no task to be executed stored in the task queue, add the task to be executed as the last-output task to be executed in the task queue;
[0106] An adjustment module 650, configured to, if so, and if there is a task to be executed stored in the task queue, adjust the task to be executed to the first-output task to be executed in the task queue.
[0107] In another exemplary embodiment, the management device 600 further includes:
[0108] A detection module, configured to detect whether the task parameters of the first-output task to be executed in the task queue are missing;
[0109] A detection and missing module, configured to, if missing, generate an inquiry statement required for output based on the missing task parameters, so as to obtain the supplementary information output by the user in response to the inquiry statement, and extract the required missing parameters from the supplementary information until the task parameters of the first-output task to be executed are complete;
[0110] A calling module, configured to call a preset interface to execute the first-output task to be executed with complete task parameters until the execution is successful or the number of execution times reaches a preset number of times.
[0111] In another exemplary embodiment, the detection module includes:
[0112] A detection unit, configured to detect the values of each task parameter corresponding to the first output task to be executed in the task queue, and to detect whether the parameter filling value corresponding to the first output task to be executed is less than a preset value; wherein, the parameter filling value is based on the ratio of the number of supplemented parameters to the total number of supplemented parameters required for execution;
[0113] A detection result unit, configured to indicate that the task parameters of the first output task to be executed in the task queue are missing if the value of any task parameter is empty and the parameter filling value is less than a preset value.
[0114] In another exemplary embodiment, the detection missing module includes:
[0115] A field matching unit, configured to match the missing task parameters to obtain corresponding preset inquiry fields;
[0116] A generation unit, configured to input the corresponding preset inquiry field into a preset function function corresponding to the missing task parameter to generate an inquiry statement required for output.
[0117] In another exemplary embodiment, the response module 610 includes:
[0118] A task matching unit, configured to match the instruction information represented by the voice instruction with multiple preset task descriptions; wherein, each preset task description corresponds to a corresponding preset task;
[0119] A screening unit, configured to output the preset task corresponding to the preset task description with the highest matching degree as the task to be confirmed.
[0120] In another exemplary embodiment, the task matching unit includes:
[0121] A prompt section, configured to output a prompt voice to prompt the user to reissue a voice instruction if the instruction information represented by the voice instruction fails to match all preset task descriptions.
[0122] In another exemplary embodiment, the management device 600 further includes:
[0123] A training module, configured to train an evaluation model based on a preset number of training samples to obtain a trained evaluation model; wherein, the training samples include task samples and task descriptions corresponding to the task samples;
[0124] A scoring module, configured to input the tasks in the updated task set into the trained evaluation model to obtain the scores of each task;
[0125] A selection module, configured to select a fixed number of initial tasks as multiple preset tasks from the tasks with scores from high to low.
[0126] The management device of the present application does not need to add preset tasks for task matching of user voice commands, that is, it does not need to adapt to matching scenarios by adding a large amount of labeled data, but instead updates a fixed number of preset tasks in real time to ensure the matching adaptability of the preset tasks in real time. At the same time, it determines whether the task to be confirmed is a task to be executed according to the confirmation information feedback by the user, so as to strengthen the information interaction with the user, avoid deviating from the intention of the command information represented by the voice command, and adaptively adjust the output order of the tasks to be executed according to the confirmation result and the storage status of the task queue, so as to focus on the management of the command-type tasks of the user voice command and avoid the disorder of the order of the tasks to be executed.
[0127] It should be noted that the management device provided in the above embodiment and the management method provided in the foregoing embodiment belong to the same concept. The specific ways in which each module and unit perform operations have been described in detail in the method embodiment, and will not be elaborated here.
[0128] On the other hand, the present application also provides an electronic device, including: a controller; a memory for storing one or more programs, which when executed by the controller, are used to execute the above management method.
[0129] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application, and shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application.
[0130] It should be noted that Figure 7 the computer system 700 of the electronic device shown is only an example, and should not bring any limitations to the functions and usage scopes of the embodiments of the present application.
[0131] As Figure 7 shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage section 708 into the random access memory (RAM) 703, such as executing the method in the above embodiment. In the RAM 703, various programs and data required for system operation are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. The input / output (I / O) interface 705 is also connected to the bus 704.
[0132] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.
[0133] Specifically, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product including a computer program carried on a computer-readable medium, the computer program including a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by a central processing unit (CPU) 701, various functions defined in the system of the present application are executed.
[0134] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in an order different from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0136] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not, in some cases, constitute a limitation on the unit itself.
[0137] On the other hand, this application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the foregoing management method is implemented. The computer-readable storage medium may be included in the electronic device described in the foregoing embodiments, or may exist separately without being assembled into the electronic device.
[0138] On the other hand, this application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the management methods provided in the foregoing embodiments.
[0139] According to one aspect of the embodiments of this application, a computer system is also provided, including a central processing unit (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage section into a random access memory (RAM), such as executing the method in the foregoing embodiments. In the RAM, various programs and data required for system operation are also stored. The CPU, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0140] The following components are connected to the I / O interface: an input section including a keyboard, a mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker; a storage section including a hard disk, etc.; and a communication section including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as required. A removable medium, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive as required, so that a computer program read from the removable medium can be installed into the storage section as required.
[0141] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation of the present application. Those of ordinary skill in the art can easily make corresponding adaptations or modifications according to the main concept and spirit of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope required by the claims.
Claims
1. A management method for instruction-based tasks, characterized in that, The management method includes: In response to a user's voice instruction, according to the instruction information represented by the voice instruction, determine a task to be confirmed from multiple preset tasks for output, so that the user can determine whether the task to be confirmed is the task to be executed specified by the voice instruction; wherein, the multiple preset tasks are a fixed number of tasks determined from an updated task set; If so, and the task to be executed is not stored in the task queue, add the task to be executed as the last task to be executed output in the task queue; If so, and the task to be executed is stored in the task queue, adjust the task to be executed to the first task to be executed output in the task queue.
2. The management method according to claim 1, wherein The management method further includes: Detect whether the task parameters of the first task to be executed output in the task queue are missing; If missing, generate an interrogation statement required for output based on the missing task parameters, to obtain supplementary information output by the user in response to the interrogation statement, and extract the required missing parameters from the supplementary information until the task parameters of the first task to be executed output are complete; Call a preset interface to execute the first task to be executed with complete task parameters until the execution is successful or the number of execution times reaches a preset number of times.
3. The management method according to claim 2, characterized in that Detecting whether the task parameters of the first task to be executed output in the task queue are missing includes: Detect the value of each task parameter corresponding to the first task to be executed output in the task queue, and detect whether the parameter filling value corresponding to the first task to be executed output is less than a preset value; wherein, the parameter filling value is based on the ratio of the number of already supplemented parameters to the total number of supplemented parameters required for execution; If the value of any task parameter is empty and the parameter filling value is less than the preset value, it indicates that the task parameters of the first task to be executed output in the task queue are missing.
4. The management method according to claim 2, characterized in that, Generating an interrogation statement required for output based on the missing task parameters includes: Match the corresponding preset interrogation field based on the missing task parameters; Input the corresponding preset interrogation field into the preset function function corresponding to the missing task parameter to generate an interrogation statement required for output.
5. The management method according to claim 1, characterized in that, Determining a task to be confirmed from multiple preset tasks for output according to the instruction information represented by the voice instruction includes: Match the instruction information represented by the voice instruction with multiple preset task descriptions; wherein, each preset task description corresponds to a corresponding preset task; Output the preset task corresponding to the preset task description with the highest matching degree as the task to be confirmed.
6. The management method according to claim 5, wherein The operation of matching the instruction information represented by the voice instruction with multiple preset task descriptions includes: If the instruction information represented by the voice instruction fails to match all preset task descriptions, output a prompt voice to prompt the user to issue a voice instruction again.
7. The management method according to any one of claims 1 to 6, characterized in that The management method further includes: Train an evaluation model based on a preset number of training samples to obtain a trained evaluation model; wherein, the training samples include task samples and the task descriptions corresponding to the task samples; Input the tasks in the updated task set into the trained evaluation model to obtain the scores of each task; Select the fixed number of initial tasks from the tasks with scores from high to low as the multiple preset tasks.
8. A management device for instruction-based tasks, characterized in that, The management device includes: A response module, configured to respond to a user's voice command, and determine a to-be-confirmed task for output from multiple preset tasks according to the command information represented by the voice command, so that the user can determine whether the to-be-confirmed task is the to-be-executed task specified by the voice command; wherein, the multiple preset tasks are a fixed number of tasks determined from the updated task set; An adding module, configured to, if it is, and the to-be-executed task is not stored in the task queue, add the to-be-executed task as the last to-be-executed task output in the task queue; An adjustment module, configured to, if it is, and the to-be-executed task is stored in the task queue, adjust the to-be-executed task to be the first to-be-executed task output in the task queue.
9. An electronic device, characterized in that, Includes: A controller; A memory, configured to store one or more programs, which, when executed by the controller, cause the controller to implement the management method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Computer-readable instructions are stored thereon, which, when executed by a processor of a computer, cause the computer to execute the management method according to any one of claims 1 to 7.