Task processing methods and electronic devices

By using smartphone task processing methods, user commands are identified and broken down into task description statements, and an execution chain is constructed. This solves the problems of time-consuming, labor-intensive, and error-prone complex tasks, and achieves efficient automatic execution.

CN122308675APending Publication Date: 2026-06-30HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-12-30
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In daily use of smartphones, when users need to perform complex tasks, manual operation is time-consuming, laborious, and prone to errors. Existing technologies cannot effectively handle complex multi-step tasks.

Method used

By acquiring user commands, identifying their intent, and breaking them down into task description statements, a task execution chain is constructed to ensure that the dependencies between tasks are handled correctly and user requests are executed automatically.

Benefits of technology

It improves the efficiency of handling complex tasks, ensures the smooth completion of tasks, and reduces human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122308675A_ABST
    Figure CN122308675A_ABST
Patent Text Reader

Abstract

This application provides a task processing method, relating to the field of terminal technology. The method includes: acquiring a first command input by a user, and performing intent recognition on the first command to obtain at least one operation intent corresponding to the first command. For any one of the at least one operation intent, a task decomposition model corresponding to the operation intent is determined, and a task description statement corresponding to the operation intent is generated based on the task decomposition model. A task execution chain is generated according to the task description statements corresponding to each of the at least one operation intent. According to the task execution chain, the tasks corresponding to each task description statement are executed sequentially to execute the operation corresponding to the first command. In this way, by constructing an executable task chain corresponding to the first command, an effective execution path is ensured between the tasks corresponding to the first command, thereby enabling the implementation of the first command and completing the automatic execution of complex tasks, improving the efficiency of processing complex tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a task processing method and an electronic device. Background Technology

[0002] In daily use of smartphones, users often need to perform a series of complex operations to complete various tasks, such as sending files, planning navigation routes to a certain place, booking a vehicle to a specific location, and setting reminders.

[0003] However, manually performing these tasks is not only time-consuming and laborious, but also prone to problems due to operational errors. This is especially true for complex tasks with many steps, which are inefficient due to the numerous processes involved. Summary of the Invention

[0004] This application provides a task processing method and an electronic device, applicable to the field of terminal technology. This enables the automatic processing of complex tasks, thereby improving the efficiency of handling complex tasks.

[0005] In a first aspect, embodiments of this application propose a task processing method. The method includes: acquiring a first command input by a user, and performing intent recognition on the first command to obtain at least one operation intent corresponding to the first command. For any one of the at least one operation intent, determining a task decomposition model corresponding to the operation intent, and generating task description statements for at least one task corresponding to the operation intent based on the task decomposition model. Based on the task description statements corresponding to each of the at least one operation intent, generating a task execution chain, the task execution chain containing each task description statement. Based on the task execution chain, sequentially executing the tasks corresponding to each task description statement to execute the operation corresponding to the first command.

[0006] In this way, the first command can be broken down according to the operational intent to obtain the task description statement corresponding to the first command. Then, based on the relationship between the task description statements, a task execution chain is constructed to ensure that there is an effective execution path between the tasks corresponding to the first command, and that the first command can be successfully implemented based on this execution path, thereby achieving the goal of automatically processing complex tasks and improving the efficiency of processing complex tasks.

[0007] In one possible implementation, the task processing method is applied to a terminal device, which includes a service unit and an intent processing unit. The service unit is used to obtain a first command and to perform intent recognition on the first command to obtain at least one operation intent corresponding to the first command. This includes: the intent processing unit performing intent recognition on the first command based on the first command provided by the service unit to obtain at least one operation intent corresponding to the first command.

[0008] In this way, the user's input can be processed on the terminal device to obtain the user's needs or purpose (operational intent), providing a solid data foundation for subsequent processing.

[0009] In one possible implementation, for any one of at least one operational intent, determining the task decomposition model corresponding to the operational intent includes: for any operational intent, an intent processing unit generates a first instruction corresponding to the operational intent, the first instruction containing the operational intent and a first command. The intent processing unit sends the first instruction to a business unit, the first instruction instructing the task decomposition model corresponding to the requested operational intent to perform task decomposition processing on the first command. The business unit responds to the first instruction and determines the task decomposition model corresponding to the operational intent based on the mapping relationship between the operational intent and the task decomposition model.

[0010] In this way, based on the mapping relationship between the operational intent in the first instruction and the task decomposition model, the task decomposition model that matches the operational intent can be accurately determined from multiple task decomposition models. Subsequently, the first command can be decomposed into specific executable tasks. This ensures that the execution of these tasks can effectively achieve the goal of the first command, providing a data foundation for subsequent processing.

[0011] In one possible implementation, the business unit sends a first command to the task decomposition model corresponding to the operation intention, so that the task decomposition model can perform task decomposition processing on the first command.

[0012] In this way, the business unit can send the first command to the task decomposition model that can perform the corresponding task decomposition function, so as to effectively decompose the task in response to the first command.

[0013] In one possible implementation, the task decomposition model is deployed on a cloud device. Furthermore, the business unit sends a first command to the task decomposition model corresponding to the operation intent, including: the business unit sending request information to the cloud device, the request information containing the first command, the request information being used to instruct the task decomposition model to perform task decomposition processing on the first command.

[0014] In this way, the business unit sends a request message to the cloud device to instruct the corresponding task decomposition model to decompose the first command into tasks.

[0015] In one possible implementation, the business unit receives return information sent by the cloud device, which contains task description statements for at least one task corresponding to the operation intent.

[0016] In this way, by receiving the return information sent by the cloud device through the business unit, the task decomposition result (task description statement) of the first command by the corresponding task decomposition model can be obtained, which can then provide a data foundation for subsequent processing.

[0017] In one possible implementation, the terminal device also includes a task engine. Furthermore, generating a task execution chain based on the task description statements corresponding to at least one operation intent includes: the business unit invoking the task engine to parse the task description statements corresponding to each of the at least one operation intent to generate the task execution chain.

[0018] In this way, after obtaining the task decomposition result of the first command corresponding to the operation intention from the task decomposition model, the task engine can be called to process the task decomposition result in order to construct an executable task execution path.

[0019] In one possible implementation, the task description statement includes at least one of the following: task number, tool identifier, input parameters, and execution conditions.

[0020] In this way, by defining a task description statement that includes the executable tool, the tool's input parameters, and the triggering conditions required to execute the task, the specific implementation method of the task represented by the task description statement can be clearly defined, thereby ensuring that the task can be executed effectively.

[0021] Furthermore, in one possible implementation, the task engine parses the task description statements corresponding to at least one operation intent to generate a task execution chain, including: if the task description statement corresponding to the first task contains input parameters that depend on the execution result of the second task, then it is confirmed that the execution of the first task depends on the second task. Alternatively, if the execution condition in the task description statement corresponding to the first task depends on the execution result of the second task, then it is confirmed that the execution of the first task depends on the second task. The task execution chain is generated based on the dependencies between the tasks corresponding to each task description statement. Here, the first task and the second task are any two tasks among the tasks corresponding to each task description statement.

[0022] In this way, by analyzing the input parameters and execution conditions in each task description statement, the dependencies between the task and other tasks can be determined, and then the execution order between multiple tasks can be determined based on these dependencies, ultimately constructing a task execution chain.

[0023] In one possible implementation, the first task is executed after the second task in the task execution chain.

[0024] In this way, since the execution of the first task depends on the execution result of the second task, the execution order of the first task can be arranged after the second task to ensure that the first task can be triggered at the correct time and can successfully obtain the required input parameters during execution, thereby ensuring that the entire task execution chain is effective and smooth.

[0025] In one possible implementation, the tasks corresponding to each task description statement are executed sequentially according to the task execution chain, including: the task engine executes the tasks corresponding to each task description statement sequentially according to the task execution chain.

