Application texture rendering method and apparatus, and electronic device, computer-readable storage medium and computer program product

By pre-compressing texture resources into multiple candidate formats on the first electronic device and sending placeholder data, the problem of texture rendering mismatch between different terminal devices is solved, and efficient rendering and storage space optimization are achieved on terminals with different compression formats.

WO2025227968A1PCT designated stage Publication Date: 2025-11-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/083002
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-28
Filing Date
2025-03-17
Publication Date
2025-11-06

AI Technical Summary

Technical Problem

On different terminal devices, texture rendering problems and excessive storage space consumption occur due to incompatible texture compression formats.

Method used

The first electronic device pre-compresses texture resources into multiple candidate formats and sends placeholder data. The second electronic device then requests texture resources of the target format for rendering as needed.

Benefits of technology

It improves the applicability of texture rendering to terminals with different compression formats, reduces storage space usage, and improves rendering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025083002_06112025_PF_FP_ABST
    Figure CN2025083002_06112025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are an application texture rendering method and apparatus, and an electronic device, a computer-readable storage medium and a computer program product. The method comprises: acquiring a target application texture resource and placeholder data of a target application, and sending the placeholder data to a second electronic device; according to a plurality of candidate compression formats, respectively compressing the target application texture resource into a plurality of candidate compressed texture resources; receiving a resource request sent by the second electronic device, wherein the resource request is sent by the second electronic device after acquiring the placeholder data, and the resource request is used for requesting a target compressed texture resource, the target compressed texture resource being obtained by using a target compression format to compress the target application texture resource; and if the target compression format is one of the plurality of candidate compression formats, acquiring the target compressed texture resource from among the plurality of candidate compressed texture resources, and sending the target compressed texture resource to the second electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Application texture rendering method and device, electronic device, computer readable storage medium and computer program product

[0001] Cross-reference to Related Applications

[0002] Embodiments of the present application are based on and claim priority from Chinese Patent Application No. 202410517067.6 filed on April 28, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0003] The present application relates to the field of image rendering, and in particular to an application texture rendering method and device, electronic device, computer readable storage medium and computer program product. BACKGROUND

[0004] Currently, in applications such as electronic games, as the user uses different stages of the application, the texture rendering needs to be performed according to the texture of each display object in the stage to obtain the displayed application screen. Texture embodies the surface structure organization arrangement properties of the surface of an object that have slow changes or periodic changes. In a popular understanding, texture is the pattern of the displayed object, such as the skin of a game character, the pattern on a sword, etc.

[0005] Different terminals have different texture compression formats. If the compression format of the texture of the application set when the application is manufactured is different from the compression format supported in the terminal, the compressed texture of the application cannot be well rendered, and problems will occur in use; if the compressed textures based on various compression formats are all sent to the terminal in advance, the storage space of the terminal is occupied. SUMMARY

[0006] Embodiments of the present application provide an application texture rendering method, device, electronic device, computer readable storage medium and computer program product, which can improve the universality of application texture rendering on terminals supporting different compression formats and reduce the occupation of terminal storage space.

[0007] According to an aspect of embodiments of the present application, an application texture rendering method is provided, the method is executed by a first electronic device, and the method comprises:

[0008] obtaining target application texture resources and placeholder data of a target application, and sending the placeholder data to a second electronic device;

[0009] compressing the target application texture resources into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats;

[0010] receive a resource request sent by the second electronic device, the resource request being sent by the second electronic device after obtaining the placeholder data, and used for requesting a target compressed texture resource, the target compressed texture resource being obtained by compressing the target application texture resource in a target compression format;

[0011] if the target compression format belongs to the plurality of candidate compression formats, obtaining the target compressed texture resource from the plurality of candidate compressed texture resources, and sending the target compressed texture resource to the second electronic device;

[0012] wherein the target compressed texture resource is used for rendering the target application by the second electronic device.

[0013] According to an aspect of an embodiment of the present application, an application texture rendering device is provided, and the device comprises:

[0014] a first sending unit configured to obtain a target application texture resource of a target application and placeholder data, and send the placeholder data to a second electronic device;

[0015] a compression unit configured to compress the target application texture resource into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats;

[0016] a second sending unit configured to receive a resource request sent by the second electronic device, the resource request being sent by the second electronic device after obtaining the placeholder data, and used for requesting a target compressed texture resource, the target compressed texture resource being obtained by compressing the target application texture resource in a target compression format; if the target compression format belongs to the plurality of candidate compression formats, obtaining the target compressed texture resource from the plurality of candidate compressed texture resources, and sending the target compressed texture resource to the second electronic device; wherein the target compressed texture resource is used for rendering the target application by the second electronic device.

[0017] According to an aspect of an embodiment of the present application, an application texture rendering method is provided, and the method is executed by a second electronic device, and the method comprises:

[0018] in response to obtaining placeholder data of a target application sent by a first electronic device, determining a target compression format supported by the second electronic device;

[0019] sending a resource request to the first electronic device, the resource request being used for requesting a target compressed texture resource, the target compressed texture resource being obtained by compressing a target application texture resource in a target compression format;

[0020] receive the target compressed texture resource from the first electronic device, and perform rendering of the target application based on the target compressed texture resource;

[0021] The first electronic device compresses the obtained target application texture resource into a plurality of candidate compressed texture resources in a plurality of candidate compressed formats when sending the placeholder data of the target application, the plurality of candidate compressed formats including the target compressed format, and the plurality of candidate compressed texture resources including the target compressed texture resource.

[0022] According to an aspect of an embodiment of the present application, an application texture rendering device is provided, and the device comprises:

[0023] A determining unit is configured to determine a target compressed format supported by the second electronic device in response to obtaining the placeholder data of the target application sent by the first electronic device.

[0024] A third sending unit is configured to send a resource request to the first electronic device, the resource request being used to request a target compressed texture resource obtained by compressing a target application texture resource in a target compressed format.

[0025] A second receiving unit is configured to receive the target compressed texture resource from the first electronic device, and perform rendering of the target application based on the target compressed texture resource. When the first electronic device sends the placeholder data of the target application, the first electronic device also compresses the obtained target application texture resource into a plurality of candidate compressed texture resources in a plurality of candidate compressed formats; the plurality of candidate compressed formats include the target compressed format, and the plurality of candidate compressed texture resources include the target compressed texture resource.

[0026] According to an aspect of an embodiment of the present application, an electronic device is provided, and the electronic device comprises:

[0027] A memory is configured to store computer executable instructions or computer programs.

[0028] A processor is configured to execute the computer executable instructions or computer programs stored in the memory, and implement the application texture rendering method as described above.

[0029] According to an aspect of an embodiment of the present application, the computer program product comprises computer executable instructions or computer programs, and a processor executes the computer executable instructions or computer programs to implement the application texture rendering method as described above.

[0030] According to an aspect of the embodiment of the present application, a computer program product is provided, which comprises computer executable instructions or a computer program, and the computer executable instructions or the computer program are executed by a processor, so that the computer device executes the application texture rendering method as described above.

[0031] In the embodiment of the present application, when the first electronic device is configured out of the factory, the target application texture resource and the placeholder data of the target application are obtained, and the target application texture resource is compressed into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats and stored; then, the placeholder data is sent to the second electronic device of the user. In this way, the second electronic device does not receive any compressed texture resource in any compression format, and when the second electronic device actually performs rendering of the application, the second electronic device can obtain the placeholder data, and then determine the target compression format supported by the second electronic device, and send a resource request to the first electronic device, so as to request the target compressed texture resource obtained by compressing the target application texture resource in the target compression format based on the resource request. Since the first electronic device has stored candidate compressed texture resources in various candidate compression formats in advance, after receiving the resource request, the target compressed texture resource can be obtained from the candidate compressed texture resource based on the resource request, and the target compressed texture resource is sent to the second electronic device, so that the second electronic device performs rendering of the target application by using the target compressed texture resource. In this process, no matter which compression format is supported by the second electronic device, since no specific compressed texture resource is received, after the placeholder data is obtained, the target compressed texture resource is obtained by requesting the target compressed texture resource in the target compression format from the first electronic device, so as to perform rendering. In this way, the universality of the application texture rendering on terminals supporting different compression formats can be improved, and the rendering efficiency of the application texture is improved. At the same time, since the placeholder data is much smaller than the compressed texture resource, the occupation of the storage space of the terminal can be greatly reduced, and the waste of space resources is reduced.

[0032] Other features and advantages of the embodiments of the present application will be described in the following description, and some will become apparent from the description, or will be understood from the embodiments of the present application. The purpose and other advantages of the embodiments of the present application can be achieved and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF DRAWINGS

[0033] The accompanying drawings are used to provide a further understanding of the technical solutions of the embodiments of the present application, and constitute a part of the specification, and are used to explain the technical solutions of the embodiments of the present application together with the embodiments of the present application, and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0034] FIG. 1 is a system architecture diagram to which an application texture rendering method provided by the embodiments of the present application is applied;

[0035] FIG. 2 is a schematic diagram of a scenario of replacing a terminal according to an embodiment of the present application;

[0036] FIG. 3 is a schematic diagram of a flow of a method of applying texture rendering according to an embodiment of the present application;

[0037] FIG. 4 is a flowchart of a method of applying texture rendering according to an embodiment of the present application;

[0038] FIG. 5 is a schematic diagram of an initial resource and an updated resource package according to an embodiment of the present application;

[0039] FIG. 6 is a schematic diagram of a process of storing multiple candidate compressed texture resources according to an embodiment of the present application;

[0040] FIG. 7 is a schematic diagram of a compression process according to an embodiment of the present application;

[0041] FIG. 8 is a schematic diagram of a flow of a method of applying texture rendering according to an embodiment of the present application;

[0042] FIG. 9 is a schematic diagram of a resource request according to an embodiment of the present application;

[0043] FIG. 10 is a schematic diagram of a process of sending a resource request according to an embodiment of the present application;

[0044] FIG. 11 is a schematic diagram of a flow of a method of applying texture rendering according to an embodiment of the present application;

[0045] FIG. 12 is a schematic diagram of a process of determining a target compressed texture resource according to an embodiment of the present application;

[0046] FIG. 13 is a schematic diagram of a flow of a method of applying texture rendering according to an embodiment of the present application;

[0047] FIG. 14 is a schematic diagram of a flow of a method of applying texture rendering according to an embodiment of the present application;

[0048] FIG. 15 is a schematic diagram of a structure of an application texture rendering apparatus 1500 applied to a first electronic device according to an embodiment of the present application;

[0049] FIG. 16 is a schematic diagram of a structure of an application texture rendering apparatus 1600 applied to a second electronic device according to an embodiment of the present application;

[0050] FIG. 17 is a structural block diagram of a part of a second electronic device for a method of applying texture rendering according to an embodiment of the present application;

[0051] FIG. 18 is a structural block diagram of a part of a first electronic device for a method of applying texture rendering according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application are further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present application and not to limit the embodiments of the present application.

[0053] Before the embodiments of the present application are further described in detail, the terms and terms involved in the embodiments of the present application are explained, and the terms and terms involved in the embodiments of the present application are applicable to the following explanations:

[0054] Application: Generally refers to a software program or system used to perform a specific task or provide a specific function. Application programs can be of various types, including mobile applications, desktop applications, web applications, etc. Web applications include WebGL games.

[0055] WebGL game: A game developed using WebGL (Web Graphics Library) technology. Refers to a game that runs in the Canvas element under the HTML5 standard and is rendered based on WebGL implementation. Texture resources are often needed in the rendering of WebGL games.

[0056] Texture resource: Also known as material map resource, refers to a bitmap resource that can be wrapped on the surface of a 3D model or a sprite. Commonly used map resources are mainly in PNG and JPEG formats. In order to reduce the storage size of texture resources, texture compression can be performed.

[0057] Texture compression: A kind of image compression technology specially for storing texture map resources in computer graphics rendering system, the compression algorithm optimizes the storage size and random access. Common texture compression formats include Ericsson Texture Compression (ETC or Ericsson Texture Compression 2, ETC2), Adaptive Scalable Texture Compression (ASTC), PowerVR Texture Compression (PVRTC), DXT1, DXT5, etc.

[0058] Unity mini-game: Specifically refers to a game developed using the Unity platform and running in a mini-game platform. Unity platform can be used to develop various types of games, and can be output as WebGL format, thus obtaining WebGL game.

[0059] AB package: full name AssetBundle, refers to the game resource archive file provided by the Unity platform, which can store non-code resources required during game running (such as models, textures, prefabs, scenes, and media files).

[0060] First package resource: specifically refers to the resource file for storing the first scene when the Unity platform exports WebGL game resources, and the default suffix is unityweb. The first package resource is loaded first when the Unity game is started. The first package resource contains the first scene resource content and the associated AB package resource.

[0061] Unity resource package: a general term for AB package and first package resource.

[0062] In related technologies, the Unity platform has provided game developers with the ability to compress texture resources. Typically, Unity games are published in a terminal-independent manner, that is, different game clients are exported for iOS, Android, and Windows. By configuring the format of the texture resources supported by each terminal, the texture resources are converted according to the format type supported by the terminal when the game resources are exported as Unity resource packages. The compressed texture resources in the Unity resource package are already in the corresponding compressed texture format, so that compressed texture resources can be directly used to achieve efficient texture rendering during game running.

[0063] Currently, there is a lack of technology that enables applications (such as Unity games) to be normally rendered on terminals supporting different compression formats. If compressed textures based on various compression formats are placed in the resource package in advance, the terminal storage space will be occupied.

[0064] The embodiments of the present application can improve the universality of application texture rendering on terminals supporting different compression formats, improve the efficiency of application texture rendering, and reduce the occupation of terminal storage space and the waste of space resources.

[0065] System architecture and scene description of the application embodiment

[0066] FIG. 1 is a system architecture diagram of the application texture rendering method provided by the embodiments of the present application. It includes: terminals 110-1, 110-2, and 110-3, the Internet 120, the gateway 130, and the server 140.

[0067] The terminal 110-1, 110-2 and 110-3 is a device used by the object to render a target application (such as the WebGL game, Unity game, etc. mentioned above). It includes a desktop computer, a laptop computer, a personal digital assistant (PDA), a mobile phone, a vehicle terminal, a home theater terminal, a dedicated terminal, and various forms. In addition, it can be a single device or a collection of multiple devices. For example, multiple devices are connected through a local area network, share a display device for cooperative work, and collectively constitute a terminal. The terminal 110-1, 110-2 and 110-3 can also communicate with the Internet 120 in a wired or wireless manner and exchange data.

[0068] The gateway 130 is also called an inter-network connector or a protocol converter. The gateway 130 realizes network interconnection at the transport layer and is a computer system or device that acts as a conversion role. In the use of different communication protocols, data formats or languages, or even two systems with completely different architectures, the gateway 130 is a translator. At the same time, the gateway 130 can also provide filtering and security functions. The messages sent by the terminal 110-1, 110-2 and 110-3 to the server 140 are sent to the corresponding server 140 through the gateway 130. The messages sent by the server 140 to the terminal 110-1, 110-2 and 110-3 are also sent to the corresponding terminal 110-1, 110-2 and 110-3 through the gateway 130.

[0069] The server 140 refers to a computer system that can provide certain services to the terminal 110-1, 110-2 and 110-3 (such as providing an application container of a target application to the terminal 110-1, 110-2 and 110-3, providing compressed texture resources in various formats to the terminal, etc.). Compared with the terminal 110-1, 110-2 and 110-3, the server 140 has higher requirements in stability, security, performance, etc. The server 140 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc. The server 140 can also communicate with the Internet 120 in a wired or wireless manner and exchange data.

[0070] The embodiments of the present application can be applied in various scenarios, for example, as shown in FIG. 2, which is a schematic diagram of a terminal replacement scenario provided by the embodiments of the present application, etc.

[0071] Based on FIG. 2, the object can need to replace the first terminal with a new terminal (referred to as a second terminal) after using the first terminal for a long time. When replacing the terminal, the data of each application (such as an application container, registration information of the object, running data of the application, and the like) on the first terminal is often imported into the second terminal to retain the use record of each application. Because the first terminal and the second terminal are different in terminal type, the supported texture compression formats are also different, so that the compressed texture resources cannot be parsed when the second terminal runs the application, thereby affecting the rendering of the texture resources of the application. Therefore, the need to not affect the rendering of the texture resources of the application when the object replaces the first terminal with the second terminal is generated.

[0072] As shown in FIG. 2, the server stores the texture compression resources of different applications in each texture compression format. Among them, the application A includes the candidate compressed texture resource W1 with the candidate compression format Y1, the candidate compressed texture resource W2 with the candidate compression format Y2, and the candidate compressed texture resource W3 with the candidate compression format Y3. The application B is similar to the application A and also includes the texture compression resources in each texture compression format, which will not be described again. On the first terminal, the specific texture resources are not included in the application container, but the placeholder data. When the object runs the application A using the first terminal, because the target compression format supported by the first terminal is Y1, the first terminal can request the candidate compressed texture resource corresponding to the target compression format Y1 from the server when the placeholder data is identified, so that the first terminal performs the rendering of the target application by using the candidate compressed texture resource Y1. After the object replaces the first terminal with the second terminal, the second terminal has the same resource package as the first terminal. When the object runs the application A using the second terminal, because the target compression format supported by the second terminal is Y2, the second terminal can request the candidate compressed texture resource corresponding to the target compression format Y2 from the server when the placeholder data in the resource package is identified, so that the second terminal performs the rendering of the target application by using the candidate compressed texture resource Y2. It can be seen that when the object replaces the first terminal with the second terminal, it is not necessary to re-download the application container of the application corresponding to the second terminal or to re-download the resource package (if re-downloaded by the second terminal, it can cause the loss of the use record generated by the first terminal), and it will not cause the rendering failure because of the different compression formats supported by the second terminal and the first terminal. The second terminal can adaptively download the required compressed texture resources when performing the application rendering, so as to avoid the loss of the use record of the application while being able to normally perform the texture resource rendering.

[0073] Thus, since the server stores candidate compressed texture resources of various candidate compressed formats in advance, the target compressed texture resource can be obtained therefrom and sent to the terminal for rendering of the target application by the terminal using the target compressed texture resource. In this process, regardless of the compression format supported by the terminal, since no specific compressed texture resource is in the resource package and is replaced by placeholder data, the target compressed texture resource can be obtained by requesting the target compressed texture resource of the target compression format from the server, so as to perform rendering. It can improve the universality of application texture rendering on terminals supporting different compression formats and improve the rendering efficiency of application texture. Meanwhile, since the placeholder data is much smaller than the compressed texture resource, the storage space of the terminal can be greatly reduced, and the waste of space resources is reduced.

[0074] General description of embodiments of the present application

[0075] According to an embodiment of the present application, an application texture rendering method is provided.

[0076] The application texture rendering method refers to a method for rendering texture resources required by a running application. The application texture rendering method of the embodiments of the present application is executed on a terminal and / or a server.

[0077] As shown in FIG. 3, FIG. 3 is a flowchart of the application texture rendering method provided by the embodiments of the present application. Based on FIG. 3, the application texture rendering method provided by the embodiments of the present application (executed by a first electronic device such as a server) comprises the following steps:

[0078] In step 310, the target application texture resource of the target application and the placeholder data are obtained, and the placeholder data is sent to a second electronic device.

[0079] In step 320, the target application texture resource is compressed into a plurality of candidate compressed texture resources according to a plurality of candidate compressed formats.

[0080] In step 330, the resource request sent by the second electronic device is received. The resource request is sent by the second electronic device after obtaining the placeholder data, and is used to request the target compressed texture resource. The target compressed texture resource is obtained by compressing the target application texture resource using a target compression format. If the target compression format belongs to the plurality of candidate compressed formats, the target compressed texture resource is obtained from the plurality of candidate compressed texture resources, and the target compressed texture resource is sent to the second electronic device. The target compressed texture resource is used for rendering of the target application by the second electronic device.

[0081] The embodiment of the step 310-330 has the advantage that the target application texture resource is compressed into a plurality of candidate compressed texture resources and stored, and the placeholder data is sent to the second electronic device. In this way, the second electronic device such as a terminal does not receive any compressed texture resource in a compressed format. When the second electronic device sends a request for a target compressed texture resource in a target compressed format to the first electronic device, since the first electronic device has stored candidate compressed texture resources in various candidate compressed formats in advance, the target compressed texture resource can be obtained therefrom and sent to the second electronic device for the second electronic device to use the target compressed texture resource to render the target application. In this way, the embodiment of the present application can improve the universality of application texture rendering on terminals supporting different compressed formats and improve the rendering efficiency of application texture. At the same time, since the placeholder data is much smaller than the initial compressed texture resource, the storage space of the terminal can be greatly reduced, and the waste of space resources is reduced.

[0082] The steps 310-330, the steps included between the steps 310-330, and the steps included after the step 330 will be described in detail below.

[0083] Detailed description of the step 310

[0084] In some embodiments, in the step 310, the process of obtaining the target application texture resource of the target application, that is, obtaining the initial resource package of the target application, the initial resource package including the initial compressed texture resource of the target application in an initial compressed format; decompressing the initial compressed texture resource to obtain the target application texture resource.

[0085] The target application refers to an application capable of performing a specific task or providing a specific function. For example, referring to the above, the application includes a Web application, and the Web application includes a WebGL game, so the target application can refer to the WebGL game. The initial compressed texture resource refers to the target application texture resource after compression processing. The target application texture resource refers to a texture resource used for rendering an application. For example, when the terminal runs the target application, the initial compressed texture resource needs to be decompressed into the target application texture resource, and then the target application texture resource is used to render the target application.

[0086] It should be noted that when the developer designs the application, the developer needs to design an application container of the application. The application container is a container for storing data related to the running of the application. The application container includes an application package and an initial resource package. The application package is used to control the running process of the application. The initial resource package is used to provide resources used for rendering in the running process of the application. The initial resource package can include target application texture resources. In order to reduce the storage size of the initial resource package, the target application texture resources can be compressed by using a corresponding compression algorithm of an initial compression format to obtain initial compressed texture resources, so that the initial resource package includes initial compressed texture resources of the initial compression format of the target application. In some embodiments, when the terminal runs the application, the corresponding operation can be performed by using the application package, and the initial resource package is called for rendering.

[0087] In some embodiments, the obtaining of the initial resource package of the target application includes but is not limited to the following manners:

[0088] (1) The first electronic device obtains the initial application container of the target application from the Unity platform in response to that the developer designs the target application on the Unity platform and publishes, and the initial application container includes the initial resource package.

[0089] (2) The first electronic device obtains the initial application container of the target application from the first terminal in response to that the object requests to transfer the target application in the first terminal to the second terminal, and the initial application container includes the initial resource package.

[0090] By using the above embodiments, the target application texture resources are obtained by decompressing the initial resource package of the target application, so that the target application texture resources are packed and compressed, the size of the application installation package is reduced, the memory usage is optimized, and resource management is facilitated.

[0091] In some embodiments, as described above, the process of obtaining the target application texture resources of the target application, that is, obtaining the initial resource package of the target application, the initial resource package includes initial compressed texture resources of the initial compression format of the target application; the initial compressed texture resources are decompressed to obtain the target application texture resources.

[0092] Based on this, referring to FIG. 4, FIG. 4 is a flowchart of an application texture rendering method provided by an embodiment of the present application. Based on FIG. 4, step 310 can be divided into: step 3101, obtaining the initial resource package of the target application, the initial resource package including initial compressed texture resources of the target application; step 3102, decompressing the initial compressed texture resources to obtain the target application texture resources; step 3103, replacing the initial compressed texture resources in the initial resource package with placeholder data to obtain an updated resource package; and step 3104, sending the updated resource package to the second electronic device.

[0093] In step 3102 of some embodiments, the first electronic device can decompress the initial compressed texture resource based on the compression algorithm corresponding to the initial compressed format name, to obtain the target application texture resource. The initial resource package includes the initial compressed texture resource and the initial compressed format name, and the first electronic device stores the compression algorithm corresponding to various texture compression format names.

[0094] For example, with reference to FIG. 4, based on FIG. 4, step 3102 includes: step 31021, obtaining the initial compression algorithm corresponding to the initial compressed format name; and step 31022, decompressing the initial compressed texture resource into the target application texture resource based on the initial compression algorithm.

