CN104199673B - A kind of information processing method and device - Google Patents
A kind of information processing method and device Download PDFInfo
- Publication number
- CN104199673B CN104199673B CN201410486508.7A CN201410486508A CN104199673B CN 104199673 B CN104199673 B CN 104199673B CN 201410486508 A CN201410486508 A CN 201410486508A CN 104199673 B CN104199673 B CN 104199673B
- Authority
- CN
- China
- Prior art keywords
- information
- additional information
- injection region
- pressure source
- installation package
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The present invention, which provides a kind of information processing method and device, wherein information processing method, to be included:Pressure source file data area, pressure source file directory area, pressure source file directory end zone and comment field are sequentially formed in the installation package file, and the information injection region with predetermined volumes is established behind the comment field;Receive the additional information for needing to be injected into the installation package file;The additional information is written in described information injection region.Using technical scheme provided in an embodiment of the present invention, an information injection region is added at installation package file end, after receiving the additional information for needing to be injected into the installation package file, additional information can be directly write in information injection region, to write the mode of additional information so on the premise of installation package file form is changed, for researching and developing and integrated SDK adds the mode of additional information, development difficulty is reduced.
Description
Technical field
The present invention relates to technical field of information processing, more particularly to a kind of information processing method and device.
Background technology
With widely using for Android operation system, for the installation package file of the application program of this type operating system research and development
It is more and more, in the website that installation package file can be illustrated in the website of developer's offer and distributor provides, this kind of behaviour is installed
Installation package file can be downloaded from these websites by making the electronic equipment of system, wherein, distributor is cooperated with developer, for exploitation
Business expands the promoted extension of its installation package file researched and developed.
Developer makes a distinction for the installation package file for improving the security of installation package file and being researched and developed, Mei Gean
Dress APMB package all can be to answer installation package file to distribute a signature after packing, and the signature is used for the installation package file area of research and development
Point, and the private key of installation package file can be considered as to improve the security of installation package file.When need change installation package file
When, private key decompresses as decompression password to the installation package file after packing, and distributor is in the case where being not known by private key
Additional information can not be injected in installation package file, wherein additional information is the letter unrelated with installation package file that distributor provides
Breath.
At present to inject additional information in installation package file, developer can be additionally provided according to the requirement of distributor
One SDK (SDK, Software Development Kit), and by the SDK and installation package file integrate with
Meets the needs of distributor.But for the different demands that distributor provides, developer is required for one extra SDK of offer to enter
Row is integrated, improves development difficulty.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of information processing method and device, for will conveniently add
Information is injected into installation package file, and technical scheme is as follows:
The embodiment of the present invention provides a kind of information processing method, described for injecting additional information in installation package file
Method includes:
Pressure source file data area, pressure source file directory area, compression source document are sequentially formed in the installation package file
Part catalogue end zone and comment field, and the information injection region with predetermined volumes is established behind the comment field;
Receive the additional information for needing to be injected into the installation package file;
The additional information is written in described information injection region.
Preferably, the pressure source file data area, the pressure source file directory area and the pressure source file directory
End zone includes the first identification information, the second identification information and the 3rd identification information respectively;Methods described also includes:
The additional information is compared with each identification information, obtains comparison result;
When the comparison result shows the additional information and each identification information is different, by the additional letter
Breath is written in described information injection region;
When the comparison result shows that the additional information is identical with any one of identification information, prompting letter is sent
Breath, the prompt message, which is used for instruction, to be needed to change the additional information.
Preferably, the information injection region with predetermined volumes is established behind the comment field includes:
Calculate capacity shared by the additional information;
The information injection region that predetermined volumes are not less than the capacity calculated is established behind the comment field.
Preferably, the information injection region with predetermined volumes is established behind the comment field includes:Behind the comment field
Establish the information injection region with fixed capacity.
The embodiment of the present invention also provides a kind of information processor, for injecting additional information in installation package file, institute
Stating device includes:
Region construction unit, for sequentially forming pressure source file data area, compression source document in the installation package file
Part directory area, pressure source file directory end zone and comment field, and the letter with predetermined volumes is established behind the comment field
Cease injection region;
Receiving unit, for receiving the additional information for needing to be injected into the installation package file;
Writing unit, for the additional information to be written in described information injection region.
Preferably, the pressure source file data area, the pressure source file directory area and the pressure source file directory
End zone includes the first identification information, the second identification information and the 3rd identification information respectively;
Said write unit includes:Comparison subunit, write-in subelement and prompting subelement;Wherein,
The comparison subunit, for the additional information to be compared with each identification information, obtain comparison result;
Said write subelement, for showing the additional information and each identification information when the comparison result
When different, the additional information is written in described information injection region;
The prompting subelement, for showing the additional information and any one of mark letter when the comparison result
Manner of breathing simultaneously, sends prompt message, the prompt message, which is used for instruction, to be needed to change the additional information.
Preferably, the region construction unit is established the information injection region with predetermined volumes behind the comment field and wrapped
Include:Capacity shared by the additional information is calculated, predetermined volumes are established behind the comment field not less than the capacity calculated
Information injection region.
Preferably, the region construction unit is established the information injection region with predetermined volumes behind the comment field and wrapped
Include:The information injection region with fixed capacity is established behind the comment field.
Using technical scheme provided in an embodiment of the present invention, an information injection region is added at installation package file end,
After receiving the additional information for needing to be injected into the installation package file, additional information can be directly write to information injection
Qu Zhong, so to write the mode of additional information on the premise of installation package file form is changed, relative to researching and developing and integrate
For the mode of SDK addition additional informations, development difficulty is reduced.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, without having to pay creative labor, it can also be obtained according to these accompanying drawings
His accompanying drawing.
Fig. 1 is a kind of flow chart of information processing method provided in an embodiment of the present invention;
Fig. 2 is another flow chart of information processing method provided in an embodiment of the present invention;
Fig. 3 is the structural representation of information processor provided in an embodiment of the present invention;
Fig. 4 is the structural representation of writing unit in information processor provided in an embodiment of the present invention.
Embodiment
The mode of injection additional information is in installation package file at present:In addition to installation package file is developed, it is also necessary to volume
Outer exploitation one is used for the SDK for adding additional information, and this open mode can be provided different due to the requirement of different distributors
SDK, improve development difficulty.To solve this problem, the mode of information processing method provided in an embodiment of the present invention is:Installing
Increase by one is used for the information injection region for injecting additional information in APMB package, directly exists on the premise of installation package file form is changed
Information writes additional information in injection region.
In order that those skilled in the art more fully understand the present invention, below in conjunction with the accompanying drawing in the embodiment of the present invention,
Technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only the present invention
Part of the embodiment, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not having
The every other embodiment obtained under the premise of creative work is made, belongs to the scope of protection of the invention.
Referring to Fig. 1, it illustrates a kind of flow chart of information processing method provided in an embodiment of the present invention, at the information
Reason method is used to inject additional information in installation package file, and one of its core concept is:Increase by one is used in installation package file
In the information injection region of write-in additional information, additional information is directly written to letter on the premise of installation package file form is changed
Cease in injection region, specifically may comprise steps of:
101:Pressure source file data area, pressure source file directory area, compression source document are sequentially formed in installation package file
Part catalogue end zone and comment field, and the information injection region with predetermined volumes is established behind comment field.
Wherein, pressure source file data area is used to store needed for program code and the installation process in installation package file
Configuration information;Pressure source file directory area is used for the installation directory for recording the information of the pressure source file data area memory storage;
Pressure source file directory end zone is the ending in pressure source file directory area, indicates that the installation directory of record terminates;Comment field is then
It is the descriptive information for recording installation package file.
Above-mentioned pressure source file data area, pressure source file directory area, pressure source file directory end zone and comment field are
The form of present installation package file.The embodiment of the present invention injects the difficulty of additional information in order to reduce in installation package file, more
Change the form of installation package file, its changing mode can be:Information injection region is established behind comment field.Installation kit text after change
Part form is as shown in table 1.
The installation package file form of table 1
Wherein the data capacity of information injection region is preset when establishing information injection region, i.e. information injection region has
Predetermined volumes, the in embodiments of the present invention configuration of the predetermined volumes of information injection region include but is not limited to following two ways:
One kind is to configure a fixed capacity in information injection region, and another kind is according to shared by the additional information being actually added into
Predetermined volumes in capacity configuration information injection region, detailed process are to be more than the additional letter received for configuration one in information injection region
The predetermined volumes of capacity shared by breath.
102:Reception needs to be injected into the additional information in installation package file.
103:Additional information is written in information injection region.
On the premise of installation package file form is changed, then directly additional information can be write after receiving additional information
Into installation package file in increased information injection region.It is so additional to write on the premise of installation package file form is changed
The mode of information, for researching and developing and integrated SDK adds the mode of additional information, reduce development difficulty.
Pressure source file data area, pressure source file directory area and pressure source file directory end zone are as installation package file
In three isolated areas, each isolated area has an identification information to be identified as the header in region to region, has
Body can be:Pressure source file data area includes the first identification information, pressure source file directory area includes the second identification information, pressure
Contracting source file catalogue end zone includes the 3rd identification information, and the first identification information, the second identification information and the 3rd mark letter
Breath is all different.Such as first identification information be:0x04034b50, the second identification information are:0x02014b50, the 3rd mark
Information is:0x02014b50.
When additional information is write into information injection region, information processing method provided in an embodiment of the present invention also needs to will be attached
Information and the identification information of each isolated area is added to be compared, to avoid to be written to identification information identical additional information
In information injection region.Because will be written to identification information identical additional information in information injection region can cause installation package file
Identification mistake, so before additional information is write first having to that additional information and identification information is compared, detailed process
Can be with as shown in fig.2, may comprise steps of:
201:Pressure source file data area, pressure source file directory area, compression source document are sequentially formed in installation package file
Part catalogue end zone and comment field, and the information injection region with predetermined volumes is established behind comment field.Wherein compress source document
Part data field, pressure source file directory area and pressure source file directory end zone include the first identification information, the second mark respectively
Information and the 3rd identification information.
202:Reception needs to be injected into the additional information in installation package file.
In embodiments of the present invention, step 201 and step 202:It is identical with the step 101 in Fig. 1 and 102, to this this hair
Bright embodiment is no longer illustrated by.
203:Additional information is compared with each identification information, obtains comparison result.
204:When comparison result shows additional information and each identification information is different, additional information is written to information
In injection region.
205:When comparison result shows that additional information is identical with any one identification information, prompt message is sent, is prompted
Information, which is used for instruction, to be needed to change additional information, can so avoid that information will be written to identification information identical additional information
In injection region, so that installation package file identification error.
Corresponding with above method embodiment, the embodiment of the present invention also provides a kind of information processor, for installing
Additional information, the wherein structural representation of information processor are injected in APMB package as shown in figure 3, can include:Region is built
Unit 11, receiving unit 12 and writing unit 13, wherein:
Region construction unit 11, for sequentially forming pressure source file data area, compression source file in installation package file
Directory area, pressure source file directory end zone and comment field, and establish the information with predetermined volumes behind comment field and inject
Area.
In embodiments of the present invention, pressure source file data area is used to store the program code and peace in installation package file
Configuration information needed for dress process;Pressure source file directory area is used for the information for recording the pressure source file data area memory storage
Installation directory;Pressure source file directory end zone is the ending in pressure source file directory area, indicates that the installation directory of record is whole
Only;Comment field is then the descriptive information for recording installation package file.
Above-mentioned pressure source file data area, pressure source file directory area, pressure source file directory end zone and comment field are
The form of present installation package file.The embodiment of the present invention injects the difficulty of additional information in order to reduce in installation package file, more
Change the form of installation package file, its changing mode can be:Information injection region is established behind comment field.
Wherein the data capacity of information injection region is preset when establishing information injection region, i.e. information injection region has
Predetermined volumes, in embodiments of the present invention configuration of the region construction unit 11 to the predetermined volumes of information injection region include but unlimited
In following two ways:
One kind is to configure a fixed capacity in information injection region, and another kind is according to shared by the additional information being actually added into
Predetermined volumes in capacity configuration information injection region, detailed process are to be more than the additional letter received for configuration one in information injection region
The predetermined volumes of capacity shared by breath.
Receiving unit 12, need to be injected into the additional information in installation package file for reception.
Writing unit 13, for additional information to be written in information injection region.
On the premise of installation package file form is changed, then directly additional information can be write after receiving additional information
Into installation package file in increased information injection region.It is so additional to write on the premise of installation package file form is changed
The mode of information, for researching and developing and integrated SDK adds the mode of additional information, reduce development difficulty.
Pressure source file data area, pressure source file directory area and pressure source file directory terminate in embodiments of the present invention
As three isolated areas in installation package file, each isolated area has header pair of the identification information as region in area
Region is identified, and can be specifically:Pressure source file data area includes the first identification information, pressure source file directory area includes
Second identification information, pressure source file directory end zone include the 3rd identification information, and the first identification information, the second mark letter
Breath and the 3rd identification information are all different.Such as first identification information be:0x04034b50, the second identification information are:
0x02014b50, the 3rd identification information are:0x02014b50.
The identification mistake that can cause installation package file in information injection region will be written to identification information identical additional information
By mistake, so writing unit 13 before additional information is write first has to that additional information and identification information is compared, accordingly
The structural representation of writing unit 13 is as shown in figure 4, can include in the embodiment of the present invention:Comparison subunit 131, write-in are single
Member 132 and prompting subelement 133.Wherein,
Comparison subunit 131, for additional information to be compared with each identification information, obtain comparison result.
Subelement 132 is write, for that when comparison result shows additional information and each identification information is different, will add
Information is written in information injection region.
Subelement 132 is prompted, for when comparison result shows that additional information is identical with any one identification information, sending
Prompt message, prompt message, which is used for instruction, to be needed to change additional information, can so avoid adding with identification information identical
Information is written in information injection region, so that installation package file identification error.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight
Point explanation is all difference with other embodiment, between each embodiment identical similar part mutually referring to.
For device class embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is joined
See the part explanation of embodiment of the method.
Finally, it is to be noted that, in application documents, term " comprising ", "comprising" or its any other variant
Including for nonexcludability is intended to, so that process, method, article or equipment including a series of elements not only include
Those key elements, but also the other element including being not expressly set out, or also include for this process, method, article or
The intrinsic key element of person's equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", not
Other identical element in the process including the key element, method, article or equipment also be present in exclusion.
A kind of information processing method provided by the present invention and device are described in detail above, it is used herein
Specific case is set forth to the principle and embodiment of the present invention, and the explanation of above example is only intended to help and understands this
The method and its core concept of invention;Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, specific
There will be changes in embodiment and application, in summary, this specification content should not be construed as to the present invention's
Limitation.
Claims (6)
1. a kind of information processing method, for injecting additional information in installation package file, methods described includes:
Pressure source file data area, pressure source file directory area, compression source file mesh are sequentially formed in the installation package file
End zone and comment field are recorded, and the information injection region with predetermined volumes is established behind the comment field;
Receive the additional information for needing to be injected into the installation package file;
The additional information is written in described information injection region;
The pressure source file data area, the pressure source file directory area and the pressure source file directory end zone are wrapped respectively
Include the first identification information, the second identification information and the 3rd identification information;Methods described also includes:
The additional information is compared with each identification information, obtains comparison result;
When the comparison result shows the additional information and each identification information is different, the additional information is write
Enter into described information injection region;
When the comparison result shows that the additional information is identical with any one of identification information, prompt message is sent,
The prompt message, which is used for instruction, to be needed to change the additional information.
2. according to the method for claim 1, it is characterised in that the information with predetermined volumes is established behind the comment field
Injection region includes:
Calculate capacity shared by the additional information;
The information injection region that predetermined volumes are not less than the capacity calculated is established behind the comment field.
3. according to the method for claim 1, it is characterised in that the information with predetermined volumes is established behind the comment field
Injection region includes:The information injection region with fixed capacity is established behind the comment field.
4. a kind of information processor, for injecting additional information in installation package file, described device includes:
Region construction unit, for sequentially forming pressure source file data area, compression source file mesh in the installation package file
Area, pressure source file directory end zone and comment field are recorded, and establishes the information with predetermined volumes behind the comment field and notes
Enter area;
Receiving unit, for receiving the additional information for needing to be injected into the installation package file;
Writing unit, for the additional information to be written in described information injection region;
The pressure source file data area, the pressure source file directory area and the pressure source file directory end zone are wrapped respectively
Include the first identification information, the second identification information and the 3rd identification information;
Said write unit includes:Comparison subunit, write-in subelement and prompting subelement;Wherein,
The comparison subunit, for the additional information to be compared with each identification information, obtain comparison result;
Said write subelement, for showing that the additional information and each identification information are different when the comparison result
When, the additional information is written in described information injection region;
The prompting subelement, for showing the additional information and any one of identification information phase when the comparison result
Meanwhile prompt message is sent, the prompt message, which is used for instruction, to be needed to change the additional information.
5. device according to claim 4, it is characterised in that the region construction unit establishes tool behind the comment field
The information injection region for having predetermined volumes includes:Capacity shared by the additional information is calculated, pre- constant volume is established behind the comment field
Information injection region of the amount not less than the capacity calculated.
6. device according to claim 4, it is characterised in that the region construction unit establishes tool behind the comment field
The information injection region for having predetermined volumes includes:The information injection region with fixed capacity is established behind the comment field.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410486508.7A CN104199673B (en) | 2014-09-22 | 2014-09-22 | A kind of information processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410486508.7A CN104199673B (en) | 2014-09-22 | 2014-09-22 | A kind of information processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104199673A CN104199673A (en) | 2014-12-10 |
CN104199673B true CN104199673B (en) | 2018-01-26 |
Family
ID=52084970
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410486508.7A Active CN104199673B (en) | 2014-09-22 | 2014-09-22 | A kind of information processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104199673B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055363B (en) | 2016-05-31 | 2017-11-14 | 广东欧珀移动通信有限公司 | A kind of method and mobile terminal for identifying file |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US2867709A (en) * | 1956-06-14 | 1959-01-06 | Radio Receptor Company Inc | Stray field electrode buffer |
CN101482863A (en) * | 2008-01-11 | 2009-07-15 | 高德软件有限公司 | Interest point information storage method |
CN101526947A (en) * | 2009-04-23 | 2009-09-09 | 山东中创软件商用中间件股份有限公司 | SQL resisting injection technology using regular expression |
-
2014
- 2014-09-22 CN CN201410486508.7A patent/CN104199673B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US2867709A (en) * | 1956-06-14 | 1959-01-06 | Radio Receptor Company Inc | Stray field electrode buffer |
CN101482863A (en) * | 2008-01-11 | 2009-07-15 | 高德软件有限公司 | Interest point information storage method |
CN101526947A (en) * | 2009-04-23 | 2009-09-09 | 山东中创软件商用中间件股份有限公司 | SQL resisting injection technology using regular expression |
Non-Patent Citations (1)
Title |
---|
.ZIP File Format Specification;佚名;《https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE6.2.0.txt》;20040426;第2,5,9,18页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104199673A (en) | 2014-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107194242B (en) | Firmware upgrade method and device | |
US9942750B2 (en) | Providing an encrypted account credential from a first device to a second device | |
KR102263913B1 (en) | Method to modify android application life cycle to control its execution in a containerized workspace environment | |
US20150121085A1 (en) | Cookie Information Sharing Method and System | |
CN104182662A (en) | Mobile terminal, system and method for hiding and starting hidden application programs | |
CN103984547A (en) | Form validation method and system | |
CN105446713A (en) | Safe storage method and equipment | |
CN101504656B (en) | Combined execution method for PE document code | |
WO2015081777A1 (en) | Method and device for encrypting information of an application | |
CN104111832A (en) | Android application program installation package packing method and system and unpacking method | |
CN103077332A (en) | Method and device for running packer application with self-checking | |
CN102739654A (en) | Method for realizing application program to access database | |
WO2017032128A1 (en) | Terminal unlocking method and terminal | |
CN105141429A (en) | User verifying method, user verifying device and server | |
CN108509246A (en) | A kind of self-defined verification method of web form and system | |
CN107358114A (en) | A kind of method and terminal for preventing user data loss | |
CN104407888A (en) | Method and system for starting embedded type equipment | |
CN106022152A (en) | Method and device for encrypting files in mobile device | |
CN106201640A (en) | A kind of method and device of BootLoader program of upgrading | |
CN104199673B (en) | A kind of information processing method and device | |
CN103257887B (en) | Terminal and course control method | |
CN105718468A (en) | Method and device for building ODS layer of data warehouse | |
CN104102859A (en) | JavaScript-based middleware authorization method and device | |
CN111628863A (en) | Data signature method and device, electronic equipment and storage medium | |
CN112543194B (en) | Mobile terminal login method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |