Summary of the invention
The invention provides a kind of leak restorative procedure and device, help improving the success ratio of the leak that exists in the repair procedure.
The invention provides following scheme:
A kind of leak restorative procedure comprises:
Obtain the first patch installation kit, from the described first patch installation kit, extract the first mounting condition associated documents;
Utilize the second mounting condition associated documents to replace the described first mounting condition associated documents;
Generate the second patch installation kit according to the result after described first patch installation kit and the replacement;
Utilize the described second patch installation kit to carry out the leak reparation.
Preferably, the described first mounting condition associated documents comprise:
Installation testing program and/or configuration file in the first patch installation kit.
Preferably, also comprise:
Generate new mounting condition, and generate the described second mounting condition associated documents according to new mounting condition.
Preferably, the new mounting condition of described generation comprises:
From the described first mounting condition associated documents, extract first mounting condition; Generate new mounting condition according to described first mounting condition.
Preferably, the new mounting condition of described generation comprises:
Grasp the mounting condition information of issuing on the described first patch installation kit place webpage, described mounting condition information comprises operating system condition and program/assembly condition; Generate new mounting condition according to described mounting condition information.
Preferably, the new mounting condition of described generation comprises:
If the version of target program/assembly in the target machine environment is lower than the latest edition in described program/assembly condition, judge that then corresponding patch file is suitable for installing;
Perhaps,
When the patch file in the described first patch installation kit can be eliminated the leak that exists in certain program/assembly, judge that this patch file is suitable for installing;
Perhaps,
If in certain machine environment, install after certain patch file, can repair the leak that exists in certain program/assembly, and the unsettled phenomenon of system can not occur, judge that then this patch file is suitable for installing in this machine environment;
Perhaps,
If the safety or the stability of the operation of the target program/assembly of certain patch file correspondence and system are irrelevant, and when this patch file not being installed not influencing the installation of other patch files, judge that this patch file is unsuitable for installing.
A kind of leak prosthetic device comprises:
Extraction unit is used to obtain the first patch installation kit, extracts the first mounting condition associated documents from the described first patch installation kit;
Replace the unit, be used to utilize the second mounting condition associated documents to replace the described first mounting condition associated documents;
Generation unit is used for according to the described first patch installation kit and the result after replacing generates the second patch installation kit;
Repair the unit, be used to utilize the described second patch installation kit to carry out the leak reparation.
Preferably in, the described first mounting condition associated documents comprise:
Installation testing program and/or configuration file in the first patch installation kit.
Preferably, also comprise:
The condition generation unit is used to generate new mounting condition, and generates the described second mounting condition associated documents according to new mounting condition.
Preferably, described condition generation unit comprises:
Extract subelement, be used for extracting first mounting condition from the described first mounting condition associated documents; Generate new mounting condition according to described first mounting condition.
Preferably, described condition generation unit comprises:
Grasp subelement, be used to grasp the mounting condition information of issuing on the described first patch installation kit place webpage, described mounting condition information comprises operating system condition and program/assembly condition; Generate new mounting condition according to described mounting condition information.
Preferably, described condition generation unit comprises:
First condition generates subelement, if be used for the version of target machine environment target program/assembly, is lower than the latest edition in described program/assembly condition, judges that then corresponding patch file is suitable for installing;
Perhaps,
Second condition generates subelement, is used for when the patch file of the described first patch installation kit can be eliminated the leak that exists in certain program/assembly, judges that this patch file is suitable for installing;
Perhaps,
The 3rd condition generates subelement, if be used for after certain machine environment is installed certain patch file, can repair the leak that exists in certain program/assembly, and the unsettled phenomenon of system can not occur, judge that then this patch file is suitable for installing in this machine environment;
Perhaps,
The 4th condition generates subelement, if the target program/assembly that is used for certain patch file correspondence is irrelevant with the safety or the stability of system operation, and when this patch file not being installed not influencing the installation of other patch files, judges that this patch file is unsuitable for installation.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
The embodiment of the invention can be replaced the mounting condition associated documents in the patch installation kit, generate new patch installation kit then, and the leak that exists in the program is repaired with new patch installation kit, wherein, mounting condition in the mounting condition associated documents after the replacement can be through former mounting condition is analyzed again, thereby the optimization renewal obtains, like this, mounting condition in the mounting condition associated documents after should newly replacing is more suitable for user installation than the mounting condition in the original mounting condition associated documents, and the mounting condition of optimizing after upgrading can guarantee that the user installs patch timely and effectively, reduce system risk, and use when optimizing the mounting condition installation patch that upgrades, just can improve the success ratio that has leak in the repair procedure effectively.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills obtained belongs to the scope of protection of the invention.
Referring to Fig. 1, the leak restorative procedure that the embodiment of the invention provides may further comprise the steps:
S101: obtain the first patch installation kit, from the described first patch installation kit, extract the first mounting condition associated documents;
Wherein, the so-called here first patch installation kit can be meant the patch installation kit that the original author of software provides, for example patch installation kit of providing at its concrete software product of Microsoft or the like.The patch installation kit that the original author of software can provide it usually is published in the official website, therefore, also this patch installation kit is called the patch installation kit of official's issue.Can pass through to mode such as download in the official website and obtain the patch installation kit of this official issue.
For a patch installation kit, wherein can comprise patch file, also promptly really be used for the file of repair procedure leak, also can comprise the installation testing program in addition.Wherein, the installation testing program comprises a kind of executable file that is used to install patch, concrete, can be before carrying out concrete patch installation by the installation testing program, according to the mounting condition that sets in advance, judge whether current machine environment can install the patch file in this patch installation kit, if can, then install, otherwise can not carry out the operation of installation.In addition, in some cases, the installation testing program also may comprise a kind of executable file that is used to test, concrete, can be by the test procedure of installation testing program run related data, whether can repair the leak of designated program so that judge current patch file, perhaps whether the installation of patch file brings instability of system or the like.
Wherein, concrete mounting condition may write in the installation testing program, as long as operation installation testing program just can be judged machine environment automatically according to the mounting condition of finishing writing.In addition, also have under a kind of situation, concrete mounting condition may write in the configuration file, and the installation testing program need read configuration file when operation, utilize the mounting condition in the configuration file again, and machine environment is judged.
Therefore, in embodiments of the present invention, the mounting condition associated documents can be meant installation testing program and/or the configuration file in the patch installation kit.Also promptly, if mounting condition all writes in the installation testing program, then the mounting condition associated documents just are meant the installation testing program, and when extracting the first mounting condition associated documents, the installation testing program of only extracting in the patch installation kit of official's issue gets final product; If mounting condition all writes in the configuration file, then the mounting condition associated documents are exactly that file is put in assignment, and when extracting the first mounting condition associated documents, the configuration file that only extracts in the patch installation kit of official's issue gets final product; If mounting condition partly writes in the installation testing program, part writes in the configuration file, then the mounting condition associated documents just are meant installation testing program and configuration file, when extracting the first mounting condition associated documents, installation testing program and configuration file in the patch installation kit of needs extraction official issue.
S102: utilize the second mounting condition associated documents to replace the described first mounting condition associated documents;
The second mounting condition associated documents are corresponding with the first mounting condition associated documents, if the first mounting condition associated documents are installation testing programs, then the second mounting condition associated documents also should be installation testing programs, also promptly replace original installation testing program with a new installation testing program, like this, when patch file is installed, will moves new installation testing program, and machine environment be judged according to the mounting condition that is provided with in the new installation testing program.
Similarly, if the first mounting condition associated documents are configuration files, then the second mounting condition associated documents also should be configuration files, certainly, because the installation testing program in the patch installation kit does not change, therefore in order to make the installation testing program can normally read configuration file, the configuration file after the replacement can adopt identical filename with original configuration file; Like this, the installation testing program in the patch installation kit just can read the mounting condition that is provided with in the new configuration file, and according to this mounting condition machine environment be judged when operation.
Perhaps, if the first mounting condition associated documents comprise installation testing program and configuration file, then the second mounting condition associated documents also should be both to have comprised that the installation testing program also comprised configuration file.Because the installation testing program also can change, therefore the configuration file after replacing can adopt identical filename with original configuration file, the installation testing program after replacing also can adopt different filenames, as long as can normally read configuration file; Like this, when patch file is installed, will move new installation testing program, new installation testing program is in operational process, not only can judge machine environment according to the mounting condition of self setting, can also read the mounting condition in the new configuration file, and machine environment be judged according to the mounting condition that is provided with in the new configuration file.
In a word, no matter above-mentioned which kind of situation can realize the modification to original mounting condition by replacing the mounting condition associated documents in the original patch installation kit.
S103: generate the second patch installation kit according to the result after described first patch installation kit and the replacement;
The first mounting condition correlated condition is replaced with after the second mounting condition associated documents, just the patch file in the first patch installation kit and the second mounting condition associated documents can be packed again, generate the second patch installation kit.Like this, the patch file that is equivalent in the patch installation kit does not change, and just variation has taken place the mounting condition associated documents.
Wherein, when generating the second patch installation kit, can adopt and the same packaging method of the first patch installation kit, for example, the sequential scheduling of patch file can with the first patch installation kit in identical, be equivalent to the information reverting beyond the mounting condition associated documents in the patch installation kit.
S104: utilize the described second patch installation kit to carry out the leak reparation.
Generate after the second patch installation kit, just can utilize the second patch installation kit that the bug in the machine is repaired.
As seen, in embodiments of the present invention, can replace the mounting condition associated documents in the patch installation kit, generate new patch installation kit then, and the leak that exists in the program is repaired with new patch installation kit, wherein, mounting condition in the mounting condition associated documents after the replacement can be through former mounting condition is analyzed again, thereby the optimization renewal obtains, like this, mounting condition in the mounting condition associated documents after should newly replacing is more suitable for the user than the mounting condition in the original mounting condition associated documents, and the mounting condition of optimizing after upgrading can guarantee that the user installs patch timely and effectively, reduce system risk, and use when optimizing the mounting condition installation patch that upgrades, just can improve the success ratio that has leak in the repair procedure effectively.
Wherein, about the second patch installation kit, can manually be write by programmer etc., also can be that Automatic Program is write.Concrete mounting condition method to set up can have multiple, is introduced with one of them example below.
Usually, official is in issue patch installation kit, can be on the website mounting condition (usually with the form of text, be independent of the patch installation kit exist) of issue patch installation kit, these conditions usually only to the operating system version of machine, at software and the restriction of software version.For example, when issuing certain service packs in certain official website, also issued following information:
" operating system: Windows XP sp3
software?sp2
This machine condition 1:
C:\Program?Files\Microsoft?Office\OFFICE11\\winword.exe
This machine condition 2:
C:\Program?Files\Microsoft?Office\OFFICE11\\WINWORD.EXE”
As seen, in these conditions, only comprise operating system condition and software condition, also promptly only the version of operating system, the title and the version of software are limited, in other words, so long as the above-mentioned software that meets above-mentioned version condition in the Windows XP sp3 operating system can be repaired with this patch file.But; for the patch installation kit of official's issue; wherein the mounting condition of She Zhiing is except above-mentioned condition; usually also comprise other conditions, for example, also may comprise other conditions; the for example judgement of the integrality of file, consistance and dependence etc.; like this, as long as any one condition does not satisfy, all can't realize the installation of patch file.
Therefore, when generating the second mounting condition associated documents, just can new mounting condition be set, and generate new mounting condition associated documents according to operating system of issuing in the official website and software condition.Also promptly, in the second mounting condition associated documents, factors such as operating system version and software version can be only considered in being provided with of mounting condition, and factors such as other file integrality, consistance and dependence can be considered.In addition, when considering the version information of operating system and software, can also comprise more version as much as possible, for example, software version condition in the official website may be a closed interval, and can be set to the open interval in the embodiment of the invention, as long as make the software version in the target machine environment be lower than the last look of pointing out in the official website, just corresponding patch file can be installed.The mounting condition of Sheng Chenging can be more suitable for user installation like this, make certain operations system version and software version all meet the requirements, but undesirable machine environment such as the integrality of file, dependence also can successfully be installed patch file.
Based on the above, manually generating under the situation of the second mounting condition associated documents, the programmer just can be from the official website at patch installation kit place or other approach obtain patch installation kit required operating system condition and software condition, then according to this condition, again write the code of installation testing program, perhaps write configuration file again and get final product.Certainly, can also only some be occurred that easily the patch installation kit of failing is installed and handle in conjunction with experience according to the described method of the embodiment of the invention.
Automatically generating under the situation of the second mounting condition associated documents, can pre-set installation testing program or profile template, and pass through an Automatic Program to the official website of appointment, grasp the mounting condition information of patch installation kit correspondence, after grabbing mounting condition information, add to generate new installation testing program or configuration file in installation testing program or the profile template automatically to.
Certainly, the mounting condition information of on utilizing official website, issuing, can also obtain new mounting condition, and utilize new mounting condition to generate the second patch installation kit by other modes.For example, can also from the first mounting condition associated documents carry out, extract first mounting condition, obtain new mounting condition according to first mounting condition then.Concrete, can analyze the first mounting condition associated documents, for example, obtain the information of assigned address in the first mounting condition associated documents, perhaps utilize the keyword that presets that the first mounting condition associated documents are scanned, obtain the information of keyword correspondence, or the like, thereby therefrom extract first mounting condition.By revising first mounting condition or deletion modes such as some mounting condition wherein, obtain new mounting condition then.
Specifically when generating new mounting condition, except can considering aforementioned version information, it is also conceivable that other factors.For example, if a program or assembly are installed in certain target machine environment, because its existence may bring dangerous or the factors of instability to system's operation, and certain patch file can be eliminated this danger just, then just this patch file should be installed in this machine, when mounting condition is set, just can this program or assembly be set to this patch file can be installed.Concrete, when judging whether patch file can repair the leak of certain program or assembly, can judge by checking the historical record etc. of repairing.In addition, as mentioned before, also may comprise in the installation testing program being used for program that related data is tested, therefore, also can judge whether patch file can repair the leak of certain program or assembly by the program of this test of operation.
In addition, also may there be following situation in actual applications: because the common more complicated of machine environment, concrete configuration etc. also has nothing in common with each other, if only considering operating system condition, software condition may make after some patch file is installed, cause the negative influences such as instability of system, if like this, then this patch file should be installed.At this situation, can followingly carry out: extract the patch file in the first patch installation kit, under operating system condition and all satisfactory situation of software condition, simulate various possible machine environment, in various possible machine environment, patch file is installed, after observation after a while,, then this machine environment is discharged outside the scope that this patch file can be installed if find to have occurred under certain machine environment phenomenon such as system's instability.
Certainly, in actual applications, in the patch file of official's issue, some patch file is at the program of repairing or assembly (for example Office help etc.), may impact the security of system's operation, stability etc., and if this patch file is not installed, can not impact installation with other patch files yet, then this patch file can be installed, can raise the efficiency like this, avoid unnecessary system overhead.
Certainly, equally can be by the test procedure of installation testing program in the original patch installation kit of operation, judge and install after some patch file, whether can cause the negative influences such as instability of system, if some patch file perhaps is not installed, whether can the installation with other patch files be impacted, or the like.
Corresponding with the leak amending method that the embodiment of the invention provides, the embodiment of the invention also provides a kind of leak prosthetic device, and referring to Fig. 2, this device comprises:
Extraction unit 201 is used to obtain the first patch installation kit, extracts the first mounting condition associated documents from the described first patch installation kit;
Replace unit 202, be used to utilize the second mounting condition associated documents to replace the described first mounting condition associated documents;
Generation unit 203 is used for according to the described first patch installation kit and the result after replacing generates the second patch installation kit;
Repair unit 204, be used to utilize the described second patch installation kit to carry out the leak reparation.
Wherein, the described first mounting condition associated documents comprise:
Installation testing program and/or configuration file in the first patch installation kit.
In the practical application, can generate new mounting condition by Automatic Program, and and then generate the second mounting condition associated documents, at this moment, this device can also comprise:
The condition generation unit is used to generate new mounting condition, and generates the described second mounting condition associated documents according to new mounting condition.
Wherein, under a kind of embodiment, described condition generation unit can comprise:
Extract subelement, be used for extracting first mounting condition from the described first mounting condition associated documents; Generate new mounting condition according to described first mounting condition.
Under another kind of embodiment, described condition generation unit can comprise:
Grasp subelement, be used to grasp the mounting condition information of issuing on the described first patch installation kit place webpage, described mounting condition information comprises operating system condition and program/assembly condition; Generate new mounting condition according to described mounting condition information.
Wherein, when generating concrete mounting condition, described condition generation unit can comprise:
First condition generates subelement, if be used for the version of target machine environment target program/assembly, is lower than the latest edition in described program/assembly condition, judges that then corresponding patch file is suitable for installing.
In other embodiments, described condition generation unit also can comprise:
Second condition generates subelement, is used for when the patch file of the described first patch installation kit can be eliminated the leak that exists in certain program/assembly, judges that this patch file is suitable for installing.
Perhaps, described condition generation unit also can comprise:
The 3rd condition generates subelement, if be used for after certain machine environment is installed certain patch file, can repair the leak that exists in certain program/assembly, and the unsettled phenomenon of system can not occur, judge that then this patch file is suitable for installing in this machine environment.
Moreover described condition generation unit can also comprise:
The 4th condition generates subelement, if the target program/assembly that is used for certain patch file correspondence is irrelevant with the safety or the stability of system operation, and when this patch file not being installed not influencing the installation of other patch files, judges that this patch file is unsuitable for installation.
As seen, in the leak prosthetic device that the embodiment of the invention provides, can replace the mounting condition associated documents in the patch installation kit, generate new patch installation kit then, and the leak that exists in the program is repaired with new patch installation kit, wherein, mounting condition in the mounting condition associated documents after the replacement can be through former mounting condition is analyzed again, thereby the optimization renewal obtains, like this, mounting condition in the mounting condition associated documents after should newly replacing is more suitable for the user than the mounting condition in the original mounting condition associated documents, and the mounting condition of optimizing after upgrading can guarantee that the user installs patch timely and effectively, reduce system risk, and use when optimizing the mounting condition installation patch that upgrades, just can improve the success ratio that has leak in the repair procedure effectively.
More than to a kind of leak restorative procedure provided by the present invention and device, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, part in specific embodiments and applications all can change.In sum, this description should not be construed as limitation of the present invention.