Data updating method and device

By updating data based on the number of times the clip is referenced by the editing engine during video editing, and using deep copy or locking mechanisms, the stuttering problem caused by the introduction of materials in video editing is solved, improving editing efficiency and user experience.

CN119544891BActive Publication Date: 2025-12-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311121253.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-12-05
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

In existing technologies, introducing new material during video editing causes the editing engine to stop running, resulting in system lag and low editing efficiency.

Method used

By responding to user update operations, the target segment is identified, and data is updated using deep copy or locking mechanisms based on the number of times the segment is referenced by the editing engine, avoiding read-write conflicts and ensuring the smooth operation of the editing engine.

Benefits of technology

It improves video editing efficiency, avoids editing engine lag, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544891B_ABST
    Figure CN119544891B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data updating method and device. The method determines a target segment corresponding to an updating operation of a user on data in a video edit in at least one segment, the segment including to-be-edited data required to be referenced by an editing engine corresponding to the video edit, and determines the updating operation on the data in the target segment in a manner of replacing after locking or copying the target segment according to a count of times the target segment is referenced by the editing engine, and then updates a timeline corresponding to the video edit. In the technical solution, the count of times a segment involved in data updating is referenced by an editing engine is counted to determine whether the data is updated in a manner of replacing after copying or directly locking, so as to avoid read-write conflict when the editing engine calls the segment, thereby ensuring smooth running of the editing engine and improving editing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a data updating method and apparatus. Background Technology

[0002] During video editing, the editing engine often uses information about the clips needed at different points in time recorded in the timeline to generate preview images by calling the corresponding clips. In this process, users often introduce new clips to enrich the video editing effect in order to meet certain needs.

[0003] In existing technologies, when introducing new footage, the editing engine is often stopped. After the footage is added to the corresponding clip, the entire timeline is updated. During this update, the editing engine converts the format of the footage in each clip according to the definition of the data model to ensure that the changes made during video editing are correctly applied.

[0004] However, existing methods require the editing engine to stop editing operations, which can cause system lag and result in low editing efficiency. Summary of the Invention

[0005] This disclosure provides a data update method and apparatus to solve the problem in the prior art where the increase of materials causes lag during editing and affects editing efficiency.

[0006] In a first aspect, embodiments of this disclosure provide a data update method, including:

[0007] In response to a user's update operation on data in video editing, a target segment corresponding to the update operation is identified in at least one segment, the segment including the data to be edited that the editing engine corresponding to the video editing needs to reference;

[0008] Based on the number of times the target segment is referenced by the editing engine, it is determined whether to perform an update operation on the data in the target segment by locking or copying and then replacing the target segment;

[0009] Update the timeline corresponding to the video editing, which records information about the segments that the editing engine needs to reference at different points in time.

[0010] Secondly, embodiments of this disclosure provide a data update device, the device comprising:

[0011] The first determining module is used to determine the target segment corresponding to the update operation in at least one segment in response to the user's update operation on the data in the video editing. The segment is used to store the data to be edited that the editing engine corresponding to the video editing needs to reference.

[0012] The second determining module is used to determine, based on the number of times the target segment is referenced by the editing engine, whether to perform an update operation on the data in the target segment by locking or copying and then replacing it;

[0013] The update module is used to update the timeline corresponding to the video editing, which records information about the segments that the editing engine needs to reference at different points in time.

[0014] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor, and a memory and a transceiver communicatively connected to the processor;

[0015] The memory stores computer-executed instructions; the transceiver is used for sending and receiving data.

[0016] The processor executes computer execution instructions stored in the memory to implement the data update method as described in the first aspect above.

[0017] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data update method described in the first aspect.

[0018] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the data update method described in the first aspect above.

[0019] The data update method and apparatus disclosed herein respond to a user's update operation on data in video editing. The method identifies a target segment corresponding to the update operation within at least one segment. This segment includes data to be edited that is required by the video editing engine. Based on the number of times the target segment is referenced by the editing engine, the method determines whether to update the data in the target segment by locking or copying and replacing it. Then, the timeline corresponding to the video editing is updated, which records information about segments required by the editing engine at different time points. This technical solution uses the number of times the segment involved in the data update is referenced by the editing engine to determine whether updating the segment requires copying and replacing or locking, thus avoiding read / write conflicts when the editing engine calls the segment, ensuring smooth operation of the editing engine, and improving editing efficiency. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0021] Figure 1 A schematic diagram of the data update method flow provided for existing technologies;

[0022] Figure 2 This is a schematic diagram of the data update method architecture provided in this disclosure;

[0023] Figure 3 Flowchart of the data update method provided in the embodiments of this disclosure Figure 1 ;

[0024] Figure 4 Flowchart of the data update method provided in the embodiments of this disclosure Figure 2 ;

[0025] Figure 5 Flowchart of the data update method provided in the embodiments of this disclosure Figure 3 ;

[0026] Figure 6 Flowchart of the data update method provided in the embodiments of this disclosure Figure 4 ;

[0027] Figure 7 A schematic diagram of the structure of the data update device provided in the embodiments of this disclosure;

[0028] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.

[0029] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation

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

[0031] Before introducing the embodiments of this disclosure, the technical terms and application background involved in the embodiments of this disclosure will be explained first:

[0032] Editing footage on the timeline refers to the process of cutting, modifying, and processing footage in video editing software. Non-linear editing refers to an editing method that allows for the arbitrary selection and combination of footage clips according to individual needs, without having to edit in a linear order.

[0033] Data model layer: This is the data structure used in editing software to manage and store source materials and editing information;

[0034] Sequence: refers to a single editing sequence created in editing software. It contains multiple video and audio tracks and is used to organize and manage the order of the footage.

[0035] Clip: A clip, or segment, is a data model layer object representing a piece of footage, containing information such as the content, duration, and attributes of the footage. It is the basic unit on the timeline and can be placed on different tracks.

[0036] Track: A data model layer object representing a timeline, used to manage and organize the order of footage clips. Multiple tracks can be created on the timeline, and different clips can be placed on different tracks to achieve the desired editing effects.

[0037] The relationship between the Model layer, the engine layer (i.e., the editing engine), and the business layer is as follows: the Model layer is responsible for managing the data model in the editing software, the engine layer is responsible for implementing the core functions and algorithms of the editing software, and the business layer provides the interface and operation logic of the editing software to the outside world, which involves data updates, etc.

[0038] Business layer calling Modify Clip: This refers to the business layer in editing software calling the Modify Clip function to modify the attributes of the footage clip or perform other editing operations;

[0039] Deep copy and the Lock mechanism are two different ways to handle modification conflicts. A deep copy copies the data before modification, thus avoiding conflicts between multiple operations. The Lock mechanism, on the other hand, locks the data before modification, requiring other operations to wait for the lock to be released, ensuring that only one operation can modify the data at a time. The choice of which method to use depends on the specific situation, aiming to avoid data conflicts and ensure data consistency.

[0040] Timeline: The main interface in editing software used to organize and display footage clips and editing operations. It can contain multiple tracks, and each track can hold multiple clips.

[0041] Clip engine ref count: This refers to the number of times a clip object is referenced at the engine level, used to track clip usage. When a clip's reference count is zero, it means that the clip is not being used anywhere and can be released or garbage collected.

[0042] In non-linear editing, editing materials on a timeline often requires using a data model to convert the data to be edited into a timeline. The editing engine then calls up the data needed for editing based on the timeline. In order to meet their needs, users often introduce new data during editing.

[0043] In existing technologies, when updating data, the editing engine is often stopped. After the data is added, the data model reconstructs a new timeline based on user needs and the updated data. The editing engine then calls the required data for the reconstructed timeline to continue the editing operation and obtain the editing result.

[0044] Right now, Figure 1 A schematic diagram of the data update method flow provided for existing technologies, such as Figure 1 As shown, the process of the prior art includes:

[0045] Step 11, Begin;

[0046] Step 12: Stop the engine layer from running;

[0047] Step 13: Update the data in the Sequence (i.e., Modify the Sequence);

[0048] Step 14: Complete the creation of the timeline;

[0049] Step 15: Start the engine layer to run;

[0050] Step 16, End.

[0051] Under the existing technology, the data model layer modifies / accesses the Track+clip object of the Sequence layer, and the engine layer accesses the Track+clip object of the Sequence layer.

[0052] However, the existing technology has the following problems:

[0053] 1. The system may experience lag because the editing engine needs to stop editing operations.

[0054] 2. The engine takes a long time to restart after it stops running, resulting in low editing efficiency;

[0055] 3. Poor user experience.

[0056] Based on the aforementioned technical problems, the inventor's technical concept is as follows: In existing methods, stopping the engine during data updates is to prevent the engine layer from accessing and consuming sequences during operation. However, the data actually needed by the engine layer is obtained from clips. This means there is a conflict between reading from clips and writing to clips when updating data. If, during data updates, the clips involved in the data update can be analyzed, and the number of times each clip is referenced by the engine layer can be determined, then based on the number of references, either a deep copy or a lock mechanism can be used to update the data, ensuring that the engine layer's consumption is not affected, then the problems of existing technologies can be solved while achieving data updates. Therefore, this disclosure proposes a data update method and device.

[0057] The technical solutions of this disclosure will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0058] It is worth noting that the application fields of this data update method and equipment are not limited, and may include the field of computer technology. Specifically, the executing entity of this disclosure is an electronic device, such as a mobile phone, tablet, computer, or server.

[0059] Before introducing the method embodiments of this disclosure, the implementation architecture and process involved in the method of this disclosure will be described first, such as... Figure 2 ( Figure 2 As shown in the schematic diagram of the data update method architecture provided in this disclosure, the process of this disclosure includes:

[0060] Step 21, Begin;

[0061] Step 22: Update the Sequence in a thread-safe manner (i.e., ModifySequence with thread safety);

[0062] Thread safety can be ensured by copying or using locking.

[0063] Step 23: Incrementally update the timeline (i.e., only update the clips involved when updating data in the timeline);

[0064] Step 24, End.

[0065] In this disclosure, the data model layer modifies / accesses the Track+Clip object of the Sequence layer, and the engine layer accesses the clip object of the Sequence layer, which means that thread safety is reduced to the clip.

[0066] It should be understood that: Figure 2 This disclosure only provides a general overview of the architecture; details not described in detail are illustrated by the embodiments related to the data update method described below.

[0067] Figure 3 Flowchart of the data update method provided in the embodiments of this disclosure Figure 1 ,like Figure 3 As shown, the method may include the following steps:

[0068] Step 31: In response to the user's update operation on the data in the video editing, identify the target segment corresponding to the update operation in at least one segment;

[0069] The clips include the data to be edited that the editing engine corresponding to the video editing needs to reference.

[0070] In this step, when the user needs to update the data being edited during video editing, the electronic device responds to the user's update operation by determining the target clip involved in the update operation from multiple chips.

[0071] The data to be edited can be materials such as videos, images, and audio; updating data can be: modifying data, adding data, deleting data, etc.

[0072] In this implementation, access to the data model layer objects by the editing engine is restricted, and thread safety is ensured for only a small number of objects. That is, currently the editing engine can access Track+Clip objects in the Sequence layer (Filters already support hot updates via locking mechanisms and are not considered here). However, during operation, the editing engine actually obtains the data it needs from the clip. Some information that needs to be obtained from the Track can also be synchronized from the Track to the clip. By restricting the Sequence objects that the editing engine can access, it is limited to accessing only the clip. Therefore, it is only necessary to determine the clip involved in the update operation (i.e., the target clip).

[0073] In one possible implementation, the user needs to add background music during the editing process, at which point the clip involved in the background music is identified as the target clip.

[0074] Optionally, step 31 can be implemented as follows:

[0075] Step 1: In response to the update operation, listen for the corresponding events of the update operation to obtain the fragments involved in the corresponding events;

[0076] Step 2: Identify the segment involved in the corresponding event as the target segment within at least one segment.

[0077] After receiving a user's instruction to update data, the electronic device listens for the corresponding event in response to the instruction, identifies the relevant clip from the event, and uses that clip as the target clip for the update operation.

[0078] That is, to determine the clip involved in the data corresponding to the update operation.

[0079] Step 32: Based on the number of times the target segment is referenced by the editing engine, determine whether to update the data in the target segment by locking or copying and then replacing it.

[0080] In this scheme, the methods of copying and replacing or locking involve deep copying or locking mechanisms, respectively;

[0081] In this step, the clip engine refcount is used to track clip usage. When the clip refcount is zero, it means the editing engine is not using the clip anywhere; when the clip refcount is not zero, it means the editing engine is consuming the clip.

[0082] Furthermore, based on the number of times the target clip is referenced by the editing engine, it is determined whether to update the target clip data under deep copy or under the lock mechanism.

[0083] Deep copying involves copying data before modification, ensuring each operation has its own copy to modify, thus avoiding modification conflicts. The locking mechanism, on the other hand, locks shared resources, blocking access from other operations during modification, guaranteeing that only one operation can modify the resource at a time, preventing concurrency conflicts. In other words, for frequently modified assets (i.e., data), deep copying is more efficient, as locking triggers frequent lock mutual exclusion. For infrequently modified assets, locking is more efficient.

[0084] Both of these methods can ensure data consistency and avoid conflicts. During editing, deep copy and lock mechanisms can be used to handle modification conflicts of clip and track objects, ensuring the correctness and consistency of editing operations.

[0085] Step 33: Update the timeline corresponding to the video editing.

[0086] The timeline records information about the segments that the editing engine needs to reference at different points in time.

[0087] In this step, the editing engine consumes information from the timeline to perform editing events, and updates the timeline after the aforementioned data is updated.

[0088] Optionally, step 33 can be implemented as follows:

[0089] Step 1: Mark the target segment as dirty;

[0090] Step 2: After updating the data in the target segment, re-render or perform corresponding operations on the target segment that has been marked as dirty on the timeline.

[0091] Alternatively, the data corresponding to the update operation can be marked as dirty, the update point of the data can be determined, and then the corresponding clip at the update point can be re-rendered or the corresponding operation can be performed.

[0092] Dirty handling can be achieved by setting a dirty flag on the target. For example, the target could be the data corresponding to a clip or update operation.

[0093] In one possible implementation, after clip A is updated, clip A is re-rendered on the timeline, meaning that the re-rendered clip A on the updated timeline has moved compared to the previous clip A.

[0094] This implementation updates the timeline display or performs related operations based on the modifications made to the target clip. The specific update method can be determined according to business needs, such as updating the target clip's attributes or adjusting its position on the timeline. It is crucial to maintain data synchronization between the timeline and the target clip to ensure that the editing results are correctly presented on the timeline.

[0095] Optionally, each position on the timeline represents a specific point in time in the video. Different clips can be added, deleted, adjusted, and combined on the timeline. The editing engine is responsible for processing and rendering the operations on the timeline to achieve the final video editing effect.

[0096] The data update method provided in this disclosure, in response to a user's update operation on data in video editing, identifies a target segment corresponding to the update operation within at least one segment. This segment stores the data to be edited that the editing engine needs to reference. Based on the number of times the target segment is referenced by the editing engine, it determines whether to update the data in the target segment by locking or copying and replacing it. Then, it updates the timeline corresponding to the video editing, which records information about the segments the editing engine needs to reference at different points in time. In this technical solution, the number of times the segment involved in the data update is referenced by the editing engine determines whether updating the segment requires copying and replacing or locking, thus avoiding read / write conflicts when the editing engine calls the segment, ensuring smooth operation of the editing engine, and improving editing efficiency.

[0097] Based on the above embodiments, Figure 4 Flowchart of the data update method provided in the embodiments of this disclosure Figure 2 ,like Figure 4 As shown, step 32 above may include the following steps:

[0098] Step 41: If the number of times the target fragment is referenced by the editing engine is greater than 0, copy the target fragment and generate a copy fragment corresponding to the target fragment;

[0099] In this step, when the number of times the target clip is referenced by the editing engine is greater than 0, it means that the editing engine will consume the target clip, that is, there is a situation where the target clip is frequently modified. When updating the data of the target clip, deep copy will be more efficient.

[0100] At this point, a copy operation is performed on the target clip to obtain a copy clip corresponding to the target clip.

[0101] Optionally, the target clip can still serve the editing engine without affecting its operation.

[0102] Step 42: Update the data in the copy fragment and replace the updated copy fragment with the target fragment.

[0103] In this step, the data in the copy clip is updated according to the corresponding update operation. After the update is complete, the updated copy clip is replaced with the target clip.

[0104] That is, the editing engine consumes the updated copy (clip).

[0105] The data update method provided in this disclosure involves copying the target clip if the number of times the target clip is referenced by the editing engine is greater than 0, generating a corresponding copy clip, updating the data in the copy clip, and then replacing the target clip with the updated copy clip. This technical solution avoids interfering with the normal operation of the editing engine by copying the target clip and updating its data when the editing engine is consuming the target clip.

[0106] Based on the above embodiments, Figure 5 Flowchart of the data update method provided in the embodiments of this disclosure Figure 3 ,like Figure 5 As shown, step 32 above may include the following steps:

[0107] After step 51, steps 52 and 53 can be executed; or steps 54, 55 and 56 can be executed, depending on the actual situation.

[0108] Step 51: If the number of times the target segment is referenced by the editing engine is equal to 0, lock the target segment and determine the number of times the target segment is referenced by the editing engine again;

[0109] In this step, when the number of times the target clip is referenced by the editing engine is equal to 0, it means that the editing engine will not consume the target clip, that is, there is no situation where the target clip is modified. When updating the data of the target clip, a lock mechanism can be used.

[0110] Before modifying the data in the target clip, a locking operation is performed first. Other operations must wait for the lock to be released before they can continue, ensuring that only one operation can modify the data at a time.

[0111] Furthermore, it is necessary to re-determine the number of times the target clip is referenced by the editing engine.

[0112] This implementation uses a double-checking mechanism to more accurately determine whether the target clip is being consumed, thus avoiding impact on the normal operation of the editing engine. Specifically:

[0113] First assessment: To improve code execution efficiency, since the singleton pattern only needs to create an instance once, subsequent calls to the getInstance method after creating an instance do not need to enter the synchronized block and avoid lock contention. The previously created instance can be returned directly.

[0114] The second check: This check is to prevent the second instance from being created. For example, if thread t1 calls the getInstance method before the singleton instance has been created, since the first check shows that singleton == null, thread t1 is ready to continue execution. However, since the resource has been preempted by thread t2, t2 calls the getInstance method.

[0115] Step 52: If it is determined again that the number of times the target segment is referenced by the editing engine is equal to 0, update the data in the target segment.

[0116] In this step, if the number of times the target clip is referenced by the editing engine is still equal to 0 after the two confirmations, it means that the editing engine will not consume the target clip and will not perform an update operation on the target clip.

[0117] Step 53: Unlock the updated target fragment;

[0118] In this step, after updating the target clip, the updated target clip needs to be unlocked to prevent the editing engine from performing read and write operations on the updated target clip during subsequent editing operations.

[0119] Step 54: If it is determined again that the number of times the target segment is referenced by the editing engine is greater than 0, unlock the target segment;

[0120] After step 51, if it is determined again that the number of times the target clip is referenced by the editing engine is greater than 0, then the target clip needs to be updated according to steps 41-43 (i.e. steps 55-56). This will not be repeated here; please refer to the above embodiment.

[0121] Step 55: Copy the target fragment and generate a copy fragment corresponding to the target fragment;

[0122] Step 56: Update the data in the copy fragment and replace the updated copy fragment with the target fragment.

[0123] The data update method provided in this disclosure involves locking the target clip if the number of times the target clip is referenced by the editing engine is equal to 0, and then re-checking the number of times the target clip is referenced by the editing engine. If the number of times the target clip is referenced by the editing engine is again equal to 0, the data in the target clip is updated. The updated target clip is then unlocked. Furthermore, if the number of times the target clip is referenced by the editing engine is again greater than 0, the target clip is unlocked. The target clip is copied to generate a corresponding copy clip. The data in the copy clip is updated, and the updated copy clip replaces the target clip. In this technical solution, when the editing engine is not consuming the target clip, the number of times the target clip is referenced by the editing engine is re-checked to determine whether to perform a deep copy or a lock mechanism for the update operation. This double-checking approach more accurately determines whether the target clip is being consumed. Furthermore, if it is subsequently determined that the target clip is not being consumed, a lock mechanism prevents other operations from blocking access during modification, ensuring that only one operation can modify the resource at a time, avoiding concurrency conflicts, and improving modification efficiency and system smoothness.

[0124] Based on the above embodiments, Figure 6 Flowchart of the data update method provided in the embodiments of this disclosure Figure 4 ,like Figure 6 As shown, step 32 above will be explained again, and this step may include:

[0125] Step 1, Begin;

[0126] Step 2: Begin updating the clip (i.e., the target clip).

[0127] Step 3: Check if the count is greater than 0; if yes, proceed to step 4; if no, proceed to step 7.

[0128] Step 4: Copy the clip to obtain a duplicate clip;

[0129] Step 5: Modify the copy clip;

[0130] Step 6, End;

[0131] Step 7: Lock the clip;

[0132] Step 8: Check if the count is greater than 0; if yes, proceed to step 9; if no, proceed to step 10.

[0133] Step 9: Unlock the clip and then perform step 4;

[0134] Step 10: Modify the clip;

[0135] Step 11: Unlock the clip and proceed with step 6.

[0136] The data update method provided in this disclosure is similar in principle and technical effect to the above embodiments, and will not be repeated here.

[0137] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.

[0138] Figure 7 A schematic diagram of the structure of a data update device provided in an embodiment of this disclosure. (See diagram below.) Figure 7 As shown, the device includes:

[0139] The first determining module 71 is used to determine the target segment corresponding to the update operation in at least one segment in response to the user's update operation on the data in the video editing, the segment including the data to be edited that the editing engine corresponding to the video editing needs to reference;

[0140] The second determining module 72 is used to determine, based on the number of times the target segment is referenced by the editing engine, whether to perform an update operation on the data in the target segment by locking or copying and then replacing it.

[0141] The update module 73 is used to update the timeline corresponding to the video editing, and the timeline records information about the segments that the editing engine needs to reference at different time points.

[0142] According to one or more embodiments of this disclosure, the second determining module 72 is specifically used for:

[0143] If the number of times the target fragment is referenced by the editing engine is greater than 0, copy the target fragment and generate a copy fragment corresponding to the target fragment;

[0144] The data in the copy fragment is updated, and the updated copy fragment is replaced with the target fragment.

[0145] According to one or more embodiments of this disclosure, the second determining module 72 is specifically used for:

[0146] If the number of times the target segment is referenced by the editing engine is equal to 0, the target segment is locked, and the number of times the target segment is referenced by the editing engine is determined again;

[0147] If it is determined again that the number of times the target segment is referenced by the editing engine is equal to 0, the data in the target segment is updated.

[0148] Unlock the updated target fragment.

[0149] According to one or more embodiments of this disclosure, after locking the target clip and re-determining the number of times the target clip is referenced by the engine layer, the second determining module 72 is further configured to:

[0150] If it is determined again that the number of times the target segment is referenced by the editing engine is greater than 0, the target segment is unlocked;

[0151] Copy the target fragment to generate a corresponding copy fragment;

[0152] The data in the copy fragment is updated, and the updated copy fragment is replaced with the target fragment.

[0153] According to one or more embodiments of this disclosure, the updating module 73 is specifically used for:

[0154] The target segment is then marked as dirty.

[0155] After the data in the target segment is updated, the target segment that has been marked as dirty is re-rendered or corresponding operations are performed on the timeline.

[0156] According to one or more embodiments of this disclosure, the first determining module 71 is specifically used for:

[0157] In response to the update operation, listen for the corresponding event of the update operation to obtain the fragment involved in the corresponding event;

[0158] The segment involved in the corresponding event in the at least one segment is identified as the target segment.

[0159] The data update device provided in this disclosure can be used to execute the data update method in any of the above embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0160] It should be noted that the division of the various modules in the above-described device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software through processing element calls; they can be fully implemented in hardware; or some modules can be implemented through processing element calls in software, while others are implemented in hardware. Additionally, these modules can be integrated together or implemented independently. The processing element mentioned here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0161] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this disclosure, such as... Figure 8 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. This electronic device can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers.

