CN105718276B - Method and device for providing APK download and NGINX server - Google Patents

Method and device for providing APK download and NGINX server Download PDF

Info

Publication number
CN105718276B
CN105718276B CN201410724824.3A CN201410724824A CN105718276B CN 105718276 B CN105718276 B CN 105718276B CN 201410724824 A CN201410724824 A CN 201410724824A CN 105718276 B CN105718276 B CN 105718276B
Authority
CN
China
Prior art keywords
channel
apk
information
file
channel information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410724824.3A
Other languages
Chinese (zh)
Other versions
CN105718276A (en
Inventor
冯顾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
3600 Technology Group Co ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410724824.3A priority Critical patent/CN105718276B/en
Publication of CN105718276A publication Critical patent/CN105718276A/en
Application granted granted Critical
Publication of CN105718276B publication Critical patent/CN105718276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for providing APK downloading and an NGINX server. The method for providing APK download comprises the following steps: acquiring an APK downloading request, wherein the APK downloading request comprises a channel identifier of a request source; extracting a channel identifier from the APK downloading request, and determining corresponding channel information according to the channel identifier, wherein the channel information corresponds to the channel type of the request source one to one; and attaching the channel information as the file annotation content of the APK file corresponding to the APK downloading request to the APK file, and returning the APK file attached with the file annotation content to the request source. By using the method and the device, the channel information is added to the tail of the APK file corresponding to the download request as the file annotation content, so that the APK file does not need to be unpacked when the channel information is added, the operation is simple, and the APK file publishing efficiency is improved. And because a plurality of APK files added with different channel information are not required to be prepared, the number of files is reduced, and the storage space is further saved.

Description

Method and device for providing APK download and NGINX server
Technical Field
The invention relates to the field of mobile internet, in particular to a method and a device for providing APK downloading and an NGINX server.
Background
After the application development of an Android operating system (Android), the Android operating system (Android) is generally packaged into an installation Package (Android Package, abbreviated as APK), and the Android Package is downloaded by an Android terminal and then installed to realize the functions of the Android. Due to the openness of Android, a plurality of platforms for issuing APK are available, such as various mobile phone application markets. When the APK is published by a plurality of channels, the information of the publishing channel is often needed to be known so as to count the user quantity, active statistics and online data of each channel.
For the above reasons, it is necessary to add corresponding channel information into the APK, and the method for adding channel information in the prior art generally includes: before the APK is released, various channel information is added into the original package on line respectively to generate the APK (hereinafter referred to as channel package) containing the channel information.
The scheme of using above prior art, on the one hand because the quantity of distribution channel is many, all need carry out a large amount of work that adds the channel information when using the renewal at every turn, and is inefficient, has directly influenced APK's the speed of getting on the line, and on the other hand, because after different channel information is added into to same APK, a plurality of different APKs have appeared and have occupied a large amount of file storage space.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide an NGINX server and an apparatus for providing an APK download and a corresponding method of providing an APK download that overcome or at least partially solve the above problems. A further object of the present invention is to save the operation of adding channel information before the APK is released, and improve the efficiency of the APK release.
It is another further object of the present invention to reduce the number of APK files to facilitate file management.
In accordance with one aspect of the present invention, a method of providing APK download is provided. The method for providing APK download comprises the following steps: acquiring an APK downloading request, wherein the APK downloading request comprises a channel identifier of a request source; extracting a channel identifier from the APK downloading request, and determining corresponding channel information according to the channel identifier, wherein the channel information corresponds to the channel type of the request source one to one; and attaching the channel information as the file annotation content of the APK file corresponding to the APK downloading request to the APK file, and returning the APK file attached with the file annotation content to the request source.
Optionally, determining the corresponding channel information according to the channel identifier includes: and inquiring channel information corresponding to the channel identification in a preset channel mapping table, wherein the mapping relation between a plurality of channel identifications and channel information is stored in the channel mapping table.
Optionally, the channel mapping table is a hash table with a channel identifier as a key value.
Optionally, determining the corresponding channel information according to the channel identifier includes: and calculating the channel identification according to a preset logical operation rule to obtain channel information.
Optionally, the calculating the channel identifier according to a preset logical operation rule to obtain the channel information includes: carrying out encryption calculation on the channel identification according to a preset encryption algorithm to obtain channel encryption information; performing hash calculation on the channel identification according to a preset hash algorithm to obtain channel abstract information; and splicing the channel encryption information and the channel abstract information into channel information.
Optionally, after the channel encryption information and the channel summary information are spliced into the channel information, the method further includes: and matching and storing the channel identification and the channel information into a preset channel mapping table for use in processing a subsequent APK downloading request.
Optionally, the APK download request includes a uniform resource locator of the requested APK in the http protocol, and the channel identifier is located at a preset field of the uniform resource locator.
Optionally, attaching the channel information as a file annotation content of an APK file corresponding to the APK download request to the APK file includes: attaching channel information to the end of the APK file; calculating the data length of the channel information; the data length is added to the content length value in the HTTP packet header sent to the request source.
According to another aspect of the invention, an apparatus for providing APK download is also provided. The apparatus for providing APK download comprises: the request acquisition module is configured to acquire an APK downloading request, wherein the APK downloading request comprises a resource locator of a requested APK and a channel identifier of a request source; the information determining module is configured to extract a channel identifier from the APK downloading request and determine corresponding channel information according to the channel identifier, wherein the channel information corresponds to the channel type of the request source one to one; and the download response module is configured to attach the channel information as the file annotation content of the APK file corresponding to the APK download request to the APK file, and return the APK file attached with the file annotation content to the request source.
Optionally, the information determining module includes: and the query submodule is configured to query channel information corresponding to the channel identifier in a preset channel mapping table, and the channel mapping table stores the mapping relation between a plurality of channel identifiers and the channel information.
Optionally, the channel mapping table is a hash table with a channel identifier as a key value.
Optionally, the information determining module includes: and the calculation submodule is configured to calculate the channel identification according to a preset logical operation rule to obtain channel information.
Optionally, the computation submodule is further configured to: carrying out encryption calculation on the channel identification according to a preset encryption algorithm to obtain channel encryption information; performing hash calculation on the channel identification according to a preset hash algorithm to obtain channel abstract information; and splicing the channel encryption information and the channel abstract information into channel information.
Optionally, the apparatus for providing APK download above further includes: and the list generation module is configured to match and store the channel identification and the channel information into a preset channel mapping table so as to be used when the query submodule processes a subsequent APK downloading request.
Optionally, the APK download request includes a uniform resource locator of the requested APK in the http protocol, and the channel identifier is located at a preset field of the uniform resource locator.
Optionally, the download response module is further configured to: attaching channel information to the end of the APK file; calculating the data length of the channel information; the data length is added to the content length value in the HTTP packet header sent to the request source.
According to another aspect of the invention, an NGINX server is also provided. The NGINX server is configured to be arranged with any of the above-described means for providing APK download.
The method for downloading the APK adds the channel information as the file annotation content to the tail of the APK file corresponding to the downloading request by utilizing the file format characteristic of the APK, so that the APK file does not need to be unpacked when the channel information is added, the operation is simple, the operation of adding the channel information to the APK file is reduced, and the publishing efficiency of the APK file is improved.
Furthermore, in the downloading process, the method for providing the APK downloading adds the channel information according to the downloading request, so that a plurality of APK files added with different channel information are not required to be prepared, the number of the files is reduced, and the storage space is further saved.
Furthermore, the channel information of the added APK file is preferably encrypted and hashed channel data, so that the safety is good, and the calculation amount of the channel information can be effectively reduced.
Furthermore, the method for providing APK downloading can be realized by utilizing the NGINX server, supports more concurrent connections and embodies higher efficiency.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic architecture diagram of an NGINX server providing APK download according to one embodiment of the present invention;
FIG. 2 is a schematic diagram of an apparatus for providing APK download according to one embodiment of the present invention;
fig. 3 is a schematic diagram of an apparatus for providing APK download according to another embodiment of the present invention;
fig. 4 is a schematic diagram of a method of providing APK download according to one embodiment of the present invention; and
fig. 5 is an alternative flow diagram of a method of providing APK download according to one embodiment of the present invention.
Detailed Description
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
Fig. 1 is a schematic architecture diagram of a NGINX server providing APK download according to one embodiment of the present invention. NGINX (engine x) is a high-performance HTTP and reverse proxy server that has the characteristics of stability, rich function set, example configuration files and low system resource consumption, and the concurrency capability does perform well in the same type of web server. Moreover, currently, NGINX is getting hot in China, and more websites start to deploy NGINX. In the embodiment of the present invention, the NGINX server 130 is used as a network side device for providing the APK download, and the function of adding channel information is completed while providing the download.
In this embodiment, a plurality of terminals 110 running in the android system request to download the APK file through the internet, and the android terminal 110 can download the APK file by using a plurality of different channels for publishing the APK file, for example, 360 mobile phone assistants and google markets all belong to the download channels. The NGINX server of the embodiment of the present invention, as the HTTP server 130, receives APK download requests sent from various channels, acquires an APK file corresponding to the download request from the file server 120, and returns the APK file to the android terminal 110 after the APK file adds channel information of the channel, thereby completing a task of providing and downloading the APK file. Compared with the existing APK downloading mode, the NGINX server 130 of the embodiment of the invention integrally adopts a modular design, and when processing the APK downloading request, the function of attaching channel information is added, instead of directly returning the APK file with the channel information added in advance to the android terminal 110 according to the APK downloading request.
The NGINX server 130 of the embodiment is arranged with a device 200 for providing APK downloading, which is used for adding channel information to an APK file in the process of downloading the APK file. Fig. 2 is a schematic diagram of an apparatus 200 for providing an APK download according to an embodiment of the present invention, where the apparatus 200 for providing an APK download may generally include: a request acquisition module 210, an information determination module 220, and a download response module 230. Among the above components, the request obtaining module 210 is configured to obtain an APK download request, where the obtained APK download request includes a resource locator of a requested APK and a channel identifier of a request source; the information determining module 220 is configured to extract a channel identifier from the APK download request and determine corresponding channel information according to the channel identifier. The channel information is in one-to-one correspondence with the channel type of the request source, and the channel information may be predetermined or calculated according to the channel identification. The channel information can be used for determining the downloading channel of the APK for subsequent statistics. The download response module 230 is configured to attach the channel information to the APK file as a file annotation content of the APK file corresponding to the APK download request, and return the APK file attached with the file annotation content to the request source. The download response module 230 adds channel information at the end of the APK file in a file annotation content manner by using the file format characteristics of the APK file, does not need to unpack the APK file, has small calculation amount, and is convenient to complete when providing download.
Fig. 3 is a schematic diagram of an apparatus 200 for providing an APK download according to another embodiment of the present invention, in which the information determination module 220 may be selectively arranged with a query sub-module 222 and a calculation sub-module 224, and in addition, the apparatus 200 for providing an APK download of the present embodiment may be selectively added with a list generation module 240.
The query submodule 222 and the calculation submodule 224 may respectively determine, in different manners, channel information corresponding to a channel identifier of a request source in the APK download request, where the query submodule 222 is configured to query, in a preset channel mapping table, the channel information corresponding to the channel identifier. The channel mapping table may pre-store a one-to-one mapping relationship between a plurality of channel identifiers and channel information. The channel mapping table can be a hash table with a channel identifier as a key code value, so that the searching speed is higher, and the hash values are the same in length and are convenient to attach to the APK file.
The calculation submodule 224 is configured to calculate the channel identifier according to a preset logic operation rule to obtain channel information. One optional specific calculation procedure is: carrying out encryption calculation on the channel identification according to a preset encryption algorithm to obtain channel encryption information; performing hash calculation on the channel identification according to a preset hash algorithm to obtain channel abstract information; and splicing the channel encryption information and the channel abstract information into channel information. Therefore, the calculated channel information meets the requirements of safety and tamper resistance.
The query submodule 222 and the calculation submodule 224 may be used in cooperation, for example, for a certain channel identification information, the query submodule 222 may first query in the channel mapping table, and if the channel mapping table does not include channel information corresponding to the channel identification, the calculation submodule 224 may be used to calculate the channel identification to obtain the channel information.
After the calculation by the calculation sub-module 224 is completed, the calculation result may be added to the channel mapping table for subsequent query, and in this case, the list generation module 240 of the apparatus 200 for providing APK download according to the embodiment of the present invention is configured to store the channel identifier and the channel information in a preset channel mapping table in a matching manner, so as to be used when the query sub-module 222 processes a subsequent APK download request. Therefore, each channel identifier needs to be calculated once, and the execution efficiency is greatly improved.
The APK download request obtained by the request obtaining module 210 may include a uniform resource locator of the requested APK in the http protocol, and the channel identifier is located at a preset field of the uniform resource locator, for example, "http:// example. A channel 360 "APK download request results in a channel identification of 360.
One specific alternative way for the download response module 230 to attach channel information is: attaching channel information to the end of the APK file; calculating the data length of the channel information; the data length is added to the content length value in the HTTP packet header sent to the request source. With the apparatus 200 for providing APK download of the above embodiment, the android terminal 110 of the user directly downloads the APK package to which the channel information is added.
The embodiment of the invention also provides a method for providing the APK download, which can be executed by any one of the devices for providing the APK download introduced in the above embodiments to improve the efficiency of APK release. Fig. 4 is a schematic diagram of a method for providing an APK download according to an embodiment of the present invention, as shown, the method for providing an APK download includes the following steps:
step S402, obtaining an APK downloading request;
step S404, extracting a channel identifier from the APK downloading request, and determining corresponding channel information according to the channel identifier;
step S406, attaching the channel information as the file annotation content of the APK file corresponding to the APK download request to the APK file,
step S408 is to return the APK file attached with the file annotation content to the request source.
The APK download request may include a channel identifier of a request source, where the channel identifier may include 360, google, and the like, and optionally, the APK download request includes a uniform resource locator of the requested APK in the http protocol, and the channel identifier is located in a preset field of the uniform resource locator. For example, for a uniform resource locator "http:// example. com/foo. apk? A channel 360 "APK download request results in a channel identification of 360.
The channel information determined in step S404 corresponds to the channel type of the request source one to one, and it may determine the channel information corresponding to the channel identifier of the request source in the APK download request in different manners. For example, one of the options is: the channel mapping table is obtained by using a preset channel mapping table for query, wherein another optional mode is as follows: and carrying out encryption calculation according to the channel identification. The specific process of the first query mode is as follows: and storing the mapping relation between the channel identifier and the channel information in a preset channel mapping table, and after the channel identifier is determined, inquiring the channel information corresponding to the channel identifier in the preset channel mapping table. The second calculation mode can calculate the channel identifier according to a preset logic operation rule to obtain channel information, and the specific calculation mode is to perform encryption calculation on the channel identifier according to a preset encryption algorithm to obtain channel encryption information; performing hash calculation on the channel identification according to a preset hash algorithm to obtain channel abstract information; the channel encryption information and the channel abstract information are spliced into the channel information, so that the channel information can be prevented from being intercepted and tampered.
In this case, the channel mapping table may be a hash table with channel identification as a key value, so that the lookup speed is faster, and the hash values have the same length and are conveniently attached to the APK file. The data query process can be made more rapid and efficient by using the hash table, and factors considered by selecting the hash function can include: the time required for calculating the hash function, the length of the key, the size of the hash table, the distribution condition of the key, the searching frequency of the record and the like. In this embodiment, the channel information may be preferably calculated by using a hashing Algorithm such as MD5(Message-Digest Algorithm 5) and SHA-1, wherein preferably, the MD5 hashing function may be used, and the MD5 generates a unique MD5 information Digest as the channel information by using an irreversible string transformation Algorithm for the channel identifier, so as to map the channel identifier into a 128-bit integer.
The method for performing Encryption calculation on the channel identifier in step S404 may adopt a Data Encryption Algorithm (DEA for short), so that the channel identifier is changed into a ciphertext with the same length through a series of calculations, and only a key used for Encryption is allowed to be held for decryption. Channel information can be effectively prevented from being tampered through encryption and hash calculation.
In step S404, after the channel information is calculated, the channel identifier and the channel information may be stored in a preset channel mapping table in a matching manner, so as to be used when a subsequent APK download request is processed. Thereby reducing the amount of subsequent processing computations. That is, for a certain channel identification information in the request acquired in step S402, it may be firstly queried in the channel mapping table, and if the channel mapping table does not include the channel information corresponding to the channel identification, the channel identification is encrypted and hashed to obtain the channel information.
An optional process of step S406 may be: attaching channel information to the end of the APK file; calculating the data length of the channel information; the data length is added to the content length value in the HTTP packet header sent to the request source. Since the APK file belongs to the zip format, the channel information can be attached by utilizing the characteristics of the zip file format.
A zip file consists of three parts: the system comprises compressed file content source data, compressed directory source data and a directory end identification structure, wherein the directory end identification structure exists at the end of the whole file and is used for marking the end of the compressed directory data. At the end of directory identification structure portion generally includes: comment length (Comment length), Comment content (Comment). The channel information is used as a file annotation and is placed at the tail of the APK file, so that the data of the APK file is not influenced, and the APK file is not required to be unpacked and pressed.
Fig. 5 is an optional flowchart of a method for providing an APK download according to an embodiment of the present invention, and the flow of the method for providing an APK download according to the embodiment is described by taking an NGINX server receiving 360 a download request of a mobile assistant as an example:
step S502, the NGINX server acquires an APK downloading request;
in step S504, channel identification information is acquired from the request URL of the download request, for example, for "http:// example. com/foo. apk? A request URL of channel 360 ", the NGINX server may determine a channel identification of 360";
step S506, using the channel identifier as a KEY value (KEY), searching whether channel information corresponding to the channel identifier exists in a preset HASH table (HASH table), if not, executing step S508, if so, inquiring corresponding channel information, and entering step S512;
step S508, regard this channel label as the input and turn into the channel information according to the predetermined algorithm, its calculation method used can be for encrypting the channel label with DES symmetric encryption method, adopt MD5 algorithm to calculate the summary information to the channel label, carry on the information splice of encrypted information and summary information as the channel information, thus prevent the channel information from eavesdropping and tampering effectively;
step S510, the generated channel information is stored in the HASH table with the channel identification as KEY.
Step S512, calculating the length of the channel information;
step S514, adding the Length of the channel information to the 'Content-Length' value of the data packet header returned to the downloading request source;
step S516, the NGINX server returns the requested APK file package to the downloading request source;
step S518, the channel information is sent to the download request source as the annotation content of the APK file package.
After the channel information is added to the APK file, the downloading source of the APK file can more conveniently execute the related functions and simultaneously realize the statistics of the release channels.
The method for downloading the APK adds the channel information as the file annotation content to the tail of the APK file corresponding to the downloading request by utilizing the file format characteristic of the APK, so that the APK file does not need to be unpacked when the channel information is added, the operation is simple, the operation of adding the channel information to the APK file is reduced, and the publishing efficiency of the APK file is improved. In addition, in the downloading process, the method for providing APK downloading adds the channel information according to the downloading request, so that a plurality of APK files added with different channel information are not required to be prepared, the number of the files is reduced, and the storage space is further saved. Furthermore, the channel information of the added APK file is preferably channel data subjected to encryption and hash processing, so that the safety is good, and the calculation amount of the channel information can be effectively reduced.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of an apparatus for providing APK download according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Thus, it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been illustrated and described in detail herein, many other variations or modifications consistent with the principles of the invention may be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.

Claims (17)

1. A method of providing APK download, comprising:
acquiring an APK downloading request, wherein the APK downloading request comprises a channel identifier of a request source;
extracting the channel identification from the APK downloading request, and determining corresponding channel information according to the channel identification, wherein the channel information corresponds to the channel identification of the request source one to one;
and attaching the channel information as the file annotation content of the APK file corresponding to the APK downloading request to the APK file, and returning the APK file attached with the file annotation content to the request source.
2. The method of claim 1, wherein determining corresponding channel information from the channel identification comprises:
and inquiring channel information corresponding to the channel identification in a preset channel mapping table, wherein the mapping relation between a plurality of channel identifications and channel information is stored in the channel mapping table.
3. The method of claim 2, wherein
The channel mapping table is a hash table using the channel identifier as a key code value.
4. The method of claim 1, wherein determining corresponding channel information from the channel identification comprises:
and calculating the channel identification according to a preset logic operation rule to obtain the channel information.
5. The method of claim 4, wherein calculating the channel information for the channel identifier according to a preset logic operation rule comprises:
carrying out encryption calculation on the channel identification according to a preset encryption algorithm to obtain channel encryption information;
performing hash calculation on the channel identification according to a preset hash algorithm to obtain channel abstract information;
and splicing the channel encryption information and the channel abstract information into the channel information.
6. The method of claim 5, wherein after concatenating the channel encryption information and the channel summary information into the channel information further comprises:
and matching and storing the channel identification and the channel information into a preset channel mapping table for use in processing a subsequent APK downloading request.
7. The method of any one of claims 1 to 6, wherein
The APK downloading request comprises a uniform resource locator of the requested APK of the http protocol, and the channel identifier is located at a preset field of the uniform resource locator.
8. The method of claim 7, wherein attaching the channel information as file annotation content of an APK file corresponding to the APK download request on the APK file comprises:
attaching the channel information to the end of the APK file;
calculating the data length of the channel information;
and adding the data length to a content length value in an HTTP data packet header sent to the request source.
9. An apparatus for providing APK download, comprising:
the request acquisition module is configured to acquire an APK downloading request, wherein the APK downloading request comprises a resource locator of a requested APK and a channel identifier of a request source;
the information determining module is configured to extract the channel identifier from the APK downloading request and determine corresponding channel information according to the channel identifier, wherein the channel information corresponds to the channel identifier of the request source one to one;
and the download response module is configured to attach the channel information as the file annotation content of the APK file corresponding to the APK download request to the APK file, and return the APK file attached with the file annotation content to the request source.
10. The apparatus of claim 9, wherein the information determination module comprises:
and the query submodule is configured to query channel information corresponding to the channel identifier in a preset channel mapping table, and the mapping relation between a plurality of channel identifiers and the channel information is stored in the channel mapping table.
11. The apparatus of claim 10, wherein
The channel mapping table is a hash table using the channel identifier as a key code value.
12. The apparatus of claim 10, wherein the information determination module comprises:
and the calculation submodule is configured to calculate the channel identification according to a preset logical operation rule to obtain the channel information.
13. The apparatus of claim 12, wherein the computation sub-module is further configured to:
carrying out encryption calculation on the channel identification according to a preset encryption algorithm to obtain channel encryption information;
performing hash calculation on the channel identification according to a preset hash algorithm to obtain channel abstract information;
and splicing the channel encryption information and the channel abstract information into the channel information.
14. The apparatus of claim 13, further comprising:
and the list generation module is configured to match and store the channel identifier and the channel information into a preset channel mapping table for the query submodule to use when processing a subsequent APK downloading request.
15. The apparatus of any one of claims 9 to 14, wherein
The APK downloading request comprises a uniform resource locator of the requested APK of the http protocol, and the channel identifier is located at a preset field of the uniform resource locator.
16. The apparatus of claim 15, wherein the download response module is further configured to:
attaching the channel information to the end of the APK file;
calculating the data length of the channel information;
and adding the data length to a content length value in an HTTP data packet header sent to the request source.
17. A NGINX server configured to be arranged with the apparatus for providing APK download according to claim 9.
CN201410724824.3A 2014-12-02 2014-12-02 Method and device for providing APK download and NGINX server Active CN105718276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410724824.3A CN105718276B (en) 2014-12-02 2014-12-02 Method and device for providing APK download and NGINX server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410724824.3A CN105718276B (en) 2014-12-02 2014-12-02 Method and device for providing APK download and NGINX server

Publications (2)

Publication Number Publication Date
CN105718276A CN105718276A (en) 2016-06-29
CN105718276B true CN105718276B (en) 2020-12-11

Family

ID=56146755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410724824.3A Active CN105718276B (en) 2014-12-02 2014-12-02 Method and device for providing APK download and NGINX server

Country Status (1)

Country Link
CN (1) CN105718276B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775643B (en) * 2016-11-22 2020-03-17 武汉斗鱼网络科技有限公司 Application file packaging system and method with channel data
CN108228246B (en) * 2016-12-14 2021-07-27 北京国双科技有限公司 Method and device for generating application installation package
CN107147750A (en) * 2017-07-21 2017-09-08 广州爱九游信息技术有限公司 Upload, packing apparatus and service platform, download server and distribution method
CN107395616B (en) * 2017-08-14 2020-10-27 北京奇虎科技有限公司 Method and system for safely processing data file
CN107786644B (en) * 2017-10-11 2021-02-02 五八有限公司 Channel package downloading method, device and equipment
CN107894891A (en) * 2017-11-17 2018-04-10 深圳市泉眼网络科技有限公司 Program packaging method and device and program installation method and device
CN108521349B (en) * 2018-03-15 2020-06-05 福建天泉教育科技有限公司 Method and system for counting installation number of installation packages
CN109582323A (en) * 2018-11-23 2019-04-05 网易(杭州)网络有限公司 Increment updating method, device, terminal and the server of application installation package
CN111488600B (en) * 2020-04-09 2023-03-21 南京维沃软件技术有限公司 Resource processing method, electronic equipment and server
CN114253432B (en) * 2020-09-11 2023-09-08 腾讯科技(深圳)有限公司 Application channel package delivery method and system
CN113094121B (en) * 2021-04-30 2023-03-10 腾讯科技(成都)有限公司 Data processing method, data processing equipment and computer readable storage medium
CN114500515A (en) * 2022-02-16 2022-05-13 厦门元屿安科技有限公司 APK dynamic rewriting method and system based on CDN edge computing network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577762A (en) * 2012-07-23 2014-02-12 北京掌汇天下科技有限公司 Channel marking system and method
CN103729186A (en) * 2013-12-31 2014-04-16 上海网达软件股份有限公司 Method for generating multi-channel apk file packages in batches

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050188203A1 (en) * 2004-02-19 2005-08-25 Jp Mobile Operating L.P. Method for packaging information with digitally signed software without breaking signature
GB2472072B (en) * 2009-07-24 2013-10-16 Hewlett Packard Development Co Deduplication of encoded data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577762A (en) * 2012-07-23 2014-02-12 北京掌汇天下科技有限公司 Channel marking system and method
CN103729186A (en) * 2013-12-31 2014-04-16 上海网达软件股份有限公司 Method for generating multi-channel apk file packages in batches

Also Published As

Publication number Publication date
CN105718276A (en) 2016-06-29

Similar Documents

Publication Publication Date Title
CN105718276B (en) Method and device for providing APK download and NGINX server
CN104503745B (en) A kind of method and apparatus generated using channel packet
TW201826120A (en) Managing, using, and updating application resources
CN105373576B (en) System and method for integrated content streaming in a content-centric network
WO2016045595A2 (en) Router adaptation method and device, and terminal device
CN109829287A (en) Api interface permission access method, equipment, storage medium and device
WO2017000761A1 (en) Method and apparatus for extracting feature information of terminal device
CN111212154B (en) Service binding method, device, terminal, server and storage medium
EP3313041B1 (en) Application download method and device
US20170302681A1 (en) System and method for parallel secure content bootstrapping in content-centric networks
CN108182119B (en) Read-write separation control method and device, storage medium and electronic device
CN107566477A (en) A kind of method and apparatus that file is obtained in distributed file system cluster
CN107197000B (en) Static and dynamic hybrid caching method, device and system
CN112134908B (en) Application adaptation method, server, medium and vehicle-mounted multimedia system
WO2022179353A1 (en) Domain name resolution method and apparatus, and computer device
CN112241298A (en) Page display method and device, storage medium and electronic device
CN104699509A (en) Method and device for downloading application software
CN108134811B (en) Method, device and system for distributing or downloading target file
CN103440281A (en) Method, device and equipment for acquiring download file
CN106446138B (en) Data packet storage method and device
KR20150052544A (en) Operating method of node considering packet characteristics in content centric network and the node
CN109525550B (en) Data message processing method, device and system
CN108228246B (en) Method and device for generating application installation package
CN110933121A (en) Connection establishing method, communication processing method and device and communication equipment
CN112035866B (en) Data encryption method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220819

Address after: No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science and Technology Park, High-tech Zone, Binhai New District, Tianjin 300000

Patentee after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right