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
- area
- additional information
- installation package
- source file
- 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
- 230000010365 information processing Effects 0.000 title claims abstract description 23
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 238000009434 installation Methods 0.000 claims abstract description 79
- 238000002347 injection Methods 0.000 claims abstract description 69
- 239000007924 injection Substances 0.000 claims abstract description 69
- 238000000034 method Methods 0.000 claims description 18
- 238000010276 construction Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 4
- 238000011900 installation process Methods 0.000 description 2
- 239000000243 solution Substances 0.000 description 2
- 230000006837 decompression Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
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 the field of information processing technologies, and in particular, to an information processing method and apparatus.
Background
With the wide use of android operating systems, more and more installation package files of application programs developed for such operating systems are available, the installation package files can be displayed on websites provided by developers and websites provided by channel providers, and electronic devices for installing such operating systems can download the installation package files from the websites, wherein the channel providers cooperate with the developers to expand the popularization range of the installation package files developed by the developers.
In order to improve the security of the installation package files and distinguish the installation package files developed by the developers, each installation package file is distributed with a signature after being packaged, the signature is used for distinguishing the developed installation package files, and the signature can be used as a private key of the installation package files to improve the security of the installation package files. When the installation package file needs to be modified, the private key is used as a decompression password to decompress the packaged installation package file, and a channel dealer cannot inject additional information into the installation package file under the condition that the private key is not known, wherein the additional information is information which is provided by the channel dealer and is irrelevant to the installation package file.
At present, in order to inject additional information into the installation package file, a developer may additionally provide an SDK (Software Development Kit) according to the requirements of a channel provider, and integrate the SDK and the installation package file to meet the requirements of the channel provider. However, for different requirements provided by the channel provider, the developer needs to provide an additional SDK for integration, which increases the development difficulty.
Disclosure of Invention
In view of this, embodiments of the present invention provide an information processing method and apparatus for conveniently and quickly injecting additional information into an installation package file, where the technical scheme is as follows:
the embodiment of the invention provides an information processing method, which is used for injecting additional information into an installation package file, and comprises the following steps:
sequentially forming a compressed source file data area, a compressed source file directory ending area and an annotation area in the installation package file, and establishing an information injection area with a preset capacity behind the annotation area;
receiving additional information to be injected into the installation package file;
writing the additional information into the information injection area.
Preferably, the compressed source file data area, the compressed source file directory area and the compressed source file directory end area respectively include first identification information, second identification information and third identification information; the method further comprises the following steps:
comparing the additional information with each identification information to obtain a comparison result;
when the comparison result shows that the additional information and each identification information are different, writing the additional information into the information injection area;
and when the comparison result shows that the additional information is the same as any one of the identification information, sending prompt information, wherein the prompt information is used for indicating that the additional information needs to be modified.
Preferably, the creating an information injection area having a predetermined capacity after the comment area includes:
calculating the capacity occupied by the additional information;
and establishing an information injection area with a preset capacity not less than the calculated capacity after the comment area.
Preferably, the creating an information injection area having a predetermined capacity after the comment area includes: an information injection area with a fixed capacity is established behind the comment area.
An embodiment of the present invention further provides an information processing apparatus, configured to inject additional information into an installation package file, where the apparatus includes:
the region construction unit is used for sequentially forming a compressed source file data region, a compressed source file directory ending region and an annotation region in the installation package file, and establishing an information injection region with a preset volume behind the annotation region;
the receiving unit is used for receiving additional information needing to be injected into the installation package file;
a writing unit for writing the additional information into the information injection area.
Preferably, the compressed source file data area, the compressed source file directory area and the compressed source file directory end area respectively include first identification information, second identification information and third identification information;
the write unit includes: a ratio subunit, a write subunit and a prompt subunit; wherein,
the comparison subunit is used for comparing the additional information with each identification information to obtain a comparison result;
the writing subunit is configured to write the additional information into the information injection area when the comparison result indicates that the additional information and each of the identification information are different;
and the prompting subunit is configured to send a prompting message when the comparison result indicates that the additional information is the same as any one of the identification information, where the prompting message is used to indicate that the additional information needs to be modified.
Preferably, the region construction unit creating an information injection region having a predetermined capacity after the comment region includes: and calculating the capacity occupied by the additional information, and establishing an information injection area with a preset capacity not less than the calculated capacity after the annotation area.
Preferably, the region construction unit creating an information injection region having a predetermined capacity after the comment region includes: an information injection area with a fixed capacity is established behind the comment area.
By applying the technical scheme provided by the embodiment of the invention, the information injection area is added at the tail of the installation package file, and after the additional information which needs to be injected into the installation package file is received, the additional information can be directly written into the information injection area, so that the mode of writing the additional information is convenient on the premise of changing the file format of the installation package, and the development difficulty is reduced compared with the mode of adding the additional information by researching and developing and integrating the SDK.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a flow chart of an information processing method according to an embodiment of the present invention;
FIG. 2 is another flow chart of an information processing method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a writing unit in an information processing apparatus according to an embodiment of the present invention.
Detailed Description
At present, the method of injecting additional information into an installation package file is as follows: besides the development of the installation package file, an additional development of an SDK for adding additional information is required, and the open mode can provide different SDKs according to the requirements of different channel suppliers, so that the development difficulty is improved. To solve the problem, an information processing method provided by an embodiment of the present invention includes: and adding an information injection area for injecting additional information in the installation package file, and directly writing the additional information in the information injection area on the premise of changing the format of the installation package file.
In order to make those skilled in the art better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an information processing method according to an embodiment of the present invention is shown, where the information processing method is used to inject additional information into an installation package file, and one of core ideas of the method is as follows: an information injection area for writing additional information is added in the installation package file, and the additional information is directly written in the information injection area on the premise of changing the file format of the installation package, which specifically comprises the following steps:
101: a compressed source file data area, a compressed source file directory ending area and an annotation area are sequentially formed in the installation package file, and an information injection area with a preset capacity is established behind the annotation area.
The compressed source file data area is used for storing program codes in the installation package file and configuration information required by the installation process; the compressed source file directory area is used for recording an installation directory of information stored in the compressed source file data area; the compressed source file directory ending area is the end of the compressed source file directory area and indicates the termination of the recorded installation directory; the comment area is used for recording the description information of the installation package file.
The compressed source file data area, the compressed source file directory ending area and the comment area are in the format of the current installation package file. In order to reduce the difficulty of injecting additional information into the installation package file, the embodiment of the invention changes the format of the installation package file, and the change mode can be as follows: an information injection area is established after the annotation area. The modified installation package file format is shown in table 1.
TABLE 1 installation Package File Format
The data capacity of the information injection region is preset when the information injection region is established, that is, the information injection region has a predetermined capacity, and the configuration of the predetermined capacity of the information injection region in the embodiment of the present invention includes, but is not limited to, the following two ways:
one is to configure a fixed capacity in the information injection region, and the other is to configure a predetermined capacity in the information injection region according to the capacity occupied by the actually added additional information, specifically, to configure a predetermined capacity in the information injection region, which is larger than the capacity occupied by the received additional information.
102: additional information that needs to be injected into the installation package file is received.
103: additional information is written into the information injection area.
On the premise of changing the file format of the installation package, after the additional information is received, the additional information can be directly written into the information injection area added in the installation package file. Therefore, on the premise of changing the file format of the installation package, the mode of writing the additional information is convenient, and compared with the mode of adding the additional information by researching, developing and integrating the SDK, the development difficulty is reduced.
The compressed source file data area, the compressed source file directory area and the compressed source file directory ending area serve as three independent areas in the installation package file, each independent area has identification information as an area header to identify the area, and the identification information specifically includes: the compressed source file data area comprises first identification information, the compressed source file directory area comprises second identification information, the compressed source file directory ending area comprises third identification information, and the first identification information, the second identification information and the third identification information are all different. For example, the first identification information is: 0x04034b50, and the second identification information is: 0x02014b50, and the third identification information is: 0x02014b 50.
When writing the additional information into the information injection area, the information processing method provided in the embodiment of the present invention further needs to compare the additional information with the identification information of each independent area, so as to avoid writing the additional information that is the same as the identification information into the information injection area. Since writing the additional information identical to the identification information into the information injection area may cause an identification error of the installation package file, the additional information and the identification information are compared first before writing the additional information, and a specific process may be shown in fig. 2, and may include the following steps:
201: a compressed source file data area, a compressed source file directory ending area and an annotation area are sequentially formed in the installation package file, and an information injection area with a preset capacity is established behind the annotation area. The compressed source file data area, the compressed source file directory area and the compressed source file directory ending area respectively comprise first identification information, second identification information and third identification information.
202: additional information that needs to be injected into the installation package file is received.
In the embodiment of the present invention, step 201 and step 202: this embodiment of the present invention is not described again, as in steps 101 and 102 of fig. 1.
203: and comparing the additional information with each identification information to obtain a comparison result.
204: and writing the additional information into the information injection area when the comparison result shows that the additional information and each piece of identification information are different.
205: when the comparison result shows that the additional information is the same as any one of the identification information, prompt information is sent, and the prompt information is used for indicating that the additional information needs to be modified, so that the additional information which is the same as the identification information can be prevented from being written into the information injection area, and the identification of the installation package file is enabled to be wrong.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides an information processing apparatus, configured to inject additional information into an installation package file, where a schematic structural diagram of the information processing apparatus is shown in fig. 3, and the information processing apparatus may include: an area construction unit 11, a receiving unit 12 and a writing unit 13, wherein:
an area construction unit 11 for sequentially forming a compressed source file data area, a compressed source file directory end area, and an annotation area in the installation package file, and establishing an information injection area having a predetermined capacity after the annotation area.
In the embodiment of the invention, the compressed source file data area is used for storing the program codes in the installation package file and the configuration information required by the installation process; the compressed source file directory area is used for recording an installation directory of information stored in the compressed source file data area; the compressed source file directory ending area is the end of the compressed source file directory area and indicates the termination of the recorded installation directory; the comment area is used for recording the description information of the installation package file.
The compressed source file data area, the compressed source file directory ending area and the comment area are in the format of the current installation package file. In order to reduce the difficulty of injecting additional information into the installation package file, the embodiment of the invention changes the format of the installation package file, and the change mode can be as follows: an information injection area is established after the annotation area.
The data capacity of the information injection region is preset when the information injection region is established, that is, the information injection region has a predetermined capacity, and the configuration of the predetermined capacity of the information injection region by the region construction unit 11 in the embodiment of the present invention includes, but is not limited to, the following two ways:
one is to configure a fixed capacity in the information injection region, and the other is to configure a predetermined capacity in the information injection region according to the capacity occupied by the actually added additional information, specifically, to configure a predetermined capacity in the information injection region, which is larger than the capacity occupied by the received additional information.
A receiving unit 12, configured to receive additional information that needs to be injected into the installation package file.
A writing unit 13 for writing additional information into the information injection area.
On the premise of changing the file format of the installation package, after the additional information is received, the additional information can be directly written into the information injection area added in the installation package file. Therefore, on the premise of changing the file format of the installation package, the mode of writing the additional information is convenient, and compared with the mode of adding the additional information by researching, developing and integrating the SDK, the development difficulty is reduced.
In the embodiment of the present invention, the compressed source file data area, the compressed source file directory area, and the compressed source file directory end area serve as three independent areas in the installation package file, each independent area has identification information as a header of the area to identify the area, and specifically, the identification information may be: the compressed source file data area comprises first identification information, the compressed source file directory area comprises second identification information, the compressed source file directory ending area comprises third identification information, and the first identification information, the second identification information and the third identification information are all different. For example, the first identification information is: 0x04034b50, and the second identification information is: 0x02014b50, and the third identification information is: 0x02014b 50.
Writing the additional information that is the same as the identification information into the information injection area may cause an identification error of the installation package file, so the writing unit 13 first compares the additional information with the identification information before writing the additional information, and a schematic structural diagram of the writing unit 13 in the corresponding embodiment of the present invention is shown in fig. 4, and may include: ratio subunit 131, write subunit 132, and cue subunit 133. Wherein,
and the comparison subunit 131 is configured to compare the additional information with each identification information to obtain a comparison result.
And a writing subunit 132, configured to write the additional information into the information injection area when the comparison result indicates that the additional information and each of the identification information are different.
And the prompt subunit 132 is configured to send prompt information when the comparison result indicates that the additional information is the same as any one of the identification information, where the prompt information is used to indicate that the additional information needs to be modified, so that it is avoided that the additional information that is the same as the identification information is written into the information injection area, and thus an error is made in identification of the installation package file.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should be further noted that, in the specification, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The information processing method and apparatus provided by the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (6)
1. An information processing method for injecting additional information in an installation package file, the method comprising:
sequentially forming a compressed source file data area, a compressed source file directory ending area and an annotation area in the installation package file, and establishing an information injection area with a preset capacity behind the annotation area;
receiving additional information to be injected into the installation package file;
writing the additional information into the information injection area;
the compressed source file data area, the compressed source file directory area and the compressed source file directory ending area respectively comprise first identification information, second identification information and third identification information; the method further comprises the following steps:
comparing the additional information with each identification information to obtain a comparison result;
when the comparison result shows that the additional information and each identification information are different, writing the additional information into the information injection area;
and when the comparison result shows that the additional information is the same as any one of the identification information, sending prompt information, wherein the prompt information is used for indicating that the additional information needs to be modified.
2. The method of claim 1, wherein creating an information injection area having a predetermined capacity after the annotation area comprises:
calculating the capacity occupied by the additional information;
and establishing an information injection area with a preset capacity not less than the calculated capacity after the comment area.
3. The method of claim 1, wherein creating an information injection area having a predetermined capacity after the annotation area comprises: an information injection area with a fixed capacity is established behind the comment area.
4. An information processing apparatus for injecting additional information in an installation package file, the apparatus comprising:
the region construction unit is used for sequentially forming a compressed source file data region, a compressed source file directory ending region and an annotation region in the installation package file, and establishing an information injection region with a preset volume behind the annotation region;
the receiving unit is used for receiving additional information needing to be injected into the installation package file;
a writing unit for writing the additional information into the information injection area;
the compressed source file data area, the compressed source file directory area and the compressed source file directory ending area respectively comprise first identification information, second identification information and third identification information;
the write unit includes: a ratio subunit, a write subunit and a prompt subunit; wherein,
the comparison subunit is used for comparing the additional information with each identification information to obtain a comparison result;
the writing subunit is configured to write the additional information into the information injection area when the comparison result indicates that the additional information and each of the identification information are different;
and the prompting subunit is configured to send a prompting message when the comparison result indicates that the additional information is the same as any one of the identification information, where the prompting message is used to indicate that the additional information needs to be modified.
5. The apparatus of claim 4, wherein the region construction unit creates an information injection region having a predetermined capacity after the comment region comprises: and calculating the capacity occupied by the additional information, and establishing an information injection area with a preset capacity not less than the calculated capacity after the annotation area.
6. The apparatus of claim 4, wherein the region construction unit creates an information injection region having a predetermined capacity after the comment region comprises: an information injection area with a fixed capacity is established behind the comment area.
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 |
---|---|---|
US20190278583A1 (en) | Method for updating firmware, terminal and computer readable non-volatile storage medium | |
CN107301343B (en) | Safety data processing method and device and electronic equipment | |
WO2015154385A1 (en) | Method and terminal for ota updating | |
US20140033229A1 (en) | Method and computation node for processing application data | |
CN104809011B (en) | A kind of management method of application program | |
CN105446739A (en) | UI interface setting method and apparatus | |
US10621335B2 (en) | Method and device for verifying security of application | |
CN103412767A (en) | Method and system for recognizing and upgrading application version | |
CN104407888A (en) | Method and system for starting embedded type equipment | |
CN105204873A (en) | Terminal and application interface display method | |
CN106055375B (en) | Application program installation method and device | |
CN104735086A (en) | Method and device for downloading files safely | |
CN108197469B (en) | Method and device for verifying application program, storage medium and electronic equipment | |
CN106331049A (en) | Resource caching method, cache resource updating method, client, server and system | |
CN103888408A (en) | Method for uploading data to social networking platform and device thereof | |
WO2015117356A1 (en) | Start-up method and communication terminal | |
CN105786636A (en) | System repairing method and device | |
CN104199673B (en) | A kind of information processing method and device | |
CN107203397B (en) | Method and device for running mobile application | |
CN112788084B (en) | Application program installation package downloading method, application program installation package pushing device and computer equipment | |
CN103198003B (en) | For the control method of radio communication device | |
CN106933615B (en) | APP awakening method and device | |
CN102346692A (en) | Verification method of IPTV (Internet Protocol Television) updating files | |
CN109165512A (en) | A kind of the intention agreement URL leak detection method and device of application program | |
CN110719262B (en) | Data processing method, device 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 |