Video processing method and device, electronic equipment and storage medium

Through the target task processor and executable unit identification, decoupled video card point special effects and video variable speed special effects task flow, functional programming and front-end separation design are adopted, which solves the complex and chaotic video editing task process, and achieves efficient and accurate video processing.

CN120378696APending Publication Date: 2025-07-25BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410103049.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

When existing video editing software and online platforms add video card effects and video speed effects, the task process is complex and easy to cause confusion, resulting in inconsistent processing logic.

Method used

By determining the target task processor, decoupling the video processing task as video card point effects and video speed effects, the target executable unit is used to identify the decomposition task flow, and the sub-tasks are processed in turn by different executable units, and functional programming and front-end separation design are adopted to improve processing flexibility and accuracy.

Benefits of technology

Effectively manage video processing task flow, avoid call confusion, improve processing flexibility and efficiency, ensure that each executable unit focuses on its subtasks, and improve processing accuracy and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378696A_ABST
    Figure CN120378696A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video processing method and device, electronic equipment and a storage medium. The method comprises the following steps: determining a target task processor adopted by a target video processing task, wherein the target task processor is used for indicating to add a video sticking point special effect or a video speed change special effect to a target video clip; determining at least one target executable unit identifier required for executing the target video processing task through a target task processor, wherein each executable unit is used for processing sub-tasks in the video processing task; and based on the at least one target executable unit identifier, calling an executable unit for execution through a target task processor, so that each executable unit is responsible for executing sub-tasks in the corresponding video processing task in sequence. According to the scheme, different task processes in the video processing task can be effectively managed, and task processing logic confusion is avoided as far as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular, to a video processing method, device, electronic device, and storage medium. Background Art

[0002] With the rapid development of online video platforms and the growing demand for video processing, functions such as matching background music for videos and generating music card videos have become one of the basic functions of many video editing software and online platforms. Although these functions can help users create more attractive and interesting video content and improve the quality and viewing experience of videos, due to the influence of factors such as cache and music in video editing tasks, two related video editing tasks may derive multiple inconsistent video editing task processes, making the process of video editing tasks complicated. Summary of the invention

[0003] The present disclosure provides a video processing method, device, electronic device and storage medium to achieve effective management of different task flows in a video processing task and avoid task processing logic confusion as much as possible.

[0004] In a first aspect, an embodiment of the present disclosure provides a video processing method, the method comprising:

[0005] Determine a target task processor used by a target video processing task, wherein the target task processor is used to instruct adding a video card point special effect or a video speed change special effect to a target video segment;

[0006] Determining, by a target task processor, at least one target executable unit identifier required for executing the target video processing task, each executable unit being used to process a subtask in the video processing task;

[0007] Based on the at least one target executable unit identifier, the target task processor calls the executable unit for execution, so that each executable unit is responsible for executing the subtask in the corresponding video processing task in turn.

[0008] In a second aspect, an embodiment of the present disclosure further provides a video processing device, the device comprising:

[0009] A first determination module is used to determine a target task processor used by a target video processing task, wherein the target task processor is used to instruct to add a video card point special effect or a video speed change special effect to a target video segment;

[0010] A second determination module, configured to determine, through a target task processor, at least one target executable unit identifier required for executing the target video processing task, each executable unit being configured to process a subtask in the video processing task;

[0011] An execution module, configured to call an executable unit for execution through a target task processor based on the at least one target executable unit identifier, so that each executable unit is sequentially responsible for executing a subtask in the corresponding video processing task.

[0012] In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:

[0013] At least one processor; and

[0014] A memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the video processing method according to any one of the foregoing embodiments.

[0016] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable medium, which stores computer instructions for causing a processor to implement the video processing method according to any one of the foregoing embodiments when executed.

[0017] The technical solution of the embodiment of the present disclosure, when performing a target video processing task, determines a target task processor adopted by the target video processing task, and the target task processor is used to indicate adding a video card point special effect or a video speed change special effect to a target video segment. Different task processors can decouple video processing tasks with different task processes to avoid call chaos; determine at least one target executable unit identifier required for executing the target video processing task through the target task processor, and each executable unit is used to process a subtask in the video processing task; based on the at least one target executable unit identifier, call the executable unit for execution through the target task processor, so that each executable unit is sequentially responsible for executing a subtask in the corresponding video processing task, decomposing the video processing task into subtasks, and sequentially responsible for processing by different executable units, which helps to improve the flexibility and efficiency of processing. Each executable unit focuses on processing the subtask it is responsible for, which helps to improve the accuracy and quality of processing.

