Task processing method, electronic device, and computer-readable storage medium

CN123030282APending Publication Date: 2026-11-03HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510580313.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

传统图像处理方式操作繁琐且效率低,用户体验不高,用户需手动执行多个操作来完成多个意图的图像处理任务。

Method used

By deploying intelligent agents and execution units on electronic devices, the intent in user statements is identified using a task decomposition model, a target task chain is generated, and the execution units are called in parallel or serially to execute sub-tasks, thereby automatically completing image processing.

Benefits of technology

It enables complex image processing without repeated manual operations by the user, improving ease of operation and efficiency, and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030282A_ABST
    Figure CN123030282A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and provides a task processing method, an electronic device and a computer readable storage medium, the method comprising: acquiring a sentence input by a user, the sentence being used for indicating an image to be processed; acquiring a plurality of task description sentences corresponding to the sentence; generating a target task chain according to the plurality of task description sentences, the target task chain comprising a plurality of subtasks, the plurality of subtasks and the plurality of task description sentences corresponding to each other, and one or more of the plurality of subtasks being an image processing task; calling a plurality of execution units to execute the plurality of subtasks according to a task execution sequence indicated by the target task chain, so as to obtain a target result image, the plurality of execution units and the plurality of subtasks corresponding to each other, and one or more of the plurality of execution units being an image processing tool. The above method is simple to operate and improves user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence processing technology, specifically to a task processing method, an electronic device, and a computer-readable storage medium. Background Technology

[0002] With the rapid development of artificial intelligence technology, electronic devices are becoming increasingly feature-rich and intelligent. When users want to operate electronic devices to achieve multiple intentions, they need to manually perform multiple operations to complete the processing of these intentions.

[0003] For example, if a user wants to remove passersby from an image and then beautify the main subject after removing the passersby, resulting in an enhanced image containing only the main subject, the user needs to manually remove the passersby from the image first, and then click the beautification control to beautify the subject in the image after removing the passersby.

[0004] Traditional image processing methods are cumbersome, inefficient, and provide a poor user experience. Summary of the Invention

[0005] This application provides a method, apparatus, chip, electronic device, computer-readable storage medium, and computer program product for processing tasks in images. When a user-inputted sentence contains a person pronoun, it can accurately identify the person indicated by the person pronoun and then perform corresponding processing on the identified person, thus enriching the image processing functions.

[0006] In a first aspect, a task processing method is provided, applied to an electronic device. The electronic device is equipped with at least one intelligent agent, which includes multiple execution units. The method includes: acquiring a statement input by a user, the statement indicating an image to be processed; acquiring multiple task description statements corresponding to the statement; generating a target task chain based on the multiple task description statements, the target task chain including multiple sub-tasks, the multiple sub-tasks corresponding one-to-one with the multiple task description statements, one or more of the multiple sub-tasks being image processing tasks; and calling the multiple execution units to execute the multiple sub-tasks according to the task execution order indicated by the target task chain to obtain a target result image, the multiple execution units corresponding one-to-one with the multiple sub-tasks, one or more of the multiple execution units being image processing tools.

[0007] Electronic devices are equipped with intelligent agents capable of performing complex tasks. Each intelligent agent includes at least one execution unit. Each execution unit can invoke a corresponding processing tool to perform a task. When a user inputs a statement and the desired image to be edited is identified, the electronic device can receive the statement and the image, then send the statement to a cloud-based server for intent recognition to obtain the user's intended intent. The cloud-based server can also use a task decomposition model to decompose and orchestrate the intent corresponding to the statement, resulting in one or more task description statements.

[0008] Optionally, the task decomposition model is a neural network model, which can decompose the intent of a statement into tasks based on the granularity of the execution unit on the edge electronic device, obtaining one or more task description statements corresponding to at least one subtask. Each subtask can be executed on the edge by calling the corresponding execution unit, and the execution result of each subtask is output.

[0009] The cloud-side server can also distribute one or more task description statements obtained from the decomposition to the electronic devices on the edge side.

[0010] Once the terminal electronic device receives the task description statement, it can assemble the task chain according to the dependency relationships and priority parameters of each subtask described in the task description statement. Then, it can call the corresponding execution unit according to the task chain to execute each subtask one by one and obtain the final target result image.

[0011] This method can automatically recognize user statements, break them down into subtasks that can be executed by the execution units on the edge, and then, based on the task execution order indicated by the target task chain, rationally and accurately call multiple execution units to execute multiple subtasks to obtain the target image. When faced with complex image processing needs, this method can achieve complex image processing without requiring repeated manual operations from the user, making the operation more convenient and efficient, and improving the user experience.

[0012] In this method, different execution units and different agents are independent of each other, and the decomposed subtasks can be executed by different execution units. When a certain function needs to be supported, the corresponding function can be implemented by registering the corresponding agent or execution unit. Various functions are decoupled from each other, realizing a pluggable expansion mechanism that can flexibly adapt to complex and ever-changing scenario requirements.

[0013] When the granularity of the subtasks that the execution unit on the user side can execute changes, the subtasks corresponding to the decomposed task description statements are also adjusted accordingly, realizing the free definition of the execution unit and providing greater flexibility.

[0014] In some implementations, there is no dependency between the multiple subtasks. The multiple execution units are invoked to execute the multiple subtasks in the order of task execution indicated by the target task chain to obtain the target result image. This includes: invoking multiple execution units in parallel to execute multiple subtasks to obtain multiple sub-result images; and merging the multiple sub-result images to obtain the target result image.

[0015] When multiple subtasks are independent of each other, meaning that different execution units can execute their respective subtasks independently without any sequential requirement, electronic devices can, based on resource configuration, call multiple execution units in parallel to execute multiple subtasks, resulting in multiple sub-result images. These multiple sub-result images are then merged to obtain the target result image.

[0016] If there are no dependencies between subtasks, they are considered parallel subtasks, and the generated task chain is a parallel task chain. In this case, the electronic device does not need to call the execution units in the task chain sequentially to complete the processing; instead, it can call each execution unit in parallel. The timing of each execution unit executing its corresponding subtask does not affect the others and can be allocated according to the resource configuration of the electronic device.

[0017] In some implementations, the processing regions corresponding to multiple subtasks in the image to be processed do not overlap.

[0018] When the processing regions of the subtasks in the image to be processed do not overlap, it means that the processing results of these subtasks do not affect each other. Therefore, the execution units can be called in parallel for processing, and then the sub-result images processed by each execution unit are merged to obtain the final target result image.

[0019] In some implementations, multiple subtasks are dependent on each other, and the target task chain also includes multiple priority parameters for multiple subtasks. The multiple priority parameters are used to characterize the task execution order of multiple subtasks. According to the task execution order indicated by the target task chain, multiple execution units are called to execute multiple subtasks to obtain the target result image, including: based on the priority characterized by the multiple priority parameters, multiple execution units are called sequentially in descending order of priority to execute multiple subtasks to obtain the target result image.

[0020] If there are dependencies between subtasks, they are considered sequential subtasks, and the generated task chain is a sequential task chain. The electronic device can then sequentially call the execution units in the task chain according to the priority order of each subtask, from highest to lowest, to complete the processing.

[0021] In some implementations, the processing areas corresponding to multiple subtasks in the image to be processed overlap.

[0022] When the processing regions of subtasks overlap in the image to be processed, it indicates that the processing results of these subtasks affect each other; the output of one subtask may be the input information of another. Therefore, the electronic device can sequentially call the execution units in the task chain according to the priority order of each subtask, from high to low, to complete the processing and ensure the accuracy of the target image.

[0023] In some implementations, the first part of the multiple subtasks includes at least two first subtasks, and the second part of the multiple subtasks includes at least one second subtask; at least two first subtasks have no dependency relationship, while the first part of the subtasks and the second part of the subtasks have a dependency relationship; or, at least two first subtasks have a dependency relationship, while the first part of the subtasks and the second part of the subtasks have no dependency relationship.

[0024] In the first part of the subtasks, at least two first subtasks have a dependency relationship, forming a serial task chain. In the second part of the subtasks, if there are multiple second subtasks, regardless of whether it's a serial or parallel task chain, if there is no dependency between the first and second part subtasks, the multiple subtasks are assembled into a hybrid task chain. Conversely, in the first part of the subtasks, if at least two first subtasks have no dependency relationship, forming a parallel task chain, and in the second part of the subtasks, if there are multiple second subtasks, regardless of whether it's a serial or parallel task chain, if there is a dependency between the first and second part subtasks, the multiple subtasks are assembled into a hybrid task chain.

[0025] In some implementations, the multiple subtasks also include a third subtask, which includes at least one third subtask, and the third subtask has a dependency relationship with the first subtask or the second subtask.

[0026] The multiple subtasks described in the above task description statement are sequential subtasks if they have dependencies on each other, resulting in a sequential task chain. The electronic device can then call the execution units in the task chain in order to complete the processing.

[0027] If there are no dependencies between subtasks, they are parallel subtasks, and the generated task chain is a parallel task chain. In this case, electronic devices do not need to call the execution units in the task chain sequentially to complete the processing; they can call the execution units in parallel to complete the processing.

[0028] If some subtasks have dependencies on others and some do not, they are considered mixed subtasks, and the generated task chain is a parallel mixed task chain. Electronic devices can then sequentially call the execution units in the task chain to complete processing for serial subtasks or serial subtask chains, while for parallel subtasks or parallel subtask chains, the execution units can be called in parallel without needing to follow a sequential order.

[0029] In the above hybrid task chain, the subtasks identified based on user semantic recognition may be combined in series and parallel and nested with each other. When calling the execution unit, the electronic device follows the dependency parameters and priority parameters of each subtask to ensure the smooth execution of the task chain.

[0030] In some implementations, multiple execution units are invoked to execute multiple subtasks in the order of task execution indicated by the target task chain, including: obtaining the triggering conditions contained in the statement; and when the state of the electronic device is detected to meet the triggering conditions, executing the steps of invoking multiple execution units to execute multiple subtasks in the order of task execution indicated by the target task chain.

[0031] Electronic devices can also sense their current environment through a sensing module, such as their location, the time and location of images stored on the device, the content of information received by applications on the device, which contact sent the information, and which application received the information, etc. The sensing module can also sense the current date. When the user's input includes trigger conditions, the electronic device can initiate a task execution process if the trigger conditions are met. If the trigger conditions are not met, the task execution process does not need to be initiated. This allows for conditional task execution based on user commands, better meeting user needs and expanding the range of application scenarios.

[0032] In some implementations, the triggering conditions include one or more of the following: the electronic device enters a preset geofence, the location of the image captured by the electronic device is within the preset geofence, a preset date is reached, the time of the image captured by the electronic device is within the preset date, the electronic device receives a message with preset content, a preset application in the electronic device receives a message, a preset application in the electronic device receives a message sent by a preset contact, and a preset application in the electronic device receives a message with preset content sent by a preset contact.

[0033] In some implementations, the first task description statement includes: subtask name, dependency parameters between the subtask and other subtasks, priority parameters of the subtask, execution unit identifier corresponding to the subtask, and execution parameters of the subtask. The first task description statement can be any one of multiple task description statements.

[0034] Optionally, the subtask name can be the subtask's sequence number, such as TaskID, and the specific value can be a number like 1, 2, 3, etc. The dependency parameter between subtasks can be protoType, and the specific value can be independent (no dependency) or dependent (dependence). The subtask priority parameter can be priority, and the specific value can be a natural number to represent the priority order or priority level; for example, a larger value indicates higher priority, and a smaller value indicates lower priority. The execution unit identifier corresponding to the subtask can be tool, and the specific value can be the name of the corresponding processing tool or interface, such as image_eraser, add_filter, crop_image, etc. The execution parameters of the subtask can be params, and the specific values ​​can vary depending on the corresponding execution unit. For example, for the execution unit image_eraser, the corresponding params can include objects_to_remove and remove_persons. Further details are omitted here.

[0035] Using the above parameters can clearly describe the relationship between each subtask, ensure the correct assembly of the task chain, and accurately process the image to be processed, thereby improving the accuracy of executing the image processing instructions corresponding to the user's statement and thus improving the user experience.

[0036] In some implementations, the statement represents retaining the target person, eliminating passersby, and adding a first filter; the multiple subtasks include: a passerby elimination task and a filter addition task, the passerby elimination task and the filter addition task are dependent on each other, and the priority parameter of the passerby elimination task represents a higher priority than the priority parameter of the filter addition task.

[0037] The electronic device can remove pedestrians from the image to be processed and add a first filter by sequentially calling the execution unit corresponding to the pedestrian removal task and the execution unit corresponding to the filter addition task. This method can handle complex tasks without requiring multiple user operations, making it more convenient and faster to use and improving the user's image editing experience.

[0038] In some implementations, the statement represents retaining the target person, eliminating passersby, beautifying the skin, and generating an ID photo; the multiple subtasks include: the passerby elimination task, the skin beautification task, and the ID photo generation task. The passerby elimination task, the skin beautification task, and the ID photo generation task are dependent on each other. The priority parameter of the passerby elimination task represents a higher priority than the priority parameter of the skin beautification task, and the priority parameter of the skin beautification task represents a higher priority than the priority parameter of the ID photo generation task.

[0039] The electronic device can remove passersby from the image to be processed by sequentially calling the execution units corresponding to the passerby removal task, the skin beautification task, and the ID photo generation task. It then performs skin beautification on the remaining individuals and generates an ID photo of the main subject. This method can handle complex tasks without requiring multiple user operations, making it more convenient and faster, and improving the user's image editing experience.

[0040] In some implementations, multiple execution units are invoked to execute multiple subtasks according to the task execution order indicated by the target task chain to obtain the target result image. This includes: invoking a fourth execution unit to execute a fourth subtask, where the fourth subtask is any one of the multiple subtasks and the fourth execution unit is one of the multiple execution units corresponding to the fourth subtask; obtaining the first execution result of the fourth subtask; and if the first execution result indicates that the fourth subtask has failed to execute, determining a processing strategy based on the error type corresponding to the fourth subtask.

[0041] In some implementations, when the error type is an irreversible error type, the processing strategy indicates that the execution of the fourth subtask is terminated; when the error type is a correctable error type, the processing strategy indicates that the fourth execution unit is repeatedly invoked to execute the fourth subtask after a preset time interval; when the error type is a retry type after updating the conditions, the processing strategy indicates that the trigger conditions are updated and the fourth execution unit is repeatedly invoked to execute the fourth subtask when the state of the electronic device meets the trigger conditions.

