[go: up one dir, main page]

CN112732268B - Method, device and medium for quickly splitting resources without reference relationship - Google Patents

Method, device and medium for quickly splitting resources without reference relationship Download PDF

Info

Publication number
CN112732268B
CN112732268B CN202110033986.2A CN202110033986A CN112732268B CN 112732268 B CN112732268 B CN 112732268B CN 202110033986 A CN202110033986 A CN 202110033986A CN 112732268 B CN112732268 B CN 112732268B
Authority
CN
China
Prior art keywords
resource
resources
identification
identification bit
list
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.)
Active
Application number
CN202110033986.2A
Other languages
Chinese (zh)
Other versions
CN112732268A (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.)
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Digital Network Technology 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 Zhuhai Kingsoft Digital Network Technology Co Ltd filed Critical Zhuhai Kingsoft Digital Network Technology Co Ltd
Priority to CN202110033986.2A priority Critical patent/CN112732268B/en
Publication of CN112732268A publication Critical patent/CN112732268A/en
Application granted granted Critical
Publication of CN112732268B publication Critical patent/CN112732268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4434Reducing the memory space required by the program code
    • G06F8/4435Detection or removal of dead or redundant code
    • 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/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/552Details of game data or player data management for downloading to client devices, e.g. using OS version, hardware or software profile of the client device
    • 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)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明涉及一种快速拆分无引用关系资源的方法、装置及介质的技术方案,包括:获取基于Unity 3D的工程资源列表,在每个资源中设置标识位,同时创建一动态标识;每次从工程中取出资源时,生成对应资源的递归引用资源列表,并将对应的资源标志位写入递归引用资源列表;遍历递归引用资源列表,根据资源的引用关系,对资源标识位进行修改,并动态调整动态标识;重复直至资源列表中所有资源被标记;根据所有资源的标识位数量,确定资源相互无引用关系的数量,根据资源相互无引用关系的数量使用对应的多个线程对工程资源进行打包。本发明的有益效果为:增加bundle冗余的情况下,加快打Bundle包速度,方便项目快速出包验证效果。

The present invention relates to a technical solution of a method, device and medium for quickly splitting resources without reference relationship, including: obtaining a project resource list based on Unity 3D, setting an identification bit in each resource, and creating a dynamic identification at the same time; each time a resource is taken out from the project, generating a recursive reference resource list of the corresponding resource, and writing the corresponding resource flag bit into the recursive reference resource list; traversing the recursive reference resource list, modifying the resource identification bit according to the reference relationship of the resource, and dynamically adjusting the dynamic identification; repeating until all resources in the resource list are marked; determining the number of resources without reference relationship according to the number of identification bits of all resources, and packaging the project resources using corresponding multiple threads according to the number of resources without reference relationship. The beneficial effects of the present invention are: in the case of increasing bundle redundancy, the speed of Bundle packaging is accelerated, and the project is convenient for rapid package verification.

Description