[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that the original elements and elements are not necessarily drawn to scale.

[0020] Figure 1 It is a schematic flowchart of a video processing method provided by an embodiment of the present disclosure;

[0021] Figure 2 It is a schematic flowchart of a process for adding a video freeze-frame special effect to a video clip provided by an embodiment of the present disclosure;

[0022] Figure 3 It is a schematic flowchart of a process for adding a video speed change special effect to a video clip provided by an embodiment of the present disclosure;

[0023] Figure 4 It is a branch schematic diagram of adding a video speed change special effect and a video freeze-frame special effect to a video clip provided by an embodiment of the present disclosure;

[0024] Figure 5 It is a schematic diagram of the architecture for executing a video processing task provided by an embodiment of the present disclosure;

[0025] Figure 6 It is a schematic diagram of the combination of different executable units in a video processing task provided by an embodiment of the present disclosure;

[0026] Figure 7 It is a schematic flowchart of another video processing method provided by an embodiment of the present disclosure;

[0027] Figure 8 It is a schematic diagram of the unified switching of executable units to the main thread in a video processing task provided by an embodiment of the present disclosure;

[0028] Figure 9 It is a schematic diagram of the change of the task state during the execution of a video processing task provided by an embodiment of the present disclosure;

[0029] Figure 10 It is a design schematic diagram of the separation of the write front end and the write back end of the executable unit in a video processing task provided by an embodiment of the present disclosure;

[0030] Figure 11 It is a schematic diagram of obtaining freeze frames during the process of adding a video freeze-frame special effect to a video clip provided by an embodiment of the present disclosure;

[0031] Figure 12 It is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure;

[0032] Figure 13 It is a structural schematic diagram of an electronic device for implementing a video processing method provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0035] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0036] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0037] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0038] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0039] Figure 1 A flow chart of a video processing method provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to the case of adding video card point special effects and video speed change special effects to video materials. The method can be executed by a video processing device, which can be implemented in the form of software and / or hardware and is generally integrated on any electronic device with network communication function, which can be a mobile terminal, PC or server, etc.

[0040] As Figure 1 shown, the video processing method of the embodiments of the present disclosure may include the following processes:

[0041] S110. Determine a target task processor for a target video processing task, where the target task processor is used to indicate adding a video freeze-frame special effect or a video speed change special effect to a target video segment.

[0042] Refer to Figure 2 and Figure 3 , two new video editing types are added in video editing. Corresponding video editing effects need to be completed through corresponding video processing tasks, such as video freeze-frame special effects and video speed change special effects. The key steps are as follows: Obtain music beats => Submit music beat information to generate curve speed change parameter information => After obtaining the curve speed change parameter information, generate a video with a speed change effect from the original video => Replace the original video with the speed change video and re-render it on the screen. Clicking on any video editing type will use a fixed video processing task flow to generate a new video with special effects to replace the original video for replay.

[0043] Refer to Figure 2 and Figure 3 and Figure 4 , different video processing tasks involve different task flows. For example, taking the video freeze-frame special effect task and the video speed change special effect task as examples, there are two task flows for adding video freeze-frame special effects and video speed change special effects to a target video segment. The two task flows of video freeze-frame special effects and video speed change special effects will have multiple task flow branches due to whether the cache is hit and whether there is music, resulting in a total of 5 branches. However, the video freeze-frame special effect task and the video speed change special effect task have multiple task flow branches due to cache and music, making it difficult to manage different task flows.

[0044] Therefore, refer to Figure 5 , video editing may include video freeze-frame special effects and video speed change special effects. Since the specific task flows of the same special effect method can be reused, the page is horizontally divided into two task processors Processor corresponding to video freeze-frame special effects and video speed change special effects respectively. Each task processor Processor is directly associated and communicated with the video editing function corresponding to each task processor Processor to avoid coupling formed by direct calls in two video editing task scenarios.

[0045] As an optional but non-limiting implementation, refer to Figure 5 , determining the target task processor for the target video processing task includes the following steps A1 - A2:

[0046] Step A1: In response to a trigger operation for a target video processing task, determine the task operation type corresponding to the target video processing task.

