Game resource processing method and device, and electronic device

By optimizing the generation process of composite images during game resource updates, the number of composite images updated was reduced, the problem of excessively large patch files was solved, and the user experience was improved.

CN116637373BActive Publication Date: 2026-07-31SHANGHAI NETEASE CUICAN NETWORK TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI NETEASE CUICAN NETWORK TECHNOLOGY CO LTD
Filing Date
2023-04-17
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

When updating game resources, modifying the size of some image resources increases the number of composite images, resulting in larger patch files. This requires users to consume more data to update, impacting the user experience.

Method used

By acquiring updated images, the target composite image in the composite image is determined, and an updated composite image is generated based on the updated images, thus optimizing the composite image generation process and reducing the number of updates required for the composite images.

Benefits of technology

The number of times composite images in game resources have been updated has been reduced, resulting in smaller patch files and an improved user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116637373B_ABST
    Figure CN116637373B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and electronic device for processing game resources. The method involves acquiring an updated image corresponding to a target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of the multiple original images; based on the updated image, a target composite image is determined from at least one composite image; the target composite image includes the image content of the original image corresponding to the updated image; based on the updated image and the target composite image, an updated composite image is generated to update the target game resource; the updated composite image at least contains the image content of the updated image. In this method, when an image in the game resource needs to be updated, a composite image generated based on the original image of the updated image is preferentially selected for updating, reducing the number of composite images to be updated in the game resource, thereby making the patch file of the game resource smaller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a method, apparatus, and electronic device for processing game resources. Background Technology

[0002] After a game system begins serving players, game content is typically updated using patches. When modifying image resources, if a composite image has already been generated, but the size of a particular image resource needs to be changed, it may be necessary to re-combine the images in the project file containing that image resource, generating multiple new composite images. This results in larger update patches, requiring users to consume more data to update the game, leading to a poor user experience. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for processing game resources, so as to reduce the number of composite images updated when the game's image resources are updated, thereby reducing the size of the patch file.

[0004] In a first aspect, embodiments of the present invention provide a method for processing game resources, comprising: obtaining an updated image corresponding to a target game resource; the target game resource including at least one composite image; the composite image being generated based on multiple original images; the composite image including image content of the multiple original images; determining a target composite image among at least one composite image based on the updated image; the target composite image including image content of the original image corresponding to the updated image; generating an updated composite image based on the updated image and the target composite image to update the target game resource; the updated composite image at least including image content of the updated image.

[0005] Secondly, embodiments of the present invention provide a game resource processing apparatus, comprising: an update image acquisition module, configured to acquire an update image corresponding to a target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes image content of multiple original images; a target composite image determination module, configured to determine a target composite image in at least one composite image based on the update image; the target composite image includes image content of the original image corresponding to the update image; and a resource update module, configured to generate an update composite image based on the update image and the target composite image to update the target game resource; the update composite image at least includes image content of the update image.

[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method for processing game resources.

[0007] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described method for processing game resources.

[0008] The embodiments of the present invention bring the following beneficial effects:

[0009] The aforementioned method, apparatus, and electronic device for processing game resources involve acquiring an updated image corresponding to a target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of the multiple original images; based on the updated image, a target composite image is determined from at least one composite image; the target composite image includes the image content of the original image corresponding to the updated image; based on the updated image and the target composite image, an updated composite image is generated to update the target game resource; the updated composite image at least contains the image content of the updated image. In this method, when an image in the game resource needs to be updated, a composite image generated based on the original image of the updated image is preferentially selected for updating, reducing the number of composite images to be updated in the game resource, thereby making the patch file of the game resource smaller.

[0010] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0011] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0012] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0013] Figure 1 A flowchart illustrating a method for processing game resources according to an embodiment of the present invention;

[0014] Figure 2 A schematic diagram of multiple original images provided for embodiments of the present invention;

[0015] Figure 3 This is a schematic diagram of a composite image generated from multiple original images, provided in an embodiment of the present invention.

[0016] Figure 4 A schematic diagram of a game resource processing device provided in an embodiment of the present invention;

[0017] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] After the game is released, it needs to be updated via patches. When modifying some image resources, under the original image compositing process, all composite image resources are cleared and composited according to CCS (Computer-Generated Sites) each time the graphical user interface (UI) resources are packaged. A CCS can be understood as a folder; typically, content related to a game module or gameplay mechanic is placed in one CCS, and the specific settings can be customized. Image resources referenced by the project within the same CCS will be packaged into the same composite image (also simply called a "composite image").

[0020] The image merging process is performed as follows: First, a CCS unit is parsed, and non-engineering images within it are processed. During processing, images are dynamically loaded, and it is determined whether they need to be merged with images in the CSD project file into a single image. If not, the non-engineering images are treated as individual images. Then, each CSD file is parsed, and high-frequency images are extracted. High-frequency images refer to images in the CSD file whose reference count exceeds a threshold, or images in CSD files with specific names. High-frequency images require separate image merging. For other images in the CSD file, the atlas parameters of the images referenced by a single CSD file are calculated. These parameters include the identifier and size information of the referenced images. Then, it is determined whether the CSD file can be included in an existing composite image for merging. If so, it is included; otherwise, one or more composite images are generated based on these images. The generated composite images (also known as the aggregation result) are copied to a preset packaging file directory, and redundant folders in the packaging file directory are cleaned up. Typically, each directory corresponds to one composite image. The system can also compare the composited images with the previous packaged results to determine if there have been any changes. If so, the directory structure and the corresponding composite images need to be readjusted. Finally, the image resources are saved as a composite image in the graphical user interface resources.

[0021] In this scenario, a simple change to the size of an image resource can lead to a series of combined image modifications, ultimately resulting in a large patch file. This causes users to spend more data to update the patch file, potentially leading to user churn and low conversion rates. Therefore, it is necessary to minimize the number of combined images modified when updating some image resources.

[0022] Based on this, the present invention provides a method, apparatus and electronic device for processing game resources, which can be applied to various scenarios that require core dumping.

[0023] See Figure 1 First, a method for processing game resources provided by an embodiment of the present invention will be introduced, which includes the following steps:

[0024] Step S102: Obtain the updated image corresponding to the target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of multiple original images.

[0025] The original images in game assets can be texture images of 2D or 3D models in the game, as well as logo images displayed in the game scene or control images displayed on functional pages. The number of images in game assets is usually very large, so image compositing can be used to categorize and save them.

[0026] The aforementioned composite images, also known as atlases, are a common type of art resource in game development. An atlas is a resource created by merging multiple original images into a single large image using specialized tools and indexed by an attribute table file. This attribute table file typically includes reference information for each original image and its position within the composite image. The reference information can usually be one of several, such as the game's project file name, reference location, reference number, or a string generated based on this information. Additionally, other files can record the dimensions of each original image, such as length and width. The size limitations of the composite image are usually determined by relevant personnel based on the needs of the game project, for example, limiting the composite image size to 2048*2048. Figure 2 As shown, these are multiple original images. Figure 3 As shown, this is a composite image generated from multiple original images.

[0027] Using an atlas composed of multiple original images as art assets in a game has the following advantages: when compositing the atlas, the blank areas around each original image are removed, and various optimization algorithms can be implemented as a whole, which can greatly reduce the game package size and memory usage after compositing the atlas.

[0028] Step S104: Based on the updated image, determine at least one target composite image in the composite image; the target composite image includes the image content of the original image corresponding to the updated image.

[0029] The updated image mentioned above is typically obtained by cropping, rotating, or replacing the corresponding original image. The updated image replaces the original image in the game, such as as a texture map or control icon. Both the updated image and the corresponding original image are referenced through the same project file. The updated image can use the same referencing information as the original image. This referencing information can be the name, attributes, and other identifiers of the project file referencing the updated image and its corresponding original file, or it can be a preset reference code. The referencing code can be a string consisting of letters and backslashes or numbers. This reference code can also be considered an identifier for the updated image and its corresponding original image.

[0030] Since the attribute table file of the composite image can record reference information of the original images used to generate the composite image, the target composite image corresponding to the updated image can be found based on the reference information of the updated image. When there are multiple composite images, the reference information of the updated image can be searched sequentially in the attribute table file of each composite image. If found, the composite image can be identified as the target composite image. Furthermore, the original image corresponding to the found reference information can be identified as the original image corresponding to the updated image.

[0031] When only one image is being updated, its corresponding target composite image is usually also one. In some special cases, if the corresponding original image is used to generate multiple composite images, the found target composite images can also be multiple. This is not a restriction. When multiple images are being updated, their corresponding target composite images can be one, meaning the original images to be updated are displayed in a single composite image; or they can be multiple, meaning the multiple original images to be updated were used to generate different composite images.

[0032] Step S106: Based on the updated image and the target composite image, generate an updated composite image to update the target game resources; the updated composite image must contain at least the image content of the updated image.

[0033] Because optimization algorithms are used when generating composite images to include as many original images as possible to reduce memory usage, the composite image displays less white space between the original images. Therefore, when the updated image is larger than the original images, it cannot directly replace the corresponding original images in the target composite image to generate the updated composite image.

