Video generation method, electronic device, storage medium and chip

By generating a task queue and implementing interface controls, the system addresses users' needs for video generation, enhances the user experience, and fulfills users' specific requirements for video generation.

CN120455774BActive Publication Date: 2026-08-04HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-01-30
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing technologies are insufficient to meet users' needs for generating videos on relevant topics based on images or videos, resulting in a poor user experience.

Method used

By generating a task queue, tasks are executed in the order of user instructions to generate videos that meet user needs. The interface provides control so that users can stop tasks in real time, ensuring that the video generation process conforms to user intent.

Benefits of technology

It enables video generation based on user instructions, improving user experience and meeting users' video generation needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455774B_ABST
    Figure CN120455774B_ABST
Patent Text Reader

Abstract

The application discloses a video generation method, an electronic device, a storage medium and a chip. The method comprises the following steps: in response to a first user instruction, a first task is generated, wherein the first task is used for instructing to search for a first material; the first task is saved into a task queue, and the execution order of the tasks in the task queue is sorted according to the order of the user instructions associated with the received tasks; in the case that the first task is executed, in response to a second user instruction, a second task is generated, wherein the second task is used for instructing to generate a first video based on the first material; the second task is saved into the task queue; and the second task is executed to obtain the first video. According to the video generation method provided in the application, a video meeting the user demand can be generated, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and more specifically, to a video generation method, electronic device, storage medium, and chip. Background Technology

[0002] Currently, many electronic devices are equipped with cameras, allowing users to take photos and videos. Alternatively, electronic devices can acquire images or videos from the internet or other devices. With the continuous development of smart terminals, users' demands and experiences regarding images and videos are constantly increasing. In certain scenarios, users need to generate videos on related topics based on images or videos to facilitate viewing the content. Summary of the Invention

[0003] This application provides a video generation method, electronic device, storage medium, and chip that can generate videos that meet user needs and improve user experience.

[0004] In a first aspect, a video generation method is provided, the method comprising: generating a first task in response to a first user instruction, wherein the first task is used to instruct the search for first material; saving the first task to a task queue, wherein the execution order of tasks in the task queue is sorted according to the order of the user instructions associated with the received tasks; upon completion of the first task, generating a second task in response to a second user instruction, wherein the second task is used to instruct the generation of a first video based on the first material; saving the second task to the task queue; and executing the second task to obtain the first video.

[0005] The execution order of tasks in the task queue is based on the order in which user instructions associated with the received tasks are received. Tasks in the task queue are executed sequentially according to their order of arrangement. The next task in the task queue can only be executed after the previous task has been completed.

[0006] In the above technical solution, after receiving a user instruction (e.g., a first user instruction), the electronic device saves the task generated based on the user instruction (e.g., a first task) to a task queue. Then, by executing the tasks in the task queue, a video (e.g., a first video) matching the user instruction is generated. Thus, this application provides a novel method for generating videos. Furthermore, the execution order of the tasks in the task queue is ordered according to the order in which the user instructions associated with the task are received. This ensures that the electronic device executes multiple tasks corresponding to multiple user instructions in the task queue in the order in which the user input the user instructions. It also ensures that the electronic device executes the task corresponding to the first received user instruction in the task queue after completing the task corresponding to that first received user instruction in the task queue, thereby generating a video that meets the user's needs and improving the user experience.

[0007] In one possible implementation, after performing the second task to obtain the first video, the method further includes: confirming that the first video is effective during the execution of the second task and if no second stop command for stopping the second task is received; and displaying a first interface if the first video is effective, wherein the first interface is the playback interface of the first video.

[0008] It should be noted that in this application, after the electronic device receives a stop command (for example, the first stop command mentioned above, the second stop command mentioned below, or the third stop command mentioned below), it will not convert the stop command into a corresponding task and save it in the task queue. In this way, it can be ensured that the electronic device can execute the stop command immediately after receiving it.

[0009] In the above technical solution, after the electronic device generates the first video and it is confirmed that the first video has been generated, displaying an interface including the first video to the user can improve the user experience.

[0010] In another possible implementation, the method further includes: displaying a second interface during the execution of the second task, wherein the second interface includes a second control and second execution information, the second control being used to trigger the execution of a second stop command, and the second execution information indicating that the second task is being executed.

[0011] In the above technical solution, during the execution of the second task by the electronic device, the electronic device can display a second interface including a second control to the user. In the scenario where the user needs to stop the second task, the user can stop the second task being executed by the electronic device by triggering the second control in the second interface. This method can better meet the needs of the user.

[0012] In another possible implementation, after the first task is saved to the task queue, the method further includes: if the first task is the first task in the task queue, executing the first task to obtain the first material; if the first task is executed and no first stop command for stopping the first task is received, confirming that the first material is effective; if the first material is effective, the third interface includes the first material.

[0013] In the above technical solution, the third interface including the first material will only be displayed to the user when the electronic device is performing the first task and no first stop command for stopping the first task has been received.

[0014] In another possible implementation, the method further includes: displaying a fourth interface during the execution of the first task, wherein the fourth interface includes a first control and first execution information, the first control being used to trigger the execution of a first stop command, and the first execution information indicating that the first task is being executed.

[0015] In the above technical solution, during the execution of the first task by the electronic device, the electronic device can display a fourth interface including the first control to the user. In the scenario where the user needs to stop the first task, the user can stop the first task being executed by the electronic device by triggering the first control in the fourth interface. This method can better meet the needs of the user.

[0016] In another possible implementation, before generating a second task in response to a second user instruction after the first task has been completed, the method further includes: saving the generated third task to a task queue in response to a third user instruction after the first task has been completed, wherein the third task is a task for processing the first material; generating the second task in response to a second user instruction after the first task has been completed includes: generating the second task in response to a second user instruction after the first task has been completed and during the execution of the third task; saving the second task to the task queue includes: saving the second task to the task queue during the execution of the third task, wherein the task queue includes the third task and the second task, the third task being the first task in the task queue, and the second task being the next task after the first task.

[0017] In the above technical solution, the electronic device receives multiple user commands, and the order in which these commands are received is: a first user command, a third user command, and a second user command. The third user command is received after the electronic device has completed the first task corresponding to the first user command in the task queue. The second user command is received during the execution of the third task corresponding to the third user command in the task queue. Based on this method, user needs can be better met, thereby generating videos that satisfy user requirements and improving the user experience.

[0018] In another possible implementation, after saving the second task to the task queue during the execution of the third task, the method further includes: deleting the third task from the task queue after the third task in the queue has been completed, so that the second task becomes the first task in the task queue; and executing the second task when the second task is the first task in the task queue.

[0019] In another possible implementation, if the second task is the first task in the task queue, executing the second task includes: generating a first video based on the second material if the second material obtained after the third task is completed is effective, wherein the second material is material obtained by executing the third task on the first material, and the second material is invalid if a third stop command for stopping the third task is not received during the execution of the third task; or, if the second task is the first task in the task queue, executing the second task includes: generating a first video based on the first material if the second material obtained after the third task is completed is invalid, wherein the second material is invalid if a third stop command is received during the execution of the third task.

[0020] In the above technical solution, the electronic device receives multiple user commands, and the order in which these commands are received is: a first user command, a third user command, and a second user command. The third user command is received after the electronic device has completed the first task corresponding to the first user command in the task queue. The second user command is received during the execution of the third task corresponding to the third user command in the task queue. If a third stop command is received during the execution of the third task corresponding to the third user command in the task queue, the electronic device generates a first video based on the first source material. If no third stop command is received during the execution of the third task corresponding to the third user command in the task queue, the electronic device generates a first video based on the second source material generated from the first source material. Based on this method, user needs can be better met, thereby generating videos that meet user requirements and improving the user experience.

[0021] In another possible implementation, the method further includes: displaying a fifth interface during the execution of a third task, wherein the fifth interface includes a third control; and receiving a third stop command in response to a triggering operation on the third control in the fifth interface.

[0022] In the above technical solution, during the execution of the third task by the electronic device, the electronic device can display a fifth interface including a third control to the user. In scenarios where the user needs to stop the third task, the user can trigger the third control in the fifth interface to stop the third task being executed by the electronic device. This method can better meet the needs of the user.

[0023] In another possible implementation, the third task is either a material deletion task or a material addition task.

[0024] In another possible implementation, applied to an electronic device including a voice assistant, a media platform, and an editing application, the task queue is a queue within the media platform. In response to a first user instruction, generating a first task includes: the voice assistant generating a first command in response to the first user instruction and sending the first command to the media platform, wherein the first command carries a first session identifier and first semantic information corresponding to the first user instruction; after receiving the first command, the media platform generates a first task, wherein the first task carries a first session identifier, a first task identifier corresponding to the first task, and first semantic information; saving the first task to the task queue includes: the media platform saving the first task to the task queue; and, upon completion of the first task, generating a second task in response to a second user instruction. The second task includes: after the first task is completed, the voice assistant generates a second command in response to a second user instruction and sends the second command to the media platform, wherein the second command carries a first session identifier; after receiving the second command, the media platform generates a second task, wherein the second task carries the first session identifier and a second task identifier corresponding to the second task; saving the second task to a task queue includes: the media platform saving the second task to the task queue; executing the second task to obtain a first video includes: after the media platform calls the second task in the task queue, it sends a video generation instruction to the editing application based on the second task, wherein the video generation instruction carries first material; the editing application receives the video generation instruction and generates the first video based on the first material.

[0025] In another possible implementation, the first task further includes a first task number, the second task further includes a second task number, the second task number is greater than the first task number, and the method further includes: when the media platform is executing the first task and has not received a first stop command to stop the first task, recording that the first task corresponding to the first task number is in an unstopped state; when the editing application receives a video generation instruction and generates a first video based on the first material and has not received a stop command to stop the video generation instruction, the media platform records that the second task corresponding to the second task number is in an unstopped state.

[0026] In another possible implementation, after the editing application receives the video generation instruction and generates the first video based on the first material, the method further includes: the editing application sending a completion notification to the media platform, wherein the completion notification carries the first video; if the media platform confirms that the second task corresponding to the second task number is in an unstopped state, it determines that the first video is effective and sends a completion notification to the voice assistant; after receiving the completion notification, the voice assistant displays a first interface, wherein the first interface is the playback interface of the first video.

[0027] In another possible implementation, the media platform includes a creation service and creation tasks. Upon receiving a first command, the media platform generates a first task, including: the creation service, upon receiving the first command, generates a first creation instruction based on a first session identifier and first semantic information, wherein the first creation instruction instructs the creation of the first task, carrying the first session identifier, a first task identifier corresponding to the first task, and first semantic information corresponding to the first user instruction; the creation service sends the first creation instruction to the creation task; the creation task generates the first task according to the first creation instruction; and the media platform saves the first task to a task queue, including: the creation task sending the first task to the creation service; the creation service, upon receiving the first task, sending the first task to the task queue; and the task queue, upon receiving the first task, saving the first task.

[0028] In another possible implementation, the media platform includes a creation service and creation tasks. Upon receiving a second command, the media platform generates a second task, including: the creation service, upon receiving the second command, generates a second creation instruction based on a first session identifier, wherein the second creation instruction instructs the creation of a second task, and carries the first session identifier and a second task identifier; the creation service sends the second creation instruction to the creation task; the creation task generates the second task according to the second creation instruction; and the media platform saves the second task to a task queue, including: the creation task sending the second task to the creation service; the creation service, upon receiving the second task, sending the second task to the task queue; and the task queue, upon receiving the second task, saving the second task.

[0029] In a second aspect, a video generation apparatus is provided, including a processing unit for performing any of the video generation methods in the first aspect.

[0030] Thirdly, an electronic device is provided, including a unit for performing any of the video generation methods in the first aspect. The device may be a terminal device or a chip within a terminal device. The device may include an input unit and a processing unit.

[0031] When the device is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may also include a memory for storing computer program code, which, when the processor executes the computer program code stored in the memory, causes the terminal device to execute any of the video generation methods in the first aspect.

[0032] When the device is a chip within a terminal device, the processing unit can be an internal processing unit of the chip, and the input unit can be an output interface, pin, or circuit, etc.; the chip may also include a memory, which can be an internal memory of the chip (e.g., registers, cache, etc.) or an external memory (e.g., read-only memory, random access memory, etc.); the memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, the chip executes any of the video generation methods in the first aspect.

[0033] In one possible implementation, the memory is used to store computer program code; the processor executes the computer program code stored in the memory, and when the computer program code stored in the memory is executed, the processor is used to execute any of the video generation methods in the first aspect.

[0034] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing computer program code, which, when executed by a video generating apparatus, causes the video generating apparatus to perform any of the video generating methods in the first aspect.

[0035] Fifthly, a computer program product is provided, the computer program product comprising: computer program code, which, when executed by a video generating device, causes the video generating device to perform any of the video generating methods in the first aspect.

[0036] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0037] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application.

[0039] Figure 2 This is a schematic diagram of the software system of an electronic device 100 provided in an embodiment of this application.

[0040] Figure 3 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0041] Figure 4 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0042] Figure 5 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0043] Figure 6 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0044] Figure 7 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0045] Figure 8 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0046] Figure 9 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0047] Figure 10 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application.

[0048] Figure 11 This is a schematic diagram illustrating the process of performing material search tasks in a video generation method provided in this application embodiment.

[0049] Figure 12 This is a schematic diagram illustrating the process of executing material deletion tasks and stopping tasks in a video generation method provided in an embodiment of this application.

[0050] Figure 13 This is a schematic diagram illustrating the process of executing a video generation task in a video generation method provided in an embodiment of this application.

[0051] Figure 14 This is a schematic diagram of a video generation method provided in an embodiment of this application.

[0052] Figure 15 This is a schematic diagram of a video generation device provided in an embodiment of this application. Detailed Implementation

[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0054] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0055] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0056] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0057] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0058] This application provides a video generation method that can be applied to electronic devices, such as tablets, mobile phones, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application does not limit the specific type of electronic device.

[0059] The hardware and software structures of the electronic device will be described in detail below with reference to the accompanying drawings.

[0060] Figure 1This is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application. The electronic 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.

[0061] It is understood that the hardware structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic 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.

[0062] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the video frame playback method in the embodiments of this application.

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

[0064] Internal memory 121 can be used to store computer executable program code, including instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as image playback). Touch sensor 180K, also called a "touch panel," can be disposed on display screen 194. Touch sensor 180K and display screen 194 together form a touch screen, also called a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. Touch sensor can transmit the detected touch operation to 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 disposed on the surface of electronic device 100, in a different location than display screen 194.

[0065] The electronic device 100 implements display functions through a GPU, a display screen 194, and an 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 for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information. For example, in this embodiment, the process of rendering YUV data can be implemented using a GPU.

[0066] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can 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 miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or M displays 194, where M is a positive integer greater than 1. For example, in the embodiments of this application... Figures 3 to 10 All interfaces shown are displayed on the monitor.

[0067] The hardware system of electronic device 100 has been described in detail above. The software system of electronic device 100 is described below. The software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment takes a layered architecture as an example to exemplarily describe the software system of electronic device 100.

[0068] For example, Figure 2 This is a schematic diagram of the software system of the electronic device 100 provided in an embodiment of this application. See also... Figure 2 The software system adopts a layered architecture. This layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer 200, the media platform (also known as the media platform framework layer) 210, the application framework layer 220, the Android Runtime and core library layer 230, the hardware abstraction layer (HAL) 240, and the kernel layer 250.

[0069] Application layer 200 may include a series of application packages. For example, application packages may include a camera, gallery, calendar, map, chat, voice assistant, language model, and video editing application. The language model is used for semantic and intent analysis of user commands. The video editing application generates videos based on existing footage. Optionally, the language model may also be a module located within the voice assistant.

[0070] The aforementioned applications may include more specific functional modules, and there are no specific limitations on the role and number of functional modules included in each application. For example, a voice assistant may include a dialogue module, a language model, a sentence recommendation module, and a card creation loading module. For example, a video editing application may include an editing module, a playback module, and service modules (such as a computer vision analysis module and a transition recognition module). For example, a photo gallery may include a business module and a notification module. For example, a camera may include a photo taking module.

[0071] The aforementioned applications can be used to generate application data. For example, a voice assistant is used to interact with the user. For example, a photo gallery is used to generate photos. For example, a video editor is used to edit videos (e.g., add effects and / or remove video content) to obtain an edited video.

[0072] The media platform 210 generates user tasks from user commands input to the voice assistant and saves these user tasks to a task queue. Subsequently, if the execution conditions for executing the user task are met, the media platform 210 also executes the user tasks in the task queue. For example, as shown... Figure 2 As shown, the media platform 210 may include an authoring service, a task queue module, authoring tasks, and a session state module. The authoring service generates a create task instruction based on received user instructions. The task queue module creates a task queue, which stores user tasks created by authoring tasks. Upon receiving a create task instruction, the authoring task creates the corresponding user task. The authoring task also invokes the user task in the task queue to execute the user task if the execution conditions for that user task are met. The session state module stores the execution results of user tasks.

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

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

[0075] The window manager provides a window management service (WMS), which can be used for window management, window animation management, surface management, and as a relay station for the input system.

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

[0077] A view system includes visual controls, such as controls that display text, controls that display images, etc. View systems can be used to build applications.

[0078] A display interface can consist of one or more views. For example, a display interface including a text message notification icon can include a view that displays text and a view that displays images. For example, a display interface can be, but is not limited to, the views described below. Figures 3 to 10 The page shown in the image.

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

[0080] 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 completed downloads 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 electronic devices, and flashing indicator lights.

[0081] The Activity Manager Service (AMS) can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers), as well as manage and schedule application processes.

[0082] The input manager can provide an input management service (IMS), which can be used to manage system inputs, such as touchscreen input, keypad input, and sensor input. IMS retrieves events from input device nodes and, through interaction with the WMS, distributes these events to the appropriate windows.

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

[0084] The core library consists of two parts: one part is the functionalities that need to be called by programming languages ​​(e.g., Java), and the other part is the Android core library.

[0085] The application layer 200, media platform 210, and application framework layer 220 run in a virtual machine. The virtual machine executes the programming files (e.g., Java files) of the application layer 200, media platform 210, and application framework layer 220 as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0086] The core library layer 230 can include multiple functional modules. For example: surface manager, media framework, libc, SQLite, OpenGL ES, Webkit, etc.

[0087] The Surface Manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.

[0088] The media framework supports playback and recording of various commonly used audio and video formats, as well as still image files.

[0089] libc (the C library) is the standard library for the C programming language. libc is one of the lowest-level libraries in the system, implemented through Linux system calls. For example, libc can be used to connect or disconnect camera services, set camera shooting parameters, start and stop previewing, and take photos.

[0090] The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and upper-level software, designed to abstract hardware. The HAL is an abstract interface for device kernel drivers, providing application programming interfaces (APIs) that allow access to the underlying device to higher-level Java API frameworks. The HAL contains multiple library modules, such as the Camera HAL (e.g., aperture, TOF sensor, lens, or focus motor), the Vendor repository, the display, Bluetooth, and audio. Each library module implements an interface for a specific type of hardware component. For example, the Camera HAL provides the camera firmware (FWK) with an interface to access hardware components like the camera lens. The Vendor repository provides the media firmware (FWK) with an interface to access hardware components like the encoder. When the system framework layer API requires access to the portable device's hardware, the Android operating system loads the library module for that hardware component.

[0091] The kernel layer 250 is the foundation of the Android operating system; all the final functions of the Android operating system are implemented through the kernel layer. The kernel layer can contain display drivers, camera drivers, audio drivers, and sensor drivers.

[0092] It should be noted that the application provided Figure 2 The illustrated software architecture diagram of the electronic device is merely an example and does not limit the specific module divisions within different layers of the Android operating system. For details, please refer to the descriptions of the Android operating system software architecture in conventional technologies. Furthermore, the video generation method provided in this application can also be implemented on other operating systems (e.g., iOS or HarmonyOS), which will not be listed here.

[0093] The video generation method provided in this application can be implemented, but is not limited to, in a mobile phone with the aforementioned hardware and software structure. It should be understood that this application does not specifically limit the specific structure of the execution entity of a video generation method, as long as it can communicate according to the video generation method provided in this application by running code that records such a method. For example, the execution entity of the video generation method provided in this application can be a functional module in an electronic device capable of calling and executing a program, or a communication device applied in an electronic device, such as a chip.

[0094] The video generation method provided in the embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0095] In some embodiments, a mobile phone can provide image search and video creation functions through a voice assistant application (hereinafter referred to as a voice assistant), such as YOYO Assistant (hereinafter referred to as YOYO). However, this is not a limitation in practice. For example, a mobile phone can also provide image search and video creation functions through other applications, such as dedicated video editing applications and gallery applications.

[0096] The following text primarily uses a voice assistant as an example to illustrate the solution of this application. It is understood that the implementation principle is similar for other applications, and will not be elaborated upon in the embodiments of this application.

[0097] A mobile phone can provide at least one of the following methods to trigger the phone to start searching for images.

[0098] Method 1: Wake up the voice assistant and enter the image search request.

[0099] The wake-up methods for the voice assistant include, but are not limited to, at least one of the following: Wake-up method 1, keyword wake-up: the phone can wake up the voice assistant when it recognizes the user's input of a wake-up voice containing keywords, such as "Hello YOYO"; Wake-up method 2, the phone can wake up the voice assistant when it detects the user's long press of the power button; Wake-up method 3, breath wake-up: the phone can wake up the voice assistant when it detects the user raising the phone and pointing their mouth towards the microphone. This application does not specifically limit the wake-up methods.

[0100] Taking the wake-up method of inputting the voice prompt "Hello YOYO" as an example, see [link / reference]. Figure 3 When the phone displays interface 301, in response to the input of the wake-up voice "Hello YOYO", the phone can wake up the voice assistant. After waking up the voice assistant, the phone can display interface 302. Interface 302 includes a prompt card 3021 for the voice assistant, indicating that the voice assistant has been woken up.

[0101] After the phone activates the voice assistant using the above method, the voice assistant is now active. While the voice assistant is active, the phone can receive voice input from the user. For example, the user can input the voice command "image of my second daughter dancing." Alternatively, the phone can also receive text input from the user, such as... Figure 3 The prompt card 3021 in the interface 302 shown includes a keyboard control 3022. In response to the user's trigger operation (such as a click operation) on the keyboard control 3022, the mobile phone can provide a keyboard for the user to input text.

[0102] In response to a user's input of a voice or text instruction to search for an image (i.e., inputting an image search request), the mobile phone can display a dialog box of the voice assistant (hereinafter referred to as the dialog box), which includes the image search request.

[0103] Taking the image search prompt "image of the second daughter dancing" as an example, see below. Figure 3 When the phone displays interface 302, in response to the user's voice input "image of my second daughter dancing", the phone can display interface 303, which includes a voice assistant dialog box 3031. The dialog box 3031 includes the text 3032 of the dialogue "Help me generate a video of my second daughter dancing".

[0104] In addition, in response to a user's input of an image search request, the phone can also begin searching for images in the gallery app that match the search request, thus triggering the image search to begin.

[0105] Therefore, it should be noted that in this embodiment, the format of the image search request input by the user via text or voice can be arbitrary. Taking searching for images of the second daughter dancing as an example, the search request could be "images of the second daughter dancing," "search for images of the second daughter dancing," "including images of the second daughter dancing," etc. It is understood that creating videos typically requires finding images. Therefore, the format of the image search request could also be "generate / create a video of...", such as generating a birthday greeting video for Jimmy, generating a video of a trip to Beijing, etc. In practice, the mobile phone can limit the voice or text image search request to one or more of the above fixed formats, such as the fixed format "generate a video of...", to facilitate the identification of the user's needs. This will not be repeated below.

[0106] Method 2: Enter the image search request after entering the voice assistant's dialog box.

[0107] An icon for the voice assistant is displayed on the phone's home screen. In response to the user's action of clicking the voice assistant icon, such as tapping it, the phone can display a dialog box.

[0108] See Figure 4 The phone can display interface 401. Interface 401 is the phone's desktop. Interface 401 includes an icon 4011 for the voice assistant. In response to the user's click on icon 4011, the phone can display interface 402, which includes a dialog box 4021.

[0109] In dialog box 4021, the user can also enter a search request. In response to entering a search request in the dialog box, the phone can also display the search request in the dialog box, and search for image materials, thus triggering the start of the search.

[0110] Taking the example of the search prompt "image of the second daughter dancing," see below. Figure 4 When the phone displays interface 402, in response to the user's voice input "Help me generate a video of my second daughter dancing", the phone can display interface 403 (the same as interface 303 mentioned above), which also includes a dialog box 4031. The dialog box 4031 further includes the text 4032 of the dialogue "Help me generate a video of my second daughter dancing".

[0111] It should be noted that the dialog box in Method 1 (e.g., dialog box 3031) and the dialog box in Method 2 (e.g., dialog box 4021) can be the same dialog box. Therefore, in the dialog box of Method 1, the mobile phone can also respond to the user's input of an image search request and start the image search. Further details will not be elaborated here.

[0112] It should be understood that the above Figure 3 and Figure 4The illustrated user interface of the phone triggering the image search is merely illustrative and does not constitute any limitation on the user interface of the electronic device triggering the image search in the video generation method provided in this application embodiment. For example, in some implementations, in response to a user's triggering operation on any creative recommendation card displayed on the phone's user interface, such as a click operation, the phone can display a video creation dialog box (also simply referred to as a dialog box) and start a video creation conversation in the dialog box. Any user interface can be the desktop, the negative one screen, the lock screen, the application interface of a video application, the application interface of a chat application, etc. In the following, the display of a creative recommendation card on the phone's desktop is mainly used as an example to illustrate the solution of this application. The creative recommendation card displayed on the phone's user interface can be created in the following way: the phone displays the creative recommendation card after recognizing that at least one of the current time, current location, and images in the gallery application meets the conditions for video creation.

[0113] Below, in conjunction with Figures 5 to 10 A schematic diagram illustrating a scenario of the video generation method provided in the embodiments of this application.

[0114] In this embodiment, during the execution of the video generation method by the electronic device, the process may involve the user triggering the electronic device to stop the currently executing video generation-related task (referred to as Scenario 1), or it may not involve the user triggering the electronic device to stop the currently executing video generation-related task (referred to as Scenario 2). The tasks related to video generation are not specifically limited; for example, tasks related to video generation may include, but are not limited to, one or more of the following tasks: material search task, character confirmation task, material addition task, material deletion task, material selection task, video generation task, template change task, music change task, duration change task, and video saving task.

[0115] The user interfaces of the electronic devices involved in Scenario 1 and Scenario 2 will be described below.

[0116] Scenario 1: During the execution of the video generation method provided in the embodiments of this application by the electronic device, it does not involve the user triggering the electronic device to stop the currently executing video generation-related task.

[0117] In one example, taking the example of a voice assistant in an electronic device receiving a user's voice and directly generating a target video based on searched materials, this application describes the user interface of the electronic device involved in the video generation method provided in the embodiments of this application.

[0118] Please refer to Figure 4 Users can communicate via voice or text. Figure 4 After entering the text "Help me generate a video of my second daughter dancing" in dialog box 4031 of the user interface 403 shown, the electronic device displays... Figure 5The user interface 501 is shown. (As shown...) Figure 5 As shown, the dialog box 5011 of the user interface 501 displays the text "Searching for materials for you..." 5013, and a stop control 5014. The stop control 5014 is used to trigger the electronic device to stop the currently executing material search task. When the electronic device displays the user interface 501 to the user, and the user does not trigger the stop control 5014, the electronic device displays the material search results to the user. The material search results may include the text "Selected materials for the second daughter as follows" 5022 displayed in the dialog box 5021 of the user interface 502, and thumbnails of the materials 5023. The thumbnails of the materials 5023 display a "View All" control 50321, such as... Figure 5 The "View All" control 50321 indicates that 15 out of 20 clips have been selected. Optionally, the user can also increase or decrease the number of clips displayed in the thumbnail 5023 by triggering the "View All" control 50321.

[0119] In electronic device display Figure 5 After the user interface 502 is displayed, the user can trigger the video generation control 50232 shown in the material card 5023 of the user interface 502 to trigger the electronic device to execute the video generation task to generate the target video. Specifically, after the user triggers the video generation control 50232, the electronic device displays as follows: Figure 5 The user interface 503 is shown. The dialog box 5031 of the user interface 503 displays the text "Generate Video" 5032, the text "Analyzing Footage..." 5033, and a stop control 5034. The text 5033 indicates the progress of the video production, and the stop control 5034 is used to trigger the electronic device to stop the currently executing video generation task. The content in the text 5033 "Analyzing Footage..." can also be replaced with "Processing, please wait..." etc.

[0120] When the electronic device displays user interface 503 to the user, and the user does not trigger the stop control 5034 displayed in dialog box 5031 of user interface 503, the electronic device will display to the user as follows: Figure 5 The user interface 504 is shown. The dialog box 5041 of the user interface 504 displays the execution result corresponding to the video generation task. The execution result may include the text 5042 displayed in the dialog box 5041 of the user interface 504, "The video has been completed. Come and enjoy the little cutie's dance~", and a thumbnail of the target video 5043.

[0121] After a video is created, electronic devices can perform secondary editing. Different editing controls can be provided for different videos, allowing for targeted video editing.

[0122] In some implementations, an editing control is also displayed below the thumbnail 5043 of the target video. The editing control is used to trigger the electronic device to perform secondary editing on the target video corresponding to the thumbnail 5043. For example, the editing control includes at least one of the following controls: a control for adding text to the video, such as "Smart Caption" 5044 displayed in the user interface 504; a control for changing the video template, such as "Change Template" 5045 displayed in the user interface 504; a control for changing the background music, such as "Change Music" 5046 displayed in the user interface 504; and a control for adjusting the video duration, such as "Adjust Duration" 5047 displayed in the user interface 504.

[0123] In one example, taking the case where a voice assistant in an electronic device receives a user's voice, deletes or adds searched materials, and generates a target video based on the deleted or added materials, this application's embodiment of the video generation method involves the user interface of the electronic device.

[0124] In practical applications, when electronic devices display the above to users Figure 5 After the user interface 502 displays the thumbnail 5023 of the material, if the user needs to delete the portion of the material corresponding to the thumbnail 5023, the user can input a material deletion command to the voice assistant via voice or text. This material deletion command can be as follows: Figure 6 The user interface 601 displays the text "Please delete the third material" in dialog box 6011. Afterwards, the electronic device displays... Figure 6 The user interface 602 shown has a dialog box 6021 displaying the text "Processing, please wait..." 6022, and a stop control 6023, which is used to trigger the electronic device to stop the currently executing material deletion task.

[0125] When the electronic device displays user interface 602 to the user and the user does not trigger the stop control 6023 displayed in user interface 602, the electronic device will display to the user as follows: Figure 6 The user interface 603 is shown. A dialog box 6031 in user interface 603 displays the text "The 3rd material has been deleted for you. The deleted material is as follows" 6032, and thumbnails of the materials 6033. Thumbnails 6033 are thumbnails corresponding to 14 materials, which are the materials obtained after deleting the 3rd material from the 15 materials corresponding to the thumbnails of the materials shown in the aforementioned user interface 602.

[0126] In practical applications, when electronic devices display the above to users Figure 5After the user interface 502 displays the thumbnail 5023 of the material, if the user needs to add one or more materials to the thumbnail 5023, the user can input a material addition command to the voice assistant via voice or text. This material addition command can be as follows: Figure 7 The dialog box 7011 in the user interface 701 displays the text "Help me add material of my second daughter's smile" 7012. Afterwards, the electronic device displays... Figure 7 The user interface 702 shown has a dialog box 7021 displaying the text "Finding material for your second daughter's smile..." 7022, and a stop control 7023, which is used to trigger the electronic device to stop the currently executing material addition task.

[0127] When the electronic device displays user interface 702 to the user and the user does not trigger the stop control 7023 displayed in user interface 702, the electronic device will display to the user as follows: Figure 7 The user interface 703 is shown. The dialog box 7031 in user interface 703 displays the text "The footage of the second daughter smiling has been added and sorted chronologically" 7032, as well as thumbnails 7033 of the footage. Thumbnails 7033 are thumbnails corresponding to 20 footage items, which are obtained by adding 5 footage of the second daughter smiling, based on the 15 footage items corresponding to the thumbnails of the footage items shown in the user interface 502 described above.

[0128] In one example, taking the scenario where a voice assistant in an electronic device receives a user's voice, generates a target video based on searched materials, and then performs secondary editing on the generated target video as an example, this application's embodiment of the video generation method describes the user interface of the electronic device involved.

[0129] In electronic devices display such as Figure 5 After the target video thumbnail 5043 is displayed in dialog box 5041 of the user interface 504 shown, the user can trigger the smart caption control 5044 displayed in dialog box 5041 to trigger the electronic device to automatically generate text for the target video corresponding to the target video thumbnail 5043. Afterwards, the interface displayed by the electronic device can be as follows: Figure 8 The user interface 801 shown has a dialog box 8011 displaying the text 8013 of "Smart Caption" entered by the user, "Processing, please wait...", and a stop control 8015, wherein the stop control 8015 is used to trigger the electronic device to stop the smart caption task that is being executed.

[0130] When the electronic device displays the user interface 801, and the user does not trigger the stop control 8015 displayed in the user interface 801, the electronic device displays as follows: Figure 8 The user interface 802 is shown. The dialog box 8021 in user interface 802 displays the text "Birthday wishes have been generated for your field" 8022, a birthday greeting card 8023, and editing controls (i.e., a smart caption control, a template change control, a music change control, and a duration adjustment control). The birthday greeting card 8023 displays the birthday greeting text (i.e., "The best times are with you, happy birthday"), a "Change" control 80231, and a "Confirm" control 80232. The "Change" control 80231 triggers the electronic device to select at least one greeting from 10 options. After the user triggers the "Confirm" control 80232, the electronic device displays... Figure 8 The user interface 803 is shown. The dialog box 8031 ​​of the user interface 803 displays the text 8023 "Birthday wishes have been added for you", a thumbnail 8033 of the video with the added birthday wishes, and editing controls.

[0131] When a user needs to change the video template, video music, and video duration, the user can trigger the template change control 8034 displayed in dialog box 8031. Afterwards, the interface displayed on the electronic device will look like this. Figure 8 The user interface 804 displays the user-inputted text "Change Template" 8042 and an editing card 8043. The editing card 8043 displays controls for changing the template, changing the music, changing the duration, and drop-down menus for each control (e.g., drop-down menu 80431 for changing the music control in user interface 804, or drop-down menu 80521 for changing the duration control in user interface 805). After the user clicks on any of the drop-down menu controls displayed in the editing card 8043, the electronic device can display multiple functions corresponding to that control. The user can then select the appropriate function according to their needs. Figure 8 The user selection results displayed in dialog box 8041 in the user interface 804 shown include changing the "texture" of the template, such as... Figure 8 The user selection results displayed in dialog box 8051 in the user interface 805 shown also include changing the music type to "Romantic", and so on. Figure 8 The user interface 806 shown in the diagram displays a dialog box 8061 where the user selects a "Custom" control. Afterwards, a slider control (not shown in dialog box 8061) for adjusting the duration can be displayed in dialog box 8061. The user can define the duration by sliding this slider control. For example, the customized duration can be, but is not limited to, 45 seconds (s). After that, the electronic device displays... Figure 8The user interface 806 shown displays the user's selection results, which include the edit card 8062 displayed in the dialog box 8061 of the user interface 806 and the text 8063 "Change texture template, romantic music, adjust duration to 45s".