[0047] Step A2: Determine a target task processor that matches the task operation type corresponding to the target video processing task from at least two candidate task processors, and each task processor is directly associated with a video editing function corresponding to each task processor.

[0048] S120: Determine at least one target executable unit identifier required to execute the target video processing task through the target task processor, and each executable unit is used to process subtasks in the video processing task.

[0049] See Figure 6 , there are differences in the task processes of two video processing tasks, namely video freeze-frame special effects and video speed change special effects, due to the presence or absence of cache and music. For example, there will be multiple task process branches for the two task processes of video freeze-frame special effects and video speed change special effects depending on whether the cache is hit and whether there is music. Therefore, the two video processing tasks of video freeze-frame special effects and video speed change special effects are vertically divided into two parts: a task integration layer Integrator and a task logic layer Logic. This allows the target processor to flexibly assemble different executable units Action according to different video processing tasks, so as to perform the target video processing task to be achieved by the target task processor through modular and flexible assembly of different executable units Action.

[0050] As an optional but non-limiting implementation, determining at least one target executable unit identifier required to execute the target video processing task through the target task processor includes the following steps B1 - B2:

[0051] Step B1: Determine the task status of the target video processing task through the target task processor. The task status of the target video processing task is used to indicate whether there is already a task processing result for executing the target video processing task on the target video segment in the cache and whether there is a reference audio segment required for executing the target video processing task on the target video segment.

[0052] Step B2: Based on the task status of the target video processing task, determine at least one target executable unit identifier that matches the task status of the target video processing task and is required to execute the target video processing task from the executable unit identifiers hit by different video processing task statuses indicated by the task integration layer.

[0053] See Figure 2 And Figure 3, The target task processor is a component or module specifically responsible for processing target video processing tasks. Through the target task processor, task status information regarding the target video processing task can be obtained. The task status information of the target video processing task indicates the following: whether there is a task processing result for performing the target video processing task on the target video segment. If there is, it means that the previous target video processing task has been completed, and the task processing result can be directly used without having to perform it again.

[0054] See Figure 2 And Figure 3 , The task status information of the target video processing task also indicates the following: whether there is a reference audio segment required for performing the target video processing task on the target video segment. The reference audio segment will be used to provide the position points or time points in the target video segment that need to be synchronized in the target video processing task, that is, to extract the rhythm and beats of the audio segment from the reference audio segment to generate the position points or time points in the target video segment that need to be synchronized.

[0055] See Figure 5 , In the task integration layer Integrator, Provider is a registrar, designed using Dependency Inversion Principle (DIP). The video processing task uses DSL to declare the identifiers of the executable units (Actions) required to complete the video processing task. The registrar will combine these declarations and provide them to the upper-layer target task processor so that the target task processor can find the appropriate executable unit Action according to the executable unit identifier to complete the subtasks in the corresponding video processing task it is responsible for. The declarative design is mainly to achieve the Single Responsibility Principle (SRP). The DSL declarative design is easier to maintain because the relationships between them are clearly defined. At the same time, it also restricts the scope of changes to business configurations from the perspective of the Open-Closed Principle (OCP).

[0056] S130. Based on at least one target executable unit identifier, call the executable unit through the target task processor for serial execution so that each executable unit is responsible for executing the subtasks in the corresponding video processing task in sequence.

[0057] In the technical solution of the embodiment of the present disclosure, when performing a target video processing task, a target task processor for the target video processing task is determined. The target task processor is used to indicate adding a video freeze-frame special effect or a video speed change special effect to a target video segment. By using different task processors, video processing tasks of different task processes can be decoupled to avoid call chaos. At least one target executable unit identifier required for executing the target video processing task is determined through the target task processor. Each executable unit is used to process a subtask in the video processing task. Based on at least one target executable unit identifier, the executable unit is called through the target task processor for execution, so that each executable unit is sequentially responsible for executing the subtask corresponding to the video processing task, decomposing the video processing task into subtasks, and different executable units are sequentially responsible for processing, which helps to improve the flexibility and efficiency of processing. Each executable unit focuses on processing the subtask it is responsible for, which helps to improve the accuracy and quality of processing.

[0058] Figure 7 FIG. is a schematic flowchart of another video processing method provided by the embodiment of the present disclosure. The technical solution of this embodiment further optimizes the process of calling the executable unit for execution through the target task processor based on at least one target executable unit identifier on the basis of the technical solution of the foregoing embodiment. This embodiment can be combined with each optional solution in one or more of the foregoing embodiments.

[0059] As Figure 7 shown, the video processing method of the embodiment of the present disclosure may include the following processes:

[0060] S810. Determine a target task processor for the target video processing task. The target task processor is used to indicate adding a video freeze-frame special effect or a video speed change special effect to a target video segment.

[0061] S820. Determine at least one target executable unit identifier required for executing the target video processing task through the target task processor. Each executable unit is used to process a subtask in the video processing task.

[0062] S830. Based on at least one target executable unit identifier, determine at least one target executable unit required for executing the target video processing task from the set of executable units corresponding to the task logic layer through the target task processor.

[0063] See Figure 5, the task logic layer Logic includes two layers, namely, the executable unit set Actions and the task tool set Tools. The executable unit set Actions includes multiple executable units Action. Each executable unit is executable code obtained by splitting the task process required for executing the target video processing task and is used to process subtasks in the target video processing task.

[0064] As an optional but non-limiting implementation, the execution functions between executable units do not overlap and are independent of each other. Each executable unit encapsulates executable code responsible for processing subtasks in the video processing task based on functional programming. Each executable unit does not retain the task processing status when executing subtasks in the corresponding video processing task.

[0065] See Figure 5 , take Figure 2 and Figure 3 the video processing tasks corresponding to the video freeze-frame special effect and the video speed change special effect in as an example. The executable unit set Actions divides the process of the entire video processing task into 8 executable units vertically based on the single responsibility principle. Each executable unit is responsible for a specific subtask in the video processing task. The functions of each executable unit do not overlap and are independent of each other. And each executable unit Action is encapsulated based on the idea of functional programming. The executable unit Action only encapsulates specific executable code and cannot hold any state, so as to make each unit measurable and predictable. The business side does not need to consider multi-threading problems.

[0066] Optionally, no state needs to be held during the execution of the executable unit Action. It can be encapsulated in the way of functional programming and cannot hold any state, so as to make each unit measurable and predictable and achieve the effect of preventing degradation. This design for the executable unit Action ensures the same input and the same output. The results generated by the mutual calls between functions are predictable. The executable unit can be tested. Since the executable unit Action cannot hold any state, parallel computing can be performed without data competition problems. Moreover, the scope of code modification for subsequent function iteration is strictly limited and has a good development experience. S840. Switch to the main thread through the task executor in the target task processor to serially execute at least one target executable unit, so that each executable unit is responsible for executing subtasks in the corresponding video processing task in turn.

[0067] The target task processor receives signals from the upper layer. According to at least one target executable unit identifier, the target task processor determines at least one target executable unit required to execute the target video processing task from the corresponding set of executable units in the task logic layer. For example, it determines the task flow array required to execute the target video processing task according to the task status, that is, Array <action>Among them, the target task processor Processor itself uses an inherited design pattern for vertical layering. Most of the same logic is aggregated in Base, and only the morphological differences in details are provided by the two subclasses to Base for final decision-making.

[0068] See Figure 5 And Figure 12 , at least one target executable unit Action required for the serial target video processing task is executed by using the corresponding WalkAction method of the task executor inside the target task processor Processor, that is, Array is executed <action>Moreover, when serially executing at least one target executable unit, during WalkAction, all operations of NLE are ensured to be performed on the main thread by uniformly switching to the main thread for running each executable unit Action.

[0069] See Figure 12 , when the task executor WalkAction uniformly switches to the main thread for running each executable unit Action, a series of validations will be performed to ensure the robustness of the main process: whether the result of the previous step is Error, and if it is Error, it will be uniformly processed and called back to the upper layer. Whether the result returned by the previous step matches the parameters required by the current executable unit Action declaration. If the parameters do not match, the subsequent process will go wrong. Therefore, the target task processor Processor will uniformly handle such problems and return them to the upper layer.

[0070] Among them, due to the limitations of the Objc language, the target task processor Processor depends on the Promise returned by the executable unit Action to drive subsequent tasks. Considering the architectural robustness, if the Action business error does not return a Promise, the entire process will get stuck. Therefore, an additional layer of Promise validation will be performed. WalkAction controls the execution of the executable unit Action at the top layer. Therefore, the monitoring of the executable unit Action does not need to penetrate into the specific business and can be uniformly processed in the Processor.

[0071] As an optional but non-limiting implementation method, serially executing at least one target executable unit further includes the following process:

[0072] When serially executing the target executable unit, if the execution result generated during the task processing of the target executable unit needs to be stored, the write permission verification process is performed through the write front-end component corresponding to the target executable unit, and when the write permission verification passes, the execution result is written into the memory through the write back-end component corresponding to the target executable unit.

[0073] See Figure 9 , the process of the entire video processing task is relatively long, and there is an entry to cancel the process in the upper layer. However, some steps cannot be cancelled midway once they start (such as obtaining music beats). After cancelling the current video processing task process and when some steps are not completed, a new process is initiated. Specific analysis: First step, at the beginning, the user triggers operations Action1 - Action8, and the current memory storing the Actions to be operated on is Array <action1-action8>, The execution status of the Action is to asynchronously execute Action1. Second, then the user cancels the execution of the existing Actions, and the Action memory is cleared and becomes an Array <nil>。However, at this time, the previous Action2 has already been executed asynchronously and cannot be cancelled. Thirdly, the user then triggers the Action1 - Action8 operations again. The current memory storing the Actions to be operated on is an Array <action1-action8>, but it is no longer the same set of processes as Actions 1 - 8 before. In the fourth step, when Action 2 in the first step is completed, the execution of the next Action needs to be triggered. At this time, there will be a memory safety issue with the object that maintains the Actions memory.

[0074] Meanwhile, as mentioned in the process overview, the context provided by the high-level compiler and a batch of read-only information combined based on the specific task status will generate some states during the execution of the executable unit Action (such as the NLE object used for exporting videos, the execution result of each executable unit Action, etc.) that need to be saved, and there is a need for writing.

[0075] See Figure 9 , to meet these requirements, the ForzenContext (ReadOnly) and State (Locked, ReadWrite) objects are abstracted based on the single responsibility principle. In addition, since the write operation is not thread-safe and unconstrained writing will make the program difficult to debug and maintain, the write operation is designed with a front-end and back-end separation for writing, divided into a write front-end component and a write back-end component. There is a read-only write front-end on the ForzenContext, and a write back-end on the LockedState. The write permission verification is processed through the write front-end component corresponding to the target executable unit, and when the write permission verification passes, the execution result is written into the memory through the write back-end component corresponding to the target executable unit.

[0076] Optionally, LockedState is specifically responsible for state management, which is a complete abstraction of the entire video processing task. The class Data (model) design: The top-level task processor Processor holds the LockedState, and all write permissions are converged to the top level for unified control. The lower-level executable unit Action only has a write front-end and cannot directly obtain the LockedState, which is thread-safe. With the above design, the state of the business can be fully expressed by data, and the task execution status can be observed based on the value of the LockedState, avoiding the loss of data security issues in each executable unit Actions out of control.

[0077] Optionally, ForzenContext represents that this part of the data is read-only and is safe to use in multi-threading. It is an abstraction of all the context data required for video editing and the running of video processing tasks, saving the NLE rendering instance to avoid write operations such as releasing rendering interruption and converging write permissions. With the above design, it can achieve safe use in multi-threading, the write permission needs to be clearly declared, and the front-end and back-end of the write operation are separated, which is convenient for expanding write permission management. The write back-end is responsible for the actual write logic to ensure clear responsibilities.

[0078] As an optional but not limiting implementation, the serial execution of at least one target executable unit includes the following processes:

[0079] For some of the target executable units among at least one target executable unit, when serially executing the target executable unit, at least one task tool in the corresponding task tool set of the task logic layer is called through the target executable unit to assist the target executable unit in processing sub-tasks in the video processing task.

[0080] See Figure 5 , in the task tool set Tools, the FrameSeeker (bidirectional communication between frame submission and Effect) and the AudioBeatTracking video beat special effect service can be encapsulated based on the single responsibility principle. When determining the beat information required for the video beat special effect for the target video segment corresponding to the reference audio segment, the curve speed change parameters are generated based on the beat information to change the speed of the video segment, so as to add the video beat special effect. The beat information can indicate the position point or time point in the video segment where beats are required. The beat information can indicate the time point or position where the picture and audio rhythm or beat of the video segment can match during the video editing process, so that the picture and audio rhythm or beat of the video segment coincide.