[0034] Based on the above, it is necessary to determine whether the length and width of the updated image are smaller than the length and width of the corresponding original image, thereby determining whether the display space of the original image content in the target composite image is sufficient to display the image content of the updated image. If the updated image is small, an updated composite image can be directly generated based on the updated image and other original images used to generate the target composite image. Specifically, the image content of the updated image can directly replace the display content of the corresponding original image in the target composite image; alternatively, a merging algorithm can be used to re-plan the display positions of the other original images and the updated image in the composite image, thereby generating an updated composite image. If the updated image is large, a new composite image needs to be generated based on the updated image; this composite image can also be called the updated composite image.

[0035] When there are multiple update images and multiple target composite images, if an update image is larger than its corresponding original image and cannot be merged into the corresponding target composite image, and there are other target composite images that cannot accommodate the image content of the corresponding update image, the size of the update image can be compared with the size of the original image that needs to be updated in other target composite images. If the size of the update image is smaller than the size of the original image that needs to be updated in other target composite images, an updated composite image can be generated based on the update image and the other original images in the target composite image (excluding the original image that needs to be updated). The updated composite image contains the image content of the update image, as well as the image content of the other original images in the aforementioned target composite images (excluding the original image that needs to be updated).

[0036] If there are other updated images that cannot be merged into the target composite image, updated composite images can be generated based on these updated images, and the image information in the newly generated composite image can be recorded through the attribute table file.

[0037] The aforementioned method for processing game resources involves obtaining an updated image corresponding to a target game resource. The target game resource includes at least one composite image. The composite image is generated based on multiple original images. The composite image includes the image content of the multiple original images. Based on the updated image, a target composite image is determined from at least one composite image. The target composite image includes the image content of the original image corresponding to the updated image. Based on the updated image and the target composite image, an updated composite image is generated to update the target game resource. The updated composite image at least contains the image content of the updated image. In this method, when an image in the game resource needs to be updated, a composite image generated based on the original image of the updated image is preferentially selected for updating, reducing the number of composite images to be updated in the game resource, thus resulting in a smaller patch file for the game resource.

[0038] The following embodiments provide an implementation for determining a target composite image in at least one composite image based on an updated image.

[0039] In practical implementation, along with generating the composite image, corresponding image compositing information is usually generated. This information can be stored in an attribute table file or other similar file system. Image compositing information typically includes references to multiple original images used to generate the composite image. These references can indicate the application scenario of the original image within the target game resources—that is, which project file(s) references the original image at which location—or they can serve as a reference identifier for the original image, usually represented by a defined string. Different original images typically have different reference information, and obtaining this reference information usually allows for unique identification of each original image.

[0040] When determining the target image, if there is only one composite image in the target game resource, the reference information of the updated image is searched from the image composition information of that composite image. If found, that composite image is determined as the target composite image. If there are multiple composite images in the target game resource, the reference information of the updated image is searched from the image composition information of each composite image. If found, that composite image is determined as the target composite image. Generally, one updated image corresponds to only one target composite image.

[0041] The following embodiments provide an implementation method for generating an updated composite image based on an updated image and a target composite image.

[0042] The image compositing information for the aforementioned composite image typically also records the dimensions of the multiple original images used to generate the composite image, such as length and width. During the regeneration of the target composite image, the dimensions of the original image corresponding to the updated image need to be retrieved from the image compositing information of the target composite image. Then, based on the dimensions of the updated image and the original images, it is determined whether the updated image is smaller than the corresponding original image. Generally, if both the length and width of the updated image are smaller than the length and width of the corresponding original image, it is considered that the updated image is smaller than the corresponding original image. In this case, the image content of the original image corresponding to the updated image in the target composite image can be replaced with the image content of the updated image, thus obtaining the updated composite image. When there are multiple updated images and only one target composite image, all updated images must be smaller than their corresponding original images in order to regenerate the target composite image based on the updated images.

[0043] When there are multiple update images and multiple target composite images, the update images and target composite images are first matched based on the size information of the multiple update images and the image composition information of the multiple target composite images to obtain the matching results. Then, based on the matching results, the update composite image is generated.

