Resource processing method and device

By looking for and referenced the resource description information in the cache pool, the problem of high memory consumption when the game resource is loaded, and the more efficient resource processing and rendering display.

CN119367775APending Publication Date: 2025-01-28ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411385556.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In projects with massive game resources, due to the large granularity and quantity of AssetBundle packages, the amount of resource data required to be loaded during runtime is large, resulting in excessive memory consumption and affecting system performance.

Method used

By searching for the resource description information of the type of resource type in the cache pool, the resource description information in the cache pool is directly referenced to avoid creating a new resource description information during the loading process, thereby reducing memory occupation.

Benefits of technology

Effectively reduce storage space occupation, improve system performance, and improve the rendering display efficiency of resource objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119367775A_ABST
    Figure CN119367775A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource processing method and device, and the method comprises the steps: determining a first resource type of a to-be-loaded resource in a target scene, and obtaining the to-be-loaded resource according to the first resource type; first resource description information of the first resource type is searched from a cache pool, and the cache pool is used for storing resource description information loaded through the target interface and pre-created; if the first resource description information is found, analyzing the to-be-loaded resource based on the first resource description information to obtain a resource object of the to-be-loaded resource; and rendering and displaying the resource object in the target scene. By searching the first resource description information of the first resource type from the cache pool, the first resource description information in the cache pool can be directly referenced under the condition that the first resource description information matched with the first resource type is stored in the cache pool, and new resource description information does not need to be created for the to-be-loaded resource, so that the resource loading efficiency is improved. Therefore, storage space occupation can be effectively reduced, and system performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and more particularly to a resource processing method and device. Background Art

[0002] Unity is a cross-platform game development engine that supports multiple operating systems and platforms. AssetBundle is a mechanism provided by Unity for packaging and distributing game resources. By packaging resources into different AssetBundle packages (hereinafter referred to as AB packages), you can selectively load or unload required resources during the game, thereby reducing runtime memory pressure.

[0003] However, in projects with massive game resources, the AB package size and number are large, which may cause a large amount of resource data to be loaded during runtime, resulting in excessive memory consumption and affecting system performance. Therefore, a more efficient resource processing method is urgently needed to reduce memory consumption during runtime. Summary of the invention

[0004] In view of this, an embodiment of this specification provides a resource processing method. One or more embodiments of this specification also relate to a resource processing device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a resource processing method is provided, including: Determine a first resource type of a resource to be loaded in a target scene, and obtain the resource to be loaded according to the first resource type; Searching for first resource description information of a first resource type from a cache pool, wherein the cache pool is used to store resource description information loaded and pre-created through a target interface; If the first resource description information is found, the resource to be loaded is parsed based on the first resource description information to obtain a resource object of the resource to be loaded; Render the display resource object in the target scene.

[0006] According to a second aspect of an embodiment of this specification, there is provided a resource processing device, including: A determination module is configured to determine a target resource type of a resource to be loaded in a target scene, and obtain the resource to be loaded according to the target resource type; A search module is configured to search for target resource description information of a target resource type from a cache pool, wherein the cache pool is used to store resource description information loaded and pre-created through a target interface; The parsing module is configured to parse the resource to be loaded based on the target resource description information if the target resource description information is found, and obtain the resource object of the resource to be loaded; The rendering module is configured to render and display resource objects in a target scene.

[0007] According to a third aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above resource processing method are implemented.

[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned resource processing method are implemented.

[0009] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which implements the steps of the above-mentioned resource processing method when executed by a processor.

[0010] An embodiment of the present specification implements determining a first resource type of a resource to be loaded in a target scene, and obtaining the resource to be loaded according to the first resource type; searching for first resource description information of the first resource type from a cache pool, wherein the cache pool is used to store resource description information loaded and pre-created through a target interface; if the first resource description information is found, parsing the resource to be loaded based on the first resource description information to obtain a resource object of the resource to be loaded; and rendering and displaying the resource object in the target scene.

[0011] In this way, by searching for the first resource description information of the first resource type from the cache pool, when the first resource description information matching the first resource type is stored in the cache pool, the first resource description information in the cache pool can be directly referenced, without creating new resource description information for the resource to be loaded during the loading process, thereby effectively reducing storage space occupancy and improving system performance; by parsing the resource to be loaded through the first resource description information, a resource object that can be rendered and displayed in the target scene can be obtained, and runtime loading and rendering and display of the resource object can be realized, thereby improving the rendering and display efficiency of the resource object. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a flow chart of a resource processing method provided by an embodiment of this specification; Figure 2 It is a schematic diagram of a processing process of a resource processing method provided by an embodiment of this specification; Figure 3 is a schematic diagram of the structure of a resource processing device provided by an embodiment of this specification; Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0013] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0014] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0015] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0016] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0017] First, the terms involved in one or more embodiments of this specification are explained.

