Material package generation method, device, equipment and computer medium
By integrating common and differential resources in the material package and generating a frame resource description file, the problem of low efficiency in material package production and maintenance in the existing technology is solved, and efficient and low-cost multi-frame material package management is achieved.
Patent Information
- Application Number
- CN202411397376.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-10-08
AI Technical Summary
In the existing technology, in order to adapt to different display requirements, designers need to prepare a separate set of materials for each frame, resulting in low production and maintenance efficiency and high costs.
By determining common and differentiated resources based on the multi-frame display requirements of the target digital content, generating a frame resource description file, and integrating all resources in a material package, cross-frame reuse of common resources is achieved.
Simplify the material package production process, improve production efficiency, reduce production and maintenance costs, and support the flexibility and adaptability of multi-frame display needs.
Smart Images

Figure CN119356668B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a material package generation method, device, equipment, and computer-readable medium. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the present application that are recited in the claims. Nothing herein is admitted to be prior art by virtue of its inclusion in this section.
[0003] In the field of digital content creation and distribution, with the popularization of mobile devices and diversified display platforms, multi-frame adaptation of special effects materials has become a key issue that needs to be solved urgently.
[0004] Traditionally, to accommodate different display requirements, such as landscape and portrait modes, designers have to prepare a separate set of assets for each frame. This means each frame requires a complete set of resources. Therefore, to achieve multi-frame adaptation of special effects, each effect requires multiple complete asset packages. This places a significant burden on designers to produce and maintain assets, resulting in low efficiency and high costs.
[0005] In view of the above problems, it is necessary to provide a technical solution for generating material packages with higher efficiency and lower cost. Summary of the Invention
[0006] Various aspects of the present application provide a material package generation method, apparatus, device, and computer-readable storage medium to improve the production and maintenance efficiency of material packages and reduce the production and maintenance costs of material packages.
[0007] In one aspect of the present application, a method for generating a material package is provided, wherein the method comprises:
[0008] Determining all content resources for generating the target digital content based on the multi-frame display requirement information of the target digital content, wherein the content resources include common resources for multiple frames and differential resources for a single frame;
[0009] Determining frame resource reference information corresponding to each frame according to content resources required by each frame, wherein the plurality of frame resource reference information corresponding to the plurality of frames includes reference information to the same public resource;
[0010] Creating a frame resource description file according to the frame resource reference information;
[0011] A material package is generated based on the frame resource description file and all content resources.
[0012] Another aspect of the present application provides a device for generating a material package, wherein the device includes:
[0013] a content resource determination module, configured to determine all content resources for generating the target digital content based on the multi-frame display requirement information of the target digital content, wherein the content resources include common resources for multiple frames and differential resources for a single frame;
[0014] a reference information determination module, configured to determine frame resource reference information corresponding to each frame according to content resources required by each frame, wherein the plurality of frame resource reference information corresponding to the plurality of frames includes reference information to the same public resource;
[0015] A description file generating module, configured to create a frame resource description file according to the frame resource reference information;
[0016] The resource packaging module is used to package and generate a material package based on the frame resource description file and all content resources.
[0017] Another aspect of the present application provides an electronic device, comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] 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 execute the material package generation method as described above.
[0021] 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 material package generation method as described above.
[0022] In the solution provided by the embodiment of the present application, all content resources for generating the target digital content are determined based on the multi-frame display requirement information of the target digital content, wherein the content resources include common resources for multiple frames to be reused and differential resources for a single frame to be used. Then, based on the content resources required for each frame, frame resource reference information corresponding to each frame is determined, wherein the multiple frame resource reference information corresponding to the multiple frames includes reference information to the same common resource. Then, a frame resource description file is created based on the frame resource reference information. Next, a material package is generated based on the frame resource description file and all content resources, so that All resources required for different frames are integrated into one material package, and the internal frame resource description file is used to accurately guide the reference of resources under different frames. By dividing content resources into public resources and differential resources and associating them with frames through reference relationships, efficient reuse of public resources across frames can be achieved. Compared with existing technologies, there is no need to generate complete material packages for each frame separately, which can effectively simplify the production process of material packages, reduce the workload of designers, improve the production efficiency of material packages and reduce production costs. In addition, later maintenance only requires maintenance of individual content resources and reference information within this material package, so it can also effectively improve maintenance efficiency and reduce maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] 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 descriptions 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 any creative work.
[0024] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0025] Figure 1 A schematic diagram of a process for generating a material package according to an embodiment of the present application;
[0026] Figure 2 A schematic diagram of the structure of a material package provided in one embodiment of the present application;
[0027] Figure 3 A schematic diagram of the structure of a material package generation device provided in one embodiment of the present application;
[0028] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiments of the present application;
[0029] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0030] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0031] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPUs), input / output interfaces, network interfaces and memories.
[0032] 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. Memory is an example of a computer-readable medium.
[0033] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology for information storage. The information can be computer program instructions, data structures, program modules 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, compact disc-read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0034] In response to the problems of low production and maintenance efficiency and high cost caused by the need to produce a complete set of material packages for each frame when producing special effects in the existing technology, the embodiments of the present application provide a material package generation method, device, equipment and computer-readable storage medium to improve the production and maintenance efficiency of material packages and reduce the production and maintenance costs of material packages. It determines all content resources for generating target digital content based on multi-frame display demand information of the target digital content, wherein the content resources include public resources for multiple frames to be reused and differential resources for a single frame to be used, and then determines the frame resource reference information corresponding to each of the frames based on the content resources required for each frame, wherein the multiple frame resource reference information corresponding to the multiple frames includes reference information to the same public resource, and then determines the frame resource reference information corresponding to the multiple frames based on the frame resource reference information. The information is used to create a frame resource description file. Next, according to the frame resource description file and all the content resources, a material package is generated by packaging, so that all the resources required for different frames can be integrated in one material package, and the internal frame resource description file is used to accurately guide the reference of resources under different frames. By dividing the content resources into public resources and differential resources and associating them with the frames through reference relationships, efficient cross-frame reuse of public resources can be achieved. Compared with the existing technology, there is no need to generate a complete material package for each frame respectively, which can effectively simplify the production process of the material package, reduce the workload of designers, improve the production efficiency of the material package and reduce production costs, and later maintenance only needs to maintain the individual content resources and reference information in the material package, so it can also effectively improve maintenance efficiency and reduce maintenance costs.
[0035] The following is an exemplary description of the material package generation method, device, equipment and computer-readable storage medium provided in this application.
[0036] In actual scenarios, the execution subject of the material package 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 it can also 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, tablets, 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 collections. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0037] Figure 1 The following is a processing flow of a method for generating a material package provided in an embodiment of the present application, wherein the method includes at least the following processing steps:
[0038] Step S101 : determining all content resources for generating target digital content according to multi-frame display requirement information of target digital content, wherein the content resources include common resources for multiple frames and differential resources for a single frame.
[0039] Among them, the target digital content can be any digital content to be produced, including but not limited to visual effects (such as video effects, game effects, photography effects, etc.), applications, web pages, games, etc., all of which can achieve more convenient multi-frame support based on the technical solution provided in the embodiments of this application.
[0040] The above-mentioned content resources refer to various materials used in the process of digital content creation and distribution, including but not limited to multimedia elements such as images, videos, and audio. In order to meet the multi-frame display requirements of the target digital content, the embodiment of the present application needs to determine the content resources required for each of the multiple frames, thereby obtaining all content resources that can meet the multi-frame display requirements. In order to achieve cross-frame reuse of content resources, it is necessary to classify all content resources according to their reusability. For example, content resources that can be reused are classified as common resources, and content resources that cannot be reused are classified as differential resources.
[0041] Common resources can be shared across multiple frames, so you only need to prepare one copy, rather than a separate copy for each frame. For example, some audio files or common background elements may be the same across frames, so you only need to save one copy.
[0042] Differentiated resources are customized to fit specific frames. For example, the image sizes for horizontal and vertical screens are different, and designers need to provide different image versions for these two frames respectively.
[0043] In some modified implementations, step S101 of determining all content resources for generating the target digital content based on the multi-frame display requirement information of the target digital content may include:
[0044] Acquiring multi-frame display requirement information of target digital content, wherein the multi-frame display requirement information includes content resource requirement information corresponding to each frame required for displaying the target digital content;
[0045] Performing a duplicate check on the content resource demand information in the multi-frame display demand information, and adding a classification identifier to the content resource demand information according to the duplicate check result, wherein the classification identifier includes a common resource identifier and a difference resource identifier;
[0046] Generate a content resource demand list according to all the content resource demand information with added classification identifiers;
[0047] Acquire all prepared content resources according to the content resource requirement list.
[0048] In a specific implementation, a designer may upload multi-frame display requirement information of the target digital content. The multi-frame display requirement information includes information on the multiple frames required for display of the target digital content and content resource requirement information corresponding to each frame. The content resource requirement information may include, but is not limited to, at least one of the following information: the name, format, size, dimensions, ratio, clarity, etc. of the content resource required for each frame. After obtaining the multi-frame display requirement information, the execution subject of the embodiment of the present application may summarize, organize, and classify all content resource requirement information based on the multi-frame display requirement information. An important point is to check for duplicates in all content resource requirement information and then add a classification identifier to the content resource requirement information based on the duplicate checking results. For example, if duplicate content resource requirement information indicates that the content resource described therein is used by multiple frames, it is identified as a public resource and a public resource identifier is added to the content resource requirement information. If no duplicate content resource requirement information indicates that the content resource described therein is used by only one frame, it is identified as a differential resource and a differential resource identifier is added to the content resource requirement information. For example, by comparing at least one of the above information, background music with the same name and format required by multiple frames can be classified as common resources, while pictures required by only one frame can be classified as differential resources. After sorting and categorizing, a content resource requirement list for producing the target digital content can be generated and output. After the designer produces all the corresponding content resources based on the content resource requirement list, the execution entity of this application can obtain all the produced content resources based on the content resource requirement list to facilitate the subsequent generation of the material package.
[0049] Through this implementation, multi-frame display requirement information can be automatically detected and classified through human-computer interaction, and a content resource requirement list can be output. The designer can then prepare corresponding content resources based on the content resource requirement list. For public resources, only one copy is required. The device can then obtain all the prepared content resources based on the content resource requirement list to produce subsequent material packages.
[0050] Step S102 : determining frame resource reference information corresponding to each frame according to the content resources required by each frame, wherein the plurality of frame resource reference information corresponding to the plurality of frames includes reference information to the same public resource.
[0051] Among them, the frame resource reference information refers to the information that describes the reference relationship between the frame and the content resource. The embodiment of the present application adopts a reference method to realize the association between the frame and the content resource, and then based on the reference relationship, when a certain frame needs to be displayed, the content resource referenced by it is directly called to load and display. Based on this technical concept, all content resources can be added to a total material package without the need to produce corresponding material packages for each frame, thereby simplifying the production steps of the material package, and realizing efficient reuse of public resources across frames, reducing the workload of designers, improving the production efficiency of material packages and reducing production costs, and later maintenance only needs to maintain the individual content resources and reference information within the material package, so it can also effectively improve maintenance efficiency and reduce maintenance costs.
[0052] Step S103: Create a frame resource description file according to the frame resource reference information.
[0053] After forming the frame resource reference information, a corresponding frame resource description file can be generated to record the above-mentioned frame resource reference information. In actual applications, JSON, XML or other forms of metadata formats can be used to record the above-mentioned frame resource reference information. The embodiment of this application does not limit this. Its purpose is to record the frame resource reference information in a simple and easy-to-read manner.
[0054] Step S104: Packaging the frame resource description file and all content resources to generate a material package.
[0055] After creating the frame resource description file, all content resources that meet the multi-frame display requirements of the target digital content and the frame resource description file can be packaged together to generate a material package. Subsequently, no matter what frame is displayed, the corresponding content resources can be selected from the material package according to the frame resource description file for loading and display, which is convenient and quick.
[0056] The above-mentioned material package generation method provided in the embodiment of the present application determines all content resources for generating target digital content according to the multi-frame display requirement information of the target digital content, wherein the content resources include common resources for multiple frames to be reused and differential resources for a single frame to be used, and then determines the frame resource reference information corresponding to each frame according to the content resources required for each frame, wherein the multiple frame resource reference information corresponding to the multiple frames includes reference information to the same common resource, and then creates a frame resource description file according to the frame resource reference information. Next, according to the frame resource description file and the content resources, the material package is packaged and generated. It is possible to integrate all the resources required for different frames in one material package, and use the internal frame resource description file to accurately guide the reference of resources under different frames. By dividing content resources into public resources and differential resources and associating them with frames through reference relationships, it is possible to achieve efficient reuse of public resources across frames. Compared with the existing technology, there is no need to generate a complete material package for each frame separately, which can effectively simplify the production process of material packages, reduce the workload of designers, improve the production efficiency of material packages and reduce production costs. In addition, later maintenance only requires maintenance of individual content resources and reference information within the material package, so it can also effectively improve maintenance efficiency and reduce maintenance costs.
[0057] In some alternative implementations, after determining all content resources for generating target digital content in step S101, the following steps may also be included:
[0058] Generate corresponding annotation information for each content resource, wherein the annotation information includes at least one of an identifier, a resource path, a resource type, an applicable frame, and a reusability identifier;
[0059] Accordingly, the above step S102 determines the frame resource reference information corresponding to each frame according to the content resources required by each frame, which may include:
[0060] The frame resource reference information corresponding to each frame is determined according to the content resources required for each frame and the annotation information of each content resource.
[0061] An identifier is a unique code or name assigned to each content asset, used to uniquely identify it. It can be a string or a number, ensuring that each content asset is uniquely identified within the entire asset package. This identifier allows the rendering engine to quickly locate a specific asset within the frame asset description file and load the corresponding file as needed.
[0062] The resource path refers to the specific location of the content resource within the asset package, typically a file system path or a relative path. It instructs the rendering engine how to find and load a specific resource. This path information enables the rendering engine to accurately extract the required resources from the asset package based on the reference information in the description file.
[0063] Resource type refers to the specific type of content resource, such as image (JPEG, PNG), video (MP4, AVI), audio (MP3, WAV), etc. Resource type information is used to tell the rendering engine how to handle specific resources. For example, image files may need to be decoded and displayed, while audio files need to be played.
[0064] Applicable aspect ratios refer to the aspect ratio or ratios that a content resource is suitable for, such as 16:9 (widescreen), 9:16 (portrait), and 4:3 (standard screen). Applicable aspect ratio information helps the rendering engine determine when and how to use specific resources. For example, an image suitable for a 16:9 aspect ratio may not be loaded in a 9:16 aspect ratio.
[0065] A reusability indicator is a tag or label that indicates whether a content resource can be used across different formats. When a resource is marked as public, it means it can be used in multiple formats, eliminating the need for a separate copy for each format. Conversely, if a resource is not public, it means it is designed specifically for a specific format and cannot be used in other formats.
[0066] In an embodiment of the present application, it is necessary to combine the content resource requirement list required for each frame and the annotation information of each resource to generate specific frame resource reference information. In this way, the generated frame resource reference information records which resources are required for each frame, and clarifies the specific location and sharing of these resources through annotation information (especially resource path and reusability identifier). For example, for a 16:9 frame, if an image is needed, the reference information will include the path and reusability identifier of the image. If the image is also applicable to other frames, it will be marked as a "public resource" in the reusability identifier.
[0067] For example, suppose you need to generate a material package that supports both 16:9 and 9:16 aspect ratios.
[0068] The resources required for the 16:9 aspect ratio include:
[0069] Image A (identifier imgA, path images / imgA.jpg, type image, applicable aspect ratio 16:9, reusability flag false)
[0070] Video B (identifier vidB, path videos / vidB.mp4, type video, applicable aspect ratio 16:9, reusability flag false)
[0071] Audio C (identifier audC, path audios / audC.mp3, type audio, applicable frame all, reusability flag true)
[0072] The resources required for the 9:16 aspect ratio include:
[0073] Image D (identifier imgD, path images / imgD.jpg, type image, applicable aspect ratio 9:16, reusability flag false)
[0074] Video E (identifier vidE, path videos / vidE.mp4, type video, applicable aspect ratio 9:16, reusability flag false)
[0075] Audio C (identifier audC, path audios / audC.mp3, type audio, applicable frame all, reusability flag true)
[0076] The frame resource reference information is generated based on the content resources required for each frame and the annotation information of each content resource. The example is as follows:
[0077] Citation information for 16:9 aspect ratio:
[0078] Image A: {"identifier":"imgA","path":"images / imgA.jpg","type":"image","aspectRatio":"16:9","isCommon":false}
[0079] Video B: {"identifier":"vidB","path":"videos / vidB.mp4","type":"video","aspectRatio":"16:9","isCommon":false}
[0080] Audio C: {"identifier":"audC","path":"audios / audC.mp3","type":"audio","aspectRatio":"all","isCommon":true}
[0081] Citation information for the 9:16 frame:
[0082] Image D: {"identifier":"imgD","path":"images / imgD.jpg","type":"image","aspectRatio":"9:16","isCommon":false}
[0083] Video E: {"identifier":"vidE","path":"videos / vidE.mp4","type":"video","aspectRatio":"9:16","isCommon":false}
[0084] Audio C: {"identifier":"audC","path":"audios / audC.mp3","type":"audio","aspectRatio":"all","isCommon":true}
[0085] The above description is merely an illustrative description and does not limit the scope of protection of this application.
[0086] There are multiple implementations for the above-mentioned step S103. For example, a corresponding frame resource description file can be generated for each frame, or a general frame resource description file can be generated to record all frames and their frame resource reference information. The embodiment of the present application is not limited thereto, and all of them can achieve the purpose of the embodiment of the present application and should be within the scope of protection of the present application.
[0087] In some implementations, the above step S103, creating a frame resource description file based on the frame resource reference information, may include:
[0088] According to the frame resource reference information corresponding to each frame, a frame resource description file for the frame is created, and multiple frame resource description files corresponding to multiple frames are obtained.
[0089] This embodiment uses a one-to-one correspondence between frames and frame resource description files to generate multiple frame resource description files. Each frame resource description file records the frame resource reference information corresponding to a frame. In this way, for each supported frame, there will be a corresponding description file. For example, if nine different frame information is supported (such as 16v9, 9v16, 1v1, 4v3, 3v4, 18v9, 9v18, 21v9, 9v21), then nine frame resource description files will be generated, each containing information about all content resources referenced by the frame. When the target digital content needs to be displayed in a certain frame, it is only necessary to directly read the frame resource description file corresponding to the frame, and then query and load the required content resources based on the frame resource description file to quickly and accurately display the correct content.
[0090] For reference Figure 2 To understand, Figure 2 A schematic diagram of the structure of the material package provided in one embodiment of the present application is shown in FIG. Figure 2 As shown, this material package is used to support the display of two frame sizes, 16v9 and 9v16. The differential resources include horizontal screen images corresponding to 16v9 and vertical screen images corresponding to 9v16. The common resources include mask videos and background music. It also includes two frame resource description files 16v9.json and 9v16.json, and schematically marks the reference relationship between the frame resource description files and content resources. Among them, 16v9.json references the common resource and differential resource "horizontal screen images", and 9v16.json references the common resource and differential resource "vertical screen images".
[0091] This implementation allows each frame to have its own independent description file. In this way, for each frame, the loading of its required resources can be controlled very precisely. When the client software needs to load the resources of a specific frame, it can directly read the description file corresponding to the frame, thereby quickly finding and loading the required resources, effectively simplifying the resource loading process. There is no need to process the information of multiple frames, only the description file of the currently required frame needs to be processed. In addition, when the resources of a certain frame change, only the description file of the corresponding frame needs to be updated without affecting the description files of other frames, which facilitates maintenance and updating.
[0092] Based on the above embodiment, in some modified embodiments, the method may further include:
[0093] Creating an entry file of the material package according to the multiple frame resource description files, wherein the entry file records the correspondence between each frame and the frame resource description file;
[0094] The above step S014 packages the frame resource description file and all the content resources to generate a material package, which may include:
[0095] A material package is generated based on the frame resource description file, all content resources and the entry file.
[0096] Among them, the entry file refers to the file that serves as the loading point or starting point of the material package. It is used to record the correspondence between each frame and its corresponding frame resource description file. It is equivalent to a navigation directory of the material package, allowing the rendering engine to quickly locate the frame resource description file required for a specific frame, thereby efficiently loading the required resources.
[0097] This embodiment, by creating an entry file, makes the organizational structure of the material package clearer, making it easier to manage and maintain. At the same time, the entry file serves as a navigation directory, allowing the rendering engine to quickly find the required frame resource description file based on the entry file, avoiding the process of traversing the entire material package to find the resource description file, thereby improving loading efficiency and reducing user waiting time. In addition, by concentrating the information of all frame resource description files in a single entry file, the resources of the entire material package can be managed more efficiently, which is particularly beneficial for large-scale projects or scenarios that require frequent updates. For example, developers or maintenance personnel can quickly understand the overall structure of the material package by viewing the entry file, making it easier to discover resource reuse, which helps to further optimize resource management strategies. In addition, the existence of the entry file makes the maintenance and updating of the material package more convenient. When adding or deleting frames, only the information in the entry file needs to be updated, without manually adjusting the location of each frame resource description file. For example, if a new frame needs to be added, only a new record needs to be added to the entry file and the corresponding frame resource description file needs to be created, without modifying the location information of other files.
[0098] In some other modified implementations, the step S103 of creating a frame resource description file according to the frame resource reference information may include:
[0099] Summarizing the frame resource reference information corresponding to each frame and creating a frame resource description file;
[0100] Accordingly, the above step S104 packages the frame resource description file and all content resources to generate a material package, which may include:
[0101] The frame resource description file is used as an entry file and packaged with all the content resources to generate a material package.
[0102] Through this implementation, a total frame resource description file can be created, which summarizes the resource reference information of all frames. The summarized frame resource description file serves as an entry file and acts as a navigation directory for the material package, allowing the rendering engine to quickly locate the resource description information required for a specific frame.
[0103] This implementation concentrates all frames and their resource reference information in one file, which is conducive to unified management and maintenance, and can provide a global perspective to facilitate viewing and comparing resource usage between different frames. For example, because the frame resource description file contains the frame resource reference information of all frames, developers can have a holistic view when performing integration work, easily discover resource reuse, and help further optimize resource management strategies. In addition, when cross-frame analysis or global adjustments are required, a total description file will be more convenient than multiple separate files.
[0104] Based on any of the above implementations, in some modified implementations, the step S103 of creating a frame resource description file according to the frame resource reference information may include:
[0105] Create a frame resource description file in JSON format according to the frame resource reference information.
[0106] JSON (JavaScript Object Notation) is a lightweight data exchange format that's easy for humans to read and write, as well as for machines to parse and generate. Using JSON to create frame resource description files ensures standardization and consistency.
[0107] This implementation method, by creating a frame resource description file in JSON format, can improve the standardization and readability of the frame resource description file, making the description file easy to write and parse, and convenient for maintenance and expansion. In addition, since the rendering engine can easily parse the JSON file and quickly obtain the content resources required for each frame, it can also improve resource loading efficiency, reduce the time of traversing the entire material package to find resource description information, and enhance user experience; at the same time, the description file in JSON format simplifies the maintenance of the material package, allowing developers to easily modify or add new frame information, ensuring consistency and easy extensibility, and facilitating support for more frames or resource types in the future.
[0108] It should be noted that in actual applications, the existing method of generating a separate resource package for each frame not only increases the designer's workload and maintenance costs, but also forces the resource management platform and users to download multiple copies of duplicate content. In addition, the client software needs to select the corresponding resource package for loading based on the current screen orientation, which increases the complexity and resource consumption of the program. The resource package generation method provided in any of the above embodiments of the present application significantly reduces the overall size of the resource package by incorporating common resources for multiple frames into the resource package and reusing these resources in different frames, avoiding the redundancy caused by the need to prepare a complete set of resources for each frame in the traditional method, and optimizing the utilization of storage space. In addition, the present application solution supports the customization of different resources for a single frame, so that the resource package can support the reuse of common resources across frames and meet the special needs of a specific frame, thereby improving the adaptability and flexibility of the resource package in different application scenarios. In addition, the present application solution combines the intelligent loading mechanism of the rendering engine, so that when switching between different frames, only the newly added or changed resources need to be loaded, rather than the entire set of resources being reloaded, thereby reducing the delay during the switching process, improving the smoothness of switching between different frames, and improving the user experience. In addition, when the material needs to be updated, it is only necessary to modify the public resources or the differential resources of a specific frame, without having to update each frame version separately. This can effectively simplify the version control and maintenance process and reduce long-term maintenance costs.
[0109] Based on the same inventive concept, a material package generation device is also provided in an embodiment of the present application. The method corresponding to the device may be the material package generation method in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The material package generation device provided in an embodiment of the present application can implement the above-mentioned material package generation method, and the material package generation device can be implemented by software, hardware, or a combination of software and hardware. For example, the material package generation device may include integrated or separate functional modules or units to perform the corresponding steps in the above-mentioned methods. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is merely illustrative. Please refer to Figure 3 , the material package generating device may include:
[0110] The content resource determination module 101 is configured to determine all content resources for generating the target digital content based on the multi-frame display requirement information of the target digital content, wherein the content resources include common resources for multiple frames and differential resources for a single frame;
[0111] The reference information determination module 102 is configured to determine frame resource reference information corresponding to each frame based on the content resources required by each frame, wherein the frame resource reference information corresponding to multiple frames includes reference information to the same public resource;
[0112] A description file generating module 103 is configured to create a frame resource description file according to the frame resource reference information;
[0113] The resource packaging module 104 is configured to package the frame resource description file and all content resources to generate a material package.
[0114] In some modified implementations, the content resource determination module 101 includes:
[0115] a demand information acquisition unit, configured to acquire multi-frame display demand information of target digital content, wherein the multi-frame display demand information includes content resource demand information corresponding to each frame required for displaying the target digital content;
[0116] a duplicate checking unit, configured to check for duplicate content in the multi-frame display demand information, and add a classification identifier to the content resource demand information according to the duplicate checking result, wherein the classification identifier includes a common resource identifier and a difference resource identifier;
[0117] a content resource requirement list generating unit, configured to generate a content resource requirement list according to all the content resource requirement information with added classification identifiers;
[0118] The content resource acquisition unit is used to acquire all prepared content resources according to the content resource requirement list.
[0119] In some variations, the device further comprises:
[0120] a marking module, configured to generate corresponding marking information for each of the content resources, wherein the marking information includes at least one of an identifier, a resource path, a resource type, an applicable frame, and a reusability identifier;
[0121] The reference information determination module 102 includes:
[0122] The reference information determining unit is configured to determine the frame resource reference information corresponding to each frame according to the content resources required by each frame and the annotation information of each content resource.
[0123] In some modified implementations, the description file generation module 103 includes:
[0124] The multiple description file generating unit is used to create a frame resource description file for each frame according to the frame resource reference information corresponding to the frame, and obtain multiple frame resource description files corresponding to multiple frames.
[0125] In some variations, the device further comprises:
[0126] An entry file creation module, configured to create an entry file of the material package according to the plurality of frame resource description files, wherein the entry file records a correspondence between each frame and the frame resource description file;
[0127] The resource packaging module 104 includes:
[0128] The first resource packaging unit is used to package and generate a material package according to the frame resource description file, all content resources and the entry file.
[0129] In some modified implementations, the description file generation module 103 includes:
[0130] A single description file generating unit, configured to aggregate the frame resource reference information corresponding to each frame and create a frame resource description file;
[0131] The resource packaging module 104 includes:
[0132] The second resource packaging unit is used to package the frame resource description file as an entry file with all the content resources to generate a material package.
[0133] In some modified implementations, the description file generation module 103 includes:
[0134] The JSON file generating unit is used to create a frame resource description file in JSON format according to the frame resource reference information.
[0135] The material package generation device provided in the embodiment of the present application is based on the same inventive concept as the material package generation method provided in the aforementioned embodiment of the present application and has the same beneficial effects.
[0136] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application. The method corresponding to the electronic device may be the material package generation method 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 communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 execute the material package generation method and / or technical solution of the aforementioned multiple embodiments of the present application.
[0137] The electronic device may be a user device, or a device formed by integrating a user device and a network device via 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, tablets, 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 collections, and can be used to implement some of the processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computers.
[0138] Figure 4 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown. The electronic device 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 into the random access memory (RAM) 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) interface 1205 is also connected to bus 1204.
[0139] 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, and the like; an output section 1207 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, and a speaker; a storage section 1208 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, and a semiconductor memory; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 1209 performs communication processing via a network such as the Internet.
[0140] In particular, the methods and / or embodiments of the present application can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing 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-mentioned functions defined in the method of the present application are performed.
[0141] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application.
[0142] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, 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 this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by an instruction execution system, device or device or used in combination with it.
[0143] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0144] 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.
[0145] Computer program code for performing the operations of the present application can 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 can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can 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 can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0146] The flow chart or block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the equipment, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code include one or more executable instructions for realizing the logical function of the specification. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs the function or operation of the specification, or can be implemented with a combination of dedicated hardware and computer instructions.
[0147] Those skilled in the art will 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.
[0148] In the several embodiments provided in this 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.
[0149] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0150] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0151] 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 and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0152] 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 them. 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.
[0153] Furthermore, 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 recited in a device claim may also be implemented by a single unit or device through software or hardware. Terms such as "first" and "second" are used to indicate names and do not imply any particular order.
Claims
1. A method for generating a material package, wherein: The method comprises: Determining all content resources for generating the target digital content based on the multi-frame display requirement information of the target digital content, wherein the content resources include common resources for multiple frames and differential resources for a single frame; The method of determining all content resources for generating the target digital content based on the multi-frame display requirement information of the target digital content includes: obtaining the multi-frame display requirement information of the target digital content, the multi-frame display requirement information including content resource requirement information corresponding to each frame required to be displayed for the target digital content; checking for duplicates of the content resource requirement information in the multi-frame display requirement information, and adding classification identifiers to the content resource requirement information based on the duplicate checking result, the classification identifiers including common resource identifiers and differential resource identifiers; generating a content resource requirement list based on all the content resource requirement information with the classification identifiers; and obtaining all the prepared content resources based on the content resource requirement list; Determining frame resource reference information corresponding to each frame according to content resources required by each frame, wherein the plurality of frame resource reference information corresponding to the plurality of frames includes reference information to the same public resource; Creating a frame resource description file according to the frame resource reference information; A material package is generated based on the frame resource description file and all content resources.
2. The material package generation method according to claim 1, wherein: After determining all content resources for generating target digital content, the method further includes: Generate corresponding annotation information for each of the content resources, wherein the annotation information includes at least one of an identifier, a resource path, a resource type, an applicable frame, and a reusability identifier; Determining frame resource reference information corresponding to each frame according to the content resources required for each frame includes: The frame resource reference information corresponding to each frame is determined according to the content resources required for each frame and the annotation information of each content resource.
3. The material package generation method according to claim 1, wherein: The step of creating a frame resource description file according to the frame resource reference information includes: According to the frame resource reference information corresponding to each frame, a frame resource description file for the frame is created, and multiple frame resource description files corresponding to multiple frames are obtained.
4. The material package generation method according to claim 3, wherein: The method further comprises: Creating an entry file of the material package according to the multiple frame resource description files, wherein the entry file records the correspondence between each frame and the frame resource description file; The step of packaging and generating a material package according to the frame resource description file and all content resources includes: A material package is generated based on the frame resource description file, all content resources and the entry file.
5. The material package generation method according to claim 1, wherein: The step of creating a frame resource description file according to the frame resource reference information includes: Summarizing the frame resource reference information corresponding to each frame and creating a frame resource description file; The step of packaging and generating a material package according to the frame resource description file and all content resources includes: The frame resource description file is used as an entry file and packaged with all the content resources to generate a material package.
6. The material package generation method according to claim 1, wherein: The step of creating a frame resource description file according to the frame resource reference information includes: Create a frame resource description file in JSON format according to the frame resource reference information.
7. A material package generation device, wherein: The device comprises: A content resource determination module is configured to determine all content resources for generating target digital content based on multi-frame display requirement information of the target digital content, wherein the content resources include common resources for multiplexing multiple frames and differential resources for use in a single frame; wherein determining all content resources for generating target digital content based on the multi-frame display requirement information of the target digital content includes: obtaining the multi-frame display requirement information of the target digital content, wherein the multi-frame display requirement information includes content resource requirement information corresponding to each frame required to be displayed for the target digital content; checking for duplicates of the content resource requirement information in the multi-frame display requirement information, and adding classification identifiers to the content resource requirement information based on the duplication checking results, wherein the classification identifiers include common resource identifiers and differential resource identifiers; generating a content resource requirement list based on all the content resource requirement information with the classification identifiers added; and obtaining all prepared content resources based on the content resource requirement list; a reference information determination module, configured to determine frame resource reference information corresponding to each frame according to content resources required by each frame, wherein the plurality of frame resource reference information corresponding to the plurality of frames includes reference information to the same public resource; A description file generating module, configured to create a frame resource description file according to the frame resource reference information; The resource packaging module is used to package and generate a material package based on the frame resource description file and all content resources.
8. 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 6.
9. 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 6.
Citation Information
Patent Citations
Picture switching method, device and equipment and computer medium
CN119356781A