[0081] There is a timer inside the frame seeker, which can regularly call the NLE frame seeking operation interface to submit the curve speed change parameter acquisition request EffectRequest based on the beat information to the curve speed change parameter generator Effect. At the same time, the frame seeker will register the Effect Response listener. When the response message generated by the curve speed change parameter generator arrives, the externally injected MessageHandler will be used to process the message. If the response message Response generated by the curve speed change parameter generator has pages, after collecting all the response messages generated by the curve speed change parameter generator, the externally called PageMergingHandler will be called for final processing, and then the curve speed change parameter information of the reference audio segment to be provided to the video segment after processing will be returned to the caller. The frame seeker is designed as a basic component for communicating with the curve speed change parameter generator Effect. Different services can inject custom MessageHandler and PageMergingHandler to achieve reuse.

[0082] See Figure 11 , for the task tool corresponding to the video beat special effect service, when determining the beat information that the reference audio segment is to provide to the video segment, it will first try to find out whether the beat information related to the reference audio segment has been stored in the verification cache. The cache is a temporary storage area for storing data, which can improve the access speed of data in some cases. If it is detected that there is beat information in the cache, the beat information matching the video segment can be quickly obtained from the cache, which can avoid repeated calculations or obtaining the same information from other data sources, thereby improving efficiency. Optionally, in the case where there is beat information in the cache, the beat information stored in the cache can be filtered by TrimRange and then returned to the caller. By filtering the cache by TrimRange, it is ensured that the beat information returned to the caller is relevant to the current requirements.

[0083] In the technical solution of the embodiment of the present disclosure, when performing a target video processing task, a target task processor adopted for the target video processing task is determined. The target task processor is used to indicate adding a video beat special effect or a video speed change special effect to the target video segment. By using different task processors, video processing tasks of different task processes can be decoupled to avoid call chaos; at least one target executable unit identifier required for executing the target video processing task is determined through the target task processor, and each executable unit is used to process a sub-task in the video processing task; based on at least one target executable unit identifier, the executable unit is called through the target task processor to be executed, so that each executable unit is responsible for executing the sub-task corresponding to the video processing task in turn, decomposing the video processing task into sub-tasks, and different executable units are responsible for processing in turn, which helps to improve the flexibility and efficiency of processing. Each executable unit focuses on processing the sub-task it is responsible for, which helps to improve the accuracy and quality of processing.

[0084] Figure 12 FIG. is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of adding a video beat special effect and a video speed change special effect to video materials. The video processing device can be implemented in the form of software and / or hardware, and is generally integrated on any electronic device with network communication functions. The electronic device can be a mobile terminal, a PC or a server, etc.

[0085] As Figure 12 shown, the video processing device of the embodiment of the present disclosure may include the following:

[0086] A first determination module 1510, configured to determine a target task processor adopted for the target video processing task, where the target task processor is used to indicate adding a video beat special effect or a video speed change special effect to the target video segment;

[0087] A second determination module 1520, configured to determine, by a target task processor, at least one target executable unit identifier required for executing the target video processing task, where each executable unit is used to process a sub-task in the video processing task;

[0088] An execution module 1530, configured to, based on the at least one target executable unit identifier, call an executable unit through the target task processor for execution, so that each executable unit is sequentially responsible for executing a sub-task in the corresponding video processing task.

[0089] Based on the technical solution of the foregoing embodiment, optionally, determining a target task processor for the target video processing task includes:

[0090] In response to a trigger operation for the target video processing task, determining a task operation type corresponding to the target video processing task;

[0091] Determining, from at least two candidate task processors, a target task processor that matches the task operation type corresponding to the target video processing task, where each task processor is directly associated with a video editing function corresponding to each task processor.

[0092] Based on the technical solution of the foregoing embodiment, optionally, determining, by the target task processor, at least one target executable unit identifier required for executing the target video processing task includes:

[0093] Determining, by the target task processor, a task status of the target video processing task, where the task status of the target video processing task is used to indicate whether a task processing result of executing the target video processing task on a target video segment already exists in a cache and whether a reference audio segment required for executing the target video processing task on the target video segment exists;

[0094] Based on the task status of the target video processing task, determining, from the executable unit identifiers hit by different video processing task statuses indicated by a task integration layer, at least one target executable unit identifier that matches the task status of the target video processing task and is required for executing the target video processing task.

[0095] Based on the technical solution of the foregoing embodiment, optionally, based on the at least one target executable unit identifier, calling an executable unit through the target task processor for execution includes:

[0096] Based on the at least one target executable unit identifier, determining, by the target task processor, at least one target executable unit required for executing the target video processing task from an executable unit set corresponding to a task logic layer;