[0018] Unity: is a cross-platform game development engine that supports deploying games or applications on multiple platforms. It includes tools for creating game scenes, managing resources, writing scripts, and debugging games. It can integrate a variety of development tools and services.

[0019] AssetBundle: AssetBundle is a mechanism for packaging and distributing game resources (such as models, textures, audio, etc.), allowing developers to dynamically load resources at runtime. By packaging game resources with AssetBundle, you can obtain multiple resource compression packages (hereinafter collectively referred to as AB packages) for storing resources. AB packages contain archive files in the game.

[0020] TypeTree: TypeTree is a data structure generated by Unity when building an AB package. It is used to describe the type information of resources in the AB package. It can be used to help Unity identify and correctly deserialize the resources in the AB package when loading resources in the AB package.

[0021] Serialization: During the serialization process of an object, the state data of the object (including properties, fields, etc.) can be converted into a specific format, thereby supporting the object's state data to be saved to disk, database, or transmitted over the network.

[0022] Deserialization: It is the reversal of the serialization process and can restore the object data to its original state.

[0023] AAA-level game projects: generally refer to high-cost, high-volume, high-quality game works. They are rich in game content, usually have a larger world view and complex game systems, and have massive game resources.

[0024] Unity provides a mechanism for packaging and distributing game resources, AssetBundle. Game resources can be packaged into different AB packages through AssetBundle. AB packages can be dynamically loaded and unloaded at runtime, so that game content can be selectively loaded and unloaded, reducing memory pressure at runtime.

[0025] In order to use the resource data in the AB package normally and be compatible with various versions and platforms, usually during the resource loading process, each time an AB package is loaded, a TypeTree corresponding to the AB package will be created in the memory. In this way, the original resource data in the AB package can be correctly extracted and parsed through the TypeTree. However, in projects with a large amount of game resources, especially AAA-level game projects, the amount of TypeTree data required to be loaded during runtime is very large due to the large granularity and number of AB packages. Assuming that 1,000 resource packages need to be loaded during the game, 1,000 TypeTrees need to be created in the memory; accordingly, during the resource unloading process, the 1,000 TypeTrees also need to be recycled separately, and the memory consumption will be very high, seriously affecting the system performance.

[0026] Based on this, an embodiment of the present specification provides a resource processing method, which determines a first resource type of a resource to be loaded in a target scene, and obtains the resource to be loaded according to the first resource type; searches for first resource description information of the first resource type from a cache pool, wherein the cache pool is used to store resource description information loaded and pre-created through a target interface; if the first resource description information is found, the resource to be loaded is parsed based on the first resource description information to obtain a resource object of the resource to be loaded; and the resource object is rendered and displayed in the target scene.

[0027] In this way, by searching for the first resource description information of the first resource type from the cache pool, when the first resource description information matching the first resource type is stored in the cache pool, the first resource description information in the cache pool can be directly referenced, without creating new resource description information for the resource to be loaded during the loading process, thereby effectively reducing storage space occupancy and improving system performance; by parsing the resource to be loaded through the first resource description information, a resource object that can be rendered and displayed in the target scene can be obtained, and runtime loading and rendering and display of the resource object can be realized, thereby improving the rendering and display efficiency of the resource object.

[0028] In this specification, a resource processing method is provided. This specification also relates to a resource processing device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0029] See also Figure 1 , Figure 1 A flow chart of a resource processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0030] Step 102: Determine a first resource type of a resource to be loaded in a target scene, and obtain the resource to be loaded according to the first resource type.

[0031] In actual applications, during the running of the game application, the first resource type of the resources to be loaded in the target scene can be determined according to the target scene currently located by the player, and the resources to be loaded can be obtained according to the first resource type.

