A method, system and medium for improving the efficiency of texture compression cache usage
By initializing the cache, obtaining packaging information and updating the cache in the CocosCreator game engine, using image identification information and MD5 information to manage texture cache, solving the problems of long texture compression time, weak cache management and cross-machine use, achieving efficient Texture cache management and cross-machine resource sharing.
Patent Information
- Application Number
- CN202111134933.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-09-27
AI Technical Summary
In the CocosCreator game engine, texture compression time is long, cache management is weak, and does not support cross-machine use, resulting in inefficient packaging.
Through the steps of initializing the cache, obtaining packaging information and updating the cache, using image identification information and MD5 information to manage cache resources, realizing reuse and version control of image caches, and supporting the use of cross-machine cache resources.
Save project packaging time, improve the reliability and efficiency of cache management, support the use of cache resources across machines, and improve work efficiency.
Smart Images

Figure CN113886348B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of texture compression use, and in particular to a method, system and medium for improving the use efficiency of texture compression cache. Background Art
[0002] When developing multi-image application software or native game software, compressing the image textures can reduce the size of the software package, save running memory space, and thus improve the game running efficiency.
[0003] In the CocosCreator game engine, a texture compression tool is integrated, but there are the following problems:
[0004] First, the compression time is too long: Texture compression is a conversion of image encoding, and it takes a lot of time to generate compressed textures each time they are packaged;
[0005] Second, the cache management method is weak: although the engine also has a texture cache mechanism, in the editor, if the image itself does not change but only the path is moved, the cache of the image will be cleared;
[0006] Third, it does not support changing machines: the cache generated by the engine is stored in a temporary directory and cannot be managed across machines. If you change the machine for packaging, you need to regenerate the cache, which wastes time and reduces work efficiency. Summary of the invention
[0007] The present invention mainly solves the problems of long compression time, weak cache management method and cache not supporting machine replacement when using texture compression tools.
[0008] To solve the above problem, a technical solution adopted by the present invention is to provide a method for improving the efficiency of texture compression cache usage, comprising the following steps:
[0009] Initialize cache: obtain image identification information; perform image source file calculation according to the image identification information to obtain image source file information and image cache information; perform a save operation on the image source file information and the image cache information to obtain a configuration file and a backup folder;
[0010] Obtaining packaging information: obtaining the image identification information in the configuration file; performing an original image acquisition operation according to the image identification information; performing an information comparison operation according to the result of the original image acquisition operation to obtain a comparison result;
[0011] Update cache: perform image packaging operations according to the comparison results, and perform modification operations on the configuration file and the backup folder.
[0012] Furthermore, the step of initializing the cache further includes:
[0013] Obtain identification information: obtain the image to be used and its identification information;
[0014] Obtaining source file information: performing a texture compression calculation operation on the image according to the image identification information to obtain the image source file information and the image cache information;
[0015] Image information saving: integrating the image source file information and the image identification information and saving them to the configuration file; saving the image cache information and the configuration file to the backup folder.
[0016] Furthermore, the step of obtaining the packaging information further includes:
[0017] Configuration file traversal: performing a picture identification information traversal operation on the configuration file to obtain the picture identification information;
[0018] Image acquisition: performing the original image acquisition operation according to the image identification information to obtain the original image acquisition result;
[0019] Information comparison: performing the information comparison operation according to the original image acquisition result and the configuration file to obtain the comparison result.
[0020] Furthermore, the original image acquisition result includes a first acquisition result and a second acquisition result; and the image acquisition step further includes:
[0021] According to the picture identification information, obtain the original picture corresponding to the picture identification information:
[0022] If the original image exists, setting the original image acquisition result as the first acquisition result;
[0023] If the original image does not exist, the original image acquisition result is set as the second acquisition result.
[0024] Furthermore, the information comparison step further includes:
[0025] Obtain the original image acquisition result, and judge the original image acquisition result:
[0026] If the original image acquisition result is the first acquisition result, the original image is acquired, and a texture compression operation of the original image is performed to obtain original image file information;
[0027] If the original image acquisition result is the second acquisition result, performing a cache information deletion operation;
[0028] The information comparison operation is performed on the original image file information and the image source file information in the configuration file to obtain the comparison result.
[0029] Further, the image source file information includes first file information and second file information, and the original image file information includes first original image file information and second original image file information; and the step of performing the information comparison operation to obtain the comparison result further includes:
[0030] If the first file information is the same as the first original image file information and the second file information is the same as the second original image file information, setting the comparison result as success;
[0031] If at least one of the first file information and the first original image file information and the second file information and the second original image file information is not equal, the comparison result is set to fail.
[0032] Furthermore, the step of updating the cache further includes:
[0033] If the comparison result is successful, obtaining the image cache information in the backup folder; packaging the image cache information;
[0034] If the comparison result is a failure, the image cache information in the backup folder is deleted, the original image is packaged to obtain the original image cache information, and the configuration file and the backup folder are updated.
[0035] Furthermore, the step of updating the configuration file and the backup folder further includes:
[0036] The first original picture file information and the second original picture file information are updated into the configuration file; and the original picture cache information is stored into the backup folder.
[0037] A system for improving the efficiency of texture compression cache usage, comprising: an initialization cache module, a packing information acquisition module and an update cache module;
[0038] The initialization cache module is used to obtain image identification information; perform image source file calculation according to the image identification information to obtain image source file information and image cache information; perform a save operation on the image source file information and the image cache information to obtain a configuration file and a backup folder;
[0039] The module for obtaining packaging information is used to obtain the image identification information in the configuration file; perform an original image acquisition operation according to the image identification information; and perform an information comparison operation according to the result of the original image acquisition operation to obtain a comparison result;
[0040] The update cache module is used to perform a picture packaging operation according to the comparison result, and to perform a change operation on the configuration file and the backup folder;
[0041] The initialization cache module includes an identification information acquisition unit, a source file information acquisition unit and a picture information storage unit;
[0042] The identification information acquisition unit is used to acquire the picture to be used and the picture identification information thereof;
[0043] The source file information acquisition unit is used to perform a texture compression calculation operation on the image according to the image identification information to obtain the image source file information and the image cache information;
[0044] The picture information saving unit is used to integrate the picture source file information and the picture identification information and save them to the configuration file; save the picture cache information and the configuration file to the backup folder;
[0045] The module for obtaining packaging information includes a configuration file traversal unit, a picture acquisition unit and an information comparison unit;
[0046] The configuration file traversal unit is used to perform a picture identification information traversal operation on the configuration file to obtain the picture identification information;
[0047] The image acquisition unit is used to perform the original image acquisition operation according to the image identification information to obtain the original image acquisition result;
[0048] The information comparison unit is used to perform the information comparison operation according to the original image acquisition result and the configuration file to obtain the comparison result.
[0049] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for improving the use efficiency of texture compression cache are implemented.
[0050] The beneficial effects of the present invention are:
[0051] 1. The method for improving the efficiency of texture compression cache usage described in the present invention can reuse the already constructed image cache resources when the image has not changed, thereby saving the image construction time when the project is packaged;
[0052] 2. The system for improving the efficiency of texture compression cache usage of the present invention can manage cache resources through the MD5 information of the original image, and the management is reliable. After the image is changed, it can be accurately compared;
[0053] 3. The medium for improving the use efficiency of texture compression cache described in the present invention can manage the cache of pictures, increase version control, and support the use of cache resources across machines to improve efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 is a flow chart of the method for improving the efficiency of texture compression cache usage according to Embodiment 1 of the present invention;
[0056] Figure 2 It is a flowchart of the initialization cache step of the method for improving the efficiency of texture compression cache usage according to Embodiment 1 of the present invention;
[0057] Figure 3 It is a flowchart of the step of obtaining packing information of the method for improving the efficiency of texture compression cache usage described in Embodiment 1 of the present invention;
[0058] Figure 4 is a schematic diagram of a system for improving the efficiency of texture compression cache usage according to Embodiment 2 of the present invention;
[0059] Figure 5 It is a schematic diagram of an initialization cache module of a system for improving the efficiency of texture compression cache usage according to Embodiment 2 of the present invention;
[0060] Figure 6 It is a schematic diagram of a packing information acquisition module of a system for improving the use efficiency of a texture compression cache according to Embodiment 2 of the present invention.
[0061] It should be noted that in the description of the present invention,
[0062] CocosCreator is a complete game development solution that includes a lightweight and efficient cross-platform game engine, as well as various graphical interface tools that can speed up game development;
[0063] MD5 (Message-Digest Algorithm 5) is one of the hash algorithms widely used by computers to ensure the integrity and consistency of information transmission;
[0064] ETC (Ericsson Texture Compression) is a lossy algorithm designed for perceptual quality. It is based on the fact that the human eye reacts more to changes in brightness than to changes in chrominance. Similar to DXT, ETC compresses 4x4 pixel blocks into a 64 or 128-bit data block.
[0065] UUID (Universally Unique Identifier) is a universally unique identifier. DETAILED DESCRIPTION
[0066] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms such as "initialization", "cache", "image identification information", "source file", "configuration file", "backup folder", "original image", "texture compression", "traversal", "original image file information", "success", "failure", "packaging", "update", "storage" and the like should be understood in a broad sense. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0068] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features.
[0069] Example 1
[0070] The embodiment of the present invention provides a method for improving the efficiency of texture compression cache usage. Figures 1 to 3 , including the following steps:
[0071] S100, initializing cache:
[0072] S101, obtaining identification information:
[0073] Get the pictures in the project to be packaged and the picture identification information of the pictures. The picture identification information is the unique identification information used to mark the picture, and the identification information of each picture is different.
[0074] In order to explain the present invention more clearly, the image identification information is set as UUID here, and each image is identified by UUID; it should be noted that the setting here is only for better explaining the execution process of the present invention, and cannot limit the protection scope of the present invention.
[0075] S102, obtain source file information:
[0076] According to the picture identification information of the picture, texture compression and calculation are performed on the picture to obtain picture source file information and picture cache information; the picture source file information includes first file information and second file information.
[0077] In order to explain the present invention more clearly, the first file information is set as the MD5 information of the image, and the second file information is set as the ETC format information of the image; MD5 is used to identify the cache information of the image to improve the reliability and accuracy of cache information management; it should be noted that the setting here is only for better explaining the execution process of the present invention, and cannot limit the protection scope of the present invention.
[0078] S103, picture information storage:
[0079] Save the image source file information to the configuration file, and copy the image cache information and configuration file to the backup folder.
[0080] S200, obtain packaging information:
[0081] S201, configuration file traversal:
[0082] Before packaging the project, obtain the configuration file, traverse the image identification information in the configuration file, and obtain the image identification information.
[0083] In order to explain the present invention more clearly, the example in step S101 of obtaining identification information is continued here, that is, traversing the configuration file to obtain the image UUID in the configuration file; it should be noted that the example here is only for explaining the execution process of the present invention, and cannot limit the protection scope of the present invention.
[0084] S202, image acquisition:
[0085] According to the image identification information, go to the editor to get the corresponding original image:
[0086] If the original image exists in the editor, the original image acquisition result is the first acquisition result, that is, the original image is acquired;
[0087] If the original image does not exist in the editor, the original image acquisition result is the second acquisition result, that is, the original image is not acquired.
[0088] S203, information comparison:
[0089] Get the original image and get the result, and make a judgment:
[0090] If it is the first acquisition result, that is, the original image is acquired, a texture compression operation is performed on the original image to obtain original image file information, where the original image file information includes first original image file information and second original image file information;
[0091] If it is the second acquisition result, that is, the original image is not obtained, it means that the image corresponding to the image identification information saved in the configuration file has changed, and the image cache information in the backup folder can no longer be used, so the corresponding image cache information in the backup file is deleted.
[0092] In order to explain the present invention more clearly and to correspond to the image source file information, the first original image file information is set here as the MD5 information of the original image, and the second original image file information is set as the ETC format information of the original image; it should be noted that the setting here is only to explain the execution process of the present invention more clearly, and cannot limit the protection scope of the present invention.
[0093] Compare the original image file information with the image source file information in the configuration file, that is, compare the first original image file information and the second original image file information with the first file information and the second file information:
[0094] If the first original image file information is equal to the first file information and the second original image file information is equal to the second file information, that is, the MD5 information and ETC format information of the original image are equal to the MD5 information and ETC format information of the image saved in the configuration file, it means that the information saved in the configuration file is the original image information, and the comparison result is set to success;
[0095] If at least one of the first original image file information and the first file information and the second original image file information and the second file information is not equal, that is, at least one of the MD5 information and the ETC format information of the original image and the MD5 information and the ETC format information of the image saved in the configuration file is not equal, it means that the image has been changed, and the comparison result is set to failure.
[0096] S300, update cache:
[0097] Get the comparison results and perform different operations based on the comparison results:
[0098] If the comparison result is successful, it means that the information of the original image is saved in the configuration file, that is, the image has not been changed, and the image cache information in the backup folder is obtained for packaging;
[0099] If the comparison result is a failure, it means that the image has been changed, then the image cache information in the backup folder is deleted, the original image is obtained, and the texture of the original image is compressed to obtain the original image cache information;
[0100] The first original picture file information and the second original picture information of the original picture are updated into the configuration file, and the original picture cache information is copied to the backup folder for next use.
[0101] Example 2
[0102] The embodiment of the present invention provides a system for improving the efficiency of texture compression cache usage. Figures 4 to 6 , including: initializing cache module, obtaining packaging information module and updating cache module;
[0103] Initialize the module:
[0104] The cache initialization module is used to obtain image identification information; calculate the image source file according to the image identification information to obtain the image source file information and the image cache information; perform a save operation on the image source file information and the image cache information to obtain a configuration file and a backup folder; the cache initialization module includes an identification information acquisition unit, a source file information acquisition unit and an image information storage unit;
[0105] Get the identification information unit:
[0106] The identification information acquisition unit is used to acquire the image to be used and its image identification information;
[0107] Specifically, the identification information obtaining unit obtains the pictures in the to-be-packaged item and the picture identification information of the pictures. The picture identification information is unique identification information used to mark the pictures, and the identification information of each picture is different.
[0108] In order to explain the present invention more clearly, the image identification information is set as UUID here, and each image is identified by UUID; it should be noted that the setting here is only for better explaining the execution process of the present invention, and cannot limit the protection scope of the present invention.
[0109] Get source file information unit:
[0110] The source file information acquisition unit is used to perform a texture compression calculation operation on the image according to the image identification information to obtain the image source file information and the image cache information;
[0111] Specifically, the source file information acquisition unit performs texture compression and calculation on the image according to the image identification information of the image to obtain the image source file information and the image cache information; the image source file information includes the first file information and the second file information.
[0112] In order to explain the present invention more clearly, the first file information is set as the MD5 information of the image, and the second file information is set as the ETC format information of the image; MD5 is used to identify the cache information of the image to improve the reliability and accuracy of cache information management; it should be noted that the setting here is only for better explaining the execution process of the present invention, and cannot limit the protection scope of the present invention.
[0113] Image information storage unit:
[0114] The image information saving unit is used to integrate the image source file information and the image identification information and save them to the configuration file; and save the image cache information and the configuration file to the backup folder;
[0115] Specifically, the picture information saving unit saves the picture source file information to the configuration file, and copies the picture cache information and the configuration file to the backup folder.
[0116] Get the packaging information module:
[0117] The module for obtaining package information is used to obtain the image identification information in the configuration file; according to the image identification information, the original image acquisition operation is performed; according to the result of the original image acquisition operation, the information comparison operation is performed to obtain the comparison result; the module for obtaining package information includes a configuration file traversal unit, an image acquisition unit and an information comparison unit;
[0118] Configuration file traversal unit:
[0119] The configuration file traversal unit is used to perform a picture identification information traversal operation on the configuration file to obtain the picture identification information;
[0120] Specifically, before packaging the project, the configuration file traversal unit obtains the configuration file, performs a traversal operation on the image identification information in the configuration file, and obtains the image identification information.
[0121] In order to explain the present invention more clearly, the example of obtaining the identification information unit is continued here, that is, traversing the configuration file to obtain the image UUID in the configuration file; it should be noted that the example here is only for explaining the execution process of the present invention, and cannot limit the protection scope of the present invention.
[0122] Image acquisition unit:
[0123] The image acquisition unit is used to perform an original image acquisition operation according to the image identification information to obtain an original image acquisition result;
[0124] Specifically, the image acquisition unit acquires the corresponding original image from the editor according to the image identification information:
[0125] If the original image exists in the editor, the original image acquisition result is the first acquisition result, that is, the original image is acquired;
[0126] If the original image does not exist in the editor, the original image acquisition result is the second acquisition result, that is, the original image is not acquired.
[0127] Information comparison unit:
[0128] The information comparison unit is used to obtain the result and the configuration file according to the original image, perform the information comparison operation, and obtain the comparison result;
[0129] Specifically, the information comparison unit obtains the original image acquisition result and makes a judgment:
[0130] If it is the first acquisition result, that is, the original image is acquired, a texture compression operation is performed on the original image to obtain original image file information, where the original image file information includes first original image file information and second original image file information;
[0131] If it is the second acquisition result, that is, the original image is not obtained, it means that the image corresponding to the image identification information saved in the configuration file has changed, and the image cache information in the backup folder can no longer be used, so the corresponding image cache information in the backup file is deleted.
[0132] In order to explain the present invention more clearly and to correspond to the image source file information, the first original image file information is set here as the MD5 information of the original image, and the second original image file information is set as the ETC format information of the original image; it should be noted that the setting here is only to explain the execution process of the present invention more clearly, and cannot limit the protection scope of the present invention.
[0133] Compare the original image file information with the image source file information in the configuration file, that is, compare the first original image file information and the second original image file information with the first file information and the second file information:
[0134] If the first original image file information is equal to the first file information and the second original image file information is equal to the second file information, that is, the MD5 information and ETC format information of the original image are equal to the MD5 information and ETC format information of the image saved in the configuration file, it means that the information saved in the configuration file is the original image information, and the comparison result is set to success;
[0135] If at least one of the first original image file information and the first file information and the second original image file information and the second file information is not equal, that is, at least one of the MD5 information and the ETC format information of the original image and the MD5 information and the ETC format information of the image saved in the configuration file is not equal, it means that the image has been changed, and the comparison result is set to failure.
[0136] Update the cache module:
[0137] The update cache module is used to perform image packaging operations and change configuration files and backup folders based on the comparison results;
[0138] Specifically, the cache module is updated to obtain the comparison results, and different operations are performed according to the comparison results:
[0139] If the comparison result is successful, it means that the information of the original image is saved in the configuration file, that is, the image has not been changed, and the image cache information in the backup folder is obtained for packaging;
[0140] If the comparison result is a failure, it means that the image has been changed, then the image cache information in the backup folder is deleted, the original image is obtained, and the texture of the original image is compressed to obtain the original image cache information;
[0141] The first original picture file information and the second original picture information of the original picture are updated into the configuration file, and the original picture cache information is copied to the backup folder for next use.
[0142] Example 3
[0143] This embodiment 3 has a computer-readable storage medium, which is used to store computer software instructions used to implement the method for improving the efficiency of using texture compression cache described in the above embodiment 1, and includes a program set up for the method for improving the efficiency of using texture compression cache; specifically, the executable program can be built into the system for improving the efficiency of using texture compression cache described in embodiment 2, so that the system for improving the efficiency of using texture compression cache can implement the method for improving the efficiency of using texture compression cache described in embodiment 1 by executing the built-in executable program.
[0144] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0145] A person skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware. The program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0146] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for improving the efficiency of texture compression cache usage, characterized in that: The following steps are involved: Initialize cache: obtain image identification information; calculate the image source file according to the image identification information to obtain image source file information and image cache information; Perform a save operation on the image source file information and the image cache information to obtain a configuration file and a backup folder; Obtaining packaging information: obtaining the image identification information in the configuration file; According to the image identification information, an original image acquisition operation is performed; according to the result of the original image acquisition operation, an information comparison operation is performed to obtain a comparison result; Update cache: perform image packaging operations according to the comparison results, and perform modification operations on the configuration file and the backup folder; The step of initializing the cache further includes: obtaining identification information: obtaining the image to be used and its identification information; obtaining source file information: performing a texture compression calculation operation on the image to be used according to the image identification information to obtain the image source file information and the image cache information; saving image information: integrating the image source file information and the image identification information and saving them to the configuration file; saving the image cache information and the configuration file to the backup folder; The step of obtaining packaging information further includes: configuration file traversal: performing an image identification information traversal operation on the configuration file to obtain the image identification information; image acquisition: performing the original image acquisition operation according to the image identification information to obtain the original image acquisition result; information comparison: performing the information comparison operation according to the original image acquisition result and the configuration file to obtain the comparison result.
2. The method for improving the efficiency of texture compression cache usage according to claim 1, characterized in that: The original image acquisition result includes a first acquisition result and a second acquisition result; the image acquisition step further includes: According to the picture identification information, obtain the original picture corresponding to the picture identification information: If the original image exists, setting the original image acquisition result as the first acquisition result; If the original image does not exist, the original image acquisition result is set as the second acquisition result.
3. The method for improving the efficiency of texture compression cache usage according to claim 2, characterized in that: The information comparison step further comprises: Obtain the original image acquisition result, and judge the original image acquisition result: If the original image acquisition result is the first acquisition result, the original image is acquired, and a texture compression operation of the original image is performed to obtain original image file information; If the original image acquisition result is the second acquisition result, performing a cache information deletion operation; The information comparison operation is performed on the original image file information and the image source file information in the configuration file to obtain the comparison result.
4. The method for improving the efficiency of texture compression cache usage according to claim 3, characterized in that: The picture source file information includes first file information and second file information, and the original picture file information includes first original picture file information and second original picture file information; The step of performing the information comparison operation to obtain the comparison result further includes: If the first file information is the same as the first original image file information and the second file information is the same as the second original image file information, setting the comparison result as success; If at least one of the first file information and the first original image file information and the second file information and the second original image file information is not equal, the comparison result is set to fail.
5. The method for improving the efficiency of texture compression cache usage according to claim 4, characterized in that: The step of updating the cache further comprises: If the comparison result is successful, obtaining the image cache information in the backup folder; packaging the image cache information; If the comparison result is a failure, the image cache information in the backup folder is deleted, the original image is packaged to obtain the original image cache information, and the configuration file and the backup folder are updated.
6. The method for improving the efficiency of texture compression cache usage according to claim 5, characterized in that: The step of updating the configuration file and the backup folder further comprises: The first original picture file information and the second original picture file information are updated into the configuration file; and the original picture cache information is stored into the backup folder.
7. A system for improving the efficiency of texture compression cache usage, characterized in that: include: Initialize the cache module, obtain the packaging information module and update the cache module; The initialization cache module is used to obtain image identification information; Calculate the image source file according to the image identification information to obtain image source file information and image cache information; Perform a save operation on the image source file information and the image cache information to obtain a configuration file and a backup folder; The module for obtaining packaging information is used to obtain the image identification information in the configuration file; According to the image identification information, an original image acquisition operation is performed; according to the result of the original image acquisition operation, an information comparison operation is performed to obtain a comparison result; The update cache module is used to perform a picture packaging operation according to the comparison result, and to perform a change operation on the configuration file and the backup folder; The initialization cache module includes an identification information acquisition unit, a source file information acquisition unit and a picture information storage unit; The identification information acquisition unit is used to acquire the picture to be used and the picture identification information thereof; The source file information acquisition unit is used to perform a texture compression calculation operation on the image to be used according to the image identification information to obtain the image source file information and the image cache information; The picture information saving unit is used to integrate the picture source file information and the picture identification information and save them to the configuration file; save the picture cache information and the configuration file to the backup folder; The module for obtaining packaging information includes a configuration file traversal unit, a picture acquisition unit and an information comparison unit; The configuration file traversal unit is used to perform a picture identification information traversal operation on the configuration file to obtain the picture identification information; The image acquisition unit is used to perform the original image acquisition operation according to the image identification information to obtain the original image acquisition result; The information comparison unit is used to perform the information comparison operation according to the original image acquisition result and the configuration file to obtain the comparison result.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method steps for improving the usage efficiency of a texture compression cache as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and system for updating browser cache
CN103257973A
Picture caching method and apparatus
CN107577711A