Method, device and medium for rapidly splitting non-reference relation resource
Technical Field
The invention relates to the field of computers, in particular to a method, a device and a medium for rapidly splitting non-reference relation resources.
Background
In the Unity 3D game, packing is very slow, the effect of modifying the bug is required to be verified, if the engineering is very large, packing needs very long time, usually 2 hours is very common, and the packing speed is increased, which is a very critical problem, because when the Unity 3D game is packed, one engineering can only have one process to pack, if all resources can be rapidly split into parts without reference relation, the packing speed can be greatly increased if the processes are used for packing the bug, but the resources have strong reference relation before, if the processes are not good, a large amount of redundancy is caused, the bag body is increased, and the memory occupation is higher in operation.
Disclosure of Invention
The invention aims to at least solve one of the technical problems in the prior art, and provides a method, a device and a medium for reducing the redundancy of a bundle dependent chain, so that the redundancy of the bundle dependent chain is reduced, the memory occupation and the loading time are reduced, and the game running efficiency is improved.
The technical scheme of the invention includes that the method for rapidly splitting non-reference relation resources is characterized by comprising the steps of S100, obtaining a Unity 3D-based engineering resource list, setting identification bits in each resource, simultaneously creating a dynamic identification, S200, generating a recursion reference resource list of corresponding resources each time when the resources are taken out of an engineering, writing corresponding resource flag bits into the recursion reference resource list, S300, traversing the recursion reference resource list, modifying the resource identification bits according to the reference relation of the resources, and dynamically adjusting the dynamic identification, S400, repeating the steps S200-S300 until the resources in the resource list are marked, S500, determining the quantity of the non-reference relation of the resources according to the quantity of the identification bits of all the resources, and packing the engineering resources by using a plurality of corresponding threads according to the quantity of the non-reference relation of the resources.
The method for rapidly splitting the non-reference relation resources comprises the following steps of traversing all resources in an engineering, obtaining all resource lists, setting an identification bit for each resource, wherein the identification bit is default to 0, and setting a dynamic identification, and the dynamic identification bit is default to 1.
The method for rapidly splitting the non-reference relation resource comprises the steps of S310, taking out the resource, searching all the recursion reference resource lists of the resource, adding information of the resource into the recursion reference resource list, S320, judging whether an identification bit is 0 for each taken out resource through the recursion reference resource list processed by S310, if the identification bit of the resource is 0, setting the identification bit of the resource as a current dynamic identification value directly, and if the identification bit of the resource is not 0, searching the resource corresponding to the resource list according to the identification bit value of the resource, modifying the identification bit of the searched resource as the dynamic identification value, and then carrying out self-increment on the dynamic identification.
According to the method for rapidly splitting the non-reference relation resource, the engineering resource list is read sequentially.
The method for rapidly splitting the non-reference relation resources comprises the following steps of S500, obtaining the zone bits of all the resources obtained through S400, determining the quantity of the non-reference relation according to the values of the zone bits of the resources and the values of the dynamic identifications, and packaging the corresponding resources by using the threads with the corresponding quantity.
The technical scheme of the invention also comprises a device for rapidly splitting non-reference relation resources, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that any one of the method steps is realized when the processor executes the computer program.
The technical solution of the present invention further comprises a computer-readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method steps according to any one of the claims.
The method has the beneficial effects that under the condition of increasing the Bundle redundancy, the Bundle packing speed is increased, and the fast Bundle discharging verification effect of the project is facilitated.
Drawings
The invention is further described below with reference to the drawings and examples;
FIG. 1 is a general flow diagram according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating splitting non-reference resources according to an embodiment of the invention;
fig. 3 shows a device diagram according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to the present embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein the accompanying drawings are used to supplement the description of the written description so that one can intuitively and intuitively understand each technical feature and overall technical scheme of the present invention, but not to limit the scope of the present invention.
In the description of the present invention, a number means one or more, a number means two or more, and greater than, less than, exceeding, etc. are understood to not include the present number, and above, below, within, etc. are understood to include the present number.
In the description of the present invention, the continuous reference numerals of the method steps are used for facilitating examination and understanding, and by combining the overall technical scheme of the present invention and the logic relationships between the steps, the implementation sequence between the steps is adjusted without affecting the technical effect achieved by the technical scheme of the present invention.
In the description of the present invention, unless explicitly defined otherwise, terms such as arrangement and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meaning of the terms in the present invention in combination with the specific contents of the technical scheme.
FIG. 1 shows a general flow chart according to an embodiment of the invention, which comprises S100, obtaining a Unity 3D-based engineering resource list, setting an identification bit in each resource, creating a dynamic identification at the same time, S200, generating a recursively referenced resource list of the corresponding resource each time the resource is taken out from the engineering, writing the corresponding resource flag bit into the recursively referenced resource list, S300, traversing the recursively referenced resource list, modifying the resource identification bit according to the referencing relation of the resource, dynamically adjusting the dynamic identification, S400, repeating steps S200-S300 until all the resources in the resource list are marked, S500, determining the number of the resources without referencing relation with each other according to the number of the identification bits of all the resources, and packaging the engineering resources by using a plurality of corresponding threads according to the number of the resources without referencing relation with each other.
FIG. 2 is a schematic flow diagram of splitting non-reference resources according to an embodiment of the invention, including:
(1) Firstly, traversing all resources in an engineering to obtain a whole resource list, setting an identification bit ASSETFLAG for each resource, marking the default as 0, and setting a dynamic mark as BundleFlag (default as 1);
(2) Traversing the list one by one, and taking out a resource Itor _asset_A according to list sequence;
(3) After one resource is fetched, called Itor _asset_a, all recursively referenced resource lists asset_a_ DEPENDECNLIST of Itor _ Aaset _a are first searched, and Itor _asset_a is also added to Itor _asset_a recursively referenced resource list asset_a_ DEPENDECNLIST, asset_a_ DEPENDECNLIST contains itself for all recursively referenced resources of asset_a;
(4) Traversing asset_a_ DEPENDECNLISTT again, for fetching each Asset Itor _asset_ DEPENDECNLIST _x, firstly judging whether the identification bit ASSETFLAG of Itor _asset_ DEPENDECNLIST _x is 0, if the identification bit ASSETFLAG is not temporarily referenced by other assets, setting the Asset identification bit as current BundleFlag directly, if the identification bit ASSETFLAG is not 0, and if the Asset is referenced by other assets, dividing the assets, assuming that the identification bit ASSETFLAG of Itor _asset_ DEPENDECNLIST _x is N, finding out the Asset list NASSETLIST of all the identification bits N, setting the identification bit of all the assets in NASSETLIST as BundleFlag, and then performing self-increment on BundleFlag (BundleFlag = BundleFlag +1);
(5) Sequentially taking out the second resource, and repeating the steps (3) - (4) until all the resources are marked;
(6) The number of the flag bits of all the resources is obtained, namely the number of the flag bits can be divided into a plurality of parts which are not related with each other, and the flag bits are packaged in a plurality of processes, for example, only 0,2,55 kinds of flag bits can be divided into 3 parts, and the flag bits are packaged in 3 processes.
Fig. 3 shows a device diagram according to an embodiment of the invention. The device comprises a memory 100 and a processor 200, wherein the processor 200 stores a computer program for executing the steps of obtaining a Unity 3D-based engineering resource list, setting identification bits in each resource, creating a dynamic identification at the same time, generating a recursion reference resource list of the corresponding resource each time the resource is taken out from the engineering, writing the corresponding resource flag bits into the recursion reference resource list, traversing the recursion reference resource list, modifying the resource identification bits according to the reference relation of the resource, dynamically adjusting the dynamic identification, repeating until all the resources in the resource list are marked, determining the number of the resources without reference relation according to the number of the identification bits of all the resources, and packing the engineering resources by using a plurality of corresponding threads according to the number of the resources without reference relation. Wherein the memory 100 is used for storing data.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present invention.