[0097] The task executor in the target task processor switches to the main thread to serially execute at least one target executable unit.

[0098] Based on the technical solutions of the above embodiments, optionally, the execution functions between the executable units do not cross and are independent of each other. Each executable unit is encapsulated with executable code for handling subtasks in video processing tasks based on functional programming. Each executable unit does not retain the task processing status when executing subtasks in the corresponding video processing tasks.

[0099] Based on the technical solutions of the above embodiments, optionally, each executable unit is obtained by splitting the task flow required for executing the target video processing task, and is executable code for handling subtasks in the target video processing task.

[0100] Based on the technical solutions of the above embodiments, optionally, serially executing at least one target executable unit includes:

[0101] For some of the target executable units among at least one target executable unit, when serially executing the target executable unit, at least one task tool in the corresponding task tool set of the task logic layer is called by the target executable unit to assist the target executable unit in processing subtasks in the video processing task.

[0102] Based on the technical solutions of the above embodiments, optionally, serially executing at least one target executable unit further includes:

[0103] When serially executing the target executable unit, if the execution result generated during the task processing of the target executable unit needs to be stored, write permission verification processing is performed through the write front-end component corresponding to the target executable unit, and when the write permission verification passes, the execution result is written into the memory through the write back-end component corresponding to the target executable unit.

[0104] In the technical solution of the embodiment of the present disclosure, when performing a target video processing task, a target task processor for the target video processing task is determined. The target task processor is used to indicate adding a video beat effect or a video speed change effect to a target video segment. By using different task processors, video processing tasks with different task processes can be decoupled to avoid call chaos. At least one target executable unit identifier required for executing the target video processing task is determined through the target task processor. Each executable unit is used to process a subtask in the video processing task. Based on at least one target executable unit identifier, the executable unit is called through the target task processor for execution, so that each executable unit is responsible for executing the subtask corresponding to the video processing task in sequence, decomposing the video processing task into subtasks, and different executable units are responsible for processing in sequence, which helps to improve the flexibility and efficiency of processing. Each executable unit focuses on processing the subtask it is responsible for, which helps to improve the accuracy and quality of processing.

[0105] The video processing device provided by the embodiment of the present disclosure can execute the video processing method provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the video processing method.

[0106] It should be noted that the various units and modules included in the above device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized. In addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiment of the present disclosure.

[0107] Figure 13 It is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. Referring below to Figure 13 , which shows a schematic structural diagram of an electronic device 1600 suitable for implementing the embodiment of the present disclosure (such as Figure 13 the terminal device or server in). The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 13 The electronic device shown is only an example and should not bring any limitation to the functions and usage scope of the embodiment of the present disclosure.

[0108] Such as Figure 13 As shown, the electronic device 1600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1601, which may perform various appropriate actions and processes according to the programs stored in the read-only memory (ROM) 1602 or the programs loaded from the storage device 1608 into the random access memory (RAM) 1603. In the RAM 1603, various programs and data required for the operation of the electronic device 1600 are also stored. The processing device 1601, the ROM 1602, and the RAM 1603 are connected to each other through a bus 1604. The editing / output (I / O) interface 1605 is also connected to the bus 1604.

[0109] Generally, the following devices may be connected to the I / O interface 1605: an input device 1606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1609. The communication device 1609 may allow the electronic device 1600 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 13 an electronic device 1600 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0110] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 1609, or installed from the storage device 1608, or installed from the ROM 1602. When the computer program is executed by the processing device 1601, the above functions defined in the video processing method of the embodiment of the present disclosure are executed.

[0111] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0112] The electronic device provided by the embodiment of the present disclosure and the video processing method provided by the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment may be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0113] An embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the video processing method provided in the above embodiment is implemented.

[0114] It should be noted that the computer-readable medium in the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0115] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (for example, a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (for example, the Internet), and end-to-end networks (for example, ad hoc end-to-end networks), as well as any currently known or future-developed network.

[0116] The above computer-readable medium may be included in the above electronic device; or it may exist separately and not be assembled into the electronic device.

[0117] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: determine a target task processor for a target video processing task, where the target task processor is used to indicate adding a video beat effect or a video speed change effect to a target video segment; determine, through the target task processor, at least one target executable unit identifier required to execute the target video processing task, where each executable unit is used to process a subtask in the video processing task; based on the at least one target executable unit identifier, call the executable unit through the target task processor for execution, so that each executable unit is sequentially responsible for executing the subtask in the corresponding video processing task.

[0118] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in a different order than marked in the accompanying drawings. For example, two consecutive boxes shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0120] The units involved in the embodiments of the present disclosure can be implemented in software or in hardware. Among them, the name of a unit does not constitute a limitation on the unit itself in some cases. For example, the first acquisition unit can also be described as "the unit for acquiring at least two Internet protocol addresses".