[0095] It should be noted that the first electronic device stores a format name and compression algorithm mapping table. Step 31021 includes: searching the format name and compression algorithm mapping table according to the initial compressed format name to obtain the initial compression algorithm. The following is an example of a format name and compression algorithm mapping table.

[0096] Table 1

[0097] Referring to Table 1, if the initial compressed format name is ETC, the server takes the ETC algorithm as the initial compression algorithm. If the initial compressed format name is ASTC, the server takes the ASTC algorithm as the initial compression algorithm. If the initial compressed format name is PVRTC, the server takes the PVRTC algorithm as the initial compression algorithm. If the initial compressed format name is DXT, the server takes the DXT algorithm as the initial compression algorithm.

[0098] In actual implementation, in addition to table lookup, other ways can also be used to obtain the initial compression algorithm, which is not limited in the present embodiment.

[0099] In step 31022 of some embodiments, the initial compressed texture resource can be decompressed based on a decompression function or tool corresponding to the initial compression algorithm to obtain the target application texture resource. Specifically, when decompressing the initial compressed texture resource, the decompression process depends on the compression algorithm and format used. Illustratively, the following are some common texture compression formats and decompression methods: (1) ETC (Ericsson Texture Compression): ETC is a commonly used texture compression format, commonly used in mobile terminals. Decompressing ETC texture resources can be done through the corresponding function provided by the graphics API (such as OpenGL ES). (2) ASTC (Adaptive Scalable Texture Compression): ASTC is a high-level texture compression format developed by ARM, which supports multiple compression rates and bit depths. Decompressing ASTC texture resources usually requires using the corresponding function provided by the graphics API or library that supports the ASTC format to decode. (3) PVRTC (PowerVR Texture Compression): PVRTC is a texture compression format developed by Imagination Technologies, commonly used in iOS devices. Decompressing PVRTC texture resources requires using tools such as PVRTexTool to decode.

[0100] Applying the above embodiments, the initial compression algorithm is first determined based on the initial compression format name, and then decompression is performed based on the initial compression algorithm, improving the decompression efficiency.

[0101] In step 3103 of some embodiments, the first electronic device replaces the initial compressed texture resource in the initial resource package with placeholder data to obtain an updated resource package. Placeholder data is usually temporary data used to replace real data in a data package and does not affect the parsing of the data package. The embodiments of the present application use placeholder data to replace the initial compressed texture resource to obtain an updated resource package, and even without the initial compressed texture resource, the parsing of the updated resource package is not affected. The placeholder data can be the texture resource name.

[0102] It should be noted that different texture resource names can be classified according to their purposes and characteristics. Exemplarily, the following are some common texture resource names: (1) Diffuse Map: used to describe the color and lighting information of the object surface. (2) Normal Map: used to simulate the concave and convex details of the object surface, enhance the lighting effect, and improve the visual realism. (3) Specular Map: used to control the intensity and position of the highlight reflection on the object surface, affecting the glossiness of the material. (4) Emission Map: used to describe the part of the object surface that emits light, which can achieve self-luminous effect. (5) Roughness Map: describes the roughness of the object surface, affecting the scattering and reflection of light. (6) Metallic Map: describes the metal properties of the object surface, affecting the reflection mode and color of light. (7) Ambient Occlusion Map: describes the shadow and occlusion information of the object surface, enhancing the realism and stereoscopic effect of the scene. (8) Height Map: describes the height information of the object surface, which is usually used to create concave and convex terrain effects.

[0103] It should be noted that the placeholder data can be obtained in the following ways, but not limited to: (1) If the initial resource package also includes the name of the initial compressed texture resource, the name of the initial compressed texture resource can be obtained from the initial resource package, and the texture resource name is determined as the placeholder data. (2) If the initial resource package does not include the name of the initial compressed texture resource, the name of the initial compressed texture resource can be identified based on its description function, and the texture resource name is determined as the placeholder data. The description function refers to the functions of describing the color and lighting, concave and convex details, highlight reflection intensity and position, light-emitting part, roughness, metal properties, shadow and occlusion information, and height information of the object surface.

[0104] In actual implementation, after determining the placeholder data, the process of replacing the initial compressed texture resource in the initial resource package with the placeholder data to obtain the updated resource package can include: 1. Backup the initial compressed texture resource; 2. Copy the placeholder data to the initial resource package to overwrite the initial compressed texture resource; 3. Update the path or link relationship between the remaining resources of the initial resource package and the placeholder data; 4. Test the placeholder data in the initial resource package, if it can be correctly loaded and displayed, delete the backup, and use the initial resource package as the updated resource package.

[0105] In some embodiments, as shown in FIG. 5, which is a schematic diagram of an initial resource and an updated resource package according to an embodiment of the present application, based on FIG. 5, the initial resource package stores a plurality of initial compressed texture resources, including initial compressed texture resource 01, initial compressed texture resource 02, and initial compressed texture resource 03, etc. Assuming that the texture resource name of initial compressed texture resource 01 is diffuse map, then the placeholder data is diffuse map. Replace initial compressed texture resource 01 with "diffuse map" in the initial resource package to obtain an updated resource package. The updated resource package stores diffuse map, initial compressed texture resource 02, and initial compressed texture resource 03. Other initial compressed texture resources such as initial compressed texture resource 02 and initial compressed texture resource 03 can also be replaced. The process of replacing initial compressed texture resource 01 is similar, and will not be described again.

[0106] In step 3204 of some embodiments, the first electronic device sends the updated resource package to the second electronic device. Wherein, if the terminal has not downloaded the target application, the first electronic device sends the application container of the target application to the terminal in response to the download request of the target application sent by the second electronic device, the application container including the application program code and the updated resource package; if the second electronic device has already downloaded the target application, the first electronic device sends the updated resource package to the second electronic device in response to the acquisition request of the resource package of the target application sent by the second electronic device.

[0107] In an embodiment, before performing step 3204, step 32041 can also be performed, i.e. changing the texture resource compression format field of the updated resource package to the anchor compression format to obtain a new updated resource package; and then performing step 3204 again, at this time, step 3204 is implemented by step 32042, i.e. sending the new updated resource package to the second electronic device. The texture resource compression format field is a field indicating the compression format of the texture resource.

[0108] It should be noted that before the first electronic device performs data replacement, the initial resource package includes initial compressed texture resources, and the texture resource compression format field in the initial resource package is the compression format of the initial compressed texture resource (such as ETC format). After the first electronic device performs data replacement, the updated resource package no longer includes initial compressed texture resources, but includes placeholder data, and the texture resource compression format field is updated to the anchor compression format. Wherein, the anchor compression format is a specific compression format, indicating that the terminal should request the texture resource from the first electronic device. Since the second electronic device can not support the anchor compression format, if the second electronic device identifies that the texture resource compression format field is the anchor compression format, a mandatory constraint can be added to the texture processing script, indicating that the anchor compression format is supported. Here, the specific process of how the second electronic device adds the mandatory constraint will be described below, and will not be described again here.​​​

[0109] It can be understood that if no mandatory constraint is applied to the second electronic device, the second electronic device may not be able to request the first electronic device for the texture resource after discovering that there is no texture resource in the updated resource package but placeholder data, resulting in a failure of the texture resource rendering.

[0110] By applying the above embodiment, the texture resource compression format field is changed to an anchor compression format, so as to apply a mandatory constraint to the second electronic device. In this way, the second electronic device can support the function of requesting the first electronic device for the texture resource when the anchor compression format is identified, so that even if there is no specific texture resource in the updated resource package, the second electronic device can obtain the texture resource from the first electronic device.

[0111] Detailed description of step 320

[0112] Referring to FIG. 3, for step 320, the target application texture resource is compressed into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats.

[0113] It should be noted that the candidate compression format is a data compression format for reducing file size. One candidate compression format generally corresponds to one compression algorithm. Referring to the above, the candidate compression format can include ETC, ASTC, PVRTC, DXT, etc.

[0114] In step 320 of some embodiments, a compression algorithm corresponding to the candidate compression format can be called to compress the target application texture resource to obtain a candidate compressed texture resource corresponding to the candidate compression format. For example, if the candidate compression format is ETC, an ETC algorithm can be called to compress the target application texture resource to obtain a candidate compressed texture resource in the ETC format.

[0115] In actual implementation, after step 320 is performed, step 3201 of storing the plurality of candidate compressed texture resources can also be performed.

[0116] It should be noted that in step 3201 of some embodiments, a serial number can be set for each candidate compressed texture resource, and the candidate compressed texture resource is stored according to a candidate storage address corresponding to the serial number and the candidate compressed format. For example, the serial number of each candidate compressed texture resource is set according to the time of compression. However, the serial number cannot reflect the information related to the candidate compressed texture resource (for example, it cannot reflect the purpose of the candidate compressed texture resource), resulting in that it is very cumbersome to find the candidate compressed texture resource (for example, when a texture resource of a certain purpose needs to be read, the candidate compressed texture resource needs to be read out to determine whether it meets the requirements). Therefore, in an embodiment, the placeholder data of the initial compressed texture resource replaced in the foregoing step is used to determine the candidate storage address, and then the candidate compressed texture resource is stored. The placeholder data is a texture resource name.

[0117] In some embodiments, referring to FIG. 6, FIG. 6 is a flow diagram of storing a plurality of candidate compressed texture resources provided by an embodiment of the present application. Based on FIG. 6, step 3201 includes: step 32011, for each candidate compressed format, storing a candidate compressed texture resource according to a candidate storage address corresponding to the texture resource name and the candidate compressed format.

[0118] The candidate storage address is used to represent the storage location of the candidate compressed texture resource corresponding to the candidate compressed format.

[0119] In actual implementation, step 32011 includes: obtaining a first correspondence table, the first correspondence table indicating the correspondence among the texture resource name, the candidate compressed format, and the candidate storage address; and storing the candidate compressed texture resource based on the first correspondence table. The following is an example of a first correspondence table:

[0120] Table 2

[0121] Referring to Table 2, if the texture resource name is a diffuse map and the candidate compressed format is ETC, the candidate storage address is XX: XX\MEh1. The same applies to the remaining texture resource names and candidate compressed formats, and will not be repeated here.

[0122] In this way, the embodiment of using a table to determine the candidate storage address has the advantages of being simple and easy to implement, and having small processing overhead.

[0123] In actual implementation, step 32011 further includes: performing a target operation on the texture resource name and the candidate compressed format to obtain the candidate storage address; and storing the candidate compressed texture resource according to the candidate storage address.

[0124] It should be noted that the target operation is an operation formula or an operation function set for the matter, such as a hash function. The texture resource name and the candidate compression format are input into the target operation, and the output result is the candidate storage address. In an example, the texture resource name and the candidate compression format are input, and then a unique identifier is generated through a hash function, and the identifier is combined with the storage path to obtain the candidate storage address. In this way, it can be ensured that each candidate compressed texture resource has a unique storage address, and the candidate compressed texture resource can be retrieved according to the texture resource name and the candidate compression format.

[0125] In this way, the way of determining the candidate storage address through the target operation not only has high accuracy, but also can be adjusted as needed, and has strong flexibility.

[0126] In some embodiments, it is assumed that the texture resource name is a diffuse map. The target application texture resource is compressed in the ETC format to obtain the candidate compressed texture resource h1, and the candidate storage address is “XX: XX\MEh1”; the target application texture resource is compressed in the ASTC format to obtain the candidate compressed texture resource MAh2, and the candidate storage address is “XX: XX\h2”; the target application texture resource is compressed in the PVRTC format to obtain the candidate compressed texture resource h3, and the candidate storage address is “XX: XX\MPh3”; and the target application texture resource is compressed in the DXT format to obtain the candidate compressed texture resource h4, and the candidate storage address is “XX: XX\MDh4”. As shown in FIG. 7, FIG. 7 is a schematic diagram of a compression process provided by an embodiment of the present application. Based on FIG. 7, the first electronic device stores the candidate compressed texture resource h1 in “XX: XX\MEh1”, the candidate compressed texture resource h2 in “XX: XX\MAh2”, the candidate compressed texture resource h3 in “XX: XX\MPh3”, and the candidate compressed texture resource h4 in “XX: XX\MDh4”.