[0162] Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0163] like Figure 8 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 81, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 82 or a program loaded from a storage device 88 into a random access memory (RAM) 83. The RAM 83 also stores various programs and data required for the operation of the electronic device. The processing unit 81, ROM 82, and RAM 83 are interconnected via a bus 84. An input / output (I / O) interface 85 is also connected to the bus 84.

[0164] Typically, the following devices can be connected to I / O interface 85: input devices 86 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 87 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 88 including, for example, magnetic tapes, hard disks, etc.; and communication devices 89. Communication device 89 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0165] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 810, or installed from a storage device 88, or installed from a ROM 82. When the computer program is executed by the processing device 81, it performs the functions defined in the methods of embodiments of this disclosure.

[0166] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a 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, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0167] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0168] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0169] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0171] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0172] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0173] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction 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 be, 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 machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0174] The electronic device provided in this disclosure can be used to execute the data update method provided in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0175] This disclosure provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the aforementioned data update method.

[0176] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0177] Optionally, a readable storage medium can be coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Alternatively, the readable storage medium can be an integral part of the processor. Both the processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components within the device.

[0178] This disclosure also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the above-described data update method.

[0179] also:

[0180] Firstly, a data update method is provided, including:

[0181] In response to a user's update operation on data in video editing, a target segment corresponding to the update operation is identified in at least one segment, the segment including the data to be edited that the editing engine corresponding to the video editing needs to reference;

