The content of the invention
The present invention provides a kind of leak restorative procedure and device, is conducive to improving the success of leak present in repair procedure
Rate.
The invention provides following scheme:
A kind of leak restorative procedure, including:
The first patch installation kit is obtained, the first mounting condition associated documents are extracted from the first patch installation kit;
The first mounting condition associated documents are replaced using the second mounting condition associated documents;
Second patch installation kit is generated according to the result after the first patch installation kit and replacement;
Leak reparation is carried out using the second patch installation kit.
Preferably, the first mounting condition associated documents include:
Installation test program and/or configuration file in first patch installation kit.
Preferably, also include:
The new mounting condition of generation, and the second mounting condition associated documents are generated according to new mounting condition.
Preferably, the new mounting condition of the generation includes:
The first mounting condition is extracted from the first mounting condition associated documents;Generated according to first mounting condition
New mounting condition.
Preferably, the new mounting condition of the generation includes:
Capture the mounting condition information issued on webpage where the first patch installation kit, the mounting condition packet
Include operating system condition and program/component condition;New mounting condition is generated according to the mounting condition information.
Preferably, the new mounting condition of the generation includes:
If the version of target program/component in target machine environment, less than the latest edition in described program/component condition
This, then judge that corresponding patch file is suitable to install;
Or,
When leak present in the patch file in the first patch installation kit can eliminate certain program/component, judge
The patch file is suitable to install;
Or,
If after installing certain patch file in certain machine environment, leak present in certain program/component can be repaired,
And be not in the unstable phenomenon of system, then judge that the patch file is suitable to be installed in the machine environment;
Or,
If the corresponding target program/component of certain patch file is unrelated with the safety or stability of system operation, and uneasy
When filling the patch file and not influenceing the installation of other patch files, judge that the patch file is unsuitable for installing.
A kind of leak prosthetic device, including:
Extraction unit, for obtaining the first patch installation kit, the first installation is extracted from the first patch installation kit
Condition associated documents;
Replacement unit, for replacing the first mounting condition associated documents using the second mounting condition associated documents;
Generation unit, installs for generating the second patch according to the result after the first patch installation kit and replacement
Bag;
Unit is repaired, for carrying out leak reparation using the second patch installation kit.
Preferably in the first mounting condition associated documents include:
Installation test program and/or configuration file in first patch installation kit.
Preferably, also include:
Condition generation unit, for generating new mounting condition, and installs according to new mounting condition generation described second
Condition associated documents.
Preferably, the condition generation unit includes:
Subelement is extracted, for extracting the first mounting condition from the first mounting condition associated documents;According to described
First mounting condition generates new mounting condition.
Preferably, the condition generation unit includes:
Crawl subelement, for capturing the mounting condition information issued on webpage where the first patch installation kit, institute
Stating mounting condition information includes operating system condition and program/component condition;Generated according to the mounting condition information new
Mounting condition.
Preferably, the condition generation unit includes:
First condition generates subelement, if for the version of target program/component in target machine environment, less than described
Latest edition in program/component condition, then judge that corresponding patch file is suitable to install;
Or,
Second condition generate subelement, for when the patch file in the first patch installation kit can eliminate certain program/
Present in component during leak, judge that the patch file is suitable to install;
Or,
Third condition generates subelement, if after for installing certain patch file in certain machine environment, can repair
Leak present in certain program/component, and be not in the unstable phenomenon of system, then judge that the patch file is suitable at this
Installed in machine environment;
Or,
Fourth condition generates subelement, if for the corresponding target program/component of certain patch file and system operation
Safety or stability are unrelated, and when not installing the patch file and not influenceing the installation of other patch files, judge the patch file
It is unsuitable for installing.
According to the specific embodiment that the present invention is provided, the invention discloses following technique effect:
The embodiment of the present invention can replace the mounting condition associated documents in patch installation kit, then generate new patch peace
Dress bag, and leak present in program is repaired with new patch installation kit, wherein, the related text of mounting condition after replacement
Mounting condition in part can be analyzed again by former mounting condition, so that optimize update what is obtained, so, after the new replacement
Mounting condition associated documents in mounting condition than the mounting condition in original mounting condition associated documents be more suitable for user pacify
Mounting condition after dress, and optimization renewal can ensure that user timely and effectively installs patch, reduce system risk, and use excellent
When changing the mounting condition for updating patch being installed, it is possible to effectively improve the success rate that there is leak in repair procedure.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained belongs to present invention protection
Scope.
Referring to Fig. 1, leak restorative procedure provided in an embodiment of the present invention is comprised the following steps:
S101:The first patch installation kit is obtained, the first mounting condition is extracted from the first patch installation kit related
File;
Wherein, so-called first patch installation kit can refer to the patch installation kit of the original author offer of software here,
Patch installation kit that such as Microsoft provides for its specific software product etc..What the original author of software would generally be provided
Patch installation kit is published in official website, therefore, this patch installation kit is also referred to as the patch installation kit of official's issue.Can
With by obtaining the patch installation kit that this official issues to modes such as downloads in official website.
For a patch installation kit, wherein patch file can be included, namely really it is used for repair procedure leak
File, will also include installation test program in addition.Wherein, installing test program includes a kind of executable text for installing patch
Part, specifically, can by installation test program before specific patch installation is carried out, according to the mounting condition for pre-setting,
Patch file in judging current machine environment and whether can installing the patch installation kit, if it is then install, otherwise not
The operation of installation can be performed.In addition, being also possible that a kind of can perform for test test program in some cases, is installed
File, specifically, the test program of related data can be run by installation test program, to judge that current patch file is
Whether the no leak that can repair designated program, or the installation of patch file brings the unstable etc. of system.
Wherein, specific mounting condition be probably write on installation test program in, as long as operation install test program, just
Automatically machine environment can be judged according to the mounting condition finished writing.In addition, in the case of also having one kind, it is specific to install
Condition is probably in writing on configuration file, to install test program operationally, it is necessary to read configuration file, recycles configuration text
Mounting condition in part, judges machine environment.
Therefore, in embodiments of the present invention, mounting condition associated documents can refer to the installation test in patch installation kit
Program and/or configuration file.If that is, mounting condition all write on installation test program in, mounting condition associated documents
Refer to just installation test program, when the first mounting condition associated documents are extracted, only in the patch installation kit of extraction official issue
Installation test program;If mounting condition is all write in configuration file, mounting condition associated documents are exactly to assign
File is put, when the first mounting condition associated documents are extracted, the configuration file only extracted in the patch installation kit of official's issue is
Can;If mounting condition partial write is in test program is installed, in configuration file, then mounting condition associated documents are just for partial write
Refer to that test program and configuration file are installed, when the first mounting condition associated documents are extracted, it is necessary to extract the benefit of official's issue
Installation test program and configuration file in fourth installation kit.
S102:The first mounting condition associated documents are replaced using the second mounting condition associated documents;
Second mounting condition associated documents are corresponding with the first mounting condition associated documents, if the first mounting condition
Associated documents are to install test program, then the second mounting condition associated documents should also be an installation test program, namely use one
Individual new test program of installing replaces original installation test program, so, when patch file is installed, will run new peace
Dress test program, and machine environment is judged according to the mounting condition set in new installation test program.
Similar, if the first mounting condition associated documents are configuration files, the second mounting condition associated documents also should
This is a configuration file, certainly, because the installation test program in patch installation kit does not change, therefore in order that peace
Dress test program can normally read configuration file, and the configuration file after replacement can use identical with original configuration file
Filename;So, the installation test program in patch installation kit is operationally, it is possible to read what is set in new configuration file
Mounting condition, and machine environment is judged according to the mounting condition.
Or, if the first mounting condition associated documents include installing test program and configuration file, second installs
Condition associated documents to should also be both include installs test program or including configuration file.Can also occur due to installing test program
Configuration file after change, therefore replacement can use identical filename with original configuration file, it would however also be possible to employ
Different filename, as long as the installation test program after replacing can normally read configuration file;So, patch is being installed
During file, new installation test program will be run, new installation test program can not only set according to itself in the process of running
Fixed mounting condition judged machine environment, can also read the mounting condition in new configuration file, and according to new
The mounting condition set in configuration file is judged machine environment.
In a word, no matter above-mentioned which kind of situation, can be by replacing the related text of the mounting condition in original patch installation kit
Part, realizes the modification to original mounting condition.
S103:Second patch installation kit is generated according to the result after the first patch installation kit and replacement;
After first mounting condition correlated condition replaced with into the second mounting condition associated documents, it is possible to by the first patch
Patch file and the second mounting condition associated documents in installation kit re-start packing, generate the second patch installation kit.So,
It is not changed in equivalent to the patch file in patch installation kit, simply mounting condition associated documents there occurs change.
Wherein, when the second patch installation kit is generated, the packaging method same with the first patch installation kit, example can be used
Such as, order of patch file etc. can be identical with the first patch installation kit, equivalent to by mounting condition phase in patch installation kit
Close the information reverting beyond file.
S104:Leak reparation is carried out using the second patch installation kit.
After generating the second patch installation kit, it is possible to the bug in machine is carried out using the second patch installation kit
Repair.
It can be seen that, in embodiments of the present invention, the mounting condition associated documents in patch installation kit can be replaced, then generate
New patch installation kit, and leak present in program is repaired with new patch installation kit, wherein, the installation after replacement
Mounting condition in condition associated documents can be analyzed again by former mounting condition, so that optimize update what is obtained, so,
The mounting condition in mounting condition associated documents after the new replacement is than the mounting condition in original mounting condition associated documents more
Being adapted to the mounting condition after user, and optimization renewal can ensure that user timely and effectively installs patch, reduce system risk, and
When the mounting condition updated using optimization installs patch, it is possible to effectively improve the success rate that there is leak in repair procedure.
Wherein, on the second patch installation kit, can manually be write by programmer etc., or program is write automatically
's.Specific mounting condition method to set up can have various, be introduced with one example of which below.
Generally, official is while patch installation kit is issued, and the mounting condition that patch installation kit can be issued on website is (logical
Often in a text form, independently of the presence of patch installation kit), these conditions generally operating system version only to machine, be directed to
Software and software version limitation.For example, while certain service packs is issued in certain official website, also having issued following letter
Breath:
" operating system:Windows XP sp3
software sp2
The machine condition 1:
C:\Program Files\Microsoft Office\OFFICE11\\winword.exe
The machine condition 2:
C:\Program Files\Microsoft Office\OFFICE11\\WINWORD.EXE”
It can be seen that, in these conditions, only including operating system condition and software condition, namely only to the version of operating system
Originally, the title of software and version are limited, in other words, as long as meeting in Windows XP sp3 operating systems
The above-mentioned software of version condition is stated, can be repaired with the patch file.But, for the patch installation kit that official issues
For, the mounting condition being provided with generally also includes other conditions, for example, being also possible that it in addition to above-mentioned condition
The judgement of his condition, the integrality of such as file, uniformity and dependence etc., so, as long as any one condition is discontented
Foot, cannot all realize the installation of patch file.
Therefore, when the second mounting condition associated documents are generated, it is possible to according to the operating system issued in official website
And software condition, new mounting condition is set, and generates new mounting condition associated documents.That is, in the second mounting condition phase
Close in file, the setting of mounting condition can only consider the factors such as operating system version and software version, and other files are complete
The factors such as whole property, uniformity and dependence may not necessarily consider.In addition, considering the version information of operating system and software
When, can also as much as possible include more versions, for example, the software version condition in official website is probably a closed zone
Between, and open interval is could be arranged in the embodiment of the present invention so that as long as the software version in target machine environment is less than official
The last look pointed out in website, can just install corresponding patch file.The mounting condition of so generation can be more suitable for user
Install so that certain operations system version and software version all meet the requirements, but integrality, the dependence of file etc. do not meet
It is required that machine environment, it is also possible to patch file is successfully installed.
Based on the above, in the case where the second mounting condition associated documents are manually generated, programmer just can be from benefit
Operating system condition and software bar in official website where fourth installation kit or needed for other approach acquisition patch installation kit
Part, then according to the condition, writes the code for installing test program, or write configuration file again again.Certainly, also
Can incorporate experience into, only some patch installation kits for install failure easily occur are entered according to the method described in the embodiment of the present invention
Row treatment.
In the case where the second mounting condition associated documents are automatically generated, installation test program can be pre-set or matched somebody with somebody
File template is put, and, crawl patch installation kit corresponding mounting condition automatic onto specified official website by a program
Information, after mounting condition information is grabbed, being automatically added to install in test program or profile template can generation
New installation test program or configuration file.
Certainly, in addition to using the mounting condition information issued in official website, can also obtain by other means
New mounting condition is taken, and the second patch installation kit is generated using new mounting condition.For example, it is also possible to from the first mounting condition
Associated documents extract the first mounting condition in carrying out, then obtain new mounting condition according to the first mounting condition.Specifically,
First mounting condition associated documents can be analyzed, for example, obtaining specified location in the first mounting condition associated documents
Information, or the first mounting condition associated documents are scanned using preset keyword, the corresponding information of keyword is obtained,
Etc., so as to therefrom extract the first mounting condition.Then by changing the first mounting condition or deleting some installations therein
The modes such as condition obtain new mounting condition.
Specifically when new mounting condition is generated, in addition to it can contemplate foregoing version information, it is also contemplated that other
Factor.If for example, be provided with a program or component in certain target machine environment, due to it is present may be to system operation
The dangerous or factors of instability are brought, and certain patch file can eliminate the danger just, then should just be installed in the machine
The patch file, when mounting condition is set, it is possible to be set to the program or component to install the patch file.Specifically
, when judging whether patch file can repair the leak of certain program or component, can be by checking that history reparation is recorded
Judged.In addition, as it was noted above, being also possible that the journey for being tested related data in installing test program
Sequence, accordingly it is also possible to pass through to run the program of the test to judge whether patch file can repair certain program or component
Leak.
In addition, there is likely to be situations below in actual applications:Because machine environment is usually relatively complex, specifically match somebody with somebody
Put etc. also different, if only consider operating system condition, software condition may be such that install some patch files it
Afterwards, the negative impact such as unstable of system is caused, if so, should not then install the patch file.For such case,
Can be carried out as follows:The patch file in the first patch installation kit is extracted, is met in operating system condition and software condition
It is required that in the case of, various possible machine environments are simulated, patch file is installed in various possible machine environments, by one
After the observation of section time, if it find that the phenomenons such as system is unstable are occurred in that under certain machine environment, then by this machine ring
Discharge outside the scope that can install the patch file in border.
Certainly, in actual applications, in the patch file of official's issue, some patch files are for the program or group repaired
Part (such as Office helps etc.), can't may impact to the security of system operation, stability etc., and if not
This patch file is installed, influence is not resulted on the installation with other patch files yet, then patch text may not necessarily be installed
Part, can so improve efficiency, it is to avoid unnecessary overhead.
Certainly, again may be by running the test program of installation test program in original patch installation kit to judge peace
After filling some patch files, if the negative impact such as unstable of system can be caused, or if some patches are not installed
File, if pair can be impacted, etc. with the installation of other patch files.
Corresponding with leak amending method provided in an embodiment of the present invention, the embodiment of the present invention additionally provides a kind of leak and repaiies
Apparatus for coating, referring to Fig. 2, the device includes:
Extraction unit 201, for obtaining the first patch installation kit, the first peace is extracted from the first patch installation kit
Dress condition associated documents;
Replacement unit 202, for replacing the first mounting condition associated documents using the second mounting condition associated documents;
Generation unit 203, for generating the second patch peace according to the result after the first patch installation kit and replacement
Dress bag;
Unit 204 is repaired, for carrying out leak reparation using the second patch installation kit.
Wherein, the first mounting condition associated documents include:
Installation test program and/or configuration file in first patch installation kit.
In practical application, can by the new mounting condition of programming automatic generation, and and then generate the second mounting condition phase
File is closed, now, the device can also include:
Condition generation unit, for generating new mounting condition, and installs according to new mounting condition generation described second
Condition associated documents.
Wherein, under a kind of implementation method, the condition generation unit can include:
Subelement is extracted, for extracting the first mounting condition from the first mounting condition associated documents;According to described
First mounting condition generates new mounting condition.
Under another embodiment, the condition generation unit can include:
Crawl subelement, for capturing the mounting condition information issued on webpage where the first patch installation kit, institute
Stating mounting condition information includes operating system condition and program/component condition;Generated according to the mounting condition information new
Mounting condition.
Wherein, when specific mounting condition is generated, the condition generation unit can include:
First condition generates subelement, if for the version of target program/component in target machine environment, less than described
Latest edition in program/component condition, then judge that corresponding patch file is suitable to install.
In other embodiments, the condition generation unit can also include:
Second condition generate subelement, for when the patch file in the first patch installation kit can eliminate certain program/
Present in component during leak, judge that the patch file is suitable to install.
Or, the condition generation unit can also include:
Third condition generates subelement, if after for installing certain patch file in certain machine environment, can repair
Leak present in certain program/component, and be not in the unstable phenomenon of system, then judge that the patch file is suitable at this
Installed in machine environment.
Furthermore, the condition generation unit can also include:
Fourth condition generates subelement, if for the corresponding target program/component of certain patch file and system operation
Safety or stability are unrelated, and when not installing the patch file and not influenceing the installation of other patch files, judge the patch file
It is unsuitable for installing.
It can be seen that, in leak prosthetic device provided in an embodiment of the present invention, the mounting bar in patch installation kit can be replaced
Part associated documents, then generate new patch installation kit, and leak present in program is repaiied with new patch installation kit
It is multiple, wherein, the mounting condition in mounting condition associated documents after replacement can be analyzed again by former mounting condition, so that
Optimization updates what is obtained, and so, the mounting condition in mounting condition associated documents after the new replacement is than original mounting condition phase
Close the mounting condition in file and be more suitable for user, and the mounting condition optimized after updating can ensure that user timely and effectively installs
Patch, reduces system risk, and when using the mounting condition that optimization updates that patch is installed, it is possible to effectively improve repair procedure
The middle success rate that there is leak.
Above to a kind of leak restorative procedure provided by the present invention and device, it is described in detail, it is used herein
Specific case is set forth to principle of the invention and implementation method, and the explanation of above example is only intended to help and understands
The method of the present invention and its core concept;Simultaneously for those of ordinary skill in the art, according to thought of the invention, in tool
Be will change in body implementation method and range of application.In sum, this specification content should not be construed as to the present invention
Limitation.