[0127] By using the placeholder data to store the candidate compressed texture resource, the efficiency of reading the candidate compressed texture resource required by the second electronic device from the first electronic device can be improved on the basis of being able to complete the storage of the candidate compressed texture resource. For example, referring to the following text, after identifying the placeholder data in the updated resource package, the second electronic device can request the candidate compressed texture resource from the first electronic device according to the placeholder data, and the first electronic device is stored based on the placeholder data, which can improve the resource reading efficiency.

[0128] It should be noted that although the first electronic device stores a plurality of candidate compressed texture resources of candidate compressed formats, if the target compressed format supported by the second electronic device can not belong to any of the plurality of candidate compressed formats, the first electronic device cannot send a suitable candidate compressed texture resource to the terminal.

[0129] Based on this, in an embodiment, referring to FIG. 6, step 3201 can further include step 32012 of storing a plurality of candidate compressed texture resources and a target application texture resource. In this way, when a terminal subsequently requests a texture resource from the server, even if the target compressed format supported by the terminal does not belong to the plurality of candidate compressed formats, the server can send the target application texture resource to the terminal, ensuring that the terminal can normally render the target application.

[0130] Detailed description of steps performed by the second electronic device such as a terminal after step 320

[0131] As shown in FIG. 3, according to an embodiment of the present application, the application texture rendering method (performed by the second electronic device) includes:

[0132] Step 410, in response to obtaining the placeholder data of the target application sent from the first electronic device, determining the target compressed format supported by the second electronic device;

[0133] Step 420, sending a resource request to the first electronic device, the resource request being used to request a target compressed texture resource, the target compressed texture resource being obtained by compressing the target application texture resource in the target compressed format;

[0134] Step 430, receiving the target compressed texture resource from the first electronic device, and rendering the target application based on the target compressed texture resource.

[0135] In the above steps 410 to 430, regardless of the compressed format that the second electronic device can support, since the second electronic device does not receive a specific compressed texture resource but a placeholder data instead, by requesting the target compressed texture resource of the target compressed format from the first electronic device, the target compressed texture resource is obtained for rendering. In this way, the universality of the application texture rendering on terminals supporting different compressed formats can be improved, and the rendering efficiency of the application texture is improved. At the same time, since the placeholder data is much smaller than the compressed texture resource, the occupation of the storage space of the terminal can be greatly reduced, and the waste of space resources is reduced.

[0136] In some embodiments, the process of step 410 specifically includes: receiving, from the first electronic device, an application container of the target application, the application container including an updated resource package, wherein the updated resource package is obtained by replacing, by the first electronic device, initial compressed texture resources in an initial resource package of the target application with placeholder data; and in response to identifying that the updated resource package contains the placeholder data, determining the target compression format supported by the second electronic device.

[0137] It should be noted that the first electronic device stores application containers of a plurality of candidate applications. The second electronic device can send a resource download request to the first electronic device to download a resource package of the target application in response to an object downloading operation on the target application. The plurality of candidate applications includes the target application. The first electronic device sends the application container of the target application to the second electronic device based on the download request of the second electronic device.

[0138] It should be noted that on the first electronic device side, the application container of the target application can include an initial resource package, but after the first electronic device performs step 3101, the initial resource package has been replaced with an updated resource package, that is, the application container of the target application sent by the first electronic device to the second electronic device includes the updated resource package.

[0139] The updated resource package is obtained by replacing, by the first electronic device, initial compressed texture resources in an initial resource package of the target application with placeholder data. As known from the foregoing, the first electronic device can send an application container including only the updated resource package to the second electronic device, or send an application container including both the application program package and the updated resource package to the second electronic device.

[0140] In step 410 of some embodiments, the second electronic device may, when running the target application, need to call a texture resource for rendering, and then the second electronic device will parse the updated resource package, the purpose being to extract a texture resource from the updated resource package. Since the updated resource package no longer has a specific texture resource, but only placeholder data, the second electronic device cannot extract the texture resource from the updated resource package. Therefore, in response to identifying that the resource package contains the placeholder data, the second electronic device determines the target compression format supported by the second electronic device, so as to request, based on the target compression format, the first electronic device for a compressed texture resource required for rendering the target application and capable of being parsed by the second electronic device.

[0141] In some embodiments, referring to FIG. 8, which is a flowchart of an application texture rendering method provided by an embodiment of the present application, based on FIG. 8, step 410 includes: step 4101, running the application program package through a main logic, and in response to identifying that the application program package contains the placeholder data in the running process, querying the target compression format supported by the second electronic device through a texture processing script.

[0142] The main logic refers to a process / thread of the terminal running the target application. The texture processing script refers to a script for rendering the target application. In an example, rendering of the target application (a WebGL game) exported by the Unity platform is based on WebGL API implementation, and the WebGL API is invoked by using a JavaScript script. Therefore, the application package exported by the Unity platform needs to finally implement basic invocations by using a JavaScript script.

[0143] In this way, the embodiment identifies the placeholder data in the running process by the main logic, and queries the target compression format from the texture processing script by the main logic, thereby improving the query efficiency.

[0144] It should be noted that the main logic can inquire the JavaScript script layer about a list of compression formats supported by the current terminal (GPU) when the target application is running, so as to determine the target compression format from the list of compression formats. Since the initial resource package is processed by the server for data replacement, the placeholder data cannot be guaranteed to be supported in all terminals. Therefore, in an embodiment, when inquiring about the list of supported compression formats, a forced constraint is added in the texture processing script, so that the placeholder data is always supported for rendering by the current terminal.

[0145] In the implementation of this embodiment, referring to FIG. 8, step 4101 includes:

[0146] In step 41011, the application package is run by the main logic, and in response to identifying that the application package contains the placeholder data and the texture resource compression format field in the application package is the anchor compression format, a forced constraint is added in the texture processing script, and the forced constraint indicates support for the anchor compression format.

[0147] In step 41012, a query request is sent to the texture processing script, and the query request is used for the texture processing script to verify support for the anchor compression format based on the forced constraint, and to query the target compression format supported by the second electronic device except the anchor compression format.

[0148] In step 41011, the anchor compression format is a specific compression format, indicating that the second electronic device should request the texture resource from the first electronic device. Since the second electronic device can not support the anchor compression format, the embodiment adds the forced constraint in the texture processing script by the main logic, and the forced constraint indicates support for the anchor compression format. The forced constraint is a processing script that requires support for the anchor compression format.

[0149] In step 41012, since the mandatory constraint has been added in the texture processing script, when the second electronic device sends a query request to the texture processing script, support for the anchor compression format can be verified, and the target compression format supported in addition to the anchor compression format can be obtained.

[0150] Thus, the embodiment of adding a mandatory constraint to the texture processing script has the advantage that it can ensure that any terminal can support the anchor compression format, thereby improving the effectiveness of texture resource rendering.

[0151] In step 420 of some embodiments, a resource request is sent to the first electronic device, i.e., a request for a target compression texture resource in a target compression format; the resource request can include a source address of the second electronic device, a destination address of the first electronic device, a texture resource name, and a target compression format. In an example, as shown in FIG. 9, which is a schematic diagram of a resource request provided by an embodiment of the present application, based on FIG. 9, the resource request for the target compression texture resource in the target compression format includes the target compression format, the texture resource name, the source address, and the destination address, so that the first electronic device sends the target compression texture resource to the second electronic device according to the target compression format and the texture resource name in the resource request. The resource request can also include the source address of the second electronic device, the destination address of the first electronic device, and a target storage address corresponding to the texture resource name and the target compression format, so that the first electronic device sends the target compression texture resource to the second electronic device according to the target storage address in the request.

[0152] In an embodiment, referring to FIG. 10, which is a flowchart of sending a resource request provided by an embodiment of the present application, based on FIG. 10, step 420 includes:

[0153] Step 4201, inserting a hijacking statement before a rendering function for rendering a target application;

[0154] Step 4202, executing the hijacking statement, the hijacking statement being configured to replace placeholder data in an application package with a target compression format, and sending a resource request to the first electronic device based on the target compression format in the application package.

[0155] It should be noted that the hijacking statement refers to modifying the control flow of a computer program to perform additional operations or code. The hijacking statement is usually implemented by injecting code or modifying the instruction stream of the program, and common hijacking statements include jump instructions, function calls, variable modifications, etc. The present embodiment mainly uses the hijacking statement to control the second electronic device to request the target compression texture resource from the first electronic device before executing the rendering function.

[0156] In actual implementation, the hijacking statement can be inserted before the rendering function for rendering the target application in the following ways: (1) modifying the rendering loop: adding custom code directly in the rendering loop, so that the code is executed before each rendering; (2) using a rendering pipeline hook: inserting a hook in a specific stage of the rendering pipeline, for example, using a hook of ID3D11 Device Context in DirectX or a hook of a frame buffer object in OpenGL; (3) rendering function wrapping: creating a new rendering function, and executing custom code before or after calling the original rendering function; (4) using middleware or framework: using an interface provided by an existing middleware or framework, where the interface allows inserting custom code in the rendering process. The embodiments of the present application are not limited in this regard.

[0157] Since the foregoing step has added a mandatory constraint in the texture processing script, the format in the resource package is definitely supported by the current second electronic device, so that the target application will execute the rendering function for rendering the target application when using the texture resource for rendering. For example, assuming that the target application is a WebGL game, the WebGLRenderingContext.compressedTexSubImage2D rendering function of WebGL will be finally executed. The hijacking statement is inserted before the rendering function for rendering the target application, and then the hijacking is performed to replace the placeholder data in the resource package with the target compressed format, and based on the target compressed format in the resource package, a request for the target compressed texture resource is sent to the first electronic device. After the second electronic device reads the target compressed texture resource from the first electronic device to the running memory space, the target compressed texture resource can be uploaded to the GPU of the second electronic device, so that the final desired rendering of the texture resource is completed. After the uploading to the GPU is successful, the second electronic device will immediately release the running memory space occupied by the target compressed texture resource.

[0158] In this way, by using the hijacking statement before the execution of the rendering function, it is ensured that the second electronic device can obtain the target compressed texture resource from the first electronic device, and the effectiveness of the rendering of the target application is improved.

[0159] In actual implementation, in step 420, the second electronic device sends a request for the target compressed texture resource to the first electronic device, so that in step 330, after the first electronic device receives the request for the target compressed texture resource in the target compressed format sent by the second electronic device, the first electronic device can send the target compressed texture resource to the second electronic device, and then in step 430, the second electronic device receives the target compressed texture resource from the first electronic device for rendering the target application. Therefore, the step 330 will be described in detail first, and then the step 430 will be described in detail.

[0160] Detailed description of step 330

[0161] Referring to FIG. 3, step 330 is divided into step 3301, receiving a resource request sent by the second electronic device, the resource request being sent by the second electronic device after obtaining the placeholder data, and being used to request a target compressed texture resource, the target compressed texture resource being obtained by compressing a target application texture resource in a target compression format; step 3302, if the target compression format belongs to the plurality of candidate compression formats, obtaining the target compressed texture resource from the plurality of candidate compressed texture resources; step 3303, sending the target compressed texture resource to the second electronic device; wherein the target compressed texture resource is used for rendering of the target application by the second electronic device.

[0162] It should be noted that the resource request sent by the second electronic device to the first electronic device can include a texture resource name and a target compression format, so that the first electronic device determines a target storage address according to the texture resource name and the target compression format in the resource request, and then the first electronic device obtains the target compressed texture resource according to the target storage address.

[0163] Alternatively, the resource request sent by the second electronic device to the first electronic device can also directly include the target storage address (i.e. the target storage address is determined in advance by the second electronic device according to the texture resource name and the target compression format), so that the first electronic device obtains the target compressed texture resource according to the target storage address.

[0164] In some embodiments, referring to FIG. 11, which is a flowchart of an application texture rendering method provided by an embodiment of the present application, based on FIG. 11, in the case where the resource request sent by the second electronic device to the first electronic device includes a texture resource name and a target compression format, step 3302 includes step 33021a, if the target compression format belongs to the plurality of candidate compression formats, obtaining the target compressed texture resource according to a target storage address corresponding to the texture resource name and the target compression format, wherein the target storage address belongs to the plurality of candidate storage addresses.

[0165] In this way, the first electronic device such as a server determines the target storage address according to the texture resource name and the target compression format, which can reduce the computational pressure of the second electronic device such as a terminal.

