Video editing method and apparatus, and terminal device
By creating video editing tasks on the terminal device and receiving task time information from the server, the terminal device can display task progress and status, solving the problem of long video editing task time and unclear progress, thus improving user experience and editing efficiency.
Patent Information
- Application Number
- PCT/CN2025/105721
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-01
- Filing Date
- 2025-06-30
- Publication Date
- 2026-01-08
AI Technical Summary
Existing video editing functions are time-consuming on terminal devices and cannot accurately determine task progress and status, resulting in poor display effects and a poor user experience.
The terminal device responds to the editing operation of the video draft by creating a video editing task, sending task information to the server, receiving the task time to determine the progress, displaying the task progress, and updating the draft when it is completed.
It improves the display flexibility and effectiveness of video editing tasks, enhances the user experience, allows users to continue editing during task execution, and improves efficiency.
Smart Images

Figure CN2025105721_08012026_PF_FP_ABST
Abstract
Description
Video editing method, device and terminal equipment
[0001] Cross-reference to Related Applications
[0002] This application claims priority to the Chinese Patent Application No. 202410876441.1, filed on July 1, 2024, and entitled "Video editing method, device and terminal equipment", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] Embodiments of the present disclosure relate to the technical field of video processing, and in particular to a video editing method, device and terminal equipment. BACKGROUND
[0004] When artificial intelligence technology is applied in the field of video editing, a video editing related client can provide intelligent video editing functions for users. For example, a video editing function of generating a digital person through artificial intelligence technology.
[0005] At present, since the intelligent video editing function takes a long time and needs the participation of an artificial intelligence model, the task corresponding to the video editing function can be executed in a server, and after the execution in the server ends, a terminal device can download the corresponding result. SUMMARY
[0006] In a first aspect, the present disclosure provides a video editing method, comprising:
[0007] In response to an editing operation on a video draft, creating a video editing task of the video draft; the video editing task is a background task;
[0008] Sending task information of the video editing task to a server, the task information being used to instruct the server to execute the video editing task;
[0009] Receiving a task time consumption sent by the server, the task time consumption being an estimated time consumption required by the server to complete the video editing task;
[0010] According to the task time consumption, determining a task progress of the video editing task, and displaying the task progress;
[0011] Receiving a task result of the video editing task sent by the server, and updating the video draft according to the task result.
[0012] In a second aspect, the present disclosure provides a video editing device, comprising a response module, a sending module, a receiving module, a determination module, a display module and an updating module, wherein:
[0013] The response module is configured to, in response to an editing operation on a video draft, create a video editing task of the video draft; the video editing task is a background task.
[0014] The sending module is configured to send task information of the video editing task to a server, the task information being used to instruct the server to execute the video editing task.
[0015] The receiving module is configured to receive a task duration sent by the server, the task duration being an estimated duration required by the server to complete the video editing task.
[0016] The determining module is configured to determine a task progress of the video editing task according to the task duration.
[0017] The display module is configured to display the task progress.
[0018] The receiving module is further configured to receive a task result of the video editing task sent by the server.
[0019] The updating module is configured to update the video draft according to the task result.
[0020] In a third aspect, an embodiment of the present disclosure provides a terminal device, comprising a processor and a memory.
[0021] The memory stores computer-executable instructions.
[0022] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video editing method as described in the first aspect and various possible aspects related to the first aspect.
[0023] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, the computer-readable storage medium storing computer-executable instructions, when the processor executes the computer-executable instructions, the video editing method as described in the first aspect and various possible aspects related to the first aspect is implemented. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0025] FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0026] FIG. 2 is a schematic diagram of another application scenario according to an embodiment of the present disclosure;
[0027] FIG. 3 is a schematic diagram of a video editing method according to an embodiment of the present disclosure;
[0028] FIG. 4 is a schematic diagram of a process of receiving a task time consumption according to an embodiment of the present disclosure;
[0029] FIG. 5 is a schematic diagram of a process of receiving a task result according to an embodiment of the present disclosure;
[0030] FIG. 6 is a schematic diagram of displaying a task progress and a task state according to an embodiment of the present disclosure;
[0031] FIG. 7 is a schematic diagram of a method of performing a video editing operation according to an embodiment of the present disclosure;
[0032] FIG. 8 is a schematic diagram of a process of performing a video editing operation according to an embodiment of the present disclosure;
[0033] FIG. 9 is a schematic diagram of a method of sending task information to a server according to an embodiment of the present disclosure;
[0034] FIG. 10 is a schematic diagram of a structure of a video editing apparatus according to an embodiment of the present disclosure;
[0035] FIG. 11 is a schematic diagram of a structure of a terminal device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to indicate the same elements in different drawings. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0037] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the range of use, the scenario of use, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0038] For example, in response to receiving a user's active request, prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can voluntarily choose whether to provide personal information to the terminal device, application program, server or storage medium, etc. software or hardware performing the operation of the technical solutions of the present disclosure according to the prompt information.
[0039] As an optional but non-limiting implementation, in response to receiving the active request of the user, the manner of sending the prompt information to the user may be, for example, a pop-up window manner, in which the prompt information may be presented in a text manner. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide the personal information to the terminal device.
[0040] It can be understood that the above notification and user authorization obtaining process is only illustrative and does not limit the implementation of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation of the present disclosure.
[0041] For ease of understanding, the concepts related to the embodiments of the present disclosure are described below.
[0042] Terminal device: a device with wireless transceiving function. The terminal device can be deployed on land, including indoor or outdoor, handheld, wearable or vehicle-mounted. The terminal device can be a mobile phone, a tablet computer (Pad), a computer with wireless transceiving function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a vehicle-mounted terminal device, a wireless terminal in self driving, a wireless terminal device in remote medical, a wireless terminal device in smart grid, a wireless terminal device in transportation safety, a wireless terminal device in smart city, a wireless terminal device in smart home, a wearable terminal device, etc. The terminal device related to the embodiments of the present disclosure can also be referred to as a terminal, a user equipment (UE), an access terminal device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote terminal device, a mobile device, a UE terminal device, a wireless communication device, a UE agent or a UE apparatus, etc. The terminal device can also be fixed or mobile.
[0043] In the related art, artificial intelligence technology can be applied in the field of video editing. A video editing related client can provide a user with intelligent video editing functions. For example, a digital person video editing function generated by artificial intelligence technology, a video editing function of voice separation by artificial intelligence technology, and the like. At present, due to the long time consumption of such video editing functions and the large parameters of artificial intelligence models, the video editing tasks corresponding to such video editing functions can be executed in a server. After the execution in the server ends, the terminal device can download the corresponding results. For example, the terminal device can send a segment of audio to the server, and the server can generate a digital person video according to the segment of audio. The terminal device can download the digital person video generated by the server. However, in the process of executing the task of such video editing functions in the server, the terminal device cannot accurately determine the progress and state of the task corresponding to such video editing functions, thereby causing poor display effect of the video editing task.
[0044] To solve the technical problems in the related art, the embodiments of the present disclosure provide a video editing method. In response to an editing operation on a video draft, a terminal device can create a video editing task of the video draft, and send task information of the video editing task to a server. The terminal device can receive a task time consumption sent by the server, and determine a task progress of the video editing task according to the task time consumption. The terminal device can obtain a running state of a video editing application. When the running state is foreground running, the terminal device can display the task progress in an editor of the video draft. The terminal device can receive a task result of the video editing task sent by the server, and update the video draft according to the task result. In this way, during the execution of the video editing task, the user can obtain the task progress in the editor of the video draft, and the user can continue to perform video editing on the video draft in the editor of the video draft, thereby improving the efficiency of video editing, improving the display flexibility and display effect of the video editing task, and improving the user experience.
[0045] Next, in combination with FIGS. 1-2, the application scenario of the embodiments of the present disclosure is described.
[0046] FIG. 1 is a schematic diagram of an application scenario provided by the embodiments of the present disclosure. Please refer to FIG. 1, which includes a terminal device. The terminal device can display an editor of a video draft. The editor of the video draft can include a preview area and a video editing area. The preview area can display the text "digital person synthesis is rendering 70%". In this way, the terminal device can obtain the task progress of the digital person synthesis task in the editor of the video draft, improve the display effect and display flexibility of the digital person synthesis task, and improve the user experience.
[0047] FIG. 2 is a schematic diagram of another application scenario provided by the embodiment of the present disclosure. Please refer to FIG. 2, which includes a terminal device. The terminal device can display a page of a video editing application. The page can include a start creation control (for video editing) and a draft box, wherein the draft box can include a video draft. The preview draft image of the video draft can display the text "70%" (task progress of the video editing task), and the lower side of the video draft can display the text "rendering" (task status of the video editing task). In this way, when the user closes the editor of the video draft, the terminal device can display the task progress and the task status of the video editing task in the draft box, improve the display effect and the display flexibility of the video editing task, and improve the user experience.
[0048] It should be noted that FIGS. 1-2 are only examples of the application scenarios of the embodiments of the present disclosure, and are not limiting on the application scenarios of the embodiments of the present disclosure.
[0049] The technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments. The embodiments of the present disclosure will be described below with reference to the accompanying drawings.
[0050] The present disclosure provides a video editing method, device and terminal device. The terminal device creates a video editing task of a video draft in response to an editing operation on the video draft, wherein the video editing task is a background task. The terminal device can send task information of the video editing task to a server, wherein the task information can be used to instruct the server to execute the video editing task. The terminal device can receive a task duration sent by the server, wherein the task duration is an estimated duration required by the server to complete the video editing task. The terminal device can determine a task progress of the video editing task according to the task duration and display the task progress. The terminal device can receive a task result of the video editing task sent by the server and update the video draft according to the task result. In the above method, since the video editing task is a background task, the user can continue to edit the video draft during the execution of the video editing task, improving the efficiency of video editing. In addition, since the terminal device can estimate the task progress of the video editing task and display the task progress, the display flexibility and the display effect of the video editing task can be improved. Furthermore, when the video editing task is completed, the terminal device can update the draft in time according to the task result, improving the user experience.
[0051] FIG. 3 is a flowchart of a video editing method according to an embodiment of the present disclosure. Please refer to FIG. 3, which can include the following steps:
[0052] S301, in response to an editing operation on the video draft, creating a video editing task of the video draft.
[0053] The execution subject of the embodiments of the present disclosure can be a terminal device, or a video editing apparatus in the terminal device. The video editing apparatus can be implemented according to software, or implemented according to a combination of software and hardware, and the embodiments of the present disclosure do not limit this.
[0054] The video editing task can be a task corresponding to the editing operation on the video draft. For example, the video editing task can be a video editing task of separating vocals from the video draft, or a video editing task of generating a digital person from the video draft, and the embodiments of the present disclosure do not limit this.
[0055] The video draft can be a preliminary edited version or an unfinished version in the video editing process. For example, the video draft can be a temporary stage in the video editing process, and the video draft can be used to record the progress of the current video editing, the editing operation of the user on the multimedia material (such as video material, audio material, etc.) in the video draft, and the like.
[0056] Optionally, the user can perform the editing operation on the video draft in the editor of the video draft, or perform the editing operation on the video draft based on any feasible implementation manner, and the embodiments of the present disclosure do not limit this.
[0057] Optionally, the video editing task can be a task with a processing time greater than or equal to a preset time length. For example, the video editing task on the video draft includes task 1 and task 2, if the time consumption of task 1 is greater than the preset time length, and the time consumption of task 2 is less than the preset time length, the terminal device can determine that the video editing task is task 1.
[0058] The video editing task can be a background task. For example, the video editing task can be a task processed in the background, so that the user can continue to operate in the video editing application during the processing of the video editing task, and the user experience is improved.
[0059] Optionally, the video editing task can be processed in the server. For example, because the task time consumption of the video editing task is relatively long, and the video editing task usually needs to be processed in combination with a neural network model, the video editing task can be processed in the server, thereby improving the processing efficiency of the video editing task. For example, the video editing task of synthesizing a digital person, the video editing task of separating vocals, etc. can be processed in the server, and after the server processing is completed, the terminal device can download the product (such as a video, an audio, etc.) of the video editing task.
[0060] Optionally, the terminal device can create a video editing task of the video draft in the asynchronous task queue in response to the editing operation on the video draft. For example, the asynchronous task queue can provide a unified task creation interface for the business layer, and the business layer can create a video editing task of the video draft in the asynchronous task queue based on the interface.
[0061] S302, send task information of the video editing task to the server.
[0062] The task information can be used to instruct the server to perform the video editing task. For example, the task information can include information required for processing the video editing task, and the server can perform the video editing task corresponding to the task information after receiving the task information. For example, the task information can include parameters corresponding to the video editing task. For example, the task information can include the type of the video editing task, the identifier of the video editing task, the resolution of the video, the audio parameter (volume), and the like, which are not limited in the embodiments of the present disclosure.
[0063] For example, if the video editing task is a task of synthesizing a digital human, the task information corresponding to the video editing task can include the identifier of the digital human model, the driving mode of the digital human (text driving or voice driving), the size and resolution of the video, the identifier of the background of the video, the identifier of the action and expression of the digital human, the volume, the speech speed, and the like.
[0064] For example, if the video editing task is a task of separating human voice, the task information corresponding to the video editing task can include the identifier of the audio source (such as human voice and background music), the degree parameter of human voice separation, and the output audio format.
[0065] Optionally, the video editing task further includes a preprocessing stage before processing, and the terminal device can obtain the task information corresponding to the video editing task after the preprocessing of the video editing task ends. For example, in the preprocessing stage of the task of synthesizing a digital human, the client can generate a text-to-speech (TTS) audio file according to a piece of text, and send the audio file to a content delivery network (CDN). The CDN can send a uniform resource locator (URL) to the client, through which the server can quickly and stably obtain the audio file from the CDN. After the preprocessing stage ends, the terminal device can obtain the task information including the URL, and the server can obtain the audio file based on the URL and generate a digital human video according to the audio file.
[0066] Optionally, the video editing task further includes a post-processing stage. The post-processing stage can be a stage in which the terminal device downloads the task result of the video editing task. For example, after the server notifies the client that the video editing task is completed, the server can issue the task result of the video editing task through an interface protocol, and the client can download the result. For example, the server can notify the client that the task status of the digital person synthesized video editing task is task completion, the server can issue the generated digital person video file in the form of a URL through an interface protocol, and the client can download the digital person video file and apply it to the video draft when receiving the notification.
[0067] Optionally, since the preprocessing stages of multiple video editing tasks can be different, in the software architecture, the business layer can preprocess multiple video editing tasks, and the intermediate layer can obtain task information corresponding to each video editing task. For example, the video editing task is a digital person synthesized video editing task, the business layer can execute the preprocessing stage of the digital person synthesized video editing task, that is, generate an audio file, send the audio file to the CDN, obtain the URL corresponding to the audio file, and send the URL to the intermediate layer. When the digital person synthesized task can be executed, the intermediate layer can send the task information of the digital person synthesized video editing task to the server, wherein the task information can include the URL corresponding to the audio file and other information related to the digital person synthesized video editing task. For example, the video editing task is a vocal separation video editing task, the business layer can execute the preprocessing stage of the vocal separation video editing task, that is, the business layer can obtain a video material segment to be subjected to vocal separation from the video material, extract an audio file of the video material segment, send the audio file to the CDN, obtain the URL corresponding to the audio file, and send the URL to the intermediate layer. When the vocal separation task can be executed, the intermediate layer can send the task information of the vocal separation video editing task to the server, and the task information can include the URL corresponding to the audio file and other information related to the vocal separation video editing task.
[0068] Optionally, since the task information can include part of fixed information (such as the identifier of the digital human model, the parameter of the voice separation, etc.), the terminal device can obtain the correspondence between the video editing task and the fixed information, and determine the fixed information of the video editing task according to the correspondence. For example, the terminal device can pre-configure the corresponding fixed information for each video editing task to obtain the correspondence, and after the terminal device determines the video editing task (for example, based on the video editing operation of the user, the terminal device determines the video editing task), the terminal device can determine the fixed information corresponding to the video editing task according to the identifier of the video editing task and the correspondence. For example, the fixed information corresponding to the video editing task of digital human synthesis is information 1, and the fixed information corresponding to the video editing task of voice separation is information 2. If the user selects the video editing function of digital human synthesis, the terminal device can determine that the video editing task is the video editing task of digital human synthesis, and the fixed information is information 1 (such as the identifier of the digital human model). If the user selects the video editing function of voice separation, the terminal device can determine that the video editing task is the video editing task of voice separation, and the fixed information is information 2 (such as the parameter of voice separation).
[0069] It should be noted that the terminal device can obtain the task information of the video editing task according to any feasible implementation manner (for example, when the user selects the video editing function of digital human synthesis, the user can also select the information of the digital human model, etc.), and the embodiments of the present disclosure are not limited thereto.
[0070] Optionally, the terminal device can determine the triggering moment of the video editing task, and then send the task information of the video editing task to the server at the triggering moment. For example, the terminal device can obtain multiple task information of multiple video editing tasks, and if there is an execution order between the multiple video editing tasks, the terminal device can send the multiple task information to the terminal device based on the execution order. For example, if the video editing task 1 is executed after the video editing task 2 is completed, the terminal device can send the task information of the video editing task 1 to the server, and after the video editing task 1 is completed, the terminal device can send the task information of the video editing task 2 to the server.
[0071] Among them, the background task framework can be included in the intermediate layer, which can send the task information corresponding to the video editing task to the server through a unified interface, and the background task framework can also receive the task information of the video editing task sent by the business end through a unified interface.
[0072] S303, receiving the task time consumption sent by the server.
[0073] The task time consumption can be an estimated time consumption required for the server to complete the video editing task. For example, the task time consumption can include a processing time consumption of the video editing task and a receiving time consumption of the task result after the video editing task is completed. For example, if the server predicts that the processing time consumption of the video editing task is 20 seconds and the time length for the client to download the task result is 10 seconds, the server can determine that the task time consumption is 30 seconds and send the first time length to the terminal device.
[0074] S304, determining a task progress of the video editing task according to the task time consumption.
[0075] The task progress can be used to indicate the processing progress of the video editing task. For example, the task progress can be any progress such as 1%, 10%, 20%,..., 100%, etc.
[0076] The terminal device can determine the task progress of the video editing task according to the following possible implementation manners: obtaining a current time and an initiation time of the video editing task, determining a target time length between the current time and the initiation time, and determining the task progress of the video editing task according to the task time consumption and the target time length.
[0077] The terminal device can obtain a timestamp of initiating the video editing task to obtain the initiation time of the video editing task, and can obtain a current timestamp to obtain the current time. It should be noted that the terminal device can also obtain the initiation time and the current time according to any possible implementation manner, which is not limited in the embodiments of the present disclosure.
[0078] Optionally, the terminal device can determine the task progress according to a ratio of the target time length to the task time consumption. For example, if the task time consumption is 30 seconds and the target time length is 15 seconds, the terminal device can determine that the task progress of the video editing task is 50%.
[0079] Optionally, since the video editing task also includes a preprocessing stage before processing, the task progress of the video editing task can also include the preprocessing stage. For example, the terminal device can determine that the proportion of the preprocessing stage of the video editing task in the task progress is a first percentage, and the proportion of the processing stage and the post-processing stage (the stage of downloading after the video editing task is completed) in the task progress is a second percentage, wherein the first percentage is less than the second percentage. For example, the terminal device can determine that the first percentage is less than or equal to 20% and the second percentage is greater than or equal to 20% and less than or equal to 100%. That is, the maximum proportion of the preprocessing stage of the video editing task in the task progress is 20%, and the maximum proportion of the processing stage and the post-processing stage of the video editing task in the task progress is 80%.
[0080] Optionally, the terminal device can determine the task progress of the preprocessing phase of the video editing task according to the total duration of the preprocessing phase of the video editing task and the current processing duration. For example, the first percentage is 20%, the total duration of the audio file uploading is 10 seconds, and if the current audio file has been uploaded by 50%, the terminal device can determine that the task progress of the video editing task is 10% (i.e., half of 20%). For example, if the task progress is 20%, it indicates that the preprocessing phase of the video editing task has been completed, and the video editing task is being processed. If the task progress is 100%, it indicates that the terminal device has downloaded the multimedia resource generated after the completion of the video editing task.
[0081] It should be noted that the terminal device determines the task progress of the processing phase and the post-processing phase of the video editing task can refer to the method that the terminal device determines the target duration according to the initiation time and the current time, and determines the task progress of the video editing task according to the task duration and the target duration, and the embodiments of the present disclosure will not be repeated.
[0082] Next, the process of receiving the task duration sent by the server will be described in combination with FIG. 4.
[0083] FIG. 4 is a process diagram for receiving a task duration according to an embodiment of the present disclosure. Please refer to FIG. 4, which includes a terminal device and a server. The terminal device can send task information of a video editing task to the server. The server can predict the completion duration of the video editing task corresponding to the task information and the download duration of the terminal device downloading the task result corresponding to the video editing task (the task duration includes the completion duration and the download duration) based on the task information, and send the completion duration and the download duration of the video editing task to the terminal device.
[0084] S305, display the task progress.
[0085] The terminal device can display the task progress according to the following possible implementation manners: obtaining the running state of the video editing application, and displaying the task progress in the editor of the video draft when the running state is foreground running.
[0086] The running state can include foreground running, background running, and closing. It should be noted that the terminal device can obtain the running state of the video editing application according to any possible implementation manner, and the embodiments of the present disclosure do not limit this.
[0087] The video draft can be a video draft corresponding to the video editing task. The editor of the video draft can be a video editing tool, and the user can perform editing operations on the video draft in the editor of the video draft.
[0088] The editor of the video draft can include a video editing area and a non-video editing area, and the terminal device can display the task progress in the non-video editing area. For example, the editor of the video draft can include a video editing area and a preview area (non-video editing area), and after the terminal device determines the task progress, the terminal device can display the task progress in the preview area. In this way, the user can obtain the task progress of the video editing task in a timely manner within the editor of the video draft, thereby improving the user experience.
[0089] If the running state of the video editing application is foreground running, it indicates that the terminal device has started the video editing application and displays the page of the video editing application. If the page of the video editing application is the page of the video editor, the terminal device can display the task progress in the video editor (as shown in FIG. 1).
[0090] When the terminal device displays the task progress in the editor of the video draft, the terminal device can further: close the editor of the video draft and display the task progress in the draft box of the video editing application.
[0091] The draft box can include a video draft. For example, if the user closes the editor of the video draft, the page displayed by the terminal device can include a draft box. The terminal device can determine a preview image corresponding to the video draft in the draft box, and display the task progress of the video editing task in the preview image and the task state of the video editing task below the preview image.
[0092] S306, receiving the task result of the video editing task sent by the server.
[0093] The task result can include a link of a multimedia resource. For example, when the video editing task is completed, the task result can include a link of a multimedia resource corresponding to the video editing task, and the terminal device can download the multimedia resource based on the link. For example, if the video editing task is a digital person synthesis video editing task, when the video editing task is completed, the task result can include a URL of a digital person video, and the terminal device can download the digital person video based on the URL.
[0094] Optionally, the task result can further include a task state. For example, the task state can include any state related to the processing of the video editing task, such as task processing, task suspension, task failure, and task completion, and the embodiments of the present disclosure are not limited in this regard. For example, if the task state is task failure or task processing, the task result does not include a link of a multimedia resource, and if the task state is task completion, the task result can include a link of a multimedia resource.
[0095] Optionally, the terminal device can request the current task result (task state) from the server through a polling mechanism; the terminal device can also establish a long link with the server, and then obtain the task result (task state) of the video editing task based on the long link; the terminal device can also receive a notification bar Push message, and then determine the task result (task state) of the video editing task, which is not limited in the embodiments of the present disclosure.
[0096] Next, the process of receiving the task result sent by the server will be described in combination with FIG. 5.
[0097] FIG. 5 is a process diagram for receiving a task result according to an embodiment of the present disclosure. Please refer to FIG. 5, which includes a terminal device and a server. The terminal device can send a request 1 (requesting to obtain the current task result of the video editing task) to the server, the server determines that the current task result of the video editing task is task processing, and the terminal device can receive the notification of the task processing sent by the server. The terminal device can send a request 2 (requesting to obtain the current task result of the video editing task) to the server, the server can determine that the current task result of the video editing task is task completion, and send a notification of the task completion to the terminal device. In this way, the terminal device can accurately obtain the task result of the video editing task through a polling mechanism.
[0098] When the terminal device displays the task progress, the task state can also be obtained from the task result, and the task state can be displayed. In this way, the display effect of the video editing task can be improved.
[0099] Optionally, since the video editing task takes a long time, the user can close the video editing application or run the video editing application in the background during the process of the video editing task. In this case, the terminal device can display the task state according to the following manner: when the video editing application is running in the background or is closed, the push message is displayed.
[0100] The push message can be used to indicate that the task state has changed. For example, the push message can be a Push message, the server can send the Push message to the terminal device when determining that the task state of the video editing task has changed, the terminal device can receive the Push message of the notification bar, and display the message. For example, when the video editing task is completed, the server can send a Push message of the task completion to the terminal device, and the terminal device can display the Push message. If the user clicks the Push message, the terminal device can start the video editing application, and open the video draft corresponding to the Push message. For example, if the user clicks the push notification (task completion) of the digital person synthesis video editing task, the terminal device can run the video editing application in the foreground, and display the video draft corresponding to the video editing task, which can include a digital person video.
[0101] Optionally, the terminal device can re-listen to the task status when the video editing application is restarted, wherein the terminal device can re-acquire the task status according to at least one of the following manners:
[0102] reinitializing the task manager and re-listening to the task status;
[0103] requesting the current task status from the server through a polling mechanism;
[0104] establishing a long link to receive the message of the task status change sent by the server.
[0105] In this way, after the user closes the video editing application, the video editing task can be processed in the background. When the video editing task is completed, the server can send a push notification of the task completion to the terminal device, and the terminal device can display the push notification. The user can view the video draft in time. In addition, when the user restarts the video editing application, the terminal device can acquire the current task status of the video editing task, and continuously listen to the task status of the video editing task, so that the user can know the progress of the video editing task in time.
[0106] Next, the terminal device displays the task progress and the task status will be described in detail in combination with FIG. 6.
[0107] FIG. 6 is a schematic diagram of displaying the task progress and the task status according to an embodiment of the present disclosure. Referring to FIG. 6, the terminal device can display the video draft editor, which can include a video editing area and a preview area (non-video editing area). The preview area can include the text “Task 1 is processing 70%” and “Task 2 is processing 30%”. Task 1 and Task 2 can be video editing tasks corresponding to the video draft.
[0108] Referring to FIG. 6, when the user clicks the back control in the video draft editor, the terminal device can display the main page of the video editing application. The main page can include a start creation control and a draft box, and the draft box can include a video draft. The preview image of the video draft can display 70% (task progress of Task 1), and the lower side of the preview image can display the text “Task 1 is processing” (task status of Task 1).
[0109] Please refer to FIG. 6, after a period of time, the preview image can display 30% (the task progress of task 2, for the convenience of understanding, in FIG. 6, the task progress of task 2 does not change after a period of time), the lower side of the preview image can display the text "task 2 processing" (the task status of task 2). After the completion of task 1 and task 2, the lower side of the preview image can display the text "task completed". In this way, after the user exits the editor of the video draft, the task progress and the task status can also be obtained in the draft box, improving the experience of the user.
[0110] It should be noted that in the embodiment shown in FIG. 6, when the number of video editing tasks is large, the draft box can cyclically display the task progress and the task status of multiple video editing tasks, thereby improving the display effect of the video editing task.
[0111] S307, updating the video draft according to the task result.
[0112] Among them, the terminal device can update the video draft according to the following possible implementation manners: in the task result, the link of the multimedia resource related to the video editing task is determined, the multimedia resource is obtained according to the link of the multimedia resource, and the video draft is updated according to the multimedia resource.
[0113] Among them, when the video editing task is completed, the task result received by the terminal device can include the link of the multimedia resource, the terminal device can download the multimedia resource based on the link, and update the video draft based on the multimedia resource. For example, the task result of the digital person synthesis video editing task can include the URL of the digital person video, the terminal device can download the digital person video based on the URL, and store the digital person video locally to obtain the path information of the digital person video. The terminal device can write the path information into the video draft, and then add the digital person video to the video draft.
[0114] Optionally, the terminal device can synchronize the video editing task corresponding to the video draft. For example, if the video editing task corresponding to the video draft has been completed in terminal device A, when terminal device B downloads the video draft, the video editing task has been completed, if the video editing task corresponding to the video draft has not been completed in terminal device A, when terminal device B downloads the video draft, the monitoring of the task result of the video editing task can be triggered again, so that the video editing task can be applied to the video draft downloaded by terminal device B in time when the video editing task is completed.
[0115] The video editing method provided in the embodiments of the present disclosure can improve the display flexibility and display effect of the video editing task.
[0116] On the basis of the embodiment shown in FIG. 2, when the terminal device displays the task progress and / or the task state in the editor of the video draft, the video editing method further includes a method for performing a video editing operation. The method for performing a video editing operation is described in detail below in combination with FIG. 7.
[0117] FIG. 7 is a schematic diagram of a method for performing a video editing operation according to an embodiment of the present disclosure. Referring to FIG. 7, the method flow includes the following steps.
[0118] S701, obtaining a video editing operation.
[0119] The video editing operation can be an editing operation performed on a video draft. For example, a user can edit multimedia materials of a video draft in an editor of the video draft. For example, the video editing operation can include any video editing operation such as video material segmentation, video material deletion, adding special effects, adding subtitles, etc., and the embodiments of the present disclosure do not limit this.
[0120] It should be noted that the terminal device can obtain the video editing operation according to any feasible implementation manner (for example, determining the video editing operation according to the operation of the user in the editor of the video draft), and the embodiments of the present disclosure do not limit this.
[0121] S702, performing the video editing operation in the editor of the video draft.
[0122] After the terminal device obtains the video editing operation, the terminal device can perform the video editing operation in the video editing area of the editor of the video draft. For example, if the video editing operation is to add special effects, the terminal device can add special effects in the track of the video editing area. For example, the video draft can include video material 1 and video material 2, and if the video editing operation is to add a transition special effect between the video material 1 and the video material 2, the terminal device can add the transition special effect between the video material 1 and the video material 2.
[0123] Next, a process of performing a video editing operation is described in conjunction with FIG. 8.
[0124] FIG. 8 is a schematic diagram of a process of performing a video editing operation according to an embodiment of the present disclosure. Referring to FIG. 8, the process includes a terminal device. The terminal device can display a video draft editor. The preview area of the video draft editor can display a preview image of 1 frame and a text “Task is being processed 70%”. The video editing area of the video draft editor can include preview images of 1 frame, 2 frames, and 3 frames, and a timeline at the position of 1 frame. The video editing area also includes a sun sticker and a star sticker.
[0125] Referring to FIG. 8, when the user clicks the sun sticker, the terminal device can add the sun sticker to the 1 frame image displayed in the preview area, and can display a text “Task is being processed 75%”. In this way, the video draft editor can display not only the task progress and the task status, but also allow the user to perform video editing in the editor, thereby improving the efficiency of video editing.
[0126] The embodiment of the present disclosure provides a method of performing a video editing operation. The terminal device can obtain a video editing operation and perform the video editing operation in a video draft editor. In this way, the terminal device can display the task progress and / or the task status of the video editing task in the video draft editor, and the user can also edit the video draft in the video draft editor, thereby avoiding the situation that the user cannot edit the video draft during the execution of the video editing task, improving the efficiency of video editing and the user experience.
[0127] Based on any one of the above embodiments, the method of sending task information to a server in the above video editing method is described below in conjunction with FIG. 9.
[0128] FIG. 9 is a schematic diagram of a method of sending task information to a server according to an embodiment of the present disclosure. Referring to FIG. 9, the method includes the following steps.
[0129] S901, obtaining a coupling relationship of a video editing task.
[0130] The video editing task can be an asynchronous task. For example, the video editing task can be a task in an asynchronous queue, so that the terminal device can process multiple video editing tasks in parallel, thereby improving the processing efficiency of the video editing task.
[0131] The coupling relationship can include any coupling relationship such as task mutual exclusion and task re-run, which is not limited in the embodiment of the present disclosure.
[0132] S902, determining a trigger time of the video editing task according to the coupling relationship.
[0133] The trigger time can be an execution time of the video editing task. For example, when the terminal device acquires the task information of the video editing task, if the video editing task needs to wait for the execution of other video editing tasks to be completed before being executed, the terminal device can determine the trigger time as the time when the other video editing tasks are executed to be completed.
[0134] Optionally, the terminal device can schedule each asynchronous task, and automatically process the coupling relationship of the asynchronous tasks. For example, the middle layer of the software architecture can include an asynchronous task queue, which can schedule each asynchronous task (video editing task) and automatically process the coupling relationship between the asynchronous tasks (the asynchronous task queue can provide a unified task creation interface for the business layer, and when the business layer completes the preprocessing of the video editing task, the task information can be sent to the asynchronous task queue through the interface), thereby obtaining the execution order of the multiple asynchronous tasks (which can be executed in parallel or sequentially, determined according to the coupling relationship of the asynchronous tasks), and determining the trigger time of each asynchronous task according to the execution order. For example, if the coupling relationship is that the video editing task 1 and the video editing task 2 are irrelevant, the video editing task 3 needs to wait for the video editing task 1 to be completed before being executed, and the video editing task 4 needs to wait for the video editing task 1 and the video editing task 2 to be completed before being executed, the execution order of the multiple video editing tasks is that the video editing task 1 and the video editing task 2 are executed first, the video editing task 3 is executed when the video editing task 1 is completed, and the video editing task 4 is executed when the video editing task 1 and the video editing task 2 are completed.
[0135] For example, if the terminal device determines that the video editing task 1 and the video editing task 2 can be executed in parallel, and the video editing task 3 is executed when the video editing task 1 is completed, the terminal device can determine the trigger time of the video editing task 1 and the video editing task 2 as the current time, and the trigger time of the video editing task 3 as the completion time of the video editing task 1.
[0136] S903, according to the trigger time, sending the task information to the server.
[0137] The terminal device can send task information of the video editing task to the server at a moment of execution of the video editing task, and the server can process the video editing task upon receiving the task information. For example, after the terminal device obtains the task information of the digital person synthesis video editing task, the terminal device can send the task information to the server at a triggering moment of the digital person synthesis task, and the server can generate a digital person video according to the task information upon receiving the task information. For example, the asynchronous task queue can send the task information of the video editing task to the terminal device through the background task framework, and the background task framework can also provide the task progress and the task state of the video editing task. In this way, the background task framework can be part of the asynchronous task queue, and the processing efficiency and complexity of the video editing task can be improved.
[0138] The method for sending task information to a server is provided in the embodiments of the present disclosure. The terminal device can obtain a coupling relationship of a video editing task, determine a triggering moment of the video editing task according to the coupling relationship, and send the task information to the server according to the triggering moment. In this way, the terminal device can accurately send the task information to the server, so that the server can accurately process the video editing task, and the processing accuracy of the video editing task is improved.
[0139] FIG. 10 is a structural schematic diagram of a video editing device provided by the embodiments of the present disclosure. Referring to FIG. 10, the video editing device 1000 includes a response module 1001, a sending module 1002, a receiving module 1003, a determination module 1004, a display module 1005, and an updating module 1006, wherein:
[0140] The response module 1001 is configured to create a video editing task of a video draft in response to an editing operation on the video draft, and the video editing task is a background task.
[0141] The sending module 1002 is configured to send task information of the video editing task to a server, and the task information is used to instruct the server to execute the video editing task.
[0142] The receiving module 1003 is configured to receive a task duration sent by the server, and the task duration is an estimated duration required for the server to complete the video editing task.
[0143] The determination module 1004 is configured to determine a task progress of the video editing task according to the task duration.
[0144] The display module 1005 is configured to display the task progress.
[0145] The receiving module 1003 is further configured to receive a task result of the video editing task sent by the server.
[0146] The updating module 1006 is configured to update the video draft according to the task result.
[0147] According to one or more embodiments of the present disclosure, the display module 1005 is specifically configured to:
[0148] obtain a running state of a video editing application;
[0149] display the task progress in an editor of a video draft when the running state is foreground running.
[0150] According to one or more embodiments of the present disclosure, the display module 1005 is further configured to:
[0151] obtain a video editing operation;
[0152] execute the video editing operation in the editor of the video draft.
[0153] According to one or more embodiments of the present disclosure, the display module 1005 is further configured to:
[0154] close the editor of the video draft;
[0155] display the task progress in a draft box of the video editing application, the draft box including the video draft.
[0156] According to one or more embodiments of the present disclosure, the updating module 1006 is specifically configured to:
[0157] determine, in the task result, a link of a multimedia resource related to the video editing task;
[0158] obtain the multimedia resource according to the link of the multimedia resource, and update the video draft according to the multimedia resource.
[0159] According to one or more embodiments of the present disclosure, the display module 1005 is further configured to:
[0160] obtain a task state in the task result;
[0161] display the task state.
[0162] According to one or more embodiments of the present disclosure, the display module 1005 is further configured to:
[0163] display a push message when the video editing application is in background running or closed, the push message being used to indicate that the task state is changed.
[0164] According to one or more embodiments of the present disclosure, the display module 1005 is further configured to:
[0165] When the video editing application is restarted, the task state is reacquired according to at least one of the following manners:
[0166] reinitializing the task manager and re-monitoring the task state;
[0167] requesting the current task state from the server through a polling mechanism;
[0168] establishing a long connection to receive a message about the change of the task state sent by the server.
[0169] According to one or more embodiments of the present disclosure, the determining module 1004 is specifically configured to:
[0170] acquire a current time and a starting time of the video editing task, and determine a target time length between the current time and the starting time;
[0171] determine a task progress of the video editing task according to the task time length and the target time length, the task time length including a processing time length of the video editing task and a receiving time length of the task result after the video editing task is completed.
[0172] According to one or more embodiments of the present disclosure, the sending module 1002 is specifically configured to:
[0173] acquire a coupling relationship of the video editing task;
[0174] determine a triggering time of the video editing task according to the coupling relationship;
[0175] send the task information to the server according to the triggering time.
[0176] The video editing apparatus provided by the embodiments of the present disclosure can be used to execute the technical solutions of the above-mentioned method embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0177] FIG. 11 is a structural diagram of a terminal device according to an embodiment of the disclosure. Referring to FIG. 11, a structural diagram of a terminal device 1100 according to an embodiment of the disclosure is illustrated. The terminal device can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a portable multimedia player (PMP), a car terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The terminal device illustrated in FIG. 11 is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the disclosure.
[0178] As illustrated in FIG. 11, the terminal device 1100 can include a processing device (e.g., a central processing unit, a graphic processing unit, or the like) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 to a random access memory (RAM) 1103. Various programs and data required for the operation of the terminal device 1100 are also stored in the RAM 1103. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0179] Generally, the following devices can be connected to the I / O interface 1105: an input device 1106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; an output device 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; a storage device 1108 including, for example, a magnetic tape, a hard disk, and the like; and a communication device 1109. The communication device 1109 can allow the terminal device 1100 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 11 illustrates the terminal device 1100 having various devices, it should be understood that all of the illustrated devices are not required to be implemented or provided. More or fewer devices can be alternatively implemented or provided.
[0180] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 1109, or installed from the storage device 1108, or installed from the ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0181] It should be noted that the computer readable medium described above in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, the computer readable signal medium can include a data signal propagated in a baseband or as a carrier wave in a propagated data signal, in which the computer readable program code is carried. Such a propagated data signal can take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer readable medium can be transmitted by any suitable medium, including, but not limited to, a wire, an optical fiber, an RF (radio frequency) or the like, or any suitable combination thereof.
[0182] The computer readable medium described above can be included in the terminal device described above; or can exist separately and not be assembled into the terminal device.
[0183] The computer readable medium described above carries one or more programs, which, when executed by the terminal device, cause the terminal device to perform the methods illustrated by the embodiments described above.
[0184] The embodiment of the present disclosure provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, the method related to various possible embodiments described above is implemented.
[0185] The embodiment of the present disclosure provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the method related to various possible embodiments described above.
[0186] Computer program code for carrying out operations of the present disclosure can be written in one or more programming languages or combinations of languages including object oriented programming languages such as Java, Smalltalk, C++ or conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0187] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code containing one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that noted in the accompanying drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the involved functions. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0188] The units described in the embodiments of the present disclosure can be implemented in the form of software, or can be implemented in the form of hardware. In some cases, the names of the units do not constitute a limitation on the units themselves. For example, the first obtaining unit can also be described as a unit that obtains at least two Internet protocol addresses.
[0189] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0190] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0191] It should be noted that the modification of "one" or "multiple" mentioned in the present disclosure is illustrative rather than limiting, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0192] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0193] It can be understood that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the technical solution should comply with the requirements of the corresponding laws, regulations and relevant provisions. The data can include information, parameters and messages, etc., such as flow splitting indication information.
[0194] In a first aspect, the embodiments of the present disclosure provide a video editing method, which comprises:
[0195] obtaining task information of a video editing task, the video editing task being a background task with a processing duration greater than or equal to a preset duration, the task information being used for processing the video editing task;
[0196] sending the task information to a server, and receiving a first duration sent by the server, the first duration being a completion time predicted by the server for the video editing task;
[0197] obtaining an initiation time and a current time of the video editing task;
[0198] determining a task progress of the video editing task according to the initiation time, the current time and the first duration, and displaying the task progress.
[0199] According to one or more embodiments of the present disclosure, displaying the task progress comprises:
[0200] obtaining a running state of a video editing application;
[0201] when the running state is foreground running, displaying the task progress in an editor of a video editing draft corresponding to the video editing task.
[0202] According to one or more embodiments of the present disclosure, when the task progress is displayed in the editor of the video editing draft, the method further comprises:
[0203] obtaining a video editing operation;
[0204] executing the video editing operation in the editor of the video editing draft.
[0205] According to one or more embodiments of the present disclosure, when the task progress is displayed in the editor of the video editing draft, the method further comprises:
[0206] closing the editor of the video editing draft;
[0207] displaying the task progress in a draft box of the video editing application, the draft box comprising the video editing draft.
[0208] According to one or more embodiments of the present disclosure, when the task progress is displayed, the method further comprises:
[0209] obtaining a task status of the video editing task, and displaying the task status.
[0210] According to one or more embodiments of the present disclosure, the method further comprises:
[0211] When the video editing application is running in the background or is closed, a push message is displayed, the push message being used to indicate that the task status has changed.
[0212] According to one or more embodiments of the present disclosure, the method further comprises:
[0213] When the video editing application is restarted, the task status of the video editing task is reacquired according to at least one of the following manners:
[0214] The task manager is reinitialized, and the task status of the video editing task is re-listened to;
[0215] The current task status of the video editing task is requested from the server through a polling mechanism;
[0216] A long link is established to receive the message of the change of the task status of the video editing task sent by the server.
[0217] According to one or more embodiments of the present disclosure, the task progress of the video editing task is determined according to the initiation time, the current time, and the first time length, comprising:
[0218] A second time length is determined according to the initiation time and the current time;
[0219] The task progress of the video editing task is determined according to the first time length and the second time length, the first time length including the processing time length of the video editing task and the download time length after the video editing task is completed.
[0220] According to one or more embodiments of the present disclosure, the video editing task is an asynchronous task; the processing information is sent to the server, comprising:
[0221] The coupling relationship of the video editing task is acquired;
[0222] The trigger time of the video editing task is determined according to the coupling relationship;
[0223] The processing information is sent to the server according to the trigger time.
[0224] In a second aspect, the present disclosure provides a video editing device, comprising a first acquisition module, a sending module, a receiving module, a second acquisition module, a determination module, and a display module, wherein:
[0225] The first acquisition module is used to acquire the task information of a video editing task, the video editing task being a background task with a processing time length greater than or equal to a preset time length, the task information being used to process the video editing task;
[0226] The sending module is configured to send the task information to a server;
[0227] The receiving module is configured to receive a first time length sent by the server, the first time length being a completion time length of the video editing task predicted by the server;
[0228] The second obtaining module is configured to obtain an initiation time and a current time of the video editing task;
[0229] The determining module is configured to determine a task progress of the video editing task according to the initiation time, the current time and the first time length;
[0230] The display module is configured to display the task progress.
[0231] According to one or more embodiments of the present disclosure, the display module is specifically configured to:
[0232] obtain a running state of a video editing application;
[0233] when the running state is foreground running, display the task progress in an editor of a video editing draft corresponding to the video editing task.
[0234] According to one or more embodiments of the present disclosure, the display module is further configured to:
[0235] obtain a video editing operation;
[0236] execute the video editing operation in the editor of the video editing draft.
[0237] According to one or more embodiments of the present disclosure, the display module is further configured to:
[0238] close the editor of the video editing draft;
[0239] display the task progress in a draft box of the video editing application, the draft box including the video editing draft.
[0240] According to one or more embodiments of the present disclosure, the display module is further configured to:
[0241] obtain a task state of the video editing task and display the task state.
[0242] According to one or more embodiments of the present disclosure, the display module is further configured to:
[0243] when the video editing application is in background running or closed, display a push message, the push message being used to indicate that the task state has changed.
[0244] According to one or more embodiments of the present disclosure, the display module is further configured to:
[0245] When the video editing application is restarted, the task state of the video editing task is reacquired in at least one of the following manners:
[0246] reinitializing the task manager and re-monitoring the task state of the video editing task;
[0247] requesting the current task state of the video editing task from the server through a polling mechanism;
[0248] establishing a long connection to receive a message about the change of the task state of the video editing task sent by the server.
[0249] According to one or more embodiments of the present disclosure, the determination module is specifically configured to:
[0250] determining a second time length according to the initiation time and the current time;
[0251] determining the task progress of the video editing task according to the first time length and the second time length, the first time length including a processing time length of the video editing task and a downloading time length after the video editing task is completed.
[0252] According to one or more embodiments of the present disclosure, the sending module is specifically configured to:
[0253] acquiring a coupling relationship of the video editing task;
[0254] determining a triggering time of the video editing task according to the coupling relationship;
[0255] sending the processing information to the server according to the triggering time.
[0256] In a third aspect, an embodiment of the present disclosure provides a terminal device, comprising a processor and a memory.
[0257] The memory stores computer-executable instructions.
[0258] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video editing method as described in the first aspect and various possible aspects related to the first aspect.
[0259] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the video editing method as described in the first aspect and various possible aspects related to the first aspect is implemented.
[0260] The above description merely illustrates the preferred embodiments of the disclosure and a principle of applied technologies. It should be understood by those skilled in the art that the disclosed scope of the disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the disclosure (but not limited to) having similar functions.
[0261] Furthermore, although operations are depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in sequential order, and that certain operations can be performed in parallel or concurrently. Also, although several specific implementation details are included herein, they should not be construed as limitations on the scope of the disclosure, and that the specific features described in the context of separate embodiments can also be combined in any suitable sub-combination. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination. Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely illustrative of the example forms of implementing the claims.
Claims
1. A video editing method, comprising: creating a video editing task of a video draft in response to an editing operation on the video draft; the video editing task being a background task; sending task information of the video editing task to a server, the task information being used to instruct the server to execute the video editing task; receiving a task duration sent by the server, the task duration being an estimated duration for the server to complete the video editing task; determining a task progress of the video editing task according to the task duration, and displaying the task progress; receiving a task result of the video editing task sent by the server, and updating the video draft according to the task result.
2. The method of claim 1, wherein, displaying the task progress, comprising: obtaining a running state of a video editing application; when the running state is foreground running, displaying the task progress in an editor of the video draft.
3. The method of claim 2, wherein, when the task progress is displayed in the editor of the video draft, the method further comprises: obtaining a video editing operation; executing the video editing operation in the editor of the video draft.
4. The method of claim 2, wherein, when the task progress is displayed in the editor of the video draft, the method further comprises: closing the editor of the video draft; displaying the task progress in a draft box of the video editing application, the draft box comprising the video draft.
5. The method according to any one of claims 1 to 4, wherein, updating the video draft according to the task result, comprising: determining a link of a multimedia resource related to the video editing task in the task result; obtaining the multimedia resource according to the link of the multimedia resource, and updating the video draft according to the multimedia resource. 6.The method of claim 5, further comprising: obtaining a task state in the task result; displaying the task state. 7.The method of claim 6, further comprising: when the video editing application is background running or closed, displaying a push message, the push message being used to indicate that the task state has changed. 8.The method of claim 6, further comprising: when the video editing application is restarted, re-obtaining the task state according to at least one of the following manners: re-initializing a task manager, and re-listening to the task state; requesting the current task state from the server through a polling mechanism; establishing a long link, and receiving a message sent by the server about the change of the task state.
9. The method according to any one of claims 1-4, wherein, determining the task progress of the video editing task according to the task duration, comprising: obtaining a current time and a starting time of the video editing task, and determining a target duration between the current time and the starting time; determining the task progress of the video editing task according to the task duration and the target duration, the task duration comprising a processing duration of the video editing task and a receiving duration of the task result after the video editing task is completed.
10. The method of any one of claims 1-4, wherein, the video editing task being an asynchronous task; sending the task information to the server, comprising: obtaining a coupling relationship of the video editing task; determining a triggering time of the video editing task according to the coupling relationship; According to the trigger time, the task information is sent to the server. 11.A video editing apparatus, comprising a response module, a sending module, a receiving module, a determining module, a display module and an updating module, wherein: The response module is configured to, in response to an editing operation on a video draft, create a video editing task of the video draft, wherein the video editing task is a background task; The sending module is configured to send task information of the video editing task to a server, wherein the task information is used to instruct the server to execute the video editing task; The receiving module is configured to receive a task duration sent by the server, wherein the task duration is an estimated duration required by the server to complete the video editing task; The determining module is configured to determine a task progress of the video editing task according to the task duration; The display module is configured to display the task progress; The receiving module is further configured to receive a task result of the video editing task sent by the server; and The updating module is configured to update the video draft according to the task result.
12. A terminal device comprising: a processor and a memory; The memory stores computer-executed instructions; The processor executes the computer-executed instructions stored in the memory, so that the processor executes the video editing method according to any one of claims 1-10. 13.A computer readable storage medium, wherein computer-executed instructions are stored in the computer readable storage medium, and when a processor executes the computer-executed instructions, the video editing method according to any one of claims 1-10 is implemented.
Citation Information
Patent Citations
Multi-media file processing method and system
CN104424242A
Video processing method, device and equipment and computer readable storage medium
CN115250372A
Audio and video editing method and device, electronic equipment and storage medium
CN116166398A
Video plot reorganization method and device, electronic equipment and storage medium
CN116980718A
Video editing method and device, equipment and storage medium
CN117336554A