Embodiment
It should be noted that, in the situation that not conflicting, embodiment and the feature in embodiment in the application can combine mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
In order to make those skilled in the art person understand better the present invention program, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, the term " first " in specification of the present invention and claims and above-mentioned accompanying drawing, " second " etc. are for distinguishing similar object, and needn't be for describing specific order or precedence.Should be appreciated that the data of such use are suitably exchanging in situation, so that embodiments of the invention described herein.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, for example, those steps or unit that the process that has comprised series of steps or unit, method, system, product or equipment are not necessarily limited to clearly list, but can comprise clearly do not list or for these processes, method, product or equipment intrinsic other step or unit.
The embodiment of the present invention provides the download process device of Zip compressed package in a kind of application program, and this device can be realized its function by computer equipment.
Fig. 1 is according to the structural representation of the download process device of Zip compressed package in the application program of first embodiment of the invention.As shown in Figure 1, in this application program, the download process device of Zip compressed package comprises: the first acquiring unit 10, second acquisition unit 20, first are revised unit 30 and download unit 40.
The first acquiring unit 10 is for obtaining the Xap compressed package of application program.
When application program update, need to obtain the Xap compressed package in application program, can be to download from the server of application program, in order to upgrade application program.The application program here can be Silverlight program.
Second acquisition unit 20 is for obtaining the Zip compressed package of Xap compressed package.
During due to renewal application program, the Zip compressed package that need to upgrade Xap compressed package and be associated with Xap compressed package, therefore, after the Xap compressed package in obtaining application program, obtains the Zip compressed package in Xap compressed package.The Zip compressed package obtaining in Xap compressed package can be the address of quoting Zip compressed package that obtains the configuration file record in Xap compressed package, then finds all Zip compressed package associated with Xap compressed package according to this address.
First revises unit 30 for the suffix of Zip compressed package is revised as to default suffix.
After Zip compressed package in obtaining Xap compressed package, the suffix name of the Zip compressed package that Xap compressed package is associated is changed.Because there is different suffix names in its corresponding capital of different files, for example the suffix of Zip compressed package can be " Zip ", the suffix of Xap compressed package can be " Xap ", the suffix of the Zip compressed package in Xap compressed package is revised as to default suffix, the suffix name of the file that this default suffix can be default settings can be suffix name arbitrarily.For example, the suffix that can preset amended Zip compressed package is " gszip ", when its original suffix is " Zip ", the suffix of Zip compressed package is changed to " gszip " by " Zip ".It can be that the suffix of all Zip compressed packages that Xap compressed package is associated is all revised as default suffix that the suffix of Zip compressed package is revised as to default suffix.
Download unit 40 is for downloading the Zip compressed package that is revised as default suffix.
After revising the suffix of Zip compressed package, download the Zip compressed package that is revised as default suffix.Owing to just the suffix of Zip compressed package being modified, its file content is not done any change, therefore the file in the Zip compressed package that is revised as default suffix of downloading is identical with the file in the Zip compressed package of revising before suffix, when using this Zip compressed package application programs to upgrade, there will not be abnormal.
According to the embodiment of the present invention, after obtaining the Zip compressed package in Xap compressed package, Zip compressed package is revised as to default suffix, because telecom operators are when kidnapping file, can kidnap according to specific suffix name, when revising Zip compressed package for after presetting suffix, can walk around telecom operators, by download, be revised as the Zip compressed package of default suffix, to avoid, because telecom operators' abduction causes downloading the problem that Zip compressed package is easily made mistakes, downloading thereby reach the effect that Zip compressed package is not made mistakes.
Fig. 2 is according to the structural representation of the download process device of Zip compressed package in the application program of second embodiment of the invention.In the application program of this embodiment, the download process device of Zip compressed package can be used as a kind of preferred implementation of above-described embodiment.As shown in Figure 2, in this application program, the download process device of Zip compressed package comprises: the first acquiring unit 10, second acquisition unit 20, first are revised unit 30 and download unit 40, wherein, second acquisition unit 20 comprises decompression module 201, read module 202 and searches module 203.It is all identical with download unit 40 functions with the first acquiring unit 10, the first modification unit 30 shown in Fig. 1 with download unit 40 that the first acquiring unit 10, first is revised unit 30, do not repeat here.
Decompression module 201 is for decompress(ion) Xap compressed package.
When each Xap compressed package upgrades, decompress(ion) Xap compressed package, can be automatic decompress(ion) Xap compressed package.Owing to recording the address of the Zip compressed package that this Xap compressed package quotes in the built-in configuration file of Xap compressed package, therefore Xap compressed package is carried out to decompress(ion), so that read the address of Zip compressed package.
Read module 202 is for reading the address of quoting Zip compressed package of recording in the configuration file of the Xap compressed package after decompress(ion).
After decompress(ion) Xap compressed package, read the address that records the Zip compressed package that this Xap compressed package quotes in the built-in configuration file of Xap compressed package.This address can be the true address in the server of application program, by this address, can find the original Zip compressed package associated with Xap compressed package.
Search module 203 for by all Zip compressed packages associated with Xap compressed package of address search.
After the address of quoting Zip compressed package of recording in the configuration file in the Xap compressed package after reading decompress(ion), by the address of reading, find all Zip compressed packages associated with Xap compressed package, so that the suffix name of this Zip compressed package is correspondingly processed.
Fig. 3 is according to the structural representation of the download process device of Zip compressed package in the application program of third embodiment of the invention.In the application program of this embodiment, the download process device of Zip compressed package can be used as a kind of preferred implementation of above-described embodiment.As shown in Figure 3, in this application program, the download process device of Zip compressed package comprises: the first acquiring unit 10, second acquisition unit 20, first are revised unit 30, download unit 40, the 3rd acquiring unit 50 and the second modification unit 60, wherein, second acquisition unit 20 comprises decompression module 201, read module 202 and searches module 203.The first acquiring unit 10, second acquisition unit 20, first revised unit 30 and download unit 40 and the first acquiring unit 10 shown in Fig. 2, second acquisition unit 20, the first modification unit 30 is all identical with download unit 40 functions, do not repeat here.
The 3rd acquiring unit 50 is for after being revised as the suffix of Zip compressed package default suffix, the address that obtains amended Zip compressed package.
Due to after the suffix of Zip compressed package being revised as to default suffix, the address of corresponding Zip compressed package likely can change, and the address that therefore obtains amended Zip compressed package, so that be again stored in this address in the configuration file of Xap compressed package.
Second revises unit 60 is revised as the address of amended Zip compressed package for the address that configuration file is recorded.
During due to use application program, can first from server, obtain Xap compressed package, and download by the built-in configuration file of Xap compressed package the Zip compressed package being associated, therefore the address of amended Zip compressed package need to be revised as in the address of the Zip compressed package recording in configuration file, thereby avoid makeing mistakes and causing Zip compressed package to download the problem of makeing mistakes due to the address of Zip compressed package.
Preferably, in the application program of the embodiment of the present invention, Zip compressed package download process device also comprises memory cell and compression unit.
Memory cell, for after the address of amended Zip compressed package is revised as in the address that configuration file is recorded, is preserved amended configuration file.
The address of Zip compressed package is revised as to the address of revising the Zip compressed package after suffix name, has completed the modification to the configuration file of Xap compressed package, after revising good this configuration file, amended configuration file is stored.
Compression unit is for again compressing the Xap compressed package of revising after configuration file.
After configuration file is revised and stored, again compress amended Xap compressed package and form new Xap compressed package, thus can be for the renewal of application program.
Preferably, the application program of the embodiment of the present invention is Silverlight program, and wherein, first revises unit 30 comprises modified module, and this modified module is for being revised as gszip by the suffix of Zip compressed package.
The embodiment of the present invention also provides the download process method of Zip compressed package in a kind of application program.The method may operate on computer.It should be noted that, in the application program that in the application program of the embodiment of the present invention, the download process method of Zip compressed package can provide by the embodiment of the present invention, the download process device of Zip compressed package is carried out, the download process method of Zip compressed package in the application program that in the application program of the embodiment of the present invention, the download process device of Zip compressed package also can provide for the execution embodiment of the present invention.
Fig. 4 is according to the flow chart of the download process method of Zip compressed package in the application program of first embodiment of the invention.As shown in Figure 4, in this application program, the download process method of Zip compressed package comprises that step is as follows:
Step S101, obtains the Xap compressed package in application program.
When application program update, need to obtain the Xap compressed package in application program, can be to download from the server of application program, in order to upgrade application program.The application program here can be Silverlight program.
Step S102, obtains the Zip compressed package in Xap compressed package.
During due to renewal application program, the Zip compressed package that need to upgrade Xap compressed package and be associated with Xap compressed package, therefore, after the Xap compressed package in obtaining application program, obtains the Zip compressed package in Xap compressed package.The Zip compressed package obtaining in Xap compressed package can be the address of quoting Zip compressed package that obtains the configuration file record in Xap compressed package, then finds all Zip compressed package associated with Xap compressed package according to this address.
Step S103, is revised as default suffix by the suffix of Zip compressed package.
After Zip compressed package in obtaining Xap compressed package, the suffix name of the Zip compressed package that Xap compressed package is associated is changed.Because there is different suffix names in its corresponding capital of different files, for example the suffix of Zip compressed package can be " Zip ", the suffix of Xap compressed package can be " Xap ", the suffix of the Zip compressed package in Xap compressed package is revised as to default suffix, the suffix name of the file that this default suffix can be default settings can be suffix name arbitrarily.For example, the suffix that can preset amended Zip compressed package is " gszip ", when its original suffix is " Zip ", the suffix of Zip compressed package is changed to " gszip " by " Zip ".It can be that the suffix of all Zip compressed packages that Xap compressed package is associated is all revised as default suffix that the suffix of Zip compressed package is revised as to default suffix.
Step S104, downloads the Zip compressed package that is revised as default suffix.
After revising the suffix of Zip compressed package, download the Zip compressed package that is revised as default suffix.Owing to just the suffix of Zip compressed package being modified, its file content is not done any change, therefore the file in the Zip compressed package that is revised as default suffix of downloading is identical with the file in the Zip compressed package of revising before suffix, when using this Zip compressed package application programs to upgrade, there will not be abnormal.
According to the embodiment of the present invention, after obtaining the Zip compressed package in Xap compressed package, Zip compressed package is revised as to default suffix, because telecom operators are when kidnapping file, can kidnap according to specific suffix name, when revising Zip compressed package for after presetting suffix, can walk around telecom operators, by download, be revised as the Zip compressed package of default suffix, to avoid, because telecom operators' abduction causes downloading the problem that Zip compressed package is easily made mistakes, downloading thereby reach the effect that Zip compressed package is not made mistakes.
Fig. 5 is according to the flow chart of the download process method of Zip compressed package in the application program of second embodiment of the invention.In the application program of this embodiment, the download process method of Zip compressed package can be used as a kind of preferred implementation of the download process method of Zip compressed package in the application program of above-described embodiment.As shown in Figure 5, in this application program, the download process method of Zip compressed package comprises that step is as follows:
Step S201, obtains the Xap compressed package in application program.
When application program update, need to obtain the Xap compressed package in application program, can be to download from the server of application program, can be also to obtain from local cache, in order to upgrade application program.The application program here can be Silverlight program.
Step S202, decompress(ion) Xap compressed package.
When each Xap compressed package upgrades, decompress(ion) Xap compressed package, can be automatic decompress(ion) Xap compressed package.Owing to recording the address of the Zip compressed package that this Xap compressed package quotes in the built-in configuration file of Xap compressed package, therefore Xap compressed package is carried out to decompress(ion), so that read the address of Zip compressed package.
Step S203, reads the address of quoting Zip compressed package of recording in the configuration file in the Xap compressed package after decompress(ion).
After decompress(ion) Xap compressed package, read the address that records the Zip compressed package that this Xap compressed package quotes in the built-in configuration file of Xap compressed package.This address can be the true address in the server of application program, by this address, can find the original Zip compressed package associated with Xap compressed package.
Step S204, by all Zip compressed packages associated with Xap compressed package of address search.
After the address of quoting Zip compressed package of recording in the configuration file in the Xap compressed package after reading decompress(ion), by the address of reading, find all Zip compressed packages associated with Xap compressed package, so that the suffix name of this Zip compressed package is correspondingly processed.
Step S205, is revised as default suffix by the suffix of Zip compressed package.
After Zip compressed package in obtaining Xap compressed package, the suffix name of the Zip compressed package that Xap compressed package is associated is changed.Because there is different suffix names in its corresponding capital of different files, for example the suffix of Zip compressed package can be " Zip ", the suffix of Xap compressed package can be " Xap ", the suffix of the Zip compressed package in Xap compressed package is revised as to default suffix, the suffix name of the file that this default suffix can be default settings can be suffix name arbitrarily.For example, the suffix that can preset amended Zip compressed package is " gszip ", when its original suffix is " Zip ", the suffix of Zip compressed package is changed to " gszip " by " Zip ".It can be that the suffix of all Zip compressed packages that Xap compressed package is associated is all revised as default suffix that the suffix of Zip compressed package is revised as to default suffix.
Step S206, downloads the Zip compressed package that is revised as default suffix.
After revising the suffix of Zip compressed package, download the Zip compressed package that is revised as default suffix.Owing to just the suffix of Zip compressed package being modified, its file content is not done any change, therefore the file in the Zip compressed package that is revised as default suffix of downloading is identical with the file in the Zip compressed package of revising before suffix, when using this Zip compressed package application programs to upgrade, there will not be abnormal.
Fig. 6 is according to the flow chart of the download process method of Zip compressed package in the application program of third embodiment of the invention.In the application program of this embodiment, the download process method of Zip compressed package can be used as a kind of preferred implementation of the download process method of Zip compressed package in the application program of above-described embodiment.As shown in Figure 6, in this application program, the download process method of Zip compressed package comprises that step is as follows:
Step S301, obtains the Xap compressed package in application program.
When application program update, need to obtain the Xap compressed package in application program, can be to download from the server of application program, can be also to obtain from local cache, in order to upgrade application program.The application program here can be Silverlight program.
Step S302, decompress(ion) Xap compressed package.
When each Xap compressed package upgrades, decompress(ion) Xap compressed package, can be automatic decompress(ion) Xap compressed package.Owing to recording the address of the Zip compressed package that this Xap compressed package quotes in the built-in configuration file of Xap compressed package, therefore Xap compressed package is carried out to decompress(ion), so that read the address of Zip compressed package.
Step S303, reads the address of quoting Zip compressed package of recording in the configuration file in the Xap compressed package after decompress(ion).
After decompress(ion) Xap compressed package, read the address that records the Zip compressed package that this Xap compressed package quotes in the built-in configuration file of Xap compressed package.This address can be the true address in the server of application program, by this address, can find the original Zip compressed package associated with Xap compressed package.
Step S304, by all Zip compressed packages associated with Xap compressed package of address search.
After the address of quoting Zip compressed package of recording in the configuration file in the Xap compressed package after reading decompress(ion), by the address of reading, find all Zip compressed packages associated with Xap compressed package, so that the suffix name of this Zip compressed package is correspondingly processed.
Step S305, is revised as default suffix by the suffix of Zip compressed package.
After Zip compressed package in obtaining Xap compressed package, the suffix name of the Zip compressed package that Xap compressed package is associated is changed.Because there is different suffix names in its corresponding capital of different files, for example the suffix of Zip compressed package can be " Zip ", the suffix of Xap compressed package can be " Xap ", the suffix of the Zip compressed package in Xap compressed package is revised as to default suffix, the suffix name of the file that this default suffix can be default settings can be suffix name arbitrarily.For example, the suffix that can preset amended Zip compressed package is " gszip ", when its original suffix is " Zip ", the suffix of Zip compressed package is changed to " gszip " by " Zip ".It can be that the suffix of all Zip compressed packages that Xap compressed package is associated is all revised as default suffix that the suffix of Zip compressed package is revised as to default suffix.
Step S306, the address that obtains amended Zip compressed package.
Due to after the suffix of Zip compressed package being revised as to default suffix, the address of corresponding Zip compressed package likely can change, and the address that therefore obtains amended Zip compressed package, so that be again stored in this address in the configuration file of Xap compressed package.
Step S307, the address of the address of recording in configuration file being revised as to amended Zip compressed package.
During due to use application program, can first from server, obtain Xap compressed package, and download by the built-in configuration file of Xap compressed package the Zip compressed package being associated, therefore the address of amended Zip compressed package need to be revised as in the address of the Zip compressed package recording in configuration file, thereby avoid makeing mistakes and causing Zip compressed package to download the problem of makeing mistakes due to the address of Zip compressed package.
Step S308, downloads the Zip compressed package that is revised as default suffix.
After revising the suffix of Zip compressed package, download the Zip compressed package that is revised as default suffix.Owing to just the suffix of Zip compressed package being modified, its file content is not done any change, therefore the file in the Zip compressed package that is revised as default suffix of downloading is identical with the file in the Zip compressed package of revising before suffix, when using this Zip compressed package application programs to upgrade, there will not be abnormal.
Preferably, after step S307, in application program, the download process method of Zip compressed package also comprises step S1 and step S2:
Step S1, preserves amended configuration file.
The address of Zip compressed package is revised as to the address of revising the Zip compressed package after suffix name, has completed the modification to the configuration file of Xap compressed package, after revising good this configuration file, amended configuration file is stored.
Step S2, and the Xap compressed package after configuration file is revised in compression again.
After configuration file is revised and stored, again compress amended Xap compressed package and form new Xap compressed package, thus can be for the renewal of application program.
Preferably, the application program in the embodiment of the present invention is Silverlight program, the suffix of Zip compressed package is revised as to default suffix and comprises: the suffix of Zip compressed package is revised as to gszip.
It should be noted that, in the step shown in the flow chart of accompanying drawing, can in the computer system such as one group of computer executable instructions, carry out, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in storage device and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or a plurality of modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to any specific hardware and software combination.
These are only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.