Sequence frame digital content generation method and device, equipment and computer medium
By generating metadata files to record the reference relationships of basic materials in sequence frame animation, it solves the problem of large size of traditional sequence frame animation resource packages and achieves lightweight and efficient transmission of resource packages.
Patent Information
- Application Number
- CN202411397346.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-24
AI Technical Summary
The resource package of traditional sequence frame animation is huge, occupying too much storage space and increasing the network transmission burden, which is particularly prominent in mobile platforms and bandwidth-constrained environments.
By obtaining the basic material set, a metadata file is generated to record the reference relationship between the sequence frame bits and the basic material. Based on this package, the digital content of the sequence frame is generated to avoid repeated storage of the same material.
It achieves lightweight resource packages, reduces storage space requirements and network transmission burden, and improves the transmission and loading efficiency of resource packages.
Smart Images

Figure CN119356605A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and computer-readable medium for generating digital content of sequence frames. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
[0003] In the field of digital media and game development, sequence frame animation, as a basic and widely used visual expression technique, has long played an important role in creating smooth dynamic effects.
[0004] The traditional production technology of sequential frame animation usually organizes a series of continuous pictures in a preset order to form an animation effect. These pictures are assigned fixed serial numbers and are displayed one by one in strict order during playback. The problem with this method is that when there are many frames or the frame pixels are high, the resource package will be large in size, which not only takes up too much storage space, but also increases the burden of network transmission. This problem is particularly prominent on mobile platforms and bandwidth-constrained environments.
[0005] In view of the above problems, it is necessary to provide a technical solution that can reduce the size of the resource package of the sequence frame digital content. Summary of the invention
[0006] Multiple aspects of the present application provide a method, apparatus, device and computer-readable storage medium for generating sequential frame digital content, so as to reduce the resource package size of the sequential frame digital content.
[0007] In one aspect of the present application, a method for generating digital content of a sequence frame is provided, wherein the method comprises:
[0008] Acquire a basic material set, wherein the basic material set includes a plurality of basic materials that are not repeated;
[0009] Generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frames;
[0010] The sequence frame digital content is generated by packaging the basic material set and the metadata file.
[0011] Another aspect of the present application provides a device for generating digital content of a sequence frame, wherein the device comprises:
[0012] A basic material acquisition module, used to acquire a basic material set, wherein the basic material set includes a plurality of basic materials that are not repeated;
[0013] A metadata generation module, used to generate a metadata file for recording a reference relationship between a sequence frame and the basic material according to a material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frames;
[0014] The digital content generation module is used to package and generate sequence frame digital content according to the basic material set and the metadata file.
[0015] Another aspect of the present application provides an electronic device, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the sequence frame digital content generation method as described above.
[0019] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method for generating digital content of a sequence of frames as described above.
[0020] In the solution provided in the embodiment of the present application, a basic material set is obtained, and the basic material set includes multiple basic materials that do not overlap with each other. Then, a metadata file for recording the reference relationship between a sequence frame and the basic material is generated according to the material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frames. Then, the sequence frame digital content is generated by packaging the basic material set and the metadata file. Compared with the method of storing pictures frame by frame in the prior art, the present application utilizes the reference of the metadata file to the basic material to realize the association between the frame and the material. Based on the reference relationship recorded in the metadata file, the shared reference of the basic material in different sequence frames can be realized. Since the basic material set removes duplicate content, it can avoid repeated storage of the same picture and other materials, thereby greatly reducing the amount of pictures and other materials, and then reducing the size of the final resource package, thereby realizing the lightweight resource package. This not only reduces the storage space requirements, but also improves the transmission and loading efficiency of the resource package. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0023] Figure 1 A schematic diagram of a flow chart of a method for generating digital content of a sequence frame provided in an embodiment of the present application;
[0024] Figure 2 A schematic diagram of a resource structure of a conventional sequence frame animation provided in an embodiment of the present application;
[0025] Figure 3 A schematic diagram of a resource structure of a sequence frame animation provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of another resource structure of a sequence frame animation provided in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of a resource structure of another sequential frame animation provided in an embodiment of the present application;
[0028] Figure 6 A schematic diagram of the structure of a device for generating digital content of sequence frames provided in an embodiment of the present application;
[0029] Figure 7 A schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiments of the present application;
[0030] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0033] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0034] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program 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 technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0035] In view of the problem in the prior art that the resource package is large, a large amount of storage space is required and the network transmission burden is heavy due to the generation of sequence frame digital content by making pictures frame by frame and storing the pictures in full, the embodiment of the present application provides a method, device, equipment and computer-readable storage medium for generating sequence frame digital content, which are used to reduce the size of the resource package of sequence frame digital content. The method obtains a basic material set, which includes multiple basic materials that do not repeat each other, and then generates a metadata file for recording the reference relationship between the sequence frame position and the basic material according to the material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frame positions. The basic material set and the metadata file are referenced, and then packaged to generate sequence frame digital content. Compared with the method of storing pictures frame by frame in the prior art, the present application uses the reference of the metadata file to the basic material to realize the association between the frame and the material. Based on the reference relationship recorded in the metadata file, the shared reference of the basic material in different sequence frame positions can be realized. Since the basic material set removes duplicate content, it can avoid repeated storage of the same picture and other materials, thereby greatly reducing the amount of pictures and other materials, and then reducing the size of the final resource package, realizing the lightweight of the resource package, which can not only reduce the storage space requirements, but also improve the transmission and loading efficiency of the resource package.
[0036] The following is an exemplary description of the method, device, equipment and computer-readable storage medium for generating digital content of sequence frames provided in the present application.
[0037] In actual scenarios, the execution subject of the sequence frame digital content generation method provided in the embodiment of the present application can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0038] Figure 1 The processing flow of a method for generating digital content of a sequence frame provided in an embodiment of the present application is shown, and the method at least includes the following processing steps:
[0039] Step S101: obtaining a basic material set, wherein the basic material set includes a plurality of basic materials that are not repeated.
[0040] Among them, the basic material set is a collection of basic materials used to produce sequence frame digital content. Basic materials refer to non-repetitive materials that can be reused by multiple sequence frames, which may include but are not limited to one of picture materials, text materials and special effects materials (such as masks, masks, lighting effects, etc.).
[0041] The sequence frame digital content involved in the embodiments of the present application refers to digital content composed of a series of frames arranged in sequence, each frame represents an instantaneous state or picture of the content, and its specific form may include but is not limited to sequence frame animation, animated images, videos, and other digital content that needs to display dynamic effects through continuous frames.
[0042] Taking into account that in actual applications, there are often many repeated frames in sequential frame digital content, the existence of these repeated frames leads to repeated storage of materials, which in turn causes the resource package to be too large. In this regard, the embodiment of the present application is based on the technical concept of multi-frame sharing. It is only necessary to retain one frame of material in the repeated frame to achieve smooth playback of all frames. The above-mentioned basic material set is a deduplicated material set that can ensure the complete playback of sequential frame digital content.
[0043] In specific implementation, the embodiment of the present application can provide a production tool (such as an application or an online processing platform) to generate sequence frame digital content. The above-mentioned basic materials can be prepared in advance by the user according to design requirements and uploaded to the production tool. After the production tool obtains the above-mentioned basic materials, a basic material set is formed and waits for subsequent processing.
[0044] Step S102: generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material, wherein at least one of the basic materials is referenced by a plurality of the sequence frames.
[0045] Among them, each basic material has a corresponding material identifier. The material identifier refers to an identifier used to uniquely identify the basic material, ensuring the uniqueness and traceability of each material in the entire project, facilitating management and reference. Common forms include file names, custom strings, etc.
[0046] Sequence frame refers to the position or index of each frame in the sequence frame digital content. Each sequence frame represents a picture at a specific time point, and the material used in the frame and its display parameters can be described through metadata files.
[0047] A metadata file refers to a file used to record information about each component in digital content and their relationships. In an embodiment of the present application, the metadata file is used to describe the reference relationship between each frame and the basic material, including material identification and display parameters, etc., to ensure the correct generation and playback of the content.
[0048] As described above, the embodiment of the present application utilizes the reference of the sequence frame to the basic material to realize the sharing and reuse of the basic material between different frames. Therefore, after obtaining the basic material set, it is necessary to construct a reference relationship between the sequence frame and the basic material. The embodiment of the present application chooses to use the material identifier of the basic material to perform the correspondence association between the sequence frame and the basic material. In addition, for complex sequence frame digital content, it is also necessary to add other information such as the display parameters of the basic material to the metadata file so that the generated sequence frame digital content has a more complex playback effect. This will be explained in more detail in the subsequent embodiment description.
[0049] Among them, at least one of the basic materials is referenced by multiple sequence frame positions, indicating that the same basic material can be used multiple times in different frames of the sequence frame digital content.
[0050] Step S103: Packaging and generating sequence frame digital content according to the basic material set and the metadata file.
[0051] After creating the marker file, you can package and generate sequence frame digital content based on the basic material set and metadata file, thereby ensuring that all materials and their usage information are integrated into a complete digital content package.
[0052] The above-mentioned sequence frame digital content generation method provided in the embodiment of the present application obtains a basic material set, which includes multiple basic materials that do not overlap with each other, and then generates a metadata file for recording the reference relationship between the sequence frame position and the basic material according to the material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frame positions, and then the sequence frame digital content is generated by packaging the basic material set and the metadata file. Compared with the method of storing pictures frame by frame in the prior art, the present application uses the reference of the metadata file to the basic material to realize the association between the frame and the material. Based on the reference relationship recorded in the metadata file, the shared reference of the basic material in different sequence frame positions can be realized. Since the basic material set removes duplicate content, it can avoid repeated storage of the same picture and other materials, thereby greatly reducing the amount of pictures and other materials, and then reducing the size of the final resource package, realizing the lightweight resource package, which can not only reduce the storage space requirements, but also improve the transmission and loading efficiency of the resource package.
[0053] In specific implementation, the embodiments of the present application may use arrays, mapping tables, etc. to record the reference relationship between sequence frames and basic materials, and generate a metadata file containing the above arrays or mapping tables, which are described below respectively.
[0054] In some modified implementations, the step S102 of generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material may include:
[0055] Creating an array of corresponding length according to the total number of frames of the sequence frame digital content to be generated, wherein each element in the array represents a sequence frame position and is initially empty;
[0056] Filling at least one material identifier of the basic material into each element in the array according to the correspondence between the sequence frame position and the basic material;
[0057] A metadata file for recording a reference relationship between sequence frames and the basic material is generated according to the filled array.
[0058] In a specific implementation, the length of the created array is equal to the total number of frames of the sequence frame digital content to be generated, wherein each element represents a sequence frame position and is initially empty. For example, each element can be initialized to a null value, an empty list, or an empty dictionary. Then, each element in the array is traversed, and according to the corresponding relationship between the sequence frame position and the basic material, the material identifier of the corresponding basic material is filled into the corresponding element in the array. If a sequence frame position references multiple basic materials, the material identifiers of the multiple basic materials are filled into the corresponding element of the array. After the filling is completed, the filled array is converted into a metadata file format (such as JSON or XML) and saved as a metadata file. The metadata file records the reference relationship between the sequence frame position and the basic material.
[0059] This embodiment uses array technology to record the reference relationship between the sequence frame position and the basic material. As a linear data structure, the array can store elements in index order and is suitable for the generation of sequence frame digital content of fixed length. Since the array is stored continuously in the memory, it is beneficial to the use of CPU cache, improves the access speed, and can quickly access and insert data. Therefore, it can more quickly record the reference relationship between the sequence frame position and the basic material and generate metadata files, which in turn helps to improve the generation efficiency and playback efficiency of the sequence frame digital content. In addition, the operation of the array is simple and intuitive, easy to understand and implement, which can further reduce the difficulty of implementing the scheme of this embodiment.
[0060] Based on the above implementation, in some modified implementations, the basic material includes a basic picture material, and the array includes a one-dimensional array;
[0061] Filling at least one material identifier of the basic material into each element in the array according to the correspondence between the sequence frame position and the basic material may include:
[0062] According to the correspondence between the sequence frame position and the basic picture material, a material identifier of the basic picture material is filled into each element in the one-dimensional array.
[0063] When the basic material includes a basic picture material, a one-dimensional array can be used to realize the recording of the reference relationship between the sequence frame and the basic picture material. Specifically, first, a one-dimensional array of corresponding length is created according to the total number of frames of the sequence frame digital content to be generated, and each element in the array represents a sequence frame and is initially empty. Then, according to the correspondence between the sequence frame and the basic picture material, a material identifier of a basic picture material is filled into each element in the one-dimensional array. In this way, the specific content of each frame is recorded through the elements in the array, ensuring that each frame can correctly reference the basic material. Finally, a metadata file for recording the reference relationship between the sequence frame and the basic picture material is generated based on the filled one-dimensional array, thereby realizing efficient content management and resource utilization.
[0064] This implementation not only simplifies the reference and management process of materials, but also effectively reduces storage requirements through array technology and avoids redundant storage of duplicate materials. Through the use of one-dimensional arrays, the material reference relationship of each frame becomes clear and convenient for subsequent editing and maintenance. At the same time, this method also improves generation efficiency, reduces the overall size of the resource package, and enhances user experience. In this way, even in the presence of a large number of duplicate frames, the content of each frame can be ensured to be accurate, and the specific content of each frame and its material reference relationship are clearly described in the form of metadata files.
[0065] In some other modified implementations, the above step S102 of generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material may include:
[0066] According to the total number of frames of the sequence frame digital content to be generated, creating a mapping table containing the total number of frames and null values, wherein each key in the mapping table represents a sequence frame position;
[0067] Traversing the mapping table, and filling at least one material identifier of the basic material into a blank value corresponding to each sequence frame position according to the corresponding relationship between the sequence frame position and the basic material;
[0068] A metadata file for recording the reference relationship between the sequence frame positions and the basic material is generated according to the filled mapping table.
[0069] This embodiment adopts mapping table technology to record the reference relationship between sequence frame positions and basic materials. In the specific implementation, first, a mapping table containing the total number of empty values of the sequence frame digital content to be generated is created according to the total number of frames, wherein each key in the mapping table represents a sequence frame position. Then, the mapping table is traversed, and according to the correspondence between the sequence frame position and the basic material, the material identification of at least one basic material is filled into the empty value corresponding to each sequence frame position. If a sequence frame position references multiple basic materials, the material identifications of the multiple basic materials are filled into the empty values corresponding to the corresponding sequence frame position in the mapping table. Finally, a metadata file for recording the reference relationship between the sequence frame position and the basic material is generated according to the filled mapping table.
[0070] Among them, the mapping table (such as a hash table or a dictionary) is an associative data structure that stores data through key-value pairs and is suitable for the generation of dynamically changing sequence frame digital content. When creating a mapping table, each key represents a sequence frame position, and the material identifier of the basic material is stored in the form of a key-value pair. The advantage of the mapping table is that it stores data in the form of key-value pairs, which is convenient for finding and managing data through keys, and the search and update operations are fast, which is suitable for scenarios that require frequent searches and updates. In addition, the mapping table can be dynamically expanded without pre-determining the size, and new key-value pairs can be easily added to adapt to uncertain data volumes.
[0071] This implementation uses a mapping table (such as a hash table or dictionary) to store the material reference information of each frame, so that the specific content of each frame and the basic material it references can be clearly recorded. The mapping table stores data in the form of key-value pairs, where each key corresponds to a sequence frame position and each value is the material identifier of the basic material referenced by the frame position. The key-value pair storage mechanism based on the mapping table can achieve fast search and update operations, especially when the number of sequence frames is large or needs to be frequently modified. The advantages of this method are particularly obvious.
[0072] In addition, this implementation uses a mapping table to record material reference relationships, which not only simplifies the material management process, but also improves the efficiency of generating metadata files. In practical applications, this method is particularly suitable for situations where frame positions and material reference relationships need to be dynamically adjusted, because it allows the content of each frame to be flexibly added or modified without affecting the data of other frames. In addition, the use of a mapping table can also effectively reduce the waste of storage space caused by duplicate materials, thereby optimizing resource management and improving the overall user experience.
[0073] Based on any of the above implementations, in some modified implementations, before generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material in the above step S102, the following may also be included:
[0074] According to the design information of the sequence frame digital content to be generated, the sequence frame position corresponding to each of the basic materials is determined.
[0075] It is easy to understand that before generating the metadata file, it is necessary to first determine which basic materials will appear in which sequence frames based on the design information, and record the specific positions and display parameters of these basic materials in each frame.
[0076] For example, before starting to generate the metadata file, first determine the sequence frame position corresponding to each basic material based on the design information of the sequence frame digital content to be generated, where the design information usually includes the content layout, material usage, and display parameters of each frame. By analyzing this design information, it is possible to clarify which materials will be used in each frame and the specific location and display effect of the materials. For example, the design information may indicate that the image material img1.png is used in the first frame and displayed in the center of the frame; the text material text1.txt is used in the second frame and displayed at the bottom of the screen. Next, based on this design information, determine which sequence frames each basic material will appear in, and record this information.
[0077] In this implementation, before generating the metadata file, the correspondence between the basic material and the sequence frame position can be determined based on the design information, so as to ensure that the content of each frame is accurate, and then the generated metadata file can clearly describe the specific content of each frame and its material reference relationship, thereby ensuring the correct generation and playback of the sequence frame digital content.
[0078] Based on the above implementation, in some modified implementations, the design information may include display time information and frame rate information of each basic material;
[0079] Determining the sequence frame position corresponding to each of the basic materials according to the design information of the sequence frame digital content to be generated may include:
[0080] Calculating the sequence frame position at which each of the basic materials should be displayed according to the display time information and frame rate information designed for each of the basic materials;
[0081] For each of the basic materials, the sequence frame position at which the basic material should be displayed is determined as the sequence frame position corresponding to the basic material.
[0082] In the implementation mode of the present application, when determining the sequence frame position corresponding to each basic material according to the design information of the sequence frame digital content to be generated, the sequence frame position that should be displayed for each basic material can be calculated, and these frame positions can be determined as the sequence frame position corresponding to the basic material. Specifically, first, according to the design information of the sequence frame digital content to be generated, the display time and frame rate information of each basic material are obtained, and then the sequence frame position that should be displayed for each material is calculated according to the display time and frame rate information of the basic material. The specific calculation method can be to multiply the display time by the frame rate to obtain the number of frame positions that the material should display, and then, for each basic material, the calculated sequence frame position that should be displayed can be determined as the sequence frame position corresponding to the basic material.
[0083] It should be noted that the above-mentioned display time information, when describing the display of the basic material in the digital content, can be either a specific time point, a continuous time period, or a continuous duration. When the display time information is a time point, it means that the basic material appears at a specific time point; when the display time information is a time period, it not only specifies the specific moment when the material starts to be displayed, but also clarifies the duration of the material to be displayed, that is, the time interval covered from the beginning to the end; when the display time information is a continuous duration, it refers to the duration of the basic material after it appears. In this case, multiple basic materials can be displayed in sequence, and the next basic material appears when the previous basic material disappears, and each basic material is displayed for a certain duration.
[0084] For example, if the display time information is a time point, such as "the 5th second", it means that the basic material will appear at the 5th second of the entire sequence frame digital content. This method is suitable for materials that need to appear or switch briefly at a specific moment, such as instant special effects or prompt information. If the display time information is a time period, such as "from the 5th second to the 10th second", it means that the material will be displayed from the 5th second and continue until the 10th second. This method is suitable for materials that need to be displayed for a longer time, such as background images, continuous text descriptions or animation effects.
[0085] If the display time information is the duration, it is necessary to combine other information (such as frame rate information) to determine the actual frame position of the material. For example, suppose a sequence frame digital content containing several frames is to be generated, and the design information indicates that the frame rate of the sequence frame digital content to be generated is 30 frames per second. The materials to be displayed in sequence are picture materials, text materials, and special effect materials. Among them, the picture material img1.png needs to be displayed for 2 seconds, the text material text1.txt needs to be displayed for 0.5 seconds, and the special effect material effect1.png needs to be displayed for 1 second. The specific steps are as follows: First, obtain the display time and frame rate information of each basic material, img1.png display time is 2 seconds, frame rate is 30 frames per second; text1.txt display time is 0.5 seconds, frame rate is 30 frames per second; effect1.png display time is 1 second, frame rate is 30 frames per second. Next, the sequence frame positions that each material should display are calculated based on the display time and frame rate information of the basic material. The number of frames that i mg1.png should display is 2×30=60 frames; the number of frames that text1.txt should display is 0.5×30=15 frames; and the number of frames that effect1.png should display is 1×30=30 frames. Then, for each basic material, the sequence frame positions that it should display are determined as the sequence frame positions corresponding to the basic material. The frame positions that i mg1.png should display are the first 60 frames; the frame positions that text1.txt should display are the next 15 frames; and the frame positions that effect1.png should display are the next 24 frames. The sequence frame positions that each basic material should display can be obtained and used as the sequence frame positions corresponding to the basic material.
[0086] By using time points, time periods or duration as display time information, users can accurately control the display timing and duration of basic materials in sequence frame digital content according to specific needs, ensuring that the content of each frame can be presented accurately. This not only simplifies the reference and management process of materials, but also ensures the coherence of digital content and consistency of visual effects through precise time control. Whether in the form of time points, time periods or duration, they are all designed to make the layout of basic materials in digital content more reasonable and orderly, thereby enhancing the expressiveness and viewing quality of the final work.
[0087] Through this implementation, before generating the metadata file, the sequence frame position that each basic material should display can be accurately calculated based on the display time and frame rate information in the design information, and the sequence frame position corresponding to the material can be determined accordingly, thereby ensuring that the content of each frame is accurate, simplifying the material reference and management process, reducing storage requirements, and ensuring the correct generation and playback of digital content.
[0088] Based on any of the above implementations, in some modified implementations, before step S103 of packaging and generating sequence frame digital content according to the basic material set and the metadata file, the following may also be included:
[0089] Determine the display parameter of each of the basic materials corresponding to each of the sequence frames in the metadata file;
[0090] The display parameters are added to the metadata file corresponding to the sequence frame positions and the basic material.
[0091] Display parameters refer to the various properties required for the basic material to be displayed in the sequence frame where it needs to be displayed, such as position, size, transparency, rotation angle, layer, etc. By determining these display parameters, it can be ensured that the display effect of the basic material in the corresponding sequence frame meets the design requirements, thereby achieving more refined content control.
[0092] In the specific implementation, the display parameters of each basic material in its corresponding sequence frame are first determined according to the design information. For example, if a certain picture material needs to appear in the center of the screen in a certain frame and needs to be enlarged for display, then the display parameters of the material include position coordinates, size ratio and other information. Then, these display parameters are added to the metadata file corresponding to the sequence frame and the basic material, so that the display parameters of each basic material in each sequence frame can be clearly recorded. In this way, when the sequence frame digital content is generated according to the basic material set and the metadata file, the specific content and display effect of each frame can be accurately presented.
[0093] It should be noted that the material identifier of each basic material is unique, but its display parameters are not necessarily unique. For example, a basic material may need to have different display effects in different sequence frames, so different display parameters need to be set for different sequence frames. In order to achieve this, in the process of generating the metadata file, it is necessary to determine the display parameters of each basic material corresponding to each sequence frame, and add these display parameters corresponding to the sequence frame and the basic material to the metadata file.
[0094] In this implementation, by adding the display parameters of each basic material to the metadata file, the display effect of the basic material in each frame can be more accurately controlled to ensure that the content of each frame can be presented accurately. This method not only simplifies the reference and management process of the material, but also ensures the coherence of the digital content and the consistency of the visual effect through detailed display parameter control, and can generate more complex sequence frame digital content, so that the generated sequence frame digital content has a richer dynamic display effect.
[0095] In addition, whether an array or a mapping table is used to record the reference relationship between the sequence frame and the basic material, the above-mentioned display parameters can be added, and the above-mentioned display parameter adding step can be performed after adding the material identifier to the array or mapping table, or it can be performed synchronously with the step of adding the material identifier to the array or mapping table to add the material identifier and the display parameters at the same time, which can achieve the purpose of the embodiments of the present application and should be within the protection scope of the present application.
[0096] For example, if an array is used to record a reference relationship, the display parameters can be recorded as part of the array elements. First, an array of corresponding length is created according to the total number of frames of the sequence frame digital content to be generated. Each element in the array represents a sequence frame position and is initially empty. Subsequently, the material identifier of the basic material and its display parameters are filled into each element in the array according to the corresponding relationship between the sequence frame position and the basic material. For example, if a frame needs to display an image material img1.png, and the position coordinates of the material in this frame are x=100, y=100, the size ratio is 1.5 times, and the transparency is 100%, then the corresponding position in the array can be filled with the following information: ["img1.png",{"position":{"x":100,"y":100},"scale":1.5,"opacity":100}]. In this way, each element in the array contains not only the material identifier of the basic material, but also the display parameters, ensuring that the content and display effect of each frame can be accurately recorded. Finally, a metadata file is generated based on the filled array to ensure that the specific content and display effect of each frame can be accurately recorded.
[0097] It should be noted that the data composed of the material identification and display parameters can also be an array, that is, each element in the array corresponding to the sequence frame is also an array, thereby forming a two-dimensional array. Specifically, when an array is used to record the reference relationship between the sequence frame position and the basic material, the element corresponding to each sequence frame position can be a sub-array containing the material identification and display parameters, thereby forming a two-dimensional array. Doing so can make the data structure more compact and easy to manage and process. For example, if a two-dimensional array is used to record the basic material and its display parameters of each frame, first create a one-dimensional array of corresponding length according to the total number of frames of the sequence frame digital content to be generated, and then place a sub-array at each element position in this one-dimensional array. The first element of the sub-array can be the material identification of the basic material, and the subsequent elements store the display parameters of the material at the current frame position. In this way, each sub-array constitutes a complete record, including the material identification and all its related display parameters.
[0098] For another example, if a mapping table is used to record the reference relationship, the display parameters can be recorded as part of the key-value pair in the mapping table. First, a mapping table containing the total number of empty values of the total number of frames is created according to the total number of frames of the sequence frame digital content to be generated, and each key in the mapping table represents a sequence frame position. Subsequently, according to the correspondence between the sequence frame position and the basic material, the material identifier and display parameters of the basic material are filled into the value corresponding to each key in the mapping table. For example, if a frame needs to display an image material img1.png, and the position coordinates of the material in this frame are x=100, y=100, the size ratio is 1.5 times, and the transparency is 100%, then the following information can be filled in the mapping table: {"frameIndex":0,"materialIds":["img1.png"],"displayParams":{"position":{"x":100,"y":100},"scale":1.5,"opacity":100}}. In this way, the value corresponding to each key in the mapping table contains not only the material identifier of the basic material, but also the display parameters, ensuring that the content and display effect of each frame can be accurately recorded. Finally, a metadata file is generated based on the filled mapping table to ensure that the specific content and display effect of each frame can be accurately recorded.
[0099] It should be noted that in the mapping table, the value corresponding to each key can be a material identifier, or a data structure consisting of a material identifier and display parameters, such as a structure, array, or dictionary. Specifically, each key in the mapping table represents a sequence frame, and the value corresponding to the key records the basic material displayed on the frame and its display parameters.
[0100] For example, if you use a structure to represent this information, you can define a structure that contains a material identifier and multiple fields to represent different display properties, such as position coordinates, scaling, and transparency. In this way, each entry in the mapping table is an instance of this type of structure, making the data organization more compact and easier to understand and maintain.
[0101] In addition, if the display parameters are relatively few, you can also directly put the material ID and all display parameters in an array. The first element in the array may be the material ID, followed by a series of display parameters. This method is concise and suitable for situations where the number of display parameters is small. For example, the array can contain information such as material ID, position coordinates, scaling, and transparency.
[0102] In addition, a dictionary or hash table can be used to organize the above-mentioned material identification and display parameters. A dictionary or hash table is a data structure that is very suitable for storing multiple types of data. It stores information in the form of key-value pairs. For example, this embodiment can use a dictionary to store material identification and multiple display parameters. The advantage of this is that the display parameters can be directly accessed through the key name, making the code more readable and maintainable. For example, the keys in the dictionary may include "materialId", "position", "scale" and "opacity", etc., and the value corresponding to each key is the specific display parameter value. This method is particularly suitable for scenarios with many display parameters or variable parameter types, because the dictionary provides a flexible way to organize and access this information.
[0103] No matter which method is chosen, the key is to ensure that the data is organized in a form that can clearly express the information of the material and facilitate program logic to process this information, so as to achieve the purpose of efficiently and flexibly managing the display of the material. Technical personnel in this field can flexibly choose or change the implementation according to the above exemplary description. Regardless of whether a structure, array or dictionary is used to organize display parameters, this method can be used to achieve precise control of different display effects of basic materials in different frame positions, ensure the coherence of digital content and the consistency of visual effects, and thereby enhance the expressiveness and viewing experience of the final sequence frame digital content.
[0104] It should be noted that, based on any of the above-mentioned implementation modes provided by the present application, in addition to being able to reduce the size of the resource package of the finally generated sequence frame digital content, by establishing a reference relationship between the sequence frame and the basic material, and using an independent metadata file to record the above-mentioned reference relationship, it can also facilitate users to more freely adjust the usage order of pictures and other materials in the sequence frame, and can support non-linear playback and efficient production of symmetrical animations, enrich the animation expression form, and enhance the flexibility of creation and the dynamic expressiveness of the animation.
[0105] For ease of understanding, further description is given below in conjunction with specific exemplary embodiments.
[0106] like Figure 2 As shown, it shows a schematic diagram of the resource structure of a conventional sequence frame animation provided by the prior art. The sequence frame animation under the prior art is to store a series of pictures in order in a folder, such as 0.png, 1.png, 2.png, etc., and the pictures can only be read and used from front to back when used.
[0107] Suppose you need to create an animation effect of rippling water. The traditional approach is to draw or shoot each changing picture frame by frame. For example, a total of 100 frames are required to complete the entire animation cycle. Each picture is marked with a serial number from 001 to 100, and played in sequence to form a coherent animation.
[0108] In the embodiment of the present application, considering that there are a lot of symmetries in the animation, the first half of the animation and the second half of the animation are visually mirror-symmetrical. Therefore, 50 pictures (for example, the 1st to 50th frames) are marked as symmetrical frames, and the mirror-symmetrical relationship of these frames is specified. In this way, only the first half of the 50 pictures are actually needed, and the other half can be dynamically generated by the algorithm during playback, which greatly reduces the storage requirements.
[0109] Specifically, when implementing the embodiment of the present application, the correspondence between the frame number (corresponding to the sequence frame position) and the picture number (corresponding to the material identifier) can be recorded as a metadata file, and then only the picture resources that are really needed and the corresponding metadata files are exported. For example, if the symmetrical frames are correctly marked, only 50 actual pictures need to be exported as basic materials, and the remaining 50 pictures will be dynamically generated by the playback engine according to the metadata file during playback. In the exported resource package, the pictures are stored in a folder, and the metadata file exists in the form of a separate file, which records the usage, order and symmetry information of each frame.
[0110] You can refer to Figure 3 For understanding, it shows a schematic diagram of a resource structure of a sequence frame animation provided by an embodiment of the present application, such as Figure 3 The resource package of the sequence frame animation shown includes multiple basic materials and a metadata file. The basic materials include 0.png, 1.png, 2.png, etc. The metadata file records an array in text form. This array indicates which picture is used in the i-th frame. The picture can be specified repeatedly.
[0111] As for the method of generating metadata files, you can generate metadata files in the production tool by specifying the duration of the basic material, special effect mask type and other design information. For example, to generate a non-overlapping transition mask sequence frame, the duration is specified as 1s, and the frame rate is specified as 25fps. The effect is that at the 1 / 2 position of the duration, the picture suddenly changes from (basic material 0.png) to another picture (basic material 1.png).
[0112] You can generate the metadata file by following the steps below:
[0113] 1. Calculate the total number of frames: duration × frame rate = 25, and construct an array of length 25 based on the total number of frames.
[0114] 2. Determine the sequence frame position corresponding to each basic material based on the design information.
[0115] For example, the number of frames corresponding to material 0.png is 25×0.5=12. Round down and fill the material identifier of 0.png, that is, serial number 0, into the positions of array indexes 0 to 11. 0 to 11 are the sequence frames corresponding to material 0.png. Since there is only a transition between two pictures, the remaining frames are the sequence frames corresponding to 1.png. The remaining positions of the array can be directly filled with serial number 1 of 1.png.
[0116] 3. Write the array information to the metadata file.
[0117] 4. Generate sequence frame digital content based on metadata files and all material resources. The resource structure of the generated sequence frame digital content is as follows: Figure 4 shown.
[0118] For another example, the design information is to generate an overlapping transition mask sequence frame, the duration is specified as 2s, the frame rate is specified as 25fps, and the effect is that the picture gradually changes at the 1 / 4, 1 / 2, and 3 / 4 positions of the duration. The basic materials are 0.png, 1.png, 2.png, and 3.png.
[0119] You can generate the metadata file by following the steps below:
[0120] 1. Calculate the total number of frames: duration × frame rate = 50, and construct an array of length 50 based on the total number of frames.
[0121] 2. Determine the sequence frame position corresponding to each basic material based on the design information.
[0122] For example, the transition frame between materials 0.png and 1.png is 50×0.25=12, rounded down, and the serial number 0 of 0.png is filled in the array index positions 0 to 11; the transition frame between materials 1.png and 2.png is 50×0.5=25, rounded down, and the serial number 1 of 1.png is filled in the array index positions 12 to 24; the transition frame between materials 2.png and 3.png is 50×0.75=37, rounded down, and the serial number 2 of 2.png is filled in the array index positions 25 to 36; the remaining positions in the array are filled with the serial number 3 of 3.png.
[0123] 3. Write the array information to the metadata file.
[0124] 4. Generate sequence frame digital content based on metadata files and all material resources. The resource structure of the generated sequence frame digital content is as follows: Figure 5 shown.
[0125] Through the above examples, the corresponding metadata files can be accurately generated according to the design information, and the shared references of basic materials in different sequence frames can be realized based on the reference relationships recorded in the metadata files. Since the basic material set removes duplicate content, it can avoid repeated storage of the same images and other materials, thereby greatly reducing the amount of images and other materials, and then reducing the size of the final resource package, achieving lightweight resource packages. This not only reduces storage space requirements, but also improves the transmission and loading efficiency of resource packages.
[0126] It should be noted that in the above examples, there are multiple implementation methods for determining the sequence frame position corresponding to each of the basic materials based on the design information of the sequence frame digital content to be generated. Those skilled in the art can refer to the examples given in any implementation method of the present application and implement them directly or flexibly after changes, which should all be within the scope of protection of the present application.
[0127] In addition, Figures 3 to 5 In the example, only pictures are used as the basic material for illustrative explanation, and each sequence frame only references the material identifier of one basic material. This is the simplest implementation method provided for the convenience of understanding the present solution, and cannot be understood as a limitation on the implementation methods of the present application. In actual applications, a sequence frame can also reference multiple basic materials, and each basic material can also be set with display parameters corresponding to its corresponding frame, so as to obtain richer and more diverse display effects.
[0128] Based on the same inventive concept, a sequence frame digital content generation device is also provided in an embodiment of the present application. The method corresponding to the device may be the sequence frame digital content generation method in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The sequence frame digital content generation device provided in an embodiment of the present application can implement the aforementioned sequence frame digital content generation method, and the sequence frame digital content generation device can be implemented by software, hardware, or a combination of software and hardware. For example, the sequence frame digital content generation device may include integrated or separate functional modules or units to perform the corresponding steps in the aforementioned methods. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts may refer to the partial description of the method embodiment. The device embodiment described below is merely illustrative. Please refer to Figure 6 , the sequence frame digital content generating device may include:
[0129] A basic material acquisition module 101 is used to acquire a basic material set, wherein the basic material set includes a plurality of basic materials that are not repeated;
[0130] The metadata generation module 102 is used to generate a metadata file for recording the reference relationship between the sequence frame and the basic material according to the material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frames;
[0131] The digital content generation module 103 is used to generate sequence frame digital content by packaging the basic material set and the metadata file.
[0132] In some modified implementations, the metadata generation module 102 includes:
[0133] An array creation unit, used to create an array of corresponding length according to the total number of frames of the sequence frame digital content to be generated, wherein each element in the array represents a sequence frame position and is initially empty;
[0134] A first identifier filling unit is used to fill in at least one material identifier of the basic material into each element in the array according to the corresponding relationship between the sequence frame position and the basic material;
[0135] The first metadata generating unit is used to generate a metadata file for recording the reference relationship between the sequence frame and the basic material according to the filled array.
[0136] In some modified implementations, the basic material includes a basic picture material, and the array includes a one-dimensional array;
[0137] The first identification filling unit includes:
[0138] The identifier filling subunit is used to fill a material identifier of the basic picture material into each element in the one-dimensional array according to the corresponding relationship between the sequence frame position and the basic picture material.
[0139] In some modified implementations, the metadata generation module 102 includes:
[0140] A mapping table creation unit, used for creating a mapping table containing null values of the total number of frames according to the total number of frames of the sequence frame digital content to be generated, wherein each key in the mapping table represents a sequence frame position;
[0141] A second identifier filling unit is used to traverse the mapping table and fill at least one material identifier of the basic material into the empty value corresponding to each sequence frame position according to the corresponding relationship between the sequence frame position and the basic material;
[0142] The second metadata generating unit is used to generate a metadata file for recording the reference relationship between the sequence frame and the basic material according to the filled mapping table.
[0143] In some variations, the device further comprises:
[0144] The corresponding relationship determination module is used to determine the sequence frame position corresponding to each of the basic materials according to the design information of the sequence frame digital content to be generated.
[0145] In some modified implementations, the design information includes display time information and frame rate information of each of the basic materials;
[0146] The corresponding relationship determination module includes:
[0147] A frame position calculation unit, configured to calculate a sequence frame position that each of the basic materials should display according to display time information and frame rate information designed for each of the basic materials;
[0148] The frame position corresponding unit is used to determine, for each of the basic materials, the sequence frame positions at which the basic material should be displayed as the sequence frame positions corresponding to the basic material.
[0149] In some variations, the device further comprises:
[0150] A display parameter determination module, used to determine the display parameter of each of the basic materials corresponding to each of the sequence frames in the metadata file;
[0151] The display parameter adding module is used to add the display parameter corresponding to the sequence frame position and the basic material to the metadata file.
[0152] The sequential frame digital content generation device provided in the embodiment of the present application is based on the same inventive concept as the sequential frame digital content generation method provided in the aforementioned embodiment of the present application and has the same beneficial effects.
[0153] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the method corresponding to the electronic device may be the method for generating digital content of a sequence frame in the aforementioned embodiment, and the principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating digital content of a sequence frame and / or the technical solution of the aforementioned multiple embodiments of the present application.
[0154] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or may be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0155] Figure 7 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the electronic device 1200 includes a central processing unit (CPU, Central Processing Unit) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM, Random Access Memory) 1203. In RAM 1203, various programs and data required for system operation are also stored. CPU 1201, ROM 1202 and RAM 1203 are connected to each other through a bus 1204. Input / output (I / O, Input / Output) interface 1205 is also connected to bus 1204.
[0156] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 1208 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet.
[0157] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 1201, the above functions defined in the method of the present application are executed.
[0158] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application described above.
[0159] Specifically, the present embodiment may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination therewith.
[0160] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0161] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0162] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0163] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0165] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0168] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0170] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for generating digital content of a sequence frame, wherein: The method comprises: Acquire a basic material set, wherein the basic material set includes a plurality of basic materials that are not repeated; Generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frames; The sequence frame digital content is generated by packaging the basic material set and the metadata file.
2. The method for generating sequential frame digital content according to claim 1, wherein: The step of generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material comprises: Creating an array of corresponding length according to the total number of frames of the sequence frame digital content to be generated, wherein each element in the array represents a sequence frame position and is initially empty; Filling at least one material identifier of the basic material into each element in the array according to the correspondence between the sequence frame position and the basic material; A metadata file for recording a reference relationship between sequence frames and the basic material is generated according to the filled array.
3. The method for generating sequential frame digital content according to claim 2, wherein: The basic material includes a basic picture material, and the array includes a one-dimensional array; The step of filling each element in the array with a material identifier of at least one basic material according to the correspondence between the sequence frame position and the basic material comprises: According to the correspondence between the sequence frame position and the basic picture material, a material identifier of the basic picture material is filled into each element in the one-dimensional array.
4. The method for generating sequential frame digital content according to claim 1, wherein: The step of generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material comprises: According to the total number of frames of the sequence frame digital content to be generated, creating a mapping table containing the total number of frames and null values, wherein each key in the mapping table represents a sequence frame position; Traversing the mapping table, and filling at least one material identifier of the basic material into a blank value corresponding to each sequence frame position according to the corresponding relationship between the sequence frame position and the basic material; A metadata file for recording the reference relationship between the sequence frame positions and the basic material is generated according to the filled mapping table.
5. The method for generating sequential frame digital content according to claim 1, wherein: Before generating a metadata file for recording a reference relationship between a sequence frame and the basic material according to the material identifier of the basic material, the method further includes: According to the design information of the sequence frame digital content to be generated, the sequence frame position corresponding to each of the basic materials is determined.
6. The method for generating sequential frame digital content according to claim 5, wherein: The design information includes display time information and frame rate information of each of the basic materials; The step of determining the sequence frame position corresponding to each of the basic materials according to the design information of the sequence frame digital content to be generated comprises: Calculating the sequence frame position at which each of the basic materials should be displayed according to the display time information and frame rate information designed for each of the basic materials; For each of the basic materials, the sequence frame position at which the basic material should be displayed is determined as the sequence frame position corresponding to the basic material.
7. The method for generating sequential frame digital content according to claim 1, wherein: Before the step of packaging and generating sequence frame digital content according to the basic material set and the metadata file, the step further includes: Determine the display parameter of each of the basic materials corresponding to each of the sequence frames in the metadata file; The display parameters are added to the metadata file corresponding to the sequence frame positions and the basic material.
8. A device for generating digital content of a sequence frame, wherein: The device comprises: A basic material acquisition module, used to acquire a basic material set, wherein the basic material set includes a plurality of basic materials that are not repeated; A metadata generation module, used to generate a metadata file for recording a reference relationship between a sequence frame and the basic material according to a material identifier of the basic material, wherein at least one of the basic materials is referenced by multiple sequence frames; The digital content generation module is used to package and generate sequence frame digital content according to the basic material set and the metadata file.
9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A computer readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Animation resource processing method and device
CN107886560A
Processing methods and devices of image data and electronic equipment
CN108364338A
Commodity material management method, server and computer readable medium
CN113869985A
Frame animation processing method and device, electronic equipment and storage medium
CN118397112A