[0132] It should be understood that the above Figure 8 The example described illustrates the user interface displayed on an electronic device when a user triggers editing controls on the device's interface to perform secondary editing of a generated video. Optionally, the user can also directly input their secondary editing needs into the device's user interface via voice or text. In this implementation, the editing controls may not be displayed on the device's user interface.

[0133] Scenario 2: During the execution of the video generation method provided in the embodiments of this application by an electronic device, the user triggers the electronic device to stop the currently executing video generation-related task.

[0134] In this embodiment of the application, after the user triggers the electronic device to execute any one of the video generation-related tasks mentioned above, the user can trigger the stop control to stop the electronic device from executing any one of the tasks during the execution of the task.

[0135] Below, in conjunction with Figure 9 and Figure 10 For example, describe the user interface displayed by an electronic device in a scenario where a user triggers the electronic device to stop the video generation-related task while the electronic device is performing such a task.

[0136] In one example, the scenario is described where, after a user triggers the video generation control, and while the electronic device is performing the video generation task, the user then triggers the stop control to halt the task.

[0137] Please see Figure 9 The dialog box 5051 of the user interface 505 displayed on the electronic device shows the text "Generate Video" 5052, "Processing, please wait..." 5053, and the aforementioned stop control 5054. Based on the user interface 505, it can be seen that the electronic device is performing a video generation task. During the process of the electronic device performing the video generation task, after the user triggers the stop control 5054, the stop control 5054 will trigger the electronic device to stop the video generation task. Accordingly, after the electronic device stops the video generation task, it will display a stop message, which can be entered... Figure 9 The text "This answer has stopped" is displayed in dialog box 5071 in the user interface 507 shown in the figure.

[0138] If the user then wants to generate a video based on the materials previously searched by the electronic device, the user can enter the video generation command in dialog box 5071. The electronic device will then display the following... Figure 9 The user interface 508 is shown. A dialog box 5081 in the user interface 508 displays the text 5082 indicating that the user has entered "Generate Video". In response to the user's command to generate video, the electronic device displays the progress of the generated video, which can be... Figure 9 The text 5092 displayed in dialog box 5091 of the user interface 509 shown is "Processing...", or it could be... Figure 9 The dialog box 5101 in the user interface 510 shown displays the text "Analyzing material..." 5102. It should be understood that when the electronic device displays the user interface 509 to the user, and the user does not trigger the stop control displayed in the user interface 509, the electronic device will display the text "Analyzing material..." to the user. Figure 9 The user interface 510 is shown. When the electronic device displays the user interface 510 to the user, and the user does not trigger the stop control displayed in the user interface 510, the electronic device displays as shown... Figure 9 The user interface 511 is shown. The dialog box 5111 in the user interface 511 displays the execution result corresponding to the video generation task. The execution result may include the text 5112 of "The video has been completed. Come and enjoy the little cutie's dance~" displayed in the dialog box 511, and a thumbnail of the target video 5113.

[0139] In one example, the scenario is described where a user triggers a media deletion task, and while the electronic device is executing the task, the user then triggers a stop control to halt the deletion process.

[0140] Please see Figure 10 When the electronic device displays user interface 602 to the user and the user triggers the stop control 6023 displayed in user interface 602, the electronic device will display an interface including stop information to the user. This interface can be as follows: Figure 10 The user interface 604 shown may display the stop message as "This answer has stopped" text 6042. Optionally, thereafter, if the user wants to generate a video or delete footage, the user can enter a command to generate a video or delete footage in a dialog box 6041 to trigger the electronic device to execute the user input task.

[0141] It should be noted that the above Figure 9 and Figure 10The description only considers the user triggering a task stop during the electronic device's execution of video generation and media deletion tasks. Optionally, the user can also trigger a task stop during the electronic device's execution of other tasks mentioned above (e.g., media addition, media reordering, template replacement, or duration modification). The user interface of the electronic device involved in these processes will not be described in detail here.

[0142] It should be understood that the above Figures 5 to 10 The user interface of the electronic device shown is merely illustrative and does not constitute any limitation on the user interface of the electronic device to which the video generation method provided in this application embodiment is adapted. For example, the above... Figures 5 to 10 The materials shown can be still images, animated images, or videos, etc.

[0143] Below, in conjunction with Figures 11 to 13 This application describes a video generation method provided by an embodiment. Exemplary examples include, but are not limited to, electronic devices used in this application embodiment. Figure 1 The illustrated electronic device 100. It is understood that the video generation method provided in this application embodiment includes the following processes: a process in which the electronic device performs a material search task (abbreviated as Process 1); a process in which the electronic device performs a material deletion task and stops the currently executing material search task (abbreviated as Process 2); and a process in which the electronic device performs a video generation task (abbreviated as Process 3). It is understood that the electronic device sequentially executes Process 1, Process 2, and Process 3 as described above.

[0144] Process 1

[0145] Below, in conjunction with Figure 11 This application describes the process of an electronic device performing a material search task, as provided in an embodiment. For example... Figure 14 As shown, the process includes S1101 to S1129. The following is a detailed description of S1101 to S1129.

[0146] S1101, the user inputs voice 1 "Make a video of my second daughter dancing" into the dialogue interface provided by YOYO Assistant in the electronic device.

[0147] YOYO Assistant's chat interface can be like... Figure 4 The user interface 402 shown allows the user to trigger the dialogue interface provided by the YOYO Assistant in the electronic device using the method described above.

[0148] Optionally, the aforementioned user voice 1 can also be replaced with user text 1, which is the text that includes the video of the second daughter's dance. In this implementation, the user can input user text 1 into the dialog interface using the keyboard provided by the dialog interface.

[0149] S1102, after receiving user voice 1, YOYO Assistant displays interface 0 containing text corresponding to user voice 1, and generates analysis instruction 1 (carrying user voice 1) based on user voice 1.

[0150] For example, interface 0 could be Figure 4 The user interface 403 shown can contain text corresponding to user voice 1. Figure 4 The text shown is 4032, which reads "Help me generate a video of my second daughter dancing".

[0151] Analysis instruction 1 is used to instruct semantic analysis and intent analysis to be performed on user voice 1 in order to extract the user intent corresponding to user voice 1, as well as information such as time, location, person and event corresponding to user voice 1.

[0152] S1103, YOYO Assistant sends analysis command 1 to the language model.

[0153] Language models can be neural network models, while speech models can perform semantic and intent analysis on user-input text or speech.

[0154] The language model can be a module located in YOYO Assistant, or it can be a module located outside of YOYO Assistant; there are no specific limitations on this.

[0155] S1104, after receiving the analysis instruction 1, the language model analyzes and processes the user's speech 1 to obtain the analysis result 1 (carrying creative intent and semantic information 1).

[0156] Analysis result 1 carries creative intent and semantic information 1. Creative intent refers to the intention to create the video, and semantic information 1 includes information such as time, location, person, and event corresponding to user voice 1.

[0157] If the user's voice 1 is "Help me generate a video of my second daughter dancing", then semantic information 1 can include information that the person is "second daughter" and the event is "dancing".

[0158] S1105, after the speech model obtains analysis result 1, it sends analysis result 1 to the YOYO assistant.

[0159] S1106, after receiving analysis result 1, YOYO Assistant generates material search command 1 (carrying session identifier 1 and semantic information 1) based on analysis result 1.

[0160] The material search command 1 is used to instruct the search for materials that match semantic information 1.

[0161] Session identifier 1 is used to identify the session page for the video corresponding to the user's voice 1. It should be understood that different videos will have different session identifiers.

[0162] For example, user voice A is used to instruct the creation of a video about traveling in Beijing, and user voice B is used to instruct the creation of a video about traveling in Xi'an. The video created by user voice A is different from the video created by user voice B. Based on this, the session identifier A corresponding to user voice A and the session identifier B corresponding to user voice B are two different session identifiers.

[0163] S1107, after YOYO Assistant generates material search command 1, it triggers the media platform to initialize the creation service. Correspondingly, the media platform initializes the creation service.

[0164] Initializing a creation service refers to creating a creation service within the media platform.

[0165] The above description uses the example of YOYO Assistant generating material search command 1, which triggers the creation of a creation service by the media platform. In this embodiment, the timing of the creation of the creation service by the media platform is not specifically limited. For example, the media platform may also perform the step of creating the creation service before executing the video generation method provided in this embodiment.

[0166] S1108, after the media platform initializes the creation service, it initializes the task queue.

[0167] Initializing a task queue refers to creating a task queue.

[0168] The preceding text describes the initialization of the task queue after the media platform initializes the creation service as an example. In this embodiment, the timing of the media platform creating the task queue is not specifically limited. For example, the media platform may also perform the step of creating the task queue before executing the video generation method provided in this embodiment.

[0169] S1109, YOYO Assistant sends material search command 1 to the creation service (carrying session identifier 1 and semantic information 1).

[0170] After executing step S1107, the electronic device then executes step S1108. The execution order of steps S1107 and S1109 is not critical; they can be processed in parallel or sequentially. In sequential processing, step S1109 can be executed first, followed by step S1107, or vice versa.

[0171] S1110, after receiving the material search command 1, the creation service generates a creation task instruction 1 based on the material search command 1. The creation task instruction 1 is used to instruct the creation of material search task 1 (carrying session ID 1, task identifier 1, semantic information 1 and task sequence number 1).

[0172] Task identifiers are used to identify the tasks associated with the generated video. There can be multiple tasks associated with the generated video. There is no specific limitation on the tasks associated with the generated video. For example, tasks associated with generating video may include a material search task, a character confirmation task, a material deletion task, and a video generation task.

[0173] The different task types mentioned above correspond to different task identifiers. For example, Table 1 below shows a correspondence between task types and task identifiers provided in an embodiment of this application. For ease of description, the correspondence between task types and task identifiers discussed below will be described using the content shown in Table 1 as an example. It should be understood that the correspondence between task identifiers and task types shown in Table 1 below is merely illustrative and does not constitute any limitation.

[0174] Table 1: Task Identifier, Task Type, and Whether the Task is Added to the Task Queue

[0175] Task Identifier Task type Should the task be added to the task queue? Task Identifier 1 Material Search yes Task Identifier 2 Character confirmed yes Task Identifier 3 Material addition yes Task Identifier 4 Material deletion yes Task Identifier 5 Selected materials yes Task Identifier 6 Generate video yes Task Identifier 7 Change template yes Task Identifier 8 Change music yes Task Identifier 9 Adjust duration yes Task Identifier 10 Save video yes

[0176] Table 1 above also shows information on whether tasks are added to the task queue. According to Table 1, in this embodiment, before the electronic device executes tasks associated with video generation, all tasks associated with video generation must first be added to the task queue created by the electronic device. Then, the tasks in the task queue are executed sequentially according to the order in which they entered the task queue.

[0177] In this embodiment of the application, a user command (e.g., user voice 1) is converted into a corresponding user task (e.g., material search task 1). Each user task corresponds to a task number, and the task number corresponding to each user task is related to the order in which the authoring service receives the user command corresponding to the user task.

