A method and system for compositing animation with video segments
By using an element annotation model and intelligent segmentation algorithm to perform hot data replacement and timeline alignment of animation and video clips, the problems of hierarchical fusion, rigidity, and synchronization between animation and video are solved, achieving efficient and high-quality video compositing effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU TAIDONG TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies suffer from poor quality and low efficiency in complex and custom-generated compositing scenarios, resulting in rigid and interwoven animation and video layers, difficulty in synchronizing playback status and screenshot timing, and low resource utilization.
The system employs a pre-defined element annotation model for hot data replacement, utilizes an intelligent segmentation algorithm to divide the animation into independent segments, and aligns the animation with the timeline of external media materials through a timestamp synchronization mechanism. It also improves rendering efficiency by combining asynchronous concurrent scheduling.
It achieves efficient and high-quality synthesis of animation and video clips, solves the problems of rigid interlacing and synchronization of animation and video layers, and improves resource utilization and rendering task success rate.
Smart Images

Figure CN122513610A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video compositing technology. More specifically, this invention relates to a method and system for compositing animation and video clips. Background Technology
[0002] With the growth of digital marketing and short video platforms, businesses are increasingly demanding high-quality, mass-produced, and customized composite videos. In the field of video compositing, integrating animated clips or characters into live-action images or videos is a popular application. These applications typically employ video template-based compositing techniques. While this approach improves production efficiency, it suffers from the following drawbacks in complex compositing scenarios requiring customized generation: Firstly, there is a rigid and inefficient integration of animation and video layers. Specifically, traditional techniques typically overlay the entire animation as a single, unified whole, making it impossible to achieve an interleaved arrangement of animation layers and video layers. For example, when designers want certain animated elements to appear after video footage and others to appear before it, this is difficult to achieve with current technology.
[0003] Secondly, in traditional browser-based video rendering solutions, the playback status of HTML5 video animation elements and the timing of screenshots taken by automated screen recording tools are difficult to synchronize precisely, which can easily lead to problems such as missing first frames, frame skipping, or stuttering in exported videos.
[0004] Third, when the templates created by designers are executed programmatically, the system needs to schedule complex mapping relationships. This scheduling process has low resource utilization and cannot utilize multi-core processing capabilities, resulting in low batch rendering efficiency.
[0005] In summary, in complex compositing scenarios that require customized generation, existing technologies mainly suffer from poor video quality and low efficiency. Summary of the Invention
[0006] To address the aforementioned technical problems of poor video quality and low efficiency in synthesized videos, this invention discloses a method and system for synthesizing animation and video clips.
[0007] In a first aspect, the present invention discloses a method for synthesizing animation and video clips, comprising: In response to a rendering request, acquire the target vector animation, external media assets, and dynamic replacement data; Using a preset element annotation model, hot data replacement is performed on specified elements in the target vector animation; Using a preset intelligent segmentation algorithm, the target vector animation after hot replacement is divided into multiple independent animation segments, and a corresponding stacking order is assigned to each animation segment and external media material; Load animation segments and external media materials according to the stacking order; Based on a preset timestamp synchronization mechanism, the system forcibly aligns all animation segments in each frame with the timeline of external media materials, and captures continuously rendered images in the aligned state to output a composite video.
[0008] Beneficial effects: After the rendering request is submitted, the target vector animation, external media materials, and dynamic replacement data are first acquired as the basis for data processing. Then, using a preset element annotation model, specified elements in the target vector animation are hot-replaced to achieve fully automatic replacement of animation elements. The entire process does not require parsing the entire animation itself, resulting in high element replacement efficiency. The method of this invention employs an intelligent segmentation algorithm to divide the hot-replaced target vector animation into multiple independent animation segments, and assigns a corresponding stacking order to each animation segment and external media materials to overcome the problem of interleaved arrangement of animation and video in existing technologies. Furthermore, the method of this invention introduces a timestamp synchronization mechanism to align the timelines of animation segments and external media materials, thereby overcoming the problems of missing first frames, frame jumps, or stuttering in synthesized videos. Compared to existing technologies, the synthesized video obtained using the method of this invention is more efficient and of higher quality.
[0009] Preferably, a preset element annotation model is used to perform hot data replacement on specified elements in the target vector animation, including: Parse the configuration information of the element annotation model to obtain the replaceable attributes and classification constraints of the specified element; Extract replacement content submitted in batches according to classification constraints from dynamically replaced data; Based on the replaceable attribute, the replacement content is written to the underlying structured data of the target vector animation.
[0010] Preferably, when a specified element contains a custom font, the data hot-swap process also includes a dynamic anti-collision mechanism: Extract the family name of the original font being replaced, the index number of the layer it belongs to, and the timestamp information of the custom font. Concatenate these to generate a font identifier and write the font identifier into the font configuration node of the underlying structured data. Each font identifier is matched with the corresponding custom font.
[0011] Preferably, a preset intelligent segmentation algorithm is used to divide the hot-swapped target vector animation into multiple independent animation segments, including: Traverse the hierarchical structure of the target vector animation, identify and extract the target layers that need to be rendered independently; Based on the layer index of the target layer and its position on the timeline, the target vector animation is divided into multiple independent animation segments, and an independent stacking order is assigned to each animation segment.
[0012] Preferably, the target layer includes a first video layer, an audio layer, and a pre-compositing layer containing video; for the pre-compositing layer, the method of the present invention further includes: Recursively extract embedded video layers from pre-synthesized layers; Calculate the global transformation matrix of the embedded video layer; Based on the stacking order and the global transformation matrix, the first video layer, the audio layer, and the embedded video layer are combined to obtain the animation segments used for loading.
[0013] Preferably, based on a preset timestamp synchronization mechanism, all animation segments in each frame are forcibly aligned with the timeline of external media materials. Specifically, this includes using a frame-by-frame control mode to perform the following operations at each rendering frame's time point: Update animation segments and external media materials to the specified time state; For animation segments, a high-speed playback mode is used to position them to the corresponding rendering frames; For external media materials, precise addressing is used to locate the target time corresponding to the rendering frame.
[0014] Preferably, capturing sequentially rendered images in an aligned state to output a composite video includes: After the animation segments and external media materials are rendered, screenshots are taken of each rendered image to obtain multiple single-frame images; Multiple single-frame images are combined sequentially to form a continuously rendered image; Continuously rendered images are sent through a pipeline to a video encoder for mixing and encoding to output a composite video.
[0015] Preferably, the method of the present invention further includes an asynchronous concurrent scheduling step: Receive batch rendering requests and create a subtask containing independent, dynamically replaced data for each rendering request based on a memory queue; Based on the preset system concurrency threshold, subtasks are extracted from the memory queue and independent rendering environments are initialized; During the rendering execution phase, an automatic retry strategy is triggered for abnormal subtasks, and the rendering progress of the subtasks is sent back to the calling end in real time.
[0016] Preferably, after outputting the synthesized video, the method of the present invention further includes: Upload the synthesized video to a cloud storage object and obtain the corresponding access link; Based on the callback address carried in the rendering request, generate a task result data packet containing the access link and task execution status; The task result data packet is pushed to the business caller, and the status of the rendering request in the task queue is updated to "completed".
[0017] In a second aspect, the present invention discloses a system for synthesizing animation and video clips, including a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement the method for synthesizing animation and video clips described in the first aspect.
[0018] The beneficial effects of this invention are as follows: (1) Compared with the prior art, the synthesized video obtained by the method of the present invention is more efficient and of better quality.
[0019] (2) Compared with the prior art, the asynchronous queue of the method of the present invention supports high concurrency and can improve the success rate of rendering tasks through automatic retries.
[0020] (3) Compared with the prior art, the method of the present invention simplifies the workflow of animation designers and improves their efficiency in producing composite videos. Attached Figure Description
[0021] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1 This is a flowchart of the method for synthesizing animation and video clips in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the system for synthesizing animation and video clips in Embodiment 2 of the present invention. Detailed Implementation
[0022] 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, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0024] Example 1 like Figure 1 As shown, this embodiment discloses a method for synthesizing animation and video clips, including: S10: In response to a rendering request, acquire the target vector animation, external media assets, and dynamic replacement data.
[0025] In this embodiment, the rendering request can be submitted by the designer on the system's interactive interface or by a periodically requested script based on built-in configuration. The target vector animation is a Lottie format animation. Compared to traditional GIF or APNG formats, Lottie animation files occupy less memory while carrying the same amount of content, making them particularly suitable for large data network transmissions. External media materials mainly refer to video files conforming to the HTML5 standard, which can be played directly in a browser; they are generally in MP4, WebM, or Ogg formats. Dynamic replacement data can refer to replacement content pre-imported by the designer on the interactive interface, such as character animations, backgrounds, audio, or subtitle characters; it can also refer to replacement elements retrieved from a material template using a periodically requested script.
[0026] It should be further explained that the rendering requests mentioned above can be batches of task entities. If batch rendering requests exist, the asynchronous concurrent scheduling mechanism configured in the system needs to be executed. Before executing the rendering tasks, this mechanism receives the batch of rendering requests, then creates a subtask containing independent dynamically replaced data for each rendering request based on a memory queue. Next, according to a preset system concurrency threshold, it extracts the subtask from the memory queue and initializes an independent rendering environment. During the rendering execution phase, the asynchronous concurrent scheduling mechanism triggers an automatic retry strategy for abnormal subtasks and sends real-time callbacks to the calling client regarding the rendering progress of the subtasks.
[0027] Furthermore, the scripting process for the aforementioned asynchronous concurrent scheduling mechanism involves first defining an asynchronous function named batchRender, which accepts a parameter of type BatchRenderDto and returns a Promise. <batchresult>The result is of type [variableSet]. Then, a unique batch ID is generated to identify the current batch rendering task. Next, an empty array is created to store the rendering task objects generated for each variable set. The passed-in `variableSets` array is then traversed, where each element represents a set of variables. Finally, the `jobsService.createJob` method is called to create a rendering task for the current variable set.
[0028] Through the above technical solution, the method of this embodiment has multi-core processing capability and supports high-concurrency task execution by using asynchronous queues. On the one hand, its automatic retry strategy can improve the success rate of rendering tasks through automatic retries. On the other hand, it can also optimize resource utilization and improve rendering efficiency.
[0029] S20: Uses a preset element annotation model to perform hot data replacement on specified elements in the target vector animation.
[0030] Specifically, step S20 above includes: S21: Parse the configuration information of the element annotation model to obtain the replaceable attributes and classification constraints of the specified element.
[0031] In this embodiment, the above configuration information includes text information configuration, image information configuration, and video information configuration.
[0032] The text information configuration includes the Lottie layer index, name, original text type, original font information, text category, a Boolean flag indicating whether replacement is allowed, and a field for entering replacement content. When text is used as a specified element for replacement, the Boolean flag indicating whether replacement is allowed serves as the replaceable attribute, while the original text type, original font information, and text category serve as category constraints.
[0033] The image information configuration includes the Lottie asset ID, the hierarchy identifier referencing the Lottie asset ID, a boolean flag indicating whether replacement is allowed, the original asset information, image category, pixels, length, and width. When an image is used as a replacement element, its replaceable attribute can be a boolean flag indicating whether replacement is allowed, while its category constraints are the image category, pixels, length, and width.
[0034] The video information configuration includes a video ID, a hierarchical identifier for the referenced video asset ID, a boolean flag indicating whether replacement is allowed, a video type / format field, and a field for filling in the replacement content. When a video is used as a replacement for a specified element, its replaceable attribute can be a boolean flag indicating whether replacement is allowed, while its classification constraint is the video type / format.
[0035] S22: Extract replacement content submitted in batches according to classification constraints from the dynamic replacement data.
[0036] In this embodiment, the rendering API can be used to support the submission of replacement data by category. At the system level, the corresponding labels are automatically matched for the batch submission of replacement content based on the category constraints in the above configuration, and the replacement content or the replacement content loading address is filled into the corresponding replacement content field.
[0037] S23: Based on the replaceable attribute, overwrite the replacement content into the underlying structured data of the target vector animation.
[0038] For example, when the "whether to allow replacement" boolean flag of one of the specified elements in the target vector animation is 1, it means that the element can be replaced, and the replacement content will overwrite the original element (text, image or video segment) content.
[0039] It should be noted that the above element annotation model can be compiled into a script based on the technical descriptions in steps S21-S23 above.
[0040] Furthermore, when a specified element contains a custom font, the data hot-replacement process also includes a dynamic anti-collision mechanism. This mechanism, at the script level, is configured to: first extract the family name of the original font being replaced, the index number of its layer, and the timestamp information of the custom font; then concatenate these to generate a font identifier; and finally write the font identifier into the font configuration node of the underlying structured data. Each font identifier is matched with its corresponding custom font.
[0041] Through steps S21-S23 above, utilizing the element annotation model, at the system interaction level, this embodiment's method supports visual annotation replacement, providing a WYSIWYG experience. Furthermore, designers can achieve batch element replacement without writing code, realizing the "upload once, render multiple times" technical effect, thereby effectively improving the efficiency of the entire animation-external video material synthesis video. In addition, the above method ensures conflict-free font replacement and maintains the original layout and animation effects.
[0042] S30: Employs a preset intelligent segmentation algorithm to divide the hot-swapped target vector animation into multiple independent animation segments, and assigns a corresponding stacking order to each animation segment and external media material.
[0043] Specifically, step S30 above includes: S31: Traverse the hierarchical structure of the target vector animation, identify and extract the target layers that need to be rendered independently.
[0044] It should be noted that the target layers mentioned above include the first video layer, the audio layer, and the pre-compositing layer containing the video. Each layer can rely on its own name or attribute tags to perform the recognition and extraction process.
[0045] Furthermore, the aforementioned first video layer includes a background layer, a video placeholder layer, a mid-motion layer, and a foreground animation layer. The animation content in the background layer is generally an animated scene, which can be a static scene or a dynamic looping scene (such as a waterfall animation). The video placeholder layer refers to video elements used to temporarily occupy a specific position or time period during video processing, editing, or rendering. For example, in animation, the video placeholder layer could be the animation playing the opening (OP) or ending (ED). The foreground animation layer is the layer at the very front of the animation, the visual layer "closest" to the viewer, and is often used to place objects close to the camera, such as falling petals, flocks of birds flying by, railings, and leaves. The mid-motion layer usually refers to the midground layer in animation production. It is the core part of the composition, connecting the upper and lower parts of the frame, mainly used to present the main character's actions, plot narrative, and character interactions, and is located between the foreground and background in the visual hierarchy.
[0046] S32: Based on the layer index of the target layer and its position on the timeline, divide the target vector animation into multiple independent animation segments and assign an independent stacking order to each animation segment.
[0047] For the standard first video layer, the segmentation primarily targets the background layer, mid-motion layer, and foreground animation layer. Each of these three layers is separately segmented into multiple relatively independent animation segments, providing material for subsequent compositing. After segmentation, the animation segments are assigned corresponding time numbers and layer labels according to their order of appearance on the timeline.
[0048] Compared to the first video and audio layers mentioned above, the pre-compositing layer refers to a layer that packages multiple layers into independent compositing units. Assuming step S31 involves unpacking the original target vector animation (a first-level package), the pre-compositing layer can be understood as a second-level package. Therefore, further unpacking is required for processing this special type of layer.
[0049] For the pre-synthesized layer, the method in this embodiment further includes: First, the embedded video layer is recursively extracted from the pre-composite layer. Then, the global transformation matrix of the embedded video layer is calculated. Finally, according to the stacking order and the global transformation matrix, the first video layer, the audio layer and the embedded video layer are combined to obtain the animation segments used for loading.
[0050] It's important to explain that the global transformation matrix mentioned above records basic attribute data such as the spatiotemporal position, layer name, scaling, and rotation of each layer in the embedded video layer. Before combining the first video layer, audio layer, and embedded video layer, it's crucial to convert the local coordinates of the embedded video layer's spatiotemporal dimension to global coordinates. This allows for animation inheritance of keyframes within the embedded video layer during combination by extracting keyframes and converting them to global spatiotemporal coordinates. This has wide applications in animation fan creation. For example, if the original animation provides an open / unfinished ending, the above method can be used to allow creators to customize an ending that meets their own expectations.
[0051] Through the above steps S31-S32 and the method improvements for the pre-compositing layer, the method of this embodiment provides a basis for arbitrary interleaving of animation and external media materials, which can support the correct rendering of video in complex Lottie pre-compositing structures and maintain the integrity and animation effect of the original animation.
[0052] S40: Load animation segments and external media assets according to the stacking order.
[0053] In this embodiment, after the above steps S31-S32 are completed, an open-source rendering tool is used to load the above animation segments and external media materials in a stacked order.
[0054] S50: Based on a preset timestamp synchronization mechanism, it forces all animation segments in each frame to align with the timeline of external media materials, and captures continuously rendered images in the aligned state to output a composite video.
[0055] It should be explained that traditional browser screen recording solutions (such as the MediaRecorder API) rely on real-time playback. However, due to factors such as frame rate fluctuations and system load, it is difficult to guarantee precise timing control for each frame. For professional video compositing, traditional methods are inherently uncertain, resulting in composite videos with misaligned frames or disconnected temporal and spatial relationships. Therefore, step S50 above needs to be executed in frame-by-frame control mode to achieve precise timing control.
[0056] Furthermore, in the above-described frame-by-frame control mode, step S50 includes: S51: Update animation segments and external media assets to the specified time state.
[0057] In this embodiment, animation segments and external media materials can be updated to a specified time state through script configuration. This time state can be the start time point of insertion, the allowed insertion time period, and the end time point of insertion. The specification of the above time state can be updated according to the designer's video plot design requirements (forward narrative, flashback, or reverse chronology, etc.).
[0058] S52: For animation segments, a high-speed playback mode is used to position them to the corresponding rendering frames.
[0059] In this embodiment, the instruction encapsulation function block for high-speed playback mode is configured as follows: async function updateLottieToFrame(anim, targetFrame) { return new Promise((resolve) =>{ anim.setSpeed(100); / / Playback at 100x speed const checkFrame = () =>{ if (anim.currentFrame>= targetFrame) { anim.pause(); resolve(); } }; anim.addEventListener('enterFrame', checkFrame); anim.play(); }); } It should be noted that, taking advantage of the asynchronous rendering characteristics of the lottie-web library, this embodiment uses a high-speed playback mode instead of direct frame skipping, which ensures the accuracy of the rendered frame positioning. The playback multiplier of the above functional blocks can be configured according to actual needs.
[0060] S53: For external media materials, precise addressing is used to locate the target time corresponding to the rendering frame.
[0061] Specifically, for the HTML5 Video element, the precise addressing and positioning described above is configured as a custom function: async function seekVideoToTime(video, targetTime) { return new Promise((resolve) =>{ video.currentTime = targetTime / 1000; / / Convert to seconds / / Wait for the seenked event to ensure the frame has been decoded video.addEventListener('seeked', () =>{ / / Wait an extra frame to ensure rendering is complete requestAnimationFrame(() =>resolve()); }, { once: true}); }); } It is important to note that before the actual recording, a pre-rendering step should be performed to ensure that all resources are fully loaded.
[0062] Furthermore, in order to complete the video compositing, step S50 above also includes: S54: After the animation segments and external media materials are rendered, take screenshots of each rendered image to obtain multiple single-frame images.
[0063] It should be added that in the automatic rendering workflow, the rendering execution layer first performs a unified abstract definition of the element types of all elements in the animation segment to be executed and the external media material, and then uses lottie-web (an open source tool) to render them according to their types.
[0064] S55: Combines multiple single-frame images sequentially to form a continuously rendered image.
[0065] The above-mentioned sequential combination usually refers to combination in chronological order, or it can refer to inserting keyframes according to the designer's interactive preset order.
[0066] S56: The continuously rendered images are sent through a pipeline to the video encoder for mixing and encoding to output a composite video.
[0067] It should be noted that color consistency management can be controlled using FFmpeg encoding parameters.
[0068] Through steps S51-S53, the timing of each frame can be precisely controlled to eliminate frame rate jitter. This method supports the output of composite video at frame rates from 1 to 120 fps, ensuring complete rendering of the first frame in steps S54-S56, and perfectly synchronizing the animation with external media materials. Steps S54-S56 can accurately achieve keyframe animation interpolation, and the output composite video has a high degree of color consistency.
[0069] Based on the above technical discussion, compared with the existing technology, the synthesized video obtained by using the above steps S10-S50 is more efficient and of better quality.
[0070] Furthermore, this embodiment of the method also introduces a progress tracking mechanism, that is, after outputting the synthesized video, this embodiment of the method further includes: S500: Uploads the synthesized video to a cloud storage object and obtains the corresponding access link.
[0071] S501: Generate a task result data packet containing the access link and task execution status based on the callback address carried in the rendering request.
[0072] S502: Push the task result data packet to the business caller and update the status of the rendering request in the task queue to complete.
[0073] By using the steps S500-S502 described above, more accurate and real-time progress tracking can be achieved.
[0074] Example 2 like Figure 2 As shown, this embodiment also includes a system for combining animation and video clips, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the method for combining animation and video clips described in the first aspect.
[0075] The system in this embodiment also includes other components well known to those skilled in the art, such as communication interfaces. Their settings and functions are known in the art, and therefore will not be described in detail here.
[0076] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions that can be stored or otherwise maintained by such a computer-readable medium.
[0077] In the description of this specification, "multiple" means at least two, such as two, three or more, etc., unless otherwise expressly and specifically defined.
[0078] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.< / batchresult>
Claims
1. A method for combining animation and video clips, characterized in that, include: In response to a rendering request, acquire the target vector animation, external media assets, and dynamic replacement data; Using a preset element annotation model, hot data replacement is performed on specified elements in the target vector animation; Using a preset intelligent segmentation algorithm, the target vector animation after hot replacement is divided into multiple independent animation segments, and a corresponding stacking order is assigned to each animation segment and the external media material; The animation segments and external media materials are loaded according to the stacking order; Based on a preset timestamp synchronization mechanism, the system forcibly aligns all animation segments in each frame with the timeline of external media materials, and captures continuously rendered images in the aligned state to output a composite video.
2. The method for synthesizing animation and video clips according to claim 1, characterized in that, Using a preset element annotation model, hot data replacement is performed on specified elements in the target vector animation, including: The configuration information of the element annotation model is parsed to obtain the replaceable attributes and classification constraints of the specified element; Extract the replacement content submitted in batches according to the classification constraints from the dynamic replacement data; Based on the replaceable attribute, the replacement content is overwritten into the underlying structured data of the target vector animation.
3. The method for synthesizing animation and video clips according to claim 2, characterized in that, When the specified element contains a custom font, the data hot-swap process also includes a dynamic anti-collision mechanism: Extract the family name of the original font being replaced, the index number of the layer it belongs to, and the timestamp information of the custom font, concatenate them to generate a font identifier, and write the font identifier into the font configuration node of the underlying structured data; wherein, each font identifier is matched with the corresponding custom font.
4. The method for synthesizing animation and video clips according to claim 1, characterized in that, Using a pre-defined intelligent segmentation algorithm, the hot-swapped target vector animation is divided into multiple independent animation segments, including: Traverse the hierarchical structure of the target vector animation, identify and extract the target layers that need to be rendered independently; Based on the layer index of the target layer and its position on the timeline, the target vector animation is divided into multiple independent animation segments, and an independent stacking order is assigned to each animation segment.
5. The method for synthesizing animation and video clips according to claim 4, characterized in that, The target layer includes a first video layer, an audio layer, and a pre-composited layer containing video. For the pre-synthesized layer, the method further includes: Recursively extract the embedded video layer from the pre-synthesized layer; Calculate the global transformation matrix of the embedded video layer; Based on the stacking order and the global transformation matrix, the first video layer, the audio layer, and the embedded video layer are combined to obtain the animation segments for loading.
6. The method for synthesizing animation and video clips according to claim 1, characterized in that, Based on a preset timestamp synchronization mechanism, all animation segments in each frame are forcibly aligned with the timeline of external media materials. Specifically, this includes using a frame-by-frame control mode to perform the following operations at each rendered frame's time point: Update the animation segments and external media materials to the specified time state; For the aforementioned animation segments, a high-speed playback mode is used to position them to the corresponding rendering frames; For the external media material, precise addressing is used to locate the target time corresponding to the rendering frame.
7. The method for combining animation and video clips according to claim 1, characterized in that, Capture consecutively rendered images in an aligned state to output a composite video, including: After the animation segments and the external media materials are rendered, a screenshot is taken of each rendered image to obtain multiple single-frame images; Multiple single-frame images are combined sequentially to form the continuously rendered image; The continuously rendered images are sent through a pipeline to a video encoder for mixing and encoding to output the composite video.
8. The method for synthesizing animation and video clips according to claim 1, characterized in that, The method further includes an asynchronous concurrent scheduling step: Receive batch rendering requests and create a subtask containing independent, dynamically replaced data for each rendering request based on a memory queue; Based on a preset system concurrency threshold, subtasks are extracted from the memory queue and independent rendering environments are initialized; During the rendering execution phase, an automatic retry strategy is triggered for abnormal subtasks, and the rendering progress of the subtasks is called back to the calling end in real time.
9. The method for synthesizing animation and video clips according to claim 1, characterized in that, After outputting the synthesized video, the method further includes: Upload the synthesized video to a cloud storage object and obtain the corresponding access link; Based on the callback address carried in the rendering request, generate a task result data packet containing the access link and task execution status; The task result data packet is pushed to the business caller, and the status of the rendering request in the task queue is updated to "completed".
10. A system for synthesizing animation and video clips, characterized in that, It includes a processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the method for combining animation and video clips as described in any one of claims 1-9.