[0166] In actual implementation, as described above, for each of the candidate compression formats, the process of storing the candidate compressed texture resource according to the candidate storage address corresponding to the texture resource name and the candidate compression format can be that a first correspondence table is obtained, the first correspondence table indicating a correspondence relationship among the texture resource name, the candidate compression format, and the candidate storage address; and the candidate compressed texture resource is stored based on the first correspondence table.

[0167] Based on this, the target storage address can be obtained by the first electronic device based on the texture resource name and the target compression format by looking up the first correspondence table. That is, before step 33021a, the target storage address can also be obtained by looking up the first correspondence table based on the texture resource name and the target compression format, if the target compression format belongs to the plurality of candidate compression formats; and thus, the target compressed texture resource is obtained based on the obtained target storage address.

[0168] In combination with the above, the candidate compression formats include ETC format, ASTC format, PVRTC format, and DXT format, etc. The first correspondence table can refer to Table 2 above. In an example, assuming that the target compression format is ETC format and the texture resource name is diffuse map, the first electronic device such as a server looks up the first correspondence table based on the ETC format and the diffuse map to obtain the target storage address as XX:XX\MEh1, the server determines the candidate compressed texture resource h1 as the target compressed texture resource according to XX:XX\MEh1, and then sends it to the second electronic device such as a terminal. In another example, assuming that the target compression format is DXT format and the texture resource name is diffuse map, the server looks up the first correspondence table based on the DXT format and the diffuse map to obtain the target storage address as XX:XX\MDh4, the server determines the candidate compressed texture resource h4 as the target compressed texture resource according to XX:XX\MDh4, and then sends it to the terminal.

[0169] In this way, the target storage address is determined by table lookup, which is not only simple and easy to implement, but also has small processing overhead.

[0170] In actual implementation, as described above, for each of the candidate compression formats, the process of storing the candidate compressed texture resource according to the candidate storage address corresponding to the texture resource name and the candidate compression format can also be that a target operation is performed on the texture resource name and the candidate compression format to obtain the candidate storage address, and the candidate compressed texture resource is stored according to the candidate storage address.

[0171] Based on this, the target storage address can be obtained by the first electronic device based on the texture resource name and the target compression format by performing a target operation. That is, before step 33021a, the target storage address can also be obtained by performing a target operation on the texture resource name and the target compression format; and thus, the target compressed texture resource is obtained based on the obtained target storage address.

[0172] It should be noted that the target operation is an operation formula or an operation function set for the matter, such as a hash function. The target operation is input with the texture resource name and the target compression format, and the output result is the target storage address. In an example, the texture resource name and the target compression format are input, and then a unique identifier is generated through a hash function, and the identifier is combined with a storage path to obtain the target storage address. The target storage address belongs to a plurality of candidate storage addresses, and each candidate storage address corresponds to a candidate compressed texture resource. In this way, the target compressed texture resource can be obtained according to the target storage address.

[0173] In this way, the target storage address is determined through the target operation, which not only has high accuracy, but also can be adjusted as needed and has strong flexibility.

[0174] In other embodiments, with reference to FIG. 11, in a case where the resource request sent by the second electronic device to the first electronic device includes the target storage address, step 3302 includes: step 33021b, if the target compression format belongs to a plurality of candidate compression formats, obtaining the target compressed texture resource according to the target storage address in the resource request, wherein the target storage address belongs to a plurality of candidate storage addresses.

[0175] It should be noted that the target storage address can be obtained by the second electronic device based on the texture resource name and the target compression format according to the first correspondence table, or the target storage address can be obtained by the second electronic device through the target operation on the texture resource name and the target compression format. The specific implementation process of searching the first correspondence table or applying the target operation by the second electronic device can refer to the implementation process of determining the target storage address by the first electronic device, which will not be described here.

[0176] In this way, the target storage address can be determined by the second electronic device such as a terminal according to the texture resource name and the target compression format, which can reduce the operation pressure of the first electronic device such as a server.

[0177] In an embodiment, the second electronic device can detect the remaining operation capacity of the first electronic device. If the remaining operation capacity is less than a predetermined operation capacity threshold, the second electronic device determines the target storage address according to the texture resource name and the target compression format. If the remaining operation capacity is greater than or equal to the predetermined operation capacity threshold, the second electronic device sends the texture resource name and the target compression format to the first electronic device, and the first electronic device determines the target storage address according to the texture resource name and the target compression format. In this way, the operation pressure between the second electronic device and the first electronic device can be balanced.

[0178] It should be noted that the target compression format in the step 33021a or 33021b is one, and thus the target storage address determined according to the texture resource name and the target compression format is one. However, in some embodiments, the number of target compression formats is multiple, and thus the target storage address determined according to the texture resource name and the multiple target compression formats is multiple, and thus the target compressed texture resource needs to be determined based on the target storage address corresponding to each target compression format.

[0179] The process of determining the target compressed texture resource based on the target storage address corresponding to each target compression format is described below in various embodiments.

[0180] In a first embodiment, the process of obtaining the target compressed texture resource according to the target storage address in the step 33021a or 33021b includes: if the number of target compression formats is multiple, obtaining the compression loss rate of each target compression format; based on the compression loss rate of each target compression format, selecting the target storage address corresponding to the target compression format with the minimum compression loss rate from the target storage addresses corresponding to the target compression formats; and obtaining the target compressed texture resource based on the selected target storage address.

[0181] It should be noted that the compression loss rate refers to the ratio of the amount of lost information to the total amount of original data in the data compression process. In a lossy compression algorithm, a portion of data is discarded to reduce the file size, which results in compression loss. The compression loss rate can be represented by the following formula: compression loss rate = (size of target application texture resource - size of candidate compressed texture resource) / size of target application texture resource. The compression loss rate is usually expressed in percentage and can help measure the degree of influence of the compression algorithm on the data. A lower compression loss rate means that the compression algorithm achieves better compression effect while preserving data quality.

[0182] By using the above embodiment, the target compressed texture resource can be determined based on the target storage address corresponding to the minimum compression loss rate, and the target compressed texture resource with relatively high data quality can be obtained, thereby improving the rendering accuracy.

[0183] In a second embodiment, the process of obtaining the target compressed texture resource according to the target storage address in the step 33021a or 33021b includes: if the number of target compression formats is multiple, obtaining the compression rate of each target compression format; based on the compression rate of each target compression format, selecting the target storage address corresponding to the target compression format with the maximum compression rate from the target storage addresses corresponding to the target compression formats; and obtaining the target compressed texture resource based on the selected target storage address.

[0184] The compression rate refers to the ratio of the size of the compressed data to the size of the original data. It represents the relative size of the data after compression, usually expressed as a proportion or percentage. The compression rate can be expressed by the following formula: compression rate = size of candidate compressed texture resource / size of target application texture resource. The higher the compression rate, the better the compression effect, that is, the data is effectively compressed. Generally, the higher the compression rate, the smaller the size of the compressed data file, and the less storage space it occupies. The compression rate is one of the important indicators for measuring the effect of the compression algorithm, and is very important for scenarios that need to store a large amount of data in limited storage space.

[0185] In actual application, determining the target compressed texture resource based on the target storage address corresponding to the maximum compression rate can obtain a target compressed texture resource with relatively small storage space, thereby reducing the occupation of the storage space of the terminal. In this way, it is very suitable for terminals with relatively small storage space, and can also improve the rendering efficiency.

[0186] In a third embodiment, referring to FIG. 12, FIG. 12 is a flowchart of determining a target compressed texture resource according to an embodiment of the present application. Based on FIG. 12, step 33021a includes:

[0187] In step 330211, if the number of target compression formats is multiple, the compression loss rate and the compression rate of each target compression format are obtained.

[0188] In step 330212, a compression gain function is obtained, which is determined based on the compression texture resource proportion of multiple target compression formats, the compression loss rate and the compression rate of each target compression format.

[0189] In step 330213, when the compression gain function is maximized, the target compression texture resource proportion of each target compression format is determined.

[0190] In step 330214, based on the target storage address corresponding to the texture resource name and each target compression format, the compression texture resource corresponding to each target compression format is obtained, and based on the target compression texture resource proportion of each target compression format and the compression texture resource corresponding to each target compression format, the compression texture resource component corresponding to each target compression format is obtained.

[0191] In step 330215, the obtained compression texture resource components of each target compression format are integrated into a target compressed texture resource.

[0192] Different from the above-mentioned embodiments of determining the target texture resource according to the compression loss rate or the compression rate, this embodiment determines the target compressed texture resource based on the compression loss rate and the compression rate simultaneously. In addition, this embodiment does not simply determine the target compressed texture resource of a certain target storage address as the final target compressed texture resource, but integrates the compressed texture resource components corresponding to the plurality of target compression formats to obtain the final target compressed texture resource.

[0193] It should be noted that the compression loss rate and the compression rate in step 330211 have been explained above, and will not be repeated here. The compression gain function is used to evaluate the average performance of the compression algorithms corresponding to the plurality of target compression formats. The compression gain function is determined based on the compression texture resource proportions of the plurality of target compression formats, the compression loss rate and the compression rate of each target compression format. The compression texture resource proportion refers to the proportion of the texture resource corresponding to each target compression format. The sum of the compression texture resource proportions of all target compression formats is 1.

[0194] In some embodiments, step 330212 includes: obtaining a compression gain sub-function of each target compression format, the compression gain sub-function being determined based on the compression loss rate and the compression rate of the target compression format; taking the compression texture resource proportion of each target compression format as the weight of the compression gain sub-function of each target compression format, and performing weighted summation on each compression gain sub-function based on the weight to obtain the compression gain function.

[0195] For each target compression format, the compression loss rate can be calculated according to the initial compressed texture resource and the target application texture resource corresponding to the target compression format, and the compression rate can also be calculated. The specific calculation formula of the compression loss rate and the compression rate can be referred to above, and will not be repeated here. The compression gain sub-function is proportional to the compression loss rate, and the compression gain sub-function is inversely proportional to the compression rate.

[0196] In an example, the compression gain sub-function is calculated by the following formula:

[0197] In formula (1), G t is the compression gain sub-function of the tthtarget compression format, R t is the compression rate of the tthtarget compression format, and L t is the compression loss rate of the tthtarget compression format. Formula (1) shows that the compression gain sub-function increases with the increase of the compression rate, that is, the higher the compression rate, the higher the compression gain coefficient. Formula (1) also shows that the compression gain sub-function decreases with the increase of the compression loss rate, that is, the higher the compression loss rate, the lower the compression gain coefficient.

[0198] The compression texture resource proportion is used to indicate the proportion of the texture resource of each target compression format. The compression rate and the compression loss rate corresponding to each target compression format are known quantities, also called constants, but the compression texture resource proportion of each target compression format is an unknown quantity, also called a variable. Therefore, the compression gain function refers to a function with the compression texture resource proportion of each target compression format as a variable.

[0199] In an example, the compression gain function is calculated by the following formula:

[0200] In formula (2), G refers to the compression gain function, T refers to the number of target compression formats, a t is the compression texture resource proportion of the tthtarget compression format, G t is the compression gain sub-function of the tthtarget compression format.

[0201] After determining the compression gain function, the compression gain function needs to be solved to obtain the target compression texture resource proportion of each target compression format. The solved target compression texture resource proportion is a known quantity, also called a constant, which can be used for resource integration in subsequent steps. Therefore, in step 330213, when the compression gain function is maximized, the target compression texture resource proportion of the plurality of target compression formats is determined.

[0202] Then in step 330214, based on the target storage addresses corresponding to the texture resource names and each target compression format, the compression texture resource corresponding to each target compression format is obtained, and based on the target compression texture resource proportion of each target compression format and the compression texture resource corresponding to each target compression format, the compression texture resource component corresponding to each target compression format is obtained.

[0203] In an example, it is assumed that T=3, that is, there are three target compression formats, and it is assumed that G1=1, G2=2, and G3=3. The compression gain function G=a1G1+a2G2+a3G3=a1*1+a2*2+a3*3 needs to be maximized, and the constraint condition is a1+a2+a3=1, and a1, a2, and a3 are all greater than or equal to 0. When G=3, {a1=0, a2=0, a3=1} can be obtained. Therefore, in this example, the target compression texture resource proportion of the target compression format of t=1 is 0, the target compression texture resource proportion of the target compression format of t=2 is 0, and the target compression texture resource proportion of the target compression format of t=3 is 1. According to the target compression texture resource proportion {a1=0, a2=0, a3=1}, the compression texture resource component of the target compression format of t=1 is 0, the compression texture resource component of the target compression format of t=2 is also 0, and the compression texture resource component of the target compression format of t=3 is 1;