[0178] In one example, the task number of the user task corresponding to the user command received first by the authoring service is less than the task number of the user task corresponding to the user command received later by the authoring service. For example, in a scenario where YOYO Assistant receives user voice A and then user voice B, user voice A corresponds to user command A, and user voice B corresponds to user command B. Based on this, the task number of the user task corresponding to user command A is less than the task number of the user task corresponding to user command B. For example, the task number of the user task corresponding to user command A is task number 1, and the task number of the user task corresponding to user command B is task number 2.

[0179] It should be noted that in scenarios where YOYO Assistant receives the same type of task (e.g., material search task) multiple times, the task identifier (e.g., task identifier 1) is the same each time the same type of task is received, but the task sequence number of any two of the multiple times the same type of task is received is different.

[0180] For example, in a scenario where YOYO Assistant receives a media deletion task A and then receives another media deletion task B, the task identifiers for media deletion task A and media deletion task B are the same, i.e., both are task identifier 4. However, the task sequence number A for media deletion task A is different from the task sequence number B for media deletion task B. The task sequence number A can be less than the task sequence number B.

[0181] S1111, the creation service sends a creation task instruction 1 to the creation task located in the media center.

[0182] A creation task can be understood as a class, based on which one or more task instances (referred to as tasks) can be created.

[0183] S1112 After receiving the creation task instruction 1, the creation task creates material search task 1 (carrying session identifier 1, task identifier 1, semantic information 1 and task sequence number 1) according to the creation task instruction 1.

[0184] S1113, After creating the material search task 1, the creation task sends the material search task 1 to the creation service.

[0185] S1114, after receiving the material search task 1, the creation service sends the material search task 1 to the task queue.

[0186] In this embodiment of the application, after the electronic device executes the above steps S1110 to S1115, it can successfully convert the material search command 1 in step S1110 into a task located in the task queue, that is, abstract the material search command 1 into a task, so that the electronic device can sequentially execute the tasks in the task queue to realize media creation (i.e., generate video).

[0187] S1115, after the task queue receives the material search task 1, it adds the material search task 1 to the end of the task queue.

[0188] The task queue stores specific tasks (also known as task instances), such as, but not limited to, material search task 1.

[0189] There is no specific limit to the number of tasks that can be stored in the task queue. For example, if a task is stored in the task queue and has not yet been completed, and then a new task is added to the task queue, then the number of tasks stored in the task queue is 2.

[0190] For example, if a material search task 1 is added to the task queue before it is completed, and a new task (e.g., a material deletion task) is added to the task queue, then the number of tasks in the task queue can be two. Conversely, if a material search task 1 is added to the task queue before it is completed, and no new task is added to the task queue, then the number of tasks in the task queue can be one.

[0191] The tasks in the task queue are ordered according to the sequence of user commands received by the electronic device. Tasks in the task queue are executed sequentially according to their order in the queue. The next task in the task queue can only be executed after the previous one has been completed.

[0192] The execution order of tasks in the task queue is sorted according to the order in which user instructions associated with the task are received. This ensures that the electronic device executes multiple tasks corresponding to multiple user instructions in the task queue in the order in which the user input the user instructions. It also ensures that the electronic device executes the task corresponding to the first received user instruction in the task queue after completing the task corresponding to the first received user instruction in the task queue, and then executes the task corresponding to the user instruction received after the first received user instruction in the task queue. This allows the generation of videos that meet user needs and improves the user experience.

[0193] In one example, after the first task in the task queue is completed, it is deleted so that the next task that was originally the first task becomes the new first task in the task queue. Then, the new first task is executed, thus achieving the purpose of executing the tasks in the task queue in the order they are arranged in the task queue.

[0194] For example, if an electronic device receives user command A and user command B sequentially, the tasks in the task queue will sequentially include user task A corresponding to user command A and user task B corresponding to user command B. The electronic device will first execute user task A in the task queue. After executing user task A, it will delete task A from the task queue, making task B the first task in the task queue. Then, the first task in the task queue (i.e., task B) will be executed.

[0195] In another example, after the first task in the task queue is completed, the next task following it can be executed, thus achieving the goal of executing tasks in the task queue according to their order of arrangement. This implementation does not involve deleting completed tasks from the task queue; however, to distinguish which tasks have been executed and which have not, a status can be set for each task in the queue, indicating whether the task has been executed or not.

[0196] For example, if an electronic device receives user command A and user command B in sequence, the tasks in the task queue will sequentially include user task A corresponding to user command A and user task B corresponding to user command B. The electronic device will first execute user task A in the task queue, and after executing user task A, it will execute the next user task B in the task queue that follows user task A.

[0197] After executing step S1115 above, the task queue includes material search task 1, and material search task 1 is the first task in the task queue, that is, the current task queue does not include any other tasks other than material search task 1.

[0198] S1116, the task queue sends task number 1 to the creation service.

[0199] S1117, After receiving task number 1, the creation service records the current task number as task number 1.

[0200] After the creation service records the current task number as task number 1, it can know that the currently executing task is the material search task 1 corresponding to task number 1.

[0201] S1118, the creation service sends execution result A1 (carrying information about searching for materials for you) to YOYO Assistant.

[0202] S1119, YOYO Assistant displays interface 1, including "Searching for materials for you," based on execution result A1.

[0203] Interface 1 may also include a stop control for stopping material search task 1.

[0204] For example, interface 1 could be Figure 5 The user interface 501 shown has a dialog box 5011 displaying the text "Searching for materials for you..." 5013, and a stop control 5014 for stopping material search task 1.

[0205] S1120, the task queue takes the first task in the task queue (i.e. material search task 1) and schedules it for execution.

[0206] As mentioned earlier, the task queue includes material search task 1, and material search task 1 is the first task in the task queue.

[0207] S1121, the task queue calls the material search task 1 in the creation task.

[0208] S1122, The creation task is based on task identifier 1 of material search task 1, and the material search task is started.

[0209] As mentioned earlier, the material search task 1 carries task identifier 1 and semantic information 1. Based on this, after the task queue calls the material search task 1 in the creation task, the creation task executes the material search task based on the task identifier 1 of the material search task 1. For example, the creation task can execute material search task 1 on the images stored in the image library of an electronic device to search for complete materials (e.g., images or videos) that match the semantic information 1.

[0210] S1123, the creation task sends the execution result A2 (carrying multiple finished images) to the creation service.

[0211] The execution result A2 carries multiple images, which are images that match semantic information 1. These multiple images can be images stored in the image library of an electronic device.

[0212] It should be understood that steps S1118 and S1119 are executed after step S1117, and steps S1120, S1121, and S1122 are executed after step S1115. However, there is no specific limitation on the execution order of steps S1118 and S1120. For example, step S1118 can be executed first, followed by step S1120, or step S1120 can be executed first, followed by step S1118.

[0213] S1124 After receiving the execution result A2, the creation service checks whether the material search task 1 corresponding to the task number 1 of the current task is in a stopped state.

[0214] In this embodiment of the application, the creation service records information on whether the task corresponding to the task number is in a stopped state. Based on this, after receiving the execution result A2, the creation service can check whether the material search task 1 corresponding to the task number 1 of the current task is in a stopped state.

[0215] S1125, if the creation service detects that the material search task 1 corresponding to the current task's task number 1 is not in a stopped state, it determines that the execution result A2 is effective.

[0216] In this embodiment of the application, during the execution of step S1122 of the creation task, if the YOYO Assistant does not receive a command from the user to stop the ongoing material search task 1, then after the creation service receives the execution result A2, it checks that the task corresponding to task number 1 of the current task has not been stopped.

[0217] It should be noted that steps S1124 and S1125 above are described using the example that the material search task 1 corresponding to task number 1 of the current task is in an ongoing state. In some implementations, if the creation service detects that the material search task 1 corresponding to task number 1 of the current task is in an ongoing state, it determines that the execution result A2 is ineffective. In this implementation, steps S1126 to S1129 below will not be executed after step S1125.

[0218] S1126 After the creation service confirms that the execution result A2 has taken effect, it sends an update session status instruction 1 (carrying multiple finished images) to the session status module.

[0219] The Update Session Status instruction 1 is used to indicate that multiple images associated with session identifier 1 should be saved.

[0220] S1127, after receiving the update session status instruction 1, the session status module saves the multiple finished images associated with session identifier 1.

[0221] The session status module can save the execution result A2 (i.e., multiple finished footage) of material search task 1, so that when generating a video later, the creation task can obtain the execution result A2 of material search task 1 from the session status module.

[0222] It should be understood that the session status module can also store the association between session identifier 1 and multiple finished video clips. In this way, the session status module can know that the associated clips include multiple finished video clips based on session identifier 1.

[0223] S1128, the creation service sends execution result A2 (containing multiple finished images) to YOYO Assistant.

[0224] S1129, after receiving the execution result A2, YOYO Assistant displays interface 2, which includes multiple finished images, based on the execution result A2.

[0225] Interface 2 may also include a video generation control and a view all controls. The video generation control is used to trigger the electronic device to generate a target video based on the multiple finished footage images displayed in Interface 2. The view all controls are used to trigger the electronic device to display multiple finished footage images.

[0226] For example, interface 2 could be Figure 5 The dialog box 5021 in the user interface 502 displays thumbnails 5023 of the materials, which include 15 materials.

[0227] It should be understood that the above Figure 11 The illustrated process is for illustrative purposes only and does not constitute any limitation on the video generation method provided in the embodiments of this application.

[0228] Process Two

[0229] Below, in conjunction with Figure 12 This application describes the process of executing a material deletion task according to embodiments, as well as the process of executing a stop task during the material deletion task. Figure 12 As shown, the process includes S1201 to S1227. S1201 to S1227 will be described in detail below.

[0230] S1201, the user inputs voice 2 "Help me delete the third material" into the interface 2 provided by YOYO Assistant in the electronic device.

[0231] User voice 2 is specifically used to instruct the deletion of the third piece of footage from the multiple finished images obtained after performing the material search task 1.

[0232] The above S1201 step is described using the example of a user specifying the deletion of a certain material. Optionally, the user can specify the number of materials to be deleted. Subsequently, the electronic device automatically determines which materials from the multiple finished images obtained after performing material search task 1 need to be deleted based on the number of materials to be deleted and a predefined deletion algorithm.

[0233] S1202, after receiving the user's voice 2, YOYO Assistant displays interface 3 containing the text corresponding to the user's voice 2, and generates analysis instruction 2 (carrying the user's voice 2) based on the user's voice 2.

[0234] Analysis instruction 2 is used to instruct semantic analysis and intent analysis to be performed on user voice 2 in order to extract the user intent corresponding to user voice 2, as well as information such as time, location, person and event corresponding to user voice 2.

[0235] For example, interface 3 could be Figure 6 The user interface 601 shown can be the text 6012 of "Help me delete the third material" shown in the dialog box 6011 in the user interface 601.

[0236] S1203, YOYO Assistant sends analysis command 2 to the language model.

[0237] S1204, after receiving the analysis instruction 2, the language model analyzes and processes the user's speech 2 to obtain the analysis result 2 (carrying the material adjustment intention and semantic deletion information 2).

[0238] Carrying material adjustment intent and semantic information 2, wherein the material adjustment intent is the intent to delete material, and the semantic information 2 may include the event of "deleting the third material".

[0239] S1205, after the speech model obtains analysis result 2, it sends analysis result 2 to the YOYO assistant.

[0240] S1206, after receiving analysis result 2, YOYO Assistant generates material deletion command 2 (carrying session identifier 1 and semantic deletion information 2) based on analysis result 2.

[0241] S1207, YOYO Assistant sends material deletion command 2 to the creation service (carrying session identifier 1 and semantic deletion information 2).

[0242] The material deletion command 2 is used to instruct the deletion of materials related to semantic deletion information 2 from multiple finished materials associated with session identifier 1. The multiple finished materials associated with session identifier 1 include multiple finished materials stored in the session state module mentioned above.

[0243] For example, if the session identifier 1 stored in the session state module is associated with multiple finished films including 5 films, and the semantic deletion information 2 includes an event to delete the 3rd film, then the film deletion command 2 is specifically used to instruct the deletion of the 3rd film out of the 5 films.

[0244] S1208, after receiving the material deletion command 2, the creation service generates a creation task instruction 2 based on the material deletion command 2. The creation task instruction 2 is used to instruct the creation of material deletion task 2 (carrying session identifier 1, task identifier 4, semantic deletion information 2, and task sequence number 2). Task sequence number 2 is related to the previous... Figure 11 The task number 1 in the provided method is different; task number 2 is the next task number after task number 1.

[0245] In this embodiment, since the user voice 2 corresponding to the material deletion task 2 is a user command received by the electronic device after receiving the user voice 1 corresponding to the material search task 1, the task number 2 corresponding to the material deletion task 2 is greater than the task number 1 corresponding to the material search task 1. S1209, the creation service sends a creation task instruction 2 to the creation task located in the media platform.

[0246] S1210, after receiving the creation task instruction 2, the creation task creates material deletion task 2 (carrying session identifier 1, task identifier 4, semantic deletion information 2 and task sequence number 2) according to the creation task instruction 2.

[0247] S1211, After creating the material deletion task 2 in the creation task, send the material deletion task 2 to the creation service.

[0248] S1212, after receiving the material deletion task 2, the creation service sends the material deletion task 2 to the task queue.

[0249] S1213, after the task queue receives the material deletion task 2, it adds the material deletion task 2 to the end of the task queue.

[0250] S1214, the task queue sends task number 2 to the creation service.

[0251] S1215, after receiving task number 2, the creation service records the current task number as task number 2.

[0252] The current task number refers to the task number corresponding to the task that the electronic device is currently executing. It can be seen that the task that the electronic device is currently executing is the material deletion task 2 corresponding to task number 2.

[0253] S1216, the creation service sends the execution result B1 (carrying information about being processed) to the YOYO assistant.

[0254] S1217, YOYO Assistant displays interface 4, including "Processing, please wait...", based on execution result B1.

[0255] For example, interface 4 could be Figure 6 The user interface 602 shown has a dialog box 6021 displaying the text "Processing, please wait..." 6022.

[0256] S1218, the task queue takes the first task in the task queue (i.e., material deletion task 2) and schedules it for execution.

[0257] S1219, the task queue retrieves the material deletion task 2 from the creation task.

[0258] S1220, after receiving the call to delete material task 2, the creation task retrieves multiple finished images from the session status module.

[0259] As mentioned earlier, the session status module stores multiple finished images associated with session identifier 1. Based on this, after the creation task receives the call for material deletion task 2, it can obtain multiple finished images from the session status module.

[0260] S1221, the creation task is based on task identifier 4 of material deletion task 2, and begins to perform material deletion tasks on multiple finished images.

[0261] It should be understood that steps S1216 and S1217 are executed after step S1215, and steps S1218, S1219, S1220, and S1221 are executed after step S1213. However, there is no specific limitation on the execution order of steps S1216 and S1218. For example, step S1216 can be executed first, followed by step S1218, or step S1218 can be executed first, followed by step S1216.

[0262] If the user triggers the stop control used to stop the material deletion task during the execution of step S1221 of the creation task, steps S1222 to S1228 below can also be executed.

[0263] S1222, the user triggers the stop control in interface 4 provided by YOYO Assistant.

[0264] For example, interface 4 could be Figure 6 The user interface 602 is shown, and a stop control 6023 is displayed in a dialog box 6021 of the user interface 602. Clicking the stop control 6023 will trigger the stop control 6023.

[0265] S1223, in response to the user triggering the stop control in interface 4, YOYO Assistant ends the "Processing, please wait..." displayed in interface 4, and displays the stop information in interface 5.

[0266] For example, interface 4 could be Figure 10 The user interface 602 is shown, and a stop control 6023 is displayed in a dialog box 6021 of the user interface 602. The user can trigger the stop control 6023 by clicking it. Afterwards, the electronic device displays... Figure 10 The user interface 604 shown (i.e., an example of interface 5) displays the text 6042 "This answer has stopped" (i.e., a stop message) in a dialog box 6041 of the user interface 604.

[0267] S1224, YOYO Assistant sends a stop command 1 to the Creation Service.

[0268] The stop command 1 is used to instruct the currently executing material deletion task 2 to be stopped.

[0269] S1225, after receiving the stop command, the creation service sets the material deletion task 2 corresponding to the current task number 2 to the stop state according to the stop command 1.

[0270] Based on task number 2 and stop command 1, the creation service can set the status of task 2 (the material deletion task indicated by stop command 1) to the stopped state.

[0271] S1226, the creation task sends the execution result B2 (carrying the deleted final footage) to the creation service.

[0272] The deleted final footage refers to the footage obtained after deleting the third final footage from a set of multiple final footage images.

[0273] S1227 After receiving the execution result B2, the creation service determines that the execution result B2 is ineffective if the material deletion task 2 corresponding to task number 2 is in a stopped state.

[0274] In this embodiment, after the user inputs stop command 1 to YOYO Assistant, the creation task will still execute material deletion task 2 and obtain execution result B2 after executing material deletion task 2. However, whether execution result B2 needs to be displayed to the user through the interface provided by YOYO Assistant depends on whether material deletion task 2 is set to a stopped state. Specifically, during the process of the electronic device executing the above-mentioned material deletion task 2, the electronic device receives stop command 1. Therefore, the execution result B2 of the electronic device executing material deletion task 2 does not take effect. That is, after executing the above steps S1201 to S1207, the materials stored in the session state module still include those from the previous steps. Figure 11The provided process yields multiple finished images.

[0275] It should be understood that the above Figure 12 The process shown is merely illustrative and does not constitute any limitation on the video generation method provided in the embodiments of this application. It should be noted that the above... Figure 12 The method shown is illustrated using the example where the creation task continues to execute the material deletion task 2 even after the user triggers the stop control in interface 4 provided by YOYO Assistant. Optionally, after the user triggers the stop control in interface 4 provided by YOYO Assistant, they can directly stop the material deletion task 2 that is currently being executed in the creation task.

[0276] Process 3

[0277] Below, in conjunction with Figure 13 This application describes the process by which an electronic device, according to embodiments of the present application, performs a video generation task. For example... Figure 13 As shown, the process includes S1301 to S1334. The following is a detailed description of S1301 to S1334.

[0278] S1301, the user inputs the user voice 3 "Generate video" into the interface 5 provided by YOYO Assistant in the electronic device.

[0279] For example, interface 5 could be Figure 10 The user interface shown is 604.

[0280] S1302, after receiving the user's voice 3, YOYO Assistant displays the interface 6 containing the text corresponding to the user's voice 3, and generates analysis instructions 3 (carrying the user's voice 3) based on the user's voice 3.

[0281] For example, interface 6 could be Figure 10 The user interface 605 shown displays the text "Generate Video" entered by the user in its dialog box 6051. For example, interface 6 could be... Figure 9 The user interface 508 shown has a dialog box 5081 displaying the text "Generate Video" entered by the user 5082.

[0282] S1303, YOYO Assistant sends analysis command 3 to the language model.

[0283] S1304, after receiving the analysis instruction 3, the language model analyzes and processes the user's speech 3 to obtain the analysis result 3 (carrying the intention to generate video).

[0284] The intent to generate a video is the intention used to create or generate a video.

[0285] S1305, after the speech model obtains analysis result 3, it sends analysis result 3 to the YOYO assistant.

[0286] S1306, after receiving analysis result 3, YOYO Assistant generates video generation instruction 3 (carrying session identifier 1) based on analysis result 3.

[0287] The video generation instruction 3 is used to instruct the generation of a video based on the pre-recorded footage associated with session identifier 1. The pre-recorded footage associated with session identifier 1 includes multiple pre-recorded clips stored in the session state module mentioned above. For example, if the pre-recorded footage associated with session identifier 1 stored in the session state module includes 15 clips, the video generation instruction 3 is specifically used to instruct the generation of a video based on these 15 clips.

[0288] S1307, YOYO Assistant sends video generation command 3 (carrying session identifier 1) to the creation service.

[0289] S1308 After receiving the video generation instruction 3, the creation service generates a creation task instruction 3 based on the video generation instruction 3. The creation task instruction 3 is used to instruct the creation of video generation task 3 (carrying session identifier 1, task identifier 6 and task sequence number 3).

[0290] Task number 3 and the preceding text Figure 11 The task number 1 in the provided method is different from that in the previous text. Figure 12 The task number 2 in the provided method is different; task number 3 is the next task number after task number 2.

[0291] S1309, The creation service sends a creation task instruction 3 to the creation task located in the media center.

[0292] S1310, after receiving the creation task instruction 3, the creation task creates a video generation task 3 (carrying session identifier 1, task identifier 6 and task sequence number 3) according to the creation task instruction 3.

[0293] S1311 After the creation task generates video task 3, send the generated video task 3 to the creation service.

[0294] S1312, after receiving the video generation task 3, the creation service sends the video generation task 3 to the task queue.

[0295] S1313 After receiving the video generation task 3, the task queue adds the video generation task 3 to the end of the task queue.

[0296] S1314, The task queue sends task number 3 to the creation service.

[0297] S1315, after receiving task number 3, the creation service records the current task number as task number 3.

[0298] The current task number refers to the task number corresponding to the task that the electronic device is currently executing. That is, the task that the electronic device is currently executing is the video generation task 3 corresponding to task number 3.

[0299] S1316, the creation service sends the execution result C1 (carrying information about being processed) to the YOYO assistant.

[0300] S1317, YOYO Assistant displays an interface 7 including "Processing, please wait..." based on the execution result C1.

[0301] Interface 7 may also include a stop control for stopping the generation of video task 3.

[0302] For example, interface 6 could be Figure 9 The user interface 508 shown, interface 7 can be Figure 9 The user interface 509 is shown, and the dialog box 5091 of the user interface 509 displays the text "Processing" 5092. The stop control 5093 is shown in the dialog box 5091.

[0303] S1318, the task queue takes the first task in the task queue (i.e., video generation task 3) and schedules it for execution.

[0304] S1319, the task queue calls the video generation task 3 in the creation task.

[0305] S1320, after receiving the call to generate video task 3, the creation task obtains multiple finished video materials associated with session identifier 1 from the session status module.

[0306] S1321, Initialize the editing application for the creation task (carrying multiple finished footage images).

[0307] S1322, The editing application begins to generate the target video based on multiple finished footage images.

[0308] It should be understood that steps S1316 and S1317 are executed after step S1315, and steps S1318 to S1322 are executed after step S1313. However, there is no specific limitation on the execution order of steps S1316 and S1318. For example, step S1316 can be executed first and then step S1318, or step S1318 can be executed first and then step S1316.

[0309] S1323, The editing application notifies the creation service of the final film's progress.

[0310] The video production progress *i* refers to the progress of video generation, where *i* = 1, 2, ..., N, and N is an integer. In this application, steps S1323 to S1328 above constitute a loop process, and the number of times this loop process is executed is equal to the value of N. For example, if N equals 2, then the number of loops is 2.

[0311] The final video progress 'i' is not specifically limited; for example, it could be a percentage progress bar indicating the progress of the video generation task. For instance, the final video progress 'i' could indicate any of the following: analyzing footage, adding effects, or adding music.

[0312] S1324 After receiving the final film progress i, the creation service notifies the creation service of the final film progress i.

[0313] S1325, after the creation service receives the final progress i, it checks whether the video generation task 3 corresponding to the current task number 3 has stopped.

[0314] S1326, if the current task number 3 corresponds to the video generation task 3, and the video generation task 3 is not stopped, the creation service confirms that the final video progress i is effective.

[0315] S1327, After the creation service confirms the completion progress i is effective, notify YOYO Assistant of the completion progress i.

[0316] S1328, after YOYO Assistant receives the film completion progress i, it displays an interface that includes the content indicated by the film completion progress i.

[0317] YOYO Assistant displays an interface that includes the content indicated by the film completion progress i, which is associated with the number of loops performed in steps S1323 to S1328 described above.

[0318] Specifically, in the first loop (i=1), the YOYO Assistant displays an interface including the content indicated by the final progress 1, which may include the following steps: The YOYO Assistant updates "Processing" in interface 7 to the content indicated by final progress 1. In the second loop (i=2), the YOYO Assistant displays an interface including the content indicated by final progress 1, which may include the following steps: The YOYO Assistant updates the content indicated by final progress 1 in interface 7 to the content indicated by final progress 2. And so on.

[0319] For example, assuming N equals 2, after executing the first loop, the YOYO Assistant display could show an interface including the content indicated by the film completion progress 1. Figure 9 The user interface 509 shown; after executing the second loop process, the YOYO Assistant displays an interface that includes the content indicated by the film completion progress 2. Figure 9 The user interface 510 is shown.

[0320] S1329, The editing application sends a completion notification (with the target video) to the creation task.

[0321] The completion notification indicates that the target video has been successfully generated from multiple footage clips associated with session identifier 1. The completion notification can carry the target video generated from the multiple footage clips associated with session identifier 1.

[0322] S1330: After receiving the completion notification, the creation task sends a completion notification (carrying the target video) to the creation service.

[0323] S1331, after receiving the completion notification, the creation service confirms that the completion notification is effective after checking that the video generation task 3 corresponding to the current task number 3 is not stopped.

[0324] S1332, the authoring service sends an update session state instruction 2 to the session state module.

[0325] The update session state command 2 is used to save the target video associated with session identifier 1. The update session state command 2 can carry the script file of the target video and the cover of the target video.

[0326] S1333, the creation service sends a completion notification (including the target video) to YOYO Assistant.

[0327] There is no specific limitation on the execution order of the above steps S1333 and S1332. For example, step S1333 can be executed first and then step S1332, or step S1332 can be executed first and then step S1333.

[0328] S1334, after receiving the completion notification, YOYO Assistant displays an interface including a thumbnail of the target video.

[0329] The content displayed on the interface, including the thumbnail of the target video, is not specifically limited. For example, the interface may also display other information, which may be, but is not limited to, editing controls or text information.

[0330] For example, an interface that includes a thumbnail of the target video could be Figure 9 The user interface 511 shown contains a dialog box 5111 displaying a thumbnail 5113 of the target video.

[0331] It should be noted that the above Figure 13The provided method is described using the example of a user inputting a video generation command, and during the execution of the video generation task, the YOYO Assistant does not receive a user-input command to stop the video generation task. In other implementations, during the execution of the video generation task, the YOYO Assistant receives a user-input command to stop the video generation task. In this implementation, the YOYO Assistant will display a message to the user indicating that the video generation task has stopped. This message could be... Figure 10 The dialog box 6041 of the user interface 604 shown displays the text "Help you answer has stopped" 6042, indicating that in this implementation, YOYO Assistant does not show the user an interface including a thumbnail of the target video. The working principle of YOYO Assistant after receiving a stop task to stop the video generation task is similar to the previous description. Figure 12 The working principle of YOYO Assistant after receiving a stop task to stop the media deletion task is the same as shown here. For details not elaborated here, please refer to the above text. Figure 12 The content of steps S1222 to S1227.

[0332] It should be understood that the above Figures 11 to 13 The video generation method described in the embodiments of this application is merely illustrative and does not constitute any limitation on the video generation method provided in the embodiments of this application. Figures 11 to 13 The video generation method described in this application embodiment is exemplified by the creation task performing material search task 1, material deletion task 2, and video generation task 3. Optionally, in a scenario where the user inputs the aforementioned user voice 1 and user voice 3, the creation task can perform material search task 1 and video generation task 3. Figures 11 to 13 In the video generation method described in this application embodiment, the example given is that during the execution of material deletion task 2 in the creation task, the YOYO Assistant receives a stop command input by the user to stop material deletion task 2. Optionally, during the execution of other tasks in the creation task (e.g., material search task 1 or video generation task 2), the YOYO Assistant may also receive a stop command input by the user to stop other tasks.

[0333] Below, in conjunction with Figure 14 This application introduces another video generation method provided by an embodiment.

[0334] Figure 14 This is a schematic diagram illustrating a video generation method provided in an embodiment of this application. The video generation method provided in this embodiment can be executed by an electronic device. It is understood that the electronic device can be implemented as software, or a combination of software and hardware. For example, the electronic device in this embodiment can be, but is not limited to, […]. Figure 1The electronic device 100 is shown. (For example...) Figure 14 As shown, the video generation method provided in this application includes steps S1410 to S1450. Steps S1410 to S1450 will be described below.

[0335] S1410, the electronic device responds to the first user instruction and generates a first task, wherein the first task is used to instruct the search for a first material.

[0336] After receiving the first user instruction, the electronic device can generate a first task to instruct the search for the first material. The first user instruction is not specifically limited; for example, the first user instruction could be the one described above. Figure 11 User voice 1 in the provided method. In one example, an electronic device generates a first task in response to a first user instruction, including: the electronic device generating a first command in response to the first user instruction; and generating the first task based on the first command.

[0337] For example, the first command in the above implementation can be the one mentioned above. Figure 11 The provided method's material search command 1, the first task can be as described above. Figure 11 The material search task 1 in the provided method, and the process of the electronic device generating the first command and the first task, can be found in the above text. Figure 11 The relevant descriptions in the document will not be repeated here.

[0338] S1420, the electronic device saves the first task to the task queue, and the execution order of the tasks in the task queue is sorted according to the order of the user instructions associated with the received tasks.

[0339] The execution order of tasks in the task queue is based on the order in which user instructions associated with the received tasks are received. Tasks in the task queue are executed sequentially according to their order of arrangement. The next task in the task queue can only be executed after the previous task has been completed.

[0340] In one example, after the electronic device saves the first task to the task queue, the method further includes: if the first task is the first task in the task queue, the electronic device executes the first task to obtain the first material; if the first task is executed and no first stop command for stopping the first task is received, the electronic device confirms that the first material is effective; if the first material is effective, the electronic device displays a third interface, wherein the third interface includes the first material.

[0341] It should be noted that in this application, after the electronic device receives a stop command (for example, the first stop command mentioned above, the second stop command mentioned below, or the third stop command mentioned below), it will not convert the stop command into a corresponding task and save it in the task queue. In this way, it can be ensured that the electronic device can execute the stop command immediately after receiving it.

[0342] The aforementioned first material may include one or more materials, wherein the one or more materials may be images or videos, without specific limitations.

[0343] Optionally, the third interface may also include other controls, such as, but not limited to, a video generation control and a view all control. The video generation control is used to trigger the electronic device to generate the target video based on the first material displayed on the third interface, and the view all control is used to trigger the electronic device to display all the content of the first material.

[0344] Optionally, during the execution of the first task in the above implementation, the electronic device displays a fourth interface, which includes a first control and first execution information. The first control is used to trigger the execution of a first stop command, and the first execution information indicates that the first task is being executed.

[0345] The aforementioned fourth interface may also include other information, such as, but not limited to, the aforementioned first user instruction.

[0346] For example, the first material in the above implementation can be the text above. Figure 11 The execution result A2 of the provided method carries multiple finished images, and the third interface can be the one described above. Figure 11 Interface 2 in the provided method can use the material mentioned above as the first source. Figure 11 The execution result A2 contains multiple finished images; the fourth interface can be the one described above. Figure 11 In the provided method, the first control in interface 1 and the fourth interface can be the one mentioned above. Figure 11 The provided method includes a stop control in Interface 1 for stopping Material Search Task 1.

[0347] S1430, after the first task is completed, the electronic device generates a second task in response to a second user instruction, wherein the second task is used to instruct the generation of a first video based on the first material.

[0348] In one example, in addition to receiving the first and second user instructions, the electronic device can also receive a third user instruction. This third user instruction is received after the electronic device receives the first user instruction and before it receives the second user instruction. There are no specific limitations on the third user instruction; it can be set according to user needs. For example, the third user instruction could be, but is not limited to, "Delete the first material," "Add a material of the target type," or "Replace the third material."

[0349] In the above example, before the electronic device generates a second task in response to a second user instruction after the first task has been completed, the method further includes: the electronic device, in response to a third user instruction, saving the generated third task to a task queue after the first task has been completed, wherein the third task is a task for processing the first material; the electronic device generating a second task in response to a second user instruction after the first task has been completed includes: the electronic device generating a second task in response to a second user instruction after the first task has been completed and during the execution of the third task; the electronic device saving the second task to the task queue includes: saving the second task to the task queue during the execution of the third task, wherein the task queue includes the third task and the second task, the third task is the first task in the task queue, and the second task is the next task after the first task.

[0350] It should be noted that the above implementation method is illustrated by the example of the electronic device saving the second task to the task queue during the execution of the third task. In other implementation methods, after the electronic device has completed the execution of the third task, if the electronic device receives a second user instruction, it saves the second task to the task queue. In this implementation method, the task queue only contains the second task. For example, in this implementation method, the first user command can be as described above. Figure 11 In the provided method, user voice 1 and third-user commands can be as described above. Figure 12 In the provided method, the second user command can be the one mentioned above. Figure 13 The user voice 3 method provided can be found in the above text for its specific implementation process. Figures 11 to 13 The relevant descriptions in the provided video generation methods will not be repeated here.

[0351] The third task corresponds to the third user instruction, but there are no specific limitations on the third task. For example, if the third user instruction is "Help me delete the first material," the third task is the material deletion task. Similarly, if the third user instruction is "Help me add materials of the target type," the third task is the material addition task.

[0352] The third task mentioned above is the first task in the task queue, and the second task is the next task after the first task. That is, the third task is located in the task queue before the second task.

[0353] Optionally, after saving the second task to the task queue during the execution of the third task by the electronic device, the method further includes: after the third task in the queue is completed, deleting the third task from the task queue so that the second task becomes the first task in the task queue; and executing the second task when the second task is the first task in the task queue.

[0354] In the above implementation, after the first task in the task queue is completed, the first task is deleted so that the next task after the first task becomes the new first task in the task queue. Then, the new first task is executed, thereby achieving the purpose of executing the tasks in the task queue according to their order of arrangement.

[0355] For example, if an electronic device receives user command A and user command B sequentially, the tasks in the task queue will sequentially include user task A corresponding to user command A and user task B corresponding to user command B. The electronic device will first execute user task A in the task queue. After executing user task A, it will delete task A from the task queue, making task B the first task in the task queue. Then, the first task in the task queue (i.e., task B) will be executed.

[0356] Optionally, if the second task is the first task in the task queue, the electronic device executes the second task, including: if the second material obtained after the completion of the third task becomes effective, the electronic device generates a first video based on the second material, wherein the second material is material obtained by performing the third task on the first material, and the second material is invalid if no third stop command for stopping the third task is received during the execution of the third task; or, if the second task is the first task in the task queue, the electronic device executes the second task, including: if the second material obtained after the completion of the third task becomes invalid, the electronic device generates a first video based on the first material, wherein the second material is invalid if a third stop command is received during the execution of the third task.

[0357] Optionally, the electronic device may also perform the following steps: during the execution of the third task, displaying a fifth interface, wherein the fifth interface includes a third control; and receiving a third stop command in response to a trigger operation on the third control in the fifth interface.

[0358] For example, if the third task is to delete materials, the fifth interface mentioned above could be... Figure 10 The user interface 602 is shown.

[0359] S1440, the electronic device saves the second task to the task queue.

[0360] The electronic device saves the second task to the task queue, including: the electronic device saves the second task to the tail of the task queue.

[0361] S1450, the electronic device performs the second task to obtain the first video.

[0362] In one example, after the electronic device performs a second task to obtain the first video, the method further includes: confirming that the first video is effective while the electronic device is performing the second task and no second stop command for stopping the second task is received; and displaying a first interface on the electronic device when the first video is effective, wherein the first interface is the playback interface of the first video.

[0363] For example, the first interface mentioned above can be... Figure 13 The method provided includes a method for displaying an interface that includes a thumbnail of the target video in step S1334, where the first video is the target video in the interface that includes the thumbnail of the target video.

[0364] Optionally, the electronic device may also perform the following steps: during the execution of the second task by the electronic device, a second interface is displayed, wherein the second interface includes a second control and second execution information, the second control is used to trigger the execution of a second stop command, and the second execution information indicates that the second task is being executed.

[0365] For example, the second interface described above can be... Figure 13 In the provided method, step S1317, interface 7, the second control in the aforementioned second interface can be the one described above. Figure 13 The interface 7 in step S1317 of the provided method includes a stop control for stopping the generation of video task 3.

[0366] The preceding text described the method for an electronic device to execute S1410 to S1450 using an electronic device as the main example. Below, using the aforementioned electronic device, which includes a voice assistant, a media platform, and an editing application, and whose task queue is a queue within the media platform, we will describe the method for executing S1410 to S1450.

[0367] In one example, the electronic device generates a first task in response to a first user instruction, including: a voice assistant generating a first command in response to the first user instruction and sending the first command to a media platform, wherein the first command carries a first session identifier and first semantic information corresponding to the first user instruction; after receiving the first command, the media platform generates a first task, wherein the first task carries a first session identifier, a first task identifier corresponding to the first task, and first semantic information; the electronic device saves the first task to a task queue, including: the media platform saving the first task to a task queue; and upon completion of the first task, generating a second task in response to a second user instruction, including: the voice assistant generating a second task upon completion of the first task. The system responds to a second user instruction by generating a second command and sending the second command to the media platform, wherein the second command carries a first session identifier; after receiving the second command, the media platform generates a second task, wherein the second task carries the first session identifier and a second task identifier corresponding to the second task; the electronic device saves the second task to a task queue, including: the media platform saving the second task to the task queue; the electronic device executes the second task to obtain a first video, including: after the media platform calls the second task in the task queue, it sends a video generation instruction to the editing application based on the second task, wherein the video generation instruction carries first material; the editing application receives the video generation instruction and generates the first video based on the first material.

[0368] The aforementioned first session identifier is used to identify the session page corresponding to the creation of the video by the first user instruction. It should be understood that different videos will have different session identifiers. For example, user instruction A may instruct the creation of a video about traveling in Beijing, while user instruction B may instruct the creation of a video about traveling in Xi'an. The videos created by user instruction A and user instruction B are different; therefore, session identifier A corresponding to user instruction A and session identifier B corresponding to user instruction B are two different session identifiers.

[0369] The above implementation involves a correspondence between tasks and task identifiers. One task corresponds to one task identifier, and the task identifier is used to identify the corresponding task. In one example, the correspondence between tasks and task identifiers can be seen above. Figure 11 The contents shown in Table 1 of step S1110 in the provided method.

[0370] The first task in the above implementation also includes a first task number, the second task also includes a second task number, the second task number is greater than the first task number, and the method further includes:

[0371] If the media platform is executing the first task and has not received a first stop command to stop the first task, it records that the first task corresponding to the first task number is in an unstopped state. If the editing application receives a video generation instruction and generates the first video based on the first material, and has not received a stop command to stop the video generation instruction, the media platform records that the second task corresponding to the second task number is in an unstopped state.

[0372] For example, the video generation instruction described above could be... Figure 13 The provided method provides instructions for initializing the clip application in step S1321.

[0373] After the editing application receives the video generation instruction and generates the first video based on the first material, the following steps can be performed: the editing application sends a completion notification to the media platform, wherein the completion notification carries the first video; if the media platform confirms that the second task corresponding to the second task number is in an unstopped state, it determines that the first video is effective and sends a completion notification to the voice assistant; after receiving the completion notification, the voice assistant displays the first interface, wherein the first interface is the playback interface of the first video.

[0374] For example, the first interface mentioned above can be... Figure 13 The interface in step S1134 of the provided method.

[0375] The media platform in the above implementation includes a creation service and creation tasks. Upon receiving a first command, the media platform generates a first task, including: the creation service, upon receiving the first command, generates a first creation instruction based on a first session identifier and first semantic information, wherein the first creation instruction is used to instruct the creation of a first task, and carries a first session identifier, a first task identifier corresponding to the first task, and first semantic information corresponding to the first user instruction; the creation service sends the first creation instruction to the creation task; the creation task generates the first task according to the first creation instruction; and the media platform saves the first task to a task queue, including: the creation task sending the first task to the creation service; the creation service, upon receiving the first task, sending the first task to the task queue; and the task queue, upon receiving the first task, saving the first task.

[0376] For example, the first session identifier mentioned above can be... Figure 11 The session identifier 1 in the provided method, the first semantic information can be the above. Figure 11 The semantic information 1 in the provided method, the first creation instruction can be as described above. Figure 11 The provided method includes the task creation instruction 1.

[0377] The media platform in the above implementation includes a creation service and creation tasks. Upon receiving the second command, the media platform generates a second task, including: the creation service, upon receiving the second command, generates a second creation instruction based on a first session identifier, wherein the second creation instruction is used to instruct the creation of a second task, and the second creation instruction carries the first session identifier and a second task identifier; the creation service sends the second creation instruction to the creation task; the creation task generates the second task according to the second creation instruction; and the media platform saves the second task to a task queue, including: the creation task sending the second task to the creation service; the creation service, upon receiving the second task, sending the second task to the task queue; and the task queue, upon receiving the second task, saving the second task.

[0378] For example, the first session identifier mentioned above can be... Figure 13 In the provided method, session identifier 1, and the second creation instruction can be as described above. Figure 13 In the provided method, the second task mentioned in task creation instruction 3 can be one of the tasks described above. Figure 13 The provided method includes video generation task 3.

[0379] The above-described electronic device includes a voice assistant, a media platform, and an editing application, with the task queue being a queue within the media platform. For details not elaborated in the methods described above for executing S1410 to S1450, please refer to the above-described methods. Figures 11 to 13 The relevant content in the provided methods.

[0380] It should be understood that the above Figure 14 The video generation method shown is for illustrative purposes only and does not constitute any limitation on the video generation method provided in this application.

[0381] In this embodiment, after receiving a user instruction (e.g., a first user instruction), the electronic device saves the task generated based on the user instruction (e.g., a first task) to a task queue. Then, by executing the tasks in the task queue, a video matching the user instruction (e.g., a first video) is generated. Thus, this application provides a novel method for generating videos. Furthermore, the execution order of the tasks in the task queue is ordered according to the order in which the user instructions associated with the task are received. This ensures that the electronic device executes multiple tasks corresponding to multiple user instructions in the task queue in the order in which the user input the user instructions. It also ensures that the electronic device executes the task corresponding to the first received user instruction in the task queue after completing the task corresponding to that first received user instruction in the task queue, thereby generating a video that meets the user's needs and improving the user experience.

[0382] The above text combined Figures 3 to 14This paper describes in detail the application scenarios and video generation methods of the video generation method according to the embodiments of this application. The following will combine... Figure 15 This document describes in detail the apparatus embodiments of this application. It should be understood that the video generation apparatus in the embodiments of this application can execute the various video generation methods described in the foregoing embodiments of this application. That is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0383] Figure 15 This is a schematic diagram of a video generation device provided in an embodiment of this application. Figure 15 As shown, the video generation apparatus 1500 includes a processing unit 1510, which is used to perform any of the methods described above.

[0384] It should be noted that the aforementioned video generation device 1500 is embodied in the form of a functional unit. The term "unit" here can be implemented in software and / or hardware, without specific limitations.

[0385] For example, a "unit" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.

[0386] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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.

[0387] This application also provides a computer program product that, when executed by a processor, implements the video generation method described in any of the method embodiments of this application.

[0388] The computer program product can be stored in memory, for example, it is a program. The program is eventually converted into an executable object file that can be executed by the processor after processes such as preprocessing, compilation, assembly and linking.

[0389] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the video generation method described in any of the method embodiments of this application. The computer program may be a high-level language program or an executable object program.

[0390] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0391] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0392] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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.

[0393] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0394] 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 example, the division of units is merely a logical functional division, and other division methods may exist in actual implementation; for example, multiple units or components may be combined or integrated into another system, 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, and the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0395] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0396] In addition, 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.

[0397] 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 video generation method, characterized in that, Applied to electronic devices including voice assistants, the method includes: In response to detecting a first voice command input to the interface of the voice assistant, a first task is generated and saved to a task queue. The first task is used to instruct the search for a first material and carries a first session identifier. The execution order of the tasks in the task queue is sorted according to the order in which the voice commands corresponding to the tasks input to the interface and carrying the first session identifier are detected. If the first task is the first task in the task queue, the first task is executed to obtain the first material; During the execution of the first task, no trigger operation was detected for the first stop control displayed on the interface, confirming that the first material is effective; and the first material is displayed on the interface, and the first material associated with the first session identifier is saved in the session state module included in the electronic device; Upon completion of the first task, in response to detecting a third voice command input to the interface, a third task is generated, the third task is saved to the task queue, and the first task is deleted from the task queue. The third task is a task to process the first material to obtain the second material, and the third task carries the first session identifier. Upon completion of the first task, and during the execution of the third task, in response to detecting a second voice command input to the interface, a second task is generated and saved to the task queue. The second task instructs the generation of a first video based on materials associated with the first session identifier stored in the session state module. The second task carries the first session identifier. The task queue includes the third task and the second task, with the third task being the first task in the task queue and the second task being the next task after the first task. If no trigger operation is detected for the third stop control displayed on the interface during the execution of the third task, and the third task is completed, then the second material is confirmed to be effective, and the first material associated with the first session identifier stored in the session state module is updated to the second material. or, If a trigger operation is detected on the third stop control displayed on the interface during the execution of the third task, and the third task has been completed, then the second material is confirmed to be invalid, and the first material associated with the first session identifier stored in the session state module is not updated. When the second task is the first task in the task queue, the first video is generated based on the material associated with the first session identifier stored in the session state module. When the third task in the queue is completed, the second task becomes the first task in the task queue by deleting the third task from the task queue.

2. The method according to claim 1, characterized in that, The method further includes: During the execution of the second task, no trigger operation was detected for the second stop control displayed in the interface, confirming that the generated first video is effective; When the first video is active, a thumbnail of the first video is displayed on the interface.

3. The method according to claim 2, characterized in that, The method further includes: During the execution of the second task, second execution information is displayed on the interface, indicating that the second task is being executed.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Upon completion of the third task and confirmation that the second material is effective, the second material is displayed on the interface. If the third task is completed and the second material is confirmed to be invalid, the second material will not be displayed on the interface.

5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: During the execution of the first task, first execution information is displayed on the interface, wherein the first execution information indicates that the first task is being executed.

6. The method according to any one of claims 1 to 3, characterized in that, The third task is either a material deletion task or a material addition task.

7. An electronic device, characterized in that, The electronic device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program that, when executed by the one or more processors, causes the electronic device to perform the method as described in any one of claims 1 to 6.

8. A chip system applied to an electronic device, the chip system comprising one or more processors, characterized in that, The processor is configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, When the computer program product is run on an electronic device, the electronic device causes the electronic device to perform the method according to any one of claims 1 to 6.