[0044] During the matching process, for each updated image, the size information of the original image corresponding to the updated image is first determined from the image compositing information of the target composite image corresponding to the updated image. Based on the size information of the updated image and the size information of the original image, it is determined whether the updated image is smaller than the corresponding original image. The specific judgment process is as described above and will not be repeated here. If the updated image is smaller than the corresponding original image, it is determined that the updated image and the corresponding target composite image are matched; otherwise, it is determined that the updated image and the corresponding target composite image are not matched, and the updated image is determined to be an unmatched image, and the target composite image corresponding to the updated image is determined to be an unmatched composite image. Then, it is necessary to match the unmatched images among multiple updated images with the unmatched composite images among multiple target composite images. For example, the original image 1 in the first composite image has a corresponding updated image 1, that is, the image content of the updated image 1 needs to replace the image content of the original image 1. However, since the updated image 1 is larger than the original image 1, the updated image 1 is determined to be an unmatched image, and the first composite image is determined to be an unmatched composite image.

[0045] When there is only one unmatched image and one unmatched composite image, no further processing is needed since they have already been matched. When there are multiple unmatched images and one or more unmatched composite images, the following operations can be performed on each unmatched image in a predetermined order: First, determine the current composite image from the multiple unmatched composite images. For example, the predetermined order can be arranged from high to low according to the length and / or height dimensions of the unmatched images. Then, based on the size information of the unmatched image and the size information of the target original image corresponding to the current composite image, determine whether the unmatched image is smaller than the target original image. Here, the target original image is the original image corresponding to the target updated image among the multiple original images used to generate the current composite image; the target updated image is the updated image corresponding to the current composite image. For example, if the first composite image is an unmatched image, and the original image 1 used to synthesize the first composite image has a corresponding updated image 1, then the original image 1 is the aforementioned target original image, and the updated image 1 is the target updated image. During the matching process between the updated image 2 and the first composite image, the size of the updated image 2 needs to be compared with the size of the original image 1 to determine whether the updated image 2 matches the first composite image. If yes, determine that the unmatched image matches the current composite image, and identify the unmatched composite image as a matched composite image; otherwise, continue to determine the current composite image from multiple unmatched composite images until all unmatched images have been matched with multiple unmatched composite images.

[0046] The matching results typically include an updated image and a target composite image that matches the updated image. At this point, an updated composite image can be generated based on the updated image and the target composite image that matches it. The updated composite image includes the image content of the updated image and a portion of the image content from the target composite image. The portion of the image content includes the image content of the target composite image excluding the image content of the original target image. The original target image is the original image among the multiple original images used to generate the target composite image that corresponds to the target updated image. The target updated image is the updated image corresponding to the target composite image. Specifically, when the original image 1 in the first composite image has a corresponding updated image 1, and the first composite image does not match the updated image 1 but matches the updated image 2, the image content of the original image 1 in the first composite image can be deleted, and the image content of the updated image 2 can be placed in the corresponding blank area. At this point, the first composite image with the replaced image content is the updated composite image, which includes both the image content of the updated image 2 and the image content of other original images besides the original image 1 in the original first composite image.

[0047] In some cases, the matching results may include updated images that do not have a matching target composite image, such as an updated image that is too large and has no matching target composite image. In this case, an updated composite image can be generated directly based on the updated image that does not have a matching target composite image; in this case, the updated composite image only includes the image content of the updated image. When there are multiple updated composite images, it is possible to generate only one updated composite image or multiple updated composite images.

[0048] This invention also provides another method for processing game resources, which... Figure 1 This method is implemented based on the method shown. In the process of determining the correspondence between the directory and the composite image in the original image merging process, this method records the paths and dimensions of all image resources in each composite image during the current merging process, as an image merging record (also known as "image merging information"). Therefore, when it is necessary to modify the image resources, it can be achieved through the following steps:

[0049] 1. If modifications are made to some image resources within the game assets, the result of the previous image merging should be used first. During this process, the original image corresponding to the image to be updated can be determined in the merged image based on the path or other reference information of the image that needs to be updated.

[0050] 2. Compare the length and width changes of each image in the composite image corresponding to the image that needs to be updated. If the length and width of the changed image are both smaller than the original length and width, the composite image can still be merged according to the original composite image record; otherwise, the image that needs to be updated is regarded as an image that cannot be kept in its original state and cached, and the changed composite image is also cached.

[0051] 4. After filtering out all images that cannot be preserved in their original state and all composite images that have been modified, still using CCS as the unit, iterate through all composite images that have been modified under a single CCS, and try to merge the images that cannot be preserved in their original state one by one. Finally, a new composite image can be generated based on the single image resources that cannot be added to the composite image.

[0052] 5. Ultimately, only composite images with changes or newly added composite images need to be included in the patch file.

[0053] This approach prioritizes graph merging based on graph merging records, reducing the time consumed by the graph merging algorithm, decreasing the number of modifications required for the final merged graph, and lowering the size of online update patches, thereby improving user conversion rates.

[0054] For the above method embodiments, see Figure 4 The embodiment of the present invention shown provides a game resource processing device, which includes:

[0055] The image acquisition module 402 is used to acquire the updated image corresponding to the target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of multiple original images;

[0056] The target composite image determination module 404 is used to determine, based on the updated image, at least one target composite image in the composite image; the target composite image includes the image content of the original image corresponding to the updated image;

[0057] The resource update module 406 is used to generate an updated composite image based on the updated image and the target composite image, so as to update the target game resources; the updated composite image contains at least the image content of the updated image.

[0058] The aforementioned game resource processing apparatus acquires an updated image corresponding to a target game resource. The target game resource includes at least one composite image. The composite image is generated based on multiple original images. The composite image includes the image content of the multiple original images. Based on the updated image, a target composite image is determined from at least one composite image. The target composite image includes the image content of the original image corresponding to the updated image. Based on the updated image and the target composite image, an updated composite image is generated to update the target game resource. The updated composite image at least contains the image content of the updated image. In this method, when an image in the game resource needs to be updated, a composite image generated based on the original image of the updated image is preferentially selected for updating, reducing the number of composite images to be updated in the game resource, thereby making the patch file of the game resource smaller.

[0059] The aforementioned composite image has image compositing information; the image compositing information includes reference information of multiple original images used to generate the composite image; the reference information is used to indicate the application scenario of the original image in the target game resource; the target composite image determination module is also used to: for each composite image in at least one composite image, search for the reference information of the updated image in the image compositing information of the composite image; if found, determine the found composite image as the target composite image.

[0060] The aforementioned composite image has image compositing information; the image compositing information includes the size information of multiple original images used to generate the composite image; the step of generating an updated composite image based on the updated image and the target composite image includes: determining the size information of the original image corresponding to the updated image from the image compositing information of the target composite image; determining whether the updated image is smaller than the corresponding original image based on the size information of the updated image and the size information of the original image; if so, replacing the image content of the original image corresponding to the updated image in the target composite image with the image content of the updated image to obtain the updated composite image.

[0061] The aforementioned composite image has image compositing information; the image compositing information includes the size information of multiple original images used to generate the composite image; there are multiple updated images; there are multiple target composite images; the resource update module is also used to: match the multiple updated images with the multiple target composite images based on the size information of the multiple updated images and the image compositing information of the multiple target composite images to obtain a matching result; and generate an updated composite image based on the matching result.

[0062] The aforementioned resource update module is also used for: for each updated image, determining the size information of the original image corresponding to the updated image from the image compositing information of the target composite image corresponding to the updated image; based on the size information of the updated image and the size information of the original image, determining whether the updated image is smaller than the corresponding original image; if so, determining that the updated image matches the corresponding target composite image; if not, determining that the updated image does not match the corresponding target composite image, identifying the updated image as an unmatched image, and identifying the target composite image corresponding to the updated image as an unmatched composite image; and matching the unmatched images among multiple updated images with the unmatched composite images among multiple target composite images.

[0063] The aforementioned unmatched images include multiple images; the unmatched composite images include multiple images; the aforementioned resource update module is also used to perform the following operations on each unmatched image in a set order: determine the current composite image from the multiple unmatched composite images; based on the size information of the unmatched image and the size information of the target original image corresponding to the current composite image, determine whether the unmatched image is smaller than the target original image; the target original image is the original image corresponding to the target updated image among the multiple original images used to generate the current composite image; the target updated image is the updated image corresponding to the current composite image; if yes, determine that the unmatched image matches the current composite image, and determine the unmatched composite image as a matched composite image; if no, continue to determine the current composite image from the multiple unmatched composite images until the unmatched image has been matched with all the multiple unmatched composite images.

[0064] The aforementioned resource update module is also used to: generate an updated composite image based on the updated image and a target composite image that matches the updated image; wherein, the updated composite image includes the image content of the updated image and a portion of the image content of the target composite image; the portion of the image content includes the image content of the target composite image other than the image content of the target original image; the target original image is the original image corresponding to the target updated image among multiple original images used to generate the target composite image; the target updated image is the updated image corresponding to the target composite image.

[0065] The matching results mentioned above include updated images that do not have matching target composite images; the resource update module is also used to: generate updated composite images based on updated images that do not have matching target composite images; the updated composite images include the image content of the updated images.

[0066] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-mentioned method for processing game resources. Specifically:

[0067] Obtain the updated image corresponding to the target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of multiple original images; based on the updated image, determine the target composite image in at least one composite image; the target composite image includes the image content of the original image corresponding to the updated image; based on the updated image and the target composite image, generate an updated composite image to update the target game resource; the updated composite image at least contains the image content of the updated image.

[0068] In the above method, when images in game resources need to be updated, composite images generated based on the original images of the updated images are selected for updating first, which reduces the number of composite images to be updated in game resources, thus making the patch files of game resources smaller.

[0069] Optionally, the aforementioned composite image has image compositing information; the image compositing information includes reference information of multiple original images used to generate the composite image; the reference information is used to indicate the application scenario of the original image in the target game resource; the step of determining the target composite image in at least one composite image based on the updated image includes: for each composite image in at least one composite image, searching for reference information of the updated image in the image compositing information of the composite image; if found, determining the found composite image as the target composite image.

[0070] Optionally, the above-mentioned composite image has image compositing information; the image compositing information includes the size information of multiple original images used to generate the composite image; the step of generating an updated composite image based on the updated image and the target composite image includes: determining the size information of the original image corresponding to the updated image from the image compositing information of the target composite image; determining whether the updated image is smaller than the corresponding original image based on the size information of the updated image and the size information of the original image; if so, replacing the image content of the original image corresponding to the updated image in the target composite image with the image content of the updated image to obtain the updated composite image.

[0071] Optionally, the above-mentioned composite image has image compositing information; the image compositing information includes the size information of multiple original images used to generate the composite image; the updated image includes multiple images; the target composite image includes multiple images; the step of generating an updated composite image based on the updated image and the target composite image includes: matching the multiple updated images with the multiple target composite images based on the size information of the multiple updated images and the image compositing information of the multiple target composite images to obtain a matching result; and generating an updated composite image based on the matching result.

[0072] Optionally, the step of matching multiple updated images with multiple target composite images based on the size information of multiple updated images and the image compositing information of multiple target composite images includes: for each updated image, determining the size information of the original image corresponding to the updated image from the image compositing information of the target composite image corresponding to the updated image; determining whether the updated image is smaller than the corresponding original image based on the size information of the updated image and the size information of the original image; if so, determining that the updated image matches the corresponding target composite image; if not, determining that the updated image does not match the corresponding target composite image, identifying the updated image as an unmatched image, and identifying the target composite image corresponding to the updated image as an unmatched composite image; and matching the unmatched images among the multiple updated images with the unmatched composite images among the multiple target composite images.

[0073] Optionally, the aforementioned unmatched images include multiple images; the unmatched composite images include multiple images; the step of matching the unmatched images in the multiple updated images with the unmatched composite images in the multiple target composite images includes: performing the following operations on each unmatched image in a predetermined order: determining the current composite image from the multiple unmatched composite images; determining whether the unmatched image is smaller than the target original image based on the size information of the unmatched image and the size information of the target original image corresponding to the current composite image; the target original image is the original image corresponding to the target updated image among the multiple original images used to generate the current composite image; the target updated image is the updated image corresponding to the current composite image; if yes, determining that the unmatched image matches the current composite image, and determining the unmatched composite image as a matched composite image; if no, continuing to determine the current composite image from the multiple unmatched composite images until the unmatched image has been matched with all the multiple unmatched composite images.

[0074] Optionally, the matching result includes the updated image and the target composite image that matches the updated image; the step of generating the updated composite image based on the matching result includes: generating the updated composite image based on the updated image and the target composite image that matches the updated image; wherein, the updated composite image includes the image content of the updated image and a portion of the image content of the target composite image; the portion of the image content includes the image content of the target composite image other than the image content of the target original image; the target original image is the original image corresponding to the target updated image among a plurality of original images used to generate the target composite image; the target updated image is the updated image corresponding to the target composite image.

[0075] Optionally, the matching results mentioned above include updated images that do not have matching target composite images; the step of generating an updated composite image based on the matching results includes: generating an updated composite image based on the updated images that do not have matching target composite images; the updated composite image includes the image content of the updated image.

[0076] See Figure 5 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-mentioned method for processing game resources.

[0077] Furthermore, Figure 5 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.

[0078] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0079] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. Processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0080] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-mentioned method for processing game resources.

[0081] The present invention provides a method, apparatus, and electronic device for processing game resources, including a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding embodiments. Specifically:

[0082] Obtain the updated image corresponding to the target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of multiple original images; based on the updated image, determine the target composite image in at least one composite image; the target composite image includes the image content of the original image corresponding to the updated image; based on the updated image and the target composite image, generate an updated composite image to update the target game resource; the updated composite image at least contains the image content of the updated image.