[0042] Electronic devices can handle different error types in different ways, ensuring that the user's intended message is executed successfully to the greatest extent possible, reducing errors and interruptions, and improving the user experience.

[0043] In some implementations, obtaining multiple task description statements corresponding to a statement includes: sending the statement to a cloud-side server; the cloud-side server deploying a task decomposition model; the cloud-side server using the task decomposition model to decompose the intent expressed by the statement into multiple task description statements; and receiving the multiple task description statements returned by the cloud-side server.

[0044] In some implementations, a task decomposition model is deployed on the electronic device to obtain multiple task description statements corresponding to the statement, including: using the task decomposition model to decompose the intent expressed by the statement into multiple task description statements.

[0045] In some implementations, the first intelligent agent includes a first task engine. The first intelligent agent is any one of at least one intelligent agent. The first intelligent agent includes at least a fifth execution unit. Calling multiple execution units to execute multiple subtasks includes: calling the fifth execution unit to execute a fifth subtask through the first task engine. The fifth subtask is the task corresponding to the fifth execution unit among the multiple subtasks.

[0046] The first intelligent agent is any intelligent agent deployed on an electronic device. The execution unit within the first intelligent agent is the fifth execution unit. Each intelligent agent includes a corresponding task engine. The first intelligent agent can invoke its own execution unit to execute corresponding subtasks through its own first task engine.

[0047] Optionally, the process of performing intent recognition on a statement and obtaining the corresponding task description statement based on that intent can be performed by an edge electronic device or by a cloud server. Obtaining the task description statement locally on the electronic device requires deploying a task decomposition model, which reduces interaction with the cloud server, saving bandwidth and time. Obtaining the task description statement from the cloud server allows for task orchestration and decomposition based on its task decomposition model. Cloud servers often have stronger computing power and more accurate models, resulting in more accurate task description statements and task execution results that better meet user expectations, thus improving the user experience.

[0048] In some implementations, an agent management module is also arranged on the electronic device. The intent expressed by the statement corresponds at least to the identifier of a second agent. According to the task execution order indicated by the target task chain, multiple execution units are invoked to execute multiple sub-tasks to obtain a target result image. This includes: in response to the received statement, the agent management module queries the long-term memory module to see if a second agent exists based on the identifier of the second agent; if it exists, at least one sixth execution unit of the second agent is invoked to execute at least one sixth sub-task according to the task execution order indicated by the target task chain to obtain the target result image; if it does not exist, a second agent is created based on the identifier of the second agent to register at least one sixth execution unit, and at least one sixth execution unit of the second agent is invoked to execute at least one sixth sub-task according to the task execution order indicated by the target task chain to obtain the target result image.

[0049] The aforementioned second intelligent agent can be any intelligent agent deployed on the electronic device. Each intelligent agent needs to be registered before it can be invoked. Simultaneously with successful registration of the intelligent agent, the execution units contained within it are also successfully registered.

[0050] The aforementioned sixth execution unit is the execution unit in the second intelligent agent, corresponding to the sixth subtask.

[0051] After the user inputs a statement, when the sixth subtask is obtained through intent recognition and task decomposition, it is determined that the sixth execution unit of the sixth agent needs to be invoked to execute the sixth subtask. At this time, the agent management module can check whether the sixth agent exists in the long-term memory module. If it exists, it means that the sixth agent is in a registered state and can be invoked normally; if it does not exist, it means that the sixth agent is not registered, and the registration process is initiated to register the sixth agent and the sixth execution unit.

[0052] Once the intelligent agent and execution unit are successfully registered, they can be used to execute the corresponding subtasks, thereby completing the instructions given by the user and performing intelligent image editing.

[0053] In a second aspect, a task processing apparatus is provided, comprising a unit consisting of software and / or hardware, the unit being used to execute any one of the methods described in the first aspect.

[0054] Thirdly, embodiments of this application provide a chip including a processor; the processor is used to read and execute a computer program stored in a memory to perform any one of the methods described in the first aspect.

[0055] Optionally, the chip further includes a memory, which is connected to the processor via a circuit or wire.

[0056] Alternatively, the chip may further include a communication interface.

[0057] Fourthly, an electronic device is provided, comprising: a processor, a memory, and an interface; the processor, memory, and interface cooperate with each other to enable the electronic device to perform any one of the methods described in the first aspect.

[0058] Fifthly, an electronic device is provided, which includes any one of the chips described in the third aspect.

[0059] In a sixth aspect, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, the processor performs any one of the methods described in the first aspect.

[0060] In a seventh aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when executed on an electronic device, causes the electronic device to perform any one of the methods described in the first aspect. Attached Figure Description

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

[0062] Figure 2 This is a software structure block diagram of the terminal device 100 provided in the embodiments of this application;

[0063] Figure 3 This is a schematic diagram of an example of a dialog elimination interface provided in an embodiment of this application;

[0064] Figure 4 This is another example of a dialog box elimination interface provided in the embodiments of this application;

[0065] Figure 5 This is another example of a dialog box elimination interface provided in the embodiments of this application;

[0066] Figure 6 This is another example of a dialog box elimination interface provided in the embodiments of this application;

[0067] Figure 7 This is another example of a dialog box elimination interface provided in the embodiments of this application;

[0068] Figure 8 This is a schematic diagram of an example of an intelligent voice assistant provided in an embodiment of this application;

[0069] Figure 9 This is an interactive diagram of an example of an agent registration process provided in an embodiment of this application;

[0070] Figure 10 This is another example of interface changes during the dialogue elimination process provided in this application embodiment;

[0071] Figure 11 This is an interaction diagram of an example of an agent registration process provided in an embodiment of this application;

[0072] Figure 12 This is an example of an interaction diagram showing the registration of multiple intelligent agents' execution units according to an embodiment of this application;

[0073] Figure 13 This is a software architecture diagram of an example image processing method provided in an embodiment of this application;

[0074] Figure 14This is a flowchart of a method for generating a task chain provided in an embodiment of this application;

[0075] Figures 15A-15D This is an interactive diagram of the image processing method provided in the embodiments of this application;

[0076] Figure 16 This is a schematic diagram of the structure of a task processing device provided in an embodiment of this application. Detailed Implementation

[0077] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0078] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.

[0079] The task processing method provided in this application can be applied to terminal devices such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application does not impose any restrictions on the specific type of terminal device.

[0080] For example, Figure 1This is a schematic diagram of the structure of a terminal device 100 provided in an embodiment of this application. The terminal device 100 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. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0081] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 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.

[0082] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0083] The controller can serve as the central nervous system and command center of the terminal device 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0084] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0085] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0086] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0087] Terminal device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0088] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized display, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, terminal device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0089] Terminal device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0090] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0091] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the terminal device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0092] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when terminal device 100 selects a frequency, the DSP performs Fourier transforms on the frequency energy.

[0093] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs. Thus, terminal device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0094] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in terminal devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0095] Terminal device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0096] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0097] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or make hands-free calls through the speaker 170A.

[0098] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a phone call or voice message, the receiver 170B can be brought close to the listener's ear to hear the voice.

[0099] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Terminal device 100 may be equipped with at least one microphone 170C. In some embodiments, terminal device 100 may be equipped with two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, terminal device 100 may be equipped with three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0100] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0101] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of terminal device 100, in a different position than display screen 194.

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

[0103] Figure 2 This is a software structure block diagram of the terminal device 100 according to an embodiment of this application. 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 Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0104] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and smart voice assistant.

[0105] For example, a smart voice assistant can be called YOYO Assistant, or simply YOYO. A smart voice assistant can interact with users, understand their needs, and provide corresponding services based on those needs.

[0106] 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.

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

[0108] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0109] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0110] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0111] The phone manager is used to provide communication functions for terminal device 100. For example, it manages call status (including connection, hang-up, etc.).

[0112] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0113] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.

[0114] The application framework layer can also configure artificial intelligence agents (AI agents) to automate complex tasks. Optionally, there can be one or more AI agents. Different AI agents can handle different types of complex tasks.

[0115] Optionally, the intelligent agent can run in the same process as a system-level application (such as Brain) to interact with the intelligent voice assistant and process user commands received by the intelligent voice assistant.

[0116] Correspondingly, the intelligent agent can provide an intelligent agent lifecycle management service, which can also interact with other services. For example, the intelligent agent lifecycle management service can interact with perception services to obtain perceived data, such as the user's physiological state, the external environmental state, etc. Optionally, the functional module that provides the intelligent agent lifecycle management service can also be called an intelligent agent management module.

[0117] Optionally, the agent can also interact with cloud-based servers to invoke large cloud-based models to handle complex tasks.

[0118] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0119] 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.

[0120] 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.

[0121] System libraries 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.

[0122] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0123] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0124] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0125] A 2D graphics engine is a graphics engine for 2D drawing.

[0126] 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.

[0127] For ease of understanding, the following embodiments of this application will be described using the following methods: Figure 1 and Figure 2 Taking the terminal device with the structure shown as an example, the technical solution provided by the embodiments of this application will be specifically described in conjunction with the accompanying drawings and application scenarios.

[0128] In this application, YOYO, a smart voice assistant, is used as an example for illustrative purposes. Users can wake up YOYO by speaking a wake-up word into the electronic device, such as saying "Hello YOYO," or by bringing the electronic device close to the mouth and waking up YOYO through breath.

[0129] YOYO can interact with users through natural language. When YOYO is activated, its program interface is displayed on the electronic device's screen. Optionally, YOYO's program interface can be displayed on the taskbar on the desktop. Users can input commands in the taskbar, which can be in text or voice format. When the user inputs a command in voice format, YOYO can recognize the voice and generate the corresponding text. After being activated, YOYO can display a dialog box (or dialogue box). Users can input commands in the dialog box, instructing the electronic device to perform corresponding processing operations according to the user's input.

[0130] For example, when a user wants to intelligently edit a picture, they can input the image and a sentence in the intelligent voice assistant's dialog box to execute the AI ​​editing function. Next, we will combine... Figures 3 to 7 The relevant interfaces of the AI ​​editing function provided in the embodiments of this application are described.

[0131] In some implementations, users can trigger the image processing function of the intelligent voice assistant in various ways to edit an image. The following will combine... Figures 3 to 7 This is illustrated by example:

[0132] The following is combined with Figure 3 The first method is illustrated by example:

[0133] like Figure 3 As shown in (a), the electronic device displays interface 21, which can display icons for multiple applications, assuming it includes an icon 211 for the gallery application. Optionally, interface 21 can be referred to as the main interface or desktop. Subsequently, the electronic device receives an operation applied to the icon 211 of the gallery application in interface 21, and in response to this operation, as shown in (a). Figure 3 As shown in (b), the electronic device can display an interface 22 of a gallery application. Interface 22 can display thumbnails of each of multiple images, assuming it includes a thumbnail 221 of image a. Subsequently, the electronic device receives an operation applied to thumbnail 221 of image a, and in response to this operation, as shown in (b). Figure 3 As shown in (c), the electronic device can display an interface 23 of a gallery application. Interface 23 can display image a, as well as multiple controls. For example, these multiple controls may include share, favorite, AI edit, delete, more, etc. Then, the electronic device receives an operation applied to image a and responds to that operation as follows: Figure 3 As shown in (d), the electronic device can display the interface 24 of the gallery application. The interface 24 can display a full-screen view of image a. Optionally, the interface 24 can be referred to as a large page of image a. For example, in this embodiment, the operation received by the electronic device acting on the content displayed on the electronic device (such as icons, thumbnails, images, controls, or options) can be a voice operation, a gesture operation (such as clicking, long-pressing, or swiping), or a motion-sensing operation (such as device shaking or air gestures), etc., and this embodiment does not limit this.

[0134] like Figure 3As shown in (d) above, in some embodiments, when the electronic device displays interface 24, it can automatically display the input box 241 of the intelligent voice assistant and multiple AI editing controls on interface 24. In other embodiments, the user can wake up the intelligent voice assistant while the electronic device displays interface 24. After the intelligent voice assistant is woken up, the electronic device can display the input box 241 of the intelligent voice assistant and multiple AI editing controls on interface 24. For example, the user can wake up the intelligent voice assistant using any of the following methods: voice wake-up, breath wake-up, button wake-up, navigation bar wake-up, etc. For example, the multiple AI editing controls may include a pedestrian removal control 242, a one-click skin beautification control 243, and an intelligent removal control 244. The pedestrian removal control 242 is used to trigger the removal of pedestrians in the image. The one-click skin beautification control 243 is used to trigger skin beautification of people in the image. The intelligent removal control 244 is used to trigger the removal of specific targets in the image. Specific targets may include one or more of people, animals, plants, objects, text, watermarks, etc. In this embodiment, "passersby" can refer to other figures in the image besides the main subject, such as pedestrians in the background, people passing by, or other individuals in the scene who do not directly interact with the main subject. The main subject typically refers to the central figure in the image, usually located in the center or a prominent position within the image.

[0135] In this scenario, if a user wants to remove passersby from image a, they can operate the "Remove Passersby" control 242. Upon receiving the operation on the "Remove Passersby" control 242, the electronic device can, in response to this operation, perform passersby removal processing on image a, and can display the chat window 26 of the intelligent voice assistant. For example, as... Figure 3 As shown in (e), the chat window 26 can be displayed on the interface 24 in a floating window or similar manner, and the interface 24 and the chat window 26 together constitute the interface 25. When the chat window 26 is displayed on the interface 24, the chat window 26 does not completely cover the interface 24. The chat window 26 may include an input box 261 and a dialogue area 262. Optionally, during the process of removing pedestrians from image a, the electronic device may display the user message "Remove pedestrians" and the intelligent voice assistant message "Image generation in progress" in the dialogue area 262 to remind the user that pedestrians in image a are being removed.

[0136] Assuming the electronic device obtains image b after performing pedestrian removal processing on image a, the electronic device can display a thumbnail of image b in dialog area 262. For example, as... Figure 3As shown in (e), after completing the pedestrian removal process for image a, the electronic device may no longer display the intelligent voice assistant message "Image generation in progress," but instead display the intelligent voice assistant messages "Completed, you can save directly or perform custom editing" and "Thumbnail of image b." Optionally, as... Figure 3 As shown in (e), the electronic device can display multiple controls while showing a thumbnail of image b, such as a sharing control 263, a save control 264, a custom editing control 265, and an AI retouching control 266. The sharing control 263 is used to share image b. The save control 264 is used to save image b locally. The custom editing control 265 is used for custom editing. The AI ​​retouching control 266 is used for AI retouching of image b. Users can manipulate image d using these controls.

