Summary of the invention
The embodiment of the present application provides a kind of method and the device that realize patch installation, is mounted to low the caused problem of power to solve existing patch.
In order to solve the problems of the technologies described above, the embodiment of the present application discloses following technical scheme:
Realize the method that patch is installed, comprising:
Patch file is parsed from the first patch installation kit;
Described patch file is utilized to generate the second patch installation kit with the mounting strategy preset;
When the first patch installation kit is installed unsuccessfully, utilize described default mounting strategy that the second patch installation kit is installed.
Preferably, the method also comprises and obtains the first patch installation kit in the following manner:
Refresh patch and issue the page;
When the described patch issue page exists lastest imformation, obtain the patch information in described lastest imformation;
Link and access patch downloading page and download the first patch installation kit.
Preferably, described default mounting strategy comprises one of following condition or its combination in any:
When the version of program or assembly and/or relevant program or assembly do not have the patch comprised in the first patch installation kit install institute in testing conditions for the version of object new time, judge that described patch file is suitable for installation;
When finding that the program of leak or assembly and/or relevant program or assembly exist the danger dangerous or unstable to system cloud gray model, and patch file can eliminate described dangerous time, judge that described patch file is suitable for installing;
When finding that the program of leak or assembly and/or relevant program or assembly are to system cloud gray model safety or stable irrelevant, and described patch file is not installed does not affect other patch files when installing, judge that described patch file is unsuitable for installing;
When finding that the version after the program of leak or the version of assembly and/or relevant program or assembly are installed with described second patch installation kit is identical, but when still there is the recoverable leak of patch file, judge that described patch file is suitable for installation.
Preferably, the program of described discovery leak or the version of assembly and/or relevant program or assembly are determined in the following manner:
Check the version information in version number, filename and/or registration table.
Preferably, the generating mode of described default mounting strategy at least comprises any one in several mode:
Testing conditions is installed to described patch and carries out all or part of amendment;
To described patch, testing conditions is installed to supplement, upgrade;
Testing conditions is installed to described patch and carries out part deletion.
Preferably, testing conditions is installed to described patch and carries out all or part of amendment and comprise: patch is installed institute in testing conditions for the most highest version of reparation object as comparison other, the version lower than comparison other is suitable for installation patch file;
Install testing conditions to described patch to supplement, upgrade and comprise: available patch file is carried out leak reparation and patch is installed not for the reparation object that the object repaired increases in described predetermined policy in testing conditions, the reparation object of described increase is suitable for installing patch file;
To described patch, testing conditions is installed to carry out part and delete and comprise: patch is installed in testing conditions and limit that patch file is installed and condition that patch file can repair corresponding leak is deleted.
Preferably, part or all of described patch file is utilized to generate the second patch installation kit with the mounting strategy preset.
Preferably, in the following way at least one judge described first patch installation kit whether successful installation:
The key assignments information in registration table is utilized to judge described first patch installation kit whether successful installation;
The patch information obtained is utilized to judge described first patch installation kit whether successful installation.
Realize the device that patch is installed, comprising:
Resolution unit, for parsing patch file from the first patch installation kit;
Generation unit, the patch file parsed for utilizing described resolution unit generates the second patch installation kit with the mounting strategy preset;
Installation unit, for installing unsuccessfully at described first patch installation kit, utilizes described default mounting strategy to install the second patch installation kit.
Preferably, described resolution unit comprises:
Refresh the refresh module of the patch issue page, obtain the acquisition module of the patch information in described lastest imformation when the described patch issue page exists lastest imformation and link and access the download module that patch downloading page downloads the first patch installation kit.
Preferably, this device also comprises: setting unit, for default mounting strategy; Wherein, described default mounting strategy comprises one of following condition or its combination in any:
When the version of program or assembly and/or relevant program or assembly do not have the patch comprised in the first patch installation kit install institute in testing conditions for the version of object new time, judge that described patch file is suitable for installation;
When finding that the program of leak or assembly and/or relevant program or assembly exist the danger dangerous or unstable to system cloud gray model, and patch file can eliminate described dangerous time, judge that described patch file is suitable for installing;
When finding that the program of leak or assembly and/or relevant program or assembly are to system cloud gray model safety or stable irrelevant, and described patch file is not installed does not affect other patch files when installing, judge that described patch file is unsuitable for installing;
When finding that the version after the program of leak or the version of assembly and/or relevant program or assembly are installed with described second patch installation kit is identical, but when still there is the recoverable leak of patch file, judge that described patch file is suitable for installation.
Preferably, described setting unit comprises:
The first processing module that testing conditions carries out all or part of amendment is installed to described patch; And/or, to the second processing module that described patch installation testing conditions supplements, upgrades; And/or, the 3rd processing module that testing conditions carries out part deletion is installed to described patch.
As can be seen from the above-described embodiment, in the embodiment of the present application, by obtaining patch mounting condition from former patch installation kit, described patch file is utilized to form new patch installation kit with the patch mounting strategy preset, when former patch is installed unsuccessfully, utilize described new patch installation kit to carry out the installation of patch, improve the success ratio that patch is installed, and then effectively ensure that the security of system of user and stablize.
Embodiment
Basic thought of the present invention is to obtain patch mounting condition from former patch installation kit, described patch file is utilized to form new patch installation kit with the patch mounting strategy preset, when former patch is installed unsuccessfully, described new patch installation kit is utilized to carry out the installation of patch, improve the success ratio that patch is installed, and then effectively ensure that the security of system of user and stablize.
The following embodiment of the present invention provides a kind of method and the device that realize patch installation.
Technical scheme in the embodiment of the present invention is understood better in order to make those skilled in the art person, and enable the above-mentioned purpose of the embodiment of the present invention, feature and advantage become apparent more, below in conjunction with accompanying drawing, technical scheme in the embodiment of the present invention is described in further detail.
See Fig. 2, for the application realizes the first embodiment process flow diagram of the method that patch is installed:
Step 210: parse patch file from the first patch installation kit;
Wherein, the the first patch installation kit mentioned in the present embodiment is that unartificial mode obtains, but manual type is collected patch installation kit or third party and collected patch installation kit and also can realize the present invention, and the present embodiment specifically can adopt following steps to realize, as shown in Figure 3, but be not limited thereto:
S211: refresh patch and issue the page; Adopt third party software/instrument to refresh the technology comparative maturity of fixing Webpage in prior art, and this step also can adopt prior art to realize in the present embodiment, such as, the patch adopting brush screen software program regularly to refresh the company's sites such as Microsoft issues the page; Specifically repeat no more herein;
S212: when the described patch issue page exists lastest imformation, obtain the patch information in described lastest imformation; Concrete acquisition process adopts the acquiring technology of page key word in prior art to realize, but be not limited thereto: the source code information such as analyzing current page, if wherein contain the information such as trasaction key, namely show that current page upgrades, therefrom obtain associated patch information again; Particular content repeats no more herein;
S213: link and access patch downloading page download patches installation kit;
Concrete, after described patch is issued and be there is updating message in the page, in described updating message, contain the download URL of patch installation kit, then AutoLink access the page corresponding to this URL, therefrom download described patch installation kit.
Step 220: utilize described patch file to generate the second patch installation kit with the mounting strategy preset;
Concrete, described default mounting strategy comprises one of following condition or its combination in any:
A, when the version of program or assembly and/or relevant program or assembly do not have patch to install in testing conditions for the version of object new time, judge that patch file is suitable for installing, such as, if a program version is the version on January 1st, 2011, corresponding version number is v1.1, it does not have the version of the patch mounting object of patch installation defined in testing conditions new, then think that this patch file is suitable for installing, this version new and old for date issued, if version number's order and date correspondence, also can judge the new and old of each version with version number;
B, when finding that the program of leak or assembly and/or relevant program or assembly exist the danger dangerous or unstable to system cloud gray model, and patch file is when can eliminate danger, judge that patch file is suitable for installing, such as, patch file can repair some up-to-date leaks that may cause system cloud gray model risk, and version corresponding to these leaks is installed in testing conditions at original patch and shown, now still judge that this patch file is suitable for installing;
C, when finding that the program of leak or assembly and/or relevant program or assembly are to system cloud gray model safety or stable irrelevant, and do not install patch file do not affect other patch files install time, judge that patch file is unsuitable for installing, such as, to the patch that office helps, do not affect safety and stability, so can not install, certainly, " being unsuitable for installing " of mentioning in the present embodiment considers from the angle economized on resources, be defined as to install, if user needs, completely can the patch that helps as elucidated before of installation example;
D, version after the discovery program of leak or the version of assembly and/or relevant program or assembly are installed with the second patch installation kit is identical, but when still there is the recoverable leak of patch file, judge that patch file is suitable for installing, such as, if a program finds leak, even if its version install with the second patch installation kit after version identical, also still can judge that this patch file is suitable for installing, this patch file mainly installed for (but being not limited to) go to pot or after repairing because other problem produces the situation that identical leak needs to reinstall again.
Wherein, find in the present embodiment that the program of leak or the version of assembly and/or relevant program or assembly can be determined in the following manner, but be not limited to this: check the version information in version number, filename and/or registration table; Such as, give out information Microsoft's patch registration, forms registration form, and registration form is kept at client this locality or server, then new and old by checking the mode comparison version of registration record.
It should be noted that the generating mode utilizing described patch file and the mounting strategy preset to generate the second patch installation kit includes but not limited to: utilizes the mounting strategy preset to the patch comprised in described first patch installation kit install testing conditions carry out all or part of amendment, supplementary, upgrade and/or deletion etc.;
Wherein, testing conditions is installed to patch and carries out all or part of amendment and can comprise: patch is installed institute in testing conditions for the latest edition of reparation object as comparison other, the version early than comparison other is suitable for installation patch file;
Install testing conditions to patch to carry out supplementing or upgrading and can comprise: available patch file is carried out leak reparation and patch is installed not for the reparation object that the object of reparation increases in predetermined policy in testing conditions, the reparation object of increase is suitable for installation patch file; Such as, second patch installation kit for object only may be date of issue before existing, but the leak again occurring that available patch file is repaired may be there is after patch date of issue, now this patch file being also suitable for installation for this object and being set to mounting strategy, supplementing for carrying out renewal to the patch installation testing conditions in the first patch installation kit.
To patch mounting condition carry out part delete comprise: patch is installed in testing conditions limit patch file install and patch file can repair corresponding leak condition delete; Such as, in patch mounting condition must there is some function (such as helping) in limiting program software, or there is not some function, and these functions do not affect patch file to the reparation of repairing object, now this condition can be deleted, form described mounting strategy.
Those of ordinary skill in the art should readily understand, default mounting strategy in the present embodiment be can improve patch in order to user be mounted to power, therefore in actual applications, power is mounted in order to improve patch further, completely can not testing conditions be set, namely directly can carry out the installation of patch without the need to any testing conditions or mounting strategy, thus make any use in time, effectively can complete patch installation per family.
In addition, all or part of patch file and predetermined policy can be combined in the present embodiment, to generate the second patch installation kit.Wherein, all or part of combination can be understood as: it is identical with the problem that original patch installation kit solves that whole patch files and default mounting strategy generate the second patch installation kit, testing conditions is just installed and has had change, namely, by original installation testing conditions is changed to default mounting strategy, this second patch installation kit can be made to complete and to repair identical leak or identical upgrading with the first patch installation kit; It is because under specific circumstances that part patch file and default mounting strategy combine, part patch file just can complete the identical task of original patch installation kit, in yet some other cases, part patch file combination in different patch installation kit, the task different from single patch installation kit can be completed, the mode that such part patch file and default mounting strategy combine can reduce the data volume of user's download patches installation kit, also makes the second patch installation kit generate more flexible.
Step 230: when the first patch installation kit is installed unsuccessfully, utilizes described default mounting strategy to install the second patch installation kit;
In actual applications, concrete first service packs install that failed judgment mode can adopt in the following two kinds mode any one, but be not limited to this:
A: utilize the key assignments information in registration table to judge described first patch installation kit whether successful installation;
Such as to judge patch KB979099 whether successful installation, first in the following items of registration table, inquire about the key assignments whether having and comprise KB979099: HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows Current Version Component Based Servicing Packages, if installed described patch, the register button certainly existing similar Package_for_KB979099_RTM ~ 31bf3856ad364e35 ~ x86 ~ ~ 6.1.1.0 in the project of then above-mentioned registration table exists, and is the mount message of described patch in this key; Described first patch installation kit whether successful installation can be judged with this.
B: utilize the patch information obtained to judge described first patch installation kit whether successful installation;
Concrete, the fileversion number in described patch information or filename etc. can be utilized to judge, but be not limited to this: such as described patch is for upgrading patch, and its effect makes the application program update of its correspondence to version be 10.1.102.64; Whether to judge this patch successful installation, namely needing to inquire about version under this application program place drive catalogue is whether the file of 10.1.102.64 exists, if file exists, then can confirm described first patch installation kit successful installation.
Can find out, adopt the method for the above embodiment of the present invention, by obtaining patch mounting condition from former patch installation kit, described patch file is utilized to form new patch installation kit with the patch mounting strategy preset, when former patch is installed unsuccessfully, utilize described new patch installation kit to carry out the installation of patch, improve the success ratio that patch is installed, and then effectively ensure that the security of system of user and stablize.
Corresponding with the embodiment that the application realizes the method that patch is installed, present invention also provides the embodiment of the device realizing the method.
The device embodiment block diagram of patch installation is realized see the application described in Fig. 4:
This device 400 comprises: 410 resolution unit, for parsing patch file from the first patch installation kit; Generation unit 420, the patch file parsed for utilizing described resolution unit 410 generates the second patch installation kit with the mounting strategy preset; Installation unit 430, for installing unsuccessfully at described first patch installation kit, utilizes described default mounting strategy to install the second patch installation kit.
Wherein, described resolution unit 410 comprises (not shown in Fig. 4): refresh the refresh module of the patch issue page, obtain the acquisition module of the patch information in described lastest imformation when the described patch issue page exists lastest imformation and link and access the download module that patch downloading page downloads the first patch installation kit.
In addition, this device also comprises: setting unit (not shown in Fig. 4), for default mounting strategy; Wherein, described default mounting strategy comprises one of following condition or its combination in any: when the version of program or assembly and/or relevant program or assembly do not have the patch comprised in the first patch installation kit install institute in testing conditions for the version of object new time, judge that described patch file is suitable for installation; When finding that the program of leak or assembly and/or relevant program or assembly exist the danger dangerous or unstable to system cloud gray model, and patch file can eliminate described dangerous time, judge that described patch file is suitable for installing; When finding that the program of leak or assembly and/or relevant program or assembly are to system cloud gray model safety or stable irrelevant, and described patch file is not installed does not affect other patch files when installing, judge that described patch file is unsuitable for installing; When finding that the version after the program of leak or the version of assembly and/or relevant program or assembly are installed with described second patch installation kit is identical, but when still there is the recoverable leak of patch file, judge that described patch file is suitable for installation.
Wherein, described setting unit also can comprise (not shown in Fig. 4): install to described patch the first processing module that testing conditions carries out all or part of amendment; And/or, to the second processing module that described patch installation testing conditions supplements, upgrades; And/or, the 3rd processing module that testing conditions carries out part deletion is installed to described patch.
Those skilled in the art can be well understood to the mode that technology in the embodiment of the present invention can add required general hardware platform by software and realize.Based on such understanding, technical scheme in the embodiment of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the present invention or embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Above-described embodiment of the present invention, does not form limiting the scope of the present invention.Any amendment done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.