Footage editing methods, electronic devices and storage media

By calculating file-level fingerprints and segment-level content fingerprints, extracting lightweight inference datasets, determining editing timing parameters, and generating edited videos, this technology solves the problems of high labor costs, decoding throughput bottlenecks, and limited editing decisions in existing technologies, and realizes automated and refined batch production of short video slices for live streaming materials.

CN123123643APending Publication Date: 2026-11-17MALANSHAN AUDIO & VIDEO LABORATORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611279481.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing live streaming material editing solutions suffer from several problems: high manual editing costs; full-scale AI frame-by-frame analysis leading to decoding throughput bottlenecks and wasted GPU resources; fixed-interval frame extraction failing to structurally reduce redundant computing power; AI output only matching preset templates; limited editing decisions; and sparse frame cutting technology unable to support incremental highlight recognition and editing instruction chains.

Method used

By receiving the source material data to be processed, calculating the file-level fingerprint and segmenting it, determining the segment-level content fingerprint based on the complexity digest, constructing the list to be inferred, extracting the lightweight inference dataset, determining the editing time sequence prior parameters, and generating the edited video, the system achieves automated and refined batch production of short video slices for live long videos.

Benefits of technology

It enables automated and refined batch production of short video segments for live long videos, solving problems such as memory bandwidth bottlenecks, redundant inference, and limited editing decisions, thereby improving processing efficiency and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123643A_ABST
    Figure CN123123643A_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a method for editing source material, an electronic device, and a storage medium. The method includes receiving source material data to be processed; calculating a file-level fingerprint of the source material data to be processed; if the file-level fingerprint of the source material data to be processed does not match a file-level cache table, segmenting the source material data to be processed into multiple video segments according to a preset segment duration; calculating a complexity digest for each video segment; determining a segment-level content fingerprint of the video segment based on the complexity digest; constructing a list to be inferred when the segment-level content fingerprint does not match a segment-level cache table; determining an extraction density and extracting video frames of the video segments to be processed based on the extraction density to obtain a lightweight inference dataset and a corresponding set of candidate highlight intervals; and editing the set of candidate highlight intervals based on editing time prior parameters to generate an edited video, thereby realizing automated and refined batch production of short video slices for live long videos.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video processing, and more specifically, to a method for editing video footage, an electronic device, and a storage medium. Background Technology

[0002] Existing live stream editing solutions have significant drawbacks: manual editing is costly and difficult to scale; full-scale AI frame-by-frame analysis leads to decoding throughput bottlenecks and wasted GPU resources; fixed-interval frame extraction reduces data volume, but the decoding process does not structurally reduce redundant computing power, and AI output can only match preset templates, limiting editing decisions; some template-based solutions based on historical products only realize the arrangement and combination of preset operations, failing to quantify the editing sequence rules to generate editing instructions; sparse frame cutting technology is only for general image classification input and cannot support incremental highlight recognition and editing instruction links. Summary of the Invention

[0003] The purpose of this invention is to provide a method for editing materials, an electronic device, and a storage medium that can realize automated and refined batch production of short video slices for live long videos.

[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a method for editing source material, the method comprising: Receive the material data to be processed; Calculate the file-level fingerprint of the material data to be processed; If the file-level fingerprint of the material data to be processed does not match the file-level cache table, the material data to be processed is segmented according to the preset segment duration to obtain multiple video clips; For each of the video segments, calculate a complexity summary of the video segment; The segment-level content fingerprint of the video segment is determined based on the complexity summary; In the case where the segment-level content fingerprint does not hit the segment-level cache table, a list to be inferred is constructed, wherein the list to be inferred contains multiple video segments to be processed that have not hit the segment-level cache table; For each video segment to be processed, an extraction density is determined, and video frames of the video segment to be processed are extracted based on the extraction density to obtain a lightweight inference dataset. Determine the set of candidate highlight intervals corresponding to the lightweight inference dataset; Determine the prior parameters for editing timing; The candidate highlight interval set is edited based on the editing timing prior parameters to generate the edited video.

[0005] In an optional implementation, the step of calculating the file-level fingerprint of the material data to be processed includes: Obtain the stable byte block of the stream header of the material data to be processed and the first duration of the material data to be processed; Obtain the main video track encoding parameters of the material data to be processed; The file-level fingerprint of the material data to be processed is obtained by calculating the hash value based on the stable byte block of the stream header, the first duration, and the encoding parameters of the main video track.

[0006] In an optional implementation, the step of calculating a complexity summary for each video segment includes: Determine the set of anchor points for the video segment to be processed, wherein the set of anchor points includes keyframes or I-frames of the video segment to be processed; For each anchor frame in the anchor point set, determine the multiple NALU units contained in the anchor frame, and determine the boundary of each NALU unit; Determine the header length of the anchor frame; The data area length of the anchor frame is determined based on the boundary of each NALU unit and the header length of the anchor frame; The anchor points are sorted according to the order in which they appear in the bitstream to obtain the sorted set of anchor points. Get the absolute value of the difference between the data area length of the current anchor frame and the data area length of the previous anchor frame; Calculate the sum of the current anchor frame data area length and a preset constant; Calculate the ratio of the absolute value to the sum, as the jump rate; The maximum value among the various transition rates is used as a complexity summary of the video segment.

[0007] In an optional implementation, the step of determining the extraction density for each video segment to be processed includes: A high threshold and a low threshold are determined from each of the complexity summaries, wherein the high threshold is greater than the low threshold; For each jump rate, if the jump rate is greater than the high threshold, the initial sampling density is increased. If the jump rate is less than the low threshold, then only anchor frames are extracted; If the jump rate is greater than the low threshold and less than the high threshold, the initial extraction density is maintained.

[0008] In an optional implementation, the step of determining the extraction density for each video segment to be processed includes: Determine the set of audio active time periods of the video segment to be processed, wherein the set of audio active time periods contains at least one audio active segment; For each active audio segment, obtain the GOP corresponding to the jump rate and match it with the active audio segment; If the GOP corresponding to the jump rate intersects with the active audio segment, determine whether the GOP corresponding to the jump rate and whether there is a starting point in the neighborhood of the GOP. If so, increase the initial sampling density.

[0009] In an optional implementation, the step of extracting video frames from the video segment to be processed based on the extraction density to obtain a lightweight inference dataset includes: Based on the extraction density, video frames of the video segment to be processed are extracted to obtain an extracted image frame set. Each extracted image frame in the extracted image frame set is expanded according to a preset resolution to obtain a lightweight inference dataset.

[0010] In an optional implementation, the step of determining the set of candidate highlight regions corresponding to the lightweight inference dataset includes: Input the lightweight inference dataset into the content saliency identification link; The output of the content saliency identification link is received as a set of candidate highlight regions; The fragment-level cache table is updated based on the set of candidate highlight regions.

[0011] In an optional implementation, the step of editing the candidate highlight region set based on the editing timing prior parameters to generate the edited video includes: The candidate highlight interval sets are fused to obtain the complete set of materials, wherein the complete set of materials includes multiple candidate highlight intervals and the in point, out point, confidence score and label of each candidate highlight interval; Determine the cut point sequence of the entire set of materials; The cut point sequence is constrained based on the editing timing prior parameters to obtain the constrained cut point sequence; The entire set of materials is edited based on the constrained cut point sequence and the editing timing prior parameters to obtain the edited video.

[0012] Secondly, embodiments of this application provide a material editing apparatus, which implements the steps of the material editing method.

[0013] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the material editing method.

[0014] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the material editing method.

[0015] This application has the following beneficial effects: This application receives material data to be processed, calculates the file-level fingerprint of the material data, and, if the file-level fingerprint of the material data does not match the file-level cache table, segments the material data according to a preset segment duration to obtain multiple video segments. For each video segment, a complexity digest is calculated. Based on the complexity digest, a segment-level content fingerprint of the video segment is determined. If the segment-level content fingerprint does not match the segment-level cache table, a list to be inferred is constructed, which contains multiple video segments to be processed that do not match the segment-level cache table. For each video segment to be processed, an extraction density is determined, and video frames of the video segment to be processed are extracted based on the extraction density to obtain a lightweight inference dataset. A set of candidate highlight intervals corresponding to the lightweight inference dataset is determined. Editing time-series prior parameters are determined. Based on the editing time-series prior parameters, the set of candidate highlight intervals is edited to generate an edited video, thereby realizing automated and refined batch production of short video segments for live long videos. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A block diagram of an electronic device provided in an embodiment of the present invention; Figure 2 This is one of the flowcharts illustrating a material editing method provided in an embodiment of the present invention; Figure 3 A second schematic flowchart illustrating a material editing method provided in an embodiment of the present invention; Figure 4 The third flowchart illustrates a material editing method provided in an embodiment of the present invention; Figure 5 The fourth flowchart illustrates a material editing method provided in an embodiment of the present invention. Figure 6 The fifth flowchart illustrates a material editing method provided in an embodiment of the present invention; Figure 7 A flowchart illustrating a material editing method provided in an embodiment of the present invention is shown in Figure 6. Figure 8 The seventh flowchart illustrating a material editing method provided in an embodiment of the present invention; Figure 9 This is the eighth flowchart illustrating a material editing method provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0019] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0021] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0022] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0023] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0024] Extensive research by the inventors revealed that in scenarios such as live-streaming e-commerce, a single live stream typically generates one to several hours of recorded footage. The operations team needs to mass-produce short video clips from this footage, such as product explanation segments, highlight segments, and price announcement segments. Currently, the mainstream processing methods in the industry can be divided into three categories.

[0025] The first type is the manual or semi-manual pipeline. Operations staff or editors manually select segments on the timeline, add transitions and subtitles, or batch render footage by filling preset template slots in general editing tools. This approach is highly subjective and labor-intensive, making it unsuitable for handling hundreds to thousands of footage sessions per day.

[0026] The second type is the full-scale AI analysis path. This involves decoding the complete video into a sequence of pixel frames, feeding them frame-by-frame or near-frame-by-frame into a visual model, such as a multimodal model for object detection, scene classification, face recognition, and action recognition. The model then outputs a set of highlight regions or key content tags, which are used to drive editing. In this path, the process of decoding the entire frame into a pixel matrix introduces significant bottlenecks in decoding throughput and memory bandwidth. Live streaming recordings are often 1080p or higher, ranging from tens of minutes to several hours in length. Continuously expanding full-resolution pixel data causes GPU inference queues to accumulate, severely limiting the number of concurrent tasks.

[0027] The third type is the fixed-interval frame extraction dimensionality reduction path. To reduce the amount of data, frames are extracted from the decoder at fixed time intervals, such as one frame per second, and scaled down to a lower resolution. The extracted sparse images are then fed into the model for inference. However, this path's frame extraction is usually based on a decoding process that first fully traverses the timeline and then extracts frames by time. The decoder still needs to perform bitstream parsing and partial expansion at non-extraction locations, and the computational and bandwidth overhead is not structurally eliminated. In addition, the AI ​​output remains at the timestamp interval level, and the connection with the editing engine is only bridged by selecting template IDs and filling slots, locking the editing decision space within a finite template set.

[0028] The aforementioned existing technologies have the following drawbacks: full-frame decoding or fixed-interval frame skipping does not reduce the size of the decoding pipeline, resulting in a memory bandwidth bottleneck.

[0029] The lack of a mechanism to bind content fingerprints with fixed-duration segments to AI results leads to redundant inference due to repeated or similar segments. The media library commonly experiences retransmissions from the same source, such as multiple uploads of the same live stream, different container formats, different start and end offsets, and appended re-recordings. Existing solutions often use filenames or whole-file hashes for deduplication, failing to identify segments with identical content but different containers or offsets. This results in the same visual segments being repeatedly sent to the decoding and inference chain.

[0030] AI output remains at the timestamp interval level, creating a disconnect between it and the editing engine. Even if the visual model outputs a list of highlight intervals—a set of start and end times and labels—this output itself doesn't contain the exact rendering parameters that the editing engine can consume. It lacks explicit execution information tied to timecode, such as track topology, transition parameters, cropping windows, and subtitle overlay strategies. Therefore, existing solutions can only revert to selecting templates and filling slots to bridge the gap, effectively locking editing decisions to a limited template set.

[0031] The so-called learning style from historical finished products mostly degenerates into discrete template matching. What is extracted from historical finished products are mostly discrete editing information types, such as what transitions, visual effects, and text styles were used, and these are summarized into style A or template B and applied, making the editing less flexible.

[0032] In view of the above-mentioned problems, this embodiment provides a material editing method, electronic device, and storage medium. It can receive material data to be processed, calculate the file-level fingerprint of the material data, and, if the file-level fingerprint of the material data does not match the file-level cache table, segment the material data according to a preset segment duration to obtain multiple video segments. For each video segment, a complexity digest is calculated. Based on the complexity digest, a segment-level content fingerprint of the video segment is determined. If the segment-level content fingerprint does not match the segment-level cache table, a list to be inferred is constructed, which contains multiple video segments that do not match the segment-level cache table. For each video segment to be processed, an extraction density is determined, and video frames of the video segment to be processed are extracted based on the extraction density to obtain a lightweight inference dataset. A set of candidate highlight intervals corresponding to the lightweight inference dataset is determined. Editing time-series prior parameters are determined. Based on the editing time-series prior parameters, the set of candidate highlight intervals is edited to generate an edited video. This realizes automated and refined batch production of short video slices for live long videos. The solution provided in this embodiment is described in detail below.

[0033] This embodiment provides an electronic device capable of editing footage. In one possible implementation, the electronic device can be a user terminal, such as, but not limited to, a server, smartphone, personal computer (PC), tablet computer, personal digital assistant (PDA), and mobile internet device (MID).

[0034] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application. The electronic device 100 may further include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0035] The electronic device 100 includes a material editing device 110, a memory 120, and a processor 130.

[0036] The components of the memory 120 and processor 130 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The material editing device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the memory 120, such as the software function modules and computer programs included in the material editing device 110.

[0037] The memory 120 may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 120 is used to store programs, and the processor 130 executes the programs after receiving execution instructions.

[0038] Please refer to Figure 2 , Figure 2 For application Figure 1 The flowchart below shows a method for editing materials using an electronic device 100. The method includes a detailed explanation of each step.

[0039] S201: Receive material data to be processed.

[0040] S202: Calculate the file-level fingerprint of the material data to be processed.

[0041] S203: If the file-level fingerprint of the material data to be processed does not match the file-level cache table, the material data to be processed is segmented according to the preset segment duration to obtain multiple video clips.

[0042] S204: For each video segment, compute a complexity summary of the video segment.

[0043] S205: Determine the segment-level content fingerprint of a video segment based on complexity summary.

[0044] S206: If the segment-level content fingerprint does not match the segment-level cache table, construct a list to be inferred.

[0045] The list to be inferred contains multiple video segments that have not been hit in the segment-level cache table.

[0046] S207: For each video segment to be processed, determine the extraction density, and extract video frames of the video segment to be processed based on the extraction density to obtain a lightweight inference dataset.

[0047] S208: Determine the set of candidate highlight intervals corresponding to the lightweight inference dataset.

[0048] S209: Determine the prior parameters for editing timing.

[0049] S210: Based on the prior parameters of the editing time sequence, the candidate highlight interval set is edited to generate the edited video.

[0050] It receives one or more live recorded video files or stream handles as processing material data, which is usually high-definition video ranging from tens of minutes to several hours in length, and may be accompanied by an audio track.

[0051] It also receives task configuration parameters, including preset segment duration, upper limit of dimensionality reduction resolution, high and low thresholds for complexity gating, and target merchant ID, etc.

[0052] The preset segment duration can be set to 15s, 30s, etc., and the upper limit of the dimensionality reduction resolution path can be set to 360 pixels on the shorter side.

[0053] The file-level fingerprint of the material data to be processed is calculated. The file-level fingerprint is not a simple file name or full file hash, but a hash value calculated by integrating multi-dimensional information.

[0054] The calculated file-level fingerprint is compared with a pre-built file-level cache table. If the file-level fingerprint matches the file-level cache table, that is, there is a record with the same file-level fingerprint and the record is valid, it means that the material data to be processed or its core content has been processed. The stored highlight results or editing instructions can be reused directly without performing subsequent decoding and inference steps, thereby achieving deduplication and short-circuiting processing at the whole file level.

[0055] If the file-level fingerprint does not match the file-level cache table, it indicates that the material data to be processed is new content or has significant differences, and processing will continue. The material data to be processed is segmented according to the preset segment duration to obtain multiple consecutive video clips. For example, a 60-second video is segmented into 15-second segments to obtain 4 video clips, with the time range of each video clip being [0s, 15s), [15s, 30s), [30s, 45s), and [45s, 60s].

[0056] For each allocated video segment, its content activity level is evaluated. First, the complexity digest of the video segment is calculated. Based on the complexity digest, the segment-level content fingerprint of the video segment is determined. The following information is concatenated and hashed again to generate the segment-level content fingerprint, including the byte sampling hash at the beginning of the video segment, the complexity digest of the video segment, the duration of the video segment, and the domain isolation identifier, such as the merchant ID. This segment-level content fingerprint can effectively identify video segments with the same content but different container formats and start and end offsets.

[0057] The segment-level content fingerprint of each video clip is compared with the segment-level cache table. If the segment-level content fingerprint matches the segment-level cache table (i.e., a record with the same segment-level content fingerprint exists), the set of candidate highlight regions stored in that record is directly read, without needing to decode or perform AI inference on the video clip.

[0058] If the segment-level content fingerprint does not match the segment-level cache table, it indicates that the content of the video segment is new or has not been processed, and further reasoning analysis is required. The video segment is then added to the list to be reasoned. Ultimately, the list to be reasoned contains all video segments that did not match the segment-level cache table and are yet to be processed.

[0059] For each video segment to be processed in the list of segments to be inferred, its extraction density is determined, and frames are extracted based on the extraction density. The process of determining the extraction density can adopt a dual-channel OR gating mechanism on the video side and the audio side.

[0060] Based on a defined extraction density, only the video frames corresponding to the selected extraction points are decoded. During decoding, the video frames are expanded to a size not exceeding the preset dimensionality reduction resolution, and the pixel buffers of non-extraction points are immediately reclaimed, thereby greatly reducing memory bandwidth usage.

[0061] The set of all extracted and dimensionality-reduced image frames is used as the lightweight inference dataset for the video segment to be processed.

[0062] The lightweight inference dataset for each video segment to be processed is input into the content saliency recognition pipeline. This pipeline comprehensively analyzes the dimensionality-reduced image and the corresponding audio segment, and outputs a set of candidate highlight intervals for the video segment by running models such as product detection, OCR text recognition, scene change analysis, and audio keyword recognition. The candidate highlight interval set contains one or more candidate highlight intervals, each of which records its start time, end time, confidence score, and label, such as price announcement, highlight voiceover, etc. After inference is completed, the mapping relationship between the segment-level content fingerprint of the video segment and the candidate highlight interval set is written to the segment-level cache table to achieve incremental reuse of results.

[0063] Based on the target merchant ID configured in the task, the corresponding editing timing prior parameters are loaded. These editing timing prior parameters are mainly based on the historical editing logs generated by the merchant using the self-developed editing SDK of this system, and are obtained through statistical aggregation or lightweight learning.

[0064] It contains a set of quantifiable constraints, such as the recommended duration of different types of transitions, the correspondence between cut point intervals and image motion intensity, and the coordinate range of commonly used cropping windows. This parameter is used to guide subsequent editing, rather than simply selecting a preset template.

[0065] The candidate highlight intervals of all video clips are integrated and edited. All candidate highlight intervals are merged in chronological order, minor overlaps between segments are processed, and adjacent intervals are merged based on confidence scores to obtain a complete set of materials containing multiple candidate highlight intervals.

[0066] Since the candidate highlight regions originate from sparse frame extraction, the cut points of the candidate boundaries are interpolated and corrected based on the motion intensity trend of the anchor frames in the neighborhood, such as the histogram difference slope, to generate an accurate timecode cut point sequence. The cut point sequence is then constrained based on the editing timing prior parameters to obtain the constrained cut point sequence.

[0067] For example, ensure that the transition duration does not exceed the upper bound of the prior parameters, and prioritize that the cropping window falls within the stable region. Finally, based on the constrained cut point sequence and the prior parameters of the editing timing, edit the entire set of footage to generate the final edited video.

[0068] Through the above steps, this embodiment achieves fully automated and intelligent processing from raw materials to the final product, effectively solving problems such as memory bandwidth bottlenecks, redundant reasoning, and limited editing decisions.

[0069] There are multiple ways to calculate the file-level fingerprint of the material data to be processed. In one implementation, such as... Figure 3 As shown, it includes the following steps: S301: Obtain the stable byte block of the stream header of the material data to be processed and the first duration of the material data to be processed.

[0070] S302: Obtain the main video track encoding parameters of the material data to be processed.

[0071] S303: Calculate the hash value based on the stable byte block in the stream header, the first duration, and the encoding parameters of the main video track to obtain the file-level fingerprint of the material data to be processed.

[0072] After receiving the media data to be processed, obtain the stable byte block of the stream header of the media data to be processed, the first duration of the media data to be processed, and the encoding parameters of the main video track of the media data to be processed.

[0073] Among them, the stable byte block in the stream header refers to a segment of initial bitstream data that remains unchanged under different container formats or minor editing operations, such as the first few KB of raw bitstream bytes, used to characterize the original encoding source of the video content; the first duration is the total playback duration of the material data to be processed; the main video track encoding parameters include, but are not limited to, video encoding standards, such as H.264 / AVC, H.265 / HEVC, resolution, frame rate, bitrate mode, profile and level, and other key attributes.

[0074] Based on the stable byte block in the stream header, the first duration, and the encoding parameters of the main video track, a hash value that uniquely identifies the content characteristics of the video file is calculated using a hash algorithm, such as SHA-256 or MD5. This hash value is the file-level fingerprint of the material data to be processed.

[0075] This file-level fingerprint is used to query the file-level cache table in subsequent processes. If the file-level fingerprint already exists in the file-level cache table and the corresponding cache is valid, it indicates that the material or its equivalent version has been processed. The historical analysis results can be reused directly, skipping the subsequent segmentation, frame extraction and AI inference processes, and achieving short-circuit deduplication at the whole file level.

[0076] This mechanism effectively solves the problem that existing technologies rely solely on filenames or full file hashes for deduplication, which leads to the inability to identify heterogeneous materials from the same source. It improves the system's processing efficiency and resource utilization in high-frequency repeated upload scenarios during live streaming.

[0077] There are multiple ways to compute the complexity summary of a video segment for each segment. In one implementation, such as... Figure 4 As shown, it includes the following steps: S401: Determine the set of anchor points for the video segment to be processed.

[0078] The anchor point set contains keyframes or I-frames of the video segment to be processed.

[0079] S402: For each frame in the anchor point set, determine the multiple NALU units contained in the frame and determine the boundaries of each NALU unit.

[0080] For each frame in the anchor point set, the specific implementation of determining the multiple NALU units contained in the frame and the boundaries of each NALU unit can be as follows: For H.264 format bitstreams, the bitstream parser defines the boundaries of each NAL unit by searching for the start code in AnnexB format, and defines the boundaries by using a preset NALU length field in AVCC format.

[0081] S403: Determine the header length of the anchor frame.

[0082] S404: Determine the data area length of the anchor frame based on the boundaries of each NALU unit and the header length of the anchor frame.