[0204] Finally, in step 330215, the acquired compressed texture resource components of each target compression format are integrated into a target compressed texture resource.

[0205] With the above example, the acquired compressed texture resource components of three target compression formats are integrated into a target compressed texture resource.

[0206] The above embodiment of determining the target compressed texture resource proportion of each target compression format by maximizing the compression gain function has the advantages of improving the accuracy and flexibility of determining the target compressed texture resource proportion.

[0207] The above embodiment of integrating the compressed texture resource of each target compression format into a target compressed texture resource by using the target compressed texture resource proportion has the advantage that the determined target compressed texture resource has a higher compression gain, which can improve the resource rendering quality.

[0208] Detailed description of step 430

[0209] Referring to FIG. 3, step 430 is divided into: step 4301, receiving a target compressed texture resource from a first electronic device; and step 4302, performing rendering of a target application based on the target compressed texture resource.

[0210] In actual implementation, the first electronic device completes sending the target compressed texture resource to the second electronic device by performing step 3303, so that the second electronic device completes receiving the target compressed texture resource from the first electronic device by performing step 4301. After the second electronic device receives the target compressed texture resource, step 4302 can be performed immediately, or step 4302 can be performed after the target compressed texture resource is verified. Adding a verification process can verify the validity and accuracy of the target compressed texture resource, reducing the waste of processing resources of the second electronic device due to running invalid or erroneous target compressed texture resources.

[0211] In an embodiment, step 4302 includes: storing the target compressed texture resource in a target storage space, and sending the target compressed texture resource to a rendering processing unit; and after receiving a message that the rendering processing unit successfully renders based on the target compressed texture resource, deleting the target compressed texture resource from the target storage space.

[0212] It should be noted that the target storage space refers to a storage area on the second electronic device for storing data related to the target application. The target storage space stores the application container. Referring to the foregoing, the application container includes the application package and the update resource package. The second electronic device can store the target compressed texture resource in the update resource package, and after the storage is successful, the update resource package includes the target compressed texture resource. The second electronic device can also store the target compressed texture resource in a space of the target storage space other than the application container. The rendering processing unit is a processing unit configured to perform resource rendering, and is usually referred to as a GPU.

[0213] Applying the above embodiment, after the second electronic device receives the target compressed texture resource from the first electronic device, the target compressed texture resource is read to the target storage space of the target application and uploaded to the GPU, and the rendering of the texture resource is completed. After the rendering is successful, the second electronic device will immediately release the storage space occupied by the target compressed texture resource, thereby reducing the space occupation while realizing the rendering.

[0214] In an example, the process of the second electronic device performing rendering of the target application based on the target compressed texture resource includes: (1) loading the target compressed texture resource: the second electronic device needs to decompress the target compressed texture resource into a target application texture resource according to the supported target compression format, which can be a picture file (such as PNG, JPEG, etc.) or other types of texture data. These data contain the color information and other attributes of the texture. (2) creating a texture object: the second electronic device will convert the loaded texture data into a texture object, which is usually created in a rendering processing unit (such as a GPU) for subsequent rendering operations. (3) binding the texture object: before rendering, the terminal needs to bind the required texture object to a specific texture unit of the rendering pipeline for use in the rendering process. (4) using the texture in the shader: in the vertex shader and the fragment shader, through the texture coordinates and the texture sampler, the corresponding texture color value can be obtained from the bound texture object. (5) rendering the object: when the second electronic device renders the object, according to the required texture information and texture coordinates, the texture color is mixed into the final pixel color to achieve the texture mapping effect. In summary, the process of the second electronic device using the target compressed texture resource for rendering involves steps such as loading the texture resource, creating the texture object, binding the texture object, using the texture in the shader, and rendering the object. These steps need to be performed in the rendering processing unit to achieve the texture mapping effect.

[0215] Detailed description of the steps included in the application texture resource rendering method

[0216] It should be noted that in the above embodiment, the premise that the first electronic device can send the target compressed texture resource to the terminal is that the target compression format belongs to the plurality of candidate compression formats. However, in some embodiments, the target compression format can not belong to the plurality of candidate compression formats, resulting in that the first electronic device cannot determine the target compressed texture resource from the candidate compressed texture resources and send it to the terminal. Therefore, as described above, based on FIG. 6, in step 32012, not only the plurality of candidate compressed texture resources are stored, but also the target application texture resource is stored, so that the target application texture resource can be directly sent to the second electronic device.

[0217] Based on this, referring to FIG. 13, which is a flow diagram of an application texture rendering method provided by an embodiment of the present application, based on FIG. 13, the application texture rendering method further includes: step 340 (performed by the first electronic device) and step 440 (performed by the second electronic device). Step 340 can be divided into: step 3401, receiving, from the second electronic device, a resource request sent by the second electronic device, the resource request being used to request a target compressed texture resource, the target compressed texture resource being obtained by compressing a target application texture resource using a target compression format; step 3402, if the target compression format does not belong to the plurality of candidate compression formats, obtaining the stored target application texture resource; step 3403, sending the target application texture resource to the second electronic device; wherein the target compressed texture resource is used for the second electronic device to render the target application using the target application texture resource. Step 440 can be divided into: step 4401, receiving the target application texture resource from the first electronic device; step 4402, rendering the target application using the target application texture resource.

[0218] In step 3401, the resource request sent by the second electronic device to the first electronic device can include a texture resource name and a target compression format, so that the first electronic device determines a target storage address according to the texture resource name and the target compression format in the request, and then the first electronic device obtains the target compressed texture resource according to the target storage address.

[0219] Alternatively, the resource request sent by the second electronic device to the first electronic device can also directly include the target storage address (i.e., the target storage address is determined in advance by the second electronic device according to the texture resource name and the target compression format), so that the first electronic device obtains the target compressed texture resource according to the target storage address.

[0220] In step 3402, since the target compression format does not belong to the plurality of candidate compression formats, the target storage address does not belong to the plurality of candidate storage addresses, resulting in that the first electronic device cannot obtain the target compressed texture resource according to the target storage address, so the first electronic device obtains the stored target application texture resource.

[0221] Then, in step 3403, the first electronic device sends the target application texture resource to the second electronic device.

[0222] In step 4401, unlike the target compressed texture resource received in step 4301, since the target compression format supported by the second electronic device does not belong to the plurality of candidate compression formats, the target compressed texture resource cannot be normally parsed even if it is acquired, and thus the second electronic device receives the target application texture resource, can complete resource rendering without terminal parsing, and improves resource rendering effectiveness.

[0223] The embodiment of the above steps 340 and 440 has the advantage that even if the target compression format supported by the second electronic device does not belong to the plurality of candidate compression formats, the second electronic device receives the target application texture resource sent by the server, so that the second electronic device can be normally rendered, and the effectiveness of the application texture resource rendering is improved.

[0224] The overall implementation schematic diagram of the application texture rendering method of the embodiment of the present application

[0225] Next, with reference to FIG. 14, FIG. 14 is a flow schematic diagram of the application texture rendering method provided by the embodiment of the present application, and based on FIG. 14, the implementation details of the application texture rendering method of the embodiment of the present application will be described in detail.

[0226] (1) The server (first electronic device) acquires the initial resource package of the target application, and the initial resource package includes the initial compressed texture resource of the initial compression format of the target application.

[0227] For example, assuming that the initial compression format is an ETC format and assuming that the initial compressed texture resource is an initial compressed diffuse map resource, the initial resource package includes the initial compressed diffuse map resource in the ETC format, and the texture resource compression format field in the initial resource package is the ETC format.

[0228] (2) The server decompresses the initial compressed texture resource into the target application texture resource, replaces the initial compressed texture resource in the initial resource package with placeholder data, obtains an updated resource package, changes the texture resource compression format field of the updated resource package to the anchor compression format, and sends the updated resource package to the terminal.

[0229] For example, the server decompresses the initial compressed diffuse map resource into the target application diffuse map resource, replaces the initial compressed diffuse map resource in the initial resource package with placeholder data (the placeholder data is specifically “diffuse map”), and the server also changes the texture resource compression format field from the ETC format to the anchor compression format, obtains and sends the updated resource package to the terminal.

[0230] (3) The server compresses the target application texture resource into multiple candidate compressed texture resources according to multiple candidate compression formats respectively.

[0231] For example, the candidate compression formats can be ETC format, ASTC format, PVRTC format, and DXT format, etc. The ETC format corresponds to the candidate compressed texture resource h1, the ASTC format corresponds to the candidate compressed texture resource h2, the PVRTC format corresponds to the candidate compressed texture resource h3, and the DXT format corresponds to the candidate compressed texture resource h4.

[0232] (4) The server stores the multiple candidate compressed texture resources according to the candidate storage addresses corresponding to the texture resource name and the candidate compression format, and stores the target application texture resource.

[0233] The specific process of determining the candidate storage address by the server according to the texture resource name and the candidate compression format has been described in the foregoing, which will not be described here. For example, the multiple candidate storage addresses include: the candidate storage address corresponding to the ETC format is XX: XX\MEh1, the candidate storage address corresponding to the ASTC format is XX: XX\MAh2, the candidate storage address corresponding to the PVRTC format is XX: XX\MPh3, and the candidate storage address corresponding to the DXT format is XX: XX\MDh4, etc.

[0234] (5) The terminal (the second electronic device) receives the application container of the target application from the server, and the application container includes the application program package and the update resource package. Referring to step (1), the update resource package includes the placeholder data and the texture resource compression format field.

[0235] (6) The terminal runs the application program package through the main logic, and in response to identifying that the update resource package contains the placeholder data and the texture resource compression format field in the update resource package is the anchor compression format in the running process, adds a mandatory constraint to the texture processing script, and the mandatory constraint indicates that the anchor compression format is supported.

[0236] (7) The terminal sends a query request to the texture processing script, so that the texture processing script verifies the support for the anchor compression format based on the mandatory constraint, and queries the target compression format supported by the terminal in addition to the anchor compression format. For example, the target compression format supported by the terminal is the ASTC format.

[0237] (8) The terminal inserts a hijacking statement before a rendering function used for rendering the target application; then the terminal executes the hijacking statement, so as to replace the placeholder data in the update resource package with the target compression format.

[0238] (9) The terminal sends a request for the target compressed texture resource to the server based on the target compression format in the resource package. The request can include the texture resource name and the target compression format.

[0239] For example, the terminal replaces the placeholder data in the update resource package with the ASTC format, and the request sent by the terminal to the server includes the diffuse reflection map and the ASTC format.

[0240] (10) When the server receives a request for a target compression texture resource of a target compression format supported by the terminal from the terminal, if the target compression format belongs to a plurality of candidate compression formats, the server acquires the target compression texture resource according to a target storage address corresponding to the texture resource name and the target compression format, and sends it to the terminal. Alternatively, when the server receives a request for a target compression texture resource of a target compression format supported by the terminal from the terminal, if the target compression format does not belong to a plurality of candidate compression formats, the server acquires the target application texture resource stored and sends it to the terminal.

[0241] For example, since the ASTC format supported by the terminal belongs to the ASTC format in the plurality of candidate compression formats, the server can determine the target storage address as XX: XX\MAh2 from the plurality of candidate storage addresses according to the diffuse reflection map and the ASTC format, and acquire the target compression texture resource based on XX: XX\MAh2.

[0242] (11) The terminal receives the target compression texture resource from the server to perform rendering of the target application; or the terminal receives the target application texture resource from the server to perform rendering of the target application.

[0243] The embodiments of the present application can effectively solve the problem of fixed compression format of the individual resource package of the target application (such as WebGL game) issued by the Unity platform according to the terminal, so that the target application has the ability to fully utilize the rendering performance improvement caused by GPU calculation and storage of texture resources on different terminals / devices. From the application running, since the texture resources in the embodiments of the present application are truly on-demand loaded, i.e. loaded into the memory for use only when rendering is needed, the granularity is finer than the Unity resource package solution provided by the Unity platform, and no additional memory occupation caused by other idle resources in the AB package is caused. At the same time, the problem of redundant disk and memory space occupation caused by the same resource being repeatedly packaged in multiple Unity resource packages is also eliminated. From the perspective of application developers, the embodiments of the present application are a corresponding processing of the exported application container, so no modification or editing of the code in the application package is required, and the use mode can be completed through the panel, which is easy to use. The embodiments of the present application have high universality and reduce the occupation of the memory space of the terminal.