[0032] Specifically, the target scene can be understood as the scene that the player is currently in the game, that is, the target scene is the scene within the player's current visual range. When the game has a large world, the target scene can be a map area in the large world, or a game scene under a certain gameplay. The resources to be loaded can be understood as the resources that need to be loaded and rendered and displayed in the target scene, and can be specifically understood as the resources in the AB package. The resources to be loaded may include at least one type of resource object. Resource objects may include textures, models of various objects in the target scene, audio, special effects, and the like. The first resource type can be understood as the resource type of the resource to be loaded, and can also be understood as the variable type in the AB package.

[0033] According to an optional embodiment of the present specification, the resource to be loaded may also be obtained based on information such as resource type and resource name. That is, obtaining the resource to be loaded based on the first resource type may include: The resource to be loaded is acquired according to the first resource type and the resource name of the resource to be loaded.

[0034] Furthermore, the resource to be loaded can be obtained through the API interface provided by Unity, which can include multiple types, such as network interface type or local interface type. If the client locally stores the AB package corresponding to the resource to be loaded, it can be obtained through the local interface; it can also be obtained from the server through the network interface.

[0035] Step 104: searching for first resource description information of the first resource type from a cache pool, wherein the cache pool is used to store resource description information loaded and pre-created through a target interface.

[0036] According to an optional embodiment of the present specification, searching for first resource description information of a first resource type from a cache pool may include the following steps: Each resource description information in the cache pool is traversed to determine whether the resource type of each resource description information matches the first resource type.

[0037] Specifically, the cache pool can also be understood as a cache manager, which is a tool in memory for storing resource description information that has been loaded and created. Resource description information can be understood as information used to describe the resource type of resources in the AB package. Resource types include but are not limited to variable types, version types, platform types, etc. Resource description information is a data structure used to record variables and data types in the AB package, and can handle compatibility issues of AB package resource loading between different Unity versions. Resource description information can also be called TypeTree. The first resource description information can be understood as resource description information with the same resource type as the first resource type. The target interface can be understood as the API interface provided by Unity for loading AB packages and corresponding resource description information.

[0038] Optionally, the specific API interface for loading resources may be determined based on information such as the location and quantity of the resources to be loaded.

[0039] In the actual implementation process, when there is a lot of game resource data, for different scenes, or different areas in the same scene, the same type of resource objects may be packaged into different AB packages. For example, the water surface model in different map scenes is the same, or the interaction effects between the player and the water surface are the same in different map areas. In this case, the resource description information corresponding to the resources to be loaded in different AB packages will have the same layout structure. If the resource description information (that is, TypeTree) has been loaded and created in the memory, then the subsequent resources to be loaded can directly reference the TypeTree if the resource type is the same, without having to create it again.

[0040] In actual applications, resource description information loaded and created in the memory can be stored in the cache pool, and each resource description information has its corresponding resource type. By traversing each resource description information in the cache pool, it is possible to match the resource type of each resource description information based on the first resource type, so that when the match is successful, the first resource description information of the same type as the first resource can be found.

[0041] By applying this embodiment, by traversing each resource description information in the cache pool and determining whether the resource type of each resource description information matches the first resource type, it is possible to find out whether resource description information of the same resource type as the first resource type of the resource to be loaded has been created in the memory. Therefore, if the same resource description information has been created, the first resource description information in the cache pool can be referenced without creating it again in the memory, which can effectively reduce memory usage and improve processing efficiency.

[0042] Step 106: If the first resource description information is found, the resource to be loaded is parsed based on the first resource description information to obtain a resource object of the resource to be loaded.

[0043] In actual applications, when the first resource description information is found, the first resource description information can be directly referenced, and based on the first resource description information, the resource to be loaded is parsed to obtain the resource object of the resource to be loaded.

[0044] Specifically, the resource object can be understood as at least one type of original resource data stored in the AB package. Based on the original resource data, the corresponding game content can be rendered and displayed in the target scene.

[0045] In order to facilitate recording the usage of each resource description information in the cache pool, according to an optional embodiment of the present specification, after searching the cache pool for the first resource description information of the first resource type, the following steps may also be included: If the first resource description information is found, the reference number of the first resource description information is updated, wherein the reference number is used to control the recycling of the first resource description information.

[0046] Specifically, the number of references, which can also be understood as a reference count, can reflect the number of times the first resource description information is referenced.

[0047] By applying this embodiment, by updating the number of references to the first resource description information when the first resource description information is found, the number of times each resource description information is used in the memory can be accurately recorded, thereby facilitating the recycling of the resource description information based on the usage of the resource description information, and effectively optimizing the memory usage problem.

[0048] According to an optional embodiment of the present specification, updating the number of references of the first resource description information may include the following steps: Obtain a first circular queue corresponding to the first resource description information; Increase the current first queue length of the first circular queue by 1.

[0049] In the actual implementation process, for each resource description information in the cache pool, a corresponding circular queue can be created, and the reference count of the resource description information can be realized through the length of the circular queue. Each circular queue can pre-set the maximum length value and the minimum length value of the queue according to actual needs.

[0050] Specifically, the first circular queue can be understood as a circular queue corresponding to the first resource description information. The current first queue length can be understood as a current length value of the first circular queue.

[0051] Optionally, in actual applications, reference counting of each resource description information may be implemented by using the standard library std::shared_ptr or a custom smart pointer.

[0052] By applying this embodiment, by obtaining the first circular queue corresponding to the first resource description information and increasing the current first queue length of the first circular queue by 1, it is possible to record the usage of the resource description information by updating the number of references of the resource description information when the first resource description information is referenced; by using a circular queue, the reference counting efficiency can be improved, thereby improving processing performance.

[0053] According to an optional embodiment of the present specification, parsing the resource to be loaded based on the first resource description information and obtaining the resource object of the resource to be loaded may include the following steps: At least one serialized resource object in the resource to be loaded is extracted according to the first resource description information, and the serialized resource object is deserialized to obtain a resource object.

[0054] Specifically, the serialized resource object can be understood as a resource object in the resource to be loaded.

[0055] In actual applications, in the process of packaging game resources through AssetBundle, the original resource data will be compressed, transcoded and other serialized processes, thereby changing the original data format and obtaining serialized resource data. Therefore, in the process of loading resources, the serialized resource data needs to be deserialized to obtain the resource data in the original data format.

[0056] Optionally, according to the first resource description information, at least one serialized resource object may be extracted from the resource to be loaded, and the serialized resource object may be deserialized to obtain the original resource object.

[0057] By applying this embodiment, at least one serialized resource object in the resource to be loaded is extracted according to the first resource description information, and the serialized resource object is deserialized, so as to ensure the compatibility between different Unity versions and improve the accuracy of the resource object parsing result.

[0058] Step 108: Rendering and displaying the resource object in the target scene.

[0059] In actual applications, when the resource to be loaded is parsed based on the first resource description information and the resource object of the resource to be loaded is obtained, the resource object can be rendered and displayed in the target scene.

[0060] Exemplarily, when the resource object is an interaction effect between a player and an object in a scene, by rendering and displaying the resource object, the corresponding interaction effect can be displayed when the player triggers an interaction with the object; when the resource object is a building model or a tornado model, the building or tornado can be rendered and displayed at a specified location in the target scene.

[0061] According to an optional embodiment of this specification, the resource processing method may further include the following steps: Determine a second resource type of the resource to be uninstalled, and uninstall the resource to be uninstalled according to the second resource type; Searching for second resource description information of a second resource type from the cache pool, and obtaining a second circular queue corresponding to the second resource description information; Decrease the current second queue length of the second circular queue by 1.

[0062] Specifically, the resource to be uninstalled can be understood as the resource that needs to be uninstalled in the game. The second resource type can be understood as the resource type of the resource to be uninstalled. The second resource description information can be understood as the resource description information of the second resource type in the cache pool. The second circular queue is the circular queue corresponding to the second resource description information.

[0063] It should be noted that, when the length of the circular queue is reduced to 0 and the count does not increase within a preset time period, the corresponding resource description information can be recycled.

[0064] By applying this embodiment, during the process of resource unloading, the reference count of the second resource description information of the second resource type in the cache pool can be updated according to the second resource type of the resource to be unloaded, thereby facilitating the recording of the usage of each resource description information in the memory and being able to recycle the resource description information when it has not been used for a long time, thereby effectively alleviating the memory occupation problem and making room for new data.

[0065] In application of this embodiment, the first resource type of the resource to be loaded is obtained, and the resource to be loaded is obtained according to the first resource type; the first resource description information of the first resource type is searched from the cache pool, wherein the cache pool is used to store the resource description information loaded and pre-created through the target interface; if the first resource description information is found, the resource to be loaded is parsed based on the first resource description information to obtain the resource object of the resource to be loaded; and the resource object is rendered and displayed in the target scene. By searching the first resource description information of the first resource type from the cache pool, when the first resource description information matching the first resource type is stored in the cache pool, the first resource description information in the cache pool can be directly referenced, without creating new resource description information for the resource to be loaded in the memory, thereby effectively reducing memory usage and improving system performance; by parsing the resource to be loaded through the first resource description information, a resource object that can be rendered and displayed in the target scene can be obtained, and runtime loading and rendering and display of the resource object can be realized, thereby improving the rendering and display efficiency of the resource object.

[0066] The following combination Figure 2 Taking the resource processing method provided in this specification as an example of loading and unloading the AB package at runtime, the resource processing method is further described. Figure 2 A schematic diagram of a processing process of a resource processing method provided by an embodiment of this specification is shown.

[0067] like Figure 2 As shown, the resource processing method mainly includes two processes: resource loading and resource unloading.

[0068] During the resource loading process, Unity can use various types of loading APIs for AssetBundle resource packages to load the resources to be loaded in the AB package into the memory. At the same time, according to the first resource type of the resource to be loaded, the TypeTree matching the first resource type will be searched from the TypeTreeCache of the MemoryPool. Based on the circular queue, the reference count of the TypeTree is increased by 1.

[0069] According to TypeTree, the serialized resource data in the AB package is deserialized and parsed to obtain the original resource data that can be loaded and used in the game.

[0070] During the resource uninstallation process, you can use the various types of uninstallation APIs provided by Unity for the AssetBundle resource package to uninstall the resource data in the game. Accordingly, according to the second resource type of the resource to be uninstalled, the TypeTree matching the second resource type will be searched from the TypeTreeCache of the MemoryPool. Based on the circular queue, the reference count of the TypeTree is reduced by 1.

[0071] Furthermore, the reference count information of each TypeTree in the TypeTreeCache can be monitored in real time. When the reference count is 0 and remains 0 for a period of time and there is no new reference, such TypeTree is recycled and destroyed.

[0072] By applying this embodiment, by finding out whether a TypeTree of the same resource type as the first resource to be loaded has been created in the memory, it is possible to reference the TypeTree in the TypeTreeCache when the same TypeTree has been created, without having to create it again in the memory, thereby effectively reducing memory usage and improving processing efficiency; by reducing the TypeTree count according to the resource unloading situation, it is possible to timely recycle data that has not been used for a long time according to the resource usage situation, thereby saving memory space.

[0073] The above processing method can effectively optimize the memory size required by TypeTree, and it is expected that about 70% of the overall TypeTree memory usage can be optimized. In addition, the larger the TypeTree memory usage, the better the optimization effect; the more AssetBundle resource packages and the finer the granularity, the better the optimization effect. The above processing method is common to every Unity project and can effectively solve the pain point of excessive TypeTree memory usage for massive resources in AAA-level game projects.

[0074] Corresponding to the above method embodiment, this specification also provides a resource processing device embodiment, Figure 3 FIG. 1 shows a schematic diagram of the structure of a resource processing device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises: The determination module 302 is configured to determine the target resource type of the resource to be loaded in the target scene, and obtain the resource to be loaded according to the target resource type.

[0075] Search module 304: configured to search for target resource description information of a target resource type from a cache pool, wherein the cache pool is used to store resource description information that is loaded and created in advance through a target interface.

[0076] The parsing module 306 is configured to parse the resource to be loaded based on the target resource description information if the target resource description information is found, and obtain the resource object of the resource to be loaded.

[0077] Rendering module 308: configured to render and display resource objects in a target scene.

[0078] Optionally, the search module 304 is further configured to: Each resource description information in the cache pool is traversed to determine whether the resource type of each resource description information matches the first resource type.

[0079] Optionally, the resource processing device further includes an updating module configured to: If the first resource description information is found, the reference number of the first resource description information is updated, wherein the reference number is used to control the recycling of the first resource description information.

[0080] Optionally, the update module is further configured to: Obtain a first circular queue corresponding to the first description resource information; Increase the current first queue length of the first circular queue by 1.

