Video file generation method and device, equipment, medium and product

Video editing templates written in JSON format contain reusable and editable code, solving the problem of low video production efficiency for non-professional users. They enable the rapid generation of video files that meet user needs and are compatible with multiple operating systems.

CN121567938APending Publication Date: 2026-02-24ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511836213.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In existing technologies, non-professional users often encounter problems such as disorganized material splicing, incomplete display of key information, and stuttering in the pacing of videos when creating them independently, resulting in low video production efficiency.

Method used

A method for generating video files is provided, which uses a video editing template written in JSON format, containing reusable first-type code and editable second-type code. The slot area is preset with initial material information, and the system automatically replaces and generates the video file after the user confirms the template.

Benefits of technology

It improves video production efficiency, reduces the number of times users need to re-edit, ensures that the generated videos meet user expectations, is compatible with multiple operating systems, and supports cross-platform use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121567938A_ABST
    Figure CN121567938A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video file generation method and device, equipment, a medium and a product, and the scheme comprises the steps that the rendering effect of a video editing template is displayed to a user, and the video editing template comprises two types of core codes: one type is a first type of code which is related to a target video and can be directly reused; the other type is a second type of codes which are related to the target video and need to be edited. A slot area is further arranged in the second type code, and the code of the area is associated with initial material information. When the system detects that a user initiates an editing operation for the video editing template, the system can automatically generate a corresponding editing instruction, and the editing instruction at least comprises a code for replacing the code in the slot area in the second type code. On the basis of the instruction, the system replaces the code in the slot area to obtain an edited second type code; integrating the edited second type code with the reusable first type code to generate a complete video editing code; and finally, running the code to output the video file required by the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of video processing technology, and particularly to a method for generating video files. This specification also relates to a video file generation apparatus, a computing device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] With the rapid iteration and popularization of video technology, videos featuring detailed product displays and service process explanations have gradually become a popular promotional tool. The intuitive and vivid presentation of videos can efficiently reach the target audience.

[0003] However, most users are not professional video content creators. Their proficiency with video editing tools is limited, and they lack systematic operational experience. This directly leads to various unsatisfactory technical defects when users independently create videos to meet their promotional needs, such as disorganized material splicing, incomplete display of key information, and choppy video pacing. This may cause users to re-edit the video multiple times, directly hindering production efficiency.

[0004] Therefore, improving video production efficiency has become an urgent technical problem to be solved. Summary of the Invention

[0005] In view of this, one or more embodiments of this specification provide a video file generation method, apparatus, device, medium, and product to solve the problem of low efficiency in video production.

[0006] According to a first aspect of one or more embodiments of this specification, a video file generation method is provided, comprising: A trigger instruction is obtained to render a video editing template written in JSON format; the video editing template contains a first type of code and a second type of code, the first type of code being reused and the second type of code being edited; the second type of code includes a slot area that allows users to replace materials; the slot area has code related to the initial material information before it is edited; Based on the trigger command, the video editing template is rendered to show the user the rendering effect of the video editing template; Obtain the editing operations input by the user for the video editing template; Based on the editing operation, an editing instruction is generated, which includes at least the code to replace the code in the slot area, resulting in the edited second type of code; Based on the edited second type code and the first type code, video editing code is generated; Running the video editing code will produce the edited video file.

[0007] According to a second aspect of one or more embodiments of this specification, a video file generation apparatus is provided, comprising: The trigger instruction acquisition module is used to acquire trigger instructions for rendering a video editing template written in JSON format; the video editing template contains a first type of code and a second type of code, the first type of code is used for reuse, and the second type of code is used for editing; the second type of code includes a slot area that allows users to replace materials; the slot area has code related to the initial material information before it is edited; The video editing template rendering module is used to render the video editing template based on the trigger command, so as to show the rendering effect of the video editing template to the user; The editing operation acquisition module is used to acquire the editing operations input by the user for the video editing template; An editing instruction generation module is used to generate editing instructions based on the editing operation. The editing instructions include at least code that replaces the code in the slot area to obtain the edited second type of code. The video editing code generation module is used to generate video editing code based on the edited second type code and the first type code; The video editing code execution module is used to run the video editing code to obtain the edited video file.

[0008] According to a third aspect of one or more embodiments of this specification, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer instructions, implements the steps of the video file generation method.

[0009] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions which, when executed by a processor, implement the steps of the video file generation method.

[0010] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the video file generation method described above.

[0011] One embodiment of this specification achieves at least the following beneficial effects: First, by demonstrating the rendering effect of the video editing template to the user, it helps the user quickly determine whether the video content corresponding to the template matches their needs. The video editing template contains two types of core code: one type is a first-type code that is directly reusable and related to the target video; the other type is a second-type code that is related to the target video and requires editing. The second-type code also includes a slot area, where the code is associated with initial material information. When the system detects that the user has initiated an editing operation on the video editing template, it is considered that the user has confirmed that the video editing template meets their needs. At this time, the system automatically generates a corresponding editing instruction, which at least includes code to replace the code in the slot area within the second-type code. Based on this instruction, the system first replaces the code in the slot area to obtain the edited second-type code; then, it integrates the edited second-type code with the reusable first-type code to generate complete video editing code; finally, running this code outputs the video file required by the user. This solution utilizes reusable first-type code, eliminating the need for users to build a video framework from scratch. Users simply need to confirm the template's usability by observing its rendering effect, complete simple editing operations, and the system will automatically handle the replacement of the second-type code, ultimately generating the target video file quickly. This effectively improves the efficiency of video production.

[0012] Furthermore, given the user-approved rendering effect, the system can call the corresponding video editing template to generate the video file required by the user. Since the video editing template has been approved by the user, the video generated based on the potential visual framework, editing logic, or effect parameters of the video editing template can also be more easily approved by the user, thereby effectively reducing the number of times the user makes videos repeatedly, and further improving the efficiency of video production. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram illustrating an application scenario of a video file generation method provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating a video file generation method provided in one embodiment of this specification; Figure 3 This specification provides an embodiment corresponding to... Figure 2 A schematic diagram of a video file generation device; Figure 4 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0015] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0016] This specification uses specific terms to describe embodiments thereof. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described herein, as well as the features of those different embodiments or examples, without contradiction.

[0017] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “an,” “an,” “the,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification includes any or all possible combinations of one or more associated listed items.

[0018] The terms “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, 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, product, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in the process, method, product, or apparatus that includes said elements is not excluded.

[0019] Although the terms "first," "second," etc., may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, "first" may also be referred to as "second," and similarly, "second" may also be referred to as "first," without departing from the scope of one or more embodiments of this specification. Ordinal numbers such as "first," "second," etc., do not necessarily indicate order; often they are used to facilitate the distinction of objects. For example, "first server" and "second server" usually refer to two servers. To distinguish these two servers, they are described as "first server" and "second server." Of course, sometimes these two servers may be the same server.

[0020] Depending on the context, the word "if" as used here can be interpreted as "when," "when," or "in response to determination."

[0021] In the embodiments described in this specification, unless explicitly stated otherwise, "receiving and sending data" does not necessarily mean direct receiving and sending; it can be indirect receiving and sending. For example, when device A receives data sent by device B, it can be understood as device A directly receiving the data sent by device B, or it can be understood as device A indirectly receiving the data sent by device B through other entities such as device C. Similarly, when device B sends data to device A, it can be understood as device B directly sending the data to device A, or it can be understood as device B indirectly sending the data to device A through other entities such as device C. Here, device C can be one entity, or it can be two or more entities.

[0022] In the embodiments described in this specification, unless explicitly stated otherwise, the relationships between structures can be direct or indirect. For example, when describing "device A is connected to device B," unless it is explicitly stated that device A and device B are directly connected, it should be understood that device A can be directly connected to device B or indirectly connected to device B. Similarly, when describing "device A is on top of device B," unless it is explicitly stated that device A is directly above device B (AB is adjacent and device A is above device B), it should be understood that device A can be directly above device B or indirectly above device B (AB is separated by other elements, and device A is above device B). And so on.

[0023] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.

[0024] The following explains the terms and concepts used in one or more embodiments of this specification.

[0025] The JSON format specification is a set of rules presented in the form of key-value pairs. It aims to achieve standardized storage and transmission of data through a concise and clear structure. Its core features are readability, cross-platform compatibility, and lightweight data.

[0026] Video editing templates are pre-designed video frameworks that include specific layouts, styles, effects, and background music. Users can quickly generate personalized videos by replacing placeholder content in the template, such as images, text, video clips, and audio, according to their needs.

[0027] A slot is a pre-set area in a video editing template where initial footage is stored; it is a basic structural unit of the template.

[0028] An empty slot usually refers to a slot in a video editing template that does not have preset initial material. It is a special state of the slot, emphasizing the characteristic of being blank and waiting to be filled.

[0029] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0030] Figure 1 This is a schematic diagram illustrating an application scenario of a video file generation method provided in one embodiment of this specification.

[0031] like Figure 1 As shown in the diagram, the application scenario includes a terminal device 101 and a server 102.

[0032] In the embodiments of this specification, the terminal device 101 may include, but is not limited to, at least one of the following terminals: smartphone, tablet computer, laptop computer, smart interactive device, wearable device, in-vehicle smart terminal, etc. Wearable devices may include, but are not limited to, at least one of the following terminals: smart bracelet, smartwatch, smart glasses, etc.

[0033] Server 102 may include, but is not limited to, at least one of the following: any device, equipment, platform, equipment cluster, or cloud computing service center server with computing and processing capabilities.

[0034] A communication connection is established between terminal device 101 and server 102. This communication connection can be, but is not limited to, a local area network (LAN) connection, a wide area network (WAN) connection, an internet connection, a short-range communication connection, or other types of data network connections. Short-range communication connections include, but are not limited to, Near Field Communication (NFC), LAN, Bluetooth, and infrared connections. The user can send video editing operations to server 102 through terminal device 101. In response to the video editing operations sent by terminal device 101, server 102 can invoke a video editing template. The video editing template contains a first type of code and a second type of code. Server 102 can replace the replaceable code within the second type of code in the video editing template to obtain the edited second type of code. Then, server 102 integrates the first type of code in the video editing template with the edited second type of code to obtain video editing code. Running this video editing code will then produce the video file desired by the user.

[0035] This specification provides a method for generating video files. This application also relates to a video file generating apparatus, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0036] Figure 2 This is a flowchart illustrating a video file generation method provided in one embodiment of this specification.

[0037] From a programming perspective, the entity executing the process can be a program mounted on the device used to generate video files. From a hardware perspective, this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities; for example, it can be a terminal device, a server, or both.

[0038] like Figure 2 As shown, the process may include the following steps: Step 202: Obtain the trigger command for rendering the video editing template written in JSON format.

[0039] The video editing template includes a first type of code and a second type of code. The first type of code is for reuse, and the second type of code is for editing. The second type of code includes a slot area that allows users to replace materials. The slot area has code related to the initial material information before it is edited.

[0040] In the embodiments of this specification, the triggering command can be a command generated after the user performs triggering operations on several templates among multiple video editing templates in the video editing tool. The triggering operation can include clicking, selecting, and sliding operations on the video editing templates, and the several templates can be one or more templates. The video editing tool can include software, applications, or systems used to create, edit, process, and optimize video materials to ultimately generate a complete video work.

[0041] In the embodiments of this specification, each video editing template in the video editing tool can be a template generated using JSON format code. Through these templates, users can quickly generate the videos they need by simply replacing their personalized materials with the template's generic content. This eliminates the need for users to design videos from scratch, thus improving video production efficiency. Furthermore, the readability of JSON format enhances the compatibility of video editing templates across different operating systems, allowing them to be used on various operating systems and improving their adaptability.

[0042] The code written for video editing templates can include a first type of code and a second type of code. The first type of code is reusable and can be understood as code that is related to the video that the user needs to generate and can be reused. Here, "related" reflects that the first type of code is associated with the basic or common functions of the target type of video. The video material corresponding to the first type of code can be content that can reflect common characteristics. This type of material has uniform and standardized attributes and is suitable for the batch production of the same type of video, such as the standard name of a product or service, a fixed brand logo of a company, a common promotional slogan, and a video background with a consistent style.