[0244] Device and equipment description of the embodiments of the present application

[0245] It can be understood that, although each step in each of the above flowcharts is shown in sequence according to the representation of the arrow, these steps are not necessarily executed in the order represented by the arrow. Unless otherwise specified in the embodiments of the present application, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowcharts can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.

[0246] It should be noted that, in each specific embodiment of the present application, when it is necessary to perform relevant processing according to object attribute information or attribute information set and other data related to object characteristics, the permission or consent of the object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the object attribute information needs to be obtained in the embodiments of the present application, the separate permission or separate consent of the object will be obtained through a pop-up window or by jumping to a confirmation page, and after obtaining the separate permission or separate consent of the object, the necessary object-related data for enabling the embodiments of the present application to operate normally will be obtained.

[0247] FIG. 15 is a structural schematic diagram of an application texture rendering device 1500 applied to a first electronic device according to an embodiment of the present application. Based on FIG. 15, the application texture rendering device 1500 specifically includes:

[0248] A first sending unit 1510 configured to obtain a target application texture resource and placeholder data of a target application, and send the placeholder data to a second electronic device;

[0249] A compression unit 1520 configured to compress the target application texture resource into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats;

[0250] A second sending unit 1530 configured to receive a resource request sent by the second electronic device, the resource request being sent by the second electronic device after obtaining the placeholder data, for requesting a target compressed texture resource, the target compressed texture resource being obtained by compressing the target application texture resource using a target compression format; if the target compression format belongs to the plurality of candidate compression formats, obtaining the target compressed texture resource from the plurality of candidate compressed texture resources, and sending the target compressed texture resource to the second electronic device; wherein the target compressed texture resource is used for rendering the target application by the second electronic device.

[0251] In an embodiment, the first sending unit 1510 is further configured to:

[0252] obtain an initial resource package of the target application, the initial resource package comprising initial compressed texture resources of the target application in an initial compressed format;

[0253] decompress the initial compressed texture resources to obtain the target application texture resources.

[0254] In an embodiment, the initial resource package further comprises an initial compressed format name; the first sending unit 1510 is further configured to:

[0255] obtain an initial compression algorithm corresponding to the initial compressed format name;

[0256] decompress the initial compressed texture resources into the target application texture resources based on the initial compression algorithm.

[0257] In an embodiment, the apparatus further comprises a first obtaining unit configured to:

[0258] obtain an initial resource package of the target application, the initial resource package comprising initial compressed texture resources of the target application;

[0259] replace the initial compressed texture resources in the initial resource package with placeholder data to obtain an updated resource package;

[0260] the first sending unit 1510 is further configured to:

[0261] send the updated resource package to a second electronic device.

[0262] In an embodiment, the apparatus further comprises an updating unit configured to:

[0263] change a texture resource compression format field of the updated resource package to an anchor compression format to obtain a new updated resource package;

[0264] the first sending unit 1510 is further configured to:

[0265] send the new updated resource package to the second electronic device;

[0266] wherein the second electronic device adds a mandatory constraint to a texture processing script when it identifies that the texture resource compression format field is the anchor compression format, the mandatory constraint indicating that the anchor compression format is supported.

[0267] In an embodiment, the placeholder data is a texture resource name, and the resource request comprises the texture resource name and a target compression format; the apparatus further comprises a storage unit configured to:

[0268] For each of the candidate compressed formats, the candidate compressed texture resource is stored according to a candidate storage address corresponding to the texture resource name and the candidate compressed format;

[0269] The second sending unit 1530 is further configured to: if the target compressed format belongs to the plurality of candidate compressed formats, acquire the target compressed texture resource according to a target storage address corresponding to the texture resource name and the target compressed format, where the target storage address belongs to the plurality of candidate storage addresses.

[0270] In an embodiment, the storage unit is further configured to:

[0271] Perform a target operation on the texture resource name and the candidate compressed format to obtain the candidate storage address;

[0272] Store the candidate compressed texture resource according to the candidate storage address;

[0273] The second sending unit 1530 is further configured to:

[0274] If the target compressed format belongs to the plurality of candidate compressed formats, perform the target operation on the texture resource name and the target compressed format to obtain the target storage address.

[0275] In an embodiment, the storage unit is further configured to:

[0276] Obtain a first correspondence table, where the first correspondence table indicates a correspondence between the texture resource name, the candidate compressed format, and a candidate storage address;

[0277] Store the candidate compressed texture resource based on the first correspondence table;

[0278] The second sending unit 1530 is further configured to:

[0279] If the target compressed format belongs to the plurality of candidate compressed formats, find the first correspondence table based on the texture resource name and the target compressed format to obtain the target storage address.

[0280] In an embodiment, the placeholder data is a texture resource name, the resource request includes a target storage address, the target storage address is determined by the second electronic device according to the texture resource name and the target compressed format; and the storage unit is further configured to:

[0281] For each of the candidate compressed formats, the candidate compressed texture resource is stored according to a candidate storage address corresponding to the texture resource name and the candidate compressed format;

[0282] The second sending unit 1530 is further configured to:

[0283] If the target compression format belongs to the plurality of candidate compression formats, obtain the target compressed texture resource according to the target storage address in the resource request, wherein the target storage address belongs to the plurality of candidate storage addresses.

[0284] In an embodiment, the second sending unit 1530 is further configured to:

[0285] If the number of target compression formats is a plurality, obtain the compression loss rate of each target compression format;

[0286] Based on the compression loss rate of each target compression format, select the target storage address corresponding to the target compression format with the minimum compression loss rate from the target storage addresses corresponding to each target compression format;

[0287] Based on the selected target storage address, obtain the target compressed texture resource.

[0288] In an embodiment, the number of target compression formats is a plurality;

[0289] The second sending unit 1530 is further configured to:

[0290] If the number of target compression formats is a plurality, obtain the compression loss rate and the compression rate of each target compression format;

[0291] Obtain a compression gain function, wherein the compression gain function is determined based on the compression texture resource proportion of the plurality of target compression formats, the compression loss rate and the compression rate of each target compression format;

[0292] When the compression gain function is maximized, determine the target compression texture resource proportion of each target compression format;

[0293] Based on the target storage address corresponding to the texture resource name and each target compression format, obtain the compressed texture resource corresponding to each target compression format, and based on the target compression texture resource proportion of each target compression format and the compressed texture resource corresponding to each target compression format, obtain the compressed texture resource component corresponding to each target compression format; integrate the obtained compressed texture resource components of each target compression format into the target compressed texture resource.

[0294] In an embodiment, the second sending unit 1530 is further configured to:

[0295] Obtain the compression gain sub-function of each target compression format, wherein the compression gain sub-function is determined based on the compression loss rate and the compression rate of the target compression format;

[0296] The compression texture resource proportion of each target compression format is taken as a weight of a compression gain sub-function of each target compression format, and each compression gain sub-function is weighted and summed based on the weight to obtain a compression gain function.

[0297] In an embodiment, the second sending unit 1530 is further configured to:

[0298] If the number of target compression formats is multiple, the compression rate of each target compression format is obtained.

[0299] Based on the compression rate of each target compression format, a target storage address corresponding to a target compression format with the maximum compression rate is selected from the target storage addresses corresponding to each target compression format.

[0300] Based on the selected target storage address, a target compression texture resource is obtained.

[0301] In an embodiment, the second sending unit 1530 is further configured to:

[0302] The plurality of candidate compression texture resources and the target application texture resource are stored.

[0303] If the target compression format does not belong to the plurality of candidate compression formats, the target application texture resource stored is obtained and sent to the second electronic device.

[0304] It should be noted that the specific embodiments of the application texture resource rendering device described above are basically the same as the specific embodiments of the application texture resource rendering method described above, and will not be repeated here.

[0305] FIG. 16 is a structural schematic diagram of an application texture rendering device 1600 applied to a second electronic device according to an embodiment of the present application. The application texture rendering device 1600 specifically includes:

[0306] The determining unit 1610 is configured to, in response to obtaining the placeholder data of the target application sent from the first electronic device, determine a target compression format supported by the second electronic device.

[0307] The third sending unit 1620 is configured to send a resource request to the first electronic device, the resource request being used to request a target compression texture resource, the target compression texture resource being obtained by compressing a target application texture resource in a target compression format.

[0308] The first receiving unit 1630 is configured to receive the target compressed texture resource from the first electronic device and perform rendering of the target application based on the target compressed texture resource; wherein the first electronic device, when sending the placeholder data of the target application, also compresses the obtained target application texture resource into a plurality of candidate compressed texture resources in a plurality of candidate compressed formats; the plurality of candidate compressed formats include the target compressed format, and the plurality of candidate compressed texture resources include the target compressed texture resource.

[0309] In an embodiment, the placeholder data exists in an application package; the determining unit 1610 is configured to: run the application package through a main logic, and in response to identifying that the application package contains the placeholder data during the running, query a target compressed format supported by the second electronic device through a texture processing script.

[0310] In an embodiment, the determining unit 1610 is further configured to:

[0311] run the application package through the main logic, in response to identifying that the application package contains the placeholder data during the running and that a texture resource compression format field in the application package is an anchor compressed format, add a mandatory constraint to the texture processing script, the mandatory constraint indicating support for the anchor compressed format;

[0312] send a query request to the texture processing script; wherein the query request is used for the texture processing script to verify support for the anchor compressed format based on the mandatory constraint and to query a target compressed format supported by the second electronic device other than the anchor compressed format.

[0313] In an embodiment, the third sending unit 1620 is configured to:

[0314] insert a hijacking statement before a rendering function used for rendering the target application;

[0315] execute the hijacking statement, the hijacking statement being used to replace the placeholder data in the application package with the target compressed format and to send the resource request to the first electronic device based on the target compressed format in the application package.

[0316] In an embodiment, the first receiving unit 1630 is configured to:

[0317] store the target compressed texture resource in a target storage space and send the target compressed texture resource to a rendering processing unit;

[0318] After receiving the message that the rendering processing unit succeeds in rendering based on the target compressed texture resource, the target compressed texture resource is deleted from the target storage space.

[0319] It should be noted that the specific embodiments of the application texture resource rendering device described above are basically the same as the specific embodiments of the application texture resource rendering method described above, and will not be repeated here.

[0320] Referring to FIG. 17, FIG. 17 is a structural block diagram of part of a second electronic device of an application texture rendering method provided by an embodiment of the application, which can be a terminal, comprising: a radio frequency (RF) circuit 1710, a memory 1715, an input unit 1730, a display unit 1740, a sensor 1750, an audio circuit 1760, a wireless fidelity (WiFi) module 1770, a processor 1780, and a power supply 1790, and the like. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 17 does not constitute a limitation to the mobile phone or computer, and can include more or fewer components than those shown, or combine certain components, or different component arrangements.

[0321] The RF circuit 1710 can be configured to receive and send signals in information or call process, especially, receive the downlink information of the base station and process it by the processor 1780; in addition, send the uplink data to the base station.

[0322] The memory 1715 can be configured to store software programs and modules, and the processor 1780 processes various functions of the content terminal and data processing by running the software programs and modules stored in the memory 1715.

[0323] The input unit 1730 can be configured to receive input digital or character information, and generate key signal input related to the setting and function control of the content terminal. Among them, the input unit 1730 can include a touch panel 1731 and other input devices 1732.

[0324] The display unit 1740 can be configured to display the input information or the provided information and various menus of the content terminal. The display unit 1740 can include a display panel 1741.

[0325] The audio circuit 1760, the speaker 1761, and the microphone 1762 can provide an audio interface.

[0326] In the embodiment of the application, the processor 1780 included in the terminal can execute the application texture rendering method of the foregoing embodiments.

[0327] The terminal of the embodiments of the present application includes but is not limited to a mobile phone, a computer, a smart voice interaction device, a smart household appliance, a vehicle-mounted terminal, an aircraft, etc. The embodiments of the present application can be applied to various scenarios, including but not limited to a content distribution scenario, a game scenario, resource processing, etc.

