CN110032501A - A kind of processing method, device and the electronic equipment of APP installation kit - Google Patents

A kind of processing method, device and the electronic equipment of APP installation kit Download PDF

Info

Publication number
CN110032501A
CN110032501A CN201910257803.8A CN201910257803A CN110032501A CN 110032501 A CN110032501 A CN 110032501A CN 201910257803 A CN201910257803 A CN 201910257803A CN 110032501 A CN110032501 A CN 110032501A
Authority
CN
China
Prior art keywords
image
file
app
mentioned
dictionary
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
CN201910257803.8A
Other languages
Chinese (zh)
Other versions
CN110032501B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910257803.8A priority Critical patent/CN110032501B/en
Publication of CN110032501A publication Critical patent/CN110032501A/en
Application granted granted Critical
Publication of CN110032501B publication Critical patent/CN110032501B/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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the present invention provides processing method, device and the electronic equipment of a kind of APP installation kit, and method includes: decompression APP installation kit, obtains the APP file in the APP installation kit;Extract the referenced characteristics value in the characteristic value of each image in the APP file, and the executable file of the extraction APP file, wherein the characteristic value for the image that the referenced characteristics value is used to indicate to be quoted by the executable file;The characteristic value of the referenced characteristics value and each image is matched, with the image use state of the determination APP file.The scan performance to APP installation kit can be improved in the embodiment of the present invention.

Description