[0121] The functions described above herein can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary 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), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and so on.

[0122] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 of the foregoing.

[0123] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in the present disclosure.

[0124] Moreover, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the foregoing discussion, these should not be construed as limitations on the scope of the present disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0125] 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 matter 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 example forms of implementing the claims. < / nil> < / action> < / action>

Claims

1. A video processing method, characterized in that, The method includes: Determine a target task processor for a target video processing task, where the target task processor is used to indicate adding a video beat effect or a video speed change effect to a target video segment; Determine, by the target task processor, at least one target executable unit identifier required to execute the target video processing task, where each executable unit is used to process a subtask in the video processing task; Based on the at least one target executable unit identifier, call the executable unit through the target task processor for execution, so that each executable unit is sequentially responsible for executing the subtask in the corresponding video processing task.

2. The method according to claim 1, wherein Determining a target task processor for a target video processing task includes: In response to a trigger operation for a target video processing task, determine a task operation type corresponding to the target video processing task; Determine, from at least two candidate task processors, a target task processor that matches the task operation type corresponding to the target video processing task, where each task processor is directly associated with a video editing function corresponding to each task processor.

3. The method according to claim 1, wherein Determining, by the target task processor, at least one target executable unit identifier required to execute the target video processing task includes: Determine, by the target task processor, the task status of the target video processing task, where the task status of the target video processing task is used to indicate whether there is already a task processing result of executing the target video processing task on the target video segment in the cache and whether there is a reference audio segment required to execute the target video processing task on the target video segment; Based on the task status of the target video processing task, determine, from the executable unit identifiers hit by different video processing task statuses indicated by the task integration layer, at least one target executable unit identifier that matches the task status of the target video processing task and is required to execute the target video processing task.

4. The method according to claim 1, wherein Based on the at least one target executable unit identifier, calling the executable unit through the target task processor for execution includes: Based on the at least one target executable unit identifier, determine, by the target task processor, at least one target executable unit required to execute the target video processing task from the set of executable units corresponding to the task logic layer; Switch to the main thread through the task executor in the target task processor to serially execute at least one target executable unit.

5. The method according to any one of claims 1 to 4, characterized in that The execution functions between the executable units do not cross and are independent of each other. Each executable unit is encapsulated with executable code for responsible for processing a subtask in the video processing task based on a functional programming method, and each executable unit does not retain the task processing status when executing the subtask in the corresponding video processing task.

6. The method according to any one of claims 1 to 4, characterized in that, The executable units are obtained by splitting the task process required to execute the target video processing task into executable code for processing subtasks in the target video processing task.

7. The method according to claim 4, characterized in that, Serial execution of at least one target executable unit includes: For some of the target executable units in at least one target executable unit, when the target executable units are serially executed, at least one task tool in the corresponding task tool set of the task logic layer is called by the target executable unit to assist the target executable unit in processing subtasks in the video processing task.

8. The method according to claim 4, characterized in that, Serial execution of at least one target executable unit further includes: When the target executable unit is serially executed, if the execution result generated during the task processing of the target executable unit needs to be stored, the write permission verification process is performed through the write front-end component corresponding to the target executable unit, and when the write permission verification passes, the execution result is written into the memory through the write back-end component corresponding to the target executable unit.

9. A video processing device, characterized in that, The device includes: A first determination module, configured to determine a target task processor for the target video processing task, where the target task processor is used to indicate adding a video freeze-frame effect or a video speed change effect to the target video segment; A second determination module, configured to determine, through the target task processor, at least one target executable unit identifier required to execute the target video processing task, and each executable unit is used to process subtasks in the video processing task; An execution module, configured to, based on the at least one target executable unit identifier, call the executable unit through the target task processor to execute, so that each executable unit is sequentially responsible for executing the corresponding subtasks in the video processing task.

10. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the video processing method according to any one of claims 1-8.

11. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to execute the video processing method according to any one of claims 1-8.