[0083] In the above method, when images in game resources need to be updated, composite images generated based on the original images of the updated images are selected for updating first, which reduces the number of composite images to be updated in game resources, thus making the patch files of game resources smaller.

[0084] Optionally, the aforementioned composite image has image compositing information; the image compositing information includes reference information of multiple original images used to generate the composite image; the reference information is used to indicate the application scenario of the original image in the target game resource; the step of determining the target composite image in at least one composite image based on the updated image includes: for each composite image in at least one composite image, searching for reference information of the updated image in the image compositing information of the composite image; if found, determining the found composite image as the target composite image.

[0085] Optionally, the above-mentioned composite image has image compositing information; the image compositing information includes the size information of multiple original images used to generate the composite image; the step of generating an updated composite image based on the updated image and the target composite image includes: determining the size information of the original image corresponding to the updated image from the image compositing information of the target composite image; determining whether the updated image is smaller than the corresponding original image based on the size information of the updated image and the size information of the original image; if so, replacing the image content of the original image corresponding to the updated image in the target composite image with the image content of the updated image to obtain the updated composite image.

[0086] Optionally, the above-mentioned composite image has image compositing information; the image compositing information includes the size information of multiple original images used to generate the composite image; the updated image includes multiple images; the target composite image includes multiple images; the step of generating an updated composite image based on the updated image and the target composite image includes: matching the multiple updated images with the multiple target composite images based on the size information of the multiple updated images and the image compositing information of the multiple target composite images to obtain a matching result; and generating an updated composite image based on the matching result.

[0087] Optionally, the step of matching multiple updated images with multiple target composite images based on the size information of multiple updated images and the image compositing information of multiple target composite images includes: for each updated image, determining the size information of the original image corresponding to the updated image from the image compositing information of the target composite image corresponding to the updated image; determining whether the updated image is smaller than the corresponding original image based on the size information of the updated image and the size information of the original image; if so, determining that the updated image matches the corresponding target composite image; if not, determining that the updated image does not match the corresponding target composite image, identifying the updated image as an unmatched image, and identifying the target composite image corresponding to the updated image as an unmatched composite image; and matching the unmatched images among the multiple updated images with the unmatched composite images among the multiple target composite images.

[0088] Optionally, the aforementioned unmatched images include multiple images; the unmatched composite images include multiple images; the step of matching the unmatched images in the multiple updated images with the unmatched composite images in the multiple target composite images includes: performing the following operations on each unmatched image in a predetermined order: determining the current composite image from the multiple unmatched composite images; determining whether the unmatched image is smaller than the target original image based on the size information of the unmatched image and the size information of the target original image corresponding to the current composite image; the target original image is the original image corresponding to the target updated image among the multiple original images used to generate the current composite image; the target updated image is the updated image corresponding to the current composite image; if yes, determining that the unmatched image matches the current composite image, and determining the unmatched composite image as a matched composite image; if no, continuing to determine the current composite image from the multiple unmatched composite images until the unmatched image has been matched with all the multiple unmatched composite images.

[0089] Optionally, the matching result includes the updated image and the target composite image that matches the updated image; the step of generating the updated composite image based on the matching result includes: generating the updated composite image based on the updated image and the target composite image that matches the updated image; wherein, the updated composite image includes the image content of the updated image and a portion of the image content of the target composite image; the portion of the image content includes the image content of the target composite image other than the image content of the target original image; the target original image is the original image corresponding to the target updated image among a plurality of original images used to generate the target composite image; the target updated image is the updated image corresponding to the target composite image.

[0090] Optionally, the matching results mentioned above include updated images that do not have matching target composite images; the step of generating an updated composite image based on the matching results includes: generating an updated composite image based on the updated images that do not have matching target composite images; the updated composite image includes the image content of the updated image.

[0091] See Figure 5 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-mentioned method for processing game resources.

[0092] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0093] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0094] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0095] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0096] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for processing game resources, characterized in that, include: Obtain the updated image corresponding to the target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of multiple original images; the composite image has image compositing information; the image compositing information includes reference information of multiple original images used to generate the composite image; the reference information is used to indicate the application scenario of the original images in the target game resource; For each of the at least one composite image, the reference information of the updated image is searched in the image composition information of the composite image; If found, the found composite image is determined as the target composite image; the target composite image includes the image content of the original image corresponding to the updated image; Based on the updated image and the target composite image, an updated composite image is generated to update the target game resource; the updated composite image at least contains the image content of the updated image; The image compositing information includes the size information of multiple original images used to generate the composite image; The updated images include multiple images; the target composite images include multiple images. The step of generating an updated composite image based on the updated image and the target composite image includes: Based on the size information of the multiple updated images and the image synthesis information of the multiple target synthesized images, the multiple updated images are matched with the multiple target synthesized images to obtain a matching result; Based on the matching results, an updated composite image is generated.