[0182] Based on the number of times the target segment is referenced by the editing engine, it is determined whether to update the data in the target segment by locking or copying and then replacing it.

[0183] Update the timeline corresponding to the video editing, which records information about the segments that the editing engine needs to reference at different points in time.

[0184] According to one or more embodiments of this disclosure, based on the number of times the target segment is referenced by the editing engine, determining to update the data in the target segment by copying and replacing the target segment includes:

[0185] If the number of times the target fragment is referenced by the editing engine is greater than 0, copy the target fragment and generate a copy fragment corresponding to the target fragment;

[0186] The data in the copy fragment is updated, and the updated copy fragment is replaced with the target fragment.

[0187] According to one or more embodiments of this disclosure, determining to update data in a target segment while locking the target segment based on the number of times the target segment is referenced by the editing engine includes:

[0188] If the number of times the target segment is referenced by the editing engine is equal to 0, the target segment is locked, and the number of times the target segment is referenced by the editing engine is determined again;

[0189] If it is determined again that the number of times the target segment is referenced by the editing engine is equal to 0, the data in the target segment is updated.

[0190] Unlock the updated target fragment.

[0191] According to one or more embodiments of this disclosure, after locking the target segment and re-determining the number of times the target segment is referenced by the editing engine, the method further includes:

[0192] If it is determined again that the number of times the target segment is referenced by the editing engine is greater than 0, the target segment is unlocked;

[0193] Copy the target fragment to generate a corresponding copy fragment;

[0194] The data in the copy fragment is updated, and the updated copy fragment is replaced with the target fragment.

[0195] According to one or more embodiments of this disclosure, updating the timeline corresponding to the video edit includes:

[0196] The target segment is then marked as dirty.

[0197] After the data in the target segment is updated, the target segment that has been marked as dirty is re-rendered or corresponding operations are performed on the timeline.

[0198] According to one or more embodiments of this disclosure, determining the target segment corresponding to the update operation in at least one segment in response to a user's update operation on data during video editing includes:

[0199] In response to the update operation, listen for the corresponding event of the update operation to obtain the fragment involved in the corresponding event;

[0200] The segment involved in the corresponding event in the at least one segment is identified as the target segment.

[0201] Secondly, embodiments of this disclosure provide a data update device, the device comprising:

[0202] The first determining module is used to respond to the user's update operation on the data in the video editing, and to determine the target segment corresponding to the update operation in at least one segment, the segment including the data to be edited that the editing engine corresponding to the video editing needs to reference;

[0203] The second determining module is used to determine, based on the number of times the target segment is referenced by the editing engine, whether to perform an update operation on the data in the target segment by locking or copying and then replacing it;

[0204] The update module is used to update the timeline corresponding to the video editing, which records information about the segments that the editing engine needs to reference at different points in time.