A kind of processing method, device and the electronic equipment of APP installation kit
Technical field
The present invention relates to Internet technical fields more particularly to a kind of application program (Application, abbreviation APP) to pacify Fill processing method, device and the electronic equipment of packet.
Background technique
With the development of internet technology, the quantity of installable APP is more and more on electronic equipment, and type is also more next It is more.At present APP is installed on electronic equipment and usually first downloads APP installation kit, and APP is installed by the APP installation kit.So And APP is installed often by APP installation kit, the image use state in APP installation kit can not be scanned, such as: Wu Fashi Image and unused image have been used in other APP installation kit.If but practical application can scan the image of APP file and use shape The image use state is supplied to research staff, tester or electronic equipment etc. by state, may assist research staff, Tester or electronic equipment etc. preferably optimize the performance of APP.As it can be seen that presently, there are the scan performances to APP installation kit Relatively low problem.
Summary of the invention
The embodiment of the present invention provides processing method, device and the electronic equipment of a kind of APP installation kit, to solve to pacify APP Fill the relatively low problem of the scan performance of packet.
In a first aspect, the embodiment of the present invention provides a kind of processing method of APP installation kit, comprising:
APP installation kit is decompressed, the APP file in above-mentioned APP installation kit is obtained;
Extract drawing in the characteristic value of each image in above-mentioned APP file, and the executable file of the above-mentioned APP file of extraction With characteristic value, wherein the characteristic value for the image that above-mentioned referenced characteristics value is used to indicate to be quoted by above-mentioned executable file;
The characteristic value of above-mentioned referenced characteristics value and above-mentioned each image is matched, with the image of the above-mentioned APP file of determination Use state.
It optionally, include image under the catalogue of above-mentioned APP file, and including compressed image file, said extracted is above-mentioned The characteristic value of each image in APP file, comprising:
Extract the characteristic value for each image for including under the catalogue of above-mentioned APP file;
Above-mentioned compressed image file is unziped under target directory, and extracts the feature of each image under above-mentioned target directory Value.
Optionally, the characteristic value of above-mentioned image is the title of image, includes under the catalogue of the above-mentioned APP file of said extracted The characteristic value of each image, comprising:
The title of each image is extracted from the routing information for each image for including under the catalogue of above-mentioned APP file respectively;
The characteristic value of each image under the above-mentioned target directory of said extracted, comprising:
The title of each image is extracted from the routing information of image each under above-mentioned target directory.
Optionally, the above-mentioned characteristic value by above-mentioned referenced characteristics value and above-mentioned each image matches, with the above-mentioned APP of determination Before the image use state of file, the above method further include:
Generate the first characteristics of image dictionary, wherein above-mentioned first characteristics of image dictionary includes each image in above-mentioned APP file Dictionary information, the key of the dictionary information of the first image is the feature of above-mentioned first image in above-mentioned first characteristics of image dictionary Value, above-mentioned first image are any image in above-mentioned APP file;
Generate the second characteristics of image dictionary, wherein above-mentioned second characteristics of image dictionary includes being drawn by above-mentioned executable file The dictionary information of image, the key of the dictionary information of the second image is above-mentioned second image in above-mentioned second characteristics of image dictionary Characteristic value, above-mentioned second image is any image quoted by above-mentioned executable file;
The above-mentioned characteristic value by above-mentioned referenced characteristics value and above-mentioned each image matches, with the above-mentioned APP file of determination Image use state, comprising:
Above-mentioned second characteristics of image dictionary is matched with above-mentioned first characteristics of image dictionary, with the above-mentioned APP text of determination The image use state of part, above-mentioned image use state is for being expressed as follows one:
Image and unused image are used;
Wherein, above-mentioned to have used key of the image in above-mentioned first characteristics of image dictionary in above-mentioned second characteristics of image dictionary In, above-mentioned unused image is in the key in above-mentioned first characteristics of image dictionary not in above-mentioned second characteristics of image dictionary.
Optionally, above-mentioned executable file includes at least one of following:
The patch of binary file in above-mentioned APP file, the add-on file in above-mentioned APP file and above-mentioned APP file File.
Second aspect, the embodiment of the present invention provide a kind of processing unit of APP installation kit, comprising:
Decompression module obtains the APP file in above-mentioned APP installation kit for decompressing APP installation kit;
Extraction module, for extracting the characteristic value of each image in above-mentioned APP file, and extract above-mentioned APP file can Execute the referenced characteristics value in file, wherein above-mentioned referenced characteristics value is used for the image for indicating to be quoted by above-mentioned executable file Characteristic value;
Determining module, it is above-mentioned with determination for matching the characteristic value of above-mentioned referenced characteristics value and above-mentioned each image The image use state of APP file.
It optionally, include image under the catalogue of above-mentioned APP file, and including compressed image file, said extracted module Include:
First extraction unit, the characteristic value for each image for including under the catalogue for extracting above-mentioned APP file;
Second extraction unit for unziping to above-mentioned compressed image file under target directory, and extracts above-mentioned target mesh The characteristic value of each image under record;
Third extraction unit, the referenced characteristics value in executable file for extracting above-mentioned APP file, wherein above-mentioned The characteristic value for the image that referenced characteristics value is used to indicate to be quoted by above-mentioned executable file.
Optionally, the characteristic value of above-mentioned image is the title of image, and above-mentioned first extraction unit is used for respectively from above-mentioned APP The title of each image is extracted in the routing information for each image for including under the catalogue of file;
Above-mentioned second extraction unit is for unziping to above-mentioned compressed image file under target directory, and from above-mentioned target mesh The title of each image is extracted under record in the routing information of each image.
Optionally, above-mentioned apparatus further include:
First generation module, for generating the first characteristics of image dictionary, wherein above-mentioned first characteristics of image dictionary includes upper The dictionary information of each image in APP file is stated, the key of the dictionary information of the first image is upper in above-mentioned first characteristics of image dictionary The characteristic value of the first image is stated, above-mentioned first image is any image in above-mentioned APP file;
Second generation module, for generating the second characteristics of image dictionary, wherein above-mentioned second characteristics of image dictionary includes quilt The dictionary information of the image of above-mentioned executable file reference, the dictionary information of the second image in above-mentioned second characteristics of image dictionary Key is the characteristic value of above-mentioned second image, and above-mentioned second image is any image quoted by above-mentioned executable file;
Above-mentioned determining module is used to match above-mentioned second characteristics of image dictionary with above-mentioned first characteristics of image dictionary, With the image use state of the above-mentioned APP file of determination, above-mentioned image use state is for being expressed as follows one:
Image and unused image are used;
Wherein, above-mentioned to have used key of the image in above-mentioned first characteristics of image dictionary in above-mentioned second characteristics of image dictionary In, above-mentioned unused image is in the key in above-mentioned first characteristics of image dictionary not in above-mentioned second characteristics of image dictionary.
Optionally, above-mentioned executable file includes at least one of following:
The patch of binary file in above-mentioned APP file, the add-on file in above-mentioned APP file and above-mentioned APP file File.
The third aspect, the embodiment of the present invention provides a kind of electronic equipment, including processor, memory and is stored in above-mentioned deposit On reservoir and the computer program that can run on above-mentioned processor, above-mentioned computer program are realized when being executed by above-mentioned processor The step of processing method of APP installation kit provided in an embodiment of the present invention.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, above-mentioned computer-readable storage medium Computer program is stored in matter, above-mentioned computer program realizes APP peace provided in an embodiment of the present invention when being executed by processor The step of filling the processing method of packet.
In the embodiment of the present invention, APP installation kit is decompressed, the APP file in above-mentioned APP installation kit is obtained;Extract above-mentioned APP Referenced characteristics value in the characteristic value of each image in file, and the executable file of the above-mentioned APP file of extraction, wherein above-mentioned The characteristic value for the image that referenced characteristics value is used to indicate to be quoted by above-mentioned executable file;By above-mentioned referenced characteristics value and above-mentioned each The characteristic value of image is matched, with the image use state of the above-mentioned APP file of determination.In this manner it is achieved that APP installation kit In image be scanned, so as to improve the scan performance to APP installation kit.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed in being described below to the embodiment of the present invention Attached drawing to be used is briefly described.
Fig. 1 is a kind of flow chart of the processing method of APP installation kit provided in an embodiment of the present invention;
Fig. 2 is a kind of structure chart of the processing method device of APP installation kit provided in an embodiment of the present invention;
Fig. 3 is the structure chart of the processing method device of another kind APP installation kit provided in an embodiment of the present invention;
Fig. 4 is the structure chart of the processing method device of another kind APP installation kit provided in an embodiment of the present invention;
Fig. 5 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description.
Term " includes " and its any deformation in the description and claims of this application, it is intended that covering Non-exclusive includes, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to clearly Those of list to Chu step or unit, but may include be not clearly listed or for these process, methods, product or The intrinsic other step or units of equipment.In addition, indicating institute's connecting object using "and/or" in specification and claim At least one, such as A and/or B, indicate to include independent A, independent B and A and B have three kinds of situations.
In embodiments of the present invention, " illustrative " or " such as " etc. words for indicate make example, illustration or explanation.This Be described as in inventive embodiments " illustrative " or " such as " any embodiment or design scheme be not necessarily to be construed as comparing Other embodiments or design scheme more preferably or more advantage.Specifically, use " illustrative " or " such as " etc. words purport Related notion is being presented in specific ways.
Referring to Figure 1, Fig. 1 is a kind of flow chart of the processing method of APP installation kit provided in an embodiment of the present invention, is such as schemed Shown in 1, comprising the following steps:
Step 101, decompression APP installation kit, obtain the APP file in above-mentioned APP installation kit.
Wherein, above-mentioned APP installation kit can be the installation kit of iOS system, such as: apple program application file (iPhone Application, ipa) installation kit.Certainly, this is not construed as limiting, such as: above-mentioned APP installation kit can be Android system APP installation kit etc..
Above-mentioned APP file, which can be, decompresses the file including installation resource that above-mentioned APP installation kit obtains, specifically, should File may include the executable file in image and above-mentioned APP installation kit in above-mentioned APP installation kit.With above-mentioned APP peace Dress packet is for * .ipa installation kit, above-mentioned APP file can be * .ipa.out/aaa.app file.
Step 102, the characteristic value for extracting each image in above-mentioned APP file, and extract the executable text of above-mentioned APP file Referenced characteristics value in part, wherein the feature for the image that above-mentioned referenced characteristics value is used to indicate to be quoted by above-mentioned executable file Value.
Wherein, each image in above-mentioned APP file may include the image under the catalogue of above-mentioned APP file, and may be used also With include above-mentioned APP file catalogue under image in remaining paper.And the characteristic value of said extracted image can be extraction figure The title of picture, that is to say, that in the embodiment of the present invention, the characteristic value of image can be the title of image, and certainly, the present invention is implemented Example, is not construed as limiting this, such as: the characteristic value of image, which is also possible to mark of image (such as: label) etc., can indicate image Information.
It should be noted that image can be static picture or can be dynamic video figure in the embodiment of the present invention Picture.
The executable file of above-mentioned APP file can be the file that can be executed by electronic equipment in above-mentioned APP file, specifically It can refer to the file that load and execution can be carried out by the operating system of electronic equipment, such as: executable code.
Optionally, above-mentioned executable file may include at least one of following:
The patch of binary file in above-mentioned APP file, the add-on file in above-mentioned APP file and above-mentioned APP file File.
Wherein, above-mentioned binary file may also be referred to as APP binary file, include holding for installation APP in this document Style of writing part, specifically can be the executable file including major function in the corresponding application program of above-mentioned APP installation kit.Such as: App binary file xxx.app/xxx is found in APP file.It should be noted that in the embodiment of the present invention file title It is merely illustrative of, any restriction is not carried out to specific file.
And above-mentioned add-on file can be the file of the executable file in above-mentioned APP file including pin function, plug-in unit Function can be the pin function for depending on the major function of above-mentioned application program.Such as: it retrieves and inserts under the path of APP file Part catalogue: bbb.appex, to find out its plug-in unit catalogue yyy.appex/yyy.
And the patch file of above-mentioned APP file may also be referred to as the patch file of the corresponding application program of above-mentioned APP file, The patch file also includes executable file.
In addition, above-mentioned referenced characteristics value can be the characteristic value at least one image quoted by above-mentioned executable file, And at least one image of reference can be at least one image in above-mentioned APP file.Such as: it can in above-mentioned executable file It include being held by above-mentioned in the image referenced characteristics to include the image referenced characteristics for the image quoted by above-mentioned executable file Compose a piece of writing part reference image characteristic value (such as: title).And the above-mentioned referenced characteristics value of said extracted can be from executable text Above-mentioned referenced characteristics value is extracted in image referenced characteristics in part, alternatively, image referenced characteristics are exactly the characteristic value of correspondence image.
In addition, in the embodiment of the present invention, for different types of executable file, different feature extraction sides can be used Formula extracts image referenced characteristics.For example, be the executable file of " m " for suffix, it can be using regular expression "@" (.*?) " " extract image referenced characteristics;For suffix be " swift " executable file, can using regular expression " " (.*?) " " extract image referenced characteristics;It is the executable file of " storyboard " for suffix, regular expressions can be used Formula " image name=" (.+?) " " extract image referenced characteristics;It is the executable file of " js " for suffix, can uses Regular expression " [" '] (.*?) [" '] " extract image referenced characteristics;It is the static executable file library of " a " for suffix, Character string (i.e. string) type character can be extracted using " strings " order, to obtain image referenced characteristics;For suffix For the dynamic executable file library of " framework ", character string (i.e. string) type can be extracted using " strings " order Character, to obtain image referenced characteristics.
In addition, can be for above-mentioned patch file, after download patch file, decompress it into suffix for " js " can File is executed, such as: it is decompressed into zzz.js.Later, it can use the corresponding regular expression of executable file of " js " " [" '] (.* ?) [" '] " (or be referred to as " js ": " [" '] (.* ?) [" '] "), image referenced characteristics are retrieved, and extract State referenced characteristics value.
Step 103 matches the characteristic value of above-mentioned referenced characteristics value and above-mentioned each image, with the above-mentioned APP text of determination The image use state of part.
The step can be the feature of each image in the referenced characteristics value for extracting above-mentioned steps 103 and above-mentioned APP file Value is compared respectively, to determine the image use state of APP file.Such as: it can determine in above-mentioned APP file and use figure Picture can determine and image is not used in above-mentioned APP file, wherein can be referred to using image by above-mentioned executable text here The image of part reference, i.e., the image that above-mentioned executable file uses when being executed;And above-mentioned unused image can refer to not by The image of above-mentioned executable file reference, i.e., above-mentioned executable file not used image when being executed.
In the embodiment of the present invention, it may be implemented to be scanned the image of APP installation kit through the above steps, so as to Improve the scan performance to APP installation kit.In addition, since the characteristic value that the embodiment of the present invention is foundation image is scanned, So as to fast implement image scanning.Further, above-mentioned image use state can also be exported, with allow research staff, test Personnel or electronic equipment such as research and develop or test at the operation, to optimize the performance of APP.
It should be noted that the processing method of APP installation kit provided in an embodiment of the present invention can be applied to computer, hand The electronic equipments such as machine, tablet computer.
As an alternative embodiment, including image under the catalogue of above-mentioned APP file, and including compression image text Part, the characteristic value of each image in the above-mentioned APP file of said extracted, comprising:
Extract the characteristic value for each image for including under the catalogue of above-mentioned APP file;
Above-mentioned compressed image file is unziped under target directory, and extracts the feature of each image under above-mentioned target directory Value.
Wherein, above-mentioned compressed image file can be assets.car file, above-mentioned to decompress above-mentioned compressed image file It can be under to target directory, which unziped under new directory.And above-mentioned decompression compressed image file can be with Be by Open-Source Tools (such as: cartool tool) decompression compressed image file, such as: using cartool tool by the compression Image file unzips under new directory, such as catalogue xxx.car.out.
Due to unziping to above-mentioned compressed image file under target directory, to include above-mentioned compression image text under the catalogue Each image in part, such as: it include the image of the picture formats such as * .png and * .jpg under the catalogue.
In the embodiment, due to that can decompress compressed image file, so as to avoid compressed image file The case where characteristic value of interior image can not be extracted, to guarantee to extract the characteristic value of all images in above-mentioned APP file.
Further, the characteristic value of above-mentioned image is the title of image, includes under the catalogue of the above-mentioned APP file of said extracted Each image characteristic value, may include:
The title of each image is extracted from the routing information for each image for including under the catalogue of above-mentioned APP file respectively;
The characteristic value of each image under the above-mentioned target directory of said extracted may include:
The title of each image is extracted from the routing information of image each under above-mentioned target directory.
Wherein, in the embodiment of the present invention, the routing information of each image be can be including respective title.Further, also At least one of it may include the attribute information of image, such as: in path, suffix, platform parameters and resolution information etc..It is above-mentioned The characteristic value that image is extracted in image path can be the path removed in image path, suffix, platform parameters and resolution ratio letter Breath etc., to obtain the characteristic value of image.
Such as: by the routing information of image be /XXX/XXX/XXX/bbb@2x~iphone.jpg for, can first remove Path and suffix:
/ XXX/XXX/XXX/bbb@2x~iphone.jpg=> bbb@2x~iphone
Remove platform parameters again:
Bbb@2x~iphone=> bbb@2x
Finally remove resolution information:
Bbb@2x=> bbb
To obtain the title bbb of image.
In the embodiment, the title that image is accurately extracted from routing information may be implemented, in addition, the embodiment party In formula, due to the title that image feature value is image, so that step 103 when being matched, can reduce matched complexity.
It should be noted that the referenced characteristics value in extraction executable file can also refer to upper in the embodiment of the present invention The mode of stating extracts, such as: it may include special by the image reference of executable file reference image in above-mentioned executable file Sign, which may include the title and attribute information of image, so as to remove attribute information, to obtain image Title.
As an alternative embodiment, above-mentioned by above-mentioned referenced characteristics value and the progress of the characteristic value of above-mentioned each image Match, before the image use state of the above-mentioned APP file of determination, the above method further include:
Generate the first characteristics of image dictionary, wherein above-mentioned first characteristics of image dictionary includes each image in above-mentioned APP file Dictionary information, the key of the dictionary information of the first image is the feature of above-mentioned first image in above-mentioned first characteristics of image dictionary Value, above-mentioned first image are any image in above-mentioned APP file;
Generate the second characteristics of image dictionary, wherein above-mentioned second characteristics of image dictionary includes being drawn by above-mentioned executable file The dictionary information of image, the key of the dictionary information of the second image is above-mentioned second image in above-mentioned second characteristics of image dictionary Characteristic value, above-mentioned second image is any image quoted by above-mentioned executable file;
The above-mentioned characteristic value by above-mentioned referenced characteristics value and above-mentioned each image matches, with the above-mentioned APP file of determination Image use state, comprising:
Above-mentioned second characteristics of image dictionary is matched with above-mentioned first characteristics of image dictionary, with the above-mentioned APP text of determination The image use state of part, above-mentioned image use state is for being expressed as follows one:
Image and unused image are used;
Wherein, above-mentioned to have used key of the image in above-mentioned first characteristics of image dictionary in above-mentioned second characteristics of image dictionary In, above-mentioned unused image is in the key in above-mentioned first characteristics of image dictionary not in above-mentioned second characteristics of image dictionary.
Wherein, above-mentioned the first characteristics of image of generation dictionary can be, and generate the dictionary letter of each image in above-mentioned APP file Breath, wherein the key (key value) of the dictionary information of any image is the characteristic value of the image, and in the dictionary information of the image Value can be the attribute information of the image, such as: path, suffix, platform parameters and resolution information, it is available above-mentioned in this way First characteristics of image dictionary.
Such as: the above-mentioned first characteristics of image dictionary of generation (such as: it is referred to as ImageDic) may include following content:
By taking image aaa as an example, aaa is the key in the dictionary information of image aaa in above-mentioned first characteristics of image dictionary ,/ XXX/XXX/XXX/aaa.imageset is the value in the dictionary information.
Similarly, above-mentioned second characteristics of image dictionary can be generated, such as: the second characteristics of image dictionary of generation (such as: claim Make CodeReferDic) may include following content:
By taking image aaa as an example, aaa is the key in the dictionary information of image aaa in above-mentioned second characteristics of image dictionary, Aaa.app/aaa is the value in the dictionary information.Wherein, the value of second each dictionary information of characteristics of image dictionary can be reference and be somebody's turn to do The routing information of the executable code of the corresponding image of dictionary information.
Above-mentioned be compared above-mentioned second characteristics of image dictionary with above-mentioned first characteristics of image dictionary can be, in traversal The first characteristics of image dictionary is stated, with word of the key in above-mentioned second characteristics of image dictionary in the above-mentioned first characteristics of image dictionary of determination Allusion quotation information so that it is determined that having used image and unused image, and then obtains the image use state of above-mentioned APP file.
Such as: above-mentioned first characteristics of image dictionary is traversed, whether the key in the first characteristics of image dictionary is in the second image spy It levies in dictionary, if corresponding image is to have used image, if it was not then corresponding image is that image is not used:
Wherein, above-mentioned usedDic expression has used image, and above-mentioned UnUsedDic indicates that image, above-mentioned dir table is not used Show the attribute information for having used image, such as: routing information, above-mentioned code indicate to quote the attribute of the executable file of the image Information, such as: routing information, such as the routing information of executable code.
In the embodiment, due to generating characteristics of image dictionary, and it is compared using the key in characteristics of image dictionary, from And it can more rapidly scan the image in APP installation kit.
In the embodiment of the present invention, APP installation kit is decompressed, the APP file in above-mentioned APP installation kit is obtained;Extract above-mentioned APP Referenced characteristics value in the characteristic value of each image in file, and the executable file of the above-mentioned APP file of extraction, wherein above-mentioned The characteristic value for the image that referenced characteristics value is used to indicate to be quoted by above-mentioned executable file;By above-mentioned referenced characteristics value and above-mentioned each The characteristic value of image is matched, with the image use state of the above-mentioned APP file of determination.In this manner it is achieved that APP installation kit In image be scanned, so as to improve the scan performance to APP installation kit.
Fig. 2 is referred to, Fig. 2 is a kind of structure chart of the processing unit of APP installation kit provided in an embodiment of the present invention, is such as schemed Shown in 2, the processing unit 200 of APP installation kit includes:
Decompression module 201 obtains the APP file in above-mentioned APP installation kit for decompressing APP installation kit;
Extraction module 202 for extracting the characteristic value of each image in above-mentioned APP file, and extracts above-mentioned APP file Referenced characteristics value in executable file, wherein above-mentioned referenced characteristics value is used for the figure for indicating to be quoted by above-mentioned executable file The characteristic value of picture;
Determining module 203, for matching the characteristic value of above-mentioned referenced characteristics value and above-mentioned each image, in determination State the image use state of APP file.
It optionally, include image under the catalogue of above-mentioned APP file, and including compressed image file, extraction module 202 is wrapped It includes:
First extraction unit 2021, the characteristic value for each image for including under the catalogue for extracting above-mentioned APP file;
Second extraction unit 2022 for unziping to above-mentioned compressed image file under target directory, and extracts above-mentioned mesh The characteristic value of each image under heading record;
Third extraction unit 2023, the referenced characteristics value in executable file for extracting above-mentioned APP file, wherein The characteristic value for the image that above-mentioned referenced characteristics value is used to indicate to be quoted by above-mentioned executable file.
Optionally, the characteristic value of above-mentioned image is the title of image, and the first extraction unit 2021 is used for respectively from above-mentioned APP The title of each image is extracted in the routing information for each image for including under the catalogue of file;
Second extraction unit 2022 is for unziping to above-mentioned compressed image file under target directory, and from above-mentioned target mesh The title of each image is extracted under record in the routing information of each image.
Optionally, as shown in figure 4, the processing unit 200 of APP installation kit further include:
First generation module 204, for generating the first characteristics of image dictionary, wherein above-mentioned first characteristics of image dictionary packet The dictionary information of each image in above-mentioned APP file is included, the key of the dictionary information of the first image in above-mentioned first characteristics of image dictionary For the characteristic value of above-mentioned first image, above-mentioned first image is any image in above-mentioned APP file;
Second generation module 205, for generating the second characteristics of image dictionary, wherein above-mentioned second characteristics of image dictionary packet The dictionary information for the image quoted by above-mentioned executable file is included, the dictionary letter of the second image in above-mentioned second characteristics of image dictionary The key of breath is the characteristic value of above-mentioned second image, and above-mentioned second image is any image quoted by above-mentioned executable file;
Above-mentioned determining module 203 is used for above-mentioned second characteristics of image dictionary and the progress of above-mentioned first characteristics of image dictionary Match, with the image use state of the above-mentioned APP file of determination, above-mentioned image use state is for being expressed as follows one:
Image and unused image are used;
Wherein, above-mentioned to have used key of the image in above-mentioned first characteristics of image dictionary in above-mentioned second characteristics of image dictionary In, above-mentioned unused image is in the key in above-mentioned first characteristics of image dictionary not in above-mentioned second characteristics of image dictionary.
Device provided in an embodiment of the present invention can be realized each process realized in embodiment of the method shown in FIG. 1, and It can achieve identical beneficial effect, to avoid repeating, which is not described herein again.
Fig. 5 is referred to, Fig. 5 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention, as shown in figure 5, electronics Equipment includes processor 501, memory 502 and is stored in the meter that can be run on above-mentioned memory 502 and on above-mentioned processor Calculation machine program.
Wherein, following steps are realized when above-mentioned computer program is executed by above-mentioned processor 501:
APP installation kit is decompressed, the APP file in above-mentioned APP installation kit is obtained;
Extract drawing in the characteristic value of each image in above-mentioned APP file, and the executable file of the above-mentioned APP file of extraction With characteristic value, wherein the characteristic value for the image that above-mentioned referenced characteristics value is used to indicate to be quoted by above-mentioned executable file;
The characteristic value of above-mentioned referenced characteristics value and above-mentioned each image is matched, with the image of the above-mentioned APP file of determination Use state.
It optionally, include image under the catalogue of above-mentioned APP file, and including compressed image file, processor 501 is executed The above-mentioned APP file of extraction in each image characteristic value, comprising:
Extract the characteristic value for each image for including under the catalogue of above-mentioned APP file;
Above-mentioned compressed image file is unziped under target directory, and extracts the feature of each image under above-mentioned target directory Value.
Optionally, the characteristic value of above-mentioned image is the title of image, the above-mentioned APP file of extraction that processor 501 executes The characteristic value for each image for including under catalogue, comprising:
The title of each image is extracted from the routing information for each image for including under the catalogue of above-mentioned APP file respectively;
The characteristic value of each image under the above-mentioned target directory of extraction that processor 501 executes, comprising:
The title of each image is extracted from the routing information of image each under above-mentioned target directory.
Optionally, the characteristic value of above-mentioned referenced characteristics value and above-mentioned each image is matched, with the above-mentioned APP file of determination Image use state before, processor 501 is also used to:
Generate the first characteristics of image dictionary, wherein above-mentioned first characteristics of image dictionary includes each image in above-mentioned APP file Dictionary information, the key of the dictionary information of the first image is the feature of above-mentioned first image in above-mentioned first characteristics of image dictionary Value, above-mentioned first image are any image in above-mentioned APP file;
Generate the second characteristics of image dictionary, wherein above-mentioned second characteristics of image dictionary includes being drawn by above-mentioned executable file The dictionary information of image, the key of the dictionary information of the second image is above-mentioned second image in above-mentioned second characteristics of image dictionary Characteristic value, above-mentioned second image is any image quoted by above-mentioned executable file;
The characteristic value by above-mentioned referenced characteristics value and above-mentioned each image that processor 501 executes matches, in determination State the image use state of APP file, comprising:
Above-mentioned second characteristics of image dictionary is matched with above-mentioned first characteristics of image dictionary, with the above-mentioned APP text of determination The image use state of part, above-mentioned image use state is for being expressed as follows one:
Image and unused image are used;
Wherein, above-mentioned to have used key of the image in above-mentioned first characteristics of image dictionary in above-mentioned second characteristics of image dictionary In, above-mentioned unused image is in the key in above-mentioned first characteristics of image dictionary not in above-mentioned second characteristics of image dictionary.
Optionally, above-mentioned executable file includes at least one of following:
The patch of binary file in above-mentioned APP file, the add-on file in above-mentioned APP file and above-mentioned APP file File.
Electronic equipment provided in an embodiment of the present invention can be realized what electronic equipment in embodiment of the method shown in FIG. 1 was realized Each process, and can achieve identical beneficial effect, to avoid repeating, which is not described herein again.
The embodiment of the present invention also provides a kind of computer readable storage medium, stores on above-mentioned computer readable storage medium There is computer program, above-mentioned computer program realizes the place of APP installation kit provided in an embodiment of the present invention when being executed by processor The step of reason method.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (12)

1. a kind of processing method of application APP installation kit characterized by comprising
APP installation kit is decompressed, the APP file in the APP installation kit is obtained;
The reference extracted in the characteristic value of each image in the APP file, and the executable file of the extraction APP file is special Value indicative, wherein the characteristic value for the image that the referenced characteristics value is used to indicate to be quoted by the executable file;
The characteristic value of the referenced characteristics value and each image is matched, is used with the image of the determination APP file State.
2. the method as described in claim 1, which is characterized in that include image under the catalogue of the APP file, and including pressure Contracting image file, the characteristic value for extracting each image in the APP file, comprising:
Extract the characteristic value for each image for including under the catalogue of the APP file;
The compressed image file is unziped under target directory, and extracts the characteristic value of each image under the target directory.
3. method according to claim 2, which is characterized in that the characteristic value of described image is the title of image, the extraction The characteristic value for each image for including under the catalogue of the APP file, comprising:
The title of each image is extracted from the routing information for each image for including under the catalogue of the APP file respectively;
The characteristic value for extracting each image under the target directory, comprising:
The title of each image is extracted from the routing information of image each under the target directory.
4. method according to any one of claims 1 to 3, which is characterized in that described by the referenced characteristics value and described The characteristic value of each image is matched, before the image use state of the determination APP file, the method also includes:
Generate the first characteristics of image dictionary, wherein the first image characteristics dictionary includes the word of each image in the APP file Allusion quotation information, the key of the dictionary information of the first image is the characteristic value of the first image, institute in the first image characteristics dictionary Stating the first image is any image in the APP file;
Generate the second characteristics of image dictionary, wherein the second characteristics of image dictionary includes being quoted by the executable file The dictionary information of image, the key of the dictionary information of the second image is the spy of second image in the second characteristics of image dictionary Value indicative, second image are any image quoted by the executable file;
The characteristic value by the referenced characteristics value and each image matches, with the image of the determination APP file Use state, comprising:
The second characteristics of image dictionary is matched with the first image characteristics dictionary, with the determination APP file Image use state, described image use state is for being expressed as follows one:
Image and unused image are used;
It is wherein, described to have used image in the key in the first image characteristics dictionary in the second characteristics of image dictionary, The unused image is in the key in the first image characteristics dictionary not in the second characteristics of image dictionary.
5. method according to any one of claims 1 to 3, which is characterized in that the executable file include it is following at least One:
The patch file of binary file in the APP file, the add-on file in the APP file and the APP file.
6. a kind of processing unit of APP installation kit characterized by comprising
Decompression module obtains the APP file in the APP installation kit for decompressing APP installation kit;
Extraction module for extracting the characteristic value of each image in the APP file, and extracts the executable of the APP file Referenced characteristics value in file, wherein the spy for the image that the referenced characteristics value is used to indicate to be quoted by the executable file Value indicative;
Determining module, for matching the characteristic value of the referenced characteristics value and each image, with the determination APP text The image use state of part.
7. device as claimed in claim 6, which is characterized in that include image under the catalogue of the APP file, and including pressure Contracting image file, the extraction module include:
First extraction unit, the characteristic value for each image for including under the catalogue for extracting the APP file;
Second extraction unit for unziping to the compressed image file under target directory, and extracts under the target directory The characteristic value of each image;
Third extraction unit, the referenced characteristics value in executable file for extracting the APP file, wherein the reference The characteristic value for the image that characteristic value is used to indicate to be quoted by the executable file.
8. device as claimed in claim 7, which is characterized in that the characteristic value of described image be image title, described first Extraction unit is used to extract the name of each image from the routing information for each image for including under the catalogue of the APP file respectively Claim;
Second extraction unit is used to unzip to the compressed image file under target directory, and under the target directory The title of each image is extracted in the routing information of each image.
9. the device as described in any one of claim 6 to 8, which is characterized in that described device further include:
First generation module, for generating the first characteristics of image dictionary, wherein the first image characteristics dictionary includes described The dictionary information of each image in APP file, the key of the dictionary information of the first image is described in the first image characteristics dictionary The characteristic value of first image, the first image are any image in the APP file;
Second generation module, for generating the second characteristics of image dictionary, wherein the second characteristics of image dictionary includes described The dictionary information of the image of executable file reference, the key of the dictionary information of the second image is in the second characteristics of image dictionary The characteristic value of second image, second image are any image quoted by the executable file;
The determining module is for matching the second characteristics of image dictionary with the first image characteristics dictionary, with true The image use state of the fixed APP file, described image use state is for being expressed as follows one:
Image and unused image are used;
It is wherein, described to have used image in the key in the first image characteristics dictionary in the second characteristics of image dictionary, The unused image is in the key in the first image characteristics dictionary not in the second characteristics of image dictionary.
10. the device as described in any one of claim 6 to 8, which is characterized in that the executable file include it is following at least One:
The patch file of binary file in the APP file, the add-on file in the APP file and the APP file.
11. a kind of electronic equipment, which is characterized in that including processor, memory and be stored on the memory and can be in institute The computer program run on processor is stated, such as claim 1 to 5 is realized when the computer program is executed by the processor Any one of described in APP installation kit processing method the step of.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, the APP installation kit as described in any one of claims 1 to 5 is realized when the computer program is executed by processor The step of processing method.
CN201910257803.8A 2019-04-01 2019-04-01 APP installation package processing method and device and electronic equipment Active CN110032501B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910257803.8A CN110032501B (en) 2019-04-01 2019-04-01 APP installation package processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910257803.8A CN110032501B (en) 2019-04-01 2019-04-01 APP installation package processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110032501A true CN110032501A (en) 2019-07-19
CN110032501B CN110032501B (en) 2023-04-25

Family

ID=67237135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910257803.8A Active CN110032501B (en) 2019-04-01 2019-04-01 APP installation package processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110032501B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140351807A1 (en) * 2013-05-24 2014-11-27 Huawei Device Co., Ltd. Method and communication device for updating web application
CN104484585A (en) * 2014-11-26 2015-04-01 北京奇虎科技有限公司 Application program installation package processing method and device, and mobile apparatus
CN104503778A (en) * 2014-12-09 2015-04-08 北京奇虎科技有限公司 Installation method and installation device for applications
CN104601573A (en) * 2015-01-15 2015-05-06 国家计算机网络与信息安全管理中心 Verification method and device for Android platform URL (Uniform Resource Locator) access result
CN105988834A (en) * 2015-02-12 2016-10-05 腾讯科技(深圳)有限公司 Application installation package generating and installing method and apparatus
CN106126290A (en) * 2016-06-27 2016-11-16 微梦创科网络科技(中国)有限公司 Application program optimization method, Apparatus and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140351807A1 (en) * 2013-05-24 2014-11-27 Huawei Device Co., Ltd. Method and communication device for updating web application
CN104484585A (en) * 2014-11-26 2015-04-01 北京奇虎科技有限公司 Application program installation package processing method and device, and mobile apparatus
CN104503778A (en) * 2014-12-09 2015-04-08 北京奇虎科技有限公司 Installation method and installation device for applications
CN104601573A (en) * 2015-01-15 2015-05-06 国家计算机网络与信息安全管理中心 Verification method and device for Android platform URL (Uniform Resource Locator) access result
CN105988834A (en) * 2015-02-12 2016-10-05 腾讯科技(深圳)有限公司 Application installation package generating and installing method and apparatus
CN106126290A (en) * 2016-06-27 2016-11-16 微梦创科网络科技(中国)有限公司 Application program optimization method, Apparatus and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王津涛等: "PDF文件中可识别图像的提取", 《计算机工程与设计》 *

Also Published As

Publication number Publication date
CN110032501B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN107704479B (en) File generation method and device
CN101702150A (en) Method for protecting, verifying and repealing content of PDF document page
CN110147239B (en) Method, equipment and storage medium for multiple compression of game installation inclusion
JP2015529874A (en) System and method for viewing medical images
JP7157141B2 (en) A Context-Aware Differencing Algorithm for Genome Files
CN110162964B (en) Method, device and system for checking file tampering
EP1676210A2 (en) Method and apparatus for handling text and binary mark up languages in a computing device
CN107315593A (en) application program packaging method, device and terminal device
CN112286896B (en) Log file processing method and device, computer equipment and storage medium
CN111241496B (en) Method and device for determining small program feature vector and electronic equipment
CN112487763A (en) SVG-based OFD file online display method, server side and system
Schubotz et al. Mathoid: Robust, scalable, fast and accessible math rendering for wikipedia
CN109189389A (en) Data processing method and device, server
CN110059214B (en) Image resource processing method and device
CN113873013B (en) Offline package reorganization method and system
US8930808B2 (en) Processing rich text data for storing as legacy data records in a data storage system
CN114330245A (en) OFD document processing method and device
CN107368484A (en) Compression method and device, the acquisition methods and device of the static resource file of webpage
US7594169B2 (en) Compressing, and extracting a value from, a page descriptor format file
CN113177193A (en) Watermark adding method, watermark verifying method and terminal equipment
Hutchins Testing software tools of potential interest for digital preservation activities at the national library of australia
CN110032501A (en) A kind of processing method, device and the electronic equipment of APP installation kit
CN112906351A (en) PDF document generation method and device
CN109960731B (en) Data processing method, device and storage medium
CN111355709A (en) Data verification method and device, electronic equipment and computer readable 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