[0083] The data area length of an anchor frame is defined as the sum of the payloads and header lengths of all NALU units corresponding to an IDR or I frame in an access unit. An access unit indicates the set of all NALU units required to decode an anchor frame.

[0084] S405: Sort the anchor frames according to their order of appearance in the bitstream to obtain the sorted set of anchor points.

[0085] S406: Obtain the absolute value of the difference between the data area length of the current anchor frame and the data area length of the previous anchor frame.

[0086] S407: Calculate the sum of the current anchor frame data area length and the preset constant.

[0087] S408: Calculate the ratio of the absolute value to the sum, as the jump rate.

[0088] For example, the system includes a first anchor frame, a second anchor frame, and a third anchor frame. The data area length of the first anchor frame is L0 = 3000, the data area length of the second anchor frame is L1 = 3500, and the data area length of the third anchor frame is L2 = 2500. Calculate the absolute value of the difference between the data area length of the current anchor frame and the data area length of the previous anchor frame: δ1= |L1 - L0| / (L1 + ε) = |3500-3000| / 3500; δ2 = |L2 - L1| / (L2 + ε) = |2500-3500| / 2500; where ε is a preset constant.

[0089] S409: Obtain the maximum value from each transition rate as a complexity summary of the video segment.

[0090] There are several ways to determine the complexity summary of a video segment. In one approach, the maximum value among all transition rates is taken as the complexity summary of the video segment, i.e., max(δ1, δ2) is taken as the complexity summary of the video segment. Alternatively, the average of all transition rates is taken as the complexity summary of the video segment, i.e., (δ1+ δ2) / 2.

[0091] To further improve gating accuracy, the complexity summary can be obtained by weighted fusion of the following auxiliary signals with the maximum value obtained from each transition rate, and then used as the final summary for that segment: For example, the audio complexity of a video segment is obtained by proceeding with the normal decoding of the audio track packet by packet, such as AAC frame level. The decoding cost is negligible compared to video decoding. The short-time energy envelope or speech activity detection is calculated from the decoded samples to obtain the set of audio active time periods and mutation density, which are used as the audio-side complexity.

[0092] Specifically, the accompanying audio track is decoded packet by packet to obtain PCM samples. Logarithmic short-time energy is calculated with a window length of 20ms and a frame shift of 10ms, yielding the energy envelope sequence E_j. The median of E_j plus a multiple of MAD is used as a threshold; frames above the threshold are considered active. Active segments with gaps less than 150–300ms are merged, while those shorter than 80–120ms are discarded, resulting in a set of active audio time segments. A first-order difference is then performed on E_j; if the difference exceeds the 90th percentile of the segment, a starting point is recorded. The mutation density is calculated as the number of starting points in the segment divided by the segment duration (seconds).

[0093] The audio-side complexity is calculated using the following formula: The audio-side complexity σ_a = 0.7 × the percentage of the duration covered by the active time period + 0.3 × the normalized mutation density.

[0094] For example, for anchor frames that have been selected for decoding, after decoding to the reduced resolution, the global histogram difference or luminance variance is calculated as a correction component. This component is then weighted and fused with the maximum value obtained from each jump rate to serve as the final summary for that segment. The histogram calculation reuses the decoded pixels and does not affect the limitation that non-extracted frames are not subject to pixel expansion.

[0095] There are multiple ways to determine the extraction density for each video segment to be processed. In one implementation method, such as... Figure 5 As shown, it includes the following steps: S501: Determine the high and low thresholds from the summaries of each complexity.

[0096] Among them, the high threshold is greater than the low threshold.

[0097] S502: For each jump rate, if the jump rate is greater than the high threshold, the initial sampling density is increased.

[0098] S503: If the jump rate is less than the low threshold, only the anchor frame is extracted.

[0099] S504: If the jump rate is greater than the low threshold but less than the high threshold, then maintain the initial sampling density.

[0100] High and low thresholds are determined from each complexity summary, where the high threshold is greater than the low threshold. The high and low thresholds can be used to distinguish the activity level of video content.

[0101] In one specific implementation, the high threshold and low threshold can be adaptively set according to the overall characteristics of the current material data to be processed. For example, they can be mapped based on the quantiles of the complexity summary sequence of each video segment in the material, or calibrated by multiplying the median by a multiple of the median absolute deviation based on the distribution of the bitstream parsing samples in the first few seconds of the trial run. In another implementation, the high threshold and low threshold can also be pre-configured by the operation side as fixed initial values.

[0102] For each jump rate, if the jump rate is greater than the high threshold, the initial extraction density is increased. Here, the jump rate refers to the ratio of the absolute value of the difference in data area length between adjacent anchor frames calculated for each anchor frame in the anchor point set to the sum of the current anchor frame data area length and a preset constant.

[0103] When the jump rate exceeds the high threshold, it indicates that the video segment or the corresponding GOP has drastic changes and belongs to the active segment of the video. Therefore, it is necessary to increase the extraction density to capture more details and ensure that the highlights are not missed. The initial extraction density should be increased, for example, by shortening the frame extraction interval to the order of 0.25 seconds to 0.5 seconds.

[0104] If the jump rate is less than a low threshold, only anchor frames are extracted. When the jump rate is below the low threshold, it indicates that the video segment is stable with little change in image, belonging to a calm section. To save computational resources to the greatest extent, the sparsest frame extraction strategy is adopted, that is, only anchor frames such as IDR frames or I frames within the GOP are extracted, with an equivalent extraction density of about one frame every 1 to 2 seconds, thereby significantly reducing the decoding and inference load.

[0105] If the jump rate is greater than the low threshold but less than the high threshold, the initial extraction density is maintained. This range represents a moderate level of content change, in which a conservative strategy is adopted, maintaining the preset initial extraction density unchanged to balance processing efficiency and content capture integrity, or conservatively determining it as active, i.e., increasing the extraction density.

[0106] Through the aforementioned hierarchical judgment mechanism based on jump rate and dual threshold comparison, adaptive frame-skipping scheduling for different content complexity segments is achieved. This not only ensures the recognition accuracy of highly dynamic content but also enables efficient dimensionality reduction processing for static content, effectively alleviating the bottlenecks in decoding throughput and GPU resources.

[0107] Another approach to determining the extraction density for each video segment to be processed is, for example... Figure 6 As shown, it includes the following steps: S601: Determine the set of active audio time periods for the video segment to be processed.

[0108] The set of active audio time periods includes at least one active audio segment.

[0109] Among them, the high threshold is greater than the low threshold.

[0110] S602: For each active audio segment, obtain the GOP corresponding to the jump rate and match it with the active audio segment.

[0111] S603: When the GOP corresponding to the jump rate intersects with the active audio segment, determine the GOP corresponding to the jump rate and whether there is a starting point in the neighborhood of the GOP.

[0112] S604: If so, increase the initial extraction density.

[0113] Specifically, lightweight decoding is performed on the accompanying audio track of the video segment to be processed, for example, decoding packet by packet on an AAC frame-by-frame basis to obtain a PCM audio sample sequence. This decoding process is only used to extract audio energy information and does not involve full-frame pixel unrolling. The computational cost is much lower than that of video decoding, and it belongs to an independent lightweight path.

[0114] Based on PCM sample sequences, a sliding window method was used to calculate short-time energy envelopes. The window length was set to 20ms and the frame shift to 10ms. The logarithmic energy value was calculated for each audio frame, forming an energy envelope sequence Ej. Statistical methods were used to determine the active audio intervals. A dynamic threshold was set by adding a multiple of the median absolute deviation to the median of this energy envelope sequence. Frames with energy values ​​above this threshold were marked as active frames. Active frame segments with intervals less than 150–300ms were merged, and isolated segments with durations shorter than 80–120ms were removed, ultimately yielding a stable set of active audio time periods.

[0115] For each active audio segment, obtain the GOP that intersects with its time range, and match the GOP with the active audio segment.

[0116] If there is a temporal overlap, continue to determine if there is a starting point within a range of approximately 100ms before and after the GOP.

[0117] The starting point is obtained through first-order difference detection. The energy envelope sequence Ej is differentially processed. When the difference value exceeds the 90th percentile of the segment, it is recorded as a starting point, reflecting the sudden change behavior of speech or volume, such as the broadcaster shouting "Link up!" or "Countdown three seconds!"

[0118] If the GOP corresponding to the jump rate intersects with the active audio segment, and there is a starting point in the neighborhood of the GOP, the GOP is determined to be in the audio-driven highlight region. At this time, the initial extraction density is increased, for example, the frame extraction interval is shortened to the order of 0.25 seconds to 0.5 seconds, and additional extraction points are added in the GOP to improve the probability of capturing key content.

[0119] Through the above extraction method, even if the video screen is static, such as when the anchor is explaining the product and there are no drastic changes in the screen, as long as there are significant energy changes and semantic keywords on the audio side, the system can still trigger a higher density frame extraction strategy to ensure that such audio-driven highlight segments are not missed.

[0120] There are several ways to extract video frames from the video segment to be processed based on the extraction density to obtain a lightweight inference dataset. In one implementation, such as... Figure 7 As shown, it includes the following steps: S701: Based on the extraction density, extract video frames from the video segment to be processed to obtain an extracted image frame set.

[0121] S702: Expand each extracted image frame in the extracted image frame set according to a preset resolution to obtain a lightweight inference dataset.

[0122] For each anchor frame scheduled for extraction, the decoder only decodes it to a target size that does not exceed a preset resolution, such as a short side of 360 pixels or a long side of no more than 640 pixels, and includes the decoded image frame in the extraction image frame set.

[0123] The preset resolution is lower than the resolution of the original material, which realizes the spatial dimension reduction of the original video frames.

[0124] Since non-extracted frames are not expanded into the full-resolution pixel buffer, the pixel occupancy of the decoder is reduced from being proportional to the full duration multiplied by the full resolution to being proportional to the number of extracted points multiplied by the dimensionality reduction resolution. The audio side decodes by packet and takes an independent lightweight path, which does not occupy the video decoder's pixel buffer pool. Therefore, the limitation that non-extracted frames are not expanded into the full-resolution pixel buffer still applies to the video decoder.

[0125] There are multiple ways to determine the set of candidate highlight intervals corresponding to a lightweight inference dataset. In one implementation, such as... Figure 8 As shown, it includes the following steps: S801: Input the lightweight inference dataset into the content saliency identification link.

[0126] S802: Receive the output of the content saliency identification link as a set of candidate highlight regions.

[0127] S803: Update the fragment-level cache table based on the candidate highlight interval set.

[0128] In this embodiment, the lightweight inference dataset is a set of extracted image frames from the video segment to be processed according to an adaptive extraction density, and a dimensionality-reduced image sequence formed by expanding each extracted image frame according to a preset resolution. This lightweight inference dataset is fed into the content saliency recognition link as input to identify highlight segments in the video content.

[0129] The content saliency identification link is analyzed using multimodal signal fusion, specifically including the following processing steps: A product detection model is run on extracted image frames from a lightweight inference dataset to identify the presence of product objects in the image and to calculate the proportion of the image area occupied by the product frame, generating a time series of product proportions. When this proportion remains consistently high or shows a sudden increase within a certain time period, that time period is considered to have the potential to become a candidate highlight region.

[0130] Optical character recognition (OCR) is performed on the extracted image frames to extract text information appearing in the images, with a focus on detecting price keywords, such as ¥299, and promotional terms, such as limited-time offers, special deals, and countdowns of 3 seconds—text related to live stream highlights. If such keywords are detected in consecutive frames, their temporal neighborhood is marked as a potential candidate highlight region.

[0131] Calculate the global histogram difference or brightness variance between adjacent extracted image frames to form a time series of image intensity changes. When the difference value shows a significant jump, it is judged as a scene switch or abrupt change point, such as switching from a host's explanation to a product close-up, or a black screen turning bright. Such boundaries are used to define the start or end position of the candidate highlight interval.

[0132] Audio segments corresponding to the temporal neighborhood of the extracted image frames can be fed into the speech keyword recognition module to detect the presence of typical live-streaming phrases such as "Link up!", "Giveaway!", and "Get ready to grab!". If a match is found, the confidence score for the corresponding time period is increased, serving as an auxiliary trigger signal for candidate highlight regions.

[0133] By aligning the multi-dimensional signals, including product detection, OCR results, image difference changes, and audio keywords, on the time axis, and using methods such as local peak detection, boundary clustering, and confidence weighting, highly significant continuous time periods are identified. Each candidate highlight interval output includes the following fields: in-point, out-point, confidence score, and label. Finally, the output of the content saliency identification chain constitutes the set of candidate highlight intervals.

[0134] Furthermore, after completing the inference, the system binds the candidate highlight interval set with the corresponding segment-level content fingerprint and writes it into the segment-level cache table. When processing video segments with the same or similar content, if the segment-level content fingerprint hits the cache, the candidate highlight interval set can be directly reused without performing decoding and AI inference again, achieving incremental reuse across tasks.

[0135] There are several ways to edit a set of candidate highlight regions based on editing time prior parameters to generate an edited video. In one implementation, such as... Figure 9 As shown, it includes the following steps: S901: Merge the candidate highlight regions to obtain the complete set of materials.

[0136] The complete set of materials includes multiple candidate highlight regions, as well as the in-point, out-point, confidence score, and label of each candidate highlight region.

[0137] S902: Determine the cut point sequence of the entire set of materials.

[0138] S903: Constrain the cut point sequence based on the editing timing prior parameters to obtain the constrained cut point sequence.

[0139] S904: Based on the constrained cut point sequence and editing timing prior parameters, the entire set of materials is edited to obtain the edited video.

[0140] The candidate highlight intervals from all video clips are integrated and fused in chronological order. Since each video clip is a continuous segment divided into preset durations, such as 15 seconds per segment, the candidate highlight intervals of adjacent clips may have slight overlap or be close in time. These adjacent or overlapping candidate highlight intervals are merged, and the best ones are retained based on their label consistency and confidence scores.

[0141] For example, if two intervals have the same label and the gap is ≤0.5 seconds or overlaps, they are merged: the new interval is determined by the earliest entry point, the latest exit point, and the higher score. If the labels are different and the times overlap, the interval with the higher score is retained; the interval with the lower score has its overlapping portion cut off, and if the remaining time is too short, it is discarded.

[0142] Since the boundary of the candidate highlight region comes from the AI ​​model labeling result under sparse frame extraction, its temporal positioning has a certain accuracy error. In order to improve the editing accuracy, the original boundary is interpolated and corrected based on the motion intensity trend of the anchor frames in the neighborhood.

[0143] Specifically, for each candidate interval's boundary in-point or out-point, if it happens to be located at the time position of a certain extracted image frame, then the time of that extracted image frame is directly used as the precise cut point. Otherwise, the bitstream data area length jump rate of the preceding and following anchor frames within the boundary's neighborhood or the histogram difference slope of the decoded image is analyzed as a trend proxy signal for the image motion intensity. Using linear or nonlinear interpolation methods, the most likely actual time point for content switching is estimated, thereby generating a precise time-code cut point sequence expressed in the original time base.

[0144] For example, for each candidate boundary t, if the time difference with a certain frame is no more than one frame, the cutoff point directly takes the timecode of that frame; otherwise, take the left and right adjacent anchor frames t_L and t_R, use the existing histogram differences at both ends as the intensities m_L and m_R, and apply t*=t_L+(t_R) t_L)·(m_L+ε) / (m_L+m_R+2ε) interpolation.

[0145] If there is no histogram difference at both ends, the length jump of the I-frame or IDR frame data area is used as the intensity.

[0146] Load the editing timing prior parameters corresponding to the target merchant ID. The editing timing prior parameters are primarily based on the historical editing logs generated by the merchant using the self-developed editing SDK of this system, and are obtained through statistical aggregation or lightweight learning.

[0147] The SDK internally stores historical editing logs, including source references for each segment, in-point and out-point timecodes, transition types and durations (frames), cropping rectangle or keyframe-based cropping coordinate sequences, and subtitle overlay appearance times and location template references. Statistical aggregation is performed on the merchant's historical editing logs, such as identifying frames where the duration of dissolve transitions is concentrated within a specific frame range, the average duration range of product description segments, and whether a cropping rectangle with a variance below a certain threshold can be considered a stable position. Based on this, lightweight learning models, such as linear regression, regression functions based on historical cut points and image motion intensity pairs, and lookup tables, can be used to fit a set of parameter constraints, including the conditional distribution of transition duration, the correspondence between cut point intervals and image motion intensity, and stable cropping rectangle candidates, as prior parameters for editing timing.

[0148] It should be noted that the input of this lightweight learning model is a pair of field values ​​that have been determined in the historical edit log, and the output is a quantifiable parameter constraint value, a lookup table, or a lightweight regression function. It does not constitute a large style prediction model, nor does it use the selected template ID as the output form.

[0149] In a few professional editing workflows, it is also possible to supplement the data source by ingesting clip records from standard project exchange formats such as EDL and FCPXML exported from Premiere, DaVinci Resolve, or FinalCut Pro. When the historical log is insufficient, it degenerates into rough skeleton parameters or conservative default parameter sets derived from the finished video.

[0150] The cut point sequence is constrained based on prior editing timing parameters to obtain a constrained cut point sequence. For example, if the original cut point suggests a transition duration of 1.8 seconds, but the prior editing timing parameters indicate a maximum allowed transition duration of 1.2 seconds for the current content type, the transition duration is automatically compressed to the compliant range. Similarly, if the motion intensity in the vicinity of a certain cut point is low, and the prior editing timing parameters indicate that a shorter cut point interval is suitable for such stable scenes, the cut point distribution density is adjusted to meet brand style consistency requirements. This process does not select a preset template ID to fill slots, but rather uses the prior editing timing parameters as a dynamic adjuster to participate in the compilation and generation of editing instructions.