[0137] The above text Figure 3 In the first approach provided by the embodiment, users can decide whether image processing is needed while viewing images in the gallery application, and instantly initiate image processing functions via a smart voice assistant when image processing is required. This improves ease of operation and makes image processing smoother and more intuitive.

[0138] The following is combined with Figure 4 and Figure 5 The second method is illustrated by example:

[0139] like Figure 4 As shown in (a), the electronic device displays interface 31, which can be any interface displaying an image. Here, it is assumed that interface 31 is a chat interface of an instant messaging application, where the user and / or their friend sends an image c to each other. Subsequently, the electronic device receives an operation applied to image c (such as a long press), and in response to this operation, the electronic device can display a thumbnail 321 of image c. For example, as... Figure 4 As shown in (b), thumbnail 321 can be displayed on interface 31, and interface 31 and thumbnail 321 together constitute interface 32. When thumbnail 321 is displayed on interface 31, it can obscure the content at the corresponding position in interface 31. The user can drag thumbnail 321, and thumbnail 321 can move within interface 32 as the user drags it.

[0140] After that, as Figure 4As shown in (c), when the electronic device detects that the thumbnail 321 has been dragged to near the edge of the screen, it can display interface 33. Interface 33 can display the thumbnail 321, screen 331, and service recommendation bar 332. Optionally, screen 331 can display the content of the scaled-down interface 31. For example, screen 331 is used to create the visual effect of interface 31 being pushed inward on the screen. Service recommendation bar 332 is used to display icons of one or more services, which may include the icon 333 of the intelligent voice assistant. Users can drag the thumbnail 321 to the position of an icon in service recommendation bar 332 according to their own needs and then release it to transmit image c to the service corresponding to the icon and start the corresponding service function. It should be noted that the service described in this application embodiment is a program used to implement a specific function, such as an application, applet, quick app (also known as an installation-free application), or certain functional modules of an application, etc., and this application embodiment does not limit this.

[0141] Subsequently, after detecting that thumbnail 321 has been dragged to and released from the location of the smart voice assistant icon 333, the electronic device can transmit image c to the smart voice assistant and display the smart voice assistant's chat window 35. For example, as... Figure 5 As shown in (a), the chat window 35 can be displayed on the interface 31 in a floating window or similar manner, and the interface 31 and the chat window 35 together constitute the interface 34. When the chat window 35 is displayed on the interface 31, the chat window 35 does not completely cover the interface 31. The chat window 35 may include an input box 351, multiple AI editing controls, and a dialogue area 352. The multiple AI editing controls may include a passerby removal control 353, a one-click skin beautification control 354, a smart removal control 355, etc. The functions of the multiple AI editing controls have been described above. Figure 3 The example is described below and will not be repeated here. The user message "thumbnail of image c" can be displayed in the dialogue area 352.

[0142] In this scenario, if a user wants to remove pedestrians from image c, they can operate the pedestrian removal control 353. Upon receiving the operation on the pedestrian removal control 353, the electronic device can perform pedestrian removal processing on image c in response to the operation. Optionally, during the pedestrian removal processing of image c, the electronic device can display the user message "Remove Pedestrians" and the intelligent voice assistant message "Image Generating" in the dialog area 352 to remind the user that pedestrians are being removed from image c.

[0143] Assuming the electronic device obtains image d after performing pedestrian removal processing on image c, the electronic device can display a thumbnail of image d in dialog area 352. For example, as... Figure 5As shown in (b), after completing the pedestrian removal process for image c, the electronic device may no longer display the intelligent voice assistant message "Image generation in progress," but instead display the intelligent voice assistant message "Completed, you can save directly or perform custom editing" and "Thumbnail of image d." Optionally, as... Figure 5 As shown in (b) above, the electronic device can display multiple controls simultaneously with the thumbnail of image d, such as a share control 361, a save control 362, a custom edit control 363, and an AI image editing control 364. The functions of these multiple controls have been described above. Figure 3 The examples are illustrated below and will not be repeated here. Users can manipulate image d using these controls.

[0144] The above text Figures 4 to 5 In the second method provided in the embodiment, users can quickly transmit images from any interface to the intelligent voice assistant for processing. This improves operational flexibility and convenience.

[0145] The following is combined with Figure 6 The third method is illustrated by example:

[0146] The electronic device can display interface 41, which can be any interface. The user can wake up the intelligent voice assistant while the electronic device displays interface 41. After the intelligent voice assistant is woken up, the electronic device can display the input box 421 of the intelligent voice assistant. For example, such as... Figure 6 As shown in (a), the input box 421 can be displayed on the interface 41 in a floating window or similar manner. The interface 41 and the input box 421 can together constitute the interface 42. When the input box 421 is displayed on the interface 41, the input box 421 does not completely cover the interface 41. The input box 421 may include an add control 422 and an input mode switching control 423. The add control 422 is used to add images or files. The input mode switching control 423 is used to switch the input mode between voice input and text input.

[0147] In this situation, if the user wants to perform image processing, they can operate the added control 422. The electronic device receives the operation applied to the added control 422 and responds to the operation as follows: Figure 6 As shown in (b), the electronic device can display multiple controls in the input box 421. These controls may include an image control 424, a camera control 425, a file control 426, etc. Users can select a local image for processing using the image control 424, or capture an image for processing using the camera control 425. The following explanation uses the image control 424 as an example to illustrate how to input an image to the intelligent voice assistant. For the method of inputting an image to the intelligent voice assistant using the camera control 425, please refer to the following text. Figure 7The relevant descriptions in the embodiments will not be repeated here.

[0148] Assuming the electronic device receives an operation applied to the image control 424, in response to that operation, such as Figure 6 As shown in (c), the electronic device can display an interface 43 of a gallery application. Interface 43 can display thumbnails of each of multiple images, assuming it includes a thumbnail 431 of image e. Subsequently, the electronic device receives an operation applied to thumbnail 431 of image e, and in response to this operation, as shown in (c). Figure 6 As shown in (d), the electronic device can display interface 44. Interface 44 can display image e, as well as a return control 441 and a completion control 442. Upon receiving an operation on the completion control 442, the electronic device can, in response to this operation, display the chat window 46 of the intelligent voice assistant. For example, as... Figure 6 As shown in (e), the chat window 46 can be displayed on the interface 41 in a floating window or similar manner. The interface 41 and the chat window 46 together constitute the interface 45. When the chat window 46 is displayed on the interface 41, the chat window 46 does not completely cover the interface 41. The chat window 46 may include an input box 461, multiple AI editing controls, and a dialogue area 462. The multiple AI editing controls may include a passerby removal control 463, a one-click skin beautification control 464, and a smart removal control 465, etc. The functions of the multiple AI editing controls have been described above. Figure 3 The example is described below and will not be repeated here. The user message "thumbnail of image e" can be displayed in the dialog area 462.

[0149] After that, as Figure 6 As shown in (e) to (f), the user can use the intelligent voice assistant to remove pedestrians in image e to obtain image f. Figure 6 The processes shown in (e) to (f) are similar to Figure 5 The processes shown in (a) to (b) are similar; please refer to the above text for details. Figure 5 The relevant descriptions in the embodiments will not be repeated here.

[0150] The above text Figure 6 In the third method provided in this embodiment, the user can activate the intelligent voice assistant from any interface. The intelligent voice assistant serves as a centralized operation window, allowing users to easily add and process images using the provided controls. The process is simple and improves user efficiency.

[0151] The following is combined with Figure 7 The fourth method is illustrated by example:

[0152] The electronic device can display interface 51, which can be any interface. The user can wake up the intelligent voice assistant while the electronic device displays interface 51. After the intelligent voice assistant is woken up, the electronic device can display the input box 521 of the intelligent voice assistant. For example, such as... Figure 7 As shown in (a), the input box 521 can be displayed on the interface 51 in the form of a floating window or the like, and the interface 51 and the input box 521 can together constitute the interface 52. When the input box 521 is displayed on the interface 51, the input box 521 does not completely cover the interface 51.

[0153] The electronic device receives an operation applied to the input box 521 (such as a swipe-up operation starting from the input box 521), and responds to the operation as follows: Figure 7 As shown in (b), the electronic device can display an interface 53 for a smart voice assistant. Interface 53 can display an input box 531 and multiple options, including a YOYO Assistant option 532, recent options 533, and an AI agent option 534. The YOYO Assistant option 532 displays the dialogue page of the smart voice assistant. The recent options 533 display the AI ​​agents (artificial intelligence agents) recently used by the user. The AI ​​agent option 534 displays one or more AI agents that the user can use. An AI agent is an intelligent program with autonomous perception, decision-making, and execution capabilities, which can perform specific tasks through intent understanding, task decomposition, and resource scheduling.

[0154] Suppose the electronic device receives an operation applied to agent option 534, and in response to that operation, such as Figure 7 As shown in (c), the electronic device can display interface 54. Interface 54 can display multiple agent icons, which may include an icon 541 for an image editing agent, an icon 542 for a video editing agent, etc. The image editing agent is used to implement functions related to image editing. The video editing agent is used to implement functions related to video editing. The user can select the desired agent from the agents provided in interface 54. Optionally, as... Figure 7 As shown in (c), a search box 543 can also be displayed in the interface 54, through which the user can search for the desired intelligent agent.

[0155] Suppose the electronic device receives an operation on icon 541 applied to the image editing agent, and in response to that operation, such as Figure 7As shown in (d), the electronic device can display the interface 55 of the image editing intelligent agent. Interface 55 can be a chat window for an intelligent voice assistant, displaying an input box 551, multiple AI editing controls, and a dialogue area 552. These multiple AI editing controls may include a pedestrian removal control 553, a smart removal control 554, a one-click skin beautification control 555, a smart background removal control 556, and a photo ID generation control 557. The smart background removal control 555 is used to trigger the separation of the subject (such as a person, animal, or object) in the image. The photo ID generation control 557 is used to trigger the generation of a photo ID for the person in the image. The functions of the pedestrian removal control 553, the smart removal control 554, and the one-click skin beautification control 555 have been described above. Figure 3 The examples are illustrated below and will not be repeated here.

[0156] In this situation, if the user wants to perform image processing, they can operate the pedestrian removal control 553. The electronic device receives the operation applied to the pedestrian removal control 553 and responds to the operation as follows: Figure 7 As shown in (e), the electronic device can display the user message "Remove passersby," the intelligent voice assistant message "Please upload a picture containing people," a camera control 558, and an image control 559 in the dialogue area 552. The user can take a picture using the camera control 558 and process it, or select a local image using the image control 559 and process it. The following explanation uses the method of inputting an image to the intelligent voice assistant via the camera control 558 as an example. For the method of inputting an image to the intelligent voice assistant via the image control 559, please refer to the above text. Figure 6 The relevant descriptions in the embodiments will not be repeated here.

[0157] Assuming the electronic device receives an operation applied to the camera control 558, it responds to the operation as follows: Figure 7 As shown in (f), the electronic device can display the camera application interface 56. Interface 56 is a shooting interface, which may include a shooting preview window 561 and a shooting control 562. After the user determines that the shooting screen in the shooting preview window 561 meets their needs, they can operate the shooting control 562. Upon receiving the operation applied to the shooting control 562, the electronic device, in response to the operation, can take a picture, obtaining image g, and, as shown... Figure 7As shown in (g), the electronic device can display interface 57. Interface 57 can display image g, a return control 571, and a completion control 572. Upon receiving an operation on the completion control 572, the electronic device can perform pedestrian removal processing on image g in response to this operation. Optionally, during pedestrian removal processing on image g, the electronic device can display the user messages "thumbnail of image g" and "remove pedestrians" in the dialogue area 552 of interface 55, and no longer display the photo control 558 and image control 559. Optionally, the electronic device can also display the intelligent voice assistant message "Image generation in progress" in the dialogue area 552 to remind the user that pedestrians in image g are being removed.

[0158] Assuming that the electronic device obtains image h after performing pedestrian removal processing on image g, the electronic device can display a thumbnail of image h in the dialog area 552. For example, as... Figure 7 As shown in (h), after the electronic device completes the pedestrian removal process for image g, it may no longer display the intelligent voice assistant message "Image generation in progress," but instead display the intelligent voice assistant message "Completed, you can save directly or perform custom editing" and "Thumbnail of image h." Optionally, as... Figure 7 As shown in (h), the electronic device can display multiple controls simultaneously with a thumbnail of image h, such as a share control, a save control, a custom edit control, and an AI image editing control. The functions of these multiple controls have been described above. Figure 3 The examples are illustrated below and will not be repeated here. Users can manipulate image h using these controls.

[0159] The above text Figure 7 In the fourth approach provided in the embodiment, by offering different intelligent agents, users can select the required intelligent agent for corresponding professional processing according to their own needs. For example, users can use the image editing intelligent agent to concentrate on image processing and avoid being disturbed by other functions or applications.

[0160] One point to note is that the above text Figures 3 to 7 This embodiment uses the example of triggering pedestrian removal processing on an image via a pedestrian removal control provided by a smart voice assistant for illustrative purposes. In practical applications, other controls provided by the smart voice assistant, such as smart removal controls, one-click skin beautification controls, smart background removal controls, and ID photo generation controls, can also be used to trigger other image processing. This embodiment does not limit this approach. Furthermore, image processing can be triggered not only by controls provided by the smart voice assistant but also by entering user commands in the smart voice assistant's input box. For example, a user can enter the command "remove pedestrians" in the smart voice assistant's input box via voice or text to trigger pedestrian removal processing on the image.

[0161] Another point to note is that the above text Figures 3 to 7 This embodiment only uses the functions provided by the pedestrian removal control, intelligent removal control, one-click skin beautification control, intelligent background cutout control, and ID photo generation control as examples for illustrative purposes. In practical applications, intelligent voice assistants can also provide other image processing functions. For example, they can add special effects or borders to images; add specific elements to images; and provide some simple image editing functions, such as cropping, filters, mosaic, and background blurring.

[0162] The embodiments in this application are only as described above. Figures 3 to 7 The process described in the embodiment is used as an example to illustrate the process of triggering the image processing function of the intelligent voice assistant. Figures 3 to 7 The process described in the embodiments does not constitute a specific limitation on the implementation of the embodiments of this application. In practical applications, the image processing function of the intelligent voice assistant can also be triggered in other ways than the four methods described above, and the embodiments of this application do not limit this.

[0163] The aforementioned intelligent voice assistant messages can also be referred to as replies.

