CN105718276A - Method and device for providing APK download and NGINX server - Google Patents
Method and device for providing APK download and NGINX server Download PDFInfo
- Publication number
- CN105718276A CN105718276A CN201410724824.3A CN201410724824A CN105718276A CN 105718276 A CN105718276 A CN 105718276A CN 201410724824 A CN201410724824 A CN 201410724824A CN 105718276 A CN105718276 A CN 105718276A
- Authority
- CN
- China
- Prior art keywords
- apk
- channel
- request
- file
- 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.)
- Granted
Links
Abstract
The invention provides a method and a device for providing an APK download and an NGINX server. The method for providing the APK download comprises the steps as follows: an APK download request is obtained; the APK download request comprises a channel identifier of a request source; the channel identifier is extracted from the APK download request; corresponding channel information is determined according to the channel identifier; the channel information corresponds to the channel type of the request source one by one; the channel information is added to an APK file as file comment content of the APK file corresponding to the APK download request; and the APK file added with the file comment content is returned to the request source. By the method and the device, the channel information is added to the end of the APK file corresponding to the download request as the file comment content, so that the APK file does not need to be unpacked when the channel information is added; operation is simple; and the release efficiency of the APK file is improved. A plurality of APK files added with different channel information do not need to be prepared, so that the quantity of the files is reduced; and the storage space is further saved.
Description
Technical field
The present invention relates to mobile Internet field, particularly relate to a kind of method providing APK to download and dress
Put and NGINX server.
Background technology
After the application and development of Android operation system (Android) completes, typically can be packaged into installation kit
(Android Package Kit is called for short APK), android terminal install after downloading, to realize it
Function.Due to the opening of Android, the platform issuing APK is a lot, the most various mobile phones
Application market.When APK is issued by multiple support channels, generally require the information understanding publication channel, in order to
Add up the customer volume of each channel, statistics is enlivened, online data.
Based on above reason, need in APK, add corresponding channel information, prior art is added canal
The method of road information is generally: before issuing APK, online under various channel information are separately added into primary
Bag, generates the APK (hereinafter referred to as channel bag) including each channel information.
Using the scheme of above prior art, on the one hand a lot of due to the quantity of distribution channel, application is more every time
Being required for carrying out the work of substantial amounts of interpolation channel information time new, efficiency is low, directly affects the upper of APK
Linear velocity, on the other hand, after being added into different channel information due to same APK, occurs in that multiple difference
APK occupy substantial amounts of file storage.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide one to overcome the problems referred to above or at least in part
Solve NGINX server and the device providing APK to download of the problems referred to above and and provide APK accordingly
The method downloaded.The present invention one further objective is that APK to be saved adds channel information and enters before issuing
The operation of row, improves the efficiency that APK issues.
The present invention another further objective is that the quantity of APK file to be reduced, it is simple to the management of file.
According to one aspect of the present invention, it is provided that provide the method that APK downloads.This offer APK downloads
Method include: obtaining APK and download request, wherein the APK request of downloading includes the channel mark in request source
Know;In APK downloads request, extract channel mark, and determine the channel letter of correspondence according to channel mark
Breath, wherein channel information and the channel type one_to_one corresponding in request source;Channel information is downloaded as APK
The file notes content of the APK file that request is corresponding is attached in APK file, and returns attached to request source
APK file added with file notes content.
Alternatively, determine that the channel information of correspondence includes according to channel mark: at default channel mapping table
The channel information that middle inquiry is corresponding with channel mark, preserves multiple support channels mark and channel in channel mapping table
The mapping relations of information.
Alternatively, channel mapping table is the hash table using channel mark as key value.
Alternatively, determine that the channel information of correspondence includes according to channel mark: according to default logical operations
Rule calculates channel information to channel mark.
Alternatively, according to default logical operations rule, channel mark is calculated channel information to include: press
According to default AES, channel mark is encrypted calculating, obtains channel and add confidential information;According to default
Hashing algorithm carries out hash and calculates channel mark, obtains channel summary info;Channel is added confidential information and canal
Road summary info is spliced into channel information.
Alternatively, channel is added confidential information and channel summary info be spliced into channel information after also include:
Channel mark and channel information are mated and preserves to the channel mapping table preset, for processing follow-up APK
Use when downloading request.
Alternatively, the APK request of downloading includes the URL of the APK asked of http agreement,
Channel mark is positioned at the preset field of URL.
Alternatively, channel information is downloaded as APK the file notes content of APK file corresponding to request
It is attached in APK file include: channel information is attached to the end of APK file;Calculate channel information
Data length;Content-length value in the HTTP data packet head being sent to request source increases data long
Degree.
According to another aspect of the present invention, a kind of device providing APK to download is additionally provided.This offer
The device that APK downloads includes: acquisition request module, is configured to obtain APK and downloads request, wherein APK
The request of download includes URLs and the channel mark in request source of asked APK;Information is true
Cover half block, be configured to APK download request in extract channel mark, and determine according to channel mark right
The channel information answered, wherein channel information and the channel type one_to_one corresponding in request source;Download respond module,
It is configured to the file notes content using channel information downloads APK file corresponding to request as APK be attached to
In APK file, return the APK file being attached with file notes content to request source.
Alternatively, information determination module includes: inquiry submodule, is configured in default channel mapping table
Inquire about the channel information corresponding with channel mark, channel mapping table is preserved multiple support channels mark and believes with channel
The mapping relations of breath.
Alternatively, channel mapping table is the hash table using channel mark as key value.
Alternatively, information determination module includes: calculating sub module, is configured to according to default logical operations rule
Then channel mark is calculated channel information.
Alternatively, calculating sub module is additionally configured to: be encrypted channel mark according to default AES
Calculate, obtain channel and add confidential information;According to default hashing algorithm, channel mark is carried out hash to calculate,
To channel summary info;Channel is added confidential information and channel summary info is spliced into channel information.
Alternatively, the device that APK provided above downloads also includes: List Generating Module, is configured to canal
Road mark and channel information coupling preserve to the channel mapping table preset, and process follow-up for inquiry submodule
APK uses when downloading request.
Alternatively, the APK request of downloading includes the URL of the APK asked of http agreement,
Channel mark is positioned at the preset field of URL.
Alternatively, download respond module to be additionally configured to: channel information is attached to the end of APK file;
Calculate the data length of channel information;Content-length value in the HTTP data packet head being sent to request source
Middle increase data length.
According to another aspect of the present invention, a kind of NGINX server is additionally provided.This NGINX takes
Business device is configured to be disposed with any one the device of offers APK download described above.
The method that the offer APK of the present invention downloads, utilizes the file format feature of APK, by channel information
It is attached at the end of the APK file downloading request correspondence as file notes content, thus is adding canal
Without unpacking APK file during road information, computing is simple, reduces and adds channel into APK file
Information operating, thus improve APK file efficiency for issuing.
Further, due to the present invention offer APK download method download during, according under
Channel information is added in the request of load, it is not necessary to prepare multiple multiple APK file being added with different channel information,
Decrease quantity of documents, and save memory space further.
Further, the channel information of the APK file of addition, at encryption and hash
The channel data of reason, safety is good, and can effectively reduce the amount of calculation of channel information.
Further, the method that the offer APK of the present invention downloads can utilize NGINX server real
Existing, support the most concurrently to connect, embody higher efficiency.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technology of the present invention
Means, and can being practiced according to the content of description, and in order to allow above and other objects of the present invention,
Feature and advantage can become apparent, below especially exemplified by the detailed description of the invention of the present invention.
According to below in conjunction with the accompanying drawing detailed description to the specific embodiment of the invention, those skilled in the art will
More understand the above-mentioned of the present invention and other purposes, advantage and feature.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit for ability
Territory those of ordinary skill will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred implementation, and also
It is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical
Parts.In the accompanying drawings:
Fig. 1 is the signal of the offer APK download of NGINX server according to an embodiment of the invention
Property Organization Chart;
Fig. 2 is the schematic diagram of the device providing APK to download according to an embodiment of the invention;
Fig. 3 is the schematic diagram of the device providing APK to download in accordance with another embodiment of the present invention;
Fig. 4 is the schematic diagram of the method providing APK to download according to an embodiment of the invention;And
Fig. 5 is the optional flow chart of one of the method providing APK to download according to an embodiment of the invention.
Detailed description of the invention
Algorithm and display be not intrinsic with any certain computer, virtual system or miscellaneous equipment provided herein
Relevant.Various general-purpose systems can also be used together with based on teaching in this.As described above, structure
Make the structure required by this kind of system to be apparent from.Additionally, the present invention is also not for any certain programmed
Language.It is understood that, it is possible to use various programming languages realize the content of invention described herein, and
The description done language-specific above is the preferred forms in order to disclose the present invention.
Fig. 1 is the signal of the offer APK download of NGINX server according to an embodiment of the invention
Property Organization Chart.NGINX (engine x) is a high performance HTTP and Reverse Proxy, its
Possess stability, abundant function collection, sample profile and the feature of low system resources consumption, and also
The ability of sending out shows preferably really in the webpage servomechanism of same type.And, current NGINX day at home
Becoming burning hot, increasing website starts to dispose NGINX.In an embodiment of the present invention, NGINX is used
Server 130, as the network equipment providing APK to download, completes to add while providing download
Add the function of channel information.
In the present embodiment, multiple terminals 110 running on Android system download APK by the Internet request
File, the multiple different channel issuing this APK file that can utilize of android terminal 110 carries out APK literary composition
The download of part, such as 360 mobile phone assistants, Google market broadly fall into these and download channel.The embodiment of the present invention
NGINX server as http server 130, receive various channel send that the APK come downloads please
Ask, and from file server 120, obtain the APK file that the request of download is corresponding, and in this APK file
After adding the channel information of this channel, return this APK file to android terminal 110, complete APK file
Offer downloading task.Compared to existing APK downloading mode, the NGINX of embodiments of the invention
Server 130, overall employing modularized design, when processing APK and downloading request, add additional channel
The function of information, and not download request by straight for the APK file being added with channel information in advance according to APK
Connect and return to android terminal 110.
The NGINX server 130 of the present embodiment is disposed with the device 200 providing APK to download, in order to
There is provided APK file, during downloading, APK file is added channel information.Fig. 2 is according to the present invention one
The schematic diagram of the device 200 that the offer APK of individual embodiment downloads, the device 200 that this offer APK downloads
May include that acquisition request module 210, information determination module 220 in general manner, download respond module 230.
With in upper-part, acquisition request module 210 is configured to obtain APK and downloads request, its APK obtained
The request of download includes URLs and the channel mark in request source of asked APK;Information is true
Cover half block 220 is configured to extract channel mark in APK downloads request, and determines according to channel mark
Corresponding channel information.These channel information and the channel type one_to_one corresponding in request source, and channel information
Can predetermined can also be to calculate according to channel mark.Utilize these channel information permissible
Determine the download channel of APK, for follow-up statistics.Download respond module 230 to be configured to channel
The file notes content that information downloads APK file corresponding to request as APK is attached in APK file,
The APK file being attached with file notes content is returned to request source.Download respond module 230 and utilize APK
The file format feature of file, adds channel letter in the way of file notes content at the end of APK file
Breath, it is not necessary to unpacking APK file, amount of calculation is little, it is simple to complete when providing and downloading.
Fig. 3 is the schematic diagram of the device 200 providing APK to download in accordance with another embodiment of the present invention,
In this embodiment, information determination module 220 can optionally be disposed with inquiry submodule 222 and calculate
Submodule 224, additionally, the device 200 that the offer APK of the present embodiment downloads can optionally increase row
Table generation module 240.
Inquiry submodule 222 and calculating sub module 224 can by be respectively adopted different in the way of determine and APK
Asking the channel information that the channel mark in source is corresponding in download request, wherein, inquiry submodule 222 is configured to
The channel information corresponding with channel mark is inquired about in default channel mapping table.In this channel mapping table permissible
Pre-save the mapping relations one by one of multiple support channels mark and channel information.This channel mapping table can be with
Channel mark is as the hash table of key value so that search speed faster, and the length of hashed value is identical
It is easy to be additional to APK file.
Calculating sub module 224 is configured to, according to default logical operations rule, channel mark is calculated channel
Information.One concrete calculation process alternatively is: be encrypted channel mark according to default AES
Calculate, obtain channel and add confidential information;According to default hashing algorithm, channel mark is carried out hash to calculate,
To channel summary info;Channel is added confidential information and channel summary info is spliced into channel information.Thus calculate
The channel information drawn meet safe and anti-tamper needs.
More than inquiry submodule 222 and calculating sub module 224 can be with the use of, such as a certain channel
Identification information, can first pass through inquiry submodule 222 and inquire about in channel mapping table, if channel maps
When table does not include channel information corresponding to this channel mark, utilize calculating sub module 224 to this channel mark
Calculate, obtain channel information.
After calculating sub module 224 has calculated, it is also possible to the result of calculating is added in channel mapping table,
So that subsequent query uses, then in the case of this, the device 200 that the offer APK of the embodiment of the present invention downloads
List Generating Module 240 be set to channel mark and channel information are mated the channel mapping table preserved to presetting
In, process when follow-up APK downloads request for inquiry submodule 222 and use.Thus each channel mark
It is required to calculate once, substantially increases execution efficiency.
The APK that acquisition request module 210 the obtains request of downloading can include being asked of http agreement
The URL of APK, channel mark is positioned at the preset field of URL, the most right
It is " http://example.com/foo.apk in URL?Channel=360 " APK download
Request, it is possible to obtaining channel mark is 360.
A kind of concrete optional mode downloading the additional channel information of respond module 230 is: channel information is attached
It is added in the end of APK file;Calculate the data length of channel information;At the HTTP being sent to request source
Content-length value in data packet head increases data length.The offer APK utilizing above example downloads
Device 200, the android terminal 110 of user has directly downloaded the APK bag that with the addition of channel information.
The embodiment of the present invention additionally provides a kind of method providing APK to download, the method that this offer APK downloads
Any one device providing APK to download can introduced by above example performs, with raising
The efficiency that APK issues.Fig. 4 is showing of the method that offer APK downloads according to an embodiment of the invention
It is intended to, as it can be seen, the method that this offer APK downloads comprises the following steps:
Step S402, obtains APK and downloads request;
Step S404, APK download request in extract channel mark, and determine according to channel mark right
The channel information answered;
Step S406, downloads the file notes of APK file corresponding to request using channel information as APK
Content is attached in APK file,
Step S408, returns the APK file being attached with file notes content to request source.
Above APK downloads the channel mark that can include request source in request, and this channel mark can be wrapped
Include 360, Google etc., the most optional mode includes the APK asked of http agreement by the APK request of downloading
URL, channel mark is positioned at the preset field of URL., such as
URL is " http://example.com/foo.apk?Channel=360 " APK download please
Ask, it is possible to obtaining channel mark is 360.
The channel information that step S404 is determined and the channel type one_to_one corresponding in request source, it can use
Different modes determines the channel information corresponding with the channel mark asking source in APK download request.Example
Mode as optional in one of which is: utilize the channel mapping table preset inquiry to draw, the most another kind of optional side
Formula is: draw according to channel mark computations.The idiographic flow of the first inquiry mode is: default
Channel mapping table preserves the mapping relations of channel mark and channel information, after determining channel mark,
The channel mapping table preset is inquired about the channel information corresponding with channel mark.The second calculation can be by
According to default logical operations rule, channel mark being calculated channel information, its concrete calculation is for pressing
According to default AES, channel mark is encrypted calculating, obtains channel and add confidential information;According to default
Hashing algorithm carries out hash and calculates channel mark, obtains channel summary info;Channel is added confidential information and canal
Road summary info is spliced into channel information, and such flow process is possible to prevent channel information to be ravesdropping and distorts.
In this case, this channel mapping table can be the hash table using channel mark as key value,
Make to search speed faster, and identical being easy to of the length of hashed value is additional to APK file.Use hash
Table, so that the query script of data is more rapidly effectively, its factor choosing hash function consideration is permissible
Including: calculate hash function required time, the length of keyword, the size of hash table, the distribution of keyword
Situation, the lookup frequency etc. of record.MD5 (Message-Digest can be preferably used in the present embodiment
Algorithm 5, message digest algorithm 5) and the hashing algorithm such as SHA-1 calculate channel information, Qi Zhongyou
Choosing can use MD5 hash function, and channel mark is passed through its irreversible character string mapping algorithm by MD5,
Produce unique MD5 informative abstract as channel information, thus channel mark is mapped as a 128bit
Integer.
Step S404 is encrypted the method for calculating to channel mark can use DEA (Data
Encryption Algorithm, vehicle economy A), channel mark is become same long by series of computation
The ciphertext of degree, only allowing to hold encryption key used could decipher.Can be effective through encryption and hash calculating
Prevent channel information to be tampered.
Channel mark and channel information can be mated and preserve extremely after calculating channel information by step S404
In the channel mapping table preset, use for processing when follow-up APK downloads request.Thus reduce follow-up place
Reason amount of calculation.Namely for a certain channel mark information in the request of step S402 acquisition, can be first
First inquire about in channel mapping table, if channel mapping table does not include the channel information that this channel mark is corresponding
Time, then this channel mark it is encrypted and hashes calculating, obtaining channel information.
The optional flow process of one of step S406 can be: channel information is attached to the end of APK file;
Calculate the data length of channel information;Content-length value in the HTTP data packet head being sent to request source
Middle increase data length.Owing to APK file belongs to zip form, zip file form therefore can be utilized
The additional channel information of feature.
Zip file is made up of three parts: the file content source data of compression, the catalogue source data of compression, mesh
Record terminates mark structure, and wherein catalogue terminates the ending identifying structure existence with whole file, for labelling pressure
The end of the catalogue data of contracting.The end terminating to identify structure division in catalogue generally comprises: annotation length
(Comment length), notes content (Comment).Channel information is placed as file notes
At the end of APK file, neither affect the data of of APK file itself, also need not be to APK file
Carry out unpacking, pressing package operation.
Fig. 5 is the optional flow chart of one of the method providing APK to download according to an embodiment of the invention,
The offer of the present embodiment is provided receive the download request of 360 mobile phone assistants by NGINX server as a example by
The flow process of the method that APK downloads:
Step S502, NGINX server gets APK and downloads request;
Step S504, from download request request URL obtain channel mark information, such as
“http://example.com/foo.apk?Channel=360 " request URL, NGINX server is permissible
Determine channel mark " 360 ";
Step S506, with channel mark as key value (KEY), at preset hash table (HASH
Table) in search whether to should the channel information of channel mark, perform step S508 if not, if inquiry
Go out the channel information of correspondence, enter step S512;
Step S508, generates channel information with this channel mark for input according to pre-defined algorithm, its calculation used
Method can be to be encrypted channel mark with DES symmetric encryption method, uses MD5 algorithm to channel
Mark calculates summary info, carries out splicing as channel information information and the summary info of encryption, thus has
Effect prevents channel information to be ravesdropping and distorts;
Step S510, is stored in the channel information of generation in HASH table for KEY with channel mark.
Step S512, calculates the length of channel information;
Step S514, " Content-Length " value at the data packet head returning to download request source adds canal
The length of road information;
Step S516, NGINX server returns, to downloading request source, the APK file bag asked;
Step S518, is sent to download request source using channel information as the notes content of APK file bag.
The loading source of APK file obtain above be added with channel information after, can more easily perform
While correlation function, it is achieved the statistics of publication channel.
The method that the offer APK of the present invention downloads, utilizes the file format feature of APK, by channel information
It is attached at the end of the APK file downloading request correspondence as file notes content, thus is adding canal
Without unpacking APK file during road information, computing is simple, reduces and adds channel into APK file
Information operating, thus improve APK file efficiency for issuing.And owing to the offer APK of the present invention downloads
Method download during, according to download request add channel information, it is not necessary to prepare multiple being added with not
With multiple APK file of channel information, decrease quantity of documents, and save memory space further.
Further, the channel information of the APK file of addition, preferably past encryption and the canal of hashing
Track data, safety is good, and can effectively reduce the amount of calculation of channel information.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that this
Bright embodiment can be put into practice in the case of not having these details.In some instances, the most in detail
Known method, structure and technology are shown, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure help to understand in each inventive aspect one or
Multiple, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is sometimes by one
Rise and be grouped in single embodiment, figure or descriptions thereof.But, should be by the method for the disclosure
It is construed to reflect an intention that i.e. the present invention for required protection requires than institute in each claim clearly
The more feature of feature recorded.More precisely, as the following claims reflect, send out
Bright aspect is all features less than single embodiment disclosed above.Therefore, it then follows detailed description of the invention
Claims be thus expressly incorporated in this detailed description of the invention, the conduct of the most each claim itself
The independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out adaptive to the module in the equipment in embodiment
Change to answering property and they are arranged in one or more equipment different from this embodiment.Can be reality
Execute the module in example or unit or assembly is combined into a module or unit or assembly, and in addition can be it
Be divided into multiple submodule or subelement or sub-component.Except in such feature and/or process or unit
Outside at least some excludes each other, can use any combination that (this specification being included, adjoint right is wanted
Ask, make a summary and accompanying drawing) disclosed in all features and so disclosed any method or equipment all
Process or unit are combined.Unless expressly stated otherwise, this specification (include adjoint claim,
Summary and accompanying drawing) disclosed in each feature can by provide identical, equivalent or the alternative features of similar purpose
Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other
Some feature included in embodiment rather than further feature, but the combination meaning of the feature of different embodiment
Taste and is within the scope of the present invention and is formed different embodiments.Such as, in detail in the claims,
One of arbitrarily can mode using in any combination of embodiment required for protection.
The all parts embodiment of the present invention can realize with hardware, or with at one or more processor
The software module of upper operation realizes, or realizes with combinations thereof.It will be understood by those of skill in the art that
Microprocessor or digital signal processor (DSP) can be used in practice to realize according to the present invention real
The some or all functions of the some or all parts in the device of the offer APK download executing example.This
Invention be also implemented as part or all equipment for performing method as described herein or
Device program (such as, computer program and computer program).Such program realizing the present invention
Can store on a computer-readable medium, or can be to have the form of one or more signal.So
Signal can download from internet website and obtain, or provide on carrier signal, or with any its
He provides form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and
And those skilled in the art can design replacement enforcement without departing from the scope of the appended claims
Example.In the claims, any reference marks that should not will be located between bracket is configured to claim
Limit.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims.Before being positioned at element
Word "a" or "an" do not exclude the presence of multiple such element.If the present invention can be by means of including
The hardware of dry different elements and realizing by means of properly programmed computer.If listing equipment for drying
In unit claim, several in these devices can be specifically to be embodied by same hardware branch.
Word first, second and third use do not indicate that any order.These word explanations can be run after fame
Claim.
So far, although those skilled in the art will appreciate that and the most detailed illustrate and describing the present invention's
Multiple exemplary embodiments, but, without departing from the spirit and scope of the present invention, still can be according to this
Disclosure of invention directly determines or derives other variations or modifications of many meeting the principle of the invention.Cause
This, the scope of the present invention is it is understood that and regard as covering other variations or modifications all these.
Embodiments provide A1. method providing APK to download, including:
Obtaining APK and download request, the wherein said APK request of downloading includes the channel mark in request source;
In described APK downloads request, extract described channel mark, and determine according to described channel mark
The channel type one_to_one corresponding in corresponding channel information, wherein said channel information and described request source;
Described channel information is downloaded as described APK the file notes content of APK file corresponding to request
It is attached in described APK file, and return is attached with described file notes content to described request source
APK file.
A2. according to the method described in A1, wherein, the channel letter of correspondence is determined according to described channel mark
Breath includes:
Inquiring about the channel information corresponding with described channel mark in default channel mapping table, described channel reflects
Firing table is preserved the mapping relations of multiple support channels mark and channel information.
A3. according to the method described in A2, wherein
Described channel mapping table is the hash table using described channel mark as key value.
A4. according to the method described in A1, wherein, the channel letter of correspondence is determined according to described channel mark
Breath includes:
According to default logical operations rule, described channel mark is calculated described channel information.
A5. according to the method described in A4, wherein, according to default logical operations rule to described channel mark
Knowledge calculates described channel information and includes:
According to default AES, described channel mark is encrypted calculating, obtains channel and add confidential information;
According to default hashing algorithm, described channel mark is carried out hash to calculate, obtain channel summary info;
Described channel is added confidential information and described channel summary info is spliced into described channel information.
A6. according to the method described in A5, wherein, described channel is being added confidential information and described channel summary
Information also includes after being spliced into described channel information:
Described channel mark and described channel information are mated and preserves to the channel mapping table preset, for place
Manage when follow-up APK downloads request and use.
A7. according to the method according to any one of A1 to A6, wherein
The described APK request of downloading includes the URL of the APK asked of http agreement,
Described channel mark is positioned at the preset field of described URL.
A8. according to the method described in A7, wherein, described channel information is downloaded request as described APK
The file notes content of corresponding APK file is attached in described APK file include:
Described channel information is attached to the end of described APK file;
Calculate the data length of described channel information;
Content-length value in the HTTP data packet head being sent to described request source increases described data
Length.
B9., the device that BPK downloads is provided, including:
Acquisition request module, is configured to obtain BPK and downloads request, and wherein said BPK downloads in request and wraps
Include URLs and the channel mark in request source of asked BPK;
Information determination module, is configured to extract described channel mark, and root in described BPK downloads request
The canal in the channel information of correspondence, wherein said channel information and described request source is determined according to described channel mark
Road type one_to_one corresponding;
Download respond module, be configured to as described BPK, described channel information is downloaded request correspondence
The file notes content of BPK file is attached on described BPK file, returns to described request source and is attached with
The BPK file of described file notes content.
B10. according to the device described in B9, wherein said information determination module includes:
Inquiry submodule, is configured in default channel mapping table inquire about the canal corresponding with described channel mark
Road information, preserves the mapping relations of multiple support channels mark and channel information in described channel mapping table.
B11. according to the device described in B10, wherein
Described channel mapping table is the hash table using described channel mark as key value.
B12. according to the device described in B10, wherein said information determination module includes:
Calculating sub module, is configured to, according to default logical operations rule, described channel mark is calculated institute
State channel information.
B13. according to the device described in B12, wherein said calculating sub module is additionally configured to:
According to default AES, described channel mark is encrypted calculating, obtains channel and add confidential information;
According to default hashing algorithm, described channel mark is carried out hash to calculate, obtain channel summary info;
Described channel is added confidential information and described channel summary info is spliced into described channel information.
B14. according to the device described in B13, also include:
List Generating Module, is configured to described channel mark and described channel information are mated what preservation was extremely preset
In channel mapping table, process when follow-up APK downloads request for described inquiry submodule and use.
B15. according to the device according to any one of B9 to B14, wherein
The described APK request of downloading includes the URL of the APK asked of http agreement,
Described channel mark is positioned at the preset field of described URL.
B16. according to the device described in B15, wherein said download respond module is additionally configured to:
Described channel information is attached to the end of described APK file;
Calculate the data length of described channel information;
Content-length value in the HTTP data packet head being sent to described request source increases described data
Length.
C17. a NGINX server, is configured to be disposed with according to arbitrary in claim B9 to B16
The device that offer APK described in Xiang downloads.
Claims (10)
1. the method that APK downloads is provided, including:
Obtaining APK and download request, the wherein said APK request of downloading includes the channel mark in request source;
In described APK downloads request, extract described channel mark, and determine according to described channel mark
The channel type one_to_one corresponding in corresponding channel information, wherein said channel information and described request source;
Described channel information is downloaded as described APK the file notes content of APK file corresponding to request
It is attached in described APK file, and return is attached with described file notes content to described request source
APK file.
Method the most according to claim 1, wherein, determines the canal of correspondence according to described channel mark
Road information includes:
Inquiring about the channel information corresponding with described channel mark in default channel mapping table, described channel reflects
Firing table is preserved the mapping relations of multiple support channels mark and channel information.
Method the most according to claim 2, wherein
Described channel mapping table is the hash table using described channel mark as key value.
Method the most according to claim 1, wherein, determines the canal of correspondence according to described channel mark
Road information includes:
According to default logical operations rule, described channel mark is calculated described channel information.
Method the most according to claim 4, wherein, according to default logical operations rule to described canal
Road mark calculates described channel information and includes:
According to default AES, described channel mark is encrypted calculating, obtains channel and add confidential information;
According to default hashing algorithm, described channel mark is carried out hash to calculate, obtain channel summary info;
Described channel is added confidential information and described channel summary info is spliced into described channel information.
Method the most according to claim 5, wherein, is adding confidential information and described channel by described channel
Summary info also includes after being spliced into described channel information:
Described channel mark and described channel information are mated and preserves to the channel mapping table preset, for place
Manage when follow-up APK downloads request and use.
Method the most according to any one of claim 1 to 6, wherein
The described APK request of downloading includes the URL of the APK asked of http agreement,
Described channel mark is positioned at the preset field of described URL.
Method the most according to claim 7, wherein, using described channel information as under described APK
The file notes content carrying APK file corresponding to request is attached in described APK file include:
Described channel information is attached to the end of described APK file;
Calculate the data length of described channel information;
Content-length value in the HTTP data packet head being sent to described request source increases described data
Length.
9. the device that APK downloads is provided, including:
Acquisition request module, is configured to obtain APK and downloads request, and wherein said APK downloads in request and wraps
Include URLs and the channel mark in request source of asked APK;
Information determination module, is configured to extract described channel mark, and root in described APK downloads request
The canal in the channel information of correspondence, wherein said channel information and described request source is determined according to described channel mark
Road type one_to_one corresponding;
Download respond module, be configured to as described APK, described channel information is downloaded request correspondence
The file notes content of APK file is attached in described APK file, returns to described request source and is attached with
The APK file of described file notes content.
10. a NGINX server, is configured to be disposed with offer APK according to claim 9
The device downloaded.
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 true CN105718276A (en) | 2016-06-29 |
CN105718276B 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) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775643A (en) * | 2016-11-22 | 2017-05-31 | 武汉斗鱼网络科技有限公司 | A kind of application file packaging system and method with channel data |
CN107147750A (en) * | 2017-07-21 | 2017-09-08 | 广州爱九游信息技术有限公司 | Upload, packing apparatus and service platform, download server and distribution method |
CN107786644A (en) * | 2017-10-11 | 2018-03-09 | 五八有限公司 | Method for down loading, device and the equipment of channel bag |
CN107894891A (en) * | 2017-11-17 | 2018-04-10 | 深圳市泉眼网络科技有限公司 | Program packaging method and device and program installation method and device |
CN108228246A (en) * | 2016-12-14 | 2018-06-29 | 北京国双科技有限公司 | The generation method and device of a kind of application installation package |
CN108521349A (en) * | 2018-03-15 | 2018-09-11 | 福建天泉教育科技有限公司 | A kind of method and system of the installation number of statistics installation kit |
WO2019033751A1 (en) * | 2017-08-14 | 2019-02-21 | 北京奇虎科技有限公司 | Method and system for performing security processing on data file |
CN109582323A (en) * | 2018-11-23 | 2019-04-05 | 网易(杭州)网络有限公司 | Increment updating method, device, terminal and the server of application installation package |
CN111488600A (en) * | 2020-04-09 | 2020-08-04 | 南京维沃软件技术有限公司 | Resource processing method, electronic equipment and server |
CN113094121A (en) * | 2021-04-30 | 2021-07-09 | 腾讯科技(成都)有限公司 | Data processing method, data processing equipment and computer readable storage medium |
CN114253432A (en) * | 2020-09-11 | 2022-03-29 | 腾讯科技(深圳)有限公司 | Application channel package delivery method and system |
CN114500515A (en) * | 2022-02-16 | 2022-05-13 | 厦门元屿安科技有限公司 | APK dynamic rewriting method and system based on CDN edge computing network |
Citations (4)
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 |
US20110022718A1 (en) * | 2009-07-24 | 2011-01-27 | Evans Nigel Ronald | Data Deduplication Apparatus and Method for Storing Data Received in a Data Stream From a Data Store |
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 |
-
2014
- 2014-12-02 CN CN201410724824.3A patent/CN105718276B/en active Active
Patent Citations (4)
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 |
US20110022718A1 (en) * | 2009-07-24 | 2011-01-27 | Evans Nigel Ronald | Data Deduplication Apparatus and Method for Storing Data Received in a Data Stream From a Data Store |
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 |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775643A (en) * | 2016-11-22 | 2017-05-31 | 武汉斗鱼网络科技有限公司 | A kind of application file packaging system and method with channel data |
CN106775643B (en) * | 2016-11-22 | 2020-03-17 | 武汉斗鱼网络科技有限公司 | Application file packaging system and method with channel data |
CN108228246A (en) * | 2016-12-14 | 2018-06-29 | 北京国双科技有限公司 | The generation method and device of a kind of application installation package |
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 |
WO2019033751A1 (en) * | 2017-08-14 | 2019-02-21 | 北京奇虎科技有限公司 | Method and system for performing security processing on data file |
CN107786644B (en) * | 2017-10-11 | 2021-02-02 | 五八有限公司 | Channel package downloading method, device and equipment |
CN107786644A (en) * | 2017-10-11 | 2018-03-09 | 五八有限公司 | Method for down loading, device and the equipment of channel bag |
CN107894891A (en) * | 2017-11-17 | 2018-04-10 | 深圳市泉眼网络科技有限公司 | Program packaging method and device and program installation method and device |
CN108521349A (en) * | 2018-03-15 | 2018-09-11 | 福建天泉教育科技有限公司 | A kind of method and system of the installation number of statistics installation kit |
CN109582323A (en) * | 2018-11-23 | 2019-04-05 | 网易(杭州)网络有限公司 | Increment updating method, device, terminal and the server of application installation package |
CN111488600A (en) * | 2020-04-09 | 2020-08-04 | 南京维沃软件技术有限公司 | Resource processing method, electronic equipment and server |
CN111488600B (en) * | 2020-04-09 | 2023-03-21 | 南京维沃软件技术有限公司 | Resource processing method, electronic equipment and server |
CN114253432A (en) * | 2020-09-11 | 2022-03-29 | 腾讯科技(深圳)有限公司 | Application channel package delivery method and system |
CN114253432B (en) * | 2020-09-11 | 2023-09-08 | 腾讯科技(深圳)有限公司 | Application channel package delivery method and system |
CN113094121A (en) * | 2021-04-30 | 2021-07-09 | 腾讯科技(成都)有限公司 | Data processing method, data processing equipment and computer readable storage medium |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN105718276B (en) | 2020-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105718276A (en) | Method and device for providing APK download and NGINX server | |
US8645355B2 (en) | Mapping Uniform Resource Locators of different indexes | |
CN108647527B (en) | File packing method, file packing device, file unpacking device and network equipment | |
CN103177210B (en) | A kind of method implanting dynamic stain analysis module in Android | |
US9613156B2 (en) | Cookie information sharing method and system | |
US9407726B1 (en) | Caching objects identified by dynamic resource identifiers | |
TW201729089A (en) | Method for generating and installing trusted application for use in a trusted execution environment | |
CN113079200A (en) | Data processing method, device and system | |
EP2778968B1 (en) | Mobile telecommunication device remote access to cloud-based or virtualized database systems | |
CN107172070A (en) | Resource access processing method and device | |
CN108268609A (en) | A kind of foundation of file path, access method and device | |
WO2020211493A1 (en) | Data verification method, system, apparatus and device in block chain account book | |
CN107797823A (en) | Business Rule Management method, apparatus, storage medium and computer equipment | |
JP2018519575A (en) | Page jump based on text hiding | |
CN107566477A (en) | A kind of method and apparatus that file is obtained in distributed file system cluster | |
CN109327479A (en) | Encrypt recognition methods and the device of stream | |
WO2021082661A1 (en) | Webpage screenshot capturing method, apparatus and device | |
CN111563015B (en) | Data monitoring method and device, computer readable medium and terminal equipment | |
CN108021564A (en) | A kind of method and apparatus of page reorientation | |
CN104901822B (en) | A kind of tracking and device of application program communication process | |
CN102970380B (en) | Obtain method and the cloud storage server of the media data of cloud storage file | |
CN112241298A (en) | Page display method and device, storage medium and electronic device | |
CN103379145B (en) | The method, apparatus and system of information processing | |
CN110046000A (en) | Small routine operation method and device | |
CN111596920A (en) | File compiling method and device, compiling equipment and 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 |