CN106354647B - One kind applies detection method and server - Google Patents

One kind applies detection method and server Download PDF

Info

Publication number
CN106354647B
CN106354647B CN201610798748.XA CN201610798748A CN106354647B CN 106354647 B CN106354647 B CN 106354647B CN 201610798748 A CN201610798748 A CN 201610798748A CN 106354647 B CN106354647 B CN 106354647B
Authority
CN
China
Prior art keywords
resource
application
file
scanned
information
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
CN201610798748.XA
Other languages
Chinese (zh)
Other versions
CN106354647A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610798748.XA priority Critical patent/CN106354647B/en
Publication of CN106354647A publication Critical patent/CN106354647A/en
Application granted granted Critical
Publication of CN106354647B publication Critical patent/CN106354647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses one kind to apply detection method and server, and directly resource information can not be obtained from application installation package with dynamic detection application for solving the problems, such as to apply by Static Detection at present.Present invention method includes:Application installation package is obtained, wherein, the application installation package includes the Resource TOC of application;The resource file to be scanned of the application is determined according to the Resource TOC;The target resource information of the application is determined by scanning the resource file to be scanned, wherein, the target resource information is used for the performance for determining the application.

Description

One kind applies detection method and server
Technical field
The present invention relates to file scan field, and in particular to one kind applies detection method and server.
Background technology
The limited system resource of mobile terminal is limited to, mobile terminal can not pursue most fine application performance, reasonably Resource in design application scenarios seems most important to the performance of application.Due to application development tool (such as:Development of games Unity engines) the resource packing form of application is not disclosed, the source material of application can not be directly obtained from application installation package, Application can not then be optimized from the angle of resource.
At present, the resource of application is obtained by Static Detection and dynamic detection application.Wherein, the flow of Static Detection is: The resource bag of application is obtained, instrument resolving resource head is detected by static resource so as to obtain the service condition of resource, including line The degree of redundancy of the quantity of resource, the dependence of resource and resource such as reason, grid, animation fragment, material and script, but It is that existing Static Detection needs to obtain the resource bag of application, rather than installation kit, the resource for only analyzing application integrally use feelings Condition, specific resource is not analyzed, such as:The dough sheet number of grid, the size of textures, the form of audio and duration etc. are asked Topic, these are only the key factor for influenceing application performance.Dynamic detection flow is:Using the construction for starting the every kind of resource of aft hook Function obtains the pointer of resource, the privately owned interface that Resource Properties are obtained in library file is then called, so as to obtain each resource Specific data, still, existing dynamic detection can only get the resource of current scene, it is impossible to all resources in detection application, If the resource do not used in the scene can't detect.
The content of the invention
The embodiments of the invention provide one kind to apply detection method and server, for solving to answer by Static Detection at present The problem of with dynamic detection application resource information directly can not be obtained from application installation package, by being packed according to application installation package Reverse mode from application installation package obtain application resource information, do not limited by resource information, effectively increase acquisition money The efficiency of source information.
First aspect present invention provides a kind of data processing method, including:
Application installation package is obtained, wherein, the application installation package includes the Resource TOC of application;
The resource file to be scanned of the application is determined according to the Resource TOC;
The target resource information of the application is determined by scanning the resource file to be scanned, wherein, the target money Source information is used for the performance for determining the application.
Second aspect of the present invention provides a kind of server, including:
First acquisition module, for obtaining application installation package, wherein, the application installation package includes the resource mesh of application Record;
First determining module, for determining the resource file to be scanned of the application according to the Resource TOC;
Second determining module, for determining that the target resource of the application is believed by scanning the resource file to be scanned Breath, wherein, the target resource information is used for the performance for determining the application.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:
Unlike the prior art, after application installation package is obtained, the Resource TOC that is included according to application installation package It is determined that the resource file to be scanned of application, and the target resource information applied by scanning resource file to be scanned to determine, so as to The performance of the application is determined according to the target resource information, it is seen then that the target resource letter of application is directly obtained from application installation package Breath, is not limited by resource information, effectively increases the efficiency for obtaining resource information.
Brief description of the drawings
Fig. 1 is a structural representation of server in the embodiment of the present invention;
Fig. 2 is one embodiment schematic diagram that detection method is applied in the embodiment of the present invention;
Fig. 3 is another embodiment schematic diagram that detection method is applied in the embodiment of the present invention;
Fig. 4 a are the embodiment signal that original resource file is packaged into UnityObject formatted files in the embodiment of the present invention Figure;
Fig. 4 b are the structural representation of Asset formatted files in the embodiment of the present invention;
Fig. 4 c are the top of file structural representation of Asset formatted files in the embodiment of the present invention;
Fig. 4 d are that type representations are intended in the embodiment of the present invention;
Fig. 4 e are the typetree structural representations of mesh model resources in the embodiment of the present invention;
Fig. 4 f are the embodiment schematic diagram that resource information is scanned in the embodiment of the present invention;
Fig. 5 is another embodiment schematic diagram that detection method is applied in the embodiment of the present invention;
Fig. 6 a are the embodiment schematic diagram of test platform detection application in the embodiment of the present invention;
Fig. 6 b are one embodiment schematic diagram that application installation package is uploaded in the embodiment of the present invention;
Fig. 6 c are one embodiment schematic diagram that application installation package is detected in the embodiment of the present invention;
Fig. 6 d are the result schematic diagram that resource error rate is analyzed in the embodiment of the present invention;
Fig. 6 e are a structural representation of the type analysis of Texture resources in the embodiment of the present invention;
One result schematic diagram of the type of error distribution that Fig. 6 f are Mesh in the embodiment of the present invention;
Fig. 7 is another structural representation of server in the embodiment of the present invention;
Fig. 8 is another structural representation of server in the embodiment of the present invention.
Embodiment
The embodiments of the invention provide one kind to apply detection method and server, for solving to answer by Static Detection at present The problem of with dynamic detection application resource information directly can not be obtained from application installation package, by being packed according to application installation package Reverse mode from application installation package obtain application resource information, do not limited by resource information, effectively increase acquisition money The efficiency of source information.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, the every other implementation that those skilled in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Before the embodiment of the present invention is introduced, the term that may relate in the present invention is first introduced:
Term " installation kit ":Installation kit (Install pack), i.e. software installation bag, it is the collection that can voluntarily decompress file Close, include the All Files of software installation.The All Files of software can be discharged into when running installation kit on hard disk, complete to repair Change registration table, modification system is set, creates the work such as shortcut.Software installation bag includes Android system installation kit (English at present Literary full name:AndroidPacKage, abbreviation:APK), apple system installation kit (English full name:IphoneApplication, contracting Write:IPA) etc..
Term " resource file ":The file of the resource of needs is read out by special routine interface from installation kit, can be with Referred to as resource file.The type of resource file can be picture, audio, video, literal resource, or other can be in computer Shown in content etc..
Application involved in the present invention is described below, the application can be MSN application, such as:It is micro- Letter, microblogging, QQ etc..Can also be some game applications, such as:Some game applications that unity engines are developed, including webpage Game, single-play game, mobile phone games etc., wherein, the web game includes QQ philharmonic society, two peerless heroes etc., and the single-play game includes: Chivalrous person's wind and cloud passes, and pig of making trouble etc., the mobile phone games include:Temple is escaped, and Lord Guru's Sword etc., is not specifically limited herein.Wherein, Many game applications at present are the exploitations of unity3d engines, and unity3d engines, which are one, to be allowed player easily to create such as three-dimensional to regard The multi-platform comprehensive development of games instrument of the types such as frequency game, building visualization, realtime three dimensional animation, it is one comprehensively whole The professional game engine of conjunction.
Unity3d engines are a development of games instruments write with language such as Java Script, C#, Boo scripts, letter Clean practicality, the embedded project for various scales.The editing machine of unity3d engines is run in Windows and Mac OS X Under, game can be issued to Windows, Mac, Wii, iPhone, Windows phone 8 and Android platform, can also be utilized Unity web player plug-in units publishing web page is played, and supports Mac and Windows web page browsing, its web player Supported by Mac widgets.
In actual applications, application is installed in terminal, when running application in terminal, may relate to the performance of application is No the problem of needing optimization, and server judges the resource information whether performance of application needs optimization to obtain application first, The performance of application is determined according to the resource information of application.
As shown in figure 1, the concrete structure of server is introduced, the server 100 includes:Transceiver 110, storage The parts such as device 120, processor 130 and power supply 140.It will be understood by those skilled in the art that the server 100 shown in Fig. 2 Structure do not form restriction to server, can include than illustrating more or less parts, or some parts of combination, Or different part arrangement.
Transceiver 110 can be used for receiving and sending messages, such as:The reception and transmission of signal.Transceiver 110 by radio communication with The other equipments such as terminal communicate, and radio communication can use any communication standard or agreement, and it is mobile logical to include but is not limited to the whole world News system (English full name:Global System of Mobile communication, abbreviation:GSM), general grouped wireless Service (English full name:General Packet Radio Service, abbreviation:GPRS), CDMA (English full name:Code Division Multiple Access, abbreviation:CDMA), WCDMA (English full name:Wideband Code Division Multiple Access, abbreviation:WCDMA), Long Term Evolution (English full name:Long Term Evolution, contracting Write:LTE), Email, Short Message Service (English full name:Short Messaging Service, abbreviation:SMS) etc..
Memory 120 can be used for storage software program and module, and processor 130 is stored in memory 120 by operation Software program and module, so as to execute server 100 various function application and data processing.Memory 120 can be led To include storing program area and storage data field, wherein, storing program area can storage program area, needed at least one function Application program (such as sound-playing function, image player function etc.) etc.;Storage data field can store to be made according to server 100 With data (such as voice data, phone directory etc.) created etc..In addition, memory 120 can be deposited including high random access Reservoir, nonvolatile memory, for example, at least a disk memory, flush memory device or other volatibility can also be included Solid-state memory.
Processor 130 is the control centre of server 100, utilizes various interfaces and the whole server 100 of connection Various pieces, by running or performing the software program and/or module that are stored in memory 120, and call and be stored in Data in reservoir 120, the various functions and processing data of execute server 100, so as to carry out overall prison to server 100 Control.Optionally, processor 130 may include one or more processing units;Preferably, processor 130 can integrate application processor And modem processor, wherein, application processor mainly handles operating system, user interface and application program etc., modulatedemodulate Processor is adjusted mainly to handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor In 130.
Server 100 also includes the power supply 140 (such as battery) to all parts power supply, it is preferred that power supply can pass through Power-supply management system and processor 130 are logically contiguous, so as to realize management charging, electric discharge, Yi Jigong by power-supply management system The functions such as consumption management.
Although being not shown, the server 100 can also include input block, display unit etc., will not be repeated here.
In embodiments of the present invention, the processor 130 is used to perform following steps:
Application installation package is obtained, wherein, the application installation package includes the Resource TOC of application;
The resource file to be scanned of the application is determined according to the Resource TOC;
The target resource information of the application is determined by scanning the resource file to be scanned, wherein, the target money Source information is used for the performance for determining the application.
In some possible implementations, the processor 130 is additionally operable to perform following steps:
After the target resource information that the application is determined by scanning the resource file to be scanned, described in acquisition The resource optimization information of application, wherein, resource corresponding to the resource optimization information comprises at least the target resource information pair The resource answered;
The performance of the application is determined by the target resource information and the resource optimization information.
In some possible implementations, the processor 130 is specifically used for according to determining the Resource TOC First formatted file of application, wherein, first formatted file includes file type tree table;
The resource file to be scanned is determined according to the file type tree table.
In some possible implementations, the processor 130 is specifically used for according to determining the Resource TOC First formatted file of application, wherein, first formatted file includes file type tree table;
Second formatted file is determined according to the file type tree table, wherein, second formatted file includes more Corresponding relation be present with resource file to be scanned in individual file type, the multiple file type;
The resource file to be scanned is determined according to the multiple file type.
In some possible implementations, the processor 130 is specifically used for by described in static scanning rule scanning Resource file to be scanned determines the target resource information of the application, wherein, the static scanning rule is according to the target The scanning rule that resource information determines.
Referring to Fig. 2, in the embodiment of the present invention apply detection method one embodiment schematic diagram, the embodiment it is specific Flow is as follows:
Step 201, application installation package is obtained, wherein, the application installation package includes the Resource TOC of application;
In the embodiment of the present invention, application installation package is uploaded onto the server, so that server obtains application installation Bag, wherein, the application installation package be for do not indicate directly resource information (such as:Grid, tinter, audio, textures etc. are believed Breath) application installation package, such as:The game application installation kit that unity engines are developed, it is typically no directly to show that resource is believed Breath, is not limited specifically, the application that unity engines are developed in the embodiment of the present invention is introduced herein.
The form of application installation package has many kinds, such as:APK forms, IPA forms, server installs the application Bag first carries out decompression processing, so as to obtain the Resource TOC of the application installation package, wherein, the application is contained in the Resource TOC Formatted file catalogue.
Step 202, the resource file to be scanned for determining according to the Resource TOC application;
In the embodiment of the present invention, due to not indicating resource information in application installation package directly, then server is according to the money Source directory determines the resource file to be scanned of application, wherein, the resource of the application software package is included in the resource file to be scanned Information.
Step 203, the target resource information for determining by scanning the resource file to be scanned the application, wherein, institute State the performance that target resource information is used to determine the application.
In embodiments of the present invention, the target resource information includes a variety of information, such as:Grid, textures, audio, It is at least one in tinter, other information can also be included certainly, be not specifically limited herein.
In actual applications, the target of the application is determined by the static scanning rule scanning resource file to be scanned Resource information, wherein, the static scanning rule is the scanning rule determined according to the target resource information, such as:This is quiet State scanning rule is determined according to audio-frequency information, then directly scans the application installation package from the resource file to be scanned Audio-frequency information.It is, of course, also possible to the resource file to be scanned is scanned by other means so that it is determined that the target of the application Resource information, it is not specifically limited herein.
In some possible implementations, the mesh that the application is determined by scanning the resource file to be scanned After marking resource information, the resource optimization information of the application is obtained, wherein, resource corresponding to the resource optimization information is at least Including resource corresponding to the target resource information;Determined by the target resource information and the resource optimization information The performance of the application.
In actual applications, after the target resource information of application software package is obtained, in order to judge that the performance of the application is It is no up to standard, then it is compared by obtaining the resource optimization information of application, when the target resource information and the resource optimization information When identical or approximately the same, then illustrate the functional of the application, when target resource information and the resource optimization information When significant difference be present, then illustrate that the performance of the application is bad, then need to carry out performance optimization to the application, so that should answer Performance is up to standard.
It can be seen that option is compiled without additional modifications code or addition in the embodiment of the present invention, by way of resource cracks, Target resource information is obtained directly from the resource file to be scanned of application installation package, is analyzed and data statistics, and is combined Resource optimization information, in the case of solving no source material, the problem of application can not carry out resource optimization test, developer Resource of problems can be intuitive to see, and is pointedly optimized.
Referring to Fig. 3, another embodiment schematic diagram of detection method, the tool of the embodiment are applied in the embodiment of the present invention Body flow is as follows:
Step 301, application installation package is obtained, wherein, the application installation package includes the Resource TOC of application;
It should be noted that step 301 and step 201 are same or similar, the description of step 201 is specifically see, this Place repeats no more.
Step 302, the first formatted file for determining according to the Resource TOC application, wherein, first form File includes file type tree table;
In embodiments of the present invention, the first form text of the application is determined by obtaining the Resource TOC of application installation package Part, wherein, due to the resource file to be scanned of application can be determined according to file type tree table, then in first formatted file extremely Include file type tree table less.
First formatted file can be resource (Asset) file, due to the not open Asset files of some applications Packing form, then by reverse thinking, analyze Asset file formats, such as:Unity engines are not by the original of application Resource file is packaged into Asset formatted files as an entirety, but first by the original resource file elder generation layout sequence chemical conversion Unity objects (Object) formatted file, then UnityObject formatted files are packaged into Asset formatted files, such as Fig. 4 a institutes Show, original resource file has picture format, text formatting etc., and the original resource file of various forms is packaged into UnityObject formatted files, and serialization is carried out, each UnityObject formatted files have corresponding sequence number, are easy to follow-up UnityObject formatted files needed for easily choosing.
UnityObject formatted files are packaged into Asset formatted files, are Asset formatted files as shown in Figure 4 b Structure:Including Asset file headers (English:AssetHeader), file type tree table (English:TypeTreeTable), it is right As routing table (English:ObjectPathTable), Asset citation index (English:AssetRefTable), subject area (English:ObjectsArea).Wherein, AssetHeader, TypeTreeTable, ObjectPathTable, AssetRefTable belongs to the top of file of Asset formatted files, storage be resource general construction information, ObjectsArea storage be serializing resource data, all resource Object (such as:Picture, tinter, audio, mould Type, grid etc.) all it is stored in ObjectsArea.
As illustrated in fig. 4 c, it is the top of file structure of Asset formatted files, wherein, AssetHeader is housed entirely The essential information of Asset formatted files, such as:Type tree size, file size, form, data-bias address etc. of packing. Multiple type blocks (English is deposited in TypeTreeTable:TypeField) structure, it is the structure of all classification (Class) Changing information, each Class is the type belonging to Object, such as:Grid (English:Mesh model resource, texture) are represented Picture resource is represented, engineVersion is a character string, represents the version of Unity engines.TreeVersion is Tree Version, wherein, each type structured message is stored in a block structure (English:FieldStruct in), one Class corresponds to multiple type, and a Class may correspond to multiple different type structures, and entrier represents object path (Objectpath) number.
In actual applications, the type tree part of most Asset formatted files is all empty, and early version Unity is beaten The resource of bag is to carry type tree information, and with the renewal of version, this part does not use, therefore with 0 filling.Because for For Unity, every part of Asset formatted file preserves a same type tree and wasted very much, and it is a that it only needs preserve itself, Or directly reading and construction object method is write all right in code, the possibility of the latter is very big.Therefore, Unity It is exactly to safeguard the database of a all type structural informations that resource, which cracks a critically important job,.In view of edition compatibility Property, different unity versions may use same type for Class1, but Class2 is but made to have adjusted form use Different type structures.So all type of all versions are saved, a corresponding table is then safeguarded, such as Fig. 4 d institutes Show, the content of list item includes:Class indication code (English:ClassID), application version identification code (engineVersionID), class Type indexes (typeIndex), wherein, ClassID represents object type ID, in conjunction with unity version EngineVersionID can uniquely determine a type.
In actual applications, each object has the ObjectPath Struct of oneself, describes object road Footpath identification code (pathID), with reference to information such as function (offset), length (length), typeID.
In addition, AssetRefTable is reference structure, the dependence between Asset formatted files is described.
Step 303, the resource file to be scanned for determining according to the file type tree table application;
In embodiments of the present invention, the resource file to be scanned can be UnityObject files, not do specific limit herein It is fixed.
In actual applications, such as:Original resource file sequence can be melted into by Unity applications according to typetree UnityObject, the resource of each type correspond to a kind of type, such as:The typetree of mesh model resources, such as Fig. 4 e institutes Show.And the Unity applications of each version are possible to change the typetree of some resource types.With Unity application versions Renewal, the typetree of compatible different editions Unity application.
Step 304, the target resource information for determining by scanning the resource file to be scanned the application, wherein, institute State the performance that target resource information is used to determine the application.
In actual applications, the target of the application is determined by the static scanning rule scanning resource file to be scanned Resource information, wherein, the static scanning rule is the scanning rule determined according to the target resource information.Certainly, may be used also To scan the resource file to be scanned by other means so that it is determined that the target resource information of the application, does not do and have herein Body limits, when file to be scanned be UnityObject files, the original resource file applied without extraction, so as to effectively improve The speed of resource scanning.
In embodiments of the present invention, the target resource information includes a variety of information, such as:Grid, textures, audio, It is at least one in tinter, other information can also be included certainly, be not specifically limited herein.
As shown in fig. 4f, to scan grid (Mesh), textures (Texture), audio (Audio), tinter (Shader) exemplified by:
Mesh is the file of .obj suffix, and .obj represents the text of plaintext, it is necessary to which the data of parsing include summit Number (v), dough sheet number (f), material number (usemtl).
Texture form including .tga .png .dds .ktx etc., it is necessary to parsing data be picture long width values, Every kind of picture format can get length and width numerical value in file header.
Audio form including .wav .mp3 .ogg etc., it is necessary to parsing data be audio duration, wav forms Duration can be obtained by voice data length/bit rate, and the duration of MP3 and ogg forms can use python mutagen modules Obtain.
Shader is the plaintext script file of .shader forms, it is necessary to which the data of parsing are the complicated numbers used in script Learn operation times and discard operates with number.
In some possible implementations, the mesh that the application is determined by scanning the resource file to be scanned After marking resource information, the resource optimization information of the application is obtained, wherein, resource corresponding to the resource optimization information is at least Including resource corresponding to the target resource information;Determined by the target resource information and the resource optimization information The performance of the application.
In actual applications, the background framework of server is broadly divided into three parts:Web services, processing service and database. Wherein, Web service uses Web application frameworks (English:Django), mainly it is responsible for authentication, task processing, result queries etc., with Front page layout interacts, and responds external interface;Processing service is handled client, analyzed and produced knot using python scripts Fruit;Database includes:Relevant database (mysql) and Lightweight Database (sqlite), for depositing task data and analysis Result data server determines the performance of the application according to analysis result data.
Referring to Fig. 5, another embodiment schematic diagram of detection method, the tool of the embodiment are applied in the embodiment of the present invention Body flow is as follows:
Step 501, application installation package is obtained, wherein, the application installation package includes the Resource TOC of application;
Step 502, the first formatted file for determining according to the Resource TOC application, wherein, first form File includes file type tree table;
It should be noted that the step 301 and step 302 shown in step 501 to step 502 and Fig. 3 are same or similar, The specific description that see step 301 and step 302, here is omitted.
Step 503, second formatted file determined according to the file type tree table, wherein, the second form text Part includes multiple file types, and the multiple file type has corresponding relation with resource file to be scanned;
In embodiments of the present invention, second formatted file is UnityObject files, the UnityObject files Including multiple file types, such as:Typetree of Mesh model resources etc..
Step 504, the resource file to be scanned for determining according to the multiple file type the application;
Unlike embodiment illustrated in fig. 3, the file to be scanned is the original resource file of application installation package, wherein, The original resource file includes whole resource informations of application.Due to the text in the second formatted file for being obtained in step 503 There is corresponding relation in part type, therefore, the original resource file of application is determined by this document type with original resource file.
First formatted file can be resource (Asset) file, due to the not open Asset files of some applications Packing form, then by reverse thinking, analyze Asset file formats, so as to extract original resource file, such as:Unity Engine is not packaged into Asset formatted files using the original resource file of application as an entirety, but first that this is original Resource file elder generation layout sequence chemical conversion Unity objects (Object) formatted file, then UnityObject formatted files are packaged into Asset formatted files.
Step 505, the target resource information for determining by scanning the resource file to be scanned the application, wherein, institute State the performance that target resource information is used to determine the application.
In actual applications, the target of the application is determined by the static scanning rule scanning resource file to be scanned Resource information, wherein, the static scanning rule is the scanning rule determined according to the target resource information.Certainly, may be used also To scan the resource file to be scanned by other means so that it is determined that the target resource information of the application, does not do and have herein Body limits.
In embodiments of the present invention, the target resource information includes a variety of information, such as:Grid, textures, audio, It is at least one in tinter, other information can also be included certainly, be not specifically limited herein.
In some possible implementations, the mesh that the application is determined by scanning the resource file to be scanned After marking resource information, the resource optimization information of the application is obtained, wherein, resource corresponding to the resource optimization information is at least Including resource corresponding to the target resource information;Determined by the target resource information and the resource optimization information The performance of the application.
It should be noted that step 505 and step 304 shown in Fig. 3 are same or similar, step 304 specifically see Description, here is omitted.
In actual applications, so that server is Tengxun's test platform as an example, Tengxun's test platform is introduced to application detection Process, it is as shown in Figure 6 a, main to include uploading application installation package, result is waited, three parts of query report, idiographic flow is such as Under:
First, application installation package is uploaded to Tengxun's test platform, as shown in Figure 6 b, answered by clicking on to apply or pull Mode uploads application installation package, and the application installation package uploaded shown in Fig. 6 b is APK forms, certainly, in actual applications, also It can be the extended formattings such as IPA, be not specifically limited herein.After application installation package has been uploaded, " submitting test " is clicked on, then is opened Begin to detect the application.
Secondly, Tengxun's test platform scans the application installation package, and then only needs to wait for result in user side, such as Fig. 6 c institutes Show, see application installation package by " in execution " in user side, wherein, used in Tengxun's test platform scanning application installation package Time is not changeless, and typically at 3 to 5 minutes or so, in actual applications, Tengxun's test platform is to application installation package Scan item generally comprises:Mesh, Texture, Audio, Shader.
Finally, user side can inquire examining report of Tengxun's test platform to application installation package, in report, Ke Yiquan The resource situation of application is analyzed to orientation, all resource problems cover all at one glance, wherein, registration includes:The data system of various dimensions Meter (various resource error rate statistics, resource type distribution, type of error distribution), repeats resources measurement, super large resources measurement, asks Inscribe resource pre-review.
As shown in fig 6d, Mesh, Texture, Audio, the mistake of these four resource types of Shader are analyzed in report Rate by mistake.As shown in fig 6e, by taking Texture as an example, the type ratio of Texture resources is analyzed, wherein, the occupancy of png types The occupancy 17.5% of 0.0%, tga type, the occupancy 82.5% of ktx types, the occupancy 0.0% of dds types.As shown in Figure 6 f, By taking Mesh as an example, Mesh type of error distribution is analyzed, wherein, the ratio of mistake is 8.0%, and the ratio of warning is 50.9%, The ratio passed through is 41.2%;During to dynamic Mesh error analyses, then the ratio that dynamic object dough sheet number exceedes the upper limit is 12.4%, the ratio that dynamic object material number exceedes the upper limit is 0.0%, and the ratio that dynamic object bone number exceedes the upper limit is 87.6%.
In addition, resource repeats to be the major reason for causing application installation package excessive, such as:Do not gone the same way under game resource catalogue Same resource file has been put in footpath, thus causes the redundancy of resource, and Unity resource optimizations, which now provided with, checks redundancy money The function in source, development teams can be helped quickly and efficiently to find redundant resource, installation kit is reduced weight.Super large resource It is that the effect of one super large resource of optimization surpasses the multiple small resources of optimization one of the reason for causing installation kit excessive, meeting during test The resource of size TOP5 in each type resource is counted, optimizes, will get twice the result with half the effort for these super large resources.
In actual applications, a resource file name, possibly can not fast positioning provided to problematic resource, report The preview function of problem resource, development teams can more intuitively understand the resource to go wrong, so as to improve orientation problem The efficiency of resource.
For ease of preferably implementing the above-mentioned correlation technique of the embodiment of the present invention, it is also provided below for coordinating the above method Server.
Referring to Fig. 7, in the embodiment of the present invention server 700 a structural representation, the server 700 includes:The One acquisition module 701, the first determining module 702, the second determining module 703.
First acquisition module 701, for obtaining application installation package, wherein, the application installation package includes the resource of application Catalogue;
First determining module 702, for determining the resource file to be scanned of the application according to the Resource TOC;
Second determining module 703, for determining the target resource of the application by scanning the resource file to be scanned Information, wherein, the target resource information is used for the performance for determining the application.
In some possible implementations, as shown in figure 8, the server 700 also includes:
Second acquisition module 704, institute is determined by scanning the resource file to be scanned for second determining module After the target resource information for stating application, the resource optimization information of the application is obtained, wherein, the resource optimization information is corresponding Resource comprise at least resource corresponding to the target resource information;
3rd determining module 705, for determining institute by the target resource information and the resource optimization information State the performance of application.
In some possible implementations, first determining module 702 is specifically used for true according to the Resource TOC First formatted file of the fixed application, wherein, first formatted file includes file type tree table;According to the files classes Type tree table determines the resource file to be scanned.
In some possible implementations, first determining module 702 is specifically used for true according to the Resource TOC First formatted file of the fixed application, wherein, first formatted file includes file type tree table;According to the files classes Type tree table determines second formatted file, wherein, second formatted file includes multiple file types, the multiple file Corresponding relation be present with resource file to be scanned in type;The resource file to be scanned is determined according to the multiple file type.
In some possible implementations, second determining module 703 is specifically used for sweeping by static scanning rule The target resource information that the resource file to be scanned determines the application is retouched, wherein, the static scanning rule is according to institute State the scanning rule of target resource information determination.
In some possible implementations, the target resource information includes grid, textures, audio, in tinter It is at least one.
Unlike the prior art, after application installation package is obtained, the Resource TOC that is included according to application installation package It is determined that the resource file to be scanned of application, and the target resource information applied by scanning resource file to be scanned to determine, so as to The performance of the application is determined according to the target resource information, it is seen then that the target resource letter of application is directly obtained from application installation package Breath, is not limited by resource information, effectively increases the efficiency for obtaining resource information.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the unit Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. one kind applies detection method, it is characterised in that including:
Application installation package is obtained, wherein, the application installation package includes the Resource TOC of application;
The resource file to be scanned of the application is determined according to the Resource TOC;
The target resource information of the application is determined by scanning the resource file to be scanned, wherein, the target resource letter Cease the performance for determining the application;
After the target resource information that the application is determined by scanning the resource file to be scanned, methods described is also wrapped Include:
The resource optimization information of the application is obtained, wherein, resource corresponding to the resource optimization information comprises at least the mesh Mark resource corresponding to resource information;
The performance of the application is determined by the target resource information and the resource optimization information.
2. according to the method for claim 1, it is characterised in that described that waiting for the application is determined according to the Resource TOC Scanning resource file includes:
The first formatted file of the application is determined according to the Resource TOC, wherein, first formatted file includes file Type tree table;
The resource file to be scanned is determined according to the file type tree table.
3. according to the method for claim 1, it is characterised in that described that waiting for the application is determined according to the Resource TOC Scanning resource file includes:
The first formatted file of the application is determined according to the Resource TOC, wherein, first formatted file includes file Type tree table;
Second formatted file is determined according to the file type tree table, wherein, second formatted file includes multiple files classes Corresponding relation be present with resource file to be scanned in type, the multiple file type;
The resource file to be scanned is determined according to the multiple file type.
4. according to the method for claim 1, it is characterised in that described to determine institute by scanning the resource file to be scanned Stating the target resource information of application includes:
The target resource information of the application is determined by the static scanning rule scanning resource file to be scanned, wherein, institute It is the scanning rule determined according to the target resource information to state static scanning rule.
5. according to the method described in any one of Claims 1-4, it is characterised in that the target resource information includes grid, patch Scheme, audio, it is at least one in tinter.
A kind of 6. server, it is characterised in that including:
First acquisition module, for obtaining application installation package, wherein, the application installation package includes the Resource TOC of application;
First determining module, for determining the resource file to be scanned of the application according to the Resource TOC;
Second determining module, for determining the target resource information of the application by scanning the resource file to be scanned, its In, the target resource information is used for the performance for determining the application;
The server also includes:
Second acquisition module, the application is determined by scanning the resource file to be scanned for second determining module After target resource information, the resource optimization information of the application is obtained, wherein, resource corresponding to the resource optimization information is extremely Include resource corresponding to the target resource information less;
3rd determining module, for determining the application by the target resource information and the resource optimization information Performance.
7. server according to claim 6, it is characterised in that first determining module is specifically used for according to the money Source directory determines the first formatted file of the application, wherein, first formatted file includes file type tree table;According to institute State file type tree table and determine the resource file to be scanned.
8. server according to claim 6, it is characterised in that first determining module is specifically used for according to the money Source directory determines the first formatted file of the application, wherein, first formatted file includes file type tree table;According to institute State file type tree table and determine the second formatted file, wherein, second formatted file includes multiple file types, the multiple Corresponding relation be present with resource file to be scanned in file type;The resource text to be scanned is determined according to the multiple file type Part.
9. server according to claim 6, it is characterised in that second determining module is specifically used for sweeping by static state Retouch rule and scan the target resource information that the resource file to be scanned determines the application, wherein, the static scanning rule For the scanning rule determined according to the target resource information.
10. according to the server described in any one of claim 6 to 9, it is characterised in that the target resource information includes net Lattice, textures, audio are at least one in tinter.
CN201610798748.XA 2016-08-31 2016-08-31 One kind applies detection method and server Active CN106354647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610798748.XA CN106354647B (en) 2016-08-31 2016-08-31 One kind applies detection method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610798748.XA CN106354647B (en) 2016-08-31 2016-08-31 One kind applies detection method and server

Publications (2)

Publication Number Publication Date
CN106354647A CN106354647A (en) 2017-01-25
CN106354647B true CN106354647B (en) 2018-02-27

Family

ID=57859337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610798748.XA Active CN106354647B (en) 2016-08-31 2016-08-31 One kind applies detection method and server

Country Status (1)

Country Link
CN (1) CN106354647B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066257A (en) * 2017-03-06 2017-08-18 北京潘达互娱科技有限公司 A kind of method for packing and device by Unity to Android
CN107436787B (en) * 2017-07-31 2018-05-22 腾讯科技(深圳)有限公司 Method for processing resource, device, storage medium and electronic device
CN107767434B (en) * 2017-09-13 2021-06-29 福建天晴数码有限公司 Method for acquiring texture mapping configuration information in virtual reality technology and storage medium
CN108399071B (en) * 2018-01-19 2021-07-20 五八有限公司 Application program installation package size processing method, device, equipment and storage medium
CN108446228A (en) * 2018-03-12 2018-08-24 北京五八信息技术有限公司 Detect method, apparatus, equipment and the computer readable storage medium of installation kit
CN109828776B (en) * 2018-12-06 2022-05-20 珠海西山居互动娱乐科技有限公司 Method and system for searching and supplementing missing resources
CN109857655B (en) * 2019-01-17 2022-07-01 珠海金山网络游戏科技有限公司 Method and system for detecting dynamic performance of art resources
CN111552520B (en) * 2020-04-10 2021-07-27 武汉思普崚技术有限公司 User-defined application identification method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955372A (en) * 2014-04-30 2014-07-30 广东欧珀移动通信有限公司 Method and device for detecting resources in mobile terminal
CN104426945A (en) * 2013-08-27 2015-03-18 腾讯科技(深圳)有限公司 Method and system for acquiring application performance data, and device
CN105094922A (en) * 2015-08-17 2015-11-25 北京奇虎科技有限公司 Application installation-free operation control method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426945A (en) * 2013-08-27 2015-03-18 腾讯科技(深圳)有限公司 Method and system for acquiring application performance data, and device
CN103955372A (en) * 2014-04-30 2014-07-30 广东欧珀移动通信有限公司 Method and device for detecting resources in mobile terminal
CN105094922A (en) * 2015-08-17 2015-11-25 北京奇虎科技有限公司 Application installation-free operation control method and device

Also Published As

Publication number Publication date
CN106354647A (en) 2017-01-25

Similar Documents

Publication Publication Date Title
CN106354647B (en) One kind applies detection method and server
EP3433732B1 (en) Converting visual diagrams into code
CN108964968B (en) Service access management method and system in container cloud environment
JP5282324B2 (en) Data container for user interface data
CN103136471B (en) A kind of malice Android application program detection method and system
CN106201890B (en) The performance optimization method and server of a kind of application
CN105988996B (en) Index file generation method and device
CN104572085B (en) The analysis method and device of application program
CN102385552B (en) Sample dissects the dynamic calculation of report
CN110287696B (en) Detection method, device and equipment for rebound shell process
CN110286917A (en) File packing method, device, equipment and storage medium
CN106776314A (en) A kind of test system
CN108228770A (en) A kind of method and device of application file source inquiry
CN116107846B (en) Linux system event monitoring method and device based on EBPF
CN107797823A (en) Business Rule Management method, apparatus, storage medium and computer equipment
CN112232881A (en) Data detection method and device, electronic equipment and storage medium
CN105160018A (en) Method, device and system for image copy/paste
CN110674083A (en) Workflow migration method, device, equipment and computer readable storage medium
CN113268243A (en) Memory prediction method and device, storage medium and electronic equipment
CN112989433A (en) Verification method based on Java Bean verification rule and related equipment
CN105550179A (en) Webpage collection method and browser plug-in
Pan et al. A Novel HDF‐Based Data Compression and Integration Approach to Support BIM‐GIS Practical Applications
CN110059214A (en) A kind of image resource processing method and processing device
CN104021170B (en) A kind of information acquisition method and cloud server
CN106169988B (en) The method of data is transmitted in cruising inspection system

Legal Events

Date Code Title Description
C06 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