Claims (6)

1. A method for rapidly splitting non-reference resources, the method comprising:
s100, acquiring a Unity 3D-based engineering resource list, setting an identification bit in each resource, and simultaneously creating a dynamic identification;
S200, each time a resource is taken out from the project, generating a recursion reference resource list of the corresponding resource, and writing the corresponding resource zone bit into the recursion reference resource list;
S300, traversing a recursion reference resource list, modifying a resource identification bit according to the reference relation of the resource, and dynamically adjusting a dynamic identification;
S400, repeating the steps S200-S300 until all the resources in the resource list are marked;
s500, determining the quantity of the non-reference relation of the resources according to the quantity of the identification bits of all the resources, and packaging engineering resources by using a plurality of corresponding threads according to the quantity of the non-reference relation of the resources;
The S300 includes:
s310, taking out the resources, searching all the recursion reference resource lists of the resources, and simultaneously adding the information of the resources into the recursion reference resource lists;
S320, for each extracted resource, judging whether the identification bit is 0 or not through the recursion reference resource list processed in S310, if the identification bit of the resource is 0, directly setting the identification bit of the resource as the current dynamic identification value, if the identification bit of the resource is not 0, searching the resource corresponding to the resource list according to the identification bit value of the resource, modifying the identification bit of the searched resource as the dynamic identification value, and then carrying out self-increment on the dynamic identification.
2. The method for rapidly splitting non-reference resources according to claim 1, wherein said S100 comprises:
traversing all resources in the engineering to obtain all resource lists, setting an identification bit for each resource, wherein the identification bit is defaulted to 0, and simultaneously setting a dynamic identification, and the dynamic identification bit is defaulted to 1.
3. The method for rapidly splitting non-referenced resources according to claim 1, wherein the engineering resource list is read sequentially according to the engineering resource list.
4. The method for rapidly splitting non-reference resources according to claim 1, wherein the step S500 includes obtaining the flag bits of all the resources obtained in the step S400, determining the number of non-reference resources according to the value of the flag bits of the resources and the value of the dynamic identifier, and packing the corresponding resources by using the threads of the corresponding number.
5. An apparatus for fast splitting non-referenced resources, the apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method steps of any of claims 1-4 when the computer program is executed.
6. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method steps of any of claims 1-4.
CN202110033986.2A 2021-01-11 2021-01-11 Method, device and medium for quickly splitting resources without reference relationship Active CN112732268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110033986.2A CN112732268B (en) 2021-01-11 2021-01-11 Method, device and medium for quickly splitting resources without reference relationship

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110033986.2A CN112732268B (en) 2021-01-11 2021-01-11 Method, device and medium for quickly splitting resources without reference relationship

Publications (2)

Publication Number Publication Date
CN112732268A CN112732268A (en) 2021-04-30
CN112732268B true CN112732268B (en) 2025-02-11

Family

ID=75590539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110033986.2A Active CN112732268B (en) 2021-01-11 2021-01-11 Method, device and medium for quickly splitting resources without reference relationship

Country Status (1)

Country Link
CN (1) CN112732268B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287723A (en) * 2019-05-21 2019-09-27 北京达佳互联信息技术有限公司 Resource information determines method, apparatus, electronic equipment and storage medium
CN111062638A (en) * 2019-12-26 2020-04-24 珠海金山网络游戏科技有限公司 Project resource processing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NZ566291A (en) * 2008-02-27 2008-12-24 Actionthis Ltd Methods and devices for post processing rendered web pages and handling requests of post processed web pages
US8615768B2 (en) * 2010-09-27 2013-12-24 Microsoft Corporation Dependency-ordered resource synchronization across multiple environments using change list created based on dependency-ordered graphs of the multiple environments
US9398068B2 (en) * 2014-02-20 2016-07-19 International Business Machines Corporation Bulk uploading of multiple self-referencing objects
CN111078276B (en) * 2019-12-20 2022-12-30 抖音视界有限公司 Application redundant resource processing method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287723A (en) * 2019-05-21 2019-09-27 北京达佳互联信息技术有限公司 Resource information determines method, apparatus, electronic equipment and storage medium
CN111062638A (en) * 2019-12-26 2020-04-24 珠海金山网络游戏科技有限公司 Project resource processing method and device

Also Published As

Publication number Publication date
CN112732268A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN106570018B (en) Serialization and deserialization method, device and system and electronic equipment
CN106919370A (en) The acquisition methods and device of a kind of object attribute values
TW202006565A (en) Apparatus and method for searching linked lists
CN110704096A (en) Packaging method and device of front-end item, storage medium and electronic equipment
CN112328544A (en) Multidisciplinary simulation data classification method, device and storage medium
US12210571B2 (en) Graph data processing method, apparatus, and device, and medium
CN112451972A (en) Game engine-based resource compression package construction method, device, system and medium
CN112732267B (en) Method, device and medium for reducing bundle dependency chain redundancy
CN112732268B (en) Method, device and medium for quickly splitting resources without reference relationship
JP2002534737A (en) Apparatus for executing program code with reduced memory requirements
EP3507689B1 (en) Java card application package used as a library package
CN117544826B (en) Subtitle file editing method and subtitle editor for loading application
CN113568620B (en) Code file processing method, device, equipment and medium
CN110046157B (en) Method and device for storing directed graph based on cross double linked list
CN117931763A (en) Log information generation method for embedded system, electronic device, and storage medium
WO2023060833A1 (en) Data exchange method, electronic device and storage medium
CN112486925B (en) A2L file processing method, device and storage medium
Chen et al. An FPGA aligner for short read mapping
CN114490041A (en) Array computing method, apparatus, apparatus, medium and computer program product
CN114416090A (en) A method and device for converting a single-page application framework Vue component
CN106991021B (en) Method and system for constructing new data file from existing data file
CN115328467B (en) Low-code model application generation method, device and medium based on process configuration
CN106897588A (en) A kind of processing method and processing device of label function
CN117271456B (en) Data serialization method, anti-serialization method, electronic device, and storage medium
CN113900820B (en) Classification task processing method, device, electronic device 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
CB02 Change of applicant information

Country or region after: China

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Address before: 519080 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Country or region before: China

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant