Summary of the invention
The embodiment of the present application provides a kind of method and device of realizing that patch is installed, is mounted to the low problem that is caused 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:
A kind of method that realizes that patch is installed comprises:
From the first patch installation kit, parse patch file;
Utilize described patch file and the mounting strategy of presetting to generate the second patch installation kit;
After the first patch installation kit is installed failure, utilize described default mounting strategy that the second patch installation kit is installed.
Preferably, this method also comprises and obtains the first patch installation kit in the following manner:
Refresh the patch issue page;
When there is lastest imformation in the described patch issue page, obtain the patch information in the described lastest imformation;
Link and visit patch downloading page are downloaded the first patch installation kit.
Preferably, described default mounting strategy comprises one of following condition or its combination in any:
When in the patch installation and measuring condition that the version of program or assembly and/or relevant program or assembly does not have to comprise in the first patch installation kit at the version of object when new, judge that described patch file is suitable for installing;
When the program of finding leak or assembly and/or relevant program or assembly exist the dangerous or unsettled danger of system's operation, and patch file can eliminate describedly when dangerous, judges that described patch file is suitable for installing;
When the program of finding leak or assembly and/or relevant program or assembly to system's security of operation or stable irrelevant, and when described patch file not being installed not influencing other patch files and install, judge that described patch file is unsuitable for installing;
When the version of the program of finding leak or assembly and/or relevant program or assembly is identical with version after the described second patch installation kit is installed, but when still having the recoverable leak of patch file, judge that described patch file is suitable for installation.
Preferably, the version of the program of described discovery leak or assembly and/or relevant program or assembly is determined in the following manner:
Check the version information in version number, filename and/or the registration table.
Preferably, the generating mode of described default mounting strategy comprises any one in several modes at least:
Described patch installation and measuring condition is carried out all or part of modification;
Described patch installation and measuring condition is replenished, upgraded;
Described patch installation and measuring condition is carried out the part deletion.
Preferably, described patch installation and measuring condition is carried out all or part of modification comprises: with in the patch installation and measuring condition at the highest version object as a comparison of reparation object, the version that is lower than comparison other is suitable for installing patch file;
Described patch installation and measuring condition is replenished, upgraded and comprise: available patch file is carried out in leak reparation and the patch installation and measuring condition not at the object of repairing as the reparation object that increases in the described predetermined policy, and the reparation object of described increase is suitable for installing patch file;
Described patch installation and measuring condition is carried out part deletion to be comprised: will be in the patch installation and measuring condition restriction patch file install and patch file can be repaired the condition deletion of corresponding leak.
Preferably, utilize part or all of described patch file and the mounting strategy of presetting to generate the second patch installation kit.
Preferably, at least a in the following way judged whether successful installation of the described first patch installation kit:
Utilize the key assignments information in the registration table to judge whether successful installation of the described first patch installation kit;
Utilize the patch information of having obtained to judge whether successful installation of the described first patch installation kit.
A kind of device of realizing that patch is installed comprises:
Resolution unit is used for parsing patch file from the first patch installation kit;
Generation unit is used to utilize described resolution unit patch file that parses and the mounting strategy of presetting to generate the second patch installation kit;
Installation unit is used for utilizing described default mounting strategy that the second patch installation kit is installed after the described first patch installation kit is installed failure.
Preferably, described resolution unit comprises:
Refresh the refresh module of the patch issue page, issue when described patch and obtain the acquisition module of the patch information in the described lastest imformation when there is lastest imformation in the page and link and visit the download module that the patch downloading page is downloaded the first patch installation kit.
Preferably, this device also comprises: the unit is set, is used for default mounting strategy; Wherein, described default mounting strategy comprises one of following condition or its combination in any:
When in the patch installation and measuring condition that the version of program or assembly and/or relevant program or assembly does not have to comprise in the first patch installation kit at the version of object when new, judge that described patch file is suitable for installing;
When the program of finding leak or assembly and/or relevant program or assembly exist the dangerous or unsettled danger of system's operation, and patch file can eliminate describedly when dangerous, judges that described patch file is suitable for installing;
When the program of finding leak or assembly and/or relevant program or assembly to system's security of operation or stable irrelevant, and when described patch file not being installed not influencing other patch files and install, judge that described patch file is unsuitable for installing;
When the version of the program of finding leak or assembly and/or relevant program or assembly is identical with version after the described second patch installation kit is installed, but when still having the recoverable leak of patch file, judge that described patch file is suitable for installation.
Preferably, the described unit that is provided with comprises:
First processing module that described patch installation and measuring condition is carried out all or part of modification; And/or, second processing module that described patch installation and measuring condition is replenished, upgraded; And/or, the 3rd processing module of described patch installation and measuring condition being carried out the part deletion.
As can be seen from the above-described embodiment, in the embodiment of the present application, by from former patch installation kit, obtaining the patch mounting condition, utilize described patch file and default patch mounting strategy to form new patch installation kit, after former patch is installed failure, utilize the described new patch installation kit to carry out the installation of patch, improved the success ratio that patch is installed, and then effectively guaranteed user's security of system and stable.
Embodiment
Basic thought of the present invention is to obtain the patch mounting condition from former patch installation kit, utilize described patch file and default patch mounting strategy to form new patch installation kit, after former patch is installed failure, utilize described new patch installation kit to carry out the installation of patch, improve the success ratio that patch is installed, and then effectively guaranteed user's security of system and stable.
The following embodiment of the present invention provides a kind of method and device of realizing that patch is installed.
In order to make those skilled in the art person understand technical scheme in the embodiment of the invention better, and the above-mentioned purpose of the embodiment of the invention, feature and advantage can be become apparent more, below in conjunction with accompanying drawing technical scheme in the embodiment of the invention is described in further detail.
Referring to Fig. 2, realize the first embodiment process flow diagram of the method that patch is installed for the application:
Step 210: from the first patch installation kit, parse patch file;
Wherein, the first patch installation kit of mentioning in the present embodiment is that unartificial mode is obtained, and also can realize the present invention but manual type collection patch installation kit or third party collect the patch installation kit, and present embodiment specifically can adopt following steps to realize, as shown in Figure 3, but be not limited thereto:
S211: refresh the patch issue page; The technology that available technology adopting third party software/instrument refreshes fixing Webpage is comparative maturity, and this step also can adopt prior art to realize in the present embodiment, for example, adopt the patch issue page of company's sites such as brush screen software program periodic refresh Microsoft; Concrete this paper repeats no more;
S212: when there is lastest imformation in the described patch issue page, obtain the patch information in the described lastest imformation; Concrete acquisition process adopts the technology of obtaining of page key word in the prior art to realize, but be not limited thereto: the source code information of for example analyzing current page, if wherein comprised information such as trasaction key, show that promptly current page upgrades, therefrom obtain associated patch information again; Particular content this paper repeats no more;
S213: link and visit patch downloading page download patches installation kit;
Concrete, after having updating message in the described patch issue page, comprised the download URL of patch installation kit in the described updating message, then AutoLink and visit this URL corresponding page is therefrom downloaded described patch installation kit.
Step 220: utilize described patch file and the mounting strategy of presetting to generate the second patch installation kit;
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 in the patch installation and measuring condition at the version of object when new, judge that patch file is suitable for installing, for example, 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 defined in the patch installation and measuring condition new, think that then 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 be judged the new and old of each version with version number;
B, exist the dangerous or unsettled danger of system's operation when the program of finding leak or assembly and/or relevant program or assembly, and when patch file can eliminate danger, judge that patch file is suitable for installing, for example, patch file can be repaired some up-to-date leaks that may cause system's operation risk, and the version of these leak correspondences does not show in original patch installation and measuring condition, still judges that this patch file is suitable for installing this moment;
C, when the program of finding leak or assembly and/or relevant program or assembly to system's security of operation or stable irrelevant, and when patch file not being installed not influencing other patch files and install, judge that patch file is unsuitable for installing, for example, patch to office help, do not influence safety and stability, so can not install, certainly, " being unsuitable for installing " of mentioning in the present embodiment is to consider from the angle that economizes on resources, be not that it is defined as and can not installs,, the patch of for example foregoing help can be installed fully if the user needs;
D, when the version of the program of finding leak or assembly and/or relevant program or assembly identical with version after the installation of the second patch installation kit, but when still having the recoverable leak of patch file, judge that patch file is suitable for installing, for example, if a program is found leak, even if the version after its version and the second patch installation kit are installed is identical, still can judge that also this patch file is suitable for installing, this mainly is to go to pot or repair the back at the patch file that (but being not limited to) installed to produce the situation that identical leak need be reinstalled once more because of other problem.
Wherein, find in the present embodiment that the program of leak or assembly and/or relevant program or the version of assembly can determine in the following manner, but be not limited to this: check the version information in version number, filename and/or the registration table; For example,, form registration form with the registration that gives out information of Microsoft's patch, registration form be kept at client terminal local or server all can, it is new and old to compare version by the mode of checking registration record then.
It should be noted that the generating mode that utilizes described patch file and default mounting strategy to generate the second patch installation kit includes but not limited to: utilize default mounting strategy to the patch installation and measuring condition that comprises in the described first patch installation kit carry out all or part of modification, replenish, renewal and/or deletion etc.;
Wherein, patch installation and measuring condition is carried out all or part of modification can be comprised: with in the patch installation and measuring condition at the latest edition object as a comparison of reparation object, be suitable for installing patch file early than the version of comparison other;
Patch installation and measuring condition is replenished or upgraded and can comprise: available patch file is carried out in leak reparation and the patch installation and measuring condition not at the object of repairing as the reparation object that increases in the predetermined policy, and the reparation object of increase is suitable for installing patch file; For example, the second patch installation kit at object only may be existing before date of issue, but at patch the leak that available patch file is repaired may take place after date of issue to occur once more, this moment this patch file also is suitable for installation for this object and is made as mounting strategy, be used for upgrading additional the patch installation and measuring condition of the first patch installation kit.
The patch mounting condition is carried out part deletion to be comprised: will be in the patch installation and measuring condition restriction patch file install and patch file can be repaired the condition deletion of corresponding leak; For example, must there be some function (such as helping) in limiting program software in the patch mounting condition, perhaps do not have some function, and these functions does not influence patch file to repairing the reparation of object, can form described mounting strategy this moment with this condition deletion.
Those of ordinary skills should readily understand, default mounting strategy in the present embodiment is the power that is mounted to that can improve patch for the user, therefore in actual applications, be mounted to power in order further to improve patch, fully testing conditions can be set, promptly need not any testing conditions or mounting strategy and can directly carry out the installation of patch, install thereby make Any user all can finish patch in time, effectively.
In addition, all or part of patch file can be combined with predetermined policy in the present embodiment, to generate the second patch installation kit.Wherein, all or part of combination can be understood as: all to generate the second patch installation kit identical with the problem of original patch installation kit solution for patch files and default mounting strategy, just the installation and measuring condition has had change, promptly, by original installation and measuring condition is changed to default mounting strategy, this second patch installation kit is finished with the first patch installation kit repaired identical leak or identical upgrading; Part patch file and the combination of default mounting strategy are because under specific circumstances, the part patch file just can be finished the identical task of original patch installation kit, under the other situation, part patch file combination in the different patch installation kits, can finish and the different task of single patch installation kit, the mode of part patch file and default mounting strategy combination can reduce the data volume of user's download patch installation kit like this, and it is more flexible that the second patch installation kit is generated.
Step 230: after the first patch installation kit is installed failure, utilize described default mounting strategy that the second patch installation kit is installed;
In actual applications, the judgment mode of concrete first service packs installation failure can adopt any one in the following dual mode, but is not limited to this:
A: utilize the key assignments information in the registration table to judge whether successful installation of the described first patch installation kit;
For example if will judge whether successful installation of patch KB979099, at first in the following project of registration table the inquiry whether have the key assignments that comprises KB979099: HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows Current Version Component Based Servicing Packages, if described patch has been installed, then certainly exist in the project of above-mentioned registration table similar Package_for_KB979099_RTM~31bf3856ad364e35~x86~~register button of 6.1.1.0 exists, and is the mount message of described patch in this key; Can judge whether successful installation of the described first patch installation kit with this.
B: utilize the patch information of having obtained to judge whether successful installation of the described first patch installation kit;
Concrete, can utilize fileversion number in the described patch information or filename to wait and judge, but be not limited to this: for example described patch is for upgrading patch, and its effect is that to make its corresponding application program be updated to version be 10.1.102.64; Whether if will judge this patch successful installation, whether the file that promptly need inquire about version and be 10.1.102.64 under this application program place drive catalogue exists, if the file existence then can be confirmed described first patch installation kit successful installation.
As can be seen, adopt the method for the above embodiment of the present invention, by from former patch installation kit, obtaining the patch mounting condition, utilize described patch file and default patch mounting strategy to form new patch installation kit, after former patch is installed failure, utilize the described new patch installation kit to carry out the installation of patch, improved the success ratio that patch is installed, and then effectively guaranteed user's security of system and stable.
The embodiment that realizes the method that patch is installed with the application is corresponding, and the application also provides the embodiment of the device of realizing this method.
Realize the device embodiment block diagram that patch is installed referring to the described the application of Fig. 4:
This device 400 comprises: 410 resolution unit are used for parsing patch file from the first patch installation kit; Generation unit 420 is used to utilize described resolution unit 410 patch file that parses and the mounting strategy of presetting to generate the second patch installation kit; Installation unit 430 is used for utilizing described default mounting strategy that the second patch installation kit is installed after the described first patch installation kit is installed failure.
Wherein, described resolution unit 410 comprises (not shown among Fig. 4): refresh the refresh module of the patch issue page, issue when described patch and obtain the acquisition module of the patch information in the described lastest imformation when there is lastest imformation in the page and link and visit the download module that the patch downloading page is downloaded the first patch installation kit.
In addition, this device also comprises: unit (not shown among Fig. 4) is set, is used for default mounting strategy; Wherein, described default mounting strategy comprises one of following condition or its combination in any: when in the patch installation and measuring condition that the version of program or assembly and/or relevant program or assembly does not have to comprise in the first patch installation kit at the version of object when new, judge that described patch file is suitable for installing; When the program of finding leak or assembly and/or relevant program or assembly exist the dangerous or unsettled danger of system's operation, and patch file can eliminate describedly when dangerous, judges that described patch file is suitable for installing; When the program of finding leak or assembly and/or relevant program or assembly to system's security of operation or stable irrelevant, and when described patch file not being installed not influencing other patch files and install, judge that described patch file is unsuitable for installing; When the version of the program of finding leak or assembly and/or relevant program or assembly is identical with version after the described second patch installation kit is installed, but when still having the recoverable leak of patch file, judge that described patch file is suitable for installation.
Wherein, the described unit that is provided with also can comprise (not shown among Fig. 4): first processing module that described patch installation and measuring condition is carried out all or part of modification; And/or, second processing module that described patch installation and measuring condition is replenished, upgraded; And/or, the 3rd processing module of described patch installation and measuring condition being carried out the part deletion.
The technology that those skilled in the art can be well understood in the embodiment of the invention can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that technical scheme in the embodiment of the invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of 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, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses all is difference with other embodiment.Especially, for system embodiment, because it is substantially similar in appearance to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.