[0164] It should be noted that the embodiments in this application are only those described above. Figures 3 to 7 The process described in the embodiment is used as an example to illustrate the image editing process based on an intelligent voice assistant. Figures 3 to 7 The process described in the embodiments does not constitute a specific limitation on the implementation of the embodiments of this application. In practical applications, the image editing process based on the intelligent voice assistant can also be implemented in other ways different from the above methods.

[0165] The process described above, in which a user inputs their voice or command into a dialog box of an intelligent voice assistant and displays an AI-edited image and response through the dialog box, can be called a dialogue format.

[0166] In this application, multiple agents can be listed on YOYO. These agents, after successful registration, can interact with YOYO to handle user commands received by YOYO. When a user opens YOYO, the electronic device can display the YOYO interface, which may include multiple tabs, each allowing navigation to a corresponding tab page. For example, the YOYO interface may include three tabs: YOYO Assistant, Recent Tabs, and Agent Tab. When the user clicks the Agent Tab, the YOYO interface can display controls for the agents listed on YOYO.

[0167] Optionally, the controls for the listed smart agents can be displayed in the Smart Agents tab according to different categories. For example, when a user clicks the "Recent" control, the Smart Agents tab can display controls for recently used smart agents, such as: Magic Gallery control, Smart Photo Assistant control, Lifestyle Service Assistant control, Sports and Health Assistant control, Device Assistant control, News and Information Assistant control, Smart Office Assistant control, and AI Photo Editing Assistant control, for example. Figure 8 (a) For example, when a user clicks the "Recommended" control, the recommended popular intelligent agent controls can be displayed in the Intelligent Agent tab, such as: Smart Travel Assistant control, Smart Photo Assistant control, Magic Gallery control, and AI Photo Editing Assistant control, for example... Figure 8 Optionally, users can click the "Dialogue" control on different smart agent controls to enter the dialogue interface of the corresponding smart agent and interact through the dialogue interface. For example, when a user clicks the "Travel" control, smart agent controls related to travel can be displayed in the smart agent tab, such as the Smart Travel Assistant control; when a user clicks the "Sports" control, smart agent controls related to sports can be displayed in the smart agent tab, such as the Sports and Health Assistant control.

[0168] When a user wants to intelligently edit a photo, they can select a control from the image editing assistant, such as the "Magic Gallery" control. Once the user selects a control, the electronic device will display the corresponding dialog box. In this dialog box, the user can input commands to perform the corresponding processing, or select recommended function controls. For example, clicking the "Remove People" control will remove people from the photo, clicking the "One-Click Beautification" control will beautify the people in the photo, or clicking the "One-Click Moments" control will generate content for Moments (social media sharing).

[0169] When a user clicks the "One-Click Moments" control or enters the "Generate Moments" command in the corresponding dialog box of the image editing AI, YOYO can respond to the user's action and generate Moments content, such as filtering and organizing images and generating corresponding text. The organized images and text are then displayed in the dialog box for the user to view. Figure 8 Optionally, YOYO can also display the location where the photos were taken, such as the city name or attraction name, when showing Moments content in the dialog box. Afterwards, the user can enter a confirmation message such as "OK" in the dialog box, causing the electronic device to automatically display the Moments content in their Moments feed.

[0170] The previous section introduced a schematic diagram of the interface changes for intelligent image editing using an intelligent agent. Next, we will explain the specific implementation process of how the intelligent agent responds to user input commands.

[0171] The intelligent agent mentioned in this application embodiment is an AI Agent. Any intelligent agent needs to register on an electronic device, and a successfully registered intelligent agent can run under the scheduling of the intelligent agent management module. For ease of description, YOYO, a smart voice assistant, will be used as an example below. Figure 9 This application illustrates an example of an agent registration and deregistration process provided in an embodiment, including:

[0172] S901 and YOYO acquire the image and statement to be processed.

[0173] After opening YOYO, users can operate the YOYO interface, such as sending images and statements to be processed in the YOYO dialog box. The image to be processed is the image the user wants to edit. Optionally, users can click "Add Control" in the YOYO interface to select an image from their gallery and send it to the YOYO dialog box. Alternatively, YOYO can receive images sent (or shared) by other applications. Users can also click "Add Control" in the YOYO interface and then select the "Capture Control" to capture an image on-site. This application does not limit the source of the image to be processed.

[0174] The aforementioned statements can be voice input by the user, text input by the user manually using the keyboard, text converted from voice input, or pre-recorded audio or text selected by the user from other files by clicking the "Add Control" button. This application does not limit the method or type of statements input by the user.

[0175] If YOYO receives a speech, it can convert the speech into text and then send it to the speech engine. If YOYO receives a text, it can send the text directly to the speech engine, or perform preliminary processing, such as deleting invalid or duplicate characters, before sending it to the speech engine. Optionally, the speech can be a single sentence received at once, or multiple sentences received within a certain time period.

[0176] Optionally, the user can send the image to be processed first in the YOYO dialog box, and then enter a statement and send it; alternatively, the user can also enter a statement first and send it, and then send the image to be processed. This application embodiment does not limit the order in which the image to be processed and the statement are sent. When the electronic device receives the image to be processed and the statement through YOYO within a certain time period, it can determine that the semantics expressed by the statement represent a processing intention for the image to be processed. If the time interval between receiving the image to be processed and the statement is relatively long, it indicates that the semantics expressed by the user's input statement may not represent a processing intention for the image to be processed, and therefore no processing is required, or the system can wait for the next statement or image to be sent.

[0177] For example, after receiving the image and statement to be processed, YOYO can, as follows: Figure 10 As shown in (a), the image to be processed (e.g., picture 1) and the statement (e.g., eliminate passersby) are displayed in the dialog box. Figure 10 Example (a) is given in text form using statements.

[0178] S902 and YOYO send the images and statements to be processed to the agent management module.

[0179] After receiving the image and statement to be processed, S903 and YOYO can send the statement to the voice cloud.

[0180] S904, the voice cloud recognizes the sentences input by the user and obtains the identifier of the intelligent agent corresponding to the sentences.

[0181] Optionally, the voice cloud is a cloud-side server deployed with a large language model, capable of recognizing the semantics of natural language, thereby identifying the intent expressed by the user's statements.

[0182] Specifically, after receiving a user's input, the voice cloud can use an intent recognition model to identify the intent expressed in the statement. Optionally, the user's statement can express one or more intents. Then, the voice cloud determines which agent can execute these intents based on the identified intents, thereby obtaining the corresponding agent's identifier. Accordingly, the number of agents used may be one or more.

[0183] S905, the voice cloud sends the identifier of the agent corresponding to the statement to YOYO.

[0184] S906 and YOYO send the agent's identifier to the agent management module.

[0185] S907. The agent management module sends a query request to the long-term memory module based on the received agent's identifier to check whether the agent exists in the memory module.

[0186] It should be noted that the long-term memory module can store various agents and their corresponding parameters. Optionally, the long-term memory module can also record the agent's running state as running, sleeping, or idle, and record the corresponding time. Specifically, when an agent is processing a task, the agent management module can update the agent's running state in the long-term memory module to running. This running state is transient and short-lived. When the agent finishes processing the task, the agent management module can update the agent's running state in the long-term memory module to idle. If the agent is not used for a period of time, the agent management module can update the agent's running state in the long-term memory module to sleeping.

[0187] Optionally, the long-term memory module can also count the number of registered and unregistered agents, and can also collect operational information such as registration time, running time, recent running time, running duration, unregistration time, and number of runs for each agent, thereby realizing agent lifecycle management. Optionally, the agent management module can also report the collected agent operational information (or agent parameters) to the cloud-based big data platform at fixed intervals or during idle periods. The cloud-based big data platform then evaluates the activity level of each agent based on the reported operational information, thereby specifying corresponding push strategies to improve user satisfaction.

[0188] For example, after agent A successfully registers, the long-term memory module can store agent A and record the registration time; the long-term memory module can also store agent A's identity document (ID), name, and interface function, and can also record that the registered status of the stored agent A is "registered".

[0189] S908A. If the agent exists in the long-term memory module, the long-term memory module returns the existing message to the agent management module.

[0190] After receiving an existing message, the agent management module can directly execute the S910 and subsequent task processing flow, which will not be elaborated here.

[0191] Optionally, when the agent management module receives a message from the long-term memory module indicating that the agent already exists, it determines that the agent has already been successfully registered and does not need to be registered again.

[0192] S908B: If the agent is not stored in the memory module, the long-term memory module returns a message indicating that the agent does not exist to the agent management module.

[0193] S909. Upon receiving a message that an agent does not exist, the agent management module creates the agent.

[0194] Specifically, when an agent is created, the agent management module obtains the agent's identifier, name, and interface functions, and saves the agent and related parameters in the long-term memory module. Simultaneously, the agent management module updates the long-term memory module to show the agent's registered state and records the registration time.

[0195] If the intelligent agent is successfully created, the S910 and subsequent task processing flow can be executed directly, which will not be elaborated here.

[0196] It should be noted that an intelligent agent can contain one or more execution units. Each execution unit can invoke a corresponding processing tool to perform a task. For example, if an image editing intelligent agent contains a dialogue removal module as its execution unit, then the image editing intelligent agent can invoke the dialogue removal module to remove dialogue from the image.

[0197] If the image editing agent also includes other execution units, such as a skin-beautifying tool, then the image editing agent can call the skin-beautifying tool to beautify the people in the image.

[0198] Optionally, if the brain also includes other intelligent agents, and these other intelligent agents include other execution units, such as filter tools, then this intelligent agent can call the filter tools to add filters to the image.

[0199] It should be noted that once an agent is successfully registered, the execution units contained within that agent are also successfully registered and can be invoked to perform corresponding operations. When a single agent contains multiple execution units, then after the agent is successfully registered, all of its execution units are also successfully registered and can be invoked separately to execute multiple tasks.

[0200] S910. Call the execution unit in the intelligent agent to execute the tasks in the task list.

[0201] The voice cloud can also use a task parsing model to analyze user input (or the intent identified from the input) to break it down into one or more corresponding tasks. These tasks are then orchestrated to generate a task list. The voice cloud can then distribute this task list to electronic devices.

[0202] Optionally, each task in the task list is the smallest unit of task, also known as a subtask. A subtask is a unit of task that can be executed by calling only one processing tool.

[0203] Once the agent is successfully registered, it can invoke the execution unit to perform various tasks from the task list on the image to be processed. For a detailed explanation of how to obtain the task list and invoke the agent's execution unit to perform the tasks, please refer to the relevant descriptions later; they will not be elaborated upon here.

[0204] During task execution, the agent's state in the long-term memory module is updated to "running." After task completion, the agent's state in the long-term memory module is updated from "running" to "idle." When the agent's state changes, the long-term memory module records the time of entering each different state.

[0205] S911. If the agent management module fails to create an agent, it returns an error message to YOYO.

[0206] If the agent lacks proper permissions, such as not being listed on YOYO, the agent management module cannot create the agent correctly, resulting in a failure during agent creation. Similarly, if the electronic device's hardware specifications do not support the agent, agent creation will also fail. In such cases, the agent management module can halt the registration process and return an error message to YOYO. YOYO can then display the corresponding error message in a dialog box to inform the user of the agent registration failure and the reason for the failure.

[0207] Optionally, the agent management module can also record information such as the agent's identifier, the time and number of times the creation failed, and the reason for the failure in the long-term memory module if the creation of an agent fails.

[0208] S912, the agent management module refreshes the agent's status and reports the agent's parameters.

[0209] The agent management module can also refresh the agent's state promptly when it changes and store it in the long-term memory module. Then, at regular intervals, the agent management module can report various relevant parameters of the agent, such as registration time, runtime, and number of calls, to the cloud-based data platform.

[0210] Optionally, the above-mentioned triggering of agent registration can be based on a user-input statement. For example, if the semantics contained in the user-input statement require the agent to be called for processing, and this is the first time the agent is called, then the agent registration process is triggered. Alternatively, it can be triggered when the agent needs to be called for the first time under other conditions. This application embodiment does not limit this.

[0211] In some cases, such as when an agent is used too infrequently, needs to be removed from YOYO, or requires deleting an older version of an agent before upgrading to a new version, you can also unregister an existing agent. After unregistration, the agent can no longer be used. For details, please refer to [link to documentation / reference]. Figure 11 As shown, it includes:

[0212] S1101, the intelligent agent management module sends a query command to the long-term memory module.

[0213] Optionally, when the agent management module receives a message from the cloud server to delete (or remove) an agent, it can initiate a registration process. The message from the cloud server can include information identifying the agent, such as its identifier and name.

[0214] Specifically, the agent management module sends a query command to the long-term memory module. This query command can carry information indicating the agent's identity, such as the agent's identifier and name. This query command is used to check whether the agent exists in the long-term memory module based on its identifier and other information.

[0215] S1102. The long-term memory module queries whether the agent exists.

[0216] The long-term memory module can then query whether the agent exists, following a query command.

[0217] S1103A. If the long-term memory module contains the agent, the long-term memory module returns the existing information to the agent management module.

[0218] S1104. The agent management module responds to existing information and deletes the corresponding agent based on the agent's identifier.

[0219] Specifically, the agent management module responds to existing information by deleting the agent indicated by its identifier, thus deregistering the agent. After deleting the agent, the electronic device can release the corresponding storage space.

[0220] S1105. The agent management module updates the status of deleted agents to "deregistered" and records the deregistration time.

[0221] After an agent is deleted, the agent management module updates the state of the deleted agent in the long-term memory module to the deregistered state and records the deregistration time. Once an agent is deleted (deregistered), it cannot run and therefore cannot perform the corresponding tasks.

[0222] It should be noted that when an agent registers, the execution units contained within that agent are also unregistered, and these execution units will be unable to be invoked to execute the corresponding tasks.

[0223] S1103B. If the long-term memory module does not contain the agent, the long-term memory module will return the non-existence information to the agent management module.

[0224] S1106. The agent management module stops the registration process in response to the non-existent information.

[0225] If the agent does not exist in the long-term memory module, the agent management module does not need to delete the agent, and therefore can stop the registration process.

[0226] S1107. The agent management module refreshes the status of the agent and reports the parameters of the agent.

[0227] The agent management module can also refresh the agent's state in a timely manner when the agent's state changes and store the state in the long-term memory module. Then, the agent management module can report various relevant parameters of the agent, such as registration time, runtime, and number of calls, to the cloud-based data platform at regular intervals or during idle periods.