[0043] The second type of code, which is editable, can be code that needs to be edited and is related to the video that the user wants to generate. Here, "related" reflects that the second type of code is associated with the personalized needs or differentiated functions of the target type of video. The video material corresponding to the second type of code can be content that can reflect exclusive personality characteristics and is used to highlight the uniqueness and targeting of the video, such as the user's personalized store address, person's headshot, unique text content provided by the user, and audio information.

[0044] The second type of code can have a dedicated slot area. The core function of this slot area is to allow users to replace their own materials, thereby enabling editing of the second type of code. In the initial state of the video editing template, the slot area pre-embeds code related to the initial material information. This design ensures that when the video editing template is rendered, a complete video effect is presented to the user, allowing the user to intuitively judge whether the template meets their expectations. The "related" in "pre-embedded code related to initial material information" reflects that the code embedded in the slot area is generated based on the initial material information. This initial material information can be material information added by the developers when developing the video editing template, such as initial address information, initial character information, and initial text information.

[0045] A target type video refers to a specific type of video that can be generated using a video editing template. In practical applications, each video editing template corresponds to a fixed type and style of video. In other words, selecting a video editing template will ultimately generate a target type video that conforms to the preset style of that template, and the two can be presented in a one-to-one correspondence.

[0046] In practical applications, users can generate various video types using video editing templates, such as e-commerce product display videos, digital human promotional videos, and advertising videos. Specifically, for e-commerce product display templates, users can quickly generate customized product display videos by replacing the existing video footage with relevant footage of their own products. For promotional templates, users can add virtual characters to create digital human promotional videos. For advertising templates, users can obtain advertising videos tailored to their specific needs by replacing the corresponding video footage within the template.

[0047] In practical applications, when a user selects a template in a video editing tool, the tool can display a summary of each template at a preset location. This allows the user to make a preliminary judgment on whether the template meets their expectations, thereby reducing unnecessary filtering time.

[0048] Step 204: Based on the trigger command, render the video editing template to show the user the rendering effect of the video editing template.

[0049] In the embodiments of this specification, the rendering effect can refer to the preview video generated after the video editing template is rendered. In practical applications, when the system receives a trigger command, such as when a user clicks the preview button, the system will run the code corresponding to the video editing template, generate a template-specific preview video, and display the preset video to the user so that the user can judge whether the video editing template meets their needs.

[0050] In practical applications, the system can also support displaying the rendering effects of multiple different templates to users at the same time. This design allows users to intuitively compare the styles and content presentation of different templates, and thus more efficiently select the rendering effect that fully meets their expectations, thereby reducing the time cost of repeated attempts.

[0051] Step 206: Obtain the editing operation input by the user for the video editing template.

[0052] In the embodiments of this specification, the editing operation may include the user selecting a video editing template that meets their expectations from the rendering effects of multiple different video editing templates displayed. The editing operation may also include the user providing target material information to the selected video editing template for generating the target video, and the user-triggered operation of replacing the original initial material information in the template with the target material information.

[0053] Optionally, obtaining the user-inputted editing operation for the video editing template may specifically include: obtaining target material information for replacing the initial material information; and obtaining the user-inputted editing operation for editing the video editing template based on the target material information.

[0054] In the embodiments of this specification, the target material information can be material information used to replace the initial material information in the video editing template. The target material information can be material information that the user independently imports from the local device into the video editing tool, such as photos taken by the user, video clips, self-written text, etc. The target material information can also be material information that the user selects from the preset material library, such as pre-made images, audio, dynamic elements, etc.

[0055] In this embodiment of the specification, based on the target material information, the user can initiate an editing operation to the selected video editing template to replace the initial material information in the template with the target material information, so that the system can perform video editing based on the editing operation.

[0056] Step 208: Generate editing instructions based on the editing operation. The editing instructions include at least the code that replaces the code in the slot area, resulting in the edited second type of code.

[0057] In this embodiment, after receiving the user's input editing operation, the system can generate corresponding editing instructions based on the specific content contained in the editing operation. When the editing operation involves the user providing target material information to the selected video editing template for generating the target video, the system can convert this target material information into target code in code form, and then embed the target code into the generated editing instructions. At this time, the core function of the editing instructions is to instruct the system to replace the corresponding original code in the second type of code of the video editing template based on the embedded target code, so as to obtain the edited second type of code.

[0058] Optionally, the step of generating editing instructions based on the editing operation, wherein the editing instructions include at least the code for replacing the code in the slot area to obtain the edited second type of code, may specifically include: converting the target material information into target code information in JSON format; generating editing instructions for the video editing template based on the target code information; and, in response to the editing instructions, replacing the code in the slot area of ​​the second type of code with the target code information to obtain the edited second type of code.

[0059] In the embodiments of this specification, the system converts the target material information into target code information in JSON format. On the one hand, this can improve the readability of the target material information and make the code logic related to the material clearer and easier to understand. On the other hand, it can also ensure the consistency of data format between the target code information and the original code in the video editing template, so as to reduce format incompatibility issues and thus improve the success rate of subsequent code replacement operations.

[0060] In the embodiments described in this specification, after obtaining the target code information in JSON format, the system can use this as the core to generate editing instructions for the current video editing template. Editing instructions can be understood as execution commands. These instructions can contain target code information in JSON format, specify the object of the operation (i.e., the video editing template to be modified), and specify the operation content (i.e., replacing the original code in the video editing template with the target code). This ensures that the system has a clear basis for performing subsequent operations based on the editing instructions.

[0061] In this embodiment of the specification, in response to the above-mentioned editing instructions, the system can accurately locate the slot area within the second type of code in the video editing template. The slot area can be a preset code area that allows users to replace the material. Then, the system can use the target code information in JSON format to replace the original initial material code in the slot area to obtain the edited second type of code. The edited second type of code can be understood as a personalized code customized by the user, which is used to determine the personalized content of the video.

[0062] Step 210: Generate video editing code based on the edited second type code and the first type code.

[0063] In this embodiment of the specification, after editing the second type of code, the system can integrate the edited second type of code with the original first type of code to generate complete video editing code. The integrated video editing code can be considered as containing both the basic framework logic preset by the video editing template and the user's personalized material information.

