Video generation method, electronic equipment, storage medium and chip
By generating a task queue and executing tasks in the order of user instructions, the problem of not being able to generate videos in the prior art that meet the user experience is solved, and flexible video generation process and user interface control are realized, thereby improving the user experience.
Patent Information
- Application Number
- CN202410137778.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-01-30
AI Technical Summary
The prior art is difficult to generate videos that meet user experience based on user needs, and cannot effectively generate videos using the order of user instructions.
By generating a task queue, tasks are executed in the order of user instructions, videos that meet user needs are generated, including tasks such as material search and video generation, and user interface control is provided during task execution.
It realizes the generation of videos according to the order of user instructions, improves the user experience, meets the diverse needs of users, and provides flexible task control and video generation process.
Smart Images

Figure CN120455774A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and more specifically, to a video generation method, electronic device, storage medium, and chip. Background Art
[0002] Currently, many electronic devices are equipped with cameras. Users can use these cameras to take photos and videos, or they can obtain images or videos from the internet or other electronic devices. With the continuous development of smart devices, users' demand for and experience with images and videos is also increasing. In some scenarios, users need to generate videos on related topics based on images or videos, so that they can easily view the highlights of the videos. Summary of the Invention
[0003] The present application provides a video generation method, electronic device, storage medium and chip, which can generate videos that meet user needs and improve user experience.
[0004] In a first aspect, a video generation method is provided, which includes: generating a first task in response to a first user instruction, wherein the first task is used to instruct a search for a first material; saving the first task in 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; generating a second task in response to a second user instruction when the first task is executed, wherein the second task is used to instruct generation of a first video based on the first material; saving the second task in 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 the user instructions associated with the tasks are received. Tasks in the task queue are executed in the order in which they are arranged in the task queue. After a task in the task queue is completed, the next task in the task queue can be executed.
[0006] In the above technical solution, after the electronic device receives a user instruction (for example, a first user instruction), it saves the task (for example, the first task) generated based on the user instruction into a task queue. Thereafter, by executing the task in the task queue, a video (for example, the first video) that matches the user instruction is generated. That is, the present application provides a new method for generating a video. In addition, the execution order of the tasks in the above task queue is sorted according to the order of the received user instructions associated with the task. In this way, it can be ensured that the execution order of the multiple tasks corresponding to the multiple user instructions in the task queue by the electronic device is executed in the order of the user instructions input by the user, and it can be ensured that after the electronic device completes the execution of the task corresponding to the first received user instruction in the task queue, it executes the task corresponding to the user instruction received after the first received user instruction in the task queue, thereby generating a video that meets the user's needs and improves the user experience.
[0007] In one possible implementation, after executing the second task to obtain the first video, the method also includes: during the execution of the second task, and when no second stop command for stopping the second task is received, confirming that the first video is effective; when the first video is effective, displaying a first interface, wherein the first interface is a playback interface of the first video.
[0008] It should be noted that in the present 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 the stop command.
[0009] In the above technical solution, after the electronic device generates the first video and determines that the first video is generated, the interface including the first video is displayed to the user, which can improve the user experience.
[0010] In another possible implementation, the method further includes: during execution of the second task, displaying a second interface, wherein the second interface includes a second control and second execution information, the second control is used to trigger execution of a second stop command, and the second execution information indicates that the second task is being executed.
[0011] In the above technical solution, when the electronic device is performing the second task, the electronic device can display a second interface including a second control to the user. In a scenario where the user needs to stop the second task, the user can stop the second task being performed by the electronic device by triggering the second control in the second interface. This method can better meet the needs of users.
[0012] In another possible implementation, after the first task is saved in the task queue, the method further includes: when the first task is the first task in the task queue, executing the first task to obtain the first material; during the execution of the first task, and when the first stop command for stopping the first task is not received, confirming that the first material is effective; when 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 is displayed to the user only when the electronic device is executing the first task and has not received the first stop command for stopping the first task.
[0014] In another possible implementation, the method further includes: during execution of the first task, displaying a fourth interface, wherein the fourth interface includes a first control and first execution information, the first control is used to trigger execution of a first stop command, and the first execution information indicates that the first task is being executed.
[0015] In the above technical solution, while the electronic device is executing the first task, the electronic device can display a fourth interface including a first control to the user. In a 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 users.
[0016] In another possible implementation, when the first task is completed, before generating the second task in response to the second user instruction, the method further includes: when the first task is completed, in response to the third user instruction, saving the generated third task to the task queue, wherein the third task is a task that processes the first material; when the first task is completed, in response to the second user instruction, generating the second task, including: after the first task is completed and during the execution of the third task, generating the second task in response to the second user instruction; saving the second task to the task queue, including: during the execution of the third task, saving the second task to the task queue, 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 the electronic device receives the multiple user commands is the first user command, the third user command, and the second user command. The third user command is a command received by the electronic device after the electronic device completes the first task corresponding to the first user command located in the task queue. The second user command is a command received by the electronic device during the process of executing the third task corresponding to the third user command located in the task queue. Based on this method, the needs of users can be better met, thereby generating videos that meet user needs and improving the user experience.
[0018] In another possible implementation, during the execution of the third task, after saving the second task to the task queue, the method further includes: when the third task in the queue task is completed, deleting the third task in the task queue, so that the second task becomes the first task in the task queue; when the second task is the first task in the task queue, executing the second task.
[0019] In another possible implementation, when the second task is the first task in the task queue, the second task is executed, including: when the second material obtained after the third task is completed and becomes effective, generating a first video based on the second material, wherein the second material is material obtained by executing the third task on the first material, and when the third stop command for stopping the third task is not received during the execution of the third task, the second material is invalid; or, when the second task is the first task in the task queue, the second task is executed, including: when the second material obtained after the third task is completed and becomes invalid, generating a first video based on the first material, wherein when the third stop command is received during the execution of the third task, the second material is invalid.
[0020] In the above technical solution, the electronic device receives multiple user commands, and the order in which the electronic device receives the multiple user commands is the first user command, the third user command, and the second user command. The third user command is a command received by the electronic device after it completes the execution of the first task corresponding to the first user command in the task queue. The second user command is a command received by the electronic device during the execution of the third task corresponding to the third user command in the task queue. During the execution of the third task corresponding to the third user command in the task queue by the electronic device, if a third stop command is received, the electronic device generates a first video based on the first material; during the execution of the third task corresponding to the third user command in the task queue by the electronic device, if the third stop command is not received, the electronic device generates a first video based on the second material generated by the first material. Based on this method, the needs of users can be better met, thereby generating videos that meet user needs and improving user experience.
[0021] In another possible implementation, the method further includes: displaying a fifth interface during execution of the 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, while the electronic device is performing the third task, the electronic device can display a fifth interface including a third control to the user. In a scenario where the user needs to stop the third task, the user can stop the third task being performed by the electronic device by triggering the third control in the fifth interface. This method can better meet the needs of users.
[0023] In another possible implementation, the third task is a material deletion task or a material addition task.
[0024] In another possible implementation, it is applied to an electronic device including a voice assistant, a media middle station and a editing application, where the task queue is a queue in the media middle station, and generates a first task in response to a first user instruction, including: the voice assistant generates a first command in response to the first user instruction, and sends the first command to the media middle station, 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 middle station generates a first task, wherein the first task carries a first session identifier, a first task identifier corresponding to the first task and the first semantic information; saving the first task to the task queue includes: the media middle station saves the first task to the task queue; after the first task is executed, generates a first task in response to a second user instruction. The second task includes: after the first task is executed, the voice assistant generates a second command in response to the second user instruction, and sends the second command to the media middle station, wherein the second command carries the first session identifier; after receiving the second command, the media middle station 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 the task queue, including: the media middle station saves the second task to the task queue; executing the second task to obtain the first video, including: after the media middle station calls the second task in the task queue, based on the second task, sending a video generation instruction to the editing application, wherein the video generation instruction carries the 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 also includes a first task sequence number, the second task also includes a second task sequence number, the second task sequence number is greater than the first task sequence number, and the method also includes: when the media middle station is executing the first task and has not received a first stop command for stopping the first task, the first task corresponding to the first task sequence number is recorded as being 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 for stopping the video generation instruction, the media middle station records that the second task corresponding to the second task sequence 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 sends a film completion notification to the media middle station, wherein the film completion notification carries the first video; when the media middle station 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 film completion notification to the voice assistant; after the voice assistant receives the film completion notification, it displays the first interface, wherein the first interface is the playback interface of the first video.
[0027] In another possible implementation, the media middle station includes a creation service and a creation task, and after receiving the first command, the media middle station generates a first task, including: after receiving the first command, the creation service generates a first creation instruction based on the first session identifier and the first semantic information, wherein the first creation instruction is used to instruct the creation of the first task, and the first creation instruction carries the first session identifier, the first task identifier corresponding to the first task and the 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; the media middle station saves the first task to the task queue, including: the creation task sends the first task to the creation service; after receiving the first task, the creation service sends the first task to the task queue; after receiving the first task, the task queue saves the first task.
[0028] In another possible implementation, the media middle station includes a creation service and a creation task, and after receiving the second command, the media middle station generates a second task, including: after receiving the second command, the creation service generates a second creation instruction based on the first session identifier, wherein the second creation instruction is used to indicate the creation of the second task, and the second creation instruction carries the first session identifier and the 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; the media middle station saves the second task to the task queue, including: the creation task sends the second task to the creation service; after receiving the second task, the creation service sends the second task to the task queue; after receiving the second task, the task queue saves the second task.
[0029] In a second aspect, a video generating apparatus is provided, comprising a processing unit for executing any one of the video generating methods in the first aspect.
[0030] In a third aspect, an electronic device is provided, comprising a unit for executing any one of the video generation methods in the first aspect. The device may be a terminal device or a chip within the 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, and when the processor executes the computer program code stored in the memory, the terminal device executes any one of the video generation methods in the first aspect.
[0032] When the device is a chip in a terminal device, the processing unit may be a processing unit inside the chip, and the input unit may be an output interface, a pin or a circuit, etc.; the chip may also include a memory, which may be a memory inside the chip (for example, a register, a cache, etc.) or a memory located outside the chip (for example, a read-only memory, a 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 one of the video generation methods in the first aspect.
[0033] In one possible implementation, a memory is used to store computer program code; a 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 one of the video generation methods in the first aspect.
[0034] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by a video generating device, the video generating device executes any one of the video generating methods in the first aspect.
[0035] In a fifth aspect, a computer program product is provided, comprising: a computer program code, which, when executed by a video generating device, enables the video generating device to execute any one of the video generating methods in the first aspect.
[0036] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0037] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be achieved in any single embodiment. On the contrary, 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 description of a technical feature, technical solution or beneficial effect in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be implemented without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in specific embodiments that do not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application.
[0039] Figure 2 Schematic diagram of a software system of an electronic device 100 provided in an embodiment of the present application.
[0040] Figure 3 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0041] Figure 4 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0042] Figure 5 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0043] Figure 6 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0044] Figure 7 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0045] Figure 8 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0046] Figure 9 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0047] Figure 10 This is a schematic diagram of a user interface of an electronic device provided in an embodiment of the present application.
[0048] Figure 11 This is a schematic diagram of the process of executing a material search task involved in a video generation method provided in an embodiment of the present application.
[0049] Figure 12 It is a schematic diagram of the process of executing material deletion tasks and stopping tasks involved in a video generation method provided in an embodiment of the present application.
[0050] Figure 13 This is a schematic diagram of the process of executing a video generation task involved in a video generation method provided in an embodiment of the present application.
[0051] Figure 14 It is a schematic diagram of a video generation method provided in an embodiment of the present application.
[0052] Figure 15 It is a schematic diagram of a video generation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0054] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0055] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more than two; "and / or" describes the relationship between associated objects, indicating that three relationships can exist; for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0056] In addition, in the description of this application specification and the appended claims, the terms "first", "second", "third", "fourth", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0057] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in 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 "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0058] The embodiments of the present application provide a video generation method that can be applied to electronic devices, such as tablet computers, mobile phones, wearable devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and the like. The embodiments of the present application do not limit the specific type of electronic device.
[0059] The hardware structure and software structure of the electronic device are described in detail below with reference to the accompanying drawings.
[0060] Figure 11 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present 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, an earphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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 should be understood that the hardware structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. For example, the processor 110 is used to execute the frame playback method of the video in the embodiment of the present application.
[0063] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0064] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as an image playback function, etc.). The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0065] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information. For example, the process of rendering YUV data in the embodiments of the present application can be implemented using a GPU.
[0066] The display screen 194 is used to display images, videos, etc. The 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or M display screens 194, where M is a positive integer greater than 1. For example, in the embodiments of the present application, Figures 3 to 10 The interfaces shown are all displayed by the monitor.
[0067] The hardware system of electronic device 100 is described in detail above. The following describes the software system of electronic device 100. The software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. In the embodiment of the present application, the layered architecture is used as an example to exemplify the software system of electronic device 100.
[0068] For example, Figure 2 Schematic diagram of the software system of the electronic device 100 provided in the embodiment of the present application. Figure 2 , the software system adopts a layered architecture. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, namely, the application layer 200, the media middle platform (also known as the media middle platform framework layer) 210, the application framework layer 220, the Android runtime (Android Runtime) and core library layer 230, the hardware abstract layer (HAL) 240 and the kernel layer 250.
[0069] The application layer 200 may include a series of application packages. For example, an application package may include a camera, gallery, calendar, map, chat, voice assistant, language model, and editing application. The language model is used to perform semantic analysis and intent analysis on user commands. The editing application generates videos based on the existing footage. Optionally, the language model can also be a module within the voice assistant.
[0070] Each of the above-mentioned applications may include more specific functional modules, and there is no specific limitation on the role and number of the 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 creation card loading module. For example, a clipping application may include an editing module, a playback module, and a service module (such as a computer vision analysis module and a transition recognition module, etc.). For example, a gallery may include a business module and a notification module. For example, a camera may include a photo taking module.
[0071] Each of the aforementioned applications can be used to generate application data. For example, a voice assistant is used to interact with a user. For example, a gallery is used to generate photos. For example, a video editor is used to edit a video (e.g., add special effects and / or delete video content) to obtain an edited video.
[0072] The media center 210 is used to generate a user task for the user instruction input into the voice assistant and save the user task to the task queue. Afterwards, when the execution conditions for executing the user task are met, the media center 210 is also used to execute the user task in the task queue. For example, Figure 2 As shown, the media middle platform 210 may include an authoring service, a task queue module, an authoring task, and a session state module. The authoring service is used to generate a task creation instruction based on a received user instruction. The task queue module is used to create a task queue, wherein the task queue is used to store the user task created by the authoring task. After receiving the task creation instruction, the authoring task creates the corresponding user task. The authoring task is also used to call the user task in the task queue to execute the user task when the execution conditions for executing the user task are met. The session state module is used to store the execution results of the user task.
[0073] The application framework layer 220 provides an application programming interface (API) and a programming framework for the 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, a notification manager, an activity manager, an input manager, a view system, a content provider, a resource manager, and the like.
[0075] The window manager provides window management services (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.
[0076] Content providers are used to store and retrieve data and make it accessible to applications. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0077] The view system includes visual controls, such as controls that display text, controls that display images, etc. The view system can be used to build applications.
[0078] The display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures. For example, the display interface can be, but is not limited to, the following Figures 3 to 10 The page shown in .
[0079] The resource manager provides various resources for applications, 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 messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0081] The activity manager can provide activity management services (AMS), which 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 provides input management services (IMS), which can be used to manage system input, such as touch screen input, key input, and sensor input. The IMS retrieves events from input device nodes and, through interaction with the WMS, distributes the events to the appropriate window.
[0083] The Android Runtime consists of the core library and the virtual machine. The Android Runtime is responsible for scheduling and management of the Android system.
[0084] The core library consists of two parts: one part is the function that the programming language (for example, Java) needs to call, and the other part is the Android core library.
[0085] The application layer 200, media middleware 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 middleware 210, and application framework layer 220 as binary files. The virtual machine is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0086] The core library layer 230 may include multiple functional modules, such as a surface manager, a media framework, libc, SQLite, OpenGL ES, and Webkit.
[0087] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0088] The media framework supports playback and recording of a variety of common audio and video formats, as well as static image files.
[0089] libc (C library) is the standard library for the C language. It's a low-level library in the system and is implemented through Linux system calls. For example, libc can be used to connect to and disconnect from the camera service, set camera shooting parameters, start and stop previewing, and take pictures.
[0090] The hardware abstraction layer (HAL) 240 is an interface layer located between the operating system kernel and the upper-level software, and its purpose is to abstract the hardware. The hardware abstraction layer is an abstract interface driven by the device kernel, which is used to implement the application programming interface that provides access to the underlying device to the higher-level Java API framework. HAL contains multiple library modules, such as camera HAL (such as aperture, TOF sensor, lens or focus motor, etc.), Vendor warehouse, display, Bluetooth, audio, etc. Each library module implements an interface for a specific type of hardware component. It can be understood that the camera HAL can provide an interface for the camera FWK to access hardware components such as the camera. The Vendor warehouse can provide an interface for the media FWK to access hardware components such as the encoder. When the system framework layer API requires access to the hardware of the portable device, the Android operating system will load the library module for the hardware component.
[0091] The kernel layer 250 is the foundation of the Android operating system. The final functions of the Android operating system are all completed through the kernel layer. The kernel layer may include display drivers, camera drivers, audio drivers, and sensor drivers.
[0092] It should be noted that the software structure diagram of the electronic device shown in Figure 2 is only an example and does not limit the specific module division in different layers of the Android operating system. Specifically, reference can be made to the introduction of the software structure of the Android operating system in conventional technologies. In addition, the video generation method provided in this application can also be implemented based on other operating systems (for example, IOS or HarmonyOS, etc.). This application will not give examples one by one.
[0093] The video generation method provided in the embodiments of this application can be implemented, but is not limited to, in a mobile phone with the above software and hardware structures. It should be understood that the embodiments of this application do not particularly limit the specific structure of the execution subject of a video generation method. As long as the code recording a video generation method of the embodiments of this application can be run to communicate according to a video generation method provided in the embodiments of this application. For example, the execution subject of a video generation method provided in the embodiments of this application can be a functional module in an electronic device that can call and execute a program, or a communication device applied to an electronic device, such as a chip.
[0094] Next, the video generation method provided in the embodiments of this application will be further described in detail with reference to the accompanying drawings.
[0095] In some embodiments, a mobile phone can provide functions of image search and video creation through a voice assistant application (hereinafter simply referred to as a voice assistant), such as the YOYO assistant (simply referred to as YOYO). In practice, it is not limited to this. Exemplarily, a mobile phone can also provide functions of image search and video creation through other applications, such as a dedicated video editing application, a gallery application, etc.
[0096] In the following text, mainly taking the voice assistant as an example, the solution of this application will be described. It can be understood that if it is other applications, the implementation principle is similar, and it will not be elaborated in the embodiments of this application.
[0097] A mobile phone can provide at least one of the following ways to trigger the mobile phone to start image search.
[0098] Way 1, input an image search request after waking up the voice assistant.
[0099] Among them, the wake-up methods of the voice assistant include but are not limited to at least one of the following: Wake-up method 1, keyword wake-up: When the mobile phone recognizes that the user inputs a wake-up voice including a keyword, such as "Hello YOYO", the voice assistant can be woken up; Wake-up method 2, when the mobile phone detects that the user long-presses the power button, the voice assistant can be woken up; Wake-up method 3, breath wake-up: When the mobile phone detects that the user raises the mobile phone and points the mouth at the microphone, the voice assistant can be woken up. The embodiments of this application do not specifically limit the wake-up method.
[0100] Taking the wake-up method with the input wake-up voice "Hello YOYO" as an example, refer to Figure 3 , in the case of the mobile phone display interface 301, in response to the input wake-up voice "Hello YOYO", the mobile phone can wake up the voice assistant. After waking up the voice assistant, the mobile phone can display the interface 302. The interface 302 includes a prompt card 3021 of the voice assistant, indicating that the voice assistant has been woken up.
[0101] After the mobile phone wakes up the voice assistant in the above manner, the voice assistant is in the wake-up state. In the case where the voice assistant is in the wake-up state, the mobile phone can receive the user's voice input. For example, the user can input the voice "Images of my second daughter dancing". Or, the mobile phone can also receive the user's text input, such as Figure 3 as shown, the prompt card 3021 in the interface 302 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 the user's input of voice or text indicating image search (i.e., inputting an image search request), the mobile phone can display a dialog box of the voice assistant (hereinafter simply referred to as a dialog box), and the dialog box includes the image search request.
[0103] Taking the voice indicating image search as "Images of my second daughter dancing" as an example, continue to refer to Figure 3 , in the case of the mobile phone display interface 302, in response to the user's input of the voice "Images of my second daughter dancing", the mobile phone can display the interface 303, and the interface 303 includes a dialog box 3031 of the voice assistant. The dialog box 3031 includes the text 3032 of the dialogue "Generate a video of my second daughter dancing for me".
[0104] In addition, in response to the user's input of an image search request, the mobile phone can also start searching for image materials in the gallery application that match the image search request, that is, trigger the start of image search.
[0105] Here, it should be noted that: in the embodiments of the present application, the format of the image search request input by the user through text or voice can be arbitrary. Taking the search for images of the second daughter dancing as an example, the search request can be "Images of my second daughter dancing", "Search for images of my second daughter dancing", "Images including my second daughter dancing", etc. It can be understood that creating a video usually requires searching for images. Therefore, the format of the image search request can also be "Generate / Create... video", such as generating a birthday blessing 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... video", so as to facilitate identifying the user's needs. In the following text, this will not be repeated.
[0106] Method 2: Enter the voice assistant dialog box and enter the image search request.
[0107] A voice assistant icon is displayed on the desktop of the mobile phone. In response to a user triggering operation on the voice assistant icon, such as a click operation, the mobile phone can display a dialog box.
[0108] See also Figure 4 , the mobile phone can display interface 401. Interface 401 is the desktop of the mobile phone. Interface 401 includes a voice assistant icon 4011. In response to the user clicking icon 4011, the mobile 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 the input indicating the search request in the dialog box, the mobile phone can also display the search request in the dialog box and search for image materials, that is, trigger the start of the search.
[0110] Still taking the voice command to search for images as "images of the second daughter dancing" as an example, continue to refer to Figure 4 In the case where the mobile phone displays interface 402, in response to the user inputting the voice message "Help me generate a video of my second daughter dancing", the mobile phone may display interface 403 (same as interface 303 above), which also includes a dialog box 4031. Dialog box 4031 further includes 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 the above-mentioned method 1 (such as dialog box 3031) and the dialog box in the method 2 (such as dialog box 4021) can be the same dialog box. Therefore, in the dialog box of method 1, the mobile phone can also start searching for images in response to the user inputting the image search request. This will not be repeated here.
[0112] It should be understood that the above Figure 3 and Figure 4The user interface of the mobile phone shown for triggering the mobile phone to start searching for images is for illustration only and does not constitute any limitation on the user interface for triggering the electronic device to start searching for images involved in the video generation method provided in the embodiment of the present application. For example, in some implementations, in response to a user triggering an operation, such as a click operation, on a creation recommendation card displayed on any user interface of the mobile phone, the mobile phone may display a dialog box for video creation (also referred to as a dialog box for short) and start a video creation conversation in the dialog box. Any user interface may be a desktop, a negative screen, a lock screen interface, an application interface of a video application, an application interface of a chat application, and the like. In the following, the present application scheme is mainly explained by taking the mobile phone displaying a creation recommendation card on the desktop as an example. The creation recommendation card displayed on the user interface of the mobile phone can be created in the following way: after the mobile phone recognizes that at least one of the current time, current location, and images in the gallery application meets the conditions for video creation, it displays the creation recommendation card.
[0113] Next, combine Figures 5 to 10 A schematic diagram illustrating a scenario of a video generation method provided in an embodiment of the present application.
[0114] In an embodiment of the present application, during the process of the electronic device executing the video generation method, the user may trigger the electronic device to stop the currently executing task related to video generation (recorded as scenario one), or the user may not trigger the electronic device to stop the currently executing task related to video generation (recorded as scenario two). There is no specific limitation on the tasks related to video generation. For example, the 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 following introduces the user interfaces of the electronic devices involved in scenario 1 and scenario 2 respectively.
[0116] Scenario 1: During the process of an electronic device executing the video generation method provided in an embodiment of the present application, the user does not trigger the electronic device to stop the currently executing task related to video generation.
[0117] In one example, taking the example of a voice assistant in an electronic device generating a target video directly based on the searched material after receiving the user's voice, the user interface of the electronic device involved in the video generation method provided in the embodiment of the present application is introduced.
[0118] Please refer to Figure 4 , users can use voice or text to Figure 4 After inputting the text 4032 of "Help me generate a video of my second daughter dancing" in the dialog box 4031 of the user interface 403, the electronic device displays Figure 5The user interface 501 is shown. Figure 5 As shown, the dialog box 5011 of the user interface 501 displays a text 5013 of "Searching for materials for you..." and a stop control 5014, wherein the stop control 5014 is used to trigger the electronic device to stop the material search task currently being executed. 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 5022 of "The following materials of the second daughter are selected for you" displayed in the dialog box 5021 of the user interface 502, and a thumbnail 5023 of the material. The thumbnail 5023 of the material displays a view all control 50321, as shown in FIG. Figure 5 The view all control 50321 shown indicates that 15 materials out of the 20 materials are selected. Optionally, the user can also increase or delete the number of materials displayed by the thumbnails 5023 by triggering the view all control 50321.
[0119] Display on electronic devices Figure 5 After the user interface 502 is shown, the user can trigger the generate video control 50232 displayed in the material card 5023 in the user interface 502 to trigger the electronic device to perform the generate video task to generate the target video. Specifically, after the user triggers the generate video control 50232, the electronic device displays the following Figure 5 User interface 503 is shown. Dialog box 5031 of user interface 503 displays text 5032 that reads "Generating Video," text 5033 that reads "Analyzing Material...", and a stop control 5034. Text 5033 indicates the progress of the video, and stop control 5034 is used to trigger the electronic device to stop the currently executing task of generating the video. The content of text 5033 that reads "Analyzing Material..." can also be replaced with, for example, "Processing, please wait..."
[0120] When the electronic device displays the user interface 503 to the user and the user does not trigger the stop control 5034 displayed in the dialog box 5031 of the user interface 503, the electronic device will display the following to the user: Figure 5 The user interface 504 is shown. The dialog box 5041 of the user interface 504 displays the execution result corresponding to the generate video task, which may include a text 5042 displayed in the dialog box 5041 of the user interface 504, "The video has been produced. Come and enjoy the little cutie's dance~" and a thumbnail 5043 of the target video.
[0121] After the video is created, the electronic device can edit the video again. For different videos, the mobile phone can provide different editing controls to facilitate targeted video editing.
[0122] In some implementations, an editing control is further displayed below the thumbnail 5043 of the target video, and the editing control is used to trigger the electronic device to perform secondary editing on the target video corresponding to the thumbnail 5043 of the target video. Exemplarily, the editing control includes at least one of the following controls: a control for adding text to the video, such as "Smart Text" 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, the user interface of the electronic device involved in the video generation method provided in the embodiment of the present application is introduced by taking the example of a voice assistant in an electronic device deleting or adding the searched material after receiving the user's voice, and generating a target video based on the deleted or added material.
[0124] In practical applications, the electronic device displays the above Figure 5 After the user interface 502 shows the thumbnail 5023 of the material, if the user needs to delete part of the material corresponding to the thumbnail 5023 of the material, the user can input the material deletion instruction to the voice assistant through voice or text. The material deletion instruction can be as follows: Figure 6 The text 6012 of "Help me delete the third material" is shown in the dialog box 6011 of the user interface 601 in FIG. Figure 6 The user interface 602 is shown, and a dialog box 6021 of the user interface 602 displays a text 6022 of "Processing, please wait..." and a stop control 6023, wherein the stop control 6023 is used to trigger the electronic device to stop the currently executing material deletion task.
[0125] When the electronic device displays the user interface 602 to the user and the user does not trigger the stop control 6023 displayed in the user interface 602, the electronic device will display the following to the user: Figure 6 The user interface 603 is shown. A dialog box 6031 in the user interface 603 displays text 6032 that reads "The third material has been deleted for you. The materials after deletion are as follows" and material thumbnails 6033. The material thumbnails 6033 are thumbnails corresponding to 14 materials. The 14 materials are obtained by deleting the third material from the 15 materials corresponding to the thumbnails corresponding to the materials shown in the user interface 602 described above.
[0126] In practical applications, the electronic device displays the above Figure 5After the user interface 502 shows the thumbnail 5023 of the material, if the user needs to add one or more materials to the thumbnail 5023 of the material, the user can input a material adding instruction to the voice assistant through voice or text. The material adding instruction can be as follows: Figure 7 The text 7012 of "Help me add the material of my second daughter's smile" is shown in the dialog box 7011 of the user interface 701 in FIG. Figure 7 The user interface 702 is shown, and the dialog box 7021 of the user interface 702 displays the text 7022 "Searching for materials of the second daughter's smile..." for you, and a stop control 7023, wherein the stop control 7023 is used to trigger the electronic device to stop the currently executing material adding task.
[0127] When the electronic device displays the user interface 702 to the user and the user does not trigger the stop control 7023 displayed in the user interface 702, the electronic device will display the following to the user: Figure 7 The user interface 703 is shown. The dialog box 7031 in the user interface 703 displays a text 7032 that reads "The material of the second daughter's smile has been added for you and sorted in chronological order," as well as thumbnails 7033 of the materials. The thumbnails 6033 of the materials are thumbnails corresponding to 20 materials. These 20 materials are obtained by adding 5 materials of the second daughter's smile to the 15 materials corresponding to the thumbnails of the materials shown in the user interface 502 described above.
[0128] In one example, taking the example of a voice assistant in an electronic device receiving a user voice, generating a target video based on the searched material, and performing secondary editing on the generated target video, the user interface of the electronic device involved in the video generation method provided in an embodiment of the present application is introduced.
[0129] The electronic device displays Figure 5 After the thumbnail 5043 of the target video is displayed in the dialog box 5041 in the user interface 504 shown, the user can trigger the smart text control 5044 displayed in the dialog box 5041 to trigger the electronic device to automatically generate text for the target video corresponding to the thumbnail 5043 of the target video. Figure 8 The user interface 801 is shown, and the dialog box 8011 of the user interface 801 displays the text 8013 of "smart text" input 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 text task 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 the following Figure 8 The user interface 802 is shown. The dialog box 8021 in the user interface 802 displays the text 8022 of "Birthday greetings have been generated for you", a birthday greeting card 8023 and editing controls (i.e., smart text control, template change control, music change control and duration adjustment control). The birthday greeting card 8023 displays the blessing text (i.e., the best time is with you, happy birthday), a change control 80231 and a confirmation control 80232, wherein the change control 80231 is used to trigger the electronic device to select at least one blessing sentence from 10 blessing sentences. Afterwards, when the user triggers the confirmation 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 of "Birthday greetings have been added for you", the thumbnail 8033 of the video with the birthday greeting added, and an editing control.
[0131] When the user needs to change the video template, video music and video duration, the user can trigger the template change control 8034 displayed in the dialog box 8031. After that, the electronic device displays an interface such as Figure 8 The user interface 804 in the figure is shown. The user interface 804 displays the text 8042 of "Change Template" input by the user and an edit card 8043, wherein the edit card 8043 displays a control for changing templates, a control for changing music, a control for changing duration, and a drop-down menu control corresponding to each control (for example, the drop-down menu control 80431 corresponding to the change music control displayed in the user interface 804, or the drop-down menu control 80521 corresponding to the change duration control displayed in the user interface 805). After the user clicks on the drop-down menu control corresponding to any one of the controls displayed in the edit card 8043, the electronic device can display multiple functions corresponding to the control, and then the user can select the corresponding function according to his or her needs. Figure 8 The user selection result displayed in the dialog box 8041 in the user interface 804 includes changing the “texture” of the template, such as Figure 8 The user's selection results displayed in the dialog box 8051 in the user interface 805 shown also include changing the type of music to the "romantic" type, as well as Figure 8 The dialog box 8061 in the user interface 806 shown shows that the user selects the "Customize" control. After that, the dialog box 8061 may display a sliding control for adjusting the duration (not shown in the dialog box 8061). The user can achieve the purpose of defining the duration by sliding the sliding control. For example, after the customized duration can be but is not limited to 45 seconds (s), the electronic device displays the following Figure 8The user interface 806 shown displays the user's selection result, which includes the edit 8062 card displayed in the dialog box 8061 of the user interface 806 and the text 8063 of "change the texture template, romantic music, and adjust the duration to 45s".
[0132] It should be understood that the above Figure 8 The following describes the user interface displayed by an electronic device when performing secondary editing on a generated video, using the example of a user triggering an edit control displayed on the user interface of the electronic device. Alternatively, the user can directly input the secondary editing request via voice or text into the user interface of the electronic device. In this implementation, the user interface of the electronic device may not display the edit control.
[0133] Scenario 2: During the process of an electronic device executing the video generation method provided in an embodiment of the present application, the user triggers the electronic device to stop the currently executing task related to video generation.
[0134] In an embodiment of the present application, after the user triggers the electronic device to perform any one of the tasks related to video generation described above, during the process of the electronic device performing any one of the tasks, the user can stop the any one of the tasks currently being performed by the electronic device by triggering the stop control.
[0135] Next, combine Figure 9 and Figure 10 , describes an example of a user interface displayed by an electronic device in a scenario where a user triggers the electronic device to stop executing a task related to video generation while the electronic device is executing the task related to video generation.
[0136] In one example, a case where a user triggers a generate video control and then triggers a stop control for stopping the video generation task while the electronic device is performing the video generation task is described as an example.
[0137] See Figure 9 , the dialog box 5051 of the user interface 505 displayed by the electronic device displays the text 5052 of "Generate Video", the text 5053 of "Processing, please wait...", and the stop control 5054 mentioned above. Based on the user interface 505, it can be known that the electronic device is performing the task of generating a video. During the process of the electronic device performing the task of generating a video, after the user triggers the stop control 5054, the stop control 5054 will trigger the electronic device to stop the task of generating a video being performed. Accordingly, after the electronic device stops the task of generating a video being performed, a stop message will be displayed, and the stop message can be entered Figure 9 The text 5072 reading “This answer has stopped” is displayed in the dialog box 5071 in the user interface 507 shown.
[0138] Afterwards, if the user wants to continue to generate a video based on the material previously searched by the electronic device, the user can enter a generate video instruction in the dialog box 5071, and then the electronic device displays the following Figure 9 The user interface 508 is shown. The dialog box 5081 of the user interface 508 displays a text 5082 of "Generate Video" input by the user. In response to the user inputting the generate video instruction, the electronic device displays the progress of generating the video. The progress can be Figure 9 The text 5092 of "Processing..." displayed in the dialog box 5091 in the user interface 509 is shown, or it can be Figure 9 The text 5102 of “Analyzing Material…” is displayed in the dialog box 5101 in the user interface 510 shown. 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 following to the user: Figure 9 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 the user interface 510 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 generate video task, which may include a text 5112 displayed in the dialog box 511, "The video has been produced. Come and enjoy the little cutie's dance~", and a thumbnail 5113 of the target video.
[0139] In one example, a case where a user triggers a material deletion task and then triggers a stop control for stopping the material deletion task while the electronic device is executing the material deletion task is described as an example.
[0140] See Figure 10 When the electronic device displays the user interface 602 to the user and the user triggers the stop control 6023 displayed in the user interface 602, the electronic device will display an interface including stop information to the user, which can be as follows: Figure 10 In the user interface 604 shown, the stop information may be a text 6042 of "This answer has stopped" displayed in the user interface 604. Optionally, thereafter, if the user wants to generate a video or delete a material, the user may input a generate video instruction or a delete material instruction in the 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 following describes the process in which a user triggers the stopping of a task while the electronic device is performing a video generation task and a material deletion task. Optionally, the user can also trigger the stopping of other tasks described above (e.g., a material addition task, a material reordering task, a template change task, or a duration change task). The user interface of the electronic device involved in this process is not further described.
[0142] It should be understood that the above Figures 5 to 10 The user interface of the electronic device shown is for illustration only and does not constitute any limitation on the user interface of the electronic device to which the video generation method provided in the embodiment of the present application is adapted. Figures 5 to 10 The displayed material may be a static image, a dynamic image, or a video.
[0143] Next, combine Figures 11 to 13 A video generation method provided by an embodiment of the present application is described. For example, the electronic device in the embodiment of the present application may be, but is not limited to, Figure 1 The electronic device 100 is shown. It is understood that the video generation method provided in the embodiment of the present application includes the following processes: a process in which the electronic device performs a material search task (abbreviated as process one); a process in which the electronic device performs a material deletion task and stops the currently executed material search task (abbreviated as process two); and a process in which the electronic device performs a video generation task (abbreviated as process three). It is understood that the electronic device sequentially performs the aforementioned processes one, two, and three.
[0144] Process 1
[0145] Next, combine Figure 11 The following describes the process of performing a material search task by an electronic device provided in an embodiment of the present application. Figure 14 As shown, the process includes S1101 to S1129. S1101 to S1129 are described in detail below.
[0146] S1101, the user inputs user voice 1 "make a video of my second daughter dancing" into the dialogue interface provided by the YOYO assistant in the electronic device.
[0147] The conversation interface provided by YOYO Assistant can be Figure 4 As shown in the user interface 402, the user can trigger the dialogue interface provided by the YOYO assistant in the electronic device through the method described above.
[0148] Optionally, the user voice 1 may be replaced by a user text 1, where the user text 1 is a text including a video of making the second daughter's dance. In this implementation, the user may input the user text 1 into the dialogue interface via a keyboard provided by the dialogue interface.
[0149] S1102, after receiving the user voice 1, the YOYO assistant displays the interface 0 including the text corresponding to the user voice 1, and generates the analysis instruction 1 (carrying the user voice 1) according to the user voice 1.
[0150] For example, interface 0 can be Figure 4 The user interface 403 shown, the text corresponding to the user voice 1 can be Figure 4 The text 4032 “Help me generate a video of my second daughter dancing” is shown.
[0151] Analysis instruction 1 is used to instruct semantic analysis and intent analysis of user voice 1 to extract the user intent corresponding to user voice 1, as well as information such as time, place, person and event corresponding to user voice 1.
[0152] S1103, the YOYO assistant sends analysis instruction 1 to the language model.
[0153] The language model can be a neural network model, and the speech model can perform semantic analysis and intent analysis on the text or speech input by the user.
[0154] The language model may be a module located in the YOYO Assistant, or the language model may be a module located outside the YOYO Assistant, which is not specifically limited.
[0155] S1104, after receiving the analysis instruction 1, the language model analyzes and processes the user voice 1 to obtain the analysis result 1 (carrying the creative intention and semantic information 1).
[0156] The analysis result 1 carries the creative intent and semantic information 1, wherein the creative intent refers to the intention of creating the video, and the semantic information 1 includes information such as time, place, person, and event corresponding to the user voice 1.
[0157] When the user voice 1 is “help me generate a video of my second daughter dancing”, the semantic information 1 may include information that the character is “the second daughter” and the event is “dancing”.
[0158] S1105: After the voice model obtains analysis result 1, it sends analysis result 1 to the YOYO assistant.
[0159] S1106 , after receiving the analysis result 1 , the YOYO assistant generates a material search command 1 (carrying a session identifier 1 and semantic information 1 ) based on the analysis result 1 .
[0160] The material search command 1 is used to instruct to search for materials matching the semantic information 1 .
[0161] The session identifier 1 is used to identify the session page for creating the video corresponding to the user voice 1. It should be understood that different session identifiers are corresponding to different videos.
[0162] For example, user voice A is used to instruct the creation of a video of traveling in Beijing, and user voice B is used to instruct the creation of a video of traveling in Xi'an. The video created by user voice A and the video created by user voice B are different. 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 the YOYO assistant generates the material search command 1, it triggers the media center to initialize the creation service. Accordingly, the media center initializes the creation service.
[0164] Initializing the creative service means creating the creative service in the media center.
[0165] In the above, the example of triggering the media center to create a creative service after the YOYO assistant generates the material search command 1 is described. In the embodiment of the present application, there is no specific limitation on the timing of the media center creating the creative service. For example, the media center can also perform the step of creating the creative service before executing the video generation method provided in the embodiment of the present application.
[0166] S1108, after the media center initializes the creation service, it initializes the task queue.
[0167] Initializing a task queue means creating a task queue.
[0168] In the above, the media middle station initializes the creation service and initializes the task queue as an example. In the embodiment of the present application, there is no specific limitation on the timing of the media middle station creating the task queue. For example, the media middle station can also perform the step of creating the task queue before executing the video generation method provided in the embodiment of the present application.
[0169] S1109, the YOYO assistant sends a material search command 1 (carrying a session identifier 1 and semantic information 1) to the creative service.
[0170] After the electronic device executes step S1107, it executes step S1108. The order of executing step S1107 and step S1109 can be any order, and can be processed in parallel or serially. In the case of serial processing, step S1109 can be executed first and then step S1107, or step S1107 can be executed first and then step S1109.
[0171] S1110, after the creative service receives the material search command 1, it generates a creation task instruction 1 according to the material search command 1, and the creation task instruction 1 is used to instruct the creation of the material search task 1 (carrying session ID 1, task identifier 1, semantic information 1 and task sequence number 1).
[0172] The task identifier is used to identify the task associated with generating a video. There can be multiple tasks associated with generating a video. There are no specific limitations on the tasks associated with generating a video. For example, tasks associated with generating a video include a material search task and a video generation task. For example, tasks associated with generating a video include a material search task, a character identification task, a material deletion task, and a video generation task.
[0173] The different task types mentioned above correspond to different task identifiers. For example, the correspondence between a task type and a task identifier provided in an embodiment of the present application is shown in Table 1 below. For ease of description, the correspondence between the task types and task identifiers involved below is described as an example according to the contents shown in Table 1. It should be understood that the correspondence between the task identifiers and task types shown in Table 1 below is only for illustration 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 Whether the task is added to the task queue Task Identifier 1 Material Search yes Task identifier 2 Character confirmation yes Task identifier 3 Material addition yes Task identifier 4 Material deletion yes Task identifier 5 Material Selection 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 ID 10 Save Video yes
[0176] Table 1 also shows information about whether a task has been added to a task queue. As shown in Table 1, in the embodiment of the present application, before the electronic device executes the task associated with generating a video, the task associated with generating a video must first be added to a task queue created by the electronic device. Subsequently, the tasks in the task queue are executed sequentially in the order in which they were added to the task queue.
[0177] In an embodiment of the present application, a user command (for example, user voice 1) will be converted into a corresponding user task (for example, material search task 1), and the user task corresponds to a task number, wherein the task number corresponding to the user task is related to the order in which the creation service receives the user commands corresponding to the user task.
[0178] In one example, the task sequence number of the user task corresponding to the user command received first by the creation service is smaller than the task sequence number of the user task corresponding to the user command received later by the creation service. For example, in a scenario where the 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 sequence number of the user task corresponding to user command A is smaller than the task sequence number of the user task corresponding to user command B, such as the task sequence number of the user task corresponding to user command A is task sequence number 1, and the task sequence number of the user task corresponding to user command B is task sequence number 2.
[0179] It should be noted that in the scenario where the YOYO Assistant receives the same type of task (for example, a material search task) multiple times, the task identifier (for example, task identifier 1) for each time the same type of task is received is the same, but the task sequence numbers of any two of the same type of tasks received in the multiple times are different.
[0180] For example, in the scenario where the YOYO Assistant receives material deletion task A and then receives material deletion task B, the task identifier corresponding to material deletion task A and the task identifier corresponding to material deletion task B are the same, that is, both are task identifier 4, but the task sequence number A corresponding to material deletion task A and the task sequence number B corresponding to material deletion task B are different, where task sequence number A can be smaller than 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 creative task can be understood as a class (Class), based on which one or more task instances (abbreviated as tasks) can be created.
[0183] S1112, after receiving the creation task instruction 1, the creation task creates a 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 the creative task creates the material search task 1, it sends the material search task 1 to the creative service.
[0185] S1114, after receiving the material search task 1, the creative service sends the material search task 1 to the task queue.
[0186] In an embodiment of the present application, after executing the above-mentioned steps S1110 to S1115, the electronic device 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 (that is, generate video).
[0187] S1115 , after receiving the material search task 1 , the task queue adds the material search task 1 to the end of the task queue.
[0188] The task queue stores specific tasks (also called task instances), for example, the specific tasks may include but are not limited to material search task 1.
[0189] There is no specific limit on the number of tasks stored in the task queue. For example, after a task is stored in the task queue and the task is not completed, if a new task is stored in the task queue, then the number of tasks stored in the task queue is 2.
[0190] For example, after material search task 1 is stored in the task queue and the material search task 1 has not been completed, if a new task (for example, a material deletion task) is stored in the task queue, then the number of tasks stored in the task queue may be 2. For example, after material search task 1 is stored in the task queue and the material search task 1 has not been completed, if no new task is stored in the task queue, then the number of tasks stored in the task queue may be 1.
[0191] The tasks in the task queue are sorted according to the order in which the corresponding user commands are received by the electronic device. The tasks in the task queue are executed in the order in which they are arranged in the task queue. Only after a task in the task queue is completed can the next task in the task queue be executed.
[0192] The execution order of tasks in the above-mentioned task queue is sorted according to the order of the user instructions associated with the task received. In this way, it can be ensured that the execution order of multiple tasks corresponding to multiple user instructions in the task queue by the electronic device is executed in the order of the user instructions input by the user, and it can be ensured that after the electronic device completes the execution of the task corresponding to the user instruction received first in the task queue, it will execute the task corresponding to the user instruction received after the first user instruction in the task queue, thereby generating a video that meets user needs and improves user experience.
[0193] In one example, when the first task in the task queue is executed, the first task is deleted so that the next task originally located after the first task becomes the new first task in the task queue. Thereafter, the new first task is executed, thereby achieving the purpose of executing the tasks in the task queue according to the order in which the tasks are arranged in the task queue.
[0194] For example, if an electronic device receives user commands A and B in sequence, the tasks in the task queue will 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. After that, 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 after the first task can be continued to be executed, thereby achieving the purpose of executing the tasks in the task queue according to the order in which the tasks are arranged in the task queue. In this implementation, there is no deletion operation on the tasks that have been executed in the task queue, but in order to distinguish which tasks in the task queue have been executed and which tasks have not been executed, a status can be set for the tasks in the task queue, and the status indicates whether the task has been executed or not.
[0196] For example, if the electronic device receives user commands A and B in sequence, the tasks in the task queue will 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 completing user task A, it will execute the next user task B in the task queue that follows user task A.
[0197] After executing the above step S1115, the task queue includes the material search task 1, and the material search task 1 is the first task in the task queue, that is, the task queue currently does not include other tasks except the material search task 1.
[0198] S1116, the task queue sends task number 1 to the creation service.
[0199] S1117, after the creation service receives task number 1, it records the current task number as task number 1.
[0200] After the creative service records the current task number as task number 1, the creative service can know that the currently executing task is material search task 1 corresponding to task number 1.
[0201] S1118, the creative service sends the execution result A1 (carrying the information that it is searching for materials for you) to the YOYO assistant.
[0202] S1119, based on the execution result A1, the YOYO assistant displays the interface 1 including “Searching for materials for you”.
[0203] The interface 1 may further include a stop control for stopping the material search task 1 .
[0204] For example, interface 1 can be Figure 5 In the user interface 501 shown, a dialog box 5011 of the user interface 501 displays text 5013 of “Searching for materials for you…” and a stop control 5014 for stopping the material search task 1 .
[0205] S1120: The task queue takes the first task (ie, material search task 1) in the task queue for scheduling and execution.
[0206] As mentioned above, the task queue includes the material search task 1, and the 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 starts executing the material search task based on the task identifier 1 of the material search task 1.
[0209] As mentioned above, Material Search Task 1 carries Task Identifier 1 and Semantic Information 1. Based on this, after the Task Queue calls Material Search Task 1 in the Creation Task, the Creation Task executes the Material Search Task based on Task Identifier 1 of Material Search Task 1. For example, the Creation Task may execute Material Search Task 1 on images stored in the gallery of an electronic device to search for finished material (e.g., images or videos) that matches Semantic Information 1.
[0210] S1123, the creative task sends the execution result A2 (carrying multiple finished film materials) to the creative service.
[0211] The execution result A2 carries multiple film materials, wherein the multiple film materials are film materials that match the semantic information 1. The execution result A2 carries multiple film materials that can be materials stored in a gallery of the electronic device.
[0212] It should be understood that steps S1118 and S1119 are performed after step S1117, and steps S1120, S1121, and S1122 are performed after step S1115. However, there is no specific limitation on the order in which steps S1118 and S1120 are performed. For example, step S1118 may be performed first and then step S1120, or step S1120 may be performed first and then 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 an embodiment of the present application, the creation service records information on whether the task corresponding to the task number is in a stopped state. Based on this, after the creation service receives the execution result A2, it 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 , when the creative service detects that the material search task 1 corresponding to the task number 1 of the current task is not in a stopped state, it determines that the execution result A2 is effective.
[0216] In an embodiment of the present application, during the execution of step S1122 of the creation task, the YOYO assistant does not receive the command input by the user to stop the material search task 1 being executed. After the creation service receives the execution result A2, it checks whether the task corresponding to the task number 1 of the current task has been stopped.
[0217] It should be noted that the above description of steps S1124 and S1125 is based on the example of a situation where the material search task 1 corresponding to the current task's task number 1 is not stopped. In other implementations, if the authoring service detects that the material search task 1 corresponding to the current task's task number 1 is stopped, it determines that execution result A2 is not valid. In such implementations, steps S1126 to S1129 below are not executed after executing step S1125.
[0218] S1126, after the creative service confirms that the execution result A2 is effective, it sends an update session state instruction 1 (carrying multiple film materials) to the session state module.
[0219] The update session state instruction 1 is used to instruct to save multiple film materials associated with the session identifier 1.
[0220] S1127 , after receiving the update session state instruction 1 , the session state module saves the multiple film materials associated with the session identifier 1 .
[0221] The session state module can save the execution result A2 of the material search task 1 (i.e., multiple pieces of film materials), so that when the video is generated later, the creative task can obtain the execution result A2 of the material search task 1 from the session state module.
[0222] It should be understood that the session state module may also store the association relationship between the session identifier 1 and multiple pieces of film materials. In this way, the session state module may know that the associated materials include multiple pieces of film materials based on the session identifier 1.
[0223] S1128, the creative service sends the execution result A2 (carrying multiple finished film materials) to the YOYO assistant.
[0224] S1129, after receiving the execution result A2, the YOYO assistant displays the interface 2 including multiple film materials according to the execution result A2.
[0225] Interface 2 may also include a generate video control and a view all control. The generate video control is used to trigger the electronic device to generate a target video based on the multiple film materials displayed on interface 2, and the view all control is used to trigger the electronic device to display multiple film materials.
[0226] For example, interface 2 can be Figure 5 The dialog box 5021 in the user interface 502 displays thumbnails 5023 of the materials, and the thumbnails 5023 of the materials include 15 materials.
[0227] It should be understood that the above Figure 11 The illustrated process is for illustration only and does not constitute any limitation on the video generation method provided in the embodiments of the present application.
[0228] Process 2
[0229] Next, combine Figure 12 The following describes the process of executing a material deletion task and the process of executing a stop task during the execution of a material deletion task. Figure 12 As shown, the process includes S1201 to S1227. S1201 to S1227 are described in detail below.
[0230] S1201, the user inputs user voice 2 "help me delete the third material" into the interface 2 provided by the YOYO assistant in the electronic device.
[0231] The user voice 2 is specifically used to instruct deletion of the third material among the multiple film materials obtained after executing the material search task 1.
[0232] In the above step S1201, the user specifies to delete a certain material as an example. Optionally, the user can specify the number of materials to be deleted. Thereafter, the electronic device automatically determines which materials in the multiple film materials obtained after executing 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 voice 2, the YOYO assistant displays the interface 3 including the text corresponding to the user voice 2, and generates the analysis instruction 2 (carrying the user voice 2) according to the user voice 2.
[0234] Analysis instruction 2 is used to instruct semantic analysis and intent analysis of user voice 2 to extract the user intent corresponding to user voice 2, as well as information such as time, place, person and event corresponding to user voice 2.
[0235] For example, interface 3 can be Figure 6 In the user interface 601 shown, the text corresponding to the user voice 2 may be the text 6012 “Help me delete the third material” shown in the dialog box 6011 in the user interface 601 .
[0236] S1203, YOYO assistant sends analysis instruction 2 to the language model.
[0237] S1204, after receiving the analysis instruction 2, the language model analyzes and processes the user voice 2 to obtain the analysis result 2 (carrying the material adjustment intention and semantic deletion information 2).
[0238] It carries the material adjustment intention and semantic information 2, wherein the material adjustment intention is the intention to delete the material, and the semantic information 2 may include the event of "deleting the third material".
[0239] S1205: After the voice model obtains analysis result 2, it sends analysis result 2 to the YOYO assistant.
[0240] S1206: After receiving the analysis result 2, the YOYO assistant generates a material deletion command 2 (carrying the session identifier 1 and the semantic deletion information 2) based on the analysis result 2.
[0241] S1207, the YOYO assistant sends a material deletion command 2 (carrying a session identifier 1 and semantic deletion information 2) to the creation service.
[0242] The material deletion command 2 is used to instruct deletion of the material related to the semantic deletion information 2 among the multiple finished film materials associated with the session identifier 1, wherein the multiple finished film materials associated with the session identifier 1 include the multiple finished film materials stored in the session state module mentioned above.
[0243] For example, when the multiple film materials associated with the session identifier 1 stored in the session state module include 5 materials, and the semantic deletion information 2 includes an event for deleting the third material, the material deletion command 2 is specifically used to instruct to delete the third material among the 5 materials.
[0244] S1208, after receiving the material deletion command 2, the creation service generates a creation task instruction 2 according to the material deletion command 2, and the creation task instruction 2 is used to instruct the creation of the material deletion task 2 (carrying the session identifier 1, the task identifier 4, the semantic deletion information 2 and the task sequence number 2). Figure 11 The task number 1 in the provided method is different, and the task number 2 is the next task number after the task number 1.
[0245] In this embodiment of the present application, since user voice 2 corresponding to material deletion task 2 is the user command received by the electronic device after receiving user voice 1 corresponding to material search task 1, task sequence number 2 corresponding to material deletion task 2 is greater than task sequence number 1 corresponding to material search task 1. S1209: The creation service sends creation task instruction 2 to the creation task located in the media center.
[0246] S1210, after receiving the creation task instruction 2, the creation task creates a 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 the creative task creates the material deletion task 2, it sends the material deletion task 2 to the creative service.
[0248] S1212: After receiving the material deletion task 2, the creative service sends the material deletion task 2 to the task queue.
[0249] S1213: After receiving the material deletion task 2, the task queue 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 the creation service receives task number 2, it records the current task number as task number 2.
[0252] The current task sequence number refers to the task sequence number corresponding to the task currently being executed by the electronic device. It can be seen that the task currently being executed by the electronic device is the material deletion task 2 corresponding to the task sequence number 2.
[0253] S1216, the creation service sends the execution result B1 (carrying the information being processed) to the YOYO assistant.
[0254] S1217, based on the execution result B1, the YOYO assistant displays interface 4 including “Processing, please wait…”.
[0255] For example, interface 4 can be Figure 6 In the user interface 602 shown, a text 6022 reading “Processing, please wait…” is displayed in a dialog box 6021 of the user interface 602 .
[0256] S1218: The task queue takes the first task in the task queue (ie, material deletion task 2) for scheduling and execution.
[0257] S1219, the task queue calls the material deletion task 2 in the creation task.
[0258] S1220, after the creation task receives the call for material deletion task 2, it obtains multiple finished film materials from the session state module.
[0259] As mentioned above, the session state module stores multiple finished film materials associated with the session identifier 1. Based on this, after the creative task receives the call for the material deletion task 2, it can obtain multiple finished film materials from the session state module.
[0260] S1221, the creation task starts to execute the material deletion task on multiple pieces of film materials based on the task identifier 4 of the material deletion task 2.
[0261] It should be understood that steps S1216 and S1217 are performed after step S1215, and steps S1218, S1219, S1220, and S1221 are performed after step S1213. However, there is no specific limitation on the order in which steps S1216 and S1218 are performed. For example, step S1216 may be performed first and then step S1218, or step S1218 may be performed first and then step S1216.
[0262] During the process of executing step S1221 of the creation task, if the user triggers the stop control for stopping the material deletion task, steps S1222 to S1228 below can also be executed.
[0263] S1222: The user triggers the stop control in interface 4 provided by the YOYO assistant.
[0264] For example, interface 4 can be Figure 6 In the user interface 602 shown, a stop control 6023 is displayed in a dialog box 6021 of the user interface 602. After the user clicks the stop control 6023, the stop control 6023 can be triggered.
[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 can be Figure 10 In the user interface 602 shown, a stop control 6023 is displayed in a dialog box 6021 of the user interface 602. After the user clicks the stop control 6023, the stop control 6023 can be triggered. After that, the electronic device displays Figure 10 In the user interface 604 shown (ie, an example of the interface 5 ), a text 6042 (ie, stop information) reading “This answer has been stopped” is displayed 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 to stop the material deletion task 2 that is currently being executed.
[0269] S1225, after receiving the stop command, the creative 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] According to the task sequence number 2 and the stop command 1, the creative service can set the status of the material deletion task 2 indicated by the stop command 1 to the stopped state.
[0271] S1226, the creative task sends the execution result B2 (carrying the deleted film material) to the creative service.
[0272] The deleted film material refers to the material obtained by deleting the third film material from the multiple film materials.
[0273] S1227, after receiving the execution result B2, the creative service checks that the material deletion task 2 corresponding to the task number 2 is in a stopped state, and determines that the execution result B2 is not effective.
[0274] In the embodiment of the present application, after the user inputs the stop command 1 to the YOYO assistant, the creative task will still execute the material deletion task 2 and obtain the execution result B2 after executing the material deletion task 2. However, whether the execution result B2 needs to be displayed to the user through the interface provided by the YOYO assistant depends on whether the material deletion task 2 is set to the stop state. Specifically, during the process of the electronic device executing the above-mentioned material deletion task 2, the electronic device receives the stop command 1. Therefore, the execution result B2 of the electronic device executing the material deletion task 2 does not take effect, that is, after executing the above-mentioned steps S1201 to S1207, the materials stored in the session state module still include the execution of the previous steps. Figure 11Multiple finished film materials obtained by the provided process.
[0275] It should be understood that the above Figure 12 The process shown is for illustration only and does not constitute any limitation on the video generation method provided in the embodiment of the present application. Figure 12 In the method shown, the user triggers the stop control in the interface 4 provided by the YOYO assistant, and the creation task still executes the material deletion task 2 as an example. Optionally, after the user triggers the stop control in the interface 4 provided by the YOYO assistant, the material deletion task 2 currently being executed by the creation task can be directly stopped.
[0276] Process Three
[0277] Next, combine Figure 13 The following describes the process of executing a video generation task by an electronic device provided in an embodiment of the present application. Figure 13 As shown, the process includes S1301 to S1334. S1301 to S1334 are described in detail below.
[0278] S1301, the user inputs the user voice 3 "generate video" into the interface 5 provided by the YOYO assistant in the electronic device.
[0279] For example, interface 5 can be Figure 10 User interface 604 is shown.
[0280] S1302, after receiving the user voice 3, the YOYO assistant displays an interface 6 including the text corresponding to the user voice 3, and generates an analysis instruction 3 (carrying the user voice 3) based on the user voice 3.
[0281] For example, interface 6 can be Figure 10 The user interface 605 shown has a dialog box 6051 in which a text 6052 of "Generate Video" input by the user is displayed. For example, the interface 605 may be Figure 9 In the user interface 508 shown, a text 5082 of “Generate Video” input by the user is displayed in a dialog box 5081 of the user interface 508 .
[0282] S1303, YOYO assistant sends analysis instruction 3 to the language model.
[0283] S1304, after receiving the analysis instruction 3, the language model analyzes and processes the user voice 3 to obtain the analysis result 3 (carrying the intention to generate a video).
[0284] The Generate Video intent is an intent for creating or generating videos.
[0285] S1305: After the voice model obtains analysis result 3, it sends analysis result 3 to the YOYO assistant.
[0286] S1306: After receiving analysis result 3, the YOYO assistant generates a video instruction 3 (carrying session identifier 1) based on analysis result 3.
[0287] Generate Video Instruction 3 is used to instruct the generation of a video based on the finished footage associated with Session Identifier 1, where the finished footage associated with Session Identifier 1 includes the multiple finished footage stored in the session state module described above. For example, if the multiple finished footage associated with Session Identifier 1 stored in the session state module includes 15 footage, Generate Video Instruction 3 specifically instructs the generation of a video based on these 15 footages.
[0288] S1307, YOYO assistant sends a generate video instruction 3 (carrying session identifier 1) to the creation service.
[0289] S1308, after the creation service receives the generate video instruction 3, it generates the create task instruction 3 according to the generate video instruction 3, and the create task instruction 3 is used to instruct the creation of the generate video task 3 (carrying the session identifier 1, the task identifier 6 and the task sequence number 3).
[0290] Task No. 3 and previous text Figure 11 The task number 1 in the provided method is different from the previous Figure 12 The task number 2 in the provided method is different, and 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 and generates the video task 3 (carrying the session identifier 1, the task identifier 6 and the task sequence number 3) according to the creation task instruction 3.
[0293] S1311, after the creation task creates the generated video task 3, it sends the generated video task 3 to the creation service.
[0294] S1312, after receiving the generate video task 3, the creation service sends the generate video task 3 to the task queue.
[0295] S1313: After receiving the generate video task 3, the task queue adds the generate video 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 the creation service receives task number 3, it records the current task number as task number 3.
[0298] The current task sequence number refers to the task sequence number corresponding to the task currently being executed by the electronic device, that is, the task currently being executed by the electronic device is the generate video task 3 corresponding to the task sequence number 3.
[0299] S1316, the creation service sends the execution result C1 (carrying the information being processed) to the YOYO assistant.
[0300] S1317, based on the execution result C1, the YOYO assistant displays an interface 7 including “Processing, please wait…”.
[0301] The interface 7 may further include a stop control for stopping the generating video task 3 .
[0302] For example, interface 6 can be Figure 9 The user interface 508 shown, interface 7 can be Figure 9 The user interface 509 is shown, and a text 5092 reading “Processing” is displayed in a dialog box 5091 of the user interface 509 , and a stop control 5093 is shown in the dialog box 5091 .
[0303] S1318, the task queue takes the first task in the task queue (ie, generate video task 3) for scheduling execution.
[0304] S1319, the task queue calls the generate video task 3 in the creation task.
[0305] S1320, after receiving the call to generate video task 3, the creative task obtains multiple film materials associated with session identifier 1 from the session state module.
[0306] S1321, the creative task initializes the editing application (carrying multiple finished film materials).
[0307] S1322: The editing application starts generating a target video based on the multiple film materials.
[0308] It should be understood that steps S1316 and S1317 are performed after step S1315, and steps S1318 to S1322 are performed after step S1313. However, there is no specific limitation on the order in which steps S1316 and S1318 are performed. For example, step S1316 may be performed first and then step S1318, or step S1318 may be performed first and then step S1316.
[0309] S1323, the editing application notifies the creative service of the filming progress i.
[0310] The video generation progress i refers to the progress of the video generation, i = 1, 2, ..., N, where N is an integer. In this application, the above steps S1323 to S1328 are a loop process, and the number of times the loop process is executed is equal to the value of N. For example, if N is 2, the number of loops is equal to 2.
[0311] The video production progress i is not specifically limited. For example, the video production progress i can be a percentage progress bar for executing the video generation task. For example, the video production progress i can indicate any of the following progress: analyzing material, adding special effects, or adding music.
[0312] S1324, after receiving the film completion progress i, the creation service is notified of the film completion progress i.
[0313] S1325, after receiving the filming progress i, the creation service checks whether the generation video task 3 corresponding to the current task number 3 has been stopped.
[0314] S1326, when checking that the video generation task 3 corresponding to the current task number 3 is in an unstopped state, the creation service confirms that the filming progress i is effective.
[0315] S1327, after the creative service confirms that the filming progress i is effective, it notifies the YOYO assistant of the filming progress i.
[0316] S1328. After receiving the filming progress i, the YOYO assistant displays an interface including the content indicated by the filming progress i.
[0317] YOYO Assistant displays an interface including content indicated by the filming progress i, which is associated with the number of cycles of executing the above steps S1323 to S1328.
[0318] Specifically, during the first loop, i.e., i=1, the YOYO Assistant displays an interface including the content indicated by the filming progress 1, which may include the following steps: the YOYO Assistant updates the "Processing" in interface 7 to the content indicated by the filming progress 1. During the second loop, i.e., i=2, the YOYO Assistant displays an interface including the content indicated by the filming progress 1, which may include the following steps: the YOYO Assistant updates the content indicated by the filming progress 1 in interface 7 to the content indicated by the filming progress 2. And so on.
[0319] For example, taking N as 2, after executing the first cycle, the interface displayed by the YOYO assistant including the content indicated by the filming progress 1 may be Figure 9 The user interface 509 shown; after executing the second cycle process, the YOYO assistant displays the interface including the content indicated by the filming progress 2. Figure 9 User interface 510 is shown.
[0320] S1329, the editing application sends a film completion notification (carrying the target video) to the creative task.
[0321] The filming completion notification is used to indicate that the target video has been successfully generated based on the multiple filming materials associated with session identifier 1. The filming completion notification can carry the target video generated based on the multiple filming materials associated with session identifier 1.
[0322] S1330: After receiving the film completion notification, the creation task sends the film completion notification (carrying the target video) to the creation service.
[0323] S1331, after receiving the film completion notification, the creation service checks that the video generation task 3 corresponding to the current task number 3 is in an unstopped state, and confirms that the film completion notification is effective.
[0324] S1332, the authoring service sends an update session state instruction 2 to the session state module.
[0325] The update session state instruction 2 is used to save the target video associated with the session identifier 1, wherein the update session state instruction 2 can carry the script file of the target video and the cover of the target video.
[0326] S1333: The creation service sends a film completion notification (carrying the target video) to the YOYO assistant.
[0327] There is no specific limitation on the execution order of the above-mentioned step S1333 and the above-mentioned step 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 notification of completion of filming, the YOYO assistant displays an interface including a thumbnail of the target video.
[0329] There is no specific limitation on the content displayed on the interface including the thumbnail of the target video. 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 including a thumbnail of a target video may be Figure 9 The user interface 511 is shown, and a thumbnail 5113 of the target video is displayed in the dialog box 5111 of the user interface 511.
[0331] It should be noted that the above Figure 13In the provided method, the user inputs a command to generate a video, and during the execution of the creation task to generate the video, the YOYO assistant does not receive the user input command to stop the task of generating the video. In other implementations, during the execution of the creation task to generate the video, the YOYO assistant receives the user input to stop the task of generating the video. In this implementation, the YOYO assistant will display to the user a message that the task of generating the video has stopped, such as the message can be Figure 10 The text 6042 of "Helping you answer has stopped" displayed in the dialog box 6041 of the user interface 604 shown, that is, in this implementation, the YOYO assistant will not show the user an interface including a thumbnail of the target video. The working principle of the YOYO assistant after receiving the stop task for stopping the video generation task is the same as that in the previous article. Figure 12 The working principle of the YOYO assistant shown in the figure is the same after receiving the stop task for stopping the material deletion task. For details not described in detail here, please refer to the above. Figure 12 The contents of steps S1222 to S1227 in.
[0332] It should be understood that the above Figures 11 to 13 The video generation method provided in the embodiment of the present application is described for illustration only and does not constitute any limitation on the video generation method provided in the embodiment of the present application. Figures 11 to 13 In the video generation method provided in the embodiment of the present application, the creation task is described as executing the material search task 1, the material deletion task 2 and the video generation task 3. Optionally, in the scenario where the user inputs the user voice 1 and the user voice 3 mentioned above, the creation task can execute the material search task 1 and the video generation task 3. Figures 11 to 13 In the video generation method provided in the embodiment of the present application, the example in which the YOYO Assistant receives a stop command input by the user to stop the material deletion task 2 during the execution of the material deletion task 2 in the creation task is described. Optionally, the YOYO Assistant may also receive a stop command input by the user to stop other tasks during the execution of other tasks in the creation task (for example, the material search task 1 or the video generation task 2).
[0333] Next, combine Figure 14 Another video generation method provided in an embodiment of the present application is introduced.
[0334] Figure 14 Schematic diagram of a video generation method provided by an embodiment of the present application. The video generation method provided by an embodiment of the present application 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 the embodiment of the present application can be, but is not limited to, Figure 1The electronic device 100 is shown. Figure 14 As shown, the video generation method provided in the embodiment of the present application includes S1410 to S1450. S1410 to S1450 are introduced below.
[0335] S1410: The electronic device generates a first task in response to a first user instruction, where the first task is used to instruct a search for a first material.
[0336] After receiving the first user instruction, the electronic device may generate a first task for instructing to search for the first material. The first user instruction is not specifically limited. For example, the first user instruction may be the above Figure 11 In the provided method, user voice 1. In one example, the electronic device generates a first task in response to a first user instruction, including: the electronic device generates a first command in response to the first user instruction; and generates the first task according to the first command.
[0337] For example, the first command in the above implementation can be Figure 11 The material search command 1 in the provided method, the first task can be the above Figure 11 The material search task 1 in the provided method, the process of the electronic device generating the first command and the first task can be referred to above Figure 11 The relevant description in will not be repeated here in detail.
[0338] S1420: The electronic device saves the first task into a task queue. The execution order of the tasks in the task queue is sorted according to the order of the received user instructions associated with the tasks.
[0339] The execution order of tasks in the task queue is based on the order in which the user instructions associated with the tasks are received. Tasks in the task queue are executed in the order in which they are arranged in the task queue. After a task in the task queue is completed, the next task in the task queue can be executed.
[0340] In one example, after the electronic device saves the first task to the task queue, the method also includes: when the first task is the first task in the task queue, the electronic device executes the first task and obtains the first material; during the execution of the first task, and when the first stop command for stopping the first task is not received, the electronic device confirms that the first material is effective; when 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 the present 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 the stop command.
[0342] The first material may include one or more materials, wherein the one or more materials may be pictures or videos, which is not specifically limited.
[0343] Optionally, the third interface may also include other controls, such as, but not limited to, a generate video control and a view all control. The generate video control is used to trigger the electronic device to generate a 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 the entire content of the first material.
[0344] Optionally, during the process of the electronic device executing the first task in the above implementation method, the electronic device displays a fourth interface, wherein the fourth interface includes a first control and a first execution information, the first control is used to trigger the execution of the first stop command, and the first execution information indicates that the first task is being executed.
[0345] The fourth interface may also include other information, for example, the other information may be but is not limited to the first user instruction.
[0346] For example, the first material in the above implementation can be Figure 11 The execution result A2 of the provided method carries multiple pieces of film material, and the third interface can be the above Figure 11 In the interface 2 of the provided method, the first material can be the above Figure 11 The execution result A2 carries multiple pieces of film materials, and the fourth interface can be the above Figure 11 In the interface 1 of the provided method, the first control in the fourth interface can be the above Figure 11 A stop control in interface 1 in the provided method is used to stop material search task 1.
[0347] S1430: When 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 generation of a first video based on the first material.
[0348] In one example, in addition to receiving the first user instruction and the second user instruction, the electronic device may also receive a third user instruction, wherein the third user instruction is received after the electronic device receives the first user instruction and before receiving the second user instruction. The third user instruction is not specifically limited and can be set according to user needs. For example, the third user instruction may be, but is not limited to, "Help me delete the first material," "Help me add a material of the target type," or "Help me replace the third material."
[0349] In the above example, before the electronic device generates the second task in response to the second user instruction after the first task is executed, the method also includes: the electronic device saves the generated third task to the task queue in response to the third user instruction after the first task is executed, wherein the third task is a task that processes the first material; the electronic device generates the second task in response to the second user instruction after the first task is executed, including: after the first task is executed and in the process of executing the third task, the electronic device generates the second task in response to the second user instruction; the electronic device saves the second task to the task queue, including: in the process of the electronic device executing the third task, the electronic device saves the second task to the task queue, 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, in the above implementation, the electronic device saves the second task to the task queue during the execution of the third task by the electronic device as an example. In other implementations, after the electronic device completes the execution of the third task, when the electronic device receives a second user instruction, the electronic device saves the second task to the task queue. In this implementation, the task queue only includes the second task. Exemplarily, in this implementation, the first user command can be the above Figure 11 The user voice 1 in the method provided, the third user command can be the above Figure 12 The user voice 2 in the method provided, the second user command can be the above Figure 13 The user voice 3 in the method provided, the specific process of this implementation method can be found in the above Figures 11 to 13 The relevant description of the video generation method provided will not be repeated here in detail.
[0351] The third task corresponds to the third user instruction, and there is no specific limitation on the third task. For example, if the third user instruction is "Help me delete the first material," the third task is a material deletion task. For example, if the third user instruction is "Help me add a material of the target type," the third task is a material addition task.
[0352] The third task is the first task in the task queue, and the second task is the next task after the first task, that is, the position of the third task in the task queue is before the position of the second task in the task queue.
[0353] Optionally, in the process of the above-mentioned electronic device executing the third task, after saving the second task to the task queue, the method also includes: when the electronic device completes the execution of the third task in the queue task, deleting the third task in the task queue, so that the second task becomes the first task in the task queue; when the second task is the first task in the task queue, the electronic device executes the second task.
[0354] In the above implementation method, when the first task in the task queue is executed, the first task is deleted so that the next task originally located after the first task becomes the new first task in the task queue. Thereafter, the new first task is executed, thereby achieving the purpose of executing the tasks in the task queue according to the order in which the tasks are arranged in the task queue.
[0355] For example, if an electronic device receives user commands A and B in sequence, the tasks in the task queue will 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. After that, the first task in the task queue (i.e., task B) will be executed.
[0356] Optionally, when the second task is the first task in the task queue, the electronic device executes the second task, including: when the second material obtained after the third task is completed and becomes effective, the electronic device generates a first video based on the second material, wherein the second material is material obtained by executing the third task on the first material, and during the execution of the third task, if the third stop command for stopping the third task is not received, the second material is invalid; or, when the second task is the first task in the task queue, the electronic device executes the second task, including: when the second material obtained after the third task is completed and becomes invalid, generating a first video based on the first material, wherein during the execution of the third task, if the third stop command is received, the second material is invalid.
[0357] Optionally, the electronic device may further perform the following steps: displaying a fifth interface during execution of the 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.
[0358] For example, when the third task is a material deletion task, the fifth interface may be Figure 10 User interface 602 is shown.
[0359] S1440: The electronic device saves the second task into 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 end of the task queue.
[0361] S1450: The electronic device executes the second task to obtain the first video.
[0362] In one example, after the electronic device performs the second task to obtain the first video, the method also includes: while the electronic device is performing the second task and has not received a second stop command for stopping the second task, confirming that the first video is effective; when the first video is effective, the electronic device displays a first interface, wherein the first interface is a playback interface of the first video.
[0363] For example, the first interface may be Figure 13 In the provided method, step S1334 displays an interface including a thumbnail of the target video, and the first video is the target video in the interface including the thumbnail of the target video.
[0364] Optionally, the electronic device may also perform the following steps: displaying a second interface during the process of the electronic device executing the second task, 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 may be Figure 13 In the interface 7 of step S1317 of the method provided, the second control in the second interface can be the Figure 13 The interface 7 in step S1317 of the provided method includes a stop control for stopping the task 3 of generating the video.
[0366] The above describes the method for an electronic device to execute the above S1410 to S1450 using an electronic device as the main body. Below, taking the above electronic device including a voice assistant, a media center, and an editing application, and the task queue being a queue in the media center as an example, the method for executing the above S1410 to S1450 is described.
[0367] In one example, the electronic device generates a first task in response to a first user instruction, including: the voice assistant generates a first command in response to the first user instruction and sends the first command to the media middle station, 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 middle station 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 middle station saves the first task to the task queue; when the first task is completed, in response to a second user instruction, generates a second task, including: when the voice assistant completes the first task In response to the second user instruction, a second command is generated and the second command is sent to the media middle station, wherein the second command carries the first session identifier; after receiving the second command, the media middle station 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 the task queue, including: the media middle station saves the second task to the task queue; the electronic device executes the second task to obtain the first video, including: after the media middle station calls the second task in the task queue, based on the second task, sending a video generation instruction to the editing application, wherein the video generation instruction carries the first material; the editing application receives the video generation instruction and generates the first video based on the first material.
[0368] The first session identifier is used to identify the session page for creating the video corresponding to the first user instruction. It should be understood that different session identifiers correspond to different videos. For example, user instruction A is used to instruct the creation of a video about a trip to Beijing, and user instruction B is used to instruct the creation of a video about a trip to Xi'an. The videos created by user instruction A and user instruction B are different. Based on this, the session identifier A corresponding to user instruction A and the session identifier B corresponding to user instruction B are two different session identifiers.
[0369] The above implementation involves the correspondence between tasks and task identifiers, wherein one task corresponds to one task identifier, and the task identifier is used to identify the corresponding task. In an example, the correspondence between tasks and task identifiers can be found in the above Figure 11 The contents of step S1110 in the provided method are shown in Table 1.
[0370] In the above implementation, the first task further includes a first task sequence number, the second task further includes a second task sequence number, the second task sequence number is greater than the first task sequence number, and the method further includes:
[0371] When the media middle station is executing the first task and has not received the first stop command for stopping the first task, it records 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 for stopping the video generation instruction, the media middle station records that the second task corresponding to the second task number is in an unstopped state.
[0372] For example, the video generation instruction may be Figure 13 Instructions for initializing the clipping application in step S1321 of the provided method.
[0373] After the above-mentioned editing application receives the video generation instruction and generates the first video based on the first material, the following steps can also be performed: the editing application sends a film completion notification to the media middle station, wherein the film completion notification carries the first video; when the media middle station 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 film completion notification to the voice assistant; after the voice assistant receives the film completion notification, it displays the first interface, wherein the first interface is the playback interface of the first video.
[0374] For example, the first interface may be Figure 13 The interface in step S1134 of the provided method.
[0375] The media middle station in the above implementation method includes a creation service and a creation task, and after receiving the first command, the media middle station generates a first task, including: after receiving the first command, the creation service generates a first creation instruction based on the first session identifier and the first semantic information, wherein the first creation instruction is used to indicate the creation of the first task, and the first creation instruction carries the first session identifier, the first task identifier corresponding to the first task and the 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; the media middle station saves the first task to the task queue, including: the creation task sends the first task to the creation service; after receiving the first task, the creation service sends the first task to the task queue; after receiving the first task, the task queue saves the first task.
[0376] For example, the first session identifier may be Figure 11 In the method provided, the session identifier 1, the first semantic information can be the above Figure 11 The semantic information 1 in the provided method, the first creation instruction can be the above Figure 11 Create a task instruction 1 in the provided method.
[0377] The media middle station in the above implementation method includes a creation service and a creation task, and after receiving the second command, the media middle station generates a second task, including: after receiving the second command, the creation service generates a second creation instruction based on the first session identifier, wherein the second creation instruction is used to indicate the creation of the second task, and the second creation instruction carries the first session identifier and the 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; the media middle station saves the second task to the task queue, including: the creation task sends the second task to the creation service; after receiving the second task, the creation service sends the second task to the task queue; after receiving the second task, the task queue saves the second task.
[0378] For example, the first session identifier may be Figure 13 The session identifier 1 in the method provided, the second creation instruction can be the above Figure 13 In the method provided, the second task may be the creation task instruction 3. Figure 13 Generate video task 3 in the provided method.
[0379] The above electronic device includes a voice assistant, a media center and an editing application, and the task queue is a queue in the media center as an example. The contents not described in detail in the method of executing the above S1410 to S1450 can be referred to the above Figures 11 to 13 The relevant content in the provided method.
[0380] It should be understood that the above Figure 14 The video generation method shown is for illustration only and does not constitute any limitation to the video generation method provided in this application.
[0381] In an embodiment of the present application, after the electronic device receives a user instruction (e.g., a first user instruction), it saves the task (e.g., a first task) generated based on the user instruction into a task queue. Thereafter, by executing the task in the task queue, a video (e.g., a first video) that matches the user instruction is generated. That is, the present application provides a new method for generating a video. In addition, the execution order of the tasks in the above-mentioned task queue is sorted according to the sequence of the user instructions associated with the received tasks. In this way, it can be ensured that the execution order of the multiple tasks corresponding to the multiple user instructions in the task queue by the electronic device is executed in the sequence of the user instructions input by the user, and that the electronic device executes the task corresponding to the user instruction received first 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, thereby generating a video that meets the user's needs and improving the user experience.
[0382] Combined with the above Figures 3 to 14, describes in detail the application scenario and video generation method of the video generation method of the embodiment of the present application, and the following will be combined with Figure 15 , describing the device embodiments of the present application in detail. It should be understood that the video generation device in the embodiments of the present application can execute the various video generation methods in the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.
[0383] Figure 15 Schematic diagram of a video generation device provided by an embodiment of the present application. Figure 15 As shown, the video generating device 1500 includes a processing unit 1510, and the processing unit 1510 is used to execute any one of the methods described above.
[0384] It should be noted that the video generation device 1500 is implemented in the form of a functional unit. The term "unit" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.
[0385] For example, a "unit" may be a software program, a hardware circuit, or a combination of the two that implements the aforementioned functionality. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functionality.
[0386] Therefore, the units of each example described in the embodiments of this application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians 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] The present application also provides a computer program product, which, when executed by a processor, implements the video generation method described in any method embodiment of the present application.
[0388] The computer program product may be stored in a memory, for example, a program, which is converted into an executable target file that can be executed by a processor after undergoing processes such as preprocessing, compilation, assembly, and linking.
[0389] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the video generation method described in any method embodiment of the present application. The computer program can be a high-level language program or an executable target program.
[0390] In this application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.
[0391] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean 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 the present application.
[0392] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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 convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0394] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of the units is merely a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection of some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0395] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0396] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0397] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A video generation method, characterized in that: The method comprises: In response to a first user instruction, generating a first task, wherein the first task is used to instruct a search for a first material; Saving the first task to a task queue, wherein the execution order of the tasks in the task queue is sorted according to the order of received user instructions associated with the tasks; When the first task is completed, generating a second task in response to a second user instruction, wherein the second task is used to instruct generation of a first video based on the first material; Saving the second task to the task queue; Perform the second task to obtain the first video.
2. The method according to claim 1, characterized in that After performing the second task to obtain the first video, the method further includes: During the execution of the second task, and without receiving a second stop command for stopping the second task, confirming that the first video is effective; When the first video is effective, a first interface is displayed, wherein the first interface is a playback interface of the first video.
3. The method according to claim 2, characterized in that The method further comprises: During the execution of the second task, 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 the second stop command, and the second execution information indicates that the second task is being executed.
4. The method according to any one of claims 1 to 3, characterized in that After saving the first task to the task queue, the method further includes: When the first task is the first task in the task queue, executing the first task to obtain the first material; During the execution of the first task, if a first stop command for stopping the first task is not received, confirming that the first material is effective; When the first material is effective, a third interface is displayed, wherein the third interface includes the first material.
5. The method according to claim 4, characterized in that The method further comprises: During the execution of the first task, a fourth interface is displayed, wherein the fourth interface includes a first control and first execution information, the first control is used to trigger the execution of the first stop command, and the first execution information indicates that the first task is being executed.
6. The method according to any one of claims 1 to 5, characterized in that When the first task is completed, before generating the second task in response to a second user instruction, the method further includes: When the first task is completed, in response to a third user instruction, saving a generated third task to the task queue, wherein the third task is a task for processing the first material; The generating of the second task in response to a second user instruction when the first task is completed includes: After the first task is completed and during the execution of the third task, generating the second task in response to the second user instruction; Saving the second task to the task queue includes: During the execution of the third task, the second task is saved in the task queue, 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.
7. The method according to claim 6, characterized in that During the execution of the third task, after saving the second task to the task queue, the method further includes: When the third task in the queue is completed, deleting the third task in the task queue so that the second task becomes the first task in the task queue; When the second task is the first task in the task queue, the second task is executed.
8. The method according to claim 7, characterized in that When the second task is the first task in the task queue, executing the second task includes: If the second material obtained after the third task is completed is effective, the first video is generated based on the second material, wherein the second material is material obtained by executing the third task on the first material, and if a third stop command for stopping the third task is not received during the execution of the third task, the second material is invalid; or When the second task is the first task in the task queue, executing the second task includes: When the second material obtained after the third task is executed is invalid, a first video is generated based on the first material, wherein, when the third stop command is received during the execution of the third task, the second material is invalid.
9. The method according to claim 7 or 8, characterized in that The method further comprises: During the execution of the third task, displaying a fifth interface, wherein the fifth interface includes a third control; In response to a trigger operation on the third control in the fifth interface, the third stop command is received.
10. The method according to any one of claims 6 to 9, characterized in that The third task is a material deletion task or a material addition task.
11. The method according to claim 1, wherein Applied to electronic devices including voice assistants, media platforms, and editing applications, the task queue is a queue in the media platform. The generating of the first task in response to the first user instruction includes: The voice assistant generates a first command in response to the first user instruction, and sends the first command to the media middle station, 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 middle station generates the first task, wherein the first task carries the first session identifier, a first task identifier corresponding to the first task, and the first semantic information; Saving the first task to a task queue includes: The media middle station saves the first task to the task queue; The generating of the second task in response to a second user instruction when the first task is completed includes: When the first task is completed, the voice assistant generates a second command in response to the second user instruction, and sends the second command to the media middle station, wherein the second command carries the first session identifier; After receiving the second command, the media middle station generates the 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 the task queue includes: The media middle station saves the second task to the task queue; The performing of the second task to obtain the first video includes: After the media middle station calls the second task in the task queue, based on the second task, a video generation instruction is sent to the editing application, wherein the video generation instruction carries the first material; The editing application receives the video generation instruction and generates the first video based on the first material.
12. The method according to claim 11, characterized in that The first task further includes a first task sequence number, the second task further includes a second task sequence number, the second task sequence number is greater than the first task sequence number, and the method further includes: When the media middle station is executing the first task and has not received a first stop command for stopping the first task, recording that the first task corresponding to the first task sequence number is in an unstopped state; When the editing application receives the video generation instruction and generates the first video based on the first material, and does not receive a stop command for stopping the video generation instruction, the media middle station records that the second task corresponding to the second task number is in an unstopped state.
13. The method according to claim 12, characterized in that 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 sends a film completion notification to the media mid-station, wherein the film completion notification carries the first video; When the media middle station confirms that the second task corresponding to the second task sequence number is in an unstopped state, determining that the first video is effective, and sending the video completion notification to the voice assistant; After receiving the notification of completion of the filming, the voice assistant displays a first interface, wherein the first interface is a playback interface of the first video.
14. The method according to any one of claims 10 to 13, characterized in that The media middle platform includes creative services and creative tasks, as well as, After receiving the first command, the media middle station generates the first task, including: After receiving the first command, the authoring service generates a first creation instruction based on the first session identifier and the first semantic information, wherein the first creation instruction is used to instruct creation of the first task, and the first creation instruction carries the first session identifier, a first task identifier corresponding to the first task, and the 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; The media middle station saves the first task to the task queue, including: The authoring task sends the first task to the authoring service; After receiving the first task, the authoring service sends the first task to the task queue; After receiving the first task, the task queue saves the first task.
15. The method according to any one of claims 10 to 14, characterized in that The media middle platform includes creative services and creative tasks, as well as, After receiving the second command, the media middle station generates the second task, including: After receiving the second command, the authoring service generates a second creation instruction based on the first session identifier, wherein the second creation instruction is used to instruct creation of the second task, and the second creation instruction carries the first session identifier and the 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; The media middle station saves the second task to the task queue, including: The authoring task sends the second task to the authoring service; After receiving the second task, the creation service sends the second task to the task queue; After receiving the second task, the task queue saves the second task.
16. 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 computer programs, and when the one or more processors execute the computer programs, the electronic device executes the method according to any one of claims 1 to 15.
17. A chip system, applied to electronic equipment, comprising one or more processors, characterized in that: The processor is configured to call computer instructions so that the electronic device executes the method according to any one of claims 1 to 15.
18. A computer-readable storage medium comprising a computer program, characterized in that When the computer program is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Processing system for task scheduling and distribution and acceleration method thereof
CN110032453A
Method and apparatus for generating video
CN111866609A
Video rendering method and device, computer equipment and storage medium
CN113407325A
Method and device for generating video from voice, electronic equipment and computer readable medium
CN114120992A
Content generation method based on interactive virtual assistant
CN117332098A