[0328] FIG. 18 is a structural block diagram of a part of a first electronic device applying the texture rendering method provided by the embodiments of the present application. The first electronic device, such as a server, can have a large difference due to different configurations or performances, and can include one or more central processing units (CPUs) 1822 (for example, one or more processors) and a memory 1832, one or more storage media 1830 (for example, one or more mass storage devices) storing application programs 1842 or data 1844. Among them, the memory 1832 and the storage media 1830 can be temporary storage or persistent storage. The programs stored in the storage media 1830 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the server. Further, the central processing unit 1822 can be configured to communicate with the storage media 1830 and execute a series of instruction operations in the storage media 1830 on the server.

[0329] The server can also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858, and / or one or more operating systems 1841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0330] The central processing unit 1822 in the server can be configured to execute the texture rendering method provided by the embodiments of the present application.

[0331] The embodiments of the present application provide a computer readable storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a processor, cause the processor to execute the texture rendering method provided by the embodiments of the present application.

[0332] The embodiments of the present application provide a computer program product, which includes computer executable instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the computer device executes the texture rendering method.

[0333] The terms "first", "second", "third", "fourth", and the like in the description of the present application and in the claims hereof, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the descriptive terms used herein are used to describe the embodiments of the application, for example, embodied in a different sequential or chronological order. Moreover, the terms "comprise", "comprises", "comprising", "include", "includes", "including" and the like are used synonymously to encompass a potential incorporation of an item listed after such a term in a "open", "inclusive", sense, that is, in a sense of "including, but not limited to?", to encompass the item listed as well as others.

[0334] It should be understood that, in the description of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between the associated contents, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases of only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated contents. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0335] It should be understood that, in the description of the present application, the meaning of multiple (or multiple items) is two or more, greater than, less than, more than, etc. are not included in the number, above, below, etc. are understood to include the number.

[0336] In several embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of units is only a logical function division. Actual implementation can have another division manner. For example, multiple units or components can be combined or integrated into another system, or some features can be omitted or not executed. The coupling or direct coupling or communication connection between the shown or discussed mutual elements can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0337] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0338] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0339] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server 130, or a network device, etc.) execute all or part of the steps of the embodiments of the present application method. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, and various program code storage media.

[0340] It should also be appreciated that the various embodiments provided by the embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0341] The above is a specific description of the embodiments of the present application, but the embodiments of the present application are not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are included in the scope defined by the claims of the present application.

Claims

1. An application texture rendering method, the method being performed by a first electronic device, the method comprising: obtaining a target application texture resource of a target application and placeholder data, and sending the placeholder data to a second electronic device; compressing the target application texture resource into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats respectively; receiving a resource request sent by the second electronic device, the resource request being sent by the second electronic device after obtaining the placeholder data, and being used to request a target compressed texture resource, the target compressed texture resource being obtained by compressing the target application texture resource using a target compression format; if the target compression format belongs to the plurality of candidate compression formats, obtaining the target compressed texture resource from the plurality of candidate compressed texture resources, and sending the target compressed texture resource to the second electronic device; wherein the target compressed texture resource is used for rendering the target application by the second electronic device.

2. The application of the texture rendering method of claim 1, wherein, The obtaining of the target application texture resource comprises: obtaining an initial resource package of the target application, the initial resource package comprising an initial compressed texture resource of the target application in an initial compression format; decompressing the initial compressed texture resource to obtain the target application texture resource.

3. The application of the texture rendering method of claim 2, wherein, The initial resource package further comprises an initial compression format name; The decompressing of the initial compressed texture resource to obtain the target application texture resource comprises: obtaining an initial compression algorithm corresponding to the initial compression format name; decompressing the initial compressed texture resource into the target application texture resource based on the initial compression algorithm.

4. The application of the texture rendering method according to any one of claims 1 to 3, wherein, Before the sending of the placeholder data to the second electronic device, the method further comprises: obtaining an initial resource package of the target application, the initial resource package comprising an initial compressed texture resource of the target application; replacing the initial compressed texture resource in the initial resource package with the placeholder data to obtain an updated resource package; The sending of the placeholder data to the second electronic device comprises: sending the updated resource package to the second electronic device.

5. The application of the texture rendering method of claim 4, wherein, Before the sending of the updated resource package to the second electronic device, the method further comprises: changing a texture resource compression format field of the updated resource package to an anchor compression format to obtain a new updated resource package; The sending of the updated resource package to the second electronic device comprises: sending the new updated resource package to the second electronic device; wherein the second electronic device adds a mandatory constraint to a texture processing script when identifying that the texture resource compression format field is the anchor compression format, the mandatory constraint indicating that the anchor compression format is supported.

6. The application of a texture rendering method according to any one of claims 1 to 5, wherein, The placeholder data is a texture resource name, and the resource request comprises the texture resource name and the target compression format; After the compressing of the target application texture resource into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats respectively, the method further comprises: for each candidate compression format, storing the candidate compressed texture resource according to a candidate storage address corresponding to the texture resource name and the candidate compression format; The method further includes: If the target compression format belongs to the plurality of candidate compression formats, obtaining the target compression texture resource from the plurality of candidate compression texture resources.

7. The application of the texture rendering method of claim 6, wherein, The method further includes: If the target compression format belongs to the plurality of candidate compression formats, performing the target operation on the texture resource name and the target compression format to obtain the target storage address. The method further includes: If the target compression format belongs to the plurality of candidate compression formats, performing the target operation on the texture resource name and the target compression format to obtain the target storage address. The method further includes:

8. The application of the texture rendering method of claim 6, wherein, Obtaining a first correspondence table, the first correspondence table indicating a correspondence relationship among the texture resource name, the candidate compression format, and the candidate storage address. The method further includes: If the target compression format belongs to the plurality of candidate compression formats, searching the first correspondence table based on the texture resource name and the target compression format to obtain the target storage address. The placeholder data is a texture resource name, and the resource request includes a target storage address, which is determined by the second electronic device based on the texture resource name and the target compression format. The method further includes:

9. The application of a texture rendering method according to any one of claims 1 to 5, wherein, For each candidate compression format, storing the candidate compression texture resource according to a candidate storage address corresponding to the texture resource name and the candidate compression format. The method further includes: If the target compression format belongs to the plurality of candidate compression formats, obtaining the target compression texture resource according to the target storage address in the resource request, wherein the target storage address belongs to the plurality of candidate storage addresses. The method further includes: If the number of target compression formats is a plurality, obtaining a compression loss rate of each target compression format.

10. The application of the texture rendering method according to any one of claims 6 to 9, wherein, ​ ​ select, based on compression loss rates of the target compression formats, a target storage address corresponding to a target compression format with a minimum compression loss rate from the target storage addresses corresponding to the target compression formats; obtain a target compressed texture resource based on the selected target storage address.

11. The application of the texture rendering method according to any one of claims 6 to 9, wherein, The obtaining the target compressed texture resource according to the target storage address in the resource request comprises: if the number of target compression formats is multiple, obtaining a compression rate of each target compression format; select, based on compression rates of the target compression formats, a target storage address corresponding to a target compression format with a maximum compression rate from the target storage addresses corresponding to the target compression formats; obtain a target compressed texture resource based on the selected target storage address.

12. The application of the texture rendering method according to any one of claims 1 to 11, wherein, After the target application texture resource is compressed into multiple candidate compressed texture resources according to multiple candidate compression formats, the method further comprises: store the multiple candidate compressed texture resources and the target application texture resource; if the target compression format does not belong to the multiple candidate compression formats, obtain the stored target application texture resource and send it to the second electronic device.

13. An application texture rendering method, the method being performed by a second electronic device, the method comprising: in response to obtaining placeholder data of a target application sent from a first electronic device, determining a target compression format supported by the second electronic device; sending a resource request to the first electronic device, the resource request being used to request a target compressed texture resource, the target compressed texture resource being obtained by compressing a target application texture resource in a target compression format; receiving the target compressed texture resource from the first electronic device and performing rendering of the target application based on the target compressed texture resource; wherein the first electronic device, when sending the placeholder data of the target application, also compresses the obtained target application texture resource into multiple candidate compressed texture resources according to multiple candidate compression formats; the multiple candidate compression formats include the target compression format, and the multiple candidate compressed texture resources include the target compressed texture resource.

14. The application of the texture rendering method of claim 13, wherein, The placeholder data exists in an application package; The determining the target compression format supported by the second electronic device in response to obtaining the placeholder data of the target application sent from the first electronic device comprises: running the application package through a main logic, and in response to identifying that the application package contains placeholder data in the running process, querying the target compression format supported by the second electronic device through a texture processing script.

15. The application of the texture rendering method of claim 14, wherein, The running the application package through the main logic, and in response to identifying that the application package contains placeholder data in the running process, querying the target compression format supported by the second electronic device through the texture processing script comprises: The application package is run by a main logic, and in response to identifying, during running, that the application package contains placeholder data and a texture resource compression format field in the application package is an anchor compression format, a mandatory constraint is added to the texture processing script, the mandatory constraint indicating support for the anchor compression format; A query request is sent to the texture processing script; wherein the query request is used for the texture processing script to verify support for the anchor compression format based on the mandatory constraint, and to query a target compression format supported by the second electronic device in addition to the anchor compression format.

16. The application of a texture rendering method according to any one of claims 13 to 15, wherein, The sending of the resource request to the first electronic device includes: A hijacking statement is inserted before a rendering function used to render the target application; The hijacking statement is executed, and the hijacking statement is used to replace the placeholder data in the application package with the target compression format, and to send the resource request to the first electronic device based on the target compression format in the application package.

17. The application of a texture rendering method according to any one of claims 13 to 16, wherein, The rendering of the target application based on the target compressed texture resource includes: The target compressed texture resource is stored in a target storage space, and the target compressed texture resource is sent to a rendering processing unit; After receiving a message that the rendering processing unit has successfully rendered based on the target compressed texture resource, the target compressed texture resource is deleted from the target storage space.

18. An application texture rendering device, the device comprising: A first sending unit configured to obtain a target application texture resource and placeholder data of a target application, and send the placeholder data to a second electronic device; A compression unit configured to compress the target application texture resource into a plurality of candidate compressed texture resources according to a plurality of candidate compression formats; A second sending unit configured to receive a resource request sent by the second electronic device, the resource request being sent by the second electronic device after obtaining the placeholder data, and being used to request a target compressed texture resource, the target compressed texture resource being obtained by compressing the target application texture resource using a target compression format; If the target compression format belongs to the plurality of candidate compression formats, the target compressed texture resource is obtained from the plurality of candidate compressed texture resources, and the target compressed texture resource is sent to the second electronic device; wherein the target compressed texture resource is used for the second electronic device to render the target application.

19. An application texture rendering device, the device comprising: A determination unit configured to determine a target compression format supported by the second electronic device in response to obtaining placeholder data of a target application sent by a first electronic device; A third sending unit configured to send a resource request to the first electronic device, the resource request being used to request a target compressed texture resource, the target compressed texture resource being obtained by compressing a target application texture resource using a target compression format; A second receiving unit, configured to receive the target compressed texture resource from the first electronic device, and perform rendering of the target application based on the target compressed texture resource; wherein the first electronic device, when sending the placeholder data of the target application, also compresses the obtained target application texture resource into a plurality of candidate compressed texture resources in a plurality of candidate compressed formats; the plurality of candidate compressed formats include the target compressed format, and the plurality of candidate compressed texture resources include the target compressed texture resource. 20.An electronic device, comprising: a memory configured to store computer-executable instructions or computer programs; a processor configured to implement the application texture rendering method of any one of claims 1 to 17 when executing the computer-executable instructions or computer programs stored in the memory. 21.A computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the application texture rendering method of any one of claims 1 to 17. 22.A computer program product comprising computer-executable instructions or computer programs, which, when executed by a processor, implement the application texture rendering method of any one of claims 1 to 17.

Citation Information

Patent Citations

  • Application texture rendering method, related device and medium

    CN118096926B

  • Image processing method and device, computer equipment and storage medium

    CN113327303A

  • Resource loading method, terminal and storage medium

    CN114022343A

  • Image rendering method and device, electronic equipment and storage medium

    CN116700941A

  • Application texture rendering method, related device and medium

    CN118096926A