[0151] The entire set of footage is edited based on the constrained cutpoint sequence and editing timing prior parameters to obtain the edited video.

[0152] Specifically, this includes: constructing a structured editing instruction tree that conforms to the predefined ClipIR intermediate representation mode, where each segment node contains source file references, time base, in and out points expressed in the original time base, crop rectangle, tags, confidence score, transition sub-nodes including type and duration, and subtitle overlay nodes including appearance time and position template references, etc.; the instruction parser first verifies whether the instruction tree meets the constraints of the ClipIR mode, such as monotonically increasing timecode, transitions not exceeding the gap, and crop rectangles within the frame size, etc. After the verification is passed, it is mapped to the underlying editing engine API call sequence, and the segment splicing, transition application, cropping keyframe setting and rendering encoding are executed, and the final output is a short video product that conforms to the brand style and accurately aligns the content highlights.

[0153] In addition, the system supports performing lightweight local decoding rescanning on the neighborhood of the cut point derived from sparse labeling, recording the actual cut deviation log, and using the log to update the reliability information of the cached record in the corresponding segment-level cache table.

[0154] This application also provides a material editing device 110, which implements the steps of the material editing method.

[0155] This application also provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer-executable instructions, which, when executed by the processor 130, implement the material editing method.

[0156] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by the processor 130, implements the material editing method.

[0157] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. 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 marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive 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 a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0158] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0159] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0160] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for editing source material, characterized in that, The method includes: Receive the material data to be processed; Calculate the file-level fingerprint of the material data to be processed; If the file-level fingerprint of the material data to be processed does not match the file-level cache table, the material data to be processed is segmented according to the preset segment duration to obtain multiple video clips; For each of the video segments, calculate a complexity summary of the video segment; The segment-level content fingerprint of the video segment is determined based on the complexity summary; In the case where the segment-level content fingerprint does not hit the segment-level cache table, a list to be inferred is constructed, wherein the list to be inferred contains multiple video segments to be processed that have not hit the segment-level cache table; For each video segment to be processed, the extraction density is determined, and video frames of the video segment to be processed are extracted based on the extraction density to obtain a lightweight inference dataset. Determine the set of candidate highlight intervals corresponding to the lightweight inference dataset; Determine the prior parameters for editing timing; The candidate highlight interval set is edited based on the editing timing prior parameters to generate the edited video.

2. The method according to claim 1, characterized in that, The step of calculating the file-level fingerprint of the material data to be processed includes: Obtain the stable byte block of the stream header of the material data to be processed and the first duration of the material data to be processed; Obtain the main video track encoding parameters of the material data to be processed; The file-level fingerprint of the material data to be processed is obtained by calculating the hash value based on the stable byte block of the stream header, the first duration, and the encoding parameters of the main video track.

3. The method according to claim 1, characterized in that, The step of calculating a complexity summary for each video segment includes: Determine the set of anchor points for the video segment to be processed, wherein the set of anchor points includes keyframes or I-frames of the video segment to be processed; For each anchor frame in the anchor point set, determine the multiple NALU units contained in the anchor frame, and determine the boundary of each NALU unit; Determine the header length of the anchor frame; The data area length of the anchor frame is determined based on the boundary of each NALU unit and the header length of the anchor frame; The anchor points are sorted according to the order in which they appear in the bitstream to obtain the sorted set of anchor points. Get the absolute value of the difference between the data area length of the current anchor frame and the data area length of the previous anchor frame; Calculate the sum of the current anchor frame data area length and a preset constant; Calculate the ratio of the absolute value to the sum, as the jump rate; The maximum value among the various transition rates is used as the complexity summary of the video segment.

4. The method according to claim 3, characterized in that, The step of determining the extraction density for each video segment to be processed includes: A high threshold and a low threshold are determined from each of the complexity summaries, wherein the high threshold is greater than the low threshold; For each jump rate, if the jump rate is greater than the high threshold, the initial sampling density is increased. If the jump rate is less than the low threshold, then only anchor frames are extracted; If the jump rate is greater than the low threshold and less than the high threshold, the initial extraction density is maintained.

5. The method according to claim 4, characterized in that, The step of determining the extraction density for each video segment to be processed includes: Determine the set of audio active time periods of the video segment to be processed, wherein the set of audio active time periods contains at least one audio active segment; For each active audio segment, obtain the GOP corresponding to the jump rate and match it with the active audio segment; If the GOP corresponding to the jump rate intersects with the active audio segment, determine whether the GOP corresponding to the jump rate and whether there is a starting point in the neighborhood of the GOP. If so, increase the initial sampling density.

6. The method according to claim 1, characterized in that, The step of extracting video frames from the video segment to be processed based on the extraction density to obtain a lightweight inference dataset includes: Based on the extraction density, video frames of the video segment to be processed are extracted to obtain an extracted image frame set. Each extracted image frame in the extracted image frame set is expanded according to a preset resolution to obtain a lightweight inference dataset.

7. The method according to claim 1, characterized in that, The step of determining the candidate highlight interval set corresponding to the lightweight inference dataset includes: Input the lightweight inference dataset into the content saliency identification link; The output of the content saliency identification link is received as a set of candidate highlight regions; The fragment-level cache table is updated based on the set of candidate highlight regions.

8. The method according to claim 1, characterized in that, The step of editing the candidate highlight region set based on the editing timing prior parameters to generate the edited video includes: The candidate highlight interval sets are fused to obtain the complete set of materials, wherein the complete set of materials includes multiple candidate highlight intervals and the in point, out point, confidence score and label of each candidate highlight interval; Determine the cut point sequence of the entire set of materials; The cut point sequence is constrained based on the editing timing prior parameters to obtain the constrained cut point sequence; The entire set of materials is edited based on the constrained cut point sequence and the editing timing prior parameters to obtain the edited video.

9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method according to any one of claims 1-8.

10. A storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-8.