[0228] It should be noted that when a user's statement expresses multiple intentions and requires the invocation of multiple agents for processing, or when the user inputs different statements multiple times, each requiring different agents to perform corresponding tasks, the above procedure can be followed. Figure 9 The illustrated process executes the registration process for multiple agents one by one. It should be noted that when multiple agents register, asynchronous registration can be used, where each agent's registration does not depend on the registration results of other agents. For details, please refer to [link to documentation / reference]. Figure 12 As shown, it includes:

[0229] S1201, YOYO obtains the image to be processed and the statements "Help me remove passersby", "Help me beautify the skin", "Help me add a retro filter".

[0230] S1202 and YOYO send "Help me eliminate passersby", "Help me beautify my skin", and "Help me add a retro filter" to the intelligent agent management module one by one.

[0231] S1203 and YOYO sent the phrases "Help me eliminate passersby", "Help me beautify my skin", and "Help me add a retro filter" to the voice cloud one by one.

[0232] S1204 and the voice cloud recognize the user's input of "help me remove passersby", "help me beautify my skin", and "help me add a retro filter", and obtain the three intentions of removing passersby, beautifying skin and adding filter, as well as the identifiers of the three intelligent agents corresponding to these three intentions.

[0233] S1205, Voice Cloud sends the three intentions of removing passersby, beautifying skin, and applying filters, along with the identifiers of the corresponding beautifying skin intelligent agent, passerby removal intelligent agent, and filter intelligent agent, to the intelligent agent management module one by one.

[0234] S1206, the intelligent agent management module registers the skin beautification intelligent agent, the passerby removal intelligent agent, and the filter intelligent agent one by one.

[0235] For details on how the agent management module registers each agent, please refer to [link / reference]. Figure 9 Description of the embodiments.

[0236] S1207, the Smart Agent Management Module refreshes the long-term memory module, and the status of the Skin Beautification Smart Agent, Passerby Elimination Smart Agent, and Filter Smart Agent is now registered.

[0237] S1208, the agent management module reports the agent status and parameters.

[0238] Once the agent is successfully registered, it can be invoked by the agent management module to execute tasks.

[0239] Specifically, when the agent management module registers multiple different agents, it can also adopt [a specific approach] for each agent. Figure 11 Registration is performed in the manner described in the implementation example. The registration process of each agent does not depend on the registration results of other agents.

[0240] This section uses an image editing agent as an example to introduce the framework of the client-side agent, including: an agent management module, at least one agent, a task orchestration interface, a response interface, and a long-term memory module. Each agent includes a task engine and at least one execution unit. The execution unit can also be called an executor.

[0241] Optionally, the intelligent agent execution framework may also include a perception module interface. This interface is used to acquire information perceived by the perception module. The perception module can perceive the external environment, such as the geographical location of the electronic device, and can also perceive dates, such as specific holidays, and conditions such as receiving information from a specific application or receiving preset content from the electronic device.

[0242] Next, combine Figure 13 The software architecture flowchart shown illustrates the implementation process of an image editing agent processing images.

[0243] The electronic device's application layer includes YOYO and a gallery. Agents are also set up at the application framework layer; this example uses an image editing agent. Optionally, other agents may also exist. For details on the architecture and interaction methods of other agents, please refer to the implementation principles of the image editing agent in this document; they will not be elaborated upon here.

[0244] First combine Figure 13 This paper outlines the process of intelligent image removal based on dialogue. After receiving the image to be processed and the user's input, YOYO interacts with the voice cloud through its voice engine to perform intent recognition, obtaining the intent and the corresponding agent's identifier. YOYO then sends the intent and agent's identifier returned by the voice cloud to the agent management module, which distributes different intents to different agents according to their identifiers. Alternatively, the agent management module can also distribute the statement and agent's identifier to different agents.

[0245] Taking intent distribution as an example, the agent management module sends intents from everyone except Zhang San to the image editing agent. YOYO also sends the image to be processed to the image editing agent through the agent management module. The image editing agent uses its own task engine to send the intent to the cloud-side server (such as the server deployed by the task decomposition model) for task decomposition, obtaining the corresponding task list. Figure 13 The task decomposition model is deployed on a voice cloud as an example. In actual implementation, the task decomposition model can also be deployed on another server. The voice cloud sends the intent obtained from the recognized speech to the cloud-side server where the task decomposition model is deployed for task decomposition, obtaining a task list, which is then distributed to the electronic device. The image editing agent, after obtaining the task list, can call the corresponding processing tool according to the processing tool corresponding to the task in the task list for processing. For a detailed description of task decomposition, task orchestration, and task list, please refer to the embodiments below, which will not be repeated here.

[0246] Optionally, the image editing smart body also includes a perception module interface for interacting with the perception module. The smart agent management module can subscribe to messages from the perception module interface to obtain external conditions perceived by the perception module. Based on the perceived conditions, the smart agent management module can then trigger or stop task execution.

[0247] When the task list includes elimination tasks, the task engine can call the dialogue elimination module to eliminate passersby. If the user's input contains pronouns, the task engine can first call the person relationship clarification unit to clarify the person indicated by the pronoun, thus obtaining the target person the user wants to indicate. Then, the task engine calls other execution units to perform corresponding processing for the clarified target person. Details will not be elaborated here.

[0248] The aforementioned dialogue elimination module can be an execution unit capable of invoking elimination tools. For example, when an image editing agent invokes the dialogue elimination module, it can send the elimination task to the visual platform via the visual SDK, and then use the elimination model on the visual cloud to perform intelligent elimination and obtain the eliminated image. The image editing agent can also return the eliminated image to YOYO via the agent management module for display to the user.

[0249] The image editing agent can also receive the elimination results returned by the visual cloud, such as whether the elimination was successful or failed. It then interacts with the voice cloud through the response interface to obtain the generated response, and finally returns the response to YOYO through the agent management module to be displayed to the user.

[0250] In addition, when YOYO sends the image to be processed to the cloud server, it can send it directly to the corresponding cloud server, such as to the voice cloud; or it can send it to the storage cloud, namely the Object Storage Service (OBS) cloud. The storage cloud can store a large amount of data, which is used to provide data to other cloud servers and edge devices. Therefore, the voice cloud and vision cloud can read the image to be processed through the URL of the image stored on the storage cloud, without having to retrieve the image from the edge every time, thus saving network traffic.

[0251] In the preceding text, the overall process of how an intelligent agent performs image editing was explained in conjunction with the software architecture. Next, the process of obtaining a task list through task parsing in the embodiments of this application will be described in detail.

[0252] This section uses the task parsing process on a cloud-based server as an example for illustration. Figure 14 include:

[0253] S1401, Obtain the statement input by the user.

[0254] The cloud-based server can upload user-inputted statements via YOYO.

[0255] S1402. Perform intent recognition on the statement to obtain at least one intent.

[0256] The cloud-based server can invoke the intent recognition model to identify the intent expressed by the statement. It should be noted that the identified intent here can be a single intent or multiple intents.

[0257] S1403. Decompose at least one intention into at least one subtask.

[0258] The cloud server can break down each intent into tasks, resulting in subtasks corresponding to each intent.

[0259] Optionally, different intents can be parsed using different task decomposition models. For example, a cloud server can deploy multiple different task decomposition models, each specifically identifying the task corresponding to a particular intent. For instance, the elimination intent corresponds to the elimination task decomposition model, and the filter intent corresponds to the filter task decomposition model.

[0260] The cloud-based server can input different intents into their respective task decomposition models to decompose the tasks and obtain at least one subtask corresponding to each intent.

[0261] After the cloud server breaks down all intents into tasks, it obtains an original task set consisting of at least one subtask. This original task set may contain duplicate tasks. For example, if a user's intent includes both skincare and acne treatment, the corresponding subtasks are both skincare tasks. In this case, the cloud server can delete the duplicate subtasks, i.e., perform task deduplication, retaining only one. The deduplicated task set may contain one or more subtasks.

[0262] It should be noted that the execution units on the electronic device side include, but are not limited to: tools for removing passersby (i.e., dialogue removal modules), skin smoothing tools, tools for fixing closed eyes, tools for fixing facial expressions, tools for adjusting contrast, tools for adding filters, tools for adding text, and tools for cropping. Each subtask decomposed using the task decomposition model corresponds to an execution unit on the device side. Accordingly, the decomposed subtasks may include, but are not limited to: removing passersby, skin smoothing, fixing closed eyes, fixing facial expressions, increasing contrast, adding filters, adding text, and cropping according to proportions.

[0263] Optionally, each of the above subtasks can be described using DSL statements. At least one subtask obtained in this step can be represented as at least one DSL statement, i.e., a task description statement. Optionally, this at least one task description statement can also be called a task list.

[0264] S1404. Form a task chain based on at least one subtask.

[0265] Depending on the user's input, the generated task chain can be divided into single-task chain and multi-task chain.

[0266] When the number of subtasks in the deduplicated task set is only one, that is, there is only one task description statement, the generated task chain has only one subtask, and the task chain is a single task chain.

[0267] Each task chain contains a single subtask. This subtask corresponds to an execution unit. The task engine can execute the subtask by invoking the corresponding execution unit.

[0268] For example:

[0269] DSL1: "Please Photoshop out my sister in the background."

[0270]

[0271] When a user inputs the statement "Please remove my sister from the background", the resulting task description statement DSL1 has a subtask ID of 1; the invoked execution unit is image_eraser; and the parameters include: the target to be removed is: my sister. This DSL statement means: Invoke the execution unit "image_eraser" to remove the character "my sister".

[0272] For example:

[0273] DSL2: "Could you please remove the image of the passerby next to my parents?"

[0274]

[0275] When a user enters the statement, "Can you help remove the passerby next to my parents?", the resulting task description statement DSL1 has a subtask ID of 1; the invoked execution unit is "image_eraser"; and the parameters include: the target to be removed is "passerby," and the target to be retained is "parents." This DSL statement means: Invoke the execution unit "image_eraser" to remove "passerby" and retain "parents."

[0276] For example:

[0277] DSL3: "Could you please Photoshop the guy next to me out?"

[0278]

[0279] When a user inputs the statement, "Can you help me remove the man next to me?", the resulting task description statement DSL1 has a subtask ID of 1; the invoked execution unit is "image_eraser"; and the parameters include: the target to be removed is the man next to me, and the target to be retained is me. This DSL statement means: Invoke the execution unit "image_eraser" to remove "the man next to me" and retain "me".

[0280] When the deduplicated task set contains multiple subtasks (i.e., multiple task description statements), the resulting task chain contains multiple subtasks; this task chain is called a multi-task chain. In a multi-task chain, different subtasks can correspond to different execution units. The task engine can execute these multiple subtasks by calling the execution units corresponding to each subtask.

[0281] Specifically, there are three forms of multi-task chains: serial task chains, parallel task chains, and hybrid task chains that combine serial and parallel approaches.

[0282] For example, when generating a task chain, the processing region corresponding to each subtask in the image to be processed is first divided into multiple parallel task sets. For instance, the processing region corresponding to subtasks A and B in the image to be processed is region 1; while the processing region corresponding to subtasks C and D in the image to be processed is region 2, and regions 1 and 2 do not overlap. Therefore, subtasks A and B can be divided into task set 1, and subtasks C and D into task set 2. The tasks in task set 1 and task set 2 are two parallel task chains. Furthermore, for each task set, the execution order of the subtasks is sequential, and the order can be arranged according to the processing order to obtain the corresponding task chains. For example, for task set 1, if task A is executed before task B, then the corresponding task chain 1 is AB; for task set 2, if task D is executed before task C, then the corresponding task chain 2 is DC. Furthermore, task chain 1 and task chain 2 are parallel task chains. Task chain 1 and task chain 2 constitute a hybrid task chain.

[0283] Optionally, the execution order between subtasks can also be based on semantics. For example, if the user input statement contains the semantics of doing A first and then B, the generated subtasks can be ordered according to the order expressed by the semantics. If the semantics of the user input statement do not limit the execution order, it can be determined based on the accuracy of the execution.

[0284] In a DSL statement, each subtask carries a dependency tag, including dependent and non-dependent (or independent or non-independent). The cloud server can assemble a task chain based on the dependency tags and priority numbers of each subtask.

[0285] In some cases, within a DSL statement, subtasks with dependency tags can be tasks within a sequential task chain. Each statement contains subtasks whose priority numbers indicate their position in the sequential task chain. For example, the subtask with priority number 0 is the first subtask, the subtask with priority number 1 is the second subtask, and the subtask with the highest priority number is the last subtask. Specifically, the first subtask has a dependency relationship with the second subtask following it (i.e., the first subtask depends only on the subsequent task tag); the last subtask has a dependency relationship with the second-to-last subtask preceding it (i.e., the last subtask depends only on the preceding task tag); and intermediate subtasks (not the first or last) have dependencies on both the preceding and following subtasks (i.e., they depend on both the preceding and following task tags).

[0286] For example, for a set of subtasks containing taskID1, taskID2, and taskID3, with priority numbers of 0, 2, and 1 respectively, the execution order of these three subtasks is taskID1, taskID3, and taskID2.

[0287] In some cases, within a DSL statement, multiple subtasks with non-dependency tags can be tasks within a parallel task chain. In a parallel task chain, each subtask can have the same priority index, such as 0. For example, a set of subtasks containing taskID1, taskID2, and taskID3, with priority indices of 0, 0, and 0 respectively, are parallel subtasks. They do not need to be executed in order; they can be executed separately, and the results can then be merged.

[0288] In DSL statements, dependencies exist where some subtasks are not tagged with dependencies and others are tagged with dependencies. These can be tasks within a hybrid task chain. For details on multiple dependent subtasks in a hybrid task chain, refer to the previous description of serial subtask chains. If multiple sets of subtasks exist, multiple serial subtask chains can be generated. Different serial subtask chains are parallel; since these chains do not have dependencies, they can be executed in parallel, and the results of each chain are then combined to obtain the final result.

[0289] First, let's introduce serial task chains: In a serial task chain, multiple subtasks have a strict sequential relationship and must be executed in order to accurately process the image. It's important to note that during the assembly of the task chain, if the processing areas of the various subtasks in the image overlap, the execution order of the subtasks affects the final result, or a subtask depends on the processing results of other subtasks, then these subtasks can be determined as serially executed subtasks. Dependencies can be set for these subtasks, and they can be assigned priority numbers according to their execution order, thus generating a serial task chain.

[0290] Alternatively, subtasks may exist in a specific order based on their respective attributes. For example, removing the person may occur before the skin-beautifying task, applying filters may occur after the skin-beautifying task, generating ID photos may occur after the removal task, and cropping may occur before generating ID photos, and so on.