[0064] Step 212: Run the video editing code to obtain the edited video file.

[0065] In the embodiments of this specification, when the system runs the video editing code obtained above, it can execute related operations line by line according to the instructions in the code, such as reading and parsing relevant material information, and processing operations such as screen splicing, sound effect matching, and dynamic effects according to preset logic, so as to convert the digitized code instructions into a video file with visual and auditory effects, and obtain an edited video file that meets the user's expectations.

[0066] While one or more embodiments of this specification provide method steps as described in the embodiments or flowcharts, it is understood that the order of steps listed in the embodiments or flowcharts is merely one possible execution order among many steps and does not represent the only possible execution order. The order of some steps may be adjusted according to actual needs, or some steps may be omitted. When the claims involve method steps, changes in the order of such steps, or parallel execution between steps, are also within the scope of protection of the claims.

[0067] Figure 2 The method described above utilizes reusable first-type code, eliminating the need for users to build a video framework from scratch. Users simply confirm the template's usability by observing its rendering effect, perform simple editing operations, and the system automatically handles the replacement of the second-type code, quickly generating the target video file. This significantly improves video production efficiency. Furthermore, based on user-approved rendering effects, the system can call corresponding video editing templates to generate the desired video file. Since the video editing templates are already user-approved, videos generated based on the templates' inherent visual framework, editing logic, or effect parameters are more likely to gain user approval, effectively reducing the number of times users need to repeatedly create videos and further improving production efficiency.

[0068] In addition, relying on the reusable basic code in the video editing templates, users can also batch create different video files based on the same template, realizing the batch production of multiple video files, thereby greatly improving the efficiency of video production.

[0069] based on Figure 2 In addition to the method described herein, this specification also provides some improved implementation methods, which will be described below.

[0070] In video editing templates, the slot areas used for code replacement typically contain various types. When replacing footage, you must first determine the corresponding matching slot area based on the specific type of the target footage information, and then complete the footage replacement based on the determined slot area. This can effectively improve the accuracy of footage replacement and avoid replacement errors caused by type mismatch, thereby affecting video quality.

[0071] Optionally, the slot identifier in the slot area includes at least one of video type identifier, image type identifier, audio type identifier, text type identifier, and graphic type identifier.

[0072] In this embodiment of the specification, for the slot area used for code replacement in the video editing template, the type of material supported by the area can be indicated by slot identifiers. These slot identifiers may include: a video type identifier for slot areas corresponding to replaceable video materials; an image type identifier for slot areas corresponding to slot areas corresponding to replaceable image materials such as pictures and photos; an audio type identifier for slot areas corresponding to slot areas corresponding to replaceable audio materials such as background music and narration; a text type identifier for slot areas corresponding to slot areas corresponding to replaceable text materials such as titles and subtitles; and a graphic type identifier for slot areas corresponding to slot areas corresponding to replaceable graphic materials such as icons and motion graphics.

[0073] By using slot identifiers, the system can clearly know that the corresponding slot can only replace the corresponding type of material code, which can avoid the risk of replacement errors caused by mixing different types of materials, thereby improving video quality.

[0074] Optionally, replacing the code in the slot area of ​​the second type code with the target code information to obtain the edited second type code may include: determining the type information of the target material information; querying the target slot identifier corresponding to the type information; performing slotting processing on the target slot area corresponding to the target slot identifier to obtain a target empty slot area; and filling the target empty slot area with the target code information to obtain the edited second type code.

[0075] In the embodiments of this specification, when the system needs to replace the original code in the second type of code with target code information, it first identifies the type of target material information provided by the user, such as an image, a piece of text, or an audio clip; then, based on the identified material type, it queries the slot area of ​​the video editing template for target slot identifiers with the same type identifier, such as the slot for image material corresponding to the image type identifier; after finding a matching target slot area, the system can perform slotting processing on the area to clear the original initial material code in the area, forming a blank target slot area; finally, the converted target code information is filled into this empty slot area to obtain the edited second type of code containing the user's personalized material.

[0076] In the embodiments of this specification, the logical operations of matching type identifiers, clearing old code, and filling in new code can ensure that different types of materials can be accurately replaced in the corresponding positions in the template, so as to avoid abnormal video display caused by type mismatch. At the same time, it can make the replacement process more efficient and standardized, thereby improving the efficiency of video production and video quality.

[0077] Optionally, the target material information may include multiple types of materials. The step of replacing the code in the slot area of ​​the second type of code with the target code information may specifically include: synchronously and batch replacing the code in the slot area of ​​the second type of code with the code information converted based on the multiple types of materials.

[0078] In this embodiment, when a user needs to replace multiple types of materials, such as simultaneously replacing text, image, and audio materials in a template, the system can support simultaneous processing of these different types of materials. Specifically, the system can convert the text, images, and audio materials to be replaced into JSON format code, and then synchronously replace these codes in their corresponding editing areas within the video editing template, overwriting the original code. This method of synchronously transcoding and replacing multiple types of materials avoids the tedious process of users performing each operation individually, thereby effectively improving the overall efficiency of video production.

[0079] To further enhance the convenience of video production, users can obtain the materials needed for video production from a preset material library, eliminating the need to prepare additional materials themselves, thereby reducing the user's operation steps and time costs.

[0080] Optionally, the target material information is material in a material library. The step of obtaining the target material information to replace the initial material information may specifically include: loading the material library in response to a user's trigger operation on a preset control in the video editing template; displaying each material in the material library; and obtaining the target material information in response to the user's selection operation on the target material among the various materials.

[0081] In the embodiments of this specification, the media library can be a collection of resources that centrally stores and manages various reusable video materials. The materials in the media library can all be professionally produced materials, and all materials in the media library can be high-quality materials. The standard for high quality can be understood as the number of times the material has been retrieved and used by other users reaching a preset number, or the number of times the material has received likes from other users meeting a preset requirement. This ensures the practicality and quality of the materials in the library, thereby improving the quality of videos generated based on the materials in the media library.

[0082] In practical applications, the media library can be a pre-built library, directly integrated into the video editing tool, allowing users to browse and select media without additional configuration; alternatively, the media library can be an externally retrieved library, where the system can call media from external resource libraries to expand the range of media available to the user.

[0083] In this embodiment, the video editing template may include pre-set interactive controls. After a user interacts with these controls, the system receives a trigger signal generated based on the interaction. In response to this trigger signal, the system automatically loads a preset media library. Once the media library is successfully loaded, the system can visually display the media in the library to the user, such as through thumbnail lists or categorized folders, allowing the user to intuitively browse and determine which media meet their needs. When the user clicks on or selects a target media from the displayed media, the system responds to this selection operation, automatically obtains the detailed information of the target media, such as the media path and format parameters, and identifies it as the required target media information, providing a data basis for subsequent code conversion and replacement operations.

[0084] Video editing tools can be deployed on remote servers rather than installed on the user's local device, so that users do not need to download and install large software packages locally, but can simply access the tool through a browser or other entry point to start video production.

[0085] Optionally, before obtaining the trigger instruction to render the video editing template written in JSON format, the process may further include: obtaining URL address information for launching a video editing tool containing the video editing template, wherein the video editing tool uses JSON format specifications when editing video projects; and launching the video editing tool in a web browser based on the URL address information.

[0086] In this embodiment, the URL address information can be the address information of a video editing tool associated with a remote server. The URL address information can also be pre-bound with a specific video editing template needed by the user. This means that the user can directly access the video editing template page through the URL address information, thus eliminating the need for the user to manually search for the video editing template after launching the video editing tool, thereby improving video production efficiency. It is understood that the URL address information may not be bound to a specific video editing template; this is not a limitation.

[0087] In the embodiments described in this specification, the video editing tool performs all editing operations according to the JSON format specification when processing video editing projects. This JSON format specification is fully compatible with the conversion of target materials into JSON code and the replacement logic between codes, as mentioned above. By converting target materials into JSON format code and storing the code within the slot areas of the video editing template in JSON format—that is, by adhering to this JSON format specification—it is ensured that the video editing tool will not encounter format incompatibility issues when parsing materials, performing replacements, and running code. This improves the smoothness of the video editing workflow and increases the efficiency of video production.

[0088] In this embodiment, the video editing tool is launched remotely, enabling access from various operating systems and achieving cross-platform access. Furthermore, the video editing tool uses a JSON format specification, leveraging JSON's strong readability to ensure that various operating systems can recognize and run the tool across platforms. This combination allows users to create videos regardless of their operating system or terminal device, provided they have an internet connection and a browser. This enhances the cross-platform capability of the video editing tool and lowers the barrier to entry for users.

[0089] To facilitate understanding of this solution by those skilled in the art, an example of a JSON format specification is also presented in the embodiments of this specification.

[0090] Example 1:

[0091] As shown in Example 1, the JSON format specification includes rule units describing version numbers, project types, project metadata, template metadata, canvas information, asset information lists, timelines, export settings, and template information. Each rule unit is written in JSON format. In practical applications, project types can include projects edited based on video editing templates, projects entirely edited by the user without using video editing templates, and mashup projects that partially utilize video editing templates. For projects not edited using video editing templates, the corresponding specification may not include descriptions of templates; for example, it may not include rule units describing template metadata or template information. Rule units describing the timeline can also include sub-units describing the track list, and sub-units describing the track list can further include sub-units describing the list of clips within a track. Rule units describing template information can include sub-units describing the slot list.

[0092] The JSON format specification includes rule units that describe the hierarchical relationships between various types of tracks.

[0093] Optionally, the editing specifications include specification information for the track array; the track array includes multiple accommodating areas for accommodating material tracks, each accommodating area corresponding to an array index, and the material tracks include at least one of video tracks, audio tracks, subtitle tracks, and special effects tracks; the method may further include: determining the hierarchical relationship between the material tracks according to their rendering order; setting the array index corresponding to each material track according to the hierarchical relationship, wherein the index value of each array index is positively correlated with the hierarchy of each material track; and for any material track, filling the target accommodating area indicated by the target array index according to the determined target array index.

[0094] In the embodiments of this specification, within the video editing standard, a track array can be a container used to hold and manage various types of media tracks. The track array can include multiple areas for holding media tracks, and each area can hold one media track. Each area corresponds to an array index, and the order of the areas can be determined based on the index value. A media track refers to a virtual timeline channel in a video editing tool used to hold, arrange, and edit various types of media.

[0095] In the embodiments of this specification, the hierarchical relationship between the material tracks can be determined based on the pre-designed rendering order of each material track. Specifically, the rendering time is negatively correlated with the hierarchy; that is, tracks rendered earlier have a lower hierarchy, and tracks rendered later have a higher hierarchy. This setting ensures that higher-level materials are not obscured by lower-level materials. For example, subtitles and effects rendered later will not be obscured by video footage rendered earlier, thus conforming to visual presentation logic. After clarifying the hierarchical relationship between the material tracks, a corresponding array index is set for each material track. The hierarchy is positively correlated with the array index; that is, the higher the hierarchy of the track, the earlier its corresponding array index; and the lower the hierarchy of the track, the later its corresponding array index. Then, based on the correspondence between the material tracks and the array index, each material track is filled into the corresponding area of ​​the array index to complete the orderly arrangement of the material tracks within the track array.

[0096] In the embodiments described in this specification, a track array is used as a container for the media tracks, and the JSON format specification includes a corresponding container management standard. This standard can directly regulate the classification rules, sorting logic, and calling priority of different types of media tracks in video editing tools. Therefore, it is not necessary to add the rendering order information of each media track separately in the JSON specification, thereby reducing the amount of data in the JSON format specification.

[0097] The JSON format specification has version number management rules. The system can quickly identify the update details of the specification by the version number, such as the update type and the scope of compatibility. This enables dynamic compatibility with the content of the old version specification, so that the old version's related editing logic or data does not need to be completely discarded due to the specification update, thus ensuring the continuity of use between the old and new versions.

[0098] Optionally, the version number information of the editing specification includes at least a major version number, a minor version number, and a revision number. The method may further include: obtaining updated data after updating the editing specification; if the updated data reflects the addition or change of incompatible functions for the editing specification, then updating the major version number; if the updated data reflects the addition or change of compatible functions for the editing specification, then updating the minor version number; if the updated data reflects error correction for existing functions of the editing specification, then updating the revision number.

[0099] In this specification, the major version number can be understood as marking a major iteration of the specification, reflecting fundamental changes in the core logic or functionality of the specification. It can be considered a relatively influential level among version numbers, such as "1" in V1.2.3. The minor version number can be understood as marking a compatibility iteration of the specification, reflecting the addition or adjustment of functionality without breaking the original logic. Its influence is lower than the major version number, such as "2" in V1.2.3. The revision number can be understood as marking detailed optimizations of the specification, indicating corrections to errors, vulnerabilities, or minor issues in existing functionality, generally not involving new functionality or logical adjustments. For example, "3" in V1.2.3.

[0100] In the embodiments of this specification, if the updated data indicates that the specification update involves incompatible new or changed features, such as new rules conflicting with the core logic of the old specification or the removal of key functional modules from the old version, the major version number can be updated, for example, from V1.2.3 to V2.2.3. This update indicates that the old and new versions of the specification are incompatible, and video editing tools that rely on the old version need to be specifically adjusted to adapt. If the updated data indicates that the specification update involves compatible new or changed features, such as adding a new material track type specification based on the existing logic or adjusting the sorting rules for a certain type of track, the minor version number can be updated, for example, from V1.2.3 to V1.3.3. This update indicates backward compatibility, meaning that the addition of new specification features will not affect the normal use of older projects. If the updated data indicates that the specification update is an error correction for existing features, such as fixing an incorrect formula for calculating a certain type of track level or correcting a minor flaw in the matching of material tracks and containment areas, without adding or removing any features, the revision number can be updated, for example, from V1.2.3 to V1.2.4. This type of update indicates that detailed optimizations have been made to the specification, with the aim of improving the accuracy of the specification without changing its functional scope and compatibility.

[0101] In the embodiments of this specification, based on the above version number update rules, by checking the major version number, one can know that a major update that is incompatible with the specification has been made; by checking the minor version number, one can know that a functional upgrade that is compatible with the specification has been made. By checking the revision number, one can identify minor, non-impact corrections made to the specification. This allows for clear management of specification versions, reducing compatibility issues with video editing tools caused by version confusion. It also enables dynamic compatibility of the system with older specification versions, meaning that older editing logic or data doesn't need to be completely discarded with specification updates, ensuring consistency between new and old versions during use.

[0102] Optionally, the editing specification includes multiple rule units for describing specific editing rules; each rule unit is represented in the format of field information; the method may further include: if a new editing rule is added to the editing specification, the new editing rule is nested in the target rule unit related to the new editing rule in the format of field information.

[0103] In the embodiments of this specification, the JSON format specification is not a single, unified rule, but a specification composed of multiple rule units. Each rule unit can be used to describe the editing rules for a specific application scenario, such as the hierarchical sorting rules for video tracks, the format compatibility rules for audio tracks, and the display position rules for subtitle tracks.

[0104] In the embodiments described in this specification, rule units can be represented using a field information format, i.e., a structured form of key-value pairs in JSON. Using this field-based format allows the content of rule units to be directly parsed by the system and also ensures a consistent structure across different rule units.

[0105] In the embodiments of this specification, when it is necessary to add new editing rules to the editing specifications, such as adding a special rendering rule for 4K video tracks based on the existing video track rule unit, the new editing rule can first be converted into a unified field information format to maintain consistency with the format of the existing rule unit; then, the target rule unit related to the new rule is found, where "related" here reflects that the target rule unit is an existing rule unit in the rule type to which the new rule belongs. The rule type can include rule types such as rules defining canvas information, rules defining material information, rules defining video timeline, rules defining video export settings, and rules defining material track information in the video; then, the field information of the new rule is nested into the target rule unit, that is, a sub-field is added to the structure of the original rule unit to carry the content of the new rule. For example, in the video track rule unit, a nested field 4k_render_logic: prioritize GPU resource allocation is added.

[0106] In the embodiments described in this specification, the newly added rule units are nested into the relevant original rule units in the form of field information, without the need to reconstruct or split the overall structure of the editing specification, thereby effectively avoiding damage to the structure and integrity of the specification.

[0107] The JSON format specification can be pre-built on the server side, rather than stored locally on the video editing tool. This eliminates the need for the video editing tool to save the complete specification file locally, thereby reducing the size of the installation package and the amount of data it consumes at runtime, thus making the video editing tool lightweight.

[0108] Optionally, after launching the video editing tool in the web browser, the process may further include: sending a request to the server to obtain the editing specifications; receiving the editing specifications returned by the server in response to the request; parsing the editing specifications to obtain the rule parameter data required by the video editing tool to edit the video project; and initializing the video editing tool based on the rule parameter data.

[0109] In the embodiments of this specification, after the video editing tool is started, the system running the video editing tool can actively send a request to the server to obtain the editing specifications. The request may include information such as the video editing tool identifier and the version number of the required specifications, so as to ensure that the editing specifications returned by the server can accurately adapt to the usage requirements of the video editing tool.

[0110] After receiving the request, the server can find the corresponding editing specifications based on the version requirement information in the request and return them as response data to the video editing tool. The editing specifications returned by the server are complete JSON format files, which video editing tools usually cannot use directly. They need to be parsed first to convert the structured specification file into rule parameter data that the tool can directly call at runtime. For example, the correspondence between the containment area and the index, and the positive correlation rules between the track level and the index are extracted from the track array rule units. The slot identifiers corresponding to the video, audio, and subtitle tracks are extracted from the material type matching rules to obtain a set of clear and usable parameter data. After the video editing tool obtains the parsed rule parameter data, it will use these parameters to complete its own initialization process, that is, configure the core logic and functional modules required for video editing according to the editing specifications.

[0111] In the embodiments of this specification, by separating the video editing tools from the editing specifications, the amount of data in the video editing tools themselves can be simplified.

[0112] The various technical features in the above embodiments can be combined arbitrarily, as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they have not been described one by one. Therefore, the arbitrary combination of various technical features in the above embodiments is also within the scope of this specification.

[0113] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods.

[0114] Figure 3 This specification provides an embodiment corresponding to... Figure 2 A schematic diagram of the structure of a video file generation device.

[0115] like Figure 3 As shown, the device may include: The trigger instruction acquisition module 302 is used to acquire trigger instructions for rendering a video editing template written in JSON format; the video editing template contains a first type of code and a second type of code, the first type of code is used for reuse, and the second type of code is used for editing; the second type of code includes a slot area that allows users to replace materials; the slot area has code related to the initial material information before it is edited.

[0116] The video editing template rendering module 304 is used to render the video editing template based on the trigger command, so as to show the rendering effect of the video editing template to the user.

[0117] The editing operation acquisition module 306 is used to acquire the editing operations input by the user for the video editing template.

[0118] The editing instruction generation module 308 is used to generate editing instructions based on the editing operation. The editing instructions include at least the code that replaces the code in the slot area to obtain the edited second type of code.

[0119] The video editing code generation module 310 is used to generate video editing code based on the edited second type code and the first type code.

[0120] The video editing code execution module 312 is used to run the video editing code to obtain the edited video file.

[0121] based on Figure 3 The embodiments of this specification also provide some specific implementation schemes of the method, which are described below.

[0122] Optionally, the editing operation acquisition module 306 may specifically include: The target material information acquisition unit is used to acquire target material information for replacing the initial material information.

[0123] The editing operation acquisition unit is used to acquire the editing operation input by the user based on the target material information and performed on the video editing template.

[0124] Optionally, the editing instruction generation module 308 may specifically include: The target code information conversion unit is used to convert the target material information into target code information in JSON format.

[0125] An editing instruction generation unit is used to generate editing instructions for the video editing template based on the target code information.

[0126] A code replacement unit is used to replace the code in the slot area of ​​the second type of code in response to the editing instruction, thereby obtaining the edited second type of code.

[0127] Optionally, the slot identifier in the slot area includes at least one of video type identifier, image type identifier, audio type identifier, text type identifier, and graphic type identifier.

[0128] Optionally, the code replacement unit may specifically include: The type information determination subunit is used to determine the type information of the target material information.

[0129] The slot identifier query subunit is used to query the target slot identifier corresponding to the type information.

[0130] The grooving subunit is used to perform grooving processing on the target slot area corresponding to the target slot identifier to obtain the target empty slot area.

[0131] The code filling subunit is used to fill the target code information into the target empty slot area to obtain the edited second type of code.

[0132] Optionally, the target material information is material from a material library, and the target material information acquisition unit may specifically include: The media library loading subunit is used to load the media library in response to a user's trigger operation on a preset control in the video editing template.

[0133] The material display sub-unit is used to display various materials in the material library.

[0134] The material information acquisition subunit is used to acquire the target material information in response to the user's selection operation of the target material among the various materials.

[0135] Optionally, the device may further include: The address information acquisition module is used to acquire the URL address information for launching the video editing tool containing the video editing template. The video editing tool uses a JSON format specification when editing video projects.

[0136] The editing tool launch module is used to launch the video editing tool in a web browser based on the URL address information.

[0137] Optionally, the editing specifications include specification information for the track array; the track array includes multiple accommodating areas for accommodating media tracks, each accommodating area corresponding to an array index, and the media tracks include at least one of video tracks, audio tracks, subtitle tracks, and effects tracks; the device may further include: The hierarchy determination module is used to determine the hierarchy between the various material tracks based on their rendering order.

[0138] The index setting module is used to set the array index corresponding to each of the material tracks according to the hierarchical relationship, wherein the index value of each array index is positively correlated with the hierarchy of each of the material tracks.

[0139] The material track filling module is used to fill any one of the material tracks into the target accommodating area indicated by the determined target array index, based on the determined target array index.

[0140] Optionally, the version number information of the editing specification includes at least a major version number, a minor version number, and a revision number, and the device may further include: The update data acquisition module is used to acquire the updated data after updating according to the editing specifications.

[0141] The main version number update module is used to update the main version number if the updated data reflects the addition or change of functions that are incompatible with the editing specifications.

[0142] The minor version number update module is used to update the minor version number if the updated data reflects the addition or change of functions that are compatible with the editing specifications.

[0143] The revision number update module is used to update the revision number if the updated data reflects an error correction for the existing functions of the editing specification.

[0144] Optionally, the editing specifications include multiple rule units for describing specific editing rules; each rule unit is represented in the format of field information; the device further includes: The field information nesting module is used to nest the new editing rule in the format of field information into the target rule unit related to the new editing rule if a new editing rule is added for the editing specification.

[0145] Optionally, the device may further include: The request sending module is used to send a request to the server to obtain the editing specifications.

[0146] The editing specification receiving module is used to receive the editing specification returned by the server in response to the acquisition request.

[0147] The editing specification parsing module is used to parse the editing specifications to obtain the rule parameter data required by the video editing tool to edit the video project.

[0148] The editing tool initialization module is used to initialize the video editing tool based on the rule parameter data.

[0149] It is understood that the modules mentioned above refer to computer programs or program segments used to perform one or more specific functions. Furthermore, the distinction between these modules does not imply that the actual program code must also be separate.

[0150] For ease of description, the above devices are described by dividing them into various modules or units based on their functions. Of course, when implementing one or more of these specifications, the functions of each module or unit can be implemented in the same or different software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0151] The above is an illustrative scheme of a video file generation apparatus according to this embodiment. It should be noted that the technical solution of this video file generation apparatus and the technical solution of the video file generation method described above belong to the same concept. For details not described in detail in the technical solution of the video file generation apparatus, please refer to the description of the technical solution of the video file generation method described above.

[0152] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.

[0153] Figure 4 This is a structural block diagram of a computing device provided in one embodiment of this specification.

[0154] The computing device 400 includes: Memory 410 and processor 420; The memory 410 is used to store computer programs or instructions, and the processor 420 is used to execute the computer programs or instructions, which, when executed by the processor 420, implement the steps of the video file generation method.

[0155] Specifically, the components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.

[0156] The computing device 400 also includes an access device 440, which enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 440 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0157] In one embodiment of this specification, the above-described components of the computing device 400 and Figure 4 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 4 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.

[0158] The computing device 400 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 400 can also be a mobile or stationary server.

[0159] The processor 420 executes the computer instructions to implement the steps of the video file generation method.

[0160] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the video file generation method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the video file generation method described above.

[0161] An embodiment of this specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the video file generation method described above.

[0162] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the video file generation method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the video file generation method described above.

[0163] An embodiment of this specification also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the video file generation method described above.

[0164] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the video file generation method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the video file generation method described above.

[0165] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the embodiments of apparatus, devices, and systems, since they are basically similar to the method embodiments, the descriptions are relatively simple, and relevant parts can be referred to the descriptions of the method embodiments. The apparatus, devices, systems, and methods provided in the embodiments of this specification correspond to each other; therefore, the apparatus, devices, and systems also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, devices, and systems will not be repeated here.

[0166] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0167] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0168] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0169] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0170] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0171] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, the invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0172] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0173] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0174] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0175] In a typical configuration, a computing device includes one or more processors (CPU), input or output interfaces, network interfaces, and memory.

[0176] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0177] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital character versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0178] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0179] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for generating a video file, comprising: Obtain the trigger command for rendering a video editing template written in JSON format; The video editing template includes a first type of code and a second type of code. The first type of code is for reuse, and the second type of code is for editing. The second type of code includes a slot area that allows users to replace materials. The slot area has code related to the initial material information before it is edited. Based on the trigger command, the video editing template is rendered to show the user the rendering effect of the video editing template; Obtain the editing operations input by the user for the video editing template; Based on the editing operation, an editing instruction is generated, which includes at least the code to replace the code in the slot area, resulting in the edited second type of code; Based on the edited second type code and the first type code, video editing code is generated; Running the video editing code will produce the edited video file.

2. The method according to claim 1, wherein obtaining the user input of the editing operation for the video editing template specifically includes: Obtain the target material information used to replace the initial material information; Editing operations based on the target material information obtained from the user are performed on the video editing template.

3. The method according to claim 2, wherein generating editing instructions based on the editing operation, the editing instructions at least include code to replace the code in the slot area to obtain the edited second type of code, specifically including: Convert the target material information into target code information in JSON format; Based on the target code information, edit instructions are generated for the video editing template; In response to the editing instruction, the code in the slot area of ​​the second type of code is replaced with the target code information to obtain the edited second type of code.

4. The method according to claim 3, wherein the slot identifier of the slot area includes at least one of video type identifier, image type identifier, audio type identifier, text type identifier, and graphic type identifier; The step of replacing the code in the slot area of ​​the second type of code with the target code information to obtain the edited second type of code includes: Determine the type information of the target material; Query the target slot identifier corresponding to the type information; A slotting process is performed on the target slot area corresponding to the target slot identifier to obtain a target empty slot area; The target code information is filled into the target empty slot area to obtain the edited second type of code.

5. The method according to claim 2, wherein the target material information is material in a material library, and the step of obtaining the target material information for replacing the initial material information specifically includes: In response to a user's triggering action on a preset control in the video editing template, the media library is loaded; Display the various materials in the aforementioned material library; In response to the user's selection of a target material among the various materials, the target material information is obtained.

6. The method according to claim 1, further comprising, before obtaining the trigger instruction for rendering a video editing template written in JSON format code: Obtain the URL address information for launching the video editing tool containing the video editing template, wherein the video editing tool uses a JSON format specification when editing video projects; Based on the URL address information, launch the video editing tool in the web browser.

7. The method according to claim 6, wherein the editing specifications include specification information for the track array; the track array includes multiple accommodating areas for accommodating material tracks, each accommodating area corresponding to an array index, and the material tracks include at least one of video tracks, audio tracks, subtitle tracks, and special effects tracks; the method further includes: The hierarchical relationship between the various material tracks is determined based on their rendering order. Based on the hierarchical relationship, an array index is set for each of the material tracks, and the index value of each array index is positively correlated with the hierarchy of each material track; For any of the aforementioned material tracks, according to the determined target array index, the material track is filled into the target containment area indicated by the target array index.

8. The method according to claim 6, wherein the version number information of the editing specification includes at least a major version number, a minor version number, and a revision number, and the method further includes: Obtain the updated data after updating according to the editing specifications; If the updated data reflects incompatible feature additions or changes made to the editing specifications, then the major version number is updated; If the updated data reflects new or changed features that are compatible with the editing specifications, then the minor version number is updated; If the updated data reflects error corrections for existing functionality in the editing specifications, then the revision number is updated.

9. The method according to claim 6, wherein the editing specification includes multiple rule units for describing specific editing rules; each rule unit is represented in the format of field information; the method further includes: If a new editing rule is added to the editing specification, the new editing rule is nested into the target rule unit related to the new editing rule in the format of field information.

10. The method according to claim 6, further comprising, after launching the video editing tool in a web browser: Send a request to the server to obtain the editing specifications; The server responds to the editing specifications returned in response to the retrieval request; The editing specifications are analyzed to obtain the rule parameter data required by the video editing tool to edit the video project; The video editing tool is initialized based on the rule parameter data.

11. A video file generation apparatus, comprising: The trigger command acquisition module is used to acquire trigger commands for rendering video editing templates written in JSON format. The video editing template includes a first type of code and a second type of code. The first type of code is for reuse, and the second type of code is for editing. The second type of code includes a slot area that allows users to replace materials. The slot area has code related to the initial material information before it is edited. The video editing template rendering module is used to render the video editing template based on the trigger command, so as to show the rendering effect of the video editing template to the user; The editing operation acquisition module is used to acquire the editing operations input by the user for the video editing template; An editing instruction generation module is used to generate editing instructions based on the editing operation. The editing instructions include at least code that replaces the code in the slot area to obtain the edited second type of code. The video editing code generation module is used to generate video editing code based on the edited second type code and the first type code; The video editing code execution module is used to run the video editing code to obtain the edited video file.

12. A computing device, comprising: Memory and processor; The memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions, wherein when the computer programs or instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 10.

13. A computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program or instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.