2. The method of claim 1, wherein, The synthesized image has image synthesis information; the image synthesis information includes the size information of multiple original images used to generate the synthesized image; The step of generating an updated composite image based on the updated image and the target composite image includes: The size information of the original image corresponding to the updated image is determined from the image synthesis information of the target synthesized image; Based on the size information of the updated image and the size information of the original image, it is determined whether the updated image is smaller than the corresponding original image; If so, replace the image content of the original image corresponding to the updated image in the target composite image with the image content of the updated image to obtain the updated composite image.

3. The method of claim 1, wherein, The step of matching the multiple updated images with the multiple target composite images based on the size information of the multiple updated images and the image compositing information of the multiple target composite images includes: For each updated image, the size information of the original image corresponding to the updated image is determined from the image compositing information of the target composite image corresponding to the updated image; Based on the size information of the updated image and the size information of the original image, it is determined whether the updated image is smaller than the corresponding original image; If so, determine that the updated image matches the corresponding target synthesized image; If not, it is determined that the updated image does not match the corresponding target composite image, the updated image is determined as an unmatched image, and the target composite image corresponding to the updated image is determined as an unmatched composite image; The unmatched images in the multiple updated images are matched with the unmatched synthesized images in the multiple target synthesized images.

4. The method according to claim 3, characterized in that, The unmatched images include multiple images; the unmatched composite images include multiple images. The step of matching unmatched images from a plurality of updated images with unmatched synthesized images from a plurality of target synthesized images includes: Perform the following operations on each of the unmatched images in a predetermined order: The current synthesized image is determined from among the multiple unmatched synthesized images; Based on the size information of the unmatched image and the size information of the target original image corresponding to the current synthesized image, it is determined whether the unmatched image is smaller than the target original image; the target original image is the original image corresponding to the target updated image among multiple original images used to generate the current synthesized image; the target updated image is the updated image corresponding to the current synthesized image; If so, determine that the unmatched image matches the current synthesized image, and then determine the unmatched synthesized image as a matched synthesized image; If not, continue to determine the current composite image from multiple unmatched composite images until all unmatched composite images have been matched.

5. The method according to claim 1, characterized in that, The matching result includes the updated image and the target composite image that matches the updated image; The step of generating an updated composite image based on the matching results includes: Based on the updated image and the target composite image that matches the updated image, an updated composite image is generated; The updated composite image includes the image content of the updated image and a portion of the image content of the target composite image; the portion of the image content includes the image content of the target composite image other than the image content of the target original image; the target original image is the original image corresponding to the target updated image among a plurality of original images used to generate the target composite image; the target updated image is the updated image corresponding to the target composite image.

6. The method according to claim 1, characterized in that, The matching results include updated images that do not have a matching target composite image; The step of generating an updated composite image based on the matching results includes: An updated composite image is generated based on an updated image that does not have a matching target composite image. The updated composite image includes the image content of the updated image.

7. A device for processing game resources, characterized in that, include: An updated image acquisition module is used to acquire an updated image corresponding to a target game resource; the target game resource includes at least one composite image; the composite image is generated based on multiple original images; the composite image includes the image content of multiple original images; the composite image has image compositing information; the image compositing information includes reference information of multiple original images used to generate the composite image; the reference information is used to indicate the application scenario of the original images in the target game resource; The target composite image determination module is used to: for each composite image in the at least one composite image, search for the reference information of the updated image in the image composite information of the composite image; If found, the found composite image is determined as the target composite image; the target composite image includes the image content of the original image corresponding to the updated image; The resource update module is used to generate an updated composite image based on the updated image and the target composite image, so as to update the target game resources; the updated composite image at least contains the image content of the updated image; The image compositing information includes the size information of multiple original images used to generate the composite image; the updated image includes multiple images; the target composite image includes multiple images. The resource update module is also used for: Based on the size information of the multiple updated images and the image synthesis information of the multiple target synthesized images, the multiple updated images are matched with the multiple target synthesized images to obtain a matching result; Based on the matching results, an updated composite image is generated.

8. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the game resource processing method according to any one of claims 1-6.

9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the game resource processing method according to any one of claims 1-6.