[0081] Optionally, the parsing module 306 is further configured to: At least one serialized resource object in the resource to be loaded is extracted according to the first resource description information, and the serialized resource object is deserialized to obtain a resource object.

[0082] Optionally, the resource processing device further includes an unloading module configured to: Determine a second resource type of the resource to be uninstalled, and uninstall the resource to be uninstalled according to the second resource type; Searching for second resource description information of a second resource type from the cache pool, and obtaining a second circular queue corresponding to the second resource description information; Decrease the current second queue length of the second circular queue by 1.

[0083] By applying this embodiment, by searching for the first resource description information of the first resource type from the cache pool, when the first resource description information matching the first resource type is stored in the cache pool, the first resource description information in the cache pool can be directly referenced without creating new resource description information in the memory for the resource to be loaded, thereby effectively reducing memory usage and improving system performance; by parsing the resource to be loaded through the first resource description information, a resource object that can be rendered and displayed in the target scene can be obtained, and runtime loading and rendering and display of the resource object can be realized, thereby improving the rendering and display efficiency of the resource object.

[0084] The above is a schematic scheme of a resource processing device of this embodiment. It should be noted that the technical scheme of the resource processing device and the technical scheme of the resource processing method described above are of the same concept, and the details not described in detail in the technical scheme of the resource processing device can be found in the description of the technical scheme of the resource processing method described above.

[0085] Figure 4 The block diagram of a computing device 400 according to one embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.

[0086] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0087] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0088] The computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 400 may also be a mobile or stationary server.

[0089] The processor 420 is used to execute the following computer executable instructions, which implement the steps of the above resource processing method when executed by the processor.

[0090] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the resource processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the resource processing method described above.

[0091] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned resource processing method when executed by a processor.

[0092] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the resource processing method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the resource processing method described above.

[0093] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned resource processing method when executed by a processor.

[0094] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the resource processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program product can be found in the description of the technical scheme of the resource processing method described above.

[0095] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0096] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0097] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0098] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0099] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A resource processing method, characterized in that: include: Determine a first resource type of a resource to be loaded in a target scene, and obtain the resource to be loaded according to the first resource type; Searching for first resource description information of the first resource type from a cache pool, wherein the cache pool is used to store resource description information loaded and pre-created through a target interface; If the first resource description information is found, the resource to be loaded is parsed based on the first resource description information to obtain a resource object of the resource to be loaded; The resource object is rendered and displayed in the target scene.

2. The method according to claim 1, characterized in that The searching the cache pool for the first resource description information of the first resource type includes: Each resource description information in the cache pool is traversed to determine whether the resource type of each resource description information matches the first resource type.

3. The method according to claim 1, characterized in that After searching the cache pool for the first resource description information of the first resource type, the method further includes: If the first resource description information is found, the reference number of the first resource description information is updated, wherein the reference number is used to control the recycling of the first resource description information.

4. The method according to claim 3, characterized in that The updating of the reference quantity of the first resource description information includes: Obtain a first circular queue corresponding to the first resource description information; The current first queue length of the first circular queue is increased by 1.

5. The method according to any one of claims 1 to 4, characterized in that: The step of parsing the resource to be loaded based on the first resource description information to obtain the resource object of the resource to be loaded includes: At least one serialized resource object in the resource to be loaded is extracted according to the first resource description information, and the serialized resource object is deserialized to obtain the resource object.

6. The method according to claim 1, characterized in that The method further comprises: Determine a second resource type of the resource to be uninstalled, and uninstall the resource to be uninstalled according to the second resource type; Searching for second resource description information of the second resource type from the cache pool, and obtaining a second circular queue corresponding to the second resource description information; The current second queue length of the second circular queue is reduced by 1.

7. A resource processing device, characterized in that: include: A determination module is configured to determine a target resource type of a resource to be loaded in a target scene, and obtain the resource to be loaded according to the target resource type; A search module is configured to search for target resource description information of the target resource type from a cache pool, wherein the cache pool is used to store resource description information loaded and pre-created through a target interface; A parsing module is configured to parse the resource to be loaded based on the target resource description information if the target resource description information is found, and obtain the resource object of the resource to be loaded; A rendering module is configured to render and display the resource object in the target scene.

8. A computing device, characterized in that include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the resource processing method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which, when executed by a processor, implements the steps of the resource processing method described in any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the resource processing method according to any one of claims 1 to 6.