CN106681788A - Method and device for reducing application installation packages and electronic equipment - Google Patents
Method and device for reducing application installation packages and electronic equipment Download PDFInfo
- Publication number
- CN106681788A CN106681788A CN201710087221.0A CN201710087221A CN106681788A CN 106681788 A CN106681788 A CN 106681788A CN 201710087221 A CN201710087221 A CN 201710087221A CN 106681788 A CN106681788 A CN 106681788A
- Authority
- CN
- China
- Prior art keywords
- file
- binary coding
- installation package
- resource file
- resource
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
Abstract
The invention provides a method and a device for reducing an application installation package and electronic equipment, wherein the method comprises the following steps: acquiring a project file corresponding to an application; replacing the identification files corresponding to the resource files in the project file by using the preset labels; storing the first binary codes corresponding to the resource files according to a preset storage path; and replacing the first binary codes corresponding to the resource files with the binary codes of the storage paths in the compiled files corresponding to the project files to generate installation package files corresponding to the applications. Therefore, the identification files corresponding to the resource files in the application installation package are replaced by the labels, the first binary codes corresponding to the resource files are replaced by the binary codes of the preset storage path, and the installation package files corresponding to the application are generated, so that the size of the application installation package is reduced, the space occupied by the application installation package and the flow consumed in the downloading process are saved, the downloading speed and the application utilization rate of the application installation package are improved, and the user experience is improved.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method for reducing application installation package, device and electronics
Equipment.
Background technology
With the development of network and computer technology, miscellaneous application is widely used on all kinds of mobile terminals,
It is increasingly becoming an indispensable part in people's daily life.
Application installation package, including the All Files for installing application, runs this installation kit as the carrier of application, can
It is discharged on hard disk with by the All Files of application, completes edit the registry, modification system and set, create the works such as shortcut
Make.If application installation package is too big, the flow that its downloading process expends is high, and downloading process is slow, efficiency is low, causes user to be reluctant
In the mind carry, reduce the utilization rate of application.Therefore, the size of application installation package how is reduced, as heavy to closing in application and development
The work wanted.
The content of the invention
It is contemplated that at least solving one of technical problem in correlation technique to a certain extent.
Therefore, first purpose of the invention is to propose a kind of method for reducing application installation package, realize using mark
Sign and replace the corresponding mark file of each resource file in application installation package, and replaced using the binary coding of default store path
Corresponding first binary coding of each resource file is changed, corresponding installation package file is applied in generation, so as to reduce using installation
The size of bag, save application installation package occupancy space and downloading process in expend flow, improve application installation package
Speed of download and the utilization rate of application, improve Consumer's Experience.
Second object of the present invention is to propose a kind of device for reducing application installation package.
Third object of the present invention is to propose a kind of electronic equipment.
Fourth object of the present invention is to propose a kind of storage medium.
5th purpose of the invention is to propose a kind of application program.
It is that, up to above-mentioned purpose, first aspect present invention embodiment proposes a kind of method for reducing application installation package, including:
Obtain and apply corresponding item file;Using the corresponding mark of each resource file in item file described in default each tag replacement
File, wherein, the different resource file of different label correspondences;According to default store path, by each resource file pair
The first binary coding answered is stored;In the corresponding compiling file of the item file, using the store path
Binary coding replaces corresponding first binary coding of each resource file, generates the corresponding installation kit text of the application
Part.
In a kind of possible way of realization of first aspect, the binary coding using the store path is replaced
Before corresponding first binary coding of each resource file, also include:
Determine routing head by reflecting;
The binary coding using the store path is replaced corresponding first binary system of each resource file and is compiled
Code, including:
The resource file is replaced using the binary coding of the routing head and the binary coding of the store path
Corresponding first binary coding.
In the alternatively possible way of realization of first aspect, the binary coding and institute using the routing head
The binary coding for stating store path replaces corresponding first binary coding of the resource file, including:
According to the routing head and the store path, text is generated;
Corresponding first binary coding of the resource file is replaced using the binary coding of the text.
It is described according to default store path in the alternatively possible way of realization of first aspect, by each money
Before corresponding first binary coding of source file is stored, also include:
The item file is compiled treatment, compiling file corresponding with the item file is obtained;
The first binary coding corresponding with each resource file is extracted from the compiling file.
In the alternatively possible way of realization of first aspect, the corresponding installation package file of the generation application it
Afterwards, also include:
The resource file that receiving terminal sends obtains request, and described acquisition asks to include the first label and store path;
Obtain the second binary coding of resource file corresponding with the store path and first label;
Second binary coding is sent to the terminal.
The method for reducing application installation package provided in an embodiment of the present invention, obtains apply corresponding item file first, so
Afterwards using the corresponding mark file of each resource file in default each tag replacement item file, further according to default storage road
Footpath, corresponding first binary coding of each resource file is stored, finally in the corresponding compiling file of item file, profit
Corresponding first binary coding of each resource file is replaced with the binary coding of store path, corresponding installation kit is applied in generation
File.Hereby it is achieved that using the corresponding mark file of each resource file in tag replacement application installation package, and using default
The binary coding of store path replaces corresponding first binary coding of each resource file, generation application corresponding installation kit text
Part, so as to reduce the size of application installation package, save application installation package occupancy space and downloading process in expend stream
Amount, improves the speed of download of application installation package and the utilization rate of application, improves Consumer's Experience.
It is that, up to above-mentioned purpose, second aspect present invention embodiment proposes a kind of device for reducing application installation package, including:
First acquisition module, corresponding item file is applied for obtaining;First processing module, for utilizing default each tag replacement
The corresponding mark file of each resource file in the item file, wherein, the different resource files of different labels correspondences;Storage
Module, for according to default store path, corresponding first binary coding of each resource file is stored;Second
Processing module, in the corresponding compiling file of the item file, being replaced using the binary coding of the store path
Corresponding first binary coding of each resource file, generates the corresponding installation package file of the application.
In a kind of possible way of realization of second aspect, the device of the reduction application installation package also includes:
Determining module, for by reflecting determination routing head;
The Second processing module, including:
Processing unit, replaces for the binary coding and the binary coding of the store path using the routing head
Corresponding first binary coding of the resource file.
In the alternatively possible way of realization of second aspect, the processing unit, specifically for:
According to the routing head and the store path, text is generated;
Corresponding first binary coding of the resource file is replaced using the binary coding of the text.
In the alternatively possible way of realization of second aspect, the device of the reduction application installation package also includes:
3rd processing module, for the item file to be compiled into treatment, obtains corresponding with the item file
Compiling file;
Extraction module, compiles for extracting the first binary system corresponding with each resource file from the compiling file
Code.
In the alternatively possible way of realization of second aspect, the device of the reduction application installation package also includes:
Receiver module, request is obtained for the resource file that receiving terminal sends, and described acquisition asks to include the first mark
Sign and store path;
Second acquisition module, for obtaining resource file corresponding with the store path and first label second
Binary coding;
Sending module, for second binary coding to be sent into the terminal.
The device for reducing application installation package provided in an embodiment of the present invention, obtains apply corresponding item file first, so
Afterwards using the corresponding mark file of each resource file in default each tag replacement item file, further according to default storage road
Footpath, corresponding first binary coding of each resource file is stored, finally in the corresponding compiling file of item file, profit
Corresponding first binary coding of each resource file is replaced with the binary coding of store path, corresponding installation kit is applied in generation
File.Hereby it is achieved that using the corresponding mark file of each resource file in tag replacement application installation package, and using default
The binary coding of store path replaces corresponding first binary coding of each resource file, generation application corresponding installation kit text
Part, so as to reduce the size of application installation package, save application installation package occupancy space and downloading process in expend stream
Amount, improves the speed of download of application installation package and the utilization rate of application, improves Consumer's Experience.
It is that, up to above-mentioned purpose, third aspect present invention embodiment proposes a kind of electronic equipment, including:Processor, storage
Device, and communication component;
The memory is used to store executable program code;
The communication component is used to be communicated with other electronic equipments, to obtain using corresponding item file;
The processor is run executable with described by reading the executable program code stored in the memory
The corresponding program of program code, for performing following steps:Using respectively being provided in item file described in default each tag replacement
The corresponding mark file of source file, wherein, the different resource file of different label correspondences;According to default store path, will
Corresponding first binary coding of each resource file is stored;In the corresponding compiling file of the item file, profit
Corresponding first binary coding of each resource file is replaced with the binary coding of the store path, the application is generated
Corresponding installation package file.
The electronic equipment that the embodiment of the present application is provided, obtains apply corresponding item file first, then using default
The corresponding mark file of each resource file in each tag replacement item file, further according to default store path, by each resource text
Corresponding first binary coding of part is stored, finally in the corresponding compiling file of item file, using store path
Binary coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation.Thus, it is real
Show using the corresponding mark file of each resource file in tag replacement application installation package, and using the two of default store path
Scale coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation, so as to reduce
The size of application installation package, save application installation package occupancy space and downloading process in the flow that expends, improve should
With the speed of download and the utilization rate of application of installation kit, Consumer's Experience is improved.
It is that, up to above-mentioned purpose, fourth aspect present invention embodiment proposes a kind of storage medium, wherein, the storage medium is used
In storage application program, the application program is used to operationally perform the reduction application described in first aspect present invention embodiment
The method of installation kit.
Storage medium provided in an embodiment of the present invention, obtains apply corresponding item file first, then using default
The corresponding mark file of each resource file in each tag replacement item file, further according to default store path, by each resource text
Corresponding first binary coding of part is stored, finally in the corresponding compiling file of item file, using store path
Binary coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation.Thus, it is real
Show using the corresponding mark file of each resource file in tag replacement application installation package, and using the two of default store path
Scale coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation, so as to reduce
The size of application installation package, save application installation package occupancy space and downloading process in the flow that expends, improve should
With the speed of download and the utilization rate of application of installation kit, Consumer's Experience is improved.
It is that, up to above-mentioned purpose, fifth aspect present invention embodiment proposes a kind of application program, wherein, the application program
Method for operationally performing the reduction application installation package described in first aspect present invention embodiment.
Application program provided in an embodiment of the present invention, obtains apply corresponding item file first, then using default
The corresponding mark file of each resource file in each tag replacement item file, further according to default store path, by each resource text
Corresponding first binary coding of part is stored, finally in the corresponding compiling file of item file, using store path
Binary coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation.Thus, it is real
Show using the corresponding mark file of each resource file in tag replacement application installation package, and using the two of default store path
Scale coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation, so as to reduce
The size of application installation package, save application installation package occupancy space and downloading process in the flow that expends, improve should
With the speed of download and the utilization rate of application of installation kit, Consumer's Experience is improved.
Brief description of the drawings
The above-mentioned and/or additional aspect of the present invention and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and be readily appreciated that, wherein:
Fig. 1 is the flow chart of the method for the reduction application installation package of one embodiment of the invention;
Fig. 2 is the flow chart of the method for the reduction application installation package of another embodiment of the present invention;
Fig. 3 is the structure chart of the device of the reduction application installation package of one embodiment of the invention;
Fig. 4 is the structure chart of the device of the reduction application installation package of another embodiment of the present invention;
Fig. 5 is the structure chart of the electronic equipment of one embodiment of the invention.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
It is exemplary to scheme the embodiment of description, is only used for explaining the present invention, and is not considered as limiting the invention.Conversely, this
Inventive embodiment includes all changes fallen into the range of the spiritual and intension of attached claims, modification and is equal to
Thing.
Various embodiments of the present invention mainly for application installation package it is too big when, downloading process expend flow it is high, downloading process
Slowly, efficiency is low, causes user to be unwilling to download, and reduces the problem of the utilization rate of application, proposes that one kind utilizes tag replacement
The corresponding mark file of each resource file in application installation package, by corresponding first binary coding of each resource file from application
Removed in installation kit, and store the method for reducing application installation package in default position.
Below with reference to the accompanying drawings method, device and the electronic equipment of the reduction application installation package of the embodiment of the present invention described.
Fig. 1 is the flow chart of the method for the reduction application installation package of one embodiment of the invention.
As shown in figure 1, the method for the reduction application installation package includes:
Step 101, obtains and applies corresponding item file.
Specifically, the method for reducing application installation package provided in an embodiment of the present invention, can be provided by the embodiment of the present invention
Reduction application installation package device perform.
Wherein, using corresponding item file, it is the file of formation in application development process, specifically, can be in collection
The file that development and application are formed in IDE (Integrated Development Environment, abbreviation IDE).
Step 102, using the corresponding mark file of each resource file in default each tag replacement item file, wherein,
The different resource file of different label correspondences.
Wherein, resource file can include button, menu, picture, layout isometric drawing (View) file.Each resource file pair
The mark file answered, for uniquely determining certain resource file, for example, mark file in can include resource file color,
The attribute informations such as shape, size.
It should be noted that the label for replacing the corresponding mark file of each resource file, can generate in advance,
Can also in replacement process, generate at random, the type of label can arbitrarily be set, and only need to uniquely characterize resource file i.e.
Can, such as in Java, different mark files can be replaced with different Tag, the present embodiment is not construed as limiting to this.
Step 103, according to default store path, corresponding first binary coding of each resource file is stored.
Wherein, store path, can be configured as needed.Specifically, certain in could be arranged to remote server
Built-in security digital card (Secure Digital the Memory Card, abbreviation SD of one position, or the webserver
Card) in a certain position, be not restricted herein.
Specifically, due to being write using high-level language programs using corresponding item file, be not computer or
The machine language that person other electronic equipments can be recognized, therefore, in the present embodiment, after item file is obtained, first have to item
Mesh file is compiled, and obtains the corresponding binary coding of item file, and in order to application when mounted, the equipment of installation can be with root
Application is installed according to binary coding.Therefore, in the embodiment of the present application, item file can be compiled, is obtained
Compiling file corresponding with item file, then the first binary coding corresponding with each resource file is extracted from compiling file,
So as to corresponding first binary coding of each resource file is stored in default store path.
When implementing, store path can be pre-set, then entered obtaining each resource file the corresponding 1st
After system coding, you can ordered by such as adb etc., by binary coding storage to default store path.
It should be noted that can be using the corresponding mark of each resource file in default each tag replacement item file
After file, then item file is compiled, accordingly, each label after replacement is changed into binary coded form;Or, also may be used
Before using the corresponding mark file of each resource file in default each tag replacement item file, item file to be compiled
Translate, accordingly, during mark file corresponding using each resource file in default each tag replacement item file, it is possible to use pre-
If the corresponding binary coding of each label replace the binary coding of the corresponding mark file of each resource file in item file.
Step 104, in the corresponding compiling file of item file, each resource is replaced using the binary coding of store path
Corresponding installation package file is applied in corresponding first binary coding of file, generation.
Specifically, after corresponding first binary coding of each resource file is stored in default store path, you can
Using the binary coding of the store path, in the corresponding compiling file of replacement item file, each resource file corresponding first
Corresponding installation package file is applied in binary coding, generation.
When implementing, because the first binary coding is for compiling file, belong to hidden file, thus its
, it is necessary to pass through reflection when being loaded, by calling the addAssetPath methods in AssetManager, can just be loaded into and deposit
Storage the first binary coding, due to addAssetPath be hide api we cannot directly invoke, so can only be by anti-
Penetrate.So in the embodiment of the present application, each resource file the corresponding 1st is replaced using the binary coding of store path to enter
Before system coding, can also include:Determine routing head by reflecting.
Accordingly, corresponding first binary coding of each resource file, tool are replaced using the binary coding of store path
Body can include:
Using the binary coding and the binary coding replacement resource file the corresponding 1st of store path of routing head
Scale coding.
It is understood that in Java, the attribute of Java object, method, construction side can be accessed by reflex mechanism
Method etc., in the embodiment of the present application, it is possible to use reflex mechanism, obtains the routing head of above-mentioned store path.After obtaining routing head,
Routing head can be increased on above-mentioned store path, be compiled with using the binary system of the binary coding of routing head and store path
Code, corresponding first binary coding of replacement resource file.
When implementing, in order to reduce the binary coding of routing head and the money shared by the binary coding of store path
Source, can also generate text (cookie) according to routing head and store path, recycle the binary coding of text
Corresponding first binary coding of replacement resource file.
The method for reducing application installation package provided in an embodiment of the present invention, obtains apply corresponding item file first, so
Afterwards using the corresponding mark file of each resource file in default each tag replacement item file, further according to default storage road
Footpath, corresponding first binary coding of each resource file is stored, finally in the corresponding compiling file of item file, profit
Corresponding first binary coding of each resource file is replaced with the binary coding of store path, corresponding installation kit is applied in generation
File.Hereby it is achieved that using the corresponding mark file of each resource file in tag replacement application installation package, and using default
The binary coding of store path replaces corresponding first binary coding of each resource file, generation application corresponding installation kit text
Part, so as to reduce the size of application installation package, save application installation package occupancy space and downloading process in expend stream
Amount, improves the speed of download of application installation package and the utilization rate of application, improves Consumer's Experience.
By above-mentioned analysis, can be by using the corresponding mark of each resource file in tag replacement application installation package
File, and using corresponding first binary coding of binary coding each resource file of replacement of default store path, generation
Using corresponding installation package file.In actual applications, after user downloads the corresponding installation kit of application, in addition it is also necessary to which acquisition is replaced
Resource file could complete the installation of application, with reference to Fig. 2, the method for the reduction application installation package provided the application is entered
Row is further illustrated.
Fig. 2 is the flow chart of the method for the reduction application installation package of another embodiment of the present invention.
As shown in Fig. 2 the method for the reduction application installation package, including:
Step 201, obtains and applies corresponding item file.
Step 202, using the corresponding mark file of each resource file in default each tag replacement item file, wherein,
The different resource file of different label correspondences.
Step 203, according to default store path, corresponding first binary coding of each resource file is stored.
Step 204, in the corresponding compiling file of item file, each resource is replaced using the binary coding of store path
Corresponding installation package file is applied in corresponding first binary coding of file, generation.
Wherein, above-mentioned steps 201- steps 204 implement process and principle, are referred to step in above-described embodiment
The detailed description of 101- steps 104, here is omitted.
Step 205, the resource file that receiving terminal sends obtains request, and obtaining request includes the first label and storage road
Footpath.
Wherein, the first label and store path that request includes are obtained, can is binary coded form or other shapes
Formula, is not restricted herein.
Step 206, obtains the second binary coding of resource file corresponding with store path and the first label.
It is understood that according to above-mentioned steps generate the corresponding installation package file of application, be utilized respectively each label and
The binary coding of store path substituted for the corresponding mark file of each resource file and each resource file the corresponding 1st enters
System coding, and when installing this using application installation package and applying, it may be desirable to some resource files being replaced, then,
In the embodiment of the present application, when the resource file for needing some to be replaced, applied to reduction by carrying out using the terminal installed
Bag apparatus are installed and send resource file acquisition request.
Wherein, obtaining request includes installing the first label of the resource file needed for applying, and required storage is pre-
If the store path of the resource file of storage location.
When implementing, after obtaining the first label and store path, you can by accessing the store path, obtain this and deposit
The corresponding each binary coding of each resource file under storage path, and by the first label, obtain the corresponding money of the first label
Second binary coding of source file.
Step 207, terminal is sent to by the second binary coding.
Specifically, after obtaining the second binary coding of resource file corresponding with store path and the first label, i.e.,
Second binary coding can be sent to terminal, so that terminal is by running the second binary coding, to obtain corresponding money
Source file, completes application and installs.
As an example it is assumed that the binary coding of the cookie generated using store path, replaces each resource file correspondence
The first binary coding, generation apply corresponding installation package file, then using the application installation package install apply when, according to
The binary coding of cookie, by using the openXmlResourceParser of the XML parser Assent of Android, i.e.,
Each binary coding stored in store path can be parsed, corresponding resource file is obtained, then according to the first label, it is right to obtain
The child resource file answered, so that the installation applied using each resource file.
The method for reducing application installation package provided in an embodiment of the present invention, in by using tag replacement application installation package
The corresponding mark file of each resource file, and to replace each resource file corresponding using the binary coding of default store path
First binary coding, after the generation corresponding installation package file of application, if the resource file for receiving terminal transmission obtains request,
The second binary coding corresponding with store path and the first label is then obtained, and the second binary coding is sent to terminal.
Hereby it is achieved that using the corresponding mark file of each resource file in tag replacement application installation package, and utilize default storage
The binary coding in path replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation,
And after the resource file for receiving terminal transmission obtains request, resource file is obtained, and the size of application installation package is reduced, save
Saved application installation package occupancy space and downloading process in expend flow, improve application installation package speed of download and should
Utilization rate, improves Consumer's Experience.
Fig. 3 is the structure chart of the device of the reduction application installation package of one embodiment of the invention.
As shown in figure 3, the device of the reduction application installation package, including:
First acquisition module 301, corresponding item file is applied for obtaining;
First processing module 302, for using the corresponding mark of each resource file in default each tag replacement item file
Know file, wherein, the different resource file of different label correspondences;
Memory module 303, for according to default store path, corresponding first binary coding of each resource file being entered
Row storage;
Second processing module 304, in the corresponding compiling file of item file, being compiled using the binary system of store path
Code replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation.
It should be noted that the explanation of the embodiment of the method for the above-mentioned reduction application installation package to shown in Fig. 1, is also applied for
The device of the reduction application installation package that the present embodiment is provided, here is omitted.
The present embodiment provides the device for reducing application installation package, obtains apply corresponding item file first, then utilizes
The corresponding mark file of each resource file in default each tag replacement item file, further according to default store path, will be each
Corresponding first binary coding of resource file is stored, finally in the corresponding compiling file of item file, using storage
The binary coding in path replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation.
Hereby it is achieved that using the corresponding mark file of each resource file in tag replacement application installation package, and utilize default storage
The binary coding in path replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation,
So as to reduce the size of application installation package, save application installation package occupancy space and downloading process in expend flow,
The speed of download of application installation package and the utilization rate of application are improve, Consumer's Experience is improved.
Fig. 4 is the structure chart of the device of the reduction application installation package of another embodiment of the present invention.
As shown in figure 4, on the basis of shown in Fig. 3, the device of the reduction application installation package also includes:
Determining module 305, for by reflecting determination routing head.
Accordingly, Second processing module 304, including:
Processing unit, for binary coding and the binary coding replacement resource file of store path using routing head
Corresponding first binary coding.
Further, above-mentioned processing unit, specifically for:
According to routing head and store path, text is generated;
Using corresponding first binary coding of binary coding replacement resource file of text.
In a kind of possible way of realization of the present embodiment, the device of the reduction application installation package also includes:
3rd processing module 306, for item file to be compiled into treatment, obtains compiling text corresponding with item file
Part;
Extraction module 307, for extracting the first binary coding corresponding with each resource file from compiling file.
Receiver module 308, request is obtained for the resource file that receiving terminal sends, and described acquisition asks to include first
Label and store path;
Second acquisition module 309, for obtaining resource file corresponding with store path and the first label the 2nd 2 enters
System coding;
Sending module 310, for the second binary coding to be sent into terminal.
It should be noted that the explanation of the embodiment of the method for the above-mentioned reduction application installation package to shown in Fig. 1 and Fig. 2,
The device of the reduction application installation package provided suitable for the present embodiment, here is omitted.
The device for reducing application installation package provided in an embodiment of the present invention, in by using tag replacement application installation package
The corresponding mark file of each resource file, and to replace each resource file corresponding using the binary coding of default store path
First binary coding, after the generation corresponding installation package file of application, if the resource file for receiving terminal transmission obtains request,
The second binary coding corresponding with store path and the first label is then obtained, and the second binary coding is sent to terminal.
Hereby it is achieved that using the corresponding mark file of each resource file in tag replacement application installation package, and utilize default storage
The binary coding in path replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation,
And after the resource file for receiving terminal transmission obtains request, resource file is obtained, and the size of application installation package is reduced, save
Saved application installation package occupancy space and downloading process in expend flow, improve application installation package speed of download and should
Utilization rate, improves Consumer's Experience.
Fig. 5 is the structural representation of the electronic equipment of the application one embodiment.Wherein, the type of electronic equipment is a lot,
Can be such as computer, server etc., the present embodiment is not construed as limiting to this.
As shown in figure 5, the electronic equipment 50, including:Processor 501, memory 502, and communication component 503;
The memory 502 is used to store executable program code;
The communication component 503 is used to be communicated with other electronic equipments, to obtain using corresponding item file;
The processor 501 run by reading the executable program code stored in the memory 502 with it is described
The corresponding program of executable program code, for performing following steps:
Using the corresponding mark file of each resource file in item file described in default each tag replacement, wherein, it is different
The label different resource files of correspondence;
According to default store path, corresponding first binary coding of each resource file is stored;
In the corresponding compiling file of the item file, replace described each using the binary coding of the store path
Corresponding first binary coding of resource file, generates the corresponding installation package file of the application.
It should be noted that the explanation of the embodiment of the method for the foregoing reduction application installation package to shown in Fig. 1 and Fig. 2
The electronic equipment of the embodiment is also applied for, its realization principle is similar to, and here is omitted.
The electronic equipment of the embodiment of the present application, obtains apply corresponding item file first, then using default each mark
Sign and replace the corresponding mark file of each resource file in item file, further according to default store path, by each resource file pair
The first binary coding answered is stored, and finally in the corresponding compiling file of item file, is entered using the two of store path
System coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation.Hereby it is achieved that
Using the corresponding mark file of each resource file in tag replacement application installation package, and using the binary system of default store path
Coding replaces corresponding first binary coding of each resource file, and corresponding installation package file is applied in generation, should so as to reduce
With the size of installation kit, save application installation package occupancy space and downloading process in the flow that expends, improve using peace
The speed of download of bag and the utilization rate of application are filled, Consumer's Experience is improved.
The method of the reduction application installation package provided based on above-described embodiment, the embodiment of the present application is provided a kind of storage and is situated between again
Matter, such as can be read-only storage, disk or CD etc..
Wherein, the storage medium is used to store application program, and the application program is used to operationally perform the present invention in fact
The method for applying the reduction application installation package described in example.
Further, the embodiment of the present application also provides a kind of application program, wherein, the application program is used for operationally
The method for performing the reduction application installation package described in the embodiment of the present invention.
Specifically, the application program in the embodiment of the present application, can be realized using any language, as long as the application can be realized
The method of the reduction application installation package that embodiment is provided.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means to combine specific features, structure, material or spy that the embodiment or example are described
Point is contained at least one embodiment of the invention or example.In this manual, to the schematic representation of above-mentioned term not
Identical embodiment or example must be directed to.And, the specific features of description, structure, material or feature can be with office
Combined in an appropriate manner in one or more embodiments or example.Additionally, in the case of not conflicting, the skill of this area
Art personnel can be tied the feature of the different embodiments or example described in this specification and different embodiments or example
Close and combine.
Additionally, term " first ", " second " are only used for describing purpose, and it is not intended that indicating or implying relative importance
Or the implicit quantity for indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can express or
Implicitly include at least one this feature.In the description of the invention, " multiple " is meant that at least two, such as two, three
It is individual etc., unless otherwise expressly limited specifically.
Any process described otherwise above or method description in flow chart or herein is construed as, and expression includes
It is one or more for realizing specific logical function or process the step of the module of code of executable instruction, fragment or portion
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussion suitable
Sequence, including function involved by basis by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In implementation method, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage
Or firmware is realized.If for example, realized with hardware, and in another embodiment, can be with well known in the art
Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal
Discrete logic, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried
The rapid hardware that can be by program to instruct correlation is completed, and described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although having been shown above and retouching
Embodiments of the invention are stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as to limit of the invention
System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of the invention
Type.
Claims (10)
1. it is a kind of reduce application installation package method, it is characterised in that comprise the following steps:
Obtain and apply corresponding item file;
Using the corresponding mark file of each resource file in item file described in default each tag replacement, wherein, different marks
Sign the different resource file of correspondence;
According to default store path, corresponding first binary coding of each resource file is stored;
In the corresponding compiling file of the item file, each resource is replaced using the binary coding of the store path
Corresponding first binary coding of file, generates the corresponding installation package file of the application.
2. the method for claim 1, it is characterised in that the binary coding using the store path replaces institute
Before stating corresponding first binary coding of each resource file, also include:
Determine routing head by reflecting;
The binary coding using the store path replaces corresponding first binary coding of each resource file, bag
Include:
The resource file correspondence is replaced using the binary coding of the routing head and the binary coding of the store path
The first binary coding.
3. method as claimed in claim 2, it is characterised in that the binary coding using the routing head and described deposit
The binary coding for storing up path replaces corresponding first binary coding of the resource file, including:
According to the routing head and the store path, text is generated;
Corresponding first binary coding of the resource file is replaced using the binary coding of the text.
4. the method as described in claim 1-3 is any, it is characterised in that described according to default store path, will be described each
Before corresponding first binary coding of resource file is stored, also include:
The item file is compiled treatment, compiling file corresponding with the item file is obtained;
The first binary coding corresponding with each resource file is extracted from the compiling file.
5. the method as described in claim 1-3 is any, it is characterised in that the corresponding installation package file of the generation application
Afterwards, also include:
The resource file that receiving terminal sends obtains request, and described acquisition asks to include the first label and store path;
Obtain the second binary coding of resource file corresponding with the store path and first label;
Second binary coding is sent to the terminal.
6. it is a kind of reduce application installation package device, it is characterised in that including:
First acquisition module, corresponding item file is applied for obtaining;
First processing module, for using the corresponding mark text of each resource file in item file described in default each tag replacement
Part, wherein, the different resource file of different label correspondences;
Memory module, for according to default store path, corresponding first binary coding of each resource file is carried out
Storage;
Second processing module, in the corresponding compiling file of the item file, using the binary system of the store path
Coding replaces corresponding first binary coding of each resource file, generates the corresponding installation package file of the application.
7. device as claimed in claim 6, it is characterised in that also include:
Determining module, for by reflecting determination routing head;
The Second processing module, including:
Processing unit, replaces described for the binary coding and the binary coding of the store path using the routing head
Corresponding first binary coding of resource file.
8. device as claimed in claim 7, it is characterised in that the processing unit, specifically for:
According to the routing head and the store path, text is generated;
Corresponding first binary coding of the resource file is replaced using the binary coding of the text.
9. the device as described in claim 6-8 is any, it is characterised in that also include:
3rd processing module, for the item file to be compiled into treatment, obtains compiling corresponding with the item file
File;
Extraction module, for extracting the first binary coding corresponding with each resource file from the compiling file.
10. a kind of electronic equipment, it is characterised in that including:Processor, memory, and communication component;
The memory is used to store executable program code;
The communication component is used to be communicated with other electronic equipments, to obtain using corresponding item file;
The processor is run and the executable program by reading the executable program code stored in the memory
The corresponding program of code, for performing following steps:
Using the corresponding mark file of each resource file in item file described in default each tag replacement, wherein, different marks
Sign the different resource file of correspondence;
According to default store path, corresponding first binary coding of each resource file is stored;
In the corresponding compiling file of the item file, each resource is replaced using the binary coding of the store path
Corresponding first binary coding of file, generates the corresponding installation package file of the application.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710087221.0A CN106681788B (en) | 2017-02-17 | 2017-02-17 | Method and device for reducing application installation packages and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710087221.0A CN106681788B (en) | 2017-02-17 | 2017-02-17 | Method and device for reducing application installation packages and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106681788A true CN106681788A (en) | 2017-05-17 |
CN106681788B CN106681788B (en) | 2019-10-29 |
Family
ID=58860953
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710087221.0A Active CN106681788B (en) | 2017-02-17 | 2017-02-17 | Method and device for reducing application installation packages and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106681788B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108958826A (en) * | 2017-05-22 | 2018-12-07 | 北京京东尚科信息技术有限公司 | The method and apparatus of dynamic configuration application installation package |
CN109598121A (en) * | 2018-12-11 | 2019-04-09 | 深圳市网心科技有限公司 | Application program ID generation method, system, computer installation and storage medium |
CN111008178A (en) * | 2019-11-05 | 2020-04-14 | 北京字节跳动网络技术有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
CN112632425A (en) * | 2020-12-10 | 2021-04-09 | 京东数字科技控股股份有限公司 | Method, device, equipment and storage medium for generating offline resource file |
WO2021248337A1 (en) * | 2020-06-09 | 2021-12-16 | 深圳市欢太科技有限公司 | Application installation method and apparatus, and device and computer-readable storage medium |
CN117149160A (en) * | 2023-08-23 | 2023-12-01 | 浙江十勇士网络科技有限公司 | Mobile phone game resource packaging method, system and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120284696A1 (en) * | 2009-12-21 | 2012-11-08 | Nokia Corporation | Method, Apparatuses and a System for Compilation |
CN104462393A (en) * | 2014-12-10 | 2015-03-25 | 北京国双科技有限公司 | Method and device for determining paths for compiling files |
CN104765618A (en) * | 2015-05-06 | 2015-07-08 | 山东中孚信息产业股份有限公司 | Manufacturing method and decompression installation method of Linux system self-decompression installation packet |
CN105204823A (en) * | 2014-05-29 | 2015-12-30 | 腾讯科技(深圳)有限公司 | Method and device for generating application installation package |
-
2017
- 2017-02-17 CN CN201710087221.0A patent/CN106681788B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120284696A1 (en) * | 2009-12-21 | 2012-11-08 | Nokia Corporation | Method, Apparatuses and a System for Compilation |
CN105204823A (en) * | 2014-05-29 | 2015-12-30 | 腾讯科技(深圳)有限公司 | Method and device for generating application installation package |
CN104462393A (en) * | 2014-12-10 | 2015-03-25 | 北京国双科技有限公司 | Method and device for determining paths for compiling files |
CN104765618A (en) * | 2015-05-06 | 2015-07-08 | 山东中孚信息产业股份有限公司 | Manufacturing method and decompression installation method of Linux system self-decompression installation packet |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108958826A (en) * | 2017-05-22 | 2018-12-07 | 北京京东尚科信息技术有限公司 | The method and apparatus of dynamic configuration application installation package |
CN109598121A (en) * | 2018-12-11 | 2019-04-09 | 深圳市网心科技有限公司 | Application program ID generation method, system, computer installation and storage medium |
CN111008178A (en) * | 2019-11-05 | 2020-04-14 | 北京字节跳动网络技术有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
CN111008178B (en) * | 2019-11-05 | 2024-04-30 | 北京字节跳动网络技术有限公司 | Data processing method, device, electronic equipment and computer readable storage medium |
WO2021248337A1 (en) * | 2020-06-09 | 2021-12-16 | 深圳市欢太科技有限公司 | Application installation method and apparatus, and device and computer-readable storage medium |
CN112632425A (en) * | 2020-12-10 | 2021-04-09 | 京东数字科技控股股份有限公司 | Method, device, equipment and storage medium for generating offline resource file |
CN112632425B (en) * | 2020-12-10 | 2024-02-06 | 京东科技控股股份有限公司 | Method, device, equipment and storage medium for generating offline resource file |
CN117149160A (en) * | 2023-08-23 | 2023-12-01 | 浙江十勇士网络科技有限公司 | Mobile phone game resource packaging method, system and storage medium |
CN117149160B (en) * | 2023-08-23 | 2024-04-02 | 浙江十勇士网络科技有限公司 | Mobile phone game resource packaging method, system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106681788B (en) | 2019-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106681788A (en) | Method and device for reducing application installation packages and electronic equipment | |
Katara et al. | Architectural views of aspects | |
CN105100191B (en) | The method, apparatus and system of Java application installations are realized in a kind of cloud compiling | |
CN110704063B (en) | Method and device for compiling and executing intelligent contract | |
CN110688122B (en) | Method and device for compiling and executing intelligent contract | |
CN110704064B (en) | Method and device for compiling and executing intelligent contract | |
CN101937336B (en) | Software asset bundling and consumption method and system | |
KR100750834B1 (en) | A method of data call stack tracing in data monitoring of JAVA byte code and a device for storing the method in compter program type | |
CN104899025A (en) | Method and device for generating channel package | |
US20020093856A1 (en) | File language verification | |
CN110221968A (en) | Method for testing software and Related product | |
US8949821B2 (en) | Cap file for the personalization of a java application | |
CN109145235B (en) | Method and device for analyzing webpage and electronic equipment | |
CN108282518A (en) | A kind of customer terminal webpage generation method and device | |
CN109240665A (en) | Log recording method, device and electronic equipment | |
CN108415821A (en) | The generation method and device of test report | |
CN105094905A (en) | Method and device for dynamically loading language resources | |
CN110069259A (en) | Analytic method, device, electronic equipment and storage medium based on idl file | |
CN109460546A (en) | List generation method, device and electronic equipment | |
CN107797819A (en) | Delta package generation method, computer-readable recording medium and server | |
CN106775781A (en) | Method and device for reducing application installation packages and electronic equipment | |
CN106775916A (en) | Method and device for reducing application installation packages and electronic equipment | |
CN109299032A (en) | Data analysing method, electronic equipment and computer storage medium | |
CN108874384B (en) | Terminal device, server, web page data processing method, and computer storage medium | |
CN108920179A (en) | Java reflects implementation method, device and system |
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 |