[0291] Optionally, in a serial task chain, the execution order of each subtask can be determined by the priority between the subtasks. For example, if the "closed-eye repair" task and the "skin beautification" task are subtasks that target the same facial area of ​​a person, then the "closed-eye repair" task and the "skin beautification" task are subtasks that are executed serially. When sorting, the "closed-eye repair" task can be executed first, followed by the "skin beautification" task; or the "skin beautification" task can be executed first, followed by the "closed-eye repair" task, but the two cannot be performed simultaneously.

[0292] For example, if the processing areas of the pedestrian removal task and the ID photo generation task overlap in the image to be processed, then the pedestrian removal task and the ID photo generation task are subtasks executed sequentially. When sorting subtasks, if a subtask depends on the processing results of other subtasks, then the order of that subtask is after the other subtasks. For example, if the ID photo generation task can only be generated after pedestrian removal, then the priority order of the ID photo generation task is after the pedestrian removal task.

[0293] For details, please refer to the relevant description of DSL4.

[0294] For example:

[0295] DSL4: "Please Photoshop out the passerby wearing a red hat in the photo and add a summer filter."

[0296]

[0297] When a user inputs the statement, "Remove the person wearing a red hat from the photo and add a summer filter," the resulting task description statement DSL4 contains two subtasks: taskID:1 and taskID:2. The prototype type of taskID:1 and taskID:2 is "dependent," indicating that they are sequential subtasks, forming a sequential task chain. The priority of taskID:1 is 0, and the priority of taskID:2 is 1, meaning taskID:1 executes before taskID:2. The execution unit called by taskID:1 is `image_eraser`, and its parameters include: the target to be removed is the person wearing a red hat. The execution unit called by taskID:2 is `add_filter`, and its parameters include: the filter to be added is "Summer." This DSL4 statement means: first, the execution unit "image_eraser" is called to remove the person wearing a red hat, and then the "Summer" filter is added. Here, taskID:1 corresponds to subtask A, and taskID:2 corresponds to subtask B. Optionally, the task chain formed by taskID:1 and taskID:2 can be represented as: AB.

[0298] Next, we will introduce parallel task chains. When multiple subtasks in the task list do not have a sequential relationship and do not need to be executed in order, the generated task chain is a parallel task chain. Please refer to the relevant description in DSL5 for details. It should be noted that during the generation of the task chain, if the processing regions corresponding to the various subtasks in the image to be processed do not overlap, or if the execution order of the subtasks does not affect the final result, then these subtasks can be determined as parallel execution subtasks, and these subtasks can be used to generate a parallel task chain.

[0299] Optionally, the execution order of the subtasks in a parallel task chain is not limited. For example, if the order in which the trimming task and the filtering task are executed does not affect the result, then the trimming task and the filtering task are subtasks executed in parallel.

[0300] For details, please refer to the relevant description of DSL5.

[0301] For example:

[0302] DSL5: "Crop this photo to a 1:1 scale, center the subject, and add a summer filter."

[0303]

[0304] When a user inputs the statement: "Crop this photo to a 1:1 ratio, center the portrait, and add a summer filter," the resulting task description statement DSL5 contains two subtasks: taskID:1 and taskID:2. The prototype type of taskID:1 and taskID:2 is "independent," indicating that they are parallel subtasks, forming a parallel task chain. The priority of both taskID:1 and taskID:2 is 0, meaning they do not need to be executed sequentially. The execution unit called by taskID:1 is `crop_image`; its parameters include centering the portrait (`portait_center`) and a crop ratio (`crop_proportion`) of 1:1. The execution unit called by taskID:2 is `add_filter`; its parameters include adding the filter "Summer." The DSL5 statement means: first, call the execution unit "crop_image" to crop a centered portrait at a 1:1 ratio, and then add the "Summer" filter. Here, taskID:1 corresponds to subtask A, and taskID:2 corresponds to subtask B. Optionally, the task chain formed by taskID:1 and taskID:2 can be represented as: A|B.

[0305] During the execution of a parallel task chain, if an execution unit fails to execute its corresponding subtask, the task engine can receive the failure reason returned by the execution unit. Optionally, the failure reason type can be any one or more of the following: irreversible error type, correctable error type, and retry after updating conditions type. For example, if the task engine cannot find the corresponding task chain and cannot execute it, it can return an irreversible error type; as another example, if the task execution times out, such as when the task execution result is not obtained within a preset time period, it can return a correctable error type and then retry the task execution; as yet another example, if the condition corresponding to the task is incorrect, for example, the condition is Friday, April 20th, but the actual April 20th is a Thursday instead of a Friday, it can return a retry after updating conditions type, allowing the user to execute it again after modifying the date.

[0306] If all execution units corresponding to subtasks in the parallel task chain have successfully completed their respective subtasks, the task engine can instruct the outputs of the parallel subtasks to be merged to produce the final result.

[0307] Next, we will introduce hybrid task chains that combine serial and parallel processing. In a hybrid task list, there are multiple subtasks. Some of these subtasks have a sequential relationship and must be executed strictly in that order, while others do not have a sequential relationship and do not need to be executed in that order. For details, please refer to the relevant description in DSL6.

[0308] For example:

[0309] DSL6: "Execute ABCDE"

[0310]

[0311]

[0312] In this implementation, ABCDE indicates that the tasks parsed from the statement include task A, task B, task C, task D, and task E.

[0313] When the user inputs the statement "Execute ABCDE", the resulting task description statement DSL6 shows that subtasks D and E form a sequential task chain 1, where subtask D executes before subtask E. Subtasks A, B, and C form a sequential task chain 2, where subtask A executes before subtask B, and subtask B executes before subtask C. Task chains 1 and 2 can be executed in parallel. Optionally, a task chain (hybrid task chain) consisting of tasks A, B, C, D, and E can be represented as: DE|ABC.

[0314] The above Figure 14 The illustrated embodiment uses a cloud-side server as the execution entity to generate a task list. The cloud server can distribute the generated task chain to the edge, for example, through a task orchestration interface to the task engine of the image editing agent. The task engine then assembles the task chain and calls the execution unit to execute the sub-tasks in the task chain.

[0315] In some cases, when the intent recognition model and task decomposition model are deployed on the edge electronic device, the edge electronic device can also generate the task list and assemble it into a task chain. The specific principles and implementation effects will not be elaborated here.

[0316] In some cases, a combination of edge and cloud approaches can be used to generate task lists. For example, the cloud server uses an intent recognition model and a task decomposition model to initially decompose the task into a set of multiple sub-tasks. Then, the original task set is sent to the edge, where the electronic device calls the task engine to generate corresponding task chains for the sub-tasks in the original task set.

[0317] S1105. Call the execution unit corresponding to each subtask, process the subtasks in the task chain, and obtain the processing result.

[0318] The task chain described above includes the dependencies and priority order between the subtasks. The task engine can asynchronously call the corresponding execution units for parallel subtasks and sequentially call the corresponding execution units for serial subtasks.

[0319] For example, if the task chain includes DE|ABC, the task engine can call the execution unit D' corresponding to task D to execute task D in parallel, and call the execution unit A' corresponding to task A to execute task A. After execution unit D' completes executing task D, the task engine can call the execution unit E' corresponding to task E to execute task E. After execution unit A' completes executing task A, the task engine can call the execution unit B' corresponding to task B to execute task B, and then call the execution unit C' corresponding to task C to execute task C.

[0320] It should be noted that in the task description statements above, each subtask has a corresponding tool name, such as `tool` corresponding to tools like `crop_image` and `add_filter`. The task engine then calls the corresponding execution unit to execute the subtask based on the tool name indicated by `tool`.

[0321] Optionally, during the execution of the task chain, if a subtask fails, the corresponding execution unit can return a failure message to the task engine; it can also return the reason for the failure. Optionally, during the execution of a serial task chain, if the execution order causes errors in the processing result—for example, the processed image is not the image the user wants, or the result of the previous subtask cannot be processed correctly when passed to the execution unit of the next subtask—the task engine can report order adjustment information to the cloud server. The cloud server can then adjust the task decomposition model based on the order adjustment information, thereby adjusting the priority order of the subtasks.

[0322] Optionally, during the execution of the task chain, if the split subtasks cannot be processed by a single execution unit, it indicates that the granularity of the subtask splitting is unreasonable, and the subtasks in the task chain cannot be executed completely. The task engine can then report granularity adjustment information to the cloud server. The cloud server can then adjust the task decomposition model based on the granularity adjustment information, thereby adjusting the degree of subtask splitting.

[0323] Optionally, the task engine can also report log information during the execution of subtasks to the cloud server, which will then analyze the reasons for failure and adjust the task decomposition model accordingly.

[0324] In some cases, the user's input statement also includes triggering conditions. The perception module interface can then detect these triggering conditions and report them to the agent management module. When the triggering conditions are met, the agent management module triggers the task engine to execute sub-tasks in the task chain. Optionally, the triggering condition can be a specified location, a specific date, a message received from a specified application, a message with specified content, a message sent by a specified contact, or a message with specified content sent by a specified contact. This embodiment of the application does not limit these possibilities.

[0325] In some implementations, the user-input statement contains condition 'a', and the task chain can only be executed when condition 'a' is met. Taking a serial task chain AB as an example, the task chain can be represented as: [a]AB.

[0326] For example, if a user inputs, "Tomorrow I want to take a series of landscape photos, remove the passersby from the pictures, and add a summer-style filter," semantic recognition will show that the trigger condition in the statement is "tomorrow." For example, if today's date is January 1st, then tomorrow is January 2nd. The perception module then detects the time and reports it to the agent management module through its interface. When the perception module detects January 2nd, the agent management module instructs the task engine to call the passerby removal execution unit and filter tools to process the photos taken on that day, removing the passersby and adding a summer-style filter, resulting in the processed photos. Optionally, after processing, the information can be fed back to YOYO through the agent management module, and YOYO will display it to the user. At this point, the user can enter "OK" or similar confirmation in YOYO's dialog box, instructing the image editing agent to save the processed photos, thus making the above processing effective. If the user enters "re-eliminate" or "no" or other negative information in YOYO's dialog box, instructing the image editing agent to discard the processed photo, thus rendering the above processing invalid.

[0327] In some implementations, the user-input statement contains triggering conditions, such as condition a and condition b, and the serial task chain ABCD can only be executed if both conditions a and b are met simultaneously. In this case, the task chain can be represented as: [a&b]ABCD.

[0328] For example, if a user inputs the statement, "Tomorrow I'm going to location X to take some landscape photos. Please remove the passersby from the photos and add a summer-style filter," semantic recognition will show that the triggering conditions in the statement are: the date is tomorrow and the shooting location is location X. For example, if today's date is January 1st, then tomorrow is January 2nd. The perception module then senses the time and geographical location and reports this information to the agent management module through its interface. When the perception module detects that there are photos taken at location X on January 2nd on the electronic device, the agent management module instructs the task engine to call the passerby removal execution unit and filter tool to process these photos, removing the passersby and adding a summer-style filter, resulting in the processed photos. Optionally, after processing, the user can confirm the effect of the above-mentioned operation, which will not be elaborated here.

[0329] In some implementations, the user-input statement contains triggering conditions, such as condition a and condition b, and the serial task chain ABCD can be executed if either condition a or condition b is satisfied. The task chain can then be represented as:

[0330] [a|b]ABCD.

[0331] For example, if a user inputs the statement: "At the end of each year, or when I am in city Y, find photos of me at location Z and delete the passersby from my selfies," semantic recognition reveals that the triggering conditions are: the end of each year or being within the geofence of city Y. The perception module then senses the time and location and reports this to the agent management module via its interface. When the perception module detects the period from December 1st to December 31st, or when it detects that the electronic device has entered the geofence of city Y, the agent management module instructs the task engine to process the photos containing the user's selfies taken at location Z using the passerby removal execution unit and filter tools, removing the passersby from these selfies and obtaining the processed photos. Optionally, after processing, the user can confirm the effect of the above-mentioned operation, which will not be elaborated here.

[0332] It should be noted that in a task chain, parentheses “()” indicate a set relationship, where a subtask within a set is a single subtask or a combination of multiple subtasks; subtasks without a symbol indicate a sequential relationship, for example, subtasks A and B are executed sequentially, and the corresponding task chain is represented as AB; the symbol “|” indicates a parallel relationship, for example, subtasks A and B are executed in parallel, and the corresponding task chain is represented as A|B.

[0333] In some implementations, the user input contains instructions for repeated execution, such as repeatedly executing the same task on multiple objects (called a recurring task). When a task chain includes sequential tasks A and B, and the objects being executed are the three diagrams P1, P2, and P3, the task chain is represented as: AB|AB|AB. If the execution results of these three objects also need to be uniformly processed by D, the task chain can be represented as: (AB|AB|AB|)D. Here, each group of AB corresponds to a different object, namely P1, P2, and P3.

[0334] For example, if a user inputs the statement: "Remove the passersby from these three photos, add filters, and then stitch them together into one large image," the task engine can sequentially execute the tasks of removing passersby and adding filters for each of the three photos, resulting in three processed images. These three processed images are then stitched together into one large image. Taking the task of removing passersby as A, the task of adding filters as B, and the task of stitching together as C, the task chain assembled from the subtasks corresponding to this statement can be: (AB|AB|AB|)C. Optionally, after processing, the above-mentioned operation confirmed by the user can also be executed; this will not be elaborated upon here.

[0335] For example, if the user inputs the statement: "Screenshot the descriptions and prices of these 9 items, and then merge them into one image for easy comparison," then this task chain means: First, assemble the infographics of items P1, P2, and P3 to obtain image X (corresponding to task A, which involves horizontal assembly); then, assemble the infographics of items P4, P5, and P6 to obtain image Y; then, assemble the infographics of items P7, P8, and P9 to obtain image Z; finally, assemble image X, image Y, and image Z to obtain image M (corresponding to task D, which involves vertical assembly). This task chain can be represented as:

[0336] (A|A|A)D.

[0337] Optionally, trigger conditions can also be set for the task chain containing the recurring task. When the electronic device senses that the current state meets the trigger conditions, it can execute the recurring task in the task chain, thereby realizing the operation indicated by the user's statement.

[0338] To fully describe the technical solutions of the embodiments of this application, the following are used herein: Figures 15A to 15D The interactive diagram shown provides a complete description of the technical solutions of the embodiments of this application. For example... Figure 15A As shown:

[0339] Figure 15A A portion of the interaction diagram for an example of a dialogue elimination method provided in this application, such as Figure 15A As shown, the method includes:

[0340] S1501 and YOYO receive the image to be processed and the statement input by the user.

[0341] Users can drag and drop images to be processed into YOYO's dialog box, and can also enter statements in the dialog box. For example, a user might enter: "Keep only Zhang San in the image."

[0342] S1502, YOYO obtains the local path of the image to be processed.

[0343] When an image to be processed is stored locally on an electronic device, its storage location can be represented by a local path. Applications can read the image using this local path. During image transfer, the local path can also be sent to transfer the image.

[0344] S1503 and YOYO send the image to be processed to the storage cloud (i.e., OBS cloud).

[0345] YOYO compresses the image to be processed and then sends it to the OBS cloud via the network.

[0346] S1504. OBS cloud storage of the image to be processed, and generation of the URL address of the image to be processed stored on OBS cloud.

[0347] OBS cloud storage for images to be processed also generates a storage address for these images. This address is a Uniform Resource Locator (URL), which is a network address. Other devices can access the images to be processed through this URL. Different servers or terminal devices can also transfer the images to be processed by transmitting this URL, thus avoiding the significant network resource consumption caused by transmitting the images themselves.

[0348] S1505, OBS Cloud will return the URL to YOYO.

[0349] After receiving the URL, YOYO allows electronic devices to send images to be processed to other cloud-side servers without actually sending the image itself, thus conserving network resources. Other cloud-side servers can then retrieve the image from the URL.

[0350] S1506, YOYO sends the user's input to the speech engine.

[0351] After receiving the user's input, YOYO can send the input to the speech engine. The speech engine can then interact with the speech cloud to recognize the intent expressed in the input.

[0352] It should be noted that S1506 can be executed before or after any of the steps S1502 to S1505, and this application embodiment does not limit this.

[0353] S1507: The voice engine calls the voice cloud through the voice cloud platform to identify the intent corresponding to the sentence and the identifier of the required intelligent agent: image editing intelligent agent.

[0354] The speech engine interacts with the speech cloud platform and sends sentences to the speech cloud. The speech cloud uses a cloud-based Large Language Model (LLM) to perform intent recognition on the sentences, obtaining the user's intended meaning. Simultaneously, the speech cloud can also identify the identifier of the agent required for each intent. Optionally, the agent's identifier can be its name, type, or code name, as long as it represents which agent it is.

[0355] For example, a user inputs the statement: "Keep only Zhang San in the image, and remove all passersby except my daughter." The voice cloud system recognizes the user's intention to remove everyone except Zhang San, and identifies the corresponding agent as an image editing agent.

[0356] Optionally, when certain intents do not require processing by the intelligent agent, the voice cloud can return the identifiers of other modules that are not intelligent agents corresponding to these intents. For example, if the intent to turn on Bluetooth does not require processing by the intelligent agent, the voice cloud can return the intent to turn on Bluetooth and the corresponding processing module as: the system settings module.

[0357] S1508, the voice cloud platform returns the recognized intent and the identifier of the image editing agent to YOYO.

[0358] S1509, YOYO sends the local path, URL, and intent of the image to be processed to the agent management module.

[0359] YOYO can also send the local path and URL of the image to be processed to the corresponding agent according to the agent's identifier.

[0360] S1510, the agent management module sends the local path, URL, intent, and the identifier of the image editing agent to the image editing agent.

[0361] Afterwards, the image editing agent can perform actions such as... Figure 15B The interactive flow shown includes:

[0362] S1511. The agent management module queries the long-term memory module to see if the image editing agent exists, based on the identifier of the image editing agent.

[0363] S1512A If it does not exist, the long-term memory module returns the information that it does not exist to the agent management module.

[0364] S1513, the agent management module registers the image editing agent and the execution units contained in the image editing agent.

[0365] Optionally, the image editing agent may include one execution unit, such as a dialogue cancellation module; it may also include multiple execution units, such as a dialogue cancellation module and a skin smoothing tool.

[0366] S1512B If it exists, the long-term memory module returns the existence information to the agent management module.

[0367] When the agent management module receives information that an image editing agent exists, it can continue to execute the subsequent process without registering.

[0368] S1514. The image editing agent sends the URL of the image to be processed and the statement (or intent) to the voice cloud.

[0369] Optionally, the image editing agent can send the URL of the image to be processed and the corresponding statement to the voice cloud through its own task engine and task orchestration interface.

[0370] Optionally, the URL and statement of the image to be processed can be sent together or separately. This application embodiment does not limit the order in which these three are sent.

[0371] S1515, Voice Cloud performs task decomposition and task arrangement on the sentences to obtain a task list and information on character relationships.

[0372] Optionally, the speech cloud can perform intent recognition on the speech, and then break down and orchestrate the recognized intent to obtain a task list; this is not limited here. For the specific execution flow of this step of task breakdown and orchestration, please refer to the preceding text. Figure 14 The embodiments and related descriptions will not be repeated here.

[0373] S1516, Voice Cloud returns the task list to the image editing agent.

[0374] Optionally, the voice cloud can receive task lists and person relationship information through the task orchestration interface and task engine of the image editing agent.

[0375] S1517. When the image editing agent determines that there is information about relationships between people in the statement entered by the user, it sends the first query request to the learning and memory platform.

[0376] The first query request carries information about relationships, such as pronouns, titles, and / or names.

[0377] S1518. In response to the first query request, the learning and memory platform can query the local database to see if there is a person identifier corresponding to the person relationship information.

[0378] This local database can be the database for the long-term memory module. The long-term memory module's database can store the mapping between multiple titles / names and multiple Tag IDs. The learning and memory platform can search within the mapping of multiple titles / names and multiple Tag IDs to see if the Tag ID of the person referred to by the pronoun in the sentence exists.

[0379] S1519. If it exists, the image editing agent obtains the avatar frame of the face indicated by the person relationship information.

[0380] When a user-defined pronoun corresponds to a specific person's TagID in a mapping between multiple titles / names and Tag IDs, the image editing agent can retrieve the person's facial frame from the images clustered in the media database. For example, the media database can cluster multiple images to obtain image sets corresponding to multiple people and establish a one-to-one correspondence between them.

[0381] For example, the frame for Zhang San's face is the rectangular area containing the face in an image with a clear and frontal view in the image set with TagID Zhang San.

[0382] S1520: The image editing agent sends the frame of the face to the dialogue cancellation module.

[0383] S1521. The image editing agent subscribes to the information perceived by the perception module through the perception module interface.

[0384] The sensing module can sense the external environment, such as the geographical location of the electronic device, and can also be used to sense the date, such as a specific holiday, and to sense conditions such as receiving information from a specific application or receiving preset content from the electronic device.

[0385] S1522. When the perceived information meets the preset conditions in the statement, the URL of the image to be processed and Zhang San's avatar frame are sent to the visual middle platform through the dialogue elimination module.

[0386] The image editing AI agent can extract Zhang San's avatar frame from a preset image based on Zhang San's facial coordinates, and then send Zhang San's avatar frame and URL to the visual platform.

[0387] The preset condition can be one or more of the following: time condition, location condition, information received by a specified application, information receiving preset content, or information received from a specified contact. Optionally, the preset condition can be one condition or multiple conditions.

[0388] S1523, The visual platform sends Zhang San's avatar frame and URL to the visual cloud.

[0389] S1524. Visual Cloud segments out the human body instance bounding box of Zhang San in the image to be processed based on Zhang San's avatar frame and the image to be processed stored in the URL.

[0390] Visual Cloud can compare Zhang San's avatar frame with the image to be processed stored in the URL, find Zhang San's avatar in the image to be processed, and then segment Zhang San's human body instance frame based on Zhang San's avatar frame.

[0391] Optionally, the image editing agent can also compare the facial features represented by the headshot frame of Zhang San in the preset image with those features in the image to be processed locally to find the facial position (coordinates) of Zhang San in the image to be processed. Then, the visual platform converts the facial position (coordinates) of Zhang San in the image to be processed into the facial position (coordinates) of Zhang San in the image to be processed on the cloud side, and then sends it to the visual cloud. The visual cloud then segments the human body instance bounding box of Zhang San based on Zhang San's headshot.

[0392] S1525, Visual Cloud returns the human body instance frame of Zhang San to the image editing intelligent agent through the visual middleware platform.

[0393] Optionally, when the learning memory bank does not contain a Tag ID corresponding to a person's pronoun, the learning memory platform returns a message indicating that the Tag ID does not exist to the image editing agent. This message indicates that the Tag ID corresponding to the person's pronoun does not exist in the learning memory bank. The image editing agent then sends the URL, the returned message, and the conversation history to the voice cloud. In response to the returned message, the image editing agent executes a person relationship clarification process.

[0394] Specifically, the image editing agent sends the URL of the image to be processed, the returned information, and the conversation history to the voice cloud. The voice cloud generates a query based on the conversation history and returns it to the image editing agent. In response to the returned information, the voice cloud can invoke a multimodal large model on the cloud side to generate the corresponding query based on the conversation history and return it to the image editing agent. For example, if the conversation history includes the user's input statement: "Only Zhang San is in the image," the query could be: "Is Zhang San the person wearing the red shirt?" After receiving the query, the image editing agent returns it to YOYO.

[0395] Optionally, when the query is directed at a single person, such as a prominent figure, it can be referred to as the main query object statement. Optionally, when the query includes multiple visual features of a person, or inquires about multiple visual features of multiple people, it can be displayed as a list of message prompts, with each message prompting one visual feature. YOYO displays the query in a dialog box for the user to see. The user can reply based on the query by entering a response. After receiving the user's response, YOYO sends it to the image editing agent.

[0396] Regarding the manner of the inquiry, this application embodiment does not limit this, and will not elaborate further here. The image editing agent can determine which person in the image to be processed is Zhang San based on the response, and obtain the human body instance bounding box of Zhang San in the image to be processed.

[0397] Optionally, after the image editing agent identifies Zhang San as the target person, when further obtaining Zhang San's human body instance bounding box, it can use the visual platform to call the visual cloud to segment Zhang San's human body instance bounding box, which is not shown in the figure.

[0398] Figure 15D An interactive diagram illustrating an example of a person removal process performed by an image editing agent invoking the dialogue elimination module, including:

[0399] S1526. The image editing intelligent agent sends the human body instance frame and URL of Zhang San, along with the task of keeping Zhang San and removing passersby, to the visual cloud through the visual middle platform.

[0400] S1527. Visual Cloud segments the characters other than Zhang San to obtain the first mask image.

[0401] Specifically, the visual cloud calls the segmentation model to segment all characters except Zhang San, and obtains the first mask image.

[0402] S1528, Visual Cloud sends the first mask image to the image editing intelligent agent through the visual middleware platform.

[0403] S1529. The image editing agent sends the first mask image and the original image of the image to be processed to the visual middleware platform.

[0404] S1530, the visual platform will segment the original image of the image to be processed based on the first mask image to obtain a rectangular image of the part that needs to be eliminated.

[0405] Optionally, the visual platform can select the pedestrians that need to be eliminated in the original image based on the pedestrians indicated by the first mask image, and obtain a rectangular image containing the part that needs to be segmented. Optionally, the rectangle of the rectangular image can be the smallest bounding rectangle of the pedestrians to be eliminated.

[0406] S1531, The visual platform sends the rectangular image to the visual cloud.

[0407] S1532. Visual Cloud performs elimination and filling based on the rectangular diagram to obtain a partial result image.

[0408] This rectangular image represents a portion of the image to be processed. Visual Cloud uses its cloud-based segmentation model to remove pedestrians from this portion of the image and fills in the removal area, resulting in a partial image with all pedestrians except Zhang San removed.

[0409] S1533, Visual Cloud returns some of the resulting images to the Visual Platform.

[0410] S1534. The visual platform stitches together the original images of some of the result images and the images to be processed to obtain the final result image.

[0411] The visual processing platform can cut out the rectangular portion of the original image to be processed, and then stitch the partial result image and the cut image to form the final result image.

[0412] S1535, the visual middleware sends the resulting image to the image editing agent.

[0413] S1536, The image editing agent obtains the task execution result and the result image.

[0414] After receiving the result image, the image editing agent also generates the corresponding task execution result.

[0415] For example, when the image editing agent receives the result image of the completed deletion task, it indicates that the task execution result is successful.

[0416] If the image editing agent does not receive the result image of the completed removal task, it means that the task execution result is a failure.

[0417] S1537, the image editing agent sends the task execution result to the voice cloud.

[0418] S1538. Voice Cloud generates a response based on the task execution result.

[0419] S1539, The voice cloud will return the reply to the image editing intelligent agent.

[0420] S1540: The image editing agent sends the resulting image and / or reply to YOYO for display.

[0421] Users can observe the image of Zhang San retained, and also see the reply indicating the elimination result.

[0422] Figure 15DAn example of an interactive diagram showing an image editing agent invoking an execution unit—a skin-smoothing tool—to smooth an image is also shown, including:

[0423] S1541, The image editing agent sends the skin-beautifying task to the skin-beautifying application through the skin-beautifying tool of the execution unit.

[0424] S1542. The skin smoothing application performs skin smoothing on the image to be processed, resulting in a smoothed image.

[0425] S1543, The skin-beautifying application returns the beautified image to the image editing intelligent agent.

[0426] S1544: The image editing agent obtains the beautified image and the task execution result.

[0427] S1545, the image editing agent sends the task execution results to the voice cloud.

[0428] S1546. Voice Cloud generates a response based on the task execution result.

[0429] S1547, The voice cloud will return the reply to the image editing intelligent agent.

[0430] S1548. The image editing AI sends the beautified image and / or reply to YOYO for display.

[0431] The above Figures 15A to 15D The implementation principles and technical effects can be found in the relevant descriptions above, and will not be repeated here.

[0432] Subsequently, when the image editing agent is removed from YOYO, the deregistration process described earlier can be executed. Simultaneously, the dialogue elimination module and the skin-beautifying tool also undergo deregistration. Correspondingly, the state of the corresponding agent (and execution unit) in the long-term memory module is refreshed to the deregistered state, and the deregistration time is recorded.

[0433] The foregoing has detailed examples of the methods provided in this application. It is understood that the corresponding apparatus, in order to achieve the above functions, includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0434] This application can divide the task processing device into functional modules based on the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0435] Figure 16 A schematic diagram of a task processing apparatus provided in this application is shown. The apparatus 1600 is applied to an electronic device, which arranges at least one intelligent agent. The at least one intelligent agent includes multiple execution units. The apparatus 1600 includes:

[0436] The first acquisition module 1601 is used to acquire the statement input by the user, which is used to indicate the image to be processed;

[0437] The second acquisition module 1602 is used to acquire multiple task description statements corresponding to the statement;

[0438] The first processing module 1603 is used to generate a target task chain based on multiple task description statements. The target task chain includes multiple sub-tasks, and the multiple sub-tasks correspond one-to-one with the multiple task description statements. One or more of the multiple sub-tasks are image processing tasks.

[0439] The second processing module 1604 is used to call multiple execution units to execute multiple sub-tasks according to the task execution order indicated by the target task chain, and obtain the target result image. The multiple execution units and multiple sub-tasks correspond one-to-one, and one or more of the multiple execution units are image processing tools.

[0440] Optionally, there is no dependency between the multiple subtasks. The second processing module 1604 is specifically used to call multiple execution units in parallel to execute multiple subtasks and obtain multiple sub-result images; and to merge the multiple sub-result images to obtain the target result image.

[0441] Optionally, the processing regions corresponding to multiple subtasks in the image to be processed do not overlap.

[0442] Optionally, there are dependencies between multiple subtasks, and the target task chain also includes multiple priority parameters of multiple subtasks. The multiple priority parameters are used to characterize the task execution order of multiple subtasks. The second processing module 1604 is specifically used to call multiple execution units to execute multiple subtasks in order of priority from high to low based on the priority represented by the multiple priority parameters, so as to obtain the target result image.

[0443] Optionally, the processing areas corresponding to multiple subtasks in the image to be processed may overlap.

[0444] Optionally, the first part of the multiple subtasks includes at least two first subtasks, and the second part of the multiple subtasks includes at least one second subtask; at least two first subtasks have no dependency relationship, while the first part of the subtasks and the second part of the subtasks have a dependency relationship; or, at least two first subtasks have a dependency relationship, while the first part of the subtasks and the second part of the subtasks have no dependency relationship.

[0445] Optionally, the multiple subtasks may also include a third subtask, which includes at least one third subtask, and the third subtask has a dependency relationship with the first subtask or the second subtask.

[0446] Optionally, the second processing module 1604 is specifically used to obtain the triggering conditions contained in the statement; when the state of the electronic device meets the triggering conditions, it executes the steps of calling multiple execution units to execute multiple sub-tasks according to the task execution order indicated by the target task chain.

[0447] Optionally, the triggering conditions include one or more of the following: the electronic device enters a preset geofence, the location of the image captured by the electronic device is within the preset geofence, a preset date is reached, the time of the image captured by the electronic device is within the preset date, the electronic device receives a message with preset content, a preset application in the electronic device receives a message, a preset application in the electronic device receives a message sent by a preset contact, and a preset application in the electronic device receives a message with preset content sent by a preset contact.

[0448] Optionally, the first task description statement includes: subtask name, dependency parameters between the subtask and other subtasks, priority parameters of the subtask, execution unit identifier corresponding to the subtask, and execution parameters of the subtask. The first task description statement can be any one of multiple task description statements.

[0449] Optionally, the statement represents retaining the target person, eliminating passersby, and adding a first filter; the multiple subtasks include: the passerby elimination task and the filter addition task, the passerby elimination task and the filter addition task are dependent on each other, and the priority parameter of the passerby elimination task represents a higher priority than the priority parameter of the filter addition task.

[0450] Optionally, the statement represents retaining the target person, eliminating passersby, beautifying the skin, and generating an ID photo; the multiple subtasks include: the passerby elimination task, the skin beautification task, and the ID photo generation task. The passerby elimination task, the skin beautification task, and the ID photo generation task have a dependency relationship. The priority parameter of the passerby elimination task represents a higher priority than the priority parameter of the skin beautification task, and the priority parameter of the skin beautification task represents a higher priority than the priority parameter of the ID photo generation task.

[0451] Optionally, the second processing module 1604 is specifically used to call the fourth execution unit to execute the fourth subtask, where the fourth subtask is any one of multiple subtasks and the fourth execution unit is one of the multiple execution units corresponding to the fourth subtask; obtain the first execution result of the fourth subtask; if the first execution result indicates that the fourth subtask has failed to execute, then determine the processing strategy according to the error type corresponding to the fourth subtask.

[0452] Optionally, when the error type is an irreversible error type, the processing strategy indicates that the execution of the fourth subtask is terminated; when the error type is a correctable error type, the processing strategy indicates that the fourth execution unit is repeatedly called to execute the fourth subtask after a preset time interval; when the error type is a retry type after updating the conditions, the processing strategy indicates that the trigger conditions are updated and the fourth execution unit is repeatedly called to execute the fourth subtask when the state of the electronic device meets the trigger conditions.

[0453] Optionally, the second acquisition module 1602 is specifically used to send the statement to the cloud server, the cloud server deploys a task decomposition model, the cloud server uses the task decomposition model to decompose the intent expressed by the statement into multiple task description statements; and receives the multiple task description statements returned by the cloud server.

[0454] Optionally, a task decomposition model is arranged on the electronic device, and the second acquisition module 1602 is specifically used to decompose the intent expressed by the statement using the task decomposition model to obtain multiple task description statements.

[0455] Optionally, the first intelligent agent includes a first task engine. The first intelligent agent is any one of at least one intelligent agent. The first intelligent agent includes at least a fifth execution unit. The second processing module 1604 is specifically used to call the fifth execution unit to execute a fifth subtask through the first task engine. The fifth subtask is the task corresponding to the fifth execution unit among multiple subtasks.

[0456] Optionally, the electronic device also includes an agent management module. The intent expressed by the statement corresponds at least to the identifier of a second agent. The second processing module 1604 is specifically used to respond to the received statement by querying the long-term memory module based on the identifier of the second agent through the agent management module. If the second agent exists, it executes at least one sixth execution unit of the second agent to perform at least one sixth subtask according to the task execution order indicated by the target task chain, in order to obtain the target result image. If the second agent does not exist, it creates a second agent based on the identifier of the second agent, registers at least one sixth execution unit, and executes at least one sixth subtask according to the task execution order indicated by the target task chain, in order to obtain the target result image.

[0457] The specific manner in which the device 1600 performs the task processing method and the beneficial effects thereof can be found in the relevant descriptions in the method embodiments, and will not be repeated here.

[0458] This application also provides an electronic device, including the processor described above. The electronic device provided in this embodiment may be... Figure 1 The terminal device 100 shown is used to execute the above-described task processing method. When using integrated units, the terminal device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the actions of the terminal device; for example, it can support the terminal device in executing the steps performed by the display unit, detection unit, and processing unit. The storage module can be used to support the terminal device in executing stored program code and data. The communication module can be used to support communication between the terminal device and other devices.

[0459] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a digital signal processor (DSP), and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other terminal devices.

[0460] In one embodiment, when the processing module is a processor and the storage module is a memory, the terminal device involved in this embodiment can be a device having... Figure 1 The device with the structure shown.

[0461] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the task processing method described in any of the above embodiments.

[0462] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the task processing method described above.

[0463] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0464] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units. The replaced units may or may not be physically separate. The component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0465] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0466] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

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

Claims

1. A task processing method, characterized in that, Applied to an electronic device, wherein the electronic device is equipped with at least one intelligent agent, the at least one intelligent agent comprising multiple execution units, the method includes: Obtain the statement input by the user, which is used to instruct on the image to be processed; Retrieve the multiple task description statements corresponding to the given statement; Based on the multiple task description statements, a target task chain is generated. The target task chain includes multiple sub-tasks, and the multiple sub-tasks correspond one-to-one with the multiple task description statements. One or more of the multiple sub-tasks are image processing tasks. According to the task execution order indicated by the target task chain, the multiple execution units are called to execute the multiple sub-tasks to obtain the target result image. The multiple execution units and the multiple sub-tasks correspond one-to-one, and one or more of the multiple execution units are image processing tools.

2. The method according to claim 1, characterized in that, There are no dependencies between the multiple subtasks. The process of calling the multiple execution units to execute the multiple subtasks according to the task execution order indicated by the target task chain to obtain the target result image includes: The multiple execution units are invoked in parallel to execute the multiple sub-tasks, resulting in multiple sub-result images; The multiple sub-result images are merged to obtain the target result image.

3. The method according to claim 2, characterized in that, The processing areas corresponding to the multiple subtasks in the image to be processed do not overlap.

4. The method according to claim 1, characterized in that, There are dependencies between the multiple subtasks, and the target task chain also includes multiple priority parameters for the multiple subtasks, which are used to characterize the task execution order of the multiple subtasks; The step of calling the multiple execution units to execute the multiple subtasks according to the task execution order indicated by the target task chain to obtain the target result image includes: Based on the priorities represented by the multiple priority parameters, the multiple execution units are called sequentially in descending order of priority to execute the multiple subtasks and obtain the target result image.

5. The method according to claim 4, characterized in that, The multiple subtasks have overlapping processing areas in the image to be processed.

6. The method according to claim 1, characterized in that, The first part of the plurality of subtasks includes at least two first subtasks, and the second part of the plurality of subtasks includes at least one second subtask; The at least two first subtasks have no dependency relationship, while the first part of the subtasks and the second part of the subtasks have a dependency relationship. or, The at least two first subtasks have a dependency relationship, while the first part of the subtasks and the second part of the subtasks do not have a dependency relationship.

7. The method according to claim 6, characterized in that, The plurality of subtasks also includes a third part of subtasks, which includes at least one third subtask, and the third part of subtasks has a dependency relationship with the first part of subtasks or the second part of subtasks.

8. The method according to claim 1, characterized in that, The step of invoking the plurality of execution units to execute the plurality of subtasks according to the task execution order indicated by the target task chain includes: Obtain the triggering conditions contained in the statement; When the state of the electronic device is detected to meet the triggering condition, the step of calling the multiple execution units to execute the multiple sub-tasks according to the task execution order indicated by the target task chain is executed.

9. The method according to claim 8, characterized in that, The triggering conditions include one or more of the following: the electronic device enters a preset geofence, the location of the image captured by the electronic device is within the preset geofence, a preset date is reached, the time of the image captured by the electronic device is within the preset date, the electronic device receives a message with preset content, a preset application in the electronic device receives a message, a preset application in the electronic device receives a message sent by a preset contact, and a preset application in the electronic device receives a message with preset content sent by a preset contact.

10. The method according to claim 8, characterized in that, The first task description statement includes: subtask name, dependency parameters between the subtask and other subtasks, priority parameters of the subtask, execution unit identifier corresponding to the subtask, and execution parameters of the subtask. The first task description statement is any one of the plurality of task description statements.

11. The method according to any one of claims 1 to 10, characterized in that, The statement indicates that the target person is retained, passersby are eliminated, and a first filter is added; The multiple subtasks include: a passerby removal task and a filter addition task. The passerby removal task and the filter addition task are dependent on each other. The priority parameter of the passerby removal task represents a higher priority than the priority parameter of the filter addition task.

12. The method according to any one of claims 1 to 10, characterized in that, The statement indicates that the target person is retained, passersby are eliminated, skin is beautified, and an ID photo is generated; The multiple subtasks include: a passerby removal task, a skin beautification task, and an ID photo generation task. The passerby removal task, the skin beautification task, and the ID photo generation task are dependent on each other. The priority parameter of the passerby removal task represents a higher priority than the priority parameter of the skin beautification task, and the priority parameter of the skin beautification task represents a higher priority than the priority parameter of the ID photo generation task.

13. The method according to claim 1, characterized in that, The step of calling the multiple execution units to execute the multiple subtasks according to the task execution order indicated by the target task chain to obtain the target result image includes: The fourth execution unit is invoked to execute the fourth subtask, wherein the fourth subtask is any one of the plurality of subtasks, and the fourth execution unit is one of the plurality of execution units corresponding to the fourth subtask; Obtain the first execution result of the fourth subtask; If the first execution result indicates that the fourth subtask has failed, then a processing strategy is determined based on the error type corresponding to the fourth subtask.

14. The method according to claim 13, characterized in that, When the error type is an irreversible error type, the processing strategy indicates that the execution of the fourth subtask will be terminated; When the error type is a correctable error type, the processing strategy indicates that the fourth execution unit is repeatedly called to execute the fourth subtask after a preset time interval; When the error type is the retry type after updating the condition, the processing strategy indicates that the update trigger condition is met and the fourth execution unit is repeatedly called to execute the fourth subtask when the state of the electronic device meets the trigger condition.

15. The method according to any one of claims 1 to 14, characterized in that, Retrieve multiple task description statements corresponding to the stated statement, including: The statement is sent to the cloud server, which deploys a task decomposition model. The cloud server uses the task decomposition model to decompose the intent expressed by the statement into multiple task description statements. Receive the multiple task description statements returned by the cloud-side server.

16. The method according to any one of claims 1 to 14, characterized in that, The task decomposition model is deployed on the electronic device, and the acquisition of multiple task description statements corresponding to the statement includes: The task decomposition model is used to decompose the intent expressed by the statement into multiple task description statements.

17. The method according to any one of claims 1 to 16, characterized in that, The first intelligent agent includes a first task engine, and the first intelligent agent is any one of the at least one intelligent agents. The first intelligent agent includes at least a fifth execution unit, and the step of invoking the plurality of execution units to execute the plurality of subtasks includes: The fifth subtask is executed by the fifth execution unit through the first task engine. The fifth subtask is the task corresponding to the fifth execution unit among the plurality of subtasks.

18. The method according to claim 1, characterized in that, The electronic device is also equipped with an agent management module. The intent expressed by the statement corresponds at least to the identifier of the second agent. The step of calling the multiple execution units to execute the multiple sub-tasks according to the task execution order indicated by the target task chain to obtain the target result image includes: In response to the received statement, the agent management module queries the long-term memory module to see if the second agent exists, based on the identifier of the second agent. If it exists, according to the task execution order indicated by the target task chain, call at least one sixth execution unit of the second agent to execute at least one sixth subtask to obtain the target result image; If it does not exist, the second agent is created based on the identifier of the second agent to register the at least one sixth execution unit, and the at least one sixth subtask of the second agent is invoked to execute the at least one sixth execution unit in accordance with the task execution order indicated by the target task chain to obtain the target result image.

19. An electronic device, characterized in that, include: Processor, memory, and interface; The processor, the memory, and the interface cooperate with each other to enable the electronic device to perform the method as described in any one of claims 1 to 18.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 18.