Object updating method, object updating system and game updating method
By obtaining and preheating the target image rendering resources in the updated resource file, the compilation lag problem of games and applications in the prior art when rendering game scenes are lagging, achieving more efficient resource management and improved user experience.
Patent Information
- Application Number
- CN202510667055.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-06-24
AI Technical Summary
In the prior art, games and applications need to frequently compile shaders when rendering game scenes when rendering engines, resulting in increased computing overhead and memory overhead, and compilation lags may occur.
Get the update resource file of the target object, including the resource index file of the image rendering resource by responding to the update instruction. Use the historical resource index file and resource index file to determine the target image rendering resources that need to be preheated and preheat them to reduce unnecessary preheating resources and time.
Reduces the number of image rendering resources that need to be warmed up, reduces warm-up time, and further reduces computational and memory overhead, thereby improving the user experience.
Smart Images

Figure CN120189716A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technologies, and particularly to an object update method, an object update system, and a game update method. Background Art
[0002] In practical applications, an application can use a shader for image rendering. For example, when the application is a game, the shader can be used to render the game scene to obtain a game scene image for display to game users. Generally, during the running of the game, when the rendering engine renders the game scene image, the shader can be compiled to implement image rendering. However, with the increasing powerful performance of GPUs, the requirements for image rendering are becoming richer and the number of shaders is also increasing. As a result, compiling shaders during the running of the application will increase a large amount of computational overhead and memory overhead, require a large amount of compilation time, and may also cause compilation jams. Therefore, an effective technical solution is urgently needed to solve the above problems. Summary of the Invention
[0003] In view of this, the embodiments of this specification provide an object update method. One or more embodiments of this specification simultaneously relate to an object update device, an object update system, a game update method, a game update device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.
[0004] According to the first aspect of the embodiments of this specification, an object update method is provided, including: Responding to an update instruction for a target object, obtaining an update resource file corresponding to the target object, where the update resource file includes a resource index file of image rendering resources, and the image rendering resources are used for image rendering of the target object; When it is determined that there is a historical resource index file for the target object, determining target image rendering resources according to the historical resource index file and the resource index file; Performing a warm-up process on the target image rendering resources to update the target object.
[0005] According to the second aspect of the embodiments of this specification, an object update device is provided, including: An obtaining module, configured to respond to an update instruction for a target object, obtain an update resource file corresponding to the target object, where the update resource file includes a resource index file of image rendering resources, and the image rendering resources are used for image rendering of the target object; A determination module, configured to determine target image rendering resources according to the historical resource index file and the resource index file when it is determined that there is a historical resource index file for the target object; A preheating module, configured to perform preheating processing on the target image rendering resources to update the target object.
[0006] According to a third aspect of the embodiments of the present specification, an object update system is provided, including an update client and a server, wherein, The update client is configured to generate a resource acquisition request for the target object in response to an update instruction for the target object, and send the resource acquisition request to the server; The server is configured to send an update resource file of the target object to the update client in response to the resource acquisition request, wherein the update resource file includes a resource index file of image rendering resources for image rendering of the target object; The update client is configured to determine target image rendering resources according to the historical resource index file and the resource index file when it is determined that there is a historical resource index file for the target object; perform preheating processing on the target image rendering resources to update the target object.
[0007] According to a fourth aspect of the embodiments of the present specification, a game update method is provided, including: In response to an update instruction for a target game, obtain an update resource file corresponding to the target game, wherein the update resource file includes a resource index file of a shader for image rendering of the target game; When it is determined that there is a historical resource index file for the target game, determine a target shader according to the historical resource index file and the resource index file; Perform preheating processing on the target shader to update the target game.
[0008] According to a fifth aspect of the embodiments of the present specification, a game update device is provided, including: An acquisition module, configured to obtain an update resource file corresponding to a target game in response to an update instruction for the target game, wherein the update resource file includes a resource index file of a shader for image rendering of the target game; A determination module, configured to determine a target shader according to the historical resource index file and the resource index file when it is determined that there is a historical resource index file for the target game; A preheating module, configured to perform preheating processing on the target shader to update the target game.
[0009] According to a sixth aspect of the embodiments of the present specification, a computing device is provided, including: A memory and a 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 above method are implemented.
[0010] According to a seventh aspect of the embodiments of the present specification, a computer-readable storage medium is provided, which stores computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the above method are implemented.
[0011] According to an eighth aspect of the embodiments of the present specification, a computer program product is provided, including computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the above method are implemented.
[0012] An object update method provided by an embodiment of the present specification includes: in response to an update instruction for a target object, obtaining an update resource file corresponding to the target object, where the update resource file includes a resource index file of image rendering resources for rendering an image of the target object; in the case of determining that the target object has a historical resource index file, determining target image rendering resources according to the historical resource index file and the resource index file; and performing preheating processing on the target image rendering resources to update the target object.
[0013] In the above method, after responding to an update instruction for a target object, an update resource file corresponding to the target object can be obtained. The update resource file may include a resource index file of image rendering resources for rendering an image of the target object. In the case of determining that the target object has a historical resource index file, target image rendering resources that need to be preheated can be determined according to the historical resource index file and the resource index file, and preheating processing is performed on the target image rendering resources to update the target object. By using the historical resource index file and the resource index file to determine the target image rendering resources, the screening of the image rendering resources that need to be preheated is realized, and it is not necessary to preheat all the image rendering resources, reducing the number of image rendering resources that need to be preheated, thereby reducing the preheating time and further reducing the computing overhead and memory overhead, thus ensuring the user experience. Description of the Drawings
[0014] Figure 1 is a flowchart of an object update method provided by an embodiment of the present specification; Figure 2 It is a schematic structural diagram of an object update device provided by an embodiment of this specification; Figure 3 It is a schematic structural diagram of an object update system provided by an embodiment of this specification; Figure 4 It is a flowchart of a game update method provided by an embodiment of this specification; Figure 5 It is a schematic structural diagram of a game update device provided by an embodiment of this specification; Figure 6 It is a block diagram of the structure of a computing device provided by an embodiment of this specification. Detailed implementation manners
[0015] Many specific details are set forth in the following description in order to provide a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of this specification. Therefore, this specification is not limited by the specific implementations disclosed below.
[0016] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0017] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such 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 "when" or "while" or "in response to determining".
[0018] 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 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. Moreover, the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0019] First, the noun terms involved in one or more embodiments of this specification are explained.
[0020] Shader: A program that runs on the Graphics Processing Unit (GPU) and is used to perform calculations for specific parts during the graphics rendering process. They are a key technology in modern computer graphics for achieving realistic visual effects and complex image processing. Shaders allow developers to precisely control the color, texture, light and shadow, and other characteristics of the object surface and can also achieve real-time graphics special effects.
[0021] GPU: Graphics Processing Unit, a processor specifically designed for quickly processing image and video data and performing graphics rendering tasks.
[0022] MD5: Message-Digest Algorithm 5, a widely used cryptographic hash function that generates a 128-bit (16-byte) hash value for input data (messages) of any length. Its main purpose is to verify data integrity, that is, to confirm that the data has not been tampered with or damaged.
[0023] In practical applications, in an application program, such as in a game, when the rendering engine discovers that a new shader needs to be compiled during drawing, there will be a problem of shader compilation lag, and at this time, it is necessary to stop and wait for the driver to complete the compilation.
[0024] A shader is a program executed on the GPU and will process multiple steps when rendering 3D images, such as processing transformations, deformations, shadows, lighting, post-processing, and so on. Usually, these steps are written in a high-level language, so they need to be compiled into machine code to run on the GPU. This process is similar to the processing process of the CPU, where code written in a high-level language can be sent to a compiler and then instructions can be generated in a specific architecture.
[0025] However, there is a crucial difference between the two: usually, each platform has only one or two sets of CPU instruction sets, but there are a variety of GPU models, so the instruction sets are also diverse. Therefore, although CPU programs can be directly compiled into executable machine code and distributed, different methods must be adopted for GPU programs, and high-level shader codes will be compiled into intermediate representations or bytecodes.
[0026] Games can release these bytecode binary files, so there will be only a unified shader library instead of providing different libraries for each possible GPU architecture. At runtime, the driver will convert the bytecode into executable code for the GPU installed in the device. This method is sometimes also used for CPU programs. For example, Java source code is also written as bytecode so that the same binary file can run on all platforms with a Java environment, regardless of the CPU of the device.
[0027] In the initial stage of using this method, the shaders of the game were relatively simple and small in number, and the process of converting from bytecode to execution code was also simple and direct, so the runtime overhead was almost negligible. As GPUs become more powerful, shader codes increase, and the driver also starts to handle more complex conversions to generate more efficient machine code, which leads to a more serious problem of runtime compilation overhead.
[0028] The driver can save the compiled executable code to the hard disk so that it can be directly loaded when encountered during subsequent game processes. This method is suitable for various engines to use the preheating method to optimize stuttering. However, the first preheating and the preheating after program updates will take a long loading time and additional memory overhead. Discarding after pre-caching avoids additional memory overhead, but when needed, it has to be retrieved from the driver cache. Although this is much faster than compilation, it still takes a certain amount of time, resulting in a slight stutter during the first rendering of the material. Especially in the context of frequent updates of large 3D online games, the experience of each preheating will be very poor, but not preheating cannot ensure that the in-game experience of users is not stuttering. Therefore, an effective technical solution is urgently needed to solve the above problems.
[0029] In this specification, an object update method is provided. This specification also relates to an object update device, an object update system, a game update method, a game update device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail one by one in the following embodiments.
[0030] See Figure 1 , Figure 1The figure shows a flowchart of an object update method provided according to an embodiment of this specification, which specifically includes the following steps.
[0031] Step 102: In response to an update instruction for a target object, obtain the update resource file corresponding to the target object, where the update resource file includes a resource index file of image rendering resources, and the image rendering resources are used for image rendering of the target object.
[0032] Specifically, the object update method provided in the embodiments of this specification can be applied to a client on which a target object is deployed, and can be used to perform shader warm-up tasks. Specifically, it can be applied to fields such as film and animation production, virtual reality and augmented reality, scientific visualization, gaming, and medical imaging. In the field of film and animation production, during the process of computer-generated images and animated films, realistic material and lighting effects can be achieved through shaders, thereby enhancing the authenticity of visual effects; in the field of virtual reality and augmented reality, more realistic environments and objects can be created through shaders; in the field of scientific visualization, shaders can be used to render and display complex three-dimensional data sets in real time, such as meteorological models, geological structures, etc., enabling scientists to better analyze and present their research results; in the medical field, shaders can be used to improve the quality of medical images and improve diagnostic accuracy through specific rendering techniques; in the gaming field, shaders can be used to render more realistic game scenes and further enhance the gaming experience of game users. Then, in these fields, the target object can be an application program or service for image rendering, etc.
[0033] Among them, the target object can be understood as an object that uses a shader for image rendering. The target object can be, for example, an image processing application program, a game, etc. The update resource file can be understood as a resource file for updating the target object, the image rendering resources can be understood as shaders, and the resource index file can be understood as an index file for managing image rendering resources.
[0034] In practical applications, the resource index file can contain references to multiple image rendering resources or directly contain the program code of multiple image rendering resources for easy management and loading; or, the resource index file can be used to record the shader variants actually used by the target object. Or, the resource index file can be used to record information such as the location and version of the shader; or, the resource index file can be a mapping table for associating the shader name with its shader information (such as the source file path, compilation options, etc.) for quickly locating the shader. The embodiments of this specification do not limit this.
[0035] For ease of understanding, in the embodiments of this specification, the target object is exemplified by a game. Then, the updated resource file can be a game resource file for updating the game. The game resource file may include texture files, model files, shader files, audio files, animation files, font files, script files, map and level data, game configuration files, material files, etc. Texture files can be used to define the surface details of objects in the game, such as walls, floors, character skins, etc. Model files can be used to describe the shapes and structures of objects in the game. The shader file is the resource file for the above-mentioned image rendering resources, and the shader file can be used to determine how to render the image, including colors, lighting effects, etc. Audio files can include the background music, sound effects, and character voices of the game. Animation files can include action sequences for controlling game characters or other objects. Font files can be used to display text information in the game. Script files can be used to configure game logic, event trigger conditions, etc. Map and level data can be used to define the layout of the game world, including terrain, obstacle positions, game character distributions, etc. Game configuration files can include game setting parameters, such as resolution, volume size, etc. Material files can be used to define the surface properties of objects in the game, such as glossiness, transparency, etc. Material files are usually used in combination with texture files and shader files to achieve specific visual effects. Then, when the game needs to be updated, these game resource files can be downloaded to update the game.
[0036] Based on this, the client can, in response to an update instruction for the target object, send a resource acquisition request for the target object to the server. The server receives the resource acquisition request and can send the updated resource file of the target object to the client to enable the client to download the updated resource file of the target object. In practical applications, taking the target object as a game as an example, the user can enter the game through the client and click the update control on the game login interface. The user's click operation on the update control can be the user's update instruction for the game.
[0037] Step 104: When it is determined that there is a historical resource index file for the target object, determine the target image rendering resource according to the historical resource index file and the resource index file.
[0038] Among them, the historical resource index file can be understood as the resource index file stored locally on the client for the target object. For example, it can be the resource index file downloaded during the last update of the target object, or the resource index file downloaded during the installation of the target object, etc. The target image rendering resource can be understood as the image rendering resource that needs to be preheated in the current update of the target object, that is, the shader that needs to be preheated.
[0039] Specifically, when it is determined that the historical resource index file of the target object is stored in the local memory of the client where the target object is deployed, the target image rendering resources that need to be preheated for this update can be determined based on the historical resource index file and the resource index file obtained in step 102.
[0040] When specifically implemented, determining the target image rendering resources based on the historical resource index file and the resource index file includes: Comparing the historical resource index file with the resource index file to obtain a comparison result; Based on the comparison result, determining the differential image rendering resources between the historical resource index file and the resource index file, and determining the differential image rendering resources as the target image rendering resources.
[0041] Among them, the differential image rendering resources can be understood as the incremental image rendering resources of the resource index file compared with the historical resource index file. For example, if the historical resource index file contains image rendering resources 1, 2, and 3, and the resource index file contains image rendering resources 2, 3, 4, and 5, then image rendering resources 4 and 5 are the differential image rendering resources.
[0042] Specifically, the image rendering resources included in the historical resource index file and the image rendering resources included in the resource index file can be compared to obtain a comparison result, and based on the comparison result, the incremental image rendering resources of the resource index file compared with the historical resource index file are determined, and the incremental image rendering resources are determined as the target image rendering resources.
[0043] In summary, by comparing the downloaded resource index file with the historical resource index file stored locally on the client, and taking the incremental image rendering resources as the target image rendering resources that need to be preheated subsequently, it is not necessary to preheat all the image rendering resources included in the resource index file that do not need to be downloaded, reducing the preheating time and thus enhancing the user experience.
[0044] Further, after obtaining the update resource file corresponding to the target object, it further includes: When it is determined that there is no historical resource index file for the target object, determining the image rendering resources as the target image rendering resources.
[0045] Specifically, when it is determined that the historical resource index file of the target object is not stored in the local memory of the client where the target object is deployed, all the image rendering resources included in the resource index file obtained in step 102 can be directly determined as the target image rendering resources.
[0046] In practical applications, taking a game as an example of the target object, when the game is installed, the historical resource index file of the game is not stored in the local memory of the game client being installed. At this time, all the image rendering resources in the downloaded resource index file are determined as the target image rendering resources that need to be preheated. Subsequently, preheating is performed on the target image rendering resources, so that there will be no lag when the user logs in to the game for the first time.
[0047] Step 106: Perform preheating processing on the target image rendering resources to update the target object.
[0048] Among them, the process of performing preheating processing on the target image rendering resources can be understood as the process of performing preheating processing on the shader. Performing preheating processing on the shader can be understood as the process of compiling and loading the shader program into the graphics processing unit (GPU) in advance before actually using the shader for rendering, which helps to reduce or avoid performance bottlenecks or delays caused by shader compilation during the actual rendering process.
[0049] Specifically, after determining the target image rendering resources that need to be preheated, the target image rendering resources can be compiled and loaded to update the target object. After the update of the target object is completed, start the target object and call the pre-compiled and loaded target image rendering resources at any time without waiting for compilation.
[0050] In practical applications, the updated resource file also includes the resource file of the image rendering resources; The performing preheating processing on the target image rendering resources to update the target object includes: Determine the target resource file of the target image rendering resources from the resource file of the image rendering resources; Perform compilation processing on the target resource file to update the target object.
[0051] Among them, the resource file of the image rendering resources can be understood as the bytecode file of the shader. Then, the process of performing compilation processing on the target resource file can be understood as the process of converting the bytecode file of the shader into the executable code of the GPU.
[0052] Specifically, after determining the target shader that needs to be preheated, the target bytecode file of the target shader can be determined from the bytecode file of the shader included in the updated resource file, and the target bytecode file is converted into the executable code of the GPU, so as to achieve the compilation of the target shader and thus achieve the update of the target object.
[0053] Furthermore, as an intermediate encoding file, the bytecode file of the shader can also reduce the additional memory overhead during the warm-up process.
[0054] In practical applications, the resource file of the image rendering resource may also include the bytecode files of shader variants. A shader variant can be understood as different versions of a shader generated based on the same base shader through different compilation options. Each variant of the shader may include or exclude certain specific functions, such as whether to enable shadow calculation, which lighting model to use, etc. It can be understood that the shader variant can also be the above-mentioned image rendering resource. Then, based on this, the target shader and / or the variants of the target shader can be compiled to update the target object.
[0055] In summary, by compiling the target resource file, the warm-up of the target image rendering resource is achieved, avoiding the lag problem that may occur after the subsequent startup of the target object.
[0056] In addition, the server of the target object can package the updated resource file of the target object. Specifically, the server can receive the initial resource file of the target object sent by the development client, where the initial resource file includes the resource file of the image rendering resource; generate a resource index file of the image rendering resource according to the resource file of the image rendering resource; and determine the resource file of the image rendering resource and the resource index file as the updated resource file corresponding to the target object.
[0057] Among them, the development client can be understood as the development client of the target object. For example, it can be the client of game developers. Then, the initial resource file sent by the development client can be the resource file to be updated of the target object uploaded by game developers through the development client, such as the program code of the shader, etc.
[0058] In practical applications, after the server receives the resource file of the image rendering resource sent by the development client, it can parse the resource file to generate a resource index file of the image rendering resource, and determine the resource file of the image rendering resource and the resource index file as the updated resource file of the target object. In the case of receiving a resource acquisition request from the update client, it can send the updated resource file of the target object to the update client.
[0059] Furthermore, when parsing the resource file of the image rendering resource, the server can obtain the resource information of the image rendering resource, and perform encryption processing on the resource file and the resource information of the image rendering resource based on a preset encryption algorithm to obtain the resource index file of the image rendering resource.
[0060] Among them, the preset encryption algorithm can be the MD5 encryption algorithm, and the resource information can include the attribute information and variant information of the shader, etc.
[0061] In practical applications, the server can receive the bytecode file of the shader, parse the bytecode file of the shader to obtain the variants of the shader and the bytecode files of the variants, and perform encryption processing on the bytecode file of the shader and the bytecode files of the variants based on the MD5 encryption algorithm to obtain the resource index file.
[0062] In summary, in the above method, after responding to the update instruction for the target object, the updated resource file corresponding to the target object can be obtained. The updated resource file can include the resource index file of the image rendering resources for rendering the target object. When it is determined that there is a historical resource index file for the target object, the target image rendering resources to be preheated can be determined according to the historical resource index file and the resource index file, and preheating processing is performed on the target image rendering resources to update the target object. By using the historical resource index file and the resource index file to determine the target image rendering resources, the screening of the image rendering resources to be preheated is realized, and it is not necessary to preheat all the image rendering resources, reducing the number of image rendering resources to be preheated, thereby reducing the preheating time, further reducing the computing overhead and memory overhead, and thus ensuring the user experience.
[0063] Corresponding to the above method embodiment, this specification also provides an embodiment of an object update device. Figure 2 The structural schematic diagram of an object update device provided by an embodiment of this specification is shown. As Figure 2 shown, the device includes: An obtaining module 202, configured to obtain the updated resource file corresponding to the target object in response to an update instruction for the target object, where the updated resource file includes a resource index file of image rendering resources, and the image rendering resources are used to perform image rendering on the target object; A determining module 204, configured to determine the target image rendering resources according to the historical resource index file and the resource index file when it is determined that there is a historical resource index file for the target object; A preheating module 206, configured to perform preheating processing on the target image rendering resources to update the target object.
[0064] In an optional embodiment, the updated resource file further includes the resource file of the image rendering resources; The preheating module 206 is further configured to: Determine the target resource file of the target image rendering resources from the resource file of the image rendering resources; Compile the target resource file to update the target object.
[0065] In an optional embodiment, the determining module 204 is further configured to: Compare the historical resource index file and the resource index file to obtain a comparison result; According to the comparison result, determine the differential image rendering resources between the historical resource index file and the resource index file, and determine the differential image rendering resources as the target image rendering resources.
[0066] In an optional embodiment, the determining module 204 is further configured to: In the case where it is determined that the historical resource index file of the target object does not exist, determine the image rendering resources as the target image rendering resources.
[0067] In the above device, after responding to an update instruction for a target object, an update resource file corresponding to the target object can be obtained. The update resource file may include a resource index file of image rendering resources for image rendering of the target object. In the case where it is determined that the target object has a historical resource index file, the target image rendering resources that need to be preheated can be determined according to the historical resource index file and the resource index file, and preheating processing is performed on the target image rendering resources to update the target object. By using the historical resource index file and the resource index file to determine the target image rendering resources, the screening of the image rendering resources that need to be preheated is realized, and it is not necessary to preheat all the image rendering resources, reducing the number of image rendering resources that need to be preheated, thereby reducing the preheating time and further reducing the computing overhead and memory overhead, thus ensuring the user experience.
[0068] The above is a schematic solution of an object update device according to this embodiment. It should be noted that the technical solution of the object update device and the technical solution of the above object update method belong to the same concept. For the details not described in detail in the technical solution of the object update device, reference can be made to the description of the technical solution of the above object update method.
[0069] Corresponding to the above method embodiment, this specification also provides an object update system embodiment, Figure 3 showing a schematic structural diagram of an object update system provided by an embodiment of this specification. As Figure 3 shown, the system includes an update client 302 and a server 304, where, The update client 302 is configured to generate a resource acquisition request for the target object in response to an update instruction for the target object, and send the resource acquisition request to the server 304; The server 304 is configured to send an update resource file of the target object to the update client 302 in response to the resource acquisition request, where the update resource file includes a resource index file of image rendering resources for rendering an image of the target object; The update client 302 is configured to determine target image rendering resources according to the historical resource index file and the resource index file when it is determined that there is a historical resource index file for the target object; perform warm-up processing on the target image rendering resources to update the target object.
[0070] Among them, the update client can be understood as a client on which the target object is deployed.
[0071] In an optional embodiment, the server 304 is further configured to: Receive an initial resource file for the target object sent by a development client, where the initial resource file includes a resource file of the image rendering resources; Generate a resource index file of the image rendering resources according to the resource file of the image rendering resources; Determine the resource file of the image rendering resources and the resource index file as the update resource file corresponding to the target object.
[0072] Among them, the development client can be understood as a client that develops the target object. When the target object is a game, the development client can be a client of game developers.
[0073] In an optional embodiment, the server 304 is further configured to: Parse the resource file of the image rendering resources to obtain resource information of the image rendering resources; Perform encryption processing on the resource file of the image rendering resources and the resource information to obtain a resource index file of the image rendering resources.
[0074] In the above system, after responding to an update instruction for a target object, an update resource file corresponding to the target object can be obtained. The update resource file may include a resource index file of image rendering resources for rendering an image of the target object. When it is determined that the target object has a historical resource index file, the target image rendering resources that need to be preheated can be determined based on the historical resource index file and the resource index file, and preheating processing can be performed on the target image rendering resources to update the target object. By using the historical resource index file and the resource index file to determine the target image rendering resources, the screening of the image rendering resources that need to be preheated is realized, and it is not necessary to preheat all image rendering resources, reducing the number of image rendering resources that need to be preheated, thereby reducing the preheating time and further reducing the computing overhead and memory overhead, so as to ensure the user experience.
[0075] The above is a schematic solution of an object update system according to this embodiment. It should be noted that the technical solution of this object update system and the technical solution of the above object update method belong to the same concept. For the details not described in detail in the technical solution of the object update system, reference can be made to the description of the technical solution of the above object update method.
[0076] See Figure 4 , Figure 4 which shows a flowchart of a game update method according to an embodiment of this specification, specifically including the following steps.
[0077] Step 402: Respond to an update instruction for a target game, and obtain an update resource file corresponding to the target game, where the update resource file includes a resource index file of a shader for rendering an image of the target game; Step 404: When it is determined that the target game has a historical resource index file, determine a target shader according to the historical resource index file and the resource index file; Step 406: Perform preheating processing on the target shader to update the target game.
[0078] Among them, the target game can be understood as the above target object, the shader can be understood as the above image rendering resources, and the target shader can be understood as the above target image rendering resources.
[0079] It can be understood that the specific implementation process of this game update method is similar to the specific implementation process of the above object update method, and this embodiment of this specification will not repeat it here.
[0080] In the above method, after responding to an update instruction for a target game, an update resource file corresponding to the target game can be obtained. The update resource file may include a resource index file of a shader used for image rendering of the target game. When it is determined that there is a historical resource index file for the target game, the target shader to be preheated can be determined according to the historical resource index file and the resource index file, and the target shader can be preheated to update the target game. By using the historical resource index file and the resource index file to determine the target shader, the screening of the shaders that need to be preheated is realized, and it is not necessary to preheat all shaders, reducing the number of shaders that need to be preheated, thereby reducing the preheating time, further reducing the computational overhead and memory overhead, and thus ensuring the user experience.
[0081] The above is a schematic solution of a game update method according to this embodiment. It should be noted that the technical solution of this game update method and the technical solution of the above object update method belong to the same concept. For the details not described in detail in the technical solution of the game update method, reference can be made to the description of the technical solution of the above object update method.
[0082] Corresponding to the above method embodiment, this specification also provides an embodiment of a game update device. Figure 5 The structural schematic diagram of a game update device provided by an embodiment of this specification is shown. As Figure 5 shown, the device includes: An obtaining module 502, configured to obtain an update resource file corresponding to the target game in response to an update instruction for the target game, where the update resource file includes a resource index file of a shader, and the shader is used for image rendering of the target game; A determining module 504, configured to determine a target shader according to the historical resource index file and the resource index file when it is determined that there is a historical resource index file for the target game; A preheating module 506, configured to perform a preheating process on the target shader to update the target game.
[0083] In the above device, after responding to an update instruction for a target game, an update resource file corresponding to the target game can be obtained. The update resource file may include a resource index file of a shader for image rendering of the target game. When it is determined that there is a historical resource index file for the target game, the target shader to be preheated can be determined based on the historical resource index file and the resource index file, and preheating processing can be performed on the target shader to update the target game. By using the historical resource index file and the resource index file to determine the target shader, the screening of the shader to be preheated is realized, and there is no need to preheat all shaders, reducing the number of shaders to be preheated, thereby reducing the preheating time and further reducing the computing overhead and memory overhead, so as to ensure the user experience.
[0084] The above is a schematic solution of a game update device according to this embodiment. It should be noted that the technical solution of the game update device and the technical solution of the above object update method belong to the same concept. For the details not described in detail in the technical solution of the game update device, reference can be made to the description of the technical solution of the above object update method.
[0085] Figure 6 FIG. shows a structural block diagram of a computing device 600 according to an embodiment of the present specification. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 through a bus 630, and a database 650 is used to store data.
[0086] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0087] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 other components not shown may also be connected to each other, for example, via a bus. It should be understood that Figure 6 the block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0088] The computing device 600 can 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 smartphone), a wearable computing device (e.g., a smartwatch, 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 600 can also be a mobile or stationary server.
[0089] Wherein, the processor 620 is used to execute the following computer program / instructions, and when the computer program / instructions are executed by the processor, the steps of the above method are implemented.
[0090] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the computing device, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the corresponding description in the method embodiment.
[0091] An embodiment of this specification also provides a computer-readable storage medium storing computer programs / instructions, which, when executed by a processor, implement the steps of the above method.
[0092] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the computer-readable storage medium, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the corresponding description in the method embodiment.
[0093] An embodiment of this specification also provides a computer program product including computer programs / instructions, which, when executed by a processor, implement the steps of the above method.
[0094] The above is a schematic solution of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above method belong to the same concept. For the details not described in detail in the technical solution of the computer program product, reference can be made to the description of the technical solution of the above method.
[0095] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order from that in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0096] The computer instructions include computer program code, which may be in the form of source code, object code, 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 media, USB flash drives, external hard drives, magnetic disks, optical discs, computer memories, read-only memories (ROMs), random access memories (RAMs), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0097] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described action sequence, because according to the embodiments of this specification, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.
[0098] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed 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 alternative embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can well understand and utilize this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. An object update method, characterized in that, Including: In response to an update instruction for a target object, obtain an update resource file corresponding to the target object, where the update resource file includes a resource index file of image rendering resources, and the image rendering resources are used for image rendering of the target object; When it is determined that there is a historical resource index file for the target object, determine target image rendering resources according to the historical resource index file and the resource index file; Perform preheating processing on the target image rendering resources to update the target object.
2. The method according to claim 1, wherein The update resource file further includes the resource file of the image rendering resources; The performing preheating processing on the target image rendering resources to update the target object includes: Determine a target resource file of the target image rendering resources from the resource file of the image rendering resources; Perform compilation processing on the target resource file to update the target object.
3. The method according to claim 1, characterized in that The determining target image rendering resources according to the historical resource index file and the resource index file includes: Compare the historical resource index file and the resource index file to obtain a comparison result; According to the comparison result, determine the differential image rendering resources between the historical resource index file and the resource index file, and determine the differential image rendering resources as the target image rendering resources.
4. The method according to any one of claims 1 to 3, characterized in that After obtaining the update resource file corresponding to the target object, it further includes: When it is determined that there is no historical resource index file for the target object, determine the image rendering resources as the target image rendering resources.
5. An object update system, characterized in that, Including an update client and a server, where The update client is configured to, in response to an update instruction for the target object, generate a resource acquisition request for the target object, and send the resource acquisition request to the server; The server is configured to, in response to the resource acquisition request, send the update resource file of the target object to the update client, where the update resource file includes a resource index file of image rendering resources, and the image rendering resources are used for image rendering of the target object; The update client is configured to, when it is determined that there is a historical resource index file for the target object, determine target image rendering resources according to the historical resource index file and the resource index file; perform preheating processing on the target image rendering resources to update the target object.
6. The system according to claim 5, wherein The server is further configured to: Receive an initial resource file for the target object sent by a development client, where the initial resource file includes the resource file of the image rendering resources; Generate a resource index file of the image rendering resources according to the resource file of the image rendering resources; Determine the resource file of the image rendering resources and the resource index file as the update resource file corresponding to the target object.
7. The system according to claim 6, wherein The server is further configured to: Parse the resource file of the image rendering resources to obtain resource information of the image rendering resources; Encrypt the resource file of the image rendering resource and the resource information to obtain the resource index file of the image rendering resource.
8. A game update method, characterized in that, Comprising: In response to an update instruction for a target game, obtain the update resource file corresponding to the target game, wherein the update resource file includes a resource index file of a shader for rendering an image of the target game; When it is determined that there is a historical resource index file for the target game, determine a target shader according to the historical resource index file and the resource index file; Perform a warm-up process on the target shader to update the target game.
9. A computing device, characterized in that, Comprising: A memory and a 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 method according to any one of claims 1 to 4 or 8 are implemented.
10. A computer-readable storage medium, characterized in that, It stores computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 4 or 8 are implemented.
11. A computer program product, characterized in that, Comprising computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 4 or 8 are implemented.