[0026] In this way, the task engine executes the tasks corresponding to each task description statement in sequence according to the task execution chain, which can ensure that the tasks corresponding to each task description statement in the task execution chain can be executed smoothly, thereby ensuring that the first command can be effectively implemented.

[0027] Furthermore, in one possible implementation, for any task, after the task is completed, the method further includes: recording the task as a first state if the task does not have a corresponding execution condition or if the execution condition corresponding to the task is met, the first state is used to indicate the end of the task.

[0028] In this way, after the task is completed, the execution process can be terminated by checking whether a preset first state exists.

[0029] Secondly, embodiments of this application provide a task processing device, which may be an electronic device, or a chip or chip system within an electronic device. The task processing device may include a display unit and a processing unit.

[0030] When the task processing device is an electronic device, the display unit therein can be a display screen. The display unit is used to perform the display steps so that the electronic device implements a task processing method described in the first aspect or any possible implementation of the first aspect.

[0031] When the task processing device is an electronic device, the processing unit may be a processor. The task processing device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to cause the electronic device to implement a task processing method described in the first aspect or any possible implementation thereof.

[0032] When the task processing device is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes instructions stored in a storage unit to cause the electronic device to implement a task processing method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.) or a storage unit located outside the chip within the electronic device (e.g., a read-only memory, random access memory, etc.).

[0033] For example, the processing unit is used to process the first command and perform processing on the first command based on the task processing device. The display unit is used to display the voice assistant interface and the operation interface.

[0034] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory for storing code instructions, and the processor for running the code instructions to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0035] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0036] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0037] Sixthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0038] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0039] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application;

[0041] Figure 2 This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application;

[0042] Figure 3 A flowchart illustrating the task processing method provided in an embodiment of this application;

[0043] Figure 4 A schematic diagram illustrating the framework of the task processing method provided in the embodiments of this application;

[0044] Figure 5A A flowchart illustrating the generation task execution chain provided in the embodiments of this application. Figure 1 ;

[0045] Figure 5B A flowchart illustrating the generation task execution chain provided in the embodiments of this application. Figure 2 ;

[0046] Figure 5C A flowchart illustrating the generation task execution chain provided in the embodiments of this application. Figure 3 ;

[0047] Figure 6 A schematic diagram of the processing flow of the task engine provided in the embodiments of this application;

[0048] Figure 7 Signaling interaction diagram of the task processing method provided in the embodiments of this application;

[0049] Figure 8 A schematic diagram of the interface for applying the task processing method provided in this application embodiment to a file sending scenario;

[0050] Figure 9 A schematic diagram of the interface for applying the task processing method provided in this application embodiment to a navigation scenario;

[0051] Figure 10 A schematic diagram of the interface for applying the task processing method provided in this application embodiment to a ride-hailing scenario;

[0052] Figure 11 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0053] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:

[0054] 1. DSL

[0055] A DSL (domain-specific language) is a programming language or descriptive language designed for a specific domain or problem. DSLs focus on solving problems within a specific domain, therefore their syntax and semantics are closely designed around the needs of that domain.

[0056] 2. Other terms

[0057] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.

[0058] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0059] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0060] 3. Electronic equipment

[0061] The electronic devices in this application embodiment may include handheld devices, vehicle-mounted devices, etc., with data processing functions. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving vehicles, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.

[0062] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0063] Furthermore, in this embodiment of the application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0064] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.

[0065] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0066] In daily smartphone use, users often manually perform a series of complex and tedious steps to complete diverse tasks such as sending files, navigating to a location, hailing a taxi, or setting reminders. However, manually performing these tasks is not only time-consuming and laborious but also prone to errors. For tasks with relatively complex processes, users may encounter difficulties finding the correct steps, making it hard to complete these complex tasks smoothly.

[0067] In existing technologies, smartphones can support the automatic execution of simple, single-command tasks via voice assistants, such as turning on Wi-Fi, Bluetooth, playing music, and setting alarms. However, they cannot effectively handle complex tasks, such as sending files, planning navigation routes, booking transportation to a specific location, or setting reminders, or combinations of multiple tasks. This is because complex tasks may involve multiple user needs or goals, requiring the execution of multiple tasks. These tasks may have complex dependencies. Accurately handling these dependencies is crucial for effectively managing complex tasks.

[0068] To address the issues described above, this application proposes the following technical concept: Users can input demand-related commands into a voice assistant. The voice assistant first performs intent recognition on the user's input command to determine the corresponding intent. Then, based on the user's input command and intent, it can break down the input command into multiple tasks. Furthermore, it constructs a task execution chain through the dependencies between these tasks to ensure that the user's input command can be effectively implemented through the execution of multiple tasks. Finally, multiple tasks can be executed to fulfill the user's needs.

[0069] The task processing method of this application embodiment can be executed by an electronic device equipped with a voice assistant, or by a chip, chip system, or processor that supports the implementation of the task processing method in the electronic device, or by a logic module or software that can implement all or part of the functions of the electronic device. This application does not impose specific limitations in this regard. The task processing method of this application embodiment will be described in detail below using an electronic device as the execution subject as an example.

[0070] Electronic devices can be, for example, terminal devices. The following section will first combine... Figure 1 and Figure 2 A brief introduction to the terminal equipment.

[0071] For example, Figure 1 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application.

[0072] Figure 1This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0073] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device. In other embodiments of this application, the terminal device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0074] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors. In one implementation, for example, processor 110 may execute the task processing method provided in this application.

[0075] The display screen 194 is used to display images, videos, etc. For example, text, images, and videos can be displayed on the display screen 194.

[0076] The software system of a terminal device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc. This application uses the layered architecture Android system as an example to illustrate the software structure of the terminal device.

[0077] For example, Figure 2This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application.

[0078] like Figure 2 As shown, the layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the system may include an application layer, an application framework layer, an Android runtime and system libraries, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that this application uses the Android system as an example; however, the solution can also be implemented in other operating systems (such as HarmonyOS, iOS, etc.) as long as the functions implemented by each module are similar to those in the embodiments of this application.

[0079] The application layer can include a series of application packages.

[0080] like Figure 2 As shown, the application package can include applications such as camera, calendar, phone, map, music, settings, email, video, and social media. Of course, the application layer can also include other application packages, such as third-party applications like payment apps, shopping apps, banking apps, and social media apps; this application is not limited to these. In this embodiment, a business unit, an intent processing unit, and a task engine can be deployed at the application layer. The business unit can receive user-input commands. After receiving the user-input command, the business unit can send it to the intent processing unit. The intent processing unit can first perform intent recognition on the user-input command to obtain the intent corresponding to the command (i.e., the user's need or purpose). Then, the intent processing unit can generate instructions based on the user-input command and its corresponding intent. These instructions can instruct the business unit to send request information to the cloud device. The request information can instruct the cloud device to process the user-input command. The task engine can receive the return information sent by the business unit and process it to generate an executable task chain corresponding to the user-input command. Then, the task engine can execute tasks sequentially according to the executable task chain corresponding to the user-input command to implement the user-input command.

[0081] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0082] like Figure 2As shown, the application framework layer may include a window manager, content provider, resource manager, view system, notification manager, etc.

[0083] The Android runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0084] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0085] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0086] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0087] The HAL layer is a wrapper around Linux kernel drivers, providing interfaces to the upper layers and shielding them from the implementation details of the lower-level hardware.

[0088] The HAL layer can include Wi-Fi HAL, audio HAL, camera service (Camera HALServer) unit, and software code library, etc.

[0089] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0090] The technical solutions of the embodiments of this application and how the technical solutions of the embodiments of this application solve the above-mentioned technical problems will be described in detail below with reference to the accompanying drawings and specific examples. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0091] The technical solution of this application relates to a task processing method, which will be described below. The flow of the task processing method will be explained with reference to specific embodiments. The following section will combine... Figures 3 to 5C A detailed introduction will be given, including, Figure 3 This is a flowchart illustrating the task processing method provided in an embodiment of this application. Figure 4 This is a schematic diagram of the framework of the task processing method provided in the embodiments of this application. Figure 5A A flowchart illustrating the generation task execution chain provided in the embodiments of this application. Figure 1 , Figure 5B A flowchart illustrating the generation task execution chain provided in the embodiments of this application. Figure 2 , Figure 5C A flowchart illustrating the generation task execution chain provided in the embodiments of this application. Figure 3 The task processing method may include, for example, the following steps:

[0092] S301. The business unit obtains the first command input by the user and performs intent recognition on the first command to obtain at least one operation intent corresponding to the first command.

[0093] In this embodiment, the first command can refer to the content entered by the user to instruct the voice assistant to perform the corresponding operation. For example, the first command can be "Share the labor record sheet with Xiaoming", "Take a taxi to the usual place for team building, the departure point is in my hometown", or "Navigate to the company at 8 am tomorrow and remind me to drink water at 10 am".

[0094] After the first command is input to the terminal device, the terminal device can perform intent recognition on the first command input by the user to obtain the operation intent corresponding to the first command, thereby clarifying the user's needs or purpose.

[0095] It is understandable that the first command may contain one or more user needs. Therefore, when performing intent recognition on the first command, at least one operational intent corresponding to the first command can be obtained. For example, the operational intent corresponding to the first command "Share the labor record sheet with Xiaoming" could be "Send file". The operational intent corresponding to the first command "Take a taxi to our usual team building location, starting from my hometown" could be "Take a taxi". The operational intent corresponding to the first command "Navigate to the company at 8 am tomorrow, and remind me to drink water at 10 am" could include both "Navigation" and "Reminder".

[0096] In one implementation, the terminal device may include a service unit and an intent processing unit. The service unit can be used to acquire a first command. The intent processing unit can be used to identify at least one intent operation corresponding to the first command. In this embodiment, multiple preset operation intents can be pre-set to determine the intent operation corresponding to the first command. For example, preset operation intents may include, but are not limited to, navigation, sending files, reminders, and hailing a ride. Each preset operation intent may preset one or more keywords. During the intent recognition process, the first command can be processed to obtain the keywords corresponding to the first command. Then, the operation intent corresponding to the first command can be determined based on the keywords contained in the first command and the keywords corresponding to the preset operation intents.

[0097] S302. For any one of the at least one operational intents, the business unit determines the task decomposition model corresponding to the operational intent.

[0098] In this embodiment, the task decomposition model can be used to decompose the first command into tasks to obtain the tasks corresponding to the first command, and then the first command can be implemented through the execution of the tasks. It can be understood that the first command can correspond to at least one task. For example, taking the first command as "share the labor record sheet with Xiaoming" as an example, its corresponding task could be "send the labor record sheet to Xiaoming". In one implementation, the task decomposition model can be a task agent model. The agent model has task planning capabilities and can convert user instructions into task orchestration results in DSL format.

[0099] Taking the first command as "Take a taxi to the usual place for team building, starting from my hometown" as an example, the corresponding tasks can include three items: "find the specific address of the usual place", "find the specific address of my hometown", and "take a taxi based on the specific addresses of the usual place and my hometown".

[0100] Taking the first command as "Navigate to the company at 8 AM tomorrow, and remind me to drink water at 10 AM" as an example, the tasks corresponding to the "navigation" operation intent could include three items: "Timer until 8 AM tomorrow", "Query the company's specific address", and "Navigate to the company at 8 AM tomorrow". Similarly, the tasks corresponding to the "remind" operation intent could include, for example, "Timer until 10 AM tomorrow" and "Remind me to drink water at 10 AM tomorrow".

[0101] In this embodiment, multiple task decomposition models can be pre-built for each preset operation intent to achieve task decomposition. Thus, after the first command corresponding to the preset intent is input to the corresponding task decomposition model, the task decomposition model can output at least one task corresponding to the first command. These task decomposition models can be pre-trained models, for example, they can be deployed on cloud devices, or they can be deployed on terminal devices, as in this embodiment.

[0102] For example, taking the first command as "Take a taxi to our usual team building location, starting from my hometown," its corresponding operation intent can be "take a taxi." The first command can then be input into the task decomposition model corresponding to the taxi-taking operation intent to generate a taxi-taking task. It's important to understand that for the first command, the task decomposition model corresponding to the taxi-taking operation intent can also generate two sub-tasks.

[0103] This is because the first command, "Take a taxi to our usual team-building location, starting from our hometown," contains the pronouns "usual location" and "hometown." In this scenario, these two pronouns lack clear, specific meanings. Therefore, before executing the task of hailing a taxi, it's necessary to understand and process these two pronouns to obtain their specific meanings. Thus, a referential task can be generated for the pronouns "usual location" and "hometown" to invoke specific tools to extract their concrete meanings.

[0104] To give another example, let's say the first command is "Share the labor record sheet with Xiaoming." Its corresponding operation intent could be "Send a file." Based on the above, we can understand that the first command can be input into the task decomposition model corresponding to the "Send a file" operation intent to generate a "Send a file" task for the first command.

[0105] Based on the above, it can be determined that a specific task decomposition model needs to be selected for the operational intent corresponding to the first command, in order to decompose the first command into at least one task. Therefore, a mapping relationship can be established between operational intents and task decomposition models to determine the selection of the task decomposition model based on the operational intent.

[0106] In this embodiment, after obtaining at least one operation intent corresponding to the first command, the intent processing unit can process the first command and the operation intent corresponding to the first command to obtain a first instruction. The first instruction is used to instruct the task decomposition model corresponding to the request operation intent to perform task decomposition processing on the first command.

[0107] You can refer to this. Figure 4 After the intent processing unit generates the first instruction corresponding to the operation intent, it can send the first instruction to the business unit. Then, after receiving the first instruction, the business unit responds to the first instruction and determines the task decomposition model corresponding to the operation intent based on the mapping relationship between the operation intent and the task decomposition model.

[0108] S303. The business unit sends a first command to the task decomposition model corresponding to the operation intention, so that the task decomposition model performs task decomposition processing on the first command to obtain the task description statement of at least one task corresponding to the operation intention.

[0109] You can refer to this. Figure 4 To understand this, a business unit can send a request message to a cloud device, containing a first command. This request message instructs the task decomposition model to decompose and process the first command.

[0110] Based on the above description, it can be determined that when the first command is input to the task decomposition model, the task parsing model can decompose the corresponding task. In this embodiment, the task decomposition module can output the decomposed task in the format of a task description statement. In one implementation, the task description statement may include at least one of the following information: task number, tool identifier, input parameters, and execution conditions.

[0111] Each task has a unique task number to distinguish it from other tasks. The tool identifier can be the name of the tool, serving as a unique identifier for each tool and allowing for quick retrieval of the corresponding function. Tools can be used to implement specific functionalities. Input parameters can be additional parameters required by the tool; these parameters can be values ​​from the user's initial command or the execution result of another task. Execution conditions are the conditions that must be met to execute the task; in other words, the conditions that trigger the task. These conditions can be fixed values ​​from the user's initial command or the execution result of another task.

[0112] In one implementation, the task description statement can be a DSL statement. For example, taking the first command as "Navigate to the company at 8 AM tomorrow and remind me to drink water at 10 AM," the corresponding operation intent can include both "navigation" and "reminder." After inputting the first task into the corresponding task decomposition model, the task decomposition model can output the corresponding DSL statement. For example, when the first task is input into the task decomposition model corresponding to the navigation operation intent, the task decomposition model can output DSL statements for the time task, the referential task, and the navigation task. The DSL statement can refer to the following syntax:

[0113] {"taskId": "1", "tool": "create_time_fence", "params": {"time": "8 AM tomorrow"}}

[0114] {"taskId": "2", "tool": "search_personal_info", "params": {"query": "my company's address"}},

[0115] {"taskId": "3", "tool": "navigate", "params": {"deslocatin": "result(ID2).person_info"}, "condition": "result(taskId=1).trigger_status==trigger"}.

[0116] In this context, “taskId” is the task number, “tool” is the tool identifier, “params” are the input parameters, and “condition” is the execution condition.

[0117] The three DSL statements mentioned above will be introduced here. In the DSL statement for a time task, `{"taskId": "1", "tool": "create_time_fence", "params": {"time": "8 AM tomorrow"}}`, `taskId": "1` indicates that the task's identifier is 1; `tool": "create_time_fence"` indicates that the tool for this task is a time-fence tool, which can be used to measure time; `params": {"time": "8 AM tomorrow"}` means that when using the time-fence tool, the parameter "8 AM tomorrow" needs to be entered to time up to 8 AM tomorrow.

[0118] In the DSL statement {"taskId": "2", "tool": "search_personal_info", "params": {"query": "my company's address"}} referring to the task, "taskId": "2" indicates that the task's identifier is 2; "tool": "search_personal_info" indicates that the tool for this task is a personal profiling tool, which can be used to query personal information; and "params": {"query": "my company's address"} means that when using the personal profiling tool, the parameter "my company's address" needs to be entered to use the personal profiling tool to query the address of an individual's company.

[0119] Furthermore, in the DSL statement of the navigation task, `{"taskId": "3", "tool": "navigate", "params": {"deslocatin": "result(ID2).person_info"}", "condition": "result(taskId=1).trigger_status==trigger"}`, `"taskId": "3"` indicates that the task's identifier is 3. `"tool": "navigate"` indicates that the tool for this task is a navigation intent tool, which can achieve navigation based on the origin and destination. `"params": {"deslocatin": "result(ID2).person_info"}` means that when using the navigation intent tool, the execution result of the task with parameter identifier 2 needs to be input as the navigation destination. `"condition": "result(taskId=1).trigger_status==trigger"` indicates that the task has an execution condition; when the execution result of the task with identifier 1 (i.e., the time-based task) is a preset value or the execution result meets a preset state, the navigation task can be triggered. Specifically, for example, when the time fence tool counts down to 8 a.m. tomorrow, a navigation task can be triggered to execute.

[0120] Furthermore, after the first task is input into the task decomposition model corresponding to the reminder operation intent, the task decomposition model can output the DSL statements for the time task and the reminder task. The DSL statements can refer to the following syntax:

[0121] {"taskId": "4", "tool": "create_time_fence", "params": {"time": "10 AM tomorrow"}}.

[0122] {"taskId": "5", "tool": "create_reminder", "params": {"reminder": "drink water"}, "condition": "result(taskId=4).trigger_status==trigger"}.

[0123] The two DSL statements mentioned above will be explained here. In the DSL statement for a time task, `{"taskId": "4", "tool": "create_time_fence", "params": {"time": "10 AM tomorrow"}}`, `taskId": "4` indicates that the task's identifier is 4. `tool": "create_time_fence"` indicates that the tool for this task is a time-fence tool, which can be used to measure time. `params": {"time": "10 AM tomorrow"}` means that when using the time-fence tool, the parameter "10 AM tomorrow" needs to be entered to keep track until 10 AM tomorrow.

[0124] Furthermore, in the DSL statement for the reminder task, `{"taskId": "5", "tool": "create_reminder", "params": {"reminder": "drink water"}, "condition": "result(taskId=4).trigger_status==trigger"}`, `taskId": "5` indicates that the task's identifier is 5. `tool": "create_reminder"` indicates that the tool for this task is a reminder intent tool, which can be used to set reminders. `params": {"reminder": "drink water"}` means that when using the reminder intent tool, the parameter "drink water" needs to be input, so the reminder intent tool can set a reminder for drinking water. `condition": "result(taskId=4).trigger_status==trigger"` indicates that the task has an execution condition; when the execution result of the task with identifier 4 (i.e., the time task) is a preset value or the execution result meets a preset state, the reminder task can be triggered. Specifically, for example, when the time fence tool counts down to 10 AM tomorrow, the reminder task can be triggered to execute.

[0125] Understandably, the first command, "Navigate to the company at 8 AM tomorrow and remind me to drink water at 10 AM," input into the corresponding task decomposition model can generate five DSL task description statements. The syntax of any one of these task description statements can be written as:

[0126] The task description statement is defined as follows: {"taskId": "xxx", "tool": "xxx", "params": {"key1": "xxx", "key2": "xxx", ...}, "condition": "xxx"}. A single task description statement can contain multiple input parameters; for example, it can contain parameter "key1" with the value "xxx", and parameter "key2" with the value "xxx".

[0127] It is also understandable that any task can be accomplished through the execution of a specific tool. However, for any given task, both the input parameters and the execution conditions are optional.

[0128] In one implementation, before the task decomposition model decomposes the first command, a rewriting model can be used to rewrite the first command, thus converting the multi-turn dialogue into a single-turn dialogue. For example, suppose there is a multi-turn dialogue: "User: Remind me to drink water tomorrow morning. Voice Assistant: What time tomorrow morning? User: 8 AM tomorrow morning. Voice Assistant: Okay." Then, after passing this multi-turn dialogue through the rewriting model, the rewriting model can output, for example, the single-turn dialogue "Remind me to drink water at 8 AM tomorrow morning."

[0129] Alternatively, the rewriting model can rewrite the first command corresponding to multiple operational intentions into multiple commands with single operational intentions. For example, if the first command is "Navigate to the company at 8:00 AM tomorrow and remind me to drink water at 10:00 AM", the rewriting model can rewrite the first command into two items: "Navigate to the company at 8:00 AM tomorrow" and "Remind me to drink water at 10:00 AM tomorrow".

[0130] You can refer to this. Figure 4 After the task decomposition model decomposes the first command and generates task description statements for at least one task corresponding to the operation intent, the cloud device can return the task description statements for at least one task corresponding to the operation intent to the business unit.

[0131] S304. The task engine generates a task execution chain based on the task description statement corresponding to at least one operation intention.

[0132] You can refer to this. Figure 4 To understand this, after the business unit receives the return information sent by the cloud device, it can call the task engine to parse the task description statements corresponding to at least one operation intent, so as to generate a task execution chain. The task execution chain can contain the task description statements.

[0133] It is understandable that an operation intent can correspond to multiple task description statements, and these multiple task description statements may have dependencies. This dependency means that the execution of one task depends on the execution result of another task. Therefore, based on the dependencies between the tasks corresponding to each task description statement, a task execution chain can be generated to determine the order of task execution. In this embodiment, a task engine is deployed in the terminal device. The task engine can parse and process the task description statements to generate a task execution chain.

[0134] In one implementation, the task engine may include three modules: task parsing, task orchestration, and task execution. The task parsing module parses the return information sent by the business unit to the task engine to obtain task description statements in JSON format. Then, the task orchestration module orchestrates the tasks according to the dependencies between the tasks corresponding to each task description statement, forming a task execution chain.

[0135] In this embodiment, there may be two types of dependencies between a task and other tasks. Specifically, when the execution conditions of a task in its task description depend on the execution results of other tasks, then the task can be triggered after the other tasks obtain their execution results; that is, there is a dependency between the execution conditions of the tasks. Alternatively, when the input parameters of a tool in a task description are the execution results of other tasks, then the task can be executed after the other tasks obtain their execution results; that is, there is a dependency between the input parameters of the tools in the tasks.

[0136] In one implementation, if the task description statement corresponding to the first task contains input parameters that depend on the execution result of the second task, then it can be confirmed that the execution of the first task depends on the second task. Alternatively, if the execution condition in the task description statement corresponding to the first task depends on the execution result of the second task, then it can be confirmed that the execution of the first task depends on the second task. Here, the first task and the second task are any two tasks from the tasks corresponding to each task description statement.

[0137] After analyzing and obtaining the dependencies between the tasks corresponding to each task description statement, a task execution chain can be created based on these dependencies. In this embodiment, the execution order of the first task in the task execution chain is after the second task. In one implementation, a tree structure can be used to construct the task execution chain.

[0138] The following can be combined Figures 5A to 5C The process of creating a task execution chain is introduced.

[0139] refer to Figure 5A The first command is "Navigate to the company at 8:00 AM tomorrow and remind me to drink water at 10:00 AM." Based on the above introduction, it can be determined that after inputting the first command into the task decomposition model, the task decomposition model can output five task description statements corresponding to the first command. The syntax of these five task description statements is explained in detail in step S303, and will not be repeated here.

[0140] After analyzing these 5 task description statements, it can be determined that the input parameter in the task description statement with "taskId" as "3" is the execution result of the task corresponding to the task description statement with "taskId" as "2". That is, there is a dependency relationship between the task corresponding to the task description statement with "taskId" as "3" and the task corresponding to the task description statement with "taskId" as "2".

[0141] Furthermore, for the task corresponding to the task description statement with "taskId" "3", its execution condition depends on the execution result of the task corresponding to the task description statement with "taskId" "1". Specifically, when the execution result of the task corresponding to the task description statement with "taskId" "1" equals a preset value or meets a preset state, the execution condition in the task description statement with "taskId" "3" can be satisfied, and the task corresponding to the task description statement with "taskId" "3" can then be triggered. The dependency relationship between the task corresponding to the task description statement with "taskId" "5" and the task corresponding to the task description statement with "taskId" "4" is understood similarly and will not be elaborated further here.

[0142] Therefore, we can determine that the task corresponding to the task description statement with "taskId" "3" depends on the tasks corresponding to the task description statements with "taskId" "1" and "taskId" "2". Similarly, the task corresponding to the task description statement with "taskId" "5" depends on the task corresponding to the task description statement with "taskId" "4".

[0143] refer to Figure 5ABased on the above analysis, a task execution chain can be obtained. In the task execution chain, the tasks corresponding to the task description statement with "taskId" "1", the task description statement with "taskId" "2", and the task description statement with "taskId" "4" have no specific order and can be executed in parallel. The tasks corresponding to the task description statements with "taskId" "1" and "taskId" "2" precede the task corresponding to the task description statement with "taskId" "3". During task execution, the tasks corresponding to the task description statements with "taskId" "1" and "taskId" "2" can trigger the task corresponding to the task description statement with "taskId" "3". Furthermore, the task corresponding to the task description statement with "taskId" as "4" precedes the task corresponding to the task description statement with "taskId" as "5". During task execution, the task corresponding to the task description statement with "taskId" as "4" can trigger the task corresponding to the task description statement with "taskId" as "5".

[0144] It can be understood that the first command can be executed by executing the task with task number "taskId" "1", the task with task number "taskId" "2", the task with task number "taskId" "3", the task with task number "taskId" "4", and the task with task number "taskId" "5".

[0145] The above combination Figure 5A This section introduces a schematic diagram of a task execution chain for creating a multi-intent task. The following section, using two additional examples, illustrates the task execution chain for creating a single-intent task. First, let's consider... Figure 5B This paper describes a task execution chain with a single intent and multiple tasks.

[0146] refer to Figure 5B The first command is "Take a taxi to our usual team-building location; departure point is my hometown." Based on the above, it can be determined that after inputting the first command into the task decomposition model, the model can output three task description statements corresponding to the first command. Assuming the task with task ID "taskId" "1" is the sub-task of "searching for our usual location," and the tool used for this sub-task is "learning profiling tool," then the task description statement corresponding to this task could include, for example, the task ID "1," the tool identifier "learning profiling tool," and the input parameter "address of our usual location," but would not include execution conditions.

[0147] The task with task ID "2" is the sub-task "Query Hometown", and the tool used for this sub-task is also "Learning Profiling Tool". Therefore, the task description statement for this task may include the task ID "2", the tool identifier "Learning Profiling Tool", and the input parameter "Hometown Address", but will not include the execution conditions.

[0148] Furthermore, the task with task number "taskId" "3" is a navigation task. This indicates that the tool used by the task is a "navigation intent tool," and the navigation intent tool requires two input parameters: origin and destination. Therefore, the task description statement corresponding to this task may include, for example, the task number "3," the tool identifier "navigation intent tool," and input parameter 1 being the address of the destination and input parameter 2 being the address of the origin, but does not include execution conditions.

[0149] Since the syntax of the task description statements has been explained in detail in step S303 above, these three task description statements will not be repeated here.

[0150] refer to Figure 5B After analyzing these three task description statements, it can be determined that the input parameter 1 in the task description statement with "taskId" as "3" is the execution result of the task corresponding to the task description statement with "taskId" as "1". That is, there is a dependency relationship between the task corresponding to the task description statement with "taskId" as "3" and the task corresponding to the task description statement with "taskId" as "1".

[0151] Furthermore, the input parameter 2 in the task description statement with "taskId" as "3" is the execution result of the task corresponding to the task description statement with "taskId" as "2". That is, there is a dependency relationship between the task corresponding to the task description statement with "taskId" as "3" and the task corresponding to the task description statement with "taskId" as "2".

[0152] Therefore, it can be determined that the task corresponding to the task description statement with "taskId" as "3" depends on the tasks corresponding to the task description statements with "taskId" as "1" and "taskId" as "2".

[0153] refer to Figure 5BThis yields a task execution chain. In this chain, the tasks corresponding to the task description statement with "taskId" "1" and the task description statement with "taskId" "2" have no specific order and can be executed in parallel. The tasks corresponding to "taskId" "1" and "taskId" "2" precede the task corresponding to "taskId" "3." During task execution, the tasks corresponding to "taskId" "1" and "taskId" "2" can trigger the task corresponding to "taskId" "3." In other words, by executing the tasks with "taskId" "1," "taskId" "2," and "taskId" "3," the first command can be implemented.

[0154] Then combine Figure 5C This paper describes a single-intent, single-task task execution chain.

[0155] refer to Figure 5C The first command is "Share the labor record sheet with Xiaoming". Based on the above introduction, it can be determined that after inputting the first command into the task decomposition model, the task decomposition model can output one task description statement corresponding to the first command. Assuming the task number "taskId" is "1" and the tool used for this task is "File Sending Intent Tool", then the task description statement corresponding to this task could include, for example, the task number "1", the tool identifier "File Sending Intent Tool", and input parameter 1 as "Labor Record Sheet" and input parameter 2 as "Xiaoming", but would not include execution conditions.

[0156] Since the syntax of the task description statement has been explained in detail in step S303 above, it will not be repeated here.

[0157] refer to Figure 5C This yields a task execution chain. The first command can be executed by running the task with task number "taskId" "1".

[0158] S305. The task engine executes the tasks corresponding to each task description statement in sequence according to the task execution chain, so as to execute the operation corresponding to the first command.

[0159] In this embodiment, after generating the task execution chain, the task engine can sequentially execute the tasks corresponding to each task description statement according to the task execution chain. When executing a task, the interface of the corresponding tool can be called according to the tool identifier in the task description statement to execute the corresponding task.

[0160] In this embodiment, for any task, after the task execution is completed, the task can be terminated if there are no corresponding execution conditions for the task, or if the execution conditions for the task are met. Specifically, after the task execution is completed, the task can be terminated if there are no execution conditions in the task description statement corresponding to the task. Alternatively, the task can be terminated if the execution conditions in the task description statement corresponding to the task are met.

[0161] In one implementation, for any task, after the task is completed, if there is no corresponding execution condition for the task, or if the execution condition for the task is met, the task can be recorded as the first state, which is used to indicate the end of the task.

[0162] In one implementation, after the task is completed, a condition can be used to determine whether the task should be recorded as the first state. For example, this condition can be set to "no execution condition dependencies or all execution condition dependencies are satisfied".

[0163] Assuming we continue to use the above... Figure 5A The example introduced, currently combined Figure 5A Next, let's explain how to set the judgment conditions. For example... Figure 5A As shown, after the navigation task with "taskId" of "3" and the reminder task with "taskId" of "5", a condition can be set with the content "no execution condition dependency or all execution condition dependencies are satisfied" to determine whether to end the task.

[0164] Specifically, after the navigation task with "taskId" "3" is completed, it can be determined whether the condition is met. If the navigation task with "taskId" "3" has been successfully completed (i.e., all its execution conditions are met), the navigation task can be recorded as the first state to end the navigation task with "taskId" "3". Similarly, after the reminder task with "taskId" "5" is completed, it can be determined whether the condition is met. If the reminder task with "taskId" "5" has been successfully completed (i.e., all its execution conditions are met), the reminder task can be recorded as the first state to end the reminder task with "taskId" "5".

[0165] In this way, by using the intent processing unit to identify the intent of a complex task (the first command), multiple operational intents of the complex task can be obtained to clarify the user's needs or objectives. Then, based on the task decomposition model and combining these multiple operational intents, the complex task can be broken down into a series of specific, executable tasks, thus clarifying the multiple specific tasks corresponding to the complex task. Each specific task is defined by a task description statement, which details the executable tool corresponding to the task, the tool's input parameters, and the triggering conditions required to execute the task. This ensures that each task description statement clearly reflects the specific implementation method of the task, thereby guaranteeing that each task can be effectively executed.

[0166] Next, the task engine analyzes and determines the dependencies between tasks based on the input parameters and execution conditions in each task description, thereby determining the execution order of multiple tasks. This ensures that each task is triggered at the correct time and can successfully obtain the required input parameters during execution, thus guaranteeing that the entire task execution chain is effective and smooth. In this way, complex tasks can be executed smoothly and efficiently, achieving the goal of automatically handling complex tasks and improving the efficiency of handling complex tasks.

[0167] Based on the above-described embodiments, the processing flow of the task engine will be described in detail below.

[0168] Referring to the descriptions in S304 and S305 above, it can be determined that this embodiment requires the task engine to process the task description statement corresponding to the first command in order to implement the first command. Therefore, the processing flow of the task engine is described below. (See reference...) Figure 6 To understand the processing flow of the task engine, Figure 6 This is a schematic diagram of the processing flow of the task engine provided in an embodiment of this application.

[0169] Based on the above description, it can be understood that the task engine can receive return messages sent by business units, which include the task description statement corresponding to the first command. Then, the task parsing module and task orchestration module in the task engine can process the task description statements in the return messages to generate the task execution chain corresponding to the first command. Afterwards, the task execution module can execute the tasks sequentially according to the order of the task description statements in the task execution chain.

[0170] refer to Figure 6The task engine can deploy task parsing, task orchestration, task execution, and task management modules. When executing a task according to the task execution chain corresponding to the first command, the task execution process is a cyclical process. The task execution process can include task scheduling, tool retrieval, tool invocation, and task result feedback. During task execution, the task execution module can decide to schedule the next task based on different task execution result states, until all tasks corresponding to the first command are completed (execution closed).

[0171] Task scheduling determines which task should be executed after the previous task has finished. Tool retrieval retrieves the tool corresponding to the task described in the task description from the tool shelf. (Reference) Figure 6 The tool shelf can include tool metadata, service management framework tools, third-party service tools, intelligent capability tools, and instruction set tools.

[0172] Tool metadata can include information to help users or systems understand the tool's basic characteristics and usage, enabling them to correctly select and use the tool. Tool metadata is descriptive information about the tool itself. It may include the tool's name, version, feature description, input / output parameter formats, and usage conditions. Service management framework tools are used to provide functions such as service registration, discovery, invocation, and monitoring, ensuring effective communication and collaboration between services. Service management framework tools are tools used to manage and coordinate the operation of different services. Service management framework tools are crucial for building complex service architectures and achieving high service availability.

[0173] Third-party service tools may include data analysis tools, cloud storage services, and messaging services, which typically have specific functions and uses. Third-party service tools refer to tools or services provided by a third party to accomplish specific tasks. Using third-party service tools can expand the functionality of the tool shelf and meet diverse user needs. Intelligent capability tools are used to enhance the intelligence level of the tool shelf and improve user work efficiency. Intelligent capability tools can refer to tools that utilize technologies such as artificial intelligence and machine learning, possessing intelligent decision-making and automated processing capabilities. These tools may include natural language processing tools, image recognition tools, and intelligent recommendation systems, which can process complex data and information and provide intelligent solutions.

[0174] In addition, instruction set tools provide a command-line interface or scripting language, allowing users to perform specific operations or tasks by entering commands. An instruction set tool can refer to a tool that contains a series of instructions or commands used to control and manage other tools or services in the tool shelf. The existence of instruction set tools enables users to flexibly access and manage resources in the tool shelf, achieving efficient automation.

[0175] After retrieving the tool corresponding to the task, you can use it by calling its interface and providing the input parameters. After using the tool, you can return the results to the task. Then, after the task is completed, you can save the results and schedule the next task. (Reference) Figure 6 After the previous task is completed and the execution result is generated, task 1, task 2 and task k can be executed in sequence.

[0176] The task management module can include task execution context management, task status management, and task lifecycle management. Task lifecycle management manages which task is being executed, as well as the execution order and dependencies between tasks, ensuring that tasks proceed according to a predetermined process. Task status management saves and updates the execution status and results of tasks. Task execution context management records commands and related information entered by the user during multiple interactions to support continuous task execution and context awareness. The task parsing and task orchestration modules have already been described above and will not be repeated here.

[0177] In one implementation, when an exception occurs during task execution, meaning the task cannot be executed normally, the exception can be reported to the task status management system and the task decomposition model. The task decomposition model can re-decompose the first command and re-execute subsequent processing to achieve the first command. Alternatively, the exception can be reported to the user in the form of a question asking for the result of the task, thereby allowing the task to continue execution. For example, assuming the task of "finding my company address" cannot be performed, the voice assistant's display page could show, "Unable to find the specific location of your company address. Could you please enter the specific location of your company address?".

[0178] In this way, multiple modules such as task decomposition, task parsing, task orchestration, and task management work together in the task execution process to ensure that complex tasks can be executed effectively.

[0179] The following is combined Figure 7 The implementation path of the task processing method is described in detail. Figure 7 Signaling interaction diagram of the task processing method provided in the embodiments of this application.

[0180] 1. The business unit receives the first command input by the user.

[0181] 2. After receiving the first command, the business unit can send the first command and the first version number to the intent processing unit. The first version number may refer to the version number corresponding to the voice assistant.

[0182] The intent processing unit may include an intent recognition unit and an instruction processing unit. The intent recognition unit may perform intent parsing on the first command to obtain at least one operation intent corresponding to the first command. The instruction processing unit may process the first command and the at least one operation intent corresponding to the first command to obtain a first instruction.

[0183] 3. After the intent recognition unit receives the first command and the first version number, the intent recognition unit can perform intent recognition on the first command to output at least one operation intent corresponding to the first command.

[0184] The specific implementation of step 3 can be found in S301, and will not be elaborated here.

[0185] 4. The intent recognition unit can send at least one operation intent corresponding to the first command, the first command, and the first version number to the instruction processing unit.

[0186] 5. After the instruction processing unit receives at least one operation intent corresponding to the first command, the first command and the first version number, it can process the first command and the at least one operation intent corresponding to the first command to generate the first instruction.

[0187] The specific implementation of step 5 can be found in S302, and will not be elaborated here.

[0188] 6. After the instruction processing unit generates the first instruction, it can determine the first version number received. If the voice assistant corresponding to the first version number can support the processing of the first command, the first instruction generated by the instruction processing unit can be sent to the business unit. If the voice assistant corresponding to the first version number cannot support the processing of the first command, the second instruction can be sent to the business unit.

[0189] The second instruction can be a preset instruction or an unsupported instruction. Preset instructions can be used to request user information. For example, taking the first command as "Navigate to my son's school," assuming this first command is sent using a voice assistant with a lower version number, and the current version of the voice assistant does not support the "find my son's school" function, then the instruction processing unit can determine that the voice assistant corresponding to the lower version number cannot support the processing of the first command. At this point, for example, a second instruction can be sent to the business unit: "What is the specific address of your son's school?"

[0190] The "Not Supported" command can mean "The current version of the voice assistant does not support xxx operation". For example, if the first command is "Navigate to my son's school", and the current version of the voice assistant does not support automatic navigation, then the "Not Supported" command can be output: "The current version of the voice assistant does not support navigation operation".

[0191] 7. After receiving the first instruction, the business unit can send a request message to the cloud device to send the first command to the corresponding task decomposition model in the cloud device. The request message contains the first command. The request message is used to instruct the task decomposition model to perform task decomposition processing on the first command.

[0192] 8. After receiving the request information, the cloud device can call the corresponding task decomposition model to decompose the first command into a task description statement corresponding to the first command.

[0193] The specific implementation of step 8 can be found in S303, and will not be elaborated here.

[0194] 9. After receiving the task description statement corresponding to the first command, the cloud device can send return information to the business unit. The return information may include the task description statement corresponding to the first command.

[0195] 10. After the business unit receives the return information, it can send the return information to the task engine.

[0196] 11. After the task engine receives the return information, the task parsing module in the task engine can parse the return information to obtain DSL statements in JSON format.

[0197] 12. After obtaining the DSL statement in JSON format, the task orchestration module in the task engine can generate the task execution chain corresponding to the first command based on the DSL statement.

[0198] The specific implementation of steps 11 and 12 can be found in S304, and will not be elaborated here.

[0199] 13. After obtaining the task execution chain corresponding to the first command, the task execution module in the task engine can execute tasks sequentially according to the task execution chain.

[0200] The specific implementation of step 13 can be found in S305, and will not be elaborated here.

[0201] The following is a comparison with the interface screenshots. Figures 8 to 10 Taking the processing flow of file sending tasks, navigation tasks, and ride-hailing tasks as examples, this application's embodiments illustrate the task processing method provided. Figure 8 This is a schematic diagram of the interface for applying the task processing method provided in this application to a file sending scenario. Figure 9 This is a schematic diagram of the interface for applying the task processing method provided in this application to a navigation scenario. Figure 10 This is a schematic diagram of the interface for applying the task processing method provided in this embodiment to a ride-hailing scenario.

[0202] Example 1: Processing flow of a file sending task

[0203] The task processing method provided in this application embodiment allows an electronic device to respond to a user A's instruction to send a file to user B, automatically send the file to user B, navigate to various pages according to the path, first query the file and navigate to the file interface, then navigate to the sharing page, and finally send the file to user B.

[0204] For example, the user enters the instruction "Help me send the xx file to someone".

[0205] For example, a user might input the command "Help me send the photos received by App1 to someone".

[0206] For example, a user might enter the command "Send me a photo to someone".

[0207] Electronic devices can respond to user commands, automatically search for files on the device by file name, and quickly display the search results to the user, so as to automatically send the files to the specified user.

[0208] like Figure 8 As shown in (a) and (b), the display page of the terminal device is illustrated. This page may include controls such as a clock, weather, today's steps, and daily applications, as well as a global interactive window 801. The global interactive window 801 may also include, for example, a keyboard input control 803 and an operation control 804 indicating more functions. These more functions may include, for example, adding photos.

[0209] refer to Figure 8In (a), the user can enter command 802 "Send document 1 to Dad" in the global interactive window 801. The electronic device receives the user command 802 and activates the voice assistant. In response to the user's input command, the voice assistant replies 806 "Okay, now go to file management to find document 1 and send it to Dad," as shown. Figure 8 The interface shown in (b) is shown in the image.

[0210] The electronic device can recognize that the user's request is to send a file based on the user's input command 802, and determine that the file sending scenario is searching for a file by file name, and then start to automatically execute the process.

[0211] After the automated process begins, the electronic device automatically redirects to the file management page, such as... Figure 8 As shown in (c) above. Identify the "search box" control 808 in the file management page and determine its position coordinates. At the determined coordinates, simulate a click to select the search box and enter "document1" in the search box. (Reference) Figure 8 In step (d), the electronic device displays that a file 805 has been found and shows the file name "Document 1". Then, the electronic device identifies the "circle control" 807 and determines the position coordinates of the circle control. At the determined position coordinates, the circle control is selected by simulating a click operation, such as... Figure 8 As shown in (e) in the diagram.

[0212] Once the automatic execution process begins, a light effect notification icon appears on the full screen, and the current status "Searching for you in file management" is displayed at the bottom of the page, along with a stop button and a shrink window button.

[0213] After automatically selecting the file, the electronic device automatically triggers file sharing. You can select "App1" from multiple applications. Then, the file management page will automatically redirect to the App1 contacts page. Enter "Dad" in the search box on the App1 contacts page. After the electronic device finds "Dad," you can select "Dad" and then select "Share" in the sharing confirmation window to send the file. After the file sending task is completed, the automatic execution result can be displayed, such as "Document 1 has been sent to Dad."

[0214] Example 2: Navigation task processing flow

[0215] The task processing method provided in this application embodiment enables an electronic device to respond to a user A's navigation request and automatically navigate to different pages based on the path.

[0216] For example, the user enters the command "navigate to xxx".

[0217] For example, the user enters the command "navigate from xxx to xxx".

[0218] For example, a user might enter the command "Navigate to my son's stadium".

[0219] Electronic devices can respond to user commands, open navigation software, and automatically fill in the origin and destination to achieve navigation.

[0220] like Figure 9 As shown in (a) to (c), the display page of the terminal device is illustrated. The user can input command 902, "Navigate to my son's stadium," in the global interactive window 901. Upon receiving the user command 902, the electronic device activates the voice assistant. In response to the user's input command, the voice assistant replies 903, "Okay," as shown in the image. Figure 9 As shown in (b) of the diagram.

[0221] The electronic device can identify the user's navigation request based on the user's input command 902, and analyze and process the user's input command to determine the specific address of the pronoun "my son's stadium". Then, it can determine "my location" as the starting point and "xxx" as the destination to implement the navigation function and start the automatic execution process.

[0222] After the automated process begins, the electronic device automatically redirects to a navigation page, such as... Figure 9 As shown in (c) of the reference. Figure 9 In step (c), after receiving the user's specified destination "xxx", the destination "xxx" can be entered into control 904. Afterwards, the page can display a navigation map. For example... Figure 3 Control 905, shown in (c) of the diagram, represents a mock map, where the gray lines can be interpreted as passable roads. Control 905 also indicates the locations of the starting point 906 and the destination 907. Furthermore, a black line represents a route from the starting point to the destination.

[0223] like Figure 9 As shown in (c), the navigation software supports multiple modes of transportation, including driving, taxi, public transportation, cycling, and walking. Assuming the user chooses driving, the navigation software can provide several travel options 908. Figure 3 As shown in (c) of the diagram, in Scheme 908, the order of the four recommended routes from left to right is as follows. Scheme 1, "50 minutes, 30 kilometers, recommended," can be understood as a route that is 30 kilometers long and takes 50 minutes to drive; it is the route recommended by the navigation software. The other schemes can be understood similarly and will not be elaborated upon here.

[0224] Each option corresponds to a different route map, with the route map for option one being as follows: Figure 9 Control 905 is shown in (c) above. When multiple travel routes or travel options are available, a user takeover process can be initiated, allowing the user to perform subsequent operations. For example, a user can select a travel route and a travel option, and then start navigation by clicking the start navigation control 909. Upon reaching the destination, the user can manually end the navigation.

[0225] Example 3: Processing flow of a ride-hailing task

[0226] The task processing method provided in this application embodiment allows an electronic device to respond to user A's request to hail a taxi, automatically hailing a taxi and redirecting to various pages based on the route.

[0227] For example, the user enters the command "take a taxi to xxx".

[0228] For example, the user enters the instruction "take a taxi from xxx to xxx".

[0229] For example, a user might enter the command "Take a taxi to my son's school".

[0230] Electronic devices can respond to user commands and determine the specific addresses of the origin and destination. When a non-unique address appears, the search results can be quickly displayed to the user for confirmation. Then, the ride-hailing app is automatically opened, and the origin and destination are automatically entered into the app. When a non-unique ride-hailing option appears, the user takes over the process, requiring the user to select and call a vehicle.

[0231] like Figure 10 As shown in (a) to (c), the display page of the terminal device is illustrated. The user can enter the command 1002 "Take a taxi to my son's school" in the global interactive window 1001. The electronic device receives the user command 1002 and activates the voice assistant.

[0232] The electronic device can identify the user's request as "hailing a taxi" based on the user's input command 1002, and analyze and process the user's input command to find that the pronoun "my son's school" may refer to multiple specific addresses. For example... Figure 10 As shown in (b), the voice assistant will ask the user, "Which school does your son attend?", and display three search results (1004, 1005, and 1006) for confirmation. Each search result provides the primary school's name, image, distance, and address. If none of the three results match, the user can open a map to search for the address manually.

[0233] After the user replies "third" to the electronic device, in response to the user's input command, the voice assistant replies 1008 "Okay, now we're at your service" and 1009 "We've planned a ride route for you." Afterward, the electronic device can continue to execute the process automatically, opening the ride-hailing app.

[0234] After the electronic device automatically fills in the departure and destination information into the ride-hailing app, the user takes over the process, selecting the vehicle type, etc. (See reference...) Figure 10 (c) in the diagram illustrates the ride-hailing interface of the terminal device. 1010 can be understood as a route map, showing the origin, destination, and specific route. 1011 can be understood as a vehicle selection control, showing economy, comfort, and other types of vehicles. For example, the economy category shows four vehicles, each displaying the estimated fare. Users can select a vehicle to hail a ride. After selecting a control, such as clicking control 1012, the user can call for various vehicle types. Once a ride is hailed, users can perform subsequent operations until the ride is completed.

[0235] It should be noted that the module names involved in the embodiments of this application can all be defined as other names, as long as they can achieve the function of each module, and no specific restrictions are placed on the module names.

[0236] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0237] The task processing method of the embodiments of this application has been described above. The apparatus for executing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced by each other, and the related apparatus provided in the embodiments of this application can execute the steps in the above task processing method.

[0238] The task processing method provided in this application can be applied to electronic devices with data processing capabilities. Electronic devices include terminal devices, and the specific device form of the terminal device can be referred to the above-described related information, which will not be repeated here.

[0239] In one implementation, this application provides an electronic device. Figure 11This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.

[0240] like Figure 11 As shown, the electronic device 1100 includes: a processor 1101 and a memory 1102; the memory 1102 stores computer execution instructions; the processor 1101 executes the computer execution instructions stored in the memory 1102, causing the electronic device 1100 to perform the above-described method.

[0241] When the memory 1102 is set up independently, the electronic device also includes a bus 1103 for connecting the memory 1102 and the processor 1101.

[0242] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.

[0243] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0244] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0245] This application provides a computer program product, which includes a computer program that, when run, causes the computer to perform the above-described method.

[0246] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0247] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A task processing method, characterized in that, include: Obtain a first command input by the user, and perform intent recognition on the first command to obtain at least one operation intent corresponding to the first command; For any one of the at least one operation intentions, determine the task decomposition model corresponding to the operation intention, and generate task description statements for at least one task corresponding to the operation intention based on the task decomposition model. A task execution chain is generated based on the task description statement corresponding to each of the at least one operation intention, and the task execution chain includes each of the task description statements. According to the task execution chain, the tasks corresponding to each of the task description statements are executed sequentially to perform the operation corresponding to the first command.

2. The method according to claim 1, characterized in that, The method is applied to a terminal device, which includes a service unit and an intent processing unit, wherein the service unit is used to obtain the first command; The step of performing intent recognition on the first command to obtain at least one operation intent corresponding to the first command includes: The intent processing unit performs intent recognition on the first command provided by the service unit to obtain at least one operation intent corresponding to the first command.

3. The method according to claim 2, characterized in that, The step of determining the task decomposition model corresponding to any one of the at least one operation intentions includes: For any of the operation intentions described above, the intention processing unit generates a first instruction corresponding to the operation intention, the first instruction including the operation intention and the first command; The intent processing unit sends the first instruction to the business unit. The first instruction is used to instruct the task decomposition model corresponding to the operation intent to perform task decomposition processing on the first command. In response to the first instruction, the business unit determines the task decomposition model corresponding to the operation intention based on the mapping relationship between the operation intention and the task decomposition model.

4. The method according to claim 3, characterized in that, The method further includes: The business unit sends the first command to the task decomposition model corresponding to the operation intention, so that the task decomposition model performs task decomposition processing on the first command.

5. The method according to claim 4, characterized in that, The task breakdown model is deployed on cloud devices; The business unit sends the first command to the task decomposition model corresponding to the operation intent, including: The business unit sends a request message to the cloud device. The request message contains the first command and is used to instruct the task decomposition model to perform task decomposition processing on the first command.

6. The method according to claim 5, characterized in that, The method further includes: The business unit receives return information sent by the cloud device, and the return information contains at least one task description statement corresponding to the operation intention.

7. The method according to any one of claims 2-6, characterized in that, The terminal device also includes a task engine; The step of generating a task execution chain based on the task description statements corresponding to each of the at least one operation intent includes: The business unit invokes the task engine so that the task engine parses the task description statements corresponding to each of the at least one operation intent to generate the task execution chain.

8. The method according to claim 7, characterized in that, The task description statement includes at least one of the following: task number, tool identifier, input parameters, and execution conditions; The task engine parses the task description statements corresponding to each of the at least one operation intent to generate the task execution chain, including: If the task description statement corresponding to the first task contains input parameters that depend on the execution result of the second task, then it is confirmed that the execution of the first task depends on the second task; or, If the execution condition in the task description statement corresponding to the first task depends on the execution result of the second task, then it is confirmed that the execution of the first task depends on the second task. The task execution chain is generated based on the dependencies between the tasks corresponding to each of the task description statements. Wherein, the first task and the second task are any two tasks from the tasks corresponding to each of the task description statements.

9. The method according to claim 8, characterized in that, In the task execution chain, the first task is executed after the second task.

10. The method according to any one of claims 1-9, characterized in that, The step of sequentially executing the tasks corresponding to each of the task description statements according to the task execution chain includes: The task engine executes the tasks corresponding to each of the task description statements sequentially according to the task execution chain. For any of the tasks, after the task is completed, the method further includes: If the task does not have a corresponding execution condition, or if the execution condition corresponding to the task is met, the task is recorded as a first state, which is used to indicate that the task has ended.

11. An electronic device, characterized in that, The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 10.

12. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 10.

14. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 10.