[0205] According to one or more embodiments of this disclosure, the second determining module is specifically used for:

[0206] If the number of times the target fragment is referenced by the editing engine is greater than 0, copy the target fragment and generate a copy fragment corresponding to the target fragment;

[0207] The data in the copy fragment is updated, and the updated copy fragment is replaced with the target fragment.

[0208] According to one or more embodiments of this disclosure, the second determining module is specifically used for:

[0209] If the number of times the target segment is referenced by the editing engine is equal to 0, the target segment is locked, and the number of times the target segment is referenced by the editing engine is determined again;

[0210] If it is determined again that the number of times the target segment is referenced by the editing engine is equal to 0, the data in the target segment is updated.

[0211] Unlock the updated target fragment.

[0212] According to one or more embodiments of this disclosure, after locking the target clip and re-determining the number of times the target clip is referenced by the engine layer, the second determining module is further configured to:

[0213] If it is determined again that the number of times the target segment is referenced by the editing engine is greater than 0, the target segment is unlocked;

[0214] Copy the target fragment to generate a corresponding copy fragment;

[0215] The data in the copy fragment is updated, and the updated copy fragment is replaced with the target fragment.

[0216] According to one or more embodiments of this disclosure, the updating module is specifically used for:

[0217] The target segment is then marked as dirty.

[0218] After the data in the target segment is updated, the target segment that has been marked as dirty is re-rendered or corresponding operations are performed on the timeline.

[0219] According to one or more embodiments of this disclosure, the first determining module is specifically used for:

[0220] In response to the update operation, listen for the corresponding event of the update operation to obtain the fragment involved in the corresponding event;

[0221] The segment involved in the corresponding event in the at least one segment is identified as the target segment.

[0222] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0223] The memory stores computer-executed instructions;

[0224] The processor executes computer execution instructions stored in the memory to implement the data update method as described in the first aspect above.

[0225] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data update method described in the first aspect.

[0226] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the data update method described in the first aspect above.

[0227] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0228] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0229] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A data updating method characterized by comprising: The method comprises the following steps: in response to an update operation on data in a video edit, determining a target segment corresponding to the update operation in at least one segment, wherein the segment comprises to-be-edited data required to be referenced by an editing engine corresponding to the video edit; determining an update processing manner for data in the target segment according to a count of times that the target segment is referenced by the editing engine, wherein the update processing manner is a replacement manner after the target segment is locked or copied; updating a timeline corresponding to the video edit, wherein the timeline records information of segments required to be referenced by the editing engine at different time points; determining the update processing manner for data in the target segment according to the count of times that the target segment is referenced by the editing engine, wherein the update processing manner is a replacement manner after the target segment is copied, and the method comprises the following steps: if the count of times that the target segment is referenced by the editing engine is greater than 0, copying the target segment to generate a copy segment corresponding to the target segment; updating data in the copy segment, and replacing the target segment with the updated copy segment; determining the update processing manner for data in the target segment according to the count of times that the target segment is referenced by the editing engine, wherein the update processing manner is a locking manner for the target segment, and the method comprises the following steps: if the count of times that the target segment is referenced by the editing engine is equal to 0, locking the target segment, and determining again the count of times that the target segment is referenced by the editing engine; if the count of times that the target segment is referenced by the editing engine is determined again to be equal to 0, updating data in the target segment; unlocking the updated target segment.

2. The method of claim 1, wherein, After the target segment is locked and the count of times that the target segment is referenced by the editing engine is determined again, the method further comprises the following steps: if the count of times that the target segment is referenced by the editing engine is determined again to be greater than 0, unlocking the target segment; copying the target segment to generate a copy segment corresponding to the target segment; updating data in the copy segment, and replacing the target segment with the updated copy segment.

3. The method according to claim 1 or 2, characterized in that, The step of updating the timeline corresponding to the video edit comprises the following steps: dirtying the target segment; after the update of data in the target segment is completed, re-rendering or performing a corresponding operation on the dirty target segment on the timeline.

4. The method according to claim 1 or 2, characterized in that, The step of determining the target segment corresponding to the update operation in at least one segment comprises the following steps: in response to the update operation, listening to a corresponding event of the update operation to obtain a segment involved in the corresponding event; determining the segment involved in the corresponding event as the target segment in the at least one segment.

5. A data updating apparatus characterized by comprising: The method comprises the following steps: a first determining module is configured to determine a target segment corresponding to an update operation on data in a video edit in at least one segment in response to the update operation on the data in the video edit, wherein the segment comprises to-be-edited data required to be referenced by an editing engine corresponding to the video edit; The second determination module is configured to determine, according to a count of a number of times the target segment is referenced by the editing engine, an update operation on data in the target segment in a manner of replacing after locking the target segment. The update module is configured to update a timeline corresponding to the video editing, the timeline recording information of segments referenced by the editing engine at different time points. The second determination module is configured to determine, according to a count of a number of times the target segment is referenced by the editing engine, an update operation on data in the target segment in a manner of replacing after copying the target segment, and specifically configured to: If the count of the number of times the target segment is referenced by the editing engine is greater than 0, copy the target segment to generate a copy segment corresponding to the target segment; update data in the copy segment, and replace the updated copy segment with the target segment; The second determination module is configured to determine, according to a count of a number of times the target segment is referenced by the editing engine, an update operation on data in the target segment in a manner of replacing after locking the target segment, and specifically configured to: If the count of the number of times the target segment is referenced by the editing engine is equal to 0, lock the target segment, and determine again the count of the number of times the target segment is referenced by the editing engine; If it is determined again that the count of the number of times the target segment is referenced by the editing engine is equal to 0, update data in the target segment; unlock the updated target segment.

6. An electronic device, comprising: The processor and a memory connected with the processor in communication; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method in any one of claims 1 to 4. The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer program is executed by the processor to implement the method in any one of claims 1 to 4.

8. A computer program product comprising a computer program, characterized in that, ​

Citation Information

Patent Citations

  • User portrait and live video file editing method based on viewing behavior

    CN113115055A

  • Video processing method and device, equipment and medium

    CN116567351A