Short video template loading method and system
By storing the material list in the ZIPExtra Field of the short video template resource package and using streaming download and decompression technology, the problem of excessively long loading time of the template resource package is solved, thereby improving loading speed and user experience.
Patent Information
- Application Number
- CN202311188922.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-14
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-09-14
AI Technical Summary
The current short video template resource package file is too large, resulting in excessively long download times and affecting user experience.
By storing the material list information in the ZIPExtra Field of the template resource package compressed file and using streaming download decompression technology to parse the material list in advance, parallel download of material resources can be achieved.
This significantly reduces the loading time of template resource packages and improves the user's template experience.
Smart Images

Figure CN117240845B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data loading technology, and in particular to a method, system, electronic device, and computer-readable storage medium for loading short video templates. Background Technology
[0002] Short videos, also known as short films, are a form of internet content dissemination, generally referring to videos with a duration of 5 minutes or less that are shared on new media platforms. With the widespread adoption of mobile devices and faster network speeds, short videos, as a quick, fast, and high-traffic content format, have gradually gained favor with major platforms and users, experiencing rapid development.
[0003] Short video templates are pre-designed style files commonly used in short video editing to quickly generate high-quality video content. They typically include preset video, image, music, effects, transitions, stickers, fonts, and other materials. Users simply insert their own content, such as images, video clips, and text, into the template to quickly create professional-looking short videos. Current short video templates are becoming increasingly feature-rich; however, this has also led to larger and larger template resource packages, resulting in longer download times and negatively impacting user experience. Summary of the Invention
[0004] The main purpose of this application is to propose a method, system, electronic device, and computer-readable storage medium for loading short video templates, aiming to solve the problem of how to improve the loading speed of short video template resource packages.
[0005] To achieve the above objectives, embodiments of this application provide a short video template loading method, the method comprising:
[0006] Start downloading the template resource package compressed file based on user instructions and receive download data blocks;
[0007] Obtain the material list from the specified location of the downloaded data block;
[0008] Download the corresponding material resources in parallel according to the material list;
[0009] After both the material resources and the template resource package compressed file are downloaded and decompressed, they are merged into a complete template resource folder.
[0010] Optionally, obtaining the material list from the specified location of the downloaded data block includes:
[0011] Assemble and traverse the downloaded data blocks, matching the specified file header;
[0012] Detect additional fields from the specified file header;
[0013] Retrieve the material list information from the additional fields.
[0014] Optionally, the matching of specified file headers includes:
[0015] Match the first file header of the compressed template resource package.
[0016] Optionally, the list of materials is written into the additional field of the first file header when the template resource package compressed file is generated.
[0017] Optionally, the step of starting the download of the template resource package compressed file based on user instructions includes:
[0018] The template resource package compressed file is downloaded using streaming download and decompression technology.
[0019] Optionally, the material list may be a list of material identifiers or a list of material download addresses corresponding to the compressed file of the template resource package.
[0020] Optionally, the template resource package compressed file is a ZIP file.
[0021] Furthermore, to achieve the above objectives, embodiments of this application also provide a short video template loading system, the system comprising:
[0022] The receiving module is used to start downloading the template resource package compressed file based on user instructions and to receive the downloaded data blocks;
[0023] The acquisition module is used to acquire a list of materials from a specified location in the downloaded data block;
[0024] The download module is used to download the corresponding material resources in parallel according to the material list;
[0025] The merging module is used to merge the material resources and the template resource package compressed files into a complete template resource folder after both have been downloaded and decompressed.
[0026] To achieve the above objectives, this application also provides an electronic device, which includes: a memory, a processor, and a short video template loading program stored in the memory and executable on the processor. When the short video template loading program is executed by the processor, it implements the short video template loading method as described above.
[0027] To achieve the above objectives, embodiments of this application also provide a computer-readable storage medium storing a short video template loading program, which, when executed by a processor, implements the short video template loading method as described above.
[0028] The short video template loading method, system, electronic device, and computer-readable storage medium proposed in this application can write all material list information dependent on the short video template into an extra field of the first file header of the compressed file. During the download of the short video template resource package compressed file using streaming download decompression technology, the material list information in the extra field of the first file header is parsed in advance, and the material resources are downloaded in parallel, thereby accelerating the loading of the entire template resource package, greatly shortening the loading time of the template resource package, and improving the user's template usage experience. Attached Figure Description
[0029] Figure 1 An application environment architecture diagram for implementing various embodiments of this application;
[0030] Figure 2 This is a flowchart of a short video template loading method proposed in the first embodiment of this application;
[0031] Figure 3 This is a schematic diagram of the structure of a compressed file of a short video template resource package according to this application;
[0032] Figure 4 for Figure 2 A detailed flowchart of step S202;
[0033] Figure 5 This is a schematic diagram of the data structure of a Local File Header in this application;
[0034] Figure 6 This is a flowchart of a specific embodiment of this application;
[0035] Figure 7 This is a schematic diagram of the hardware architecture of an electronic device according to the second embodiment of this application;
[0036] Figure 8 This is a schematic diagram of a short video template loading system proposed in the third embodiment of this application. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0038] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0039] The following provides an explanation of the terms used in this application:
[0040] ZIP files: A common archive format used to combine multiple files and directories into a single compressed archive. It employs the DEFLATE compression algorithm to reduce file size and save storage space. DEFLATE is a lossless data compression algorithm that uses both the LZ77 algorithm and Huffman coding. ZIP files can contain file metadata, such as filenames, timestamps, and permissions, while maintaining the original directory structure. Users can use various compression software to create and decompress ZIP files, facilitating the sharing and transfer of multiple files while preserving the integrity of the file content and structure.
[0041] Streaming download decompression: A method of decompressing files while they are being downloaded. In traditional downloads, files must be downloaded completely before decompression, but streaming download decompression allows these two operations to occur simultaneously. Files are downloaded in chunks, and each chunk is decompressed immediately after download, gradually providing usable data. This technology speeds up the download process, reduces waiting time, and is suitable for large files and slow network connections.
[0042] ZIP compression / decompression: A commonly used file compression and decompression method that defines how to organize multiple files or data blocks together to form a complete file.
[0043] Short video template resource packs: Short video templates are used to quickly generate high-quality video content in short video editing. They typically include preset videos, images, music, effects, transitions, stickers, fonts, and other materials. In practical applications, short video templates are produced by creators. The templates include some local material resources from the creator (such as uploaded videos and images), as well as a large number of referenced material library resources (such as effects and fonts). Therefore, the template resource pack ZIP includes the source files of the videos and images, as well as the template data file (which records the ID information of the referenced materials). When using the template resource pack, users need to first download the template resource pack ZIP file, then unzip the template data file within the ZIP file, and then find all the referenced material IDs (identifiers). Only after downloading all the required files can the short video template be used normally.
[0044] The ZIP Extra Field is a data structure used to store additional information. It's optional and adds extra metadata to a ZIP file to extend its functionality or provide specific information. Each ZIP archive can contain an Extra Field in both its Local File Header and Central Directory. This allows each archive to have its own extra field to store additional information related to that file.
[0045] The current trend of short video templates is becoming increasingly rich in effects, resulting in larger and larger template resource packages. It is common for ZIP resource packages to exceed 20MB in size, which causes users to wait too long to download templates and affects the user experience.
[0046] By analyzing the structure of short video template resource packages, it was found that the material resources can be divided into two categories: one type is compressed into ZIP files as source files, which can be used immediately after the template is downloaded and decompressed; the other type is stored in the form of material IDs in the template data file, which needs to be decompressed, the material IDs parsed, and downloaded sequentially before it can be used. For material resources in the form of material IDs, if they can be parsed and downloaded in advance during the ZIP download process, the loading time of the entire template resource package can be greatly reduced. Therefore, this application proposes a new short video template loading scheme, which uses ZIPExtra Field to store all material ID information that the short video template depends on, and uses streaming download and decompression technology to read all material ID information in advance and download material resources in parallel, thereby accelerating the loading of the entire template resource package.
[0047] The technical solution will be described in detail below through various embodiments.
[0048] Please see Figure 1 , Figure 1 This is an application environment architecture diagram for implementing various embodiments of this application. This application can be applied to application environments including, but not limited to, client 2, server 4, and network 6.
[0049] The client 2 is used to display the current application interface to the user and receive operations such as downloading short video templates from the user, and downloads the corresponding short video template resource package compressed file from the server 4. The client 2 can be a terminal device such as a PC (Personal Computer), mobile phone, tablet computer, portable computer, wearable device, etc.
[0050] The server 4 is used to provide data and technical support to the client 2, such as providing compressed files of short video template resource packages. The server 4 can be a rack server, blade server, tower server, or cabinet server, etc., and can be a standalone server or a server cluster composed of multiple servers.
[0051] In this embodiment, when generating the compressed file of the short video template resource package, a corresponding material list is written at a specified location, so that when the client 2 downloads the compressed file of the short video template resource package, it can download the required materials in advance according to the material list, thereby improving the loading speed.
[0052] The network 6 can be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks. The server 4 and one or more clients 2 communicate via the network 6 to perform data transmission and interaction.
[0053] Example 1
[0054] like Figure 2 The diagram shown is a flowchart of a short video template loading method proposed in the first embodiment of this application. It is understood that the flowchart in this method embodiment is not intended to limit the order of execution steps. Depending on the needs, some steps in the flowchart can be added to or removed. The method will now be described using the client as the execution subject.
[0055] The method includes the following steps:
[0056] S200: Based on user instructions, start downloading the template resource package compressed file and receive the downloaded data blocks.
[0057] When users need to create short videos using short video templates, they can download the corresponding templates within the client application. Based on user instructions, the client begins downloading the compressed resource package file of the short video template from the server. Since the download process is a streaming download and decompression, it doesn't require waiting for the entire file to be downloaded before decompression. Instead, the compressed resource package file is downloaded in chunks, with each data chunk (or data packet) being decompressed immediately after download, gradually providing usable data. Once the client starts downloading the compressed resource package file, it can receive and decompress the downloaded data chunks in succession.
[0058] S202, Obtain the material list from the specified location of the downloaded data block.
[0059] In this embodiment, the short video template resource package compressed file is a ZIP file. The corresponding material list is written to a specified location during the generation of the short video template resource package compressed file. This specified location can be an extra field (ExtraField) in the specified file header (Local File Header) of the short video template resource package compressed file. The specified file header can be the first file header (LocalFile Header 1) of the short video template resource package compressed file.
[0060] See Figure 3 The image shown is a schematic diagram of the structure of a compressed file for a short video template resource package. Among them, Figure 3 The left side shows a schematic diagram of the compressed file of the short video template resource package in the traditional solution. Generally, the short video template resource folder may contain two types of material resources: one is in the form of source files, such as video material source files, image material source files, etc.; the other is stored in the template data file in the form of material identifiers (IDs).
[0061] The specific process of compressing the short video template resource folder into a ZIP file is as follows:
[0062] (1) Compress each file into a single file data block (File Data).
[0063] (2) Add a file header (Local FileHeader) before the data block and a descriptor (DataDescriptor) after the data block.
[0064] (3) After all files are compressed, all single file data blocks are combined into a larger data block, and a central directory index is added at the end.
[0065] Figure 3 The image on the right is a schematic diagram of the compressed short video template resource package generated according to an embodiment of this application. In this embodiment, material list information is added to the extra field of the first file header (Local File Header 1) of the compressed short video template resource package.
[0066] In one alternative embodiment, the material list is a material ID list. Based on the material ID list, the download address (URL) of each material can be queried through the data interface provided by the business party, thereby downloading the corresponding material resources.
[0067] In another alternative embodiment, the list of materials can also be a list of material download addresses. It is worth noting that, since the amount of data that the additional field can hold is limited, if the download address is too long, it may not be able to be completely written into the additional field. In this case, the download address of each material can be converted from a long address to a short address before being written into the additional field. When downloading material resources subsequently, the download can be redirected to the corresponding long address based on the short address before downloading. The conversion of long addresses to short addresses can use any feasible existing address conversion method, and no restrictions are placed here.
[0068] The decompression process of the short video template resource package compressed file specifically includes:
[0069] (1) Locate the CentralDirectory data at the end of the ZIP file.
[0070] (2) Locate the FileHeader data in CentralDirectory and read the offset of the first file header LocalFileHeader 1.
[0071] (3) Read LocalFileHeader1 data using the offset.
[0072] (4) Decompress the first file data block (FileData1).
[0073] (5) Read the descriptor (DataDescriptor1) of the first file data block.
[0074] (6) Use the cyclic redundancy check code (CRC-32) stored in LocalFileHeader1 to verify the data integrity of FileData1.
[0075] Further reading Figure 4 The diagram shown is a detailed flowchart of step S202 described above. It is understood that this flowchart is not intended to limit the order of execution steps. Steps in this flowchart can be added to or removed as needed. In this embodiment, step S202 specifically includes:
[0076] S2020: Assemble and traverse the downloaded data blocks, matching the specified file header.
[0077] Once the client begins streaming and decompressing the template resource package compressed file, it will receive download data blocks sequentially, which it will then decompress and assemble. The assembled data blocks are then iterated through to determine if a specified file header can be matched. In this embodiment, the specified file header refers to the first file header of the template resource package compressed file. Because the template resource package compressed file is downloaded to the client sequentially during the streaming download and decompression process, the client will receive the data related to the first file first. That is, the first file header can be matched in the early stages of downloading the template resource package compressed file.
[0078] In this embodiment, the template resource package compressed file is a ZIP file, and the file header is the Local File Header in the ZIP file. Since the signature of the Local File Header is a fixed value, such as 0x04034b50, when traversing the downloaded data blocks, when the corresponding data signature is read, it indicates that the following data is the Local File Header part, thus achieving matching of the specified file header.
[0079] S2022, Detect additional fields from the specified file header.
[0080] See Figure 5 The diagram shows a data structure diagram of a Local File Header. When Signature = 0x04034b50 is read, thus matching the specified file header, it is processed according to... Figure 5 By parsing the data structure, the extra field can be detected.
[0081] S2024, Obtain the material list information from the additional fields.
[0082] Since the corresponding material list information was written into the extra field when the template resource package compressed file was generated, the material list information can be obtained from it after the extra field is detected.
[0083] Back Figure 2 S204, Download the corresponding material resources in parallel according to the material list.
[0084] In one optional embodiment, if the material list is a material ID list, then firstly, based on the material ID list, the download address of each material is queried through the data interface provided by the business party, and then the corresponding material resources are downloaded in parallel from the download address of each material.
[0085] In another alternative embodiment, if the material list is a list of material download addresses, then the download address of each material is read directly from it, and then the corresponding material resources are downloaded in parallel from the download address of each material.
[0086] S206, After the material resources and the template resource package compressed file are downloaded and decompressed, they are merged into a complete template resource folder.
[0087] The template resource package compressed file, i.e., the ZIP file, is downloaded and then extracted into a folder. After all the aforementioned material resources have been downloaded, they are merged with the extracted ZIP file folder to form a complete template resource folder. At this point, the short video template resource package is fully loaded.
[0088] Compared to traditional solutions, the short video template loading method proposed in this embodiment can utilize the ZIPExtra Field to store the list of all materials that the short video template depends on. During the download of the compressed file of the short video template resource package using streaming download and decompression technology, the material list information in the ExtraField of the first Local FileHeader is parsed in advance, and the material resources are downloaded in parallel, thereby speeding up the loading of the entire template resource package, greatly reducing the loading time of the template resource package, and improving the user's template usage experience.
[0089] To explain the steps of the method in more detail, specific embodiments are described below. Those skilled in the art will understand that the content of the following specific embodiments is not intended to limit the inventive concept of the present invention, and they can easily make appropriate extensions and expansions based on the specific descriptions of the following embodiments. See also... Figure 6 The diagram shown is a flowchart of a short video template loading method proposed in the specific embodiment. Figure 6 In this method, the method includes:
[0090] (1) Start downloading the template resource package ZIP file.
[0091] (2) The client receives a data packet and a callback occurs.
[0092] (3) Assemble the downloaded data and iterate through the data to match LocalFileHeader.
[0093] (4) If the first LocalFileHeader is matched, check the ExtraField in that LocalFileHeader.
[0094] (5) If the list of material IDs written when generating the template resource package ZIP file is detected in ExtraField, then all material resources will be downloaded in parallel.
[0095] (6) After the ZIP file is downloaded, extract it into a folder.
[0096] (7) After all the material resources have been downloaded, merge them with the ZIP unzipped folder to form a complete template resource folder.
[0097] (8) The template resource package has now been loaded.
[0098] Example 2
[0099] like Figure 7 The diagram shown illustrates the hardware architecture of an electronic device 20 according to a first embodiment of this application. In this embodiment, the electronic device 20 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23, which are interconnected via a system bus. It should be noted that... Figure 7 Only the electronic device 20 with components 21-23 is shown; however, it should be understood that implementation of all shown components is not required, and more or fewer components may be implemented alternatively. In this embodiment, the electronic device 20 may be the client.
[0100] The memory 21 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 21 may be an internal storage unit of the electronic device 20, such as the hard disk or memory of the electronic device 20. In other embodiments, the memory 21 may also be an external storage device of the electronic device 20, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 20. Of course, the memory 21 may include both the internal storage unit and the external storage device of the electronic device 20. In this embodiment, the memory 21 is typically used to store the operating system and various application software installed on the electronic device 20, such as the program code of the short video template loading system 60. In addition, the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
[0101] In some embodiments, the processor 22 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 22 is typically used to control the overall operation of the electronic device 20. In this embodiment, the processor 22 is used to run program code stored in the memory 21 or process data, such as running the short video template loading system 60.
[0102] The network interface 23 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 20 and other electronic devices.
[0103] Example 3
[0104] like Figure 8 The diagram shown is a modular schematic of a short video template loading system 60 according to a third embodiment of this application. The short video template loading system 60 can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiments of this application. The program modules referred to in the embodiments of this application are a series of computer program instruction segments capable of performing specific functions. The following description will specifically introduce the functions of each program module in this embodiment.
[0105] In this embodiment, the short video template loading system 60 includes:
[0106] The receiving module 600 is used to start downloading the template resource package compressed file based on user instructions and to receive the downloaded data blocks.
[0107] When a user needs to create a short video using a short video template, they can download the corresponding template from the client. The receiving module 600, based on the user's instruction, begins downloading the corresponding short video template resource package compressed file from the server. Since the download process is a streaming download and decompression, it doesn't require waiting for the entire file to be downloaded before decompression. Instead, the compressed file is downloaded in chunks, with each data chunk (or data packet) decompressed immediately after download, gradually providing usable data. Once the receiving module 600 begins downloading the short video template resource package compressed file, it can receive and decompress the downloaded data chunks sequentially.
[0108] The acquisition module 602 is used to acquire a list of materials from a specified location in the downloaded data block.
[0109] In this embodiment, the short video template resource package compressed file is a ZIP file. The corresponding material list is written to a specified location during the generation of the short video template resource package compressed file. This specified location can be an extra field (ExtraField) in the specified file header (Local File Header) of the short video template resource package compressed file. The specified file header can be the first file header (LocalFile Header 1) of the short video template resource package compressed file.
[0110] In one optional embodiment, the material list is a material ID list. Based on the material ID list, the download address (URL) of each material can be queried through a data interface provided by the business party, thereby downloading the corresponding material resource. In another optional embodiment, the material list can also be a material download address list.
[0111] Specifically, the process of obtaining the material list by module 602 includes:
[0112] (1) Assemble and traverse the downloaded data blocks, matching the specified file header.
[0113] Once the template resource package compressed file begins to be downloaded and decompressed via streaming, download data blocks are received sequentially. These data blocks are then decompressed and assembled. The acquisition module 602 then iterates through the assembled data blocks to determine if a specified file header can be matched. In this embodiment, the specified file header refers to the first file header of the template resource package compressed file. Since the template resource package compressed file is downloaded to the client sequentially during the streaming download and decompression process, the receiving module 600 will first receive the data related to the first file. That is, in the early stages of downloading the template resource package compressed file, the acquisition module 602 can match the first file header.
[0114] In this embodiment, the template resource package compressed file is a ZIP file, and the file header is the Local File Header in the ZIP file. Since the signature of the Local File Header is a fixed value, such as 0x04034b50, when traversing the downloaded data blocks, when the corresponding data signature is read, it indicates that the following data is the Local File Header part, thus achieving matching of the specified file header.
[0115] (2) Detect additional fields from the specified file header.
[0116] Once the specified file header (Local File Header 1) is matched, the extra field (ExtraField) can be detected by parsing according to the data structure of the Local File Header.
[0117] (3) Obtain the material list information from the additional fields.
[0118] Since the corresponding material list information was written into the extra field when the template resource package compressed file was generated, the material list information can be obtained from it after the extra field is detected.
[0119] Download module 604 is used to download corresponding material resources in parallel according to the material list.
[0120] In one optional embodiment, if the material list is a material ID list, the download module 604 first queries the download address of each material through the data interface provided by the business party based on the material ID list, and then downloads the corresponding material resources from the download address of each material in parallel.
[0121] In another alternative embodiment, if the material list is a list of material download addresses, the download module 604 directly reads the download address of each material from it, and then downloads the corresponding material resources from the download address of each material in parallel.
[0122] The merging module 606 is used to merge the material resources and the template resource package compressed file into a complete template resource folder after both have been downloaded and decompressed.
[0123] The template resource package compressed file, i.e., the ZIP file, is downloaded and then extracted into a folder. After all the aforementioned material resources have been downloaded, they are merged with the extracted ZIP file folder to form a complete template resource folder. At this point, the short video template resource package is fully loaded.
[0124] The short video template loading system proposed in this embodiment can utilize the ZIPExtra Field to store the list of all materials that the short video template depends on. During the download of the compressed file of the short video template resource package using streaming download and decompression technology, the material list information in the ExtraField of the first Local FileHeader is parsed in advance, and the material resources are downloaded in parallel, thereby speeding up the loading of the entire template resource package, greatly reducing the loading time of the template resource package, and improving the user's template usage experience.
[0125] Example 4
[0126] This application also provides another embodiment, namely, a computer-readable storage medium storing a short video template loading program, which can be executed by at least one processor to perform the steps of the short video template loading method described above.
[0127] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0128] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0129] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.
[0130] The above are merely preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structural or procedural transformations made using the description and drawings of the present application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present application.
Claims
1. A method for loading short video templates, characterized in that, The method includes: Start downloading the template resource package compressed file based on user instructions and receive download data blocks; Obtain the material list from the specified location of the downloaded data block; Download the corresponding material resources in parallel according to the material list; After the material resources and the template resource package compressed file are downloaded and decompressed, they are merged into a complete template resource folder; The material resources include material resources other than the template resource package compressed file; The step of obtaining the material list from the specified location of the downloaded data block includes: Assemble and traverse the downloaded data blocks, matching the specified file header; Detect additional fields from the specified file header; Retrieve the material list information from the additional fields.
2. The short video template loading method according to claim 1, characterized in that, The specified file header to be matched includes: Match the first file header of the compressed template resource package.
3. The short video template loading method according to claim 2, characterized in that, The list of materials is written into the additional field of the first file header when the template resource package compressed file is generated.
4. The short video template loading method according to claim 1, characterized in that, The process of downloading the template resource package compressed file based on user instructions includes: The template resource package compressed file is downloaded using streaming download and decompression technology.
5. The short video template loading method according to claim 1, characterized in that, The material list is a list of material identifiers or a list of material download addresses corresponding to the compressed file of the template resource package.
6. The short video template loading method according to claim 1, characterized in that, The template resource package is a ZIP file.
7. A short video template loading system, characterized in that, The system includes: The receiving module is used to start downloading the template resource package compressed file based on user instructions and to receive the downloaded data blocks; The acquisition module is used to acquire a list of materials from a specified location in the downloaded data block; The download module is used to download the corresponding material resources in parallel according to the material list; The merging module is used to merge the material resources and the template resource package compressed file into a complete template resource folder after both the material resources and the template resource package compressed file have been downloaded and decompressed. The material resources include material resources other than the template resource package compressed file; The acquisition module is also used for: Assemble and traverse the downloaded data blocks, matching the specified file header; Detect additional fields from the specified file header; Retrieve the material list information from the additional fields.
8. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a short video template loading program stored in the memory and executable on the processor, wherein the short video template loading program, when executed by the processor, implements the short video template loading method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a short video template loading program, which, when executed by a processor, implements the short video template loading method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the short video template loading method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Resource loading method and device, medium and electronic equipment
CN116527658A
