CN110908697A - Resource packaging method, device, server and storage medium - Google Patents

Resource packaging method, device, server and storage medium Download PDF

Info

Publication number
CN110908697A
CN110908697A CN201911195357.9A CN201911195357A CN110908697A CN 110908697 A CN110908697 A CN 110908697A CN 201911195357 A CN201911195357 A CN 201911195357A CN 110908697 A CN110908697 A CN 110908697A
Authority
CN
China
Prior art keywords
resource
resources
dependency relationship
file
packaging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911195357.9A
Other languages
Chinese (zh)
Other versions
CN110908697B (en
Inventor
王志远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Micha Tour Technology (shanghai) Co Ltd
Original Assignee
Micha Tour Technology (shanghai) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Micha Tour Technology (shanghai) Co Ltd filed Critical Micha Tour Technology (shanghai) Co Ltd
Priority to CN201911195357.9A priority Critical patent/CN110908697B/en
Publication of CN110908697A publication Critical patent/CN110908697A/en
Application granted granted Critical
Publication of CN110908697B publication Critical patent/CN110908697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/69Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by enabling or updating specific game elements, e.g. unlocking hidden features, items, levels or versions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a resource packaging method, a resource packaging device, a server and a storage medium, wherein the method comprises the following steps: determining a resource dependency relationship between the resources based on the identification information corresponding to the resources; packaging each resource according to a preset rule to obtain a plurality of packaged files; the packed file comprises at least one resource; and merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file. The technical scheme of the embodiment of the invention solves the technical problems that more time is consumed for packaging each resource for games with huge resources, more useless resources are called due to unreasonable resource packaging mode, the memory is occupied and the time is wasted when the packaged resources are called, and realizes reasonable packaging of each resource, so that the resource calling efficiency is improved when the resources are called, the resource calling time is saved, and the technical effect of user experience is improved.

Description

Resource packaging method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of video game development, in particular to a resource packaging method, a resource packaging device, a server and a storage medium.
Background
Unity is a multi-platform, comprehensive game development tool developed by Unity technologies for creating types of interactive content such as three-dimensional video games, building visualizations, real-time three-dimensional animations, etc., and is a fully integrated professional game engine.
In view of the limitations of the operating platform and the Unity, the Unity resource is typically dynamically updated and loaded by being packaged as a resource package (AssetBundle). Unity resources refer to elements used to generate a scene and various objects in the scene, such as model map material, scene source files, plug-ins, and the like. Asset bundle is a function provided by Unity Pro that can pack multiple game objects or resource binary files into Asset bundle, providing a method of packing and unpacking.
For games with huge resources, the required resource types are large, the processing of various dependency relationships among the resources and the time consumption of packaging are great problems, and meanwhile, when packaged resources are called, the technical problem that the time is wasted when the resources are called is caused by unreasonable resource packaging modes.
Disclosure of Invention
The invention provides a resource packaging method, a resource packaging device, a server and a storage medium, which are used for reasonably packaging resources so as to improve the technical effect of resource calling efficiency.
In a first aspect, an embodiment of the present invention provides a resource packing method, where the method includes:
determining a resource dependency relationship between the resources based on the identification information corresponding to the resources;
packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein the packaged file comprises at least one resource;
and merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file.
In a second aspect, an embodiment of the present invention further provides a resource packaging apparatus, where the apparatus includes:
the resource dependency relationship determining module is used for determining the resource dependency relationship among the resources based on the identification information corresponding to the resources;
the packaged file determining module is used for packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein the packaged file comprises at least one resource;
and the packed file merging module is used for merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file.
In a third aspect, an embodiment of the present invention further provides a server, where the server includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the resource packaging method according to any of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the resource packaging method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, the resource dependency relationship among the resources is determined based on the identification information corresponding to the resources; packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein, the packed file comprises at least one resource; based on the resource dependency relationship, the packed files with the completely same dependency relationship are merged to obtain a merged packed file, so that the technical problems that in the prior art, for games with huge resources, more types of resources are needed, more time is consumed when each resource is packed, and more useless resources are called due to unreasonable resource packing modes when the packed resources are called, namely, the resource calling efficiency is lower, and more time is occupied are solved, reasonable packing of each resource is realized, so that the resource calling efficiency is improved when the resources are called, the resource calling time is saved, and the technical effect of user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart of a resource packaging method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a resource dependency structure according to a first embodiment of the present invention;
fig. 3 is a schematic diagram of a resource dependency structure according to a first embodiment of the present invention;
fig. 4 is another flowchart illustrating a resource packaging method according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a resource packaging apparatus according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a resource packaging method according to an embodiment of the present invention, where the present embodiment is applicable to a situation where each resource is packaged in advance, and the method may be executed by a resource packaging device, where the device may be implemented in a form of software and/or hardware, and the hardware may be an electronic device, an optional PC terminal, a mobile terminal, or the like.
As shown in fig. 1, the method of the present embodiment includes:
s110, determining the resource dependency relationship among the resources based on the identification information corresponding to the resources.
For the purpose of clearly describing the technical solution of the present embodiment, the resource processing corresponding to the three-dimensional video game may be taken as an example for description.
Where Unity is a multi-platform, integrated game development tool developed by Unity Technologies for creating types of interactive content such as three-dimensional video games, building visualizations, real-time three-dimensional animations, and the like. The Unity resource is dynamically updated and loaded in a manner of being packaged as a resource package (Asset Bundle). Unity resources refer to elements used to generate a scene and various objects in the scene, such as information such as model map material, scene source files, plug-ins, and the like. That is, resources include renderers, maps, models, animations, networks, scenes. Because a certain dependency relationship exists between the resources, the identification information is used for representing the resource dependency relationship between the resources, that is, the resource dependency relationship is a reference relationship between the resources.
Specifically, a resource dependency determining program is called to obtain identification information corresponding to each resource, and the resource dependency between each resource is determined based on the identification information corresponding to each resource.
And S120, packaging the resources according to a preset rule to obtain a plurality of packaged files.
The preset rule may be that resources on the same branch, which have a single dependency relationship and are located on the same branch, are packaged as a group of resources according to the dependency relationship between the resources. And calling a packaging application program, packaging a group of resources in the same file, and respectively packaging the rest resources to obtain a plurality of packaged files. That is, the plurality of packaged files includes two types of packaged files. The package file includes the file size corresponding to each packaged resource, the MD5 value, the package name of the package, and the name of each resource in the package file.
Specifically, the resources with a single dependency relationship among all the resources are obtained according to the resource dependency relationship, and a group of resources with a single dependency relationship is used as the target resources. And calling a packaging application program to package the target resource to obtain a target packaging file. Of course, resources that do not have a single dependency relationship may be packaged separately.
Optionally, determining at least one group of target resources with a single dependency relationship according to the resource dependency relationship, and respectively packaging each group of target resources to obtain a target packaged file; and respectively packaging each resource in the rest resources to obtain a packaged file to be processed.
Wherein, the single dependency relationship can be understood as: the depended resource is only depended on by one dependent resource. For example, resource B depends on resource A and resource A is only depended on by resource B, A can be referred to as a dependent resource and resource B can be referred to as a dependent resource, and then resource A and resource B can be taken as a set of target resources. That is, the resources in which each depended resource is depended on by only one resource are screened out from all the resources, and the depended resources and the dependent resources meeting the condition are taken as a group of target resources. That is, the set of target resources includes at least two resources, namely a depended resource and a dependent resource. The target packaging file is a file for packaging a group of resources with a single dependency relationship.
Specifically, after determining the resource dependency relationship among the resources, at least two resources having a single dependency relationship may be determined according to the resource dependency relationship, and the at least two resources having a single dependency relationship may be used as a set of target resources. And calling a packaging program code, and packaging a group of target resources, namely packaging the resources with a single dependency relationship together as a whole to obtain target packaging resources, namely target packaging files. That is, at least two resources having a single dependency relationship are packaged in the same package file, i.e., asset bundle. If a specific resource is to be loaded, a specific package file and a dependent package file need to be loaded. In order to avoid the problems of memory occupation and call efficiency reduction when a series of useless resources are loaded when a specific resource is called, the remaining resources can be respectively packed to obtain a plurality of packed files to be processed.
For example, assuming that the three-dimensional video game includes fifteen resources (assets), a resource dependency relationship determination program is called to obtain identification information corresponding to the fifteen resources, respectively, and determine that the dependency relationship between the resources may be: resource 1(asset1) depends on resource 3 and resource 4, resource 3 depends on resource 7, and the relationship among corresponding resource 1, resource 3 and resource 4 is that resource 1 is a dependent resource and resource 3 and resource 4 are depended resources; resource 2 depends on resource 4, resource 5, resource 6, and resource 11, resource 5 depends on resource 8 and resource 9, and resource 6 depends on resource 10; resource 11 depends on resource 13; resource 12 is dependent on resource 14 and resource 15. Because the resource 3 is only depended on by the resource 1 and the resource 7 is only depended on by the resource 3, namely the resource 1, the resource 3 and the resource 7 are in a single dependency relationship, the resource 1, the resource 3 and the resource 7 are used as a group of target resources and packaged in the same file to be used as a target packaging file; the resource 4 is depended on by the resource 1 and the resource 2, so that the resource 4, the resource 1 and the resource 2 are not in a single dependency relationship, and cannot be used as a group of target resources, namely cannot be packed together, and can be respectively packed to obtain a plurality of packed files to be processed; the resource 14 is only depended on by the resource 12, and the resource 15 is only depended on by the resource 12, so that the resource 12, the resource 14 and the resource 15 can be packaged in the same file as a target packaging file as a set of target resources. Packaging the rest resources respectively to obtain a plurality of packaged files to be processed
And S130, merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file.
For a clear understanding of the packaged files with identical dependencies, see fig. 2 and 3. Wherein, ASB1(asset bundle package file) represents package file 1, ASB2 represents package file 2, ASB3 represents package file 3, ASB4 represents package file 4, because ASB1 depends on ASB3 and ASB4, ASB2 also depends on ASB3 and ASB4, that is, the depended relation of dependent package files ASB3 and ASB4 is completely the same, ASB3 and ASB4 can be merged to obtain a merged package file. Referring to fig. 3, ASB5 depends on ASB4, i.e., the dependences of ASB3 and ASB4 are not identical, so ASB3 and ASB4 cannot be merged and packaged.
Specifically, since the package file includes a name corresponding to each resource, the dependency relationship between the respective package files can be determined based on the resource dependency relationship. If the dependency relationships of the packaged files are completely the same, that is, the dependent relationships of the packaged files are completely the same, the packaged files with completely the same dependent relationships can be merged to obtain a merged packaged file.
Correspondingly, if the packed files comprise the target packed file and the packed file to be processed, optionally, when the target packed file is determined based on the resource dependency relationship and the dependency relationship of the packed file to be processed is completely the same, merging and packing the packed files with the completely same dependency relationship to obtain a merged packed file; wherein, the single dependency relationship is that the depended resource is referred by a dependent resource; the depended resource is a resource corresponding to the parent node, and the dependent resource is a resource corresponding to a next-level child node of the depended resource.
That is to say, according to the resource dependency relationship, the dependency relationship between the packaged files can be determined, and the resource packaged files with the completely same dependency relationship are merged to obtain a merged packaged file.
According to the technical scheme of the embodiment of the invention, the resource dependency relationship among the resources is determined based on the identification information corresponding to the resources; packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein, the packed file comprises at least one resource; based on the resource dependency relationship, the packed files with the completely same dependency relationship are merged to obtain a merged packed file, so that the technical problems that in the prior art, for games with huge resources, more types of resources are needed, more time is consumed when each resource is packed, and more useless resources are called due to unreasonable resource packing modes when the packed resources are called, namely, the resource calling efficiency is lower, and more time is occupied are solved, reasonable packing of each resource is realized, so that the resource calling efficiency is improved when the resources are called, the resource calling time is saved, and the technical effect of user experience is improved.
On the basis of the technical scheme, after the resource dependency relationship between each resource is determined, in order to manage the resource relationship, the resource dependency relationship can be stored in a pre-established resource mapping relationship table, so that each target packaging file and/or packaging file to be processed can be called based on the resource mapping relationship table when the resource is called.
In the process of actual application, the dependency relationship between the resources may change, so that whether the resource dependency relationship changes or not may be periodically queried, or whether the resource dependency relationship changes or not may be checked after the user exits the game. If the resource is changed, the resource is packaged again, the packaged files are combined, the re-determined resource dependency relationship is updated in the resource mapping relationship table, so that when the resource is called again, the resource is called according to the updated mapping relationship table, the packaged file corresponding to the resource is called, and the technical effect of improving the resource calling accuracy is achieved.
According to the technical scheme of the embodiment of the invention, the problem of higher memory pressure caused by the fact that each scene needs to be connected with approximately half of the asset bundle file is solved, the redundant asset bundle file can be reduced and the problem of larger memory occupation is solved. If the game is installed on the intelligent terminal, and optionally on the smart phone, the technical effects of less loaded asset bundle files, less occupied memory and wider application range are achieved.
Example two
On the basis of the technical scheme, the preset rule may be that resources with a single dependency relationship are packed together according to the resource dependency relationship, and then merged and packed to obtain merged packed files, or that each resource is packed to obtain a plurality of packed files, and packed files with completely the same dependency relationship are merged and packed according to the resource dependency relationship to obtain a plurality of merged packed files. Fig. 4 is another flowchart of a resource packing method according to a fourth embodiment of the present invention. As shown in fig. 4, the method includes:
s410, determining the resource dependency relationship among the resources based on the identification information corresponding to the resources.
Because a certain dependency relationship exists among the resources, the identification information is used for representing the resource dependency relationship among the resources, that is, the resource dependency relationship is a reference relationship among the resources.
Specifically, a resource dependency determining program is called to obtain identification information corresponding to each resource, and the resource dependency between each resource is determined based on the identification information corresponding to each resource.
S420, packaging each resource to obtain a plurality of packaged files; wherein the number of packaged files is the same as the number of resources.
Wherein, the number of the packed files can be one, two or more. The number of packed files is the same as the number of resources. For example, the number of resources is 20, and correspondingly, the number of packaged files is also 20.
Specifically, the method includes the steps of obtaining a three-dimensional video game, namely obtaining resources corresponding to a game application program, calling a packaging application program to respectively package each resource, and obtaining a plurality of packaging files, namely each packaging file only comprises one resource.
In this embodiment, the dependency relationship between the resources may be determined in advance according to the identification information between the resources; or packaging each resource to obtain a plurality of packaged files, and determining the dependency relationship among the resources.
S430, determining the dependency relationship of each packaged file based on the resource dependency relationship table, and combining the packaged files with the same dependency relationship together to serve as a combined packaged file.
Specifically, the dependency relationship between each packaged file is determined based on the resource dependency relationship table, and the depended packaged files with the same dependency relationship are combined together to serve as a combined packaged file.
According to the technical scheme of the embodiment of the invention, the resource dependency relationship among the resources is determined based on the identification information corresponding to the resources; packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein, the packed file comprises at least one resource; based on the resource dependency relationship, the packed files with the completely same dependency relationship are merged to obtain a merged packed file, so that the technical problems that in the prior art, for games with huge resources, more types of resources are needed, more time is consumed when each resource is packed, and more useless resources are called due to unreasonable resource packing modes when the packed resources are called, namely, the resource calling efficiency is lower, and more time is occupied are solved, reasonable packing of each resource is realized, so that the resource calling efficiency is improved when the resources are called, the resource calling time is saved, and the technical effect of user experience is improved.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a resource packaging apparatus according to a third embodiment of the present invention, where the apparatus includes: a resource dependency determination module 510, a packaged file determination module 520, and a packaged file merge module 530.
The resource dependency relationship determining module 510 is configured to determine a resource dependency relationship between resources based on identification information corresponding to the resources; a packed file determining module 520, configured to pack each resource according to a preset rule to obtain a plurality of packed files; wherein, the packed file comprises at least one resource; and a packed file merging module 530, configured to merge, based on the resource dependency relationship, packed files with completely the same dependency relationship to obtain a merged packed file.
According to the technical scheme of the embodiment of the invention, the resource dependency relationship among the resources is determined based on the identification information corresponding to the resources; packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein, the packed file comprises at least one resource; based on the resource dependency relationship, the packed files with the completely same dependency relationship are merged to obtain a merged packed file, so that the technical problems that in the prior art, for games with huge resources, more types of resources are needed, more time is consumed when each resource is packed, and more useless resources are called due to unreasonable resource packing modes when the packed resources are called, namely, the resource calling efficiency is lower, and more time is occupied are solved, reasonable packing of each resource is realized, so that the resource calling efficiency is improved when the resources are called, the resource calling time is saved, and the technical effect of user experience is improved.
On the basis of the above technical solutions, the packed file determining module is further configured to:
packaging each resource respectively to obtain a plurality of packaged files; wherein the number of the packaged files is the same as the number of the resources;
correspondingly, the packed file merging module is further configured to:
and determining the dependency relationship of each packaged file based on the resource dependency relationship table, and combining the packaged files with the same dependency relationship together to serve as a combined packaged file.
On the basis of the above technical solutions, the packed file determining module is further configured to:
determining at least one group of target resources with a single dependency relationship according to the resource dependency relationship, and respectively packaging each group of target resources to obtain a target packaged file; packaging each resource in the rest of all resources respectively to obtain a packaged file to be processed;
correspondingly, the packed file merging module is further configured to:
when the target packed file is determined based on the dependency relationship and the dependency relationship of the packed files to be processed is completely the same, merging and packing the packed files with the completely same dependency relationship to obtain a merged packed file;
wherein the single dependency relationship is that the depended resource is referenced by a dependent resource; the depended resource is a resource corresponding to a parent node, and the dependent resource is a resource corresponding to a next-level child node of the depended resource.
On the basis of the above technical solutions, the packed file merging module is further configured to:
screening out resources, on which each depended resource is only depended by one resource, from all the resources according to the resource dependency relationship, and taking the depended resources and the dependent resources as a group of target resources;
packaging the set of target resources as a target packaged file based on the packaging program code;
wherein the set of target resources includes at least one depended resource and at least one dependent resource.
On the basis of the above technical solutions, the packed file determining module is further configured to:
and storing the resource dependency relationship into a pre-established resource mapping relationship table so as to call a target packed file and/or a packed file to be processed based on the resource mapping relationship table when a resource is called.
On the basis of the technical schemes, the resources comprise a renderer, a map, a model, animation, a network and a scene; the package file includes a file size corresponding to each package resource, an MD5 value, a package name of the package, and a name of each resource in the package file.
On the basis of the technical schemes, the resources are resources for supporting the three-dimensional video game.
The resource packaging device provided by the embodiment of the invention can execute the resource packaging method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 6 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary server 60 suitable for use in implementing embodiments of the present invention. The server 60 shown in fig. 6 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 6, the server 60 is in the form of a general purpose computing device. The components of server 60 may include, but are not limited to: one or more processors or processing units 601, a system memory 602, and a bus 603 that couples various system components including the system memory 602 and the processing unit 601.
Bus 603 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 60 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by server 60 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 602 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)604 and/or cache memory 605. The server 60 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 606 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 603 by one or more data media interfaces. Memory 602 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 608 having a set (at least one) of program modules 607 may be stored, for example, in memory 602, such program modules 607 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 607 generally perform the functions and/or methods of the described embodiments of the invention.
The server 60 may also communicate with one or more external devices 609 (e.g., keyboard, pointing device, display 610, etc.), with one or more devices that enable a user to interact with the server 60, and/or with any devices (e.g., network card, modem, etc.) that enable the server 60 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 611. Also, the server 60 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via a network adapter 612. As shown, the network adapter 612 communicates with the other modules of the server 60 via the bus 603. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with the server 60, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 601 executes various functional applications and data processing by running programs stored in the system memory 602, for example, to implement the resource packaging method provided by the embodiment of the present invention.
EXAMPLE five
Fifth, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a resource packing method.
The method comprises the following steps:
determining a resource dependency relationship between the resources based on the identification information corresponding to the resources;
packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein the packaged file comprises at least one resource;
merging the packed files with completely same dependency relationship based on the resource dependency relationship to obtain a merged packed file
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for resource packaging, comprising:
determining a resource dependency relationship between the resources based on the identification information corresponding to the resources;
packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein the packaged file comprises at least one resource;
and merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file.
2. The method of claim 1, wherein the packaging each resource according to a preset rule to obtain a plurality of packaged files comprises:
packaging each resource respectively to obtain a plurality of packaged files; wherein the number of the packaged files is the same as the number of the resources;
correspondingly, the merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file includes:
and determining the dependency relationship of each packaged file based on the resource dependency relationship table, and combining the packaged files with the same dependency relationship together to serve as a combined packaged file.
3. The method of claim 1, wherein the packaging each resource according to a preset rule to obtain a plurality of packaged files comprises:
determining at least one group of target resources with a single dependency relationship according to the resource dependency relationship, and respectively packaging each group of target resources to obtain a target packaged file; packaging each resource in the rest of all resources respectively to obtain a packaged file to be processed;
correspondingly, the merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file includes:
when the target packed file is determined based on the resource dependency relationship and the dependency relationship of the packed files to be processed is completely the same, merging and packing the packed files with the completely same dependency relationship to obtain a merged packed file;
wherein the single dependency relationship is that the depended resource is referenced by a dependent resource; the depended resource is a resource corresponding to a parent node, and the dependent resource is a resource corresponding to a next-level child node of the depended resource.
4. The method of claim 3, wherein the determining at least one group of target resources with a single dependency relationship according to the resource dependency relationship and separately packaging each group of target resources to obtain a target packaged file comprises:
screening out resources, on which each depended resource is only depended by one resource, from all the resources according to the resource dependency relationship, and taking the depended resources and the dependent resources as a group of target resources;
packaging the set of target resources as a target packaged file based on the packaging program code;
wherein the set of target resources includes at least one depended resource and at least one dependent resource.
5. The method according to claim 1, further comprising, after the processing based on the identification information corresponding to the respective resources to determine the resource dependency relationship between the respective resources:
and storing the resource dependency relationship into a pre-established resource mapping relationship table so as to call a target packed file and/or a packed file to be processed based on the resource mapping relationship table when a resource is called.
6. The method of any of claims 1-5, wherein the resources include renderers, maps, models, animations, networks, scenes; the package file includes a file size corresponding to each package resource, an MD5 value, a package name of the package, and a name of each resource in the package file.
7. The method of any of claims 1-5, wherein the resource is a resource supporting a three-dimensional video game.
8. A resource packaging apparatus, comprising:
the resource dependency relationship determining module is used for determining the resource dependency relationship among the resources based on the identification information corresponding to the resources;
the packaged file determining module is used for packaging each resource according to a preset rule to obtain a plurality of packaged files; wherein the packaged file comprises at least one resource;
and the packed file merging module is used for merging the packed files with completely the same dependency relationship based on the resource dependency relationship to obtain a merged packed file.
9. A server, characterized in that the server comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the resource packaging method of any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the resource packaging method of any of claims 1-7 when executed by a computer processor.
CN201911195357.9A 2019-11-28 2019-11-28 Resource packaging method, device, server and storage medium Active CN110908697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911195357.9A CN110908697B (en) 2019-11-28 2019-11-28 Resource packaging method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911195357.9A CN110908697B (en) 2019-11-28 2019-11-28 Resource packaging method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN110908697A true CN110908697A (en) 2020-03-24
CN110908697B CN110908697B (en) 2023-06-16

Family

ID=69820375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911195357.9A Active CN110908697B (en) 2019-11-28 2019-11-28 Resource packaging method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN110908697B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562929A (en) * 2020-04-29 2020-08-21 米哈游科技(上海)有限公司 Method, device and equipment for generating patch file and storage medium
CN111949312A (en) * 2020-08-14 2020-11-17 曙光信息产业(北京)有限公司 Data module packaging method and device, computer equipment and storage medium
CN112445500A (en) * 2020-11-30 2021-03-05 北京达佳互联信息技术有限公司 Application processing method, application running method and related equipment
CN112822514A (en) * 2020-12-30 2021-05-18 北京大学 Video stream packet transmission method, system, terminal and medium based on dependency relationship
CN113064609A (en) * 2021-03-05 2021-07-02 深圳市欢太科技有限公司 Resource loading method, client, server and storage medium
CN113127012A (en) * 2021-03-09 2021-07-16 深圳市星锐游戏有限公司 Software resource construction method based on software engine
CN113384896A (en) * 2021-06-25 2021-09-14 苏州沁游网络科技有限公司 Unity-based resource packaging method, device, equipment and medium
CN114385143A (en) * 2021-12-30 2022-04-22 上海米哈游璃月科技有限公司 Resource file packaging method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2779993A1 (en) * 2012-06-15 2013-12-15 Ibm Canada Limited - Ibm Canada Limitee Configurable resource policies
CN108509209A (en) * 2018-04-08 2018-09-07 平安普惠企业管理有限公司 A kind of generation method, device, computer equipment and the storage medium of resource packet
CN108536463A (en) * 2018-04-09 2018-09-14 深圳市腾讯网络信息技术有限公司 Obtain method, apparatus, equipment and the computer readable storage medium of resource packet
US10146885B1 (en) * 2012-12-10 2018-12-04 Emc Corporation Method and system for deciding on ordering of scripting language source code for dependency resolution
CN109725909A (en) * 2018-05-07 2019-05-07 中国平安人寿保险股份有限公司 Code file is packaged dispositions method, continuous integrating server and system
CN110032384A (en) * 2019-04-18 2019-07-19 腾讯科技(深圳)有限公司 Method, apparatus, equipment and the storage medium of resource updates
CN110152299A (en) * 2018-11-22 2019-08-23 腾讯科技(深圳)有限公司 A kind of construction method and device of game resource

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2779993A1 (en) * 2012-06-15 2013-12-15 Ibm Canada Limited - Ibm Canada Limitee Configurable resource policies
US10146885B1 (en) * 2012-12-10 2018-12-04 Emc Corporation Method and system for deciding on ordering of scripting language source code for dependency resolution
CN108509209A (en) * 2018-04-08 2018-09-07 平安普惠企业管理有限公司 A kind of generation method, device, computer equipment and the storage medium of resource packet
CN108536463A (en) * 2018-04-09 2018-09-14 深圳市腾讯网络信息技术有限公司 Obtain method, apparatus, equipment and the computer readable storage medium of resource packet
CN109725909A (en) * 2018-05-07 2019-05-07 中国平安人寿保险股份有限公司 Code file is packaged dispositions method, continuous integrating server and system
CN110152299A (en) * 2018-11-22 2019-08-23 腾讯科技(深圳)有限公司 A kind of construction method and device of game resource
CN110032384A (en) * 2019-04-18 2019-07-19 腾讯科技(深圳)有限公司 Method, apparatus, equipment and the storage medium of resource updates

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562929A (en) * 2020-04-29 2020-08-21 米哈游科技(上海)有限公司 Method, device and equipment for generating patch file and storage medium
CN111949312A (en) * 2020-08-14 2020-11-17 曙光信息产业(北京)有限公司 Data module packaging method and device, computer equipment and storage medium
CN111949312B (en) * 2020-08-14 2024-02-09 曙光信息产业(北京)有限公司 Packaging method and device for data module, computer equipment and storage medium
CN112445500A (en) * 2020-11-30 2021-03-05 北京达佳互联信息技术有限公司 Application processing method, application running method and related equipment
CN112822514A (en) * 2020-12-30 2021-05-18 北京大学 Video stream packet transmission method, system, terminal and medium based on dependency relationship
CN113064609A (en) * 2021-03-05 2021-07-02 深圳市欢太科技有限公司 Resource loading method, client, server and storage medium
CN113064609B (en) * 2021-03-05 2024-05-28 深圳市欢太科技有限公司 Resource loading method, client, server and storage medium
CN113127012A (en) * 2021-03-09 2021-07-16 深圳市星锐游戏有限公司 Software resource construction method based on software engine
CN113127012B (en) * 2021-03-09 2022-03-15 深圳市星锐游戏有限公司 Software resource construction method based on software engine
CN113384896A (en) * 2021-06-25 2021-09-14 苏州沁游网络科技有限公司 Unity-based resource packaging method, device, equipment and medium
CN113384896B (en) * 2021-06-25 2024-07-12 苏州沁游网络科技有限公司 Resource packaging method, device, equipment and medium based on Unity
CN114385143A (en) * 2021-12-30 2022-04-22 上海米哈游璃月科技有限公司 Resource file packaging method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110908697B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
CN110908697B (en) Resource packaging method, device, server and storage medium
CN110908707B (en) Resource packaging method, device, server and storage medium
CN113126990B (en) Page development method, device, equipment and storage medium
CN110865888A (en) Resource loading method and device, server and storage medium
US10176093B2 (en) Pauseless location and object handle based garbage collection
US9720824B2 (en) Garbage collection handler to update object pointers
CN111813804A (en) Data query method and device, electronic equipment and storage medium
CN110975293A (en) Method, device, server and medium for establishing resource reference relation table
US20150220524A1 (en) Verifying file versions in a networked computing environment
CN112181542A (en) Function calling method and device, electronic equipment and storage medium
CN114237916B (en) Data processing method and related equipment
CN111562929A (en) Method, device and equipment for generating patch file and storage medium
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN116860447B (en) Task caching method, device, system, equipment and medium
US20140164446A1 (en) Sharing electronic file metadata in a networked computing environment
US9229659B2 (en) Identifying and accessing reference data in an in-memory data grid
JP6697486B2 (en) Garbage collection without special instructions
US10126976B2 (en) Integrating sign extensions for loads
US10649743B2 (en) Application developing method and system
US20220365758A1 (en) Tool for Introspection in Object-Oriented Source Code
CN113568620B (en) Code file processing method, device, equipment and medium
CN114327423A (en) Form generation method and device, electronic equipment and storage medium
CN117667407A (en) Method, device, equipment and medium for acquiring configuration data of load balancing equipment
CN114138276A (en) Page compiling method and device, electronic equipment and storage medium
CN114637504A (en) Data adaptation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant