Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide a kind of and overcome the problems referred to above or solve the driving backup of the problems referred to above, the method recovered and device at least in part.
According to an aspect of the invention, it is provided a kind of method driving backup, including: obtain the information of driver in operating system;Information according to each described driver, the system of will not belong to carries and the equipment of correspondence is not that the driver of central processing unit, CD-ROM drive and virtual unit is as candidate backup driver;Judging whether the facility information file that each described candidate backup driver is corresponding exists, if existing, then corresponding facility information file and driver file being backed-up.
The information of wherein said driver includes the file name of facility information file, device class, hardware ID, description information and manufacturer's information;The described information according to each described driver, the system of will not belong to carries and the equipment of correspondence is not central processing unit, CD-ROM drive or includes as candidate backup driver with the driver of virtual unit: judge whether it belongs to the driver that system carries according to the file name of facility information file corresponding to each described driver;For being not belonging to the driver that system carries, judge according to the device type of its correspondence whether the equipment of correspondence is central processing unit or CD-ROM drive;For be not belonging to system carry and correspondence equipment neither the driver of central processing unit and CD-ROM drive, judge whether corresponding equipment is virtual unit according to the device class of its correspondence, hardware ID, description information and manufacturer information;The system of will not belong to carry and correspondence equipment neither central processing unit, CD-ROM drive and virtual unit driver as candidate backup driver.
Wherein said driver file is by opening described facility information file, obtains the title of respective drive program file, and searches under system disk catalogue according to the title of described driver file and obtain.
Optionally, if the file name that there is facility information file corresponding to candidate backup driver described at least two is identical, then only facility information file corresponding to candidate backup driver one of them described and driver file are backed-up.
Optionally, described backup-step includes: according to preset backup path, described facility information file and driver file store the local disk except system disk to the sensing of described preset backup path or server.
Optionally, said method also comprises determining that in operating system the hardware device needing to recover driver;According to the described hardware device needing to recover driver, from Backup Data, obtain corresponding facility information file and driver file;Described facility information file and driver file are loaded in operating system.
Optionally, described determine that the hardware device needing to recover driver in operating system includes: whether detection operating system existing unknown device, if existing, then described unknown device being defined as needing recovering the hardware device of driver;Or, obtain the list of hardware device in operating system, receive user and the selection of hardware devices one or more in described list is inputted, and the one or more hardware device is defined as the hardware device needing to recover driver.
According to another aspect of the present invention, additionally provide a kind of device driving backup, including: getter, it is configured to obtain the information of driver in operating system;Screening washer, is configured to the information according to each described driver, and the system of will not belong to carries and the equipment of correspondence is not that the driver of central processing unit, CD-ROM drive and virtual unit is as candidate backup driver;Backup device, is configured to judge whether the facility information file that each described candidate backup driver is corresponding exists, if existing, then corresponding facility information file and driver file is backed-up.
The information of wherein said driver includes the file name of facility information file, device class, hardware ID, description information and manufacturer's information;Described screening washer includes: the first judge module, and the file name being configured to the facility information file corresponding according to each described driver judges whether it belongs to the driver that system carries;Second judge module, is configured to for being not belonging to the driver that system carries, and judges according to the device type of its correspondence whether the equipment of correspondence is central processing unit or CD-ROM drive;3rd judge module, it is configured to carry and the equipment of correspondence is not the driver of central processing unit and CD-ROM drive for being not belonging to system, judges whether corresponding equipment is virtual unit according to the device class of its correspondence, hardware ID, description information and manufacturer information;Determine module, be configured to the system that will not belong to carry and correspondence equipment neither central processing unit, CD-ROM drive and virtual unit driver as candidate backup driver.
Wherein said driver file is by opening described facility information file, obtains the title of respective drive program file, and searches under system disk catalogue according to the title of described driver file and obtain.
Optionally, if the file name that there is facility information file corresponding to candidate backup driver described at least two is identical, then only facility information file corresponding to candidate backup driver one of them described and driver file are backed-up.
Optionally, described backup device is specifically configured to, according to preset backup path, described facility information file and driver file store the local disk except system disk to the sensing of described preset backup path or server.
Optionally, said apparatus also includes: drives and recovers determiner, and being configured to determine that in operating system needs to recover the hardware device of driver;Drive backup getter, be configured to, according to the described hardware device needing to recover driver, from Backup Data, obtain corresponding facility information file and driver file;Drive load device, is configured to be loaded in operating system described facility information file and driver file.
Optionally, described driving recovers determiner and includes: first drives recovery to determine module, is configured in detection operating system and whether there is unknown device, if existing, then described unknown device is defined as needing the hardware device of recovery driver;And/or, second drives recovery to determine module, it is configured to obtain the list of hardware device in operating system, receives user and the selection of hardware devices one or more in described list is inputted, and the one or more hardware device is defined as the hardware device needing to recover driver.
According to a further aspect of the invention, additionally provide a kind of method driving recovery, comprise determining that the hardware device needing to recover driver in operating system;According to the described hardware device needing to recover driver, obtaining corresponding facility information file and driver file from Backup Data, wherein said Backup Data is the Backup Data of driver in operating system;Described facility information file and driver file are loaded in operating system.
Optionally, described determine that the hardware device needing to recover driver in operating system includes: whether detection operating system existing unknown device, if existing, then described unknown device being defined as needing recovering the hardware device of driver;Or, obtain the list of hardware device in operating system, receive user and the selection of hardware devices one or more in described list is inputted, and the one or more hardware device is defined as the hardware device needing to recover driver.
According to a further aspect of the invention, additionally provide a kind of device driving recovery, including: driving and recover determiner, being configured to determine that in operating system needs to recover the hardware device of driver;Driving backup getter, be configured to, according to the described hardware device needing to recover driver, obtain corresponding facility information file and driver file from Backup Data, wherein said Backup Data is the Backup Data of driver in operating system;Drive load device, is configured to be loaded in operating system described facility information file and driver file.
Optionally, described driving recovers determiner and includes: first drives recovery to determine module, is configured in detection operating system and whether there is unknown device, if existing, then described unknown device is defined as needing the hardware device of recovery driver;Or, second drives recovery to determine module, it is configured to obtain the list of hardware device in operating system, receives user and the selection of hardware devices one or more in described list is inputted, and the one or more hardware device is defined as the hardware device needing to recover driver.
The system that is not belonging in operating system can automatically be carried by technical scheme and the equipment of correspondence is not that the driver of central processing unit, CD-ROM drive and virtual unit is backed-up, avoid the trouble searching driver when repacking operation system on the one hand, on the other hand owing to only the driver that must be backed-up being backed-up, decrease the memory space shared by Backup Data.When repacking operation system, it is possible to be loaded in operating system by corresponding driver according to the driving data backed up, and it is no longer necessary to identify the model of distinct device, also without searching driver CD, simple to operate, required time is shorter, improves the efficiency installing driver.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should do not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Fig. 1 is the method flow diagram driving backup of one embodiment of the invention;As it can be seen, the method for this driving backup includes:
Step S110: obtain the information of driver in operating system.
Here operating system can be desktop operating system, such as MacOSX, Debian, Ubuntu, the Unix such as LinuxMint, SuseLinux, Fedora and class Unix operating system, and Windows2000, the Windows operating systems such as WindowsXP, WindowsVista, Windows7, Windows8;It can also be server OS, such as SUNSolaris, IBM-AIX, HP-UX, the Unix sequence of maneuvers systems such as FreeBSD, RedHatLinux, CentOS, Debian, the Linux sequence of maneuvers systems such as Ubuntu, and the Windows sequence of maneuvers system such as WindowsServer2003, WindowsServer2008, WindowsServer2008R2;Can also is that embedded OS, such as the embedded OS such as built-in Linux, WindowsCE and be widely used in smart mobile phone and the operating system such as the Android of panel computer, iOS, Symbian, WindowsPhone and BlackBerryOS.The embodiment of the present invention only illustrates for Windows operating system, and other operating system is referred to Windows operating system and performs.
Obtain the information of driver in operating system, can pass through to call to enumerate the system API (ApplicationProgrammingInterface of device driver, application programming interface) function realizes, the driver such as can installed in system by calling SetupAPI function to enumerate in Windows system, and obtain the details of each driver, these information can include hardware ID, device class, description information, manufacturer's information, INF (DeviceINFormationFile, facility information file) file name etc., wherein backing up most important information for driving is exactly INF file name.Wherein device class is the classification belonging to hardware device, includes device class item in system equipment manager in the routine information of this hardware device, the content that this device class item is corresponding, such as processor, video card etc., is namely the device class of hardware device;Manufacturer's information is the manufacturer information of hardware device, includes manufacturer's item in system equipment manager in the routine information of this hardware device, and namely the content that this manufacturer's item is corresponding is manufacturer's information of hardware device;Hardware ID refers to the numbering of hardware device, includes hardware ID item in the equipment manager of system in the details of hardware device, can find the hardware ID of this hardware device from this hardware ID item;Description information refers to equipment title in systems, namely the device name of display in equipment manager.INF is Microsoft Corporation is hardware device manufacturer a kind of file format of issuing that its driver is released, comprises the information of hardware device or script to control hardware operation in INF file.How this is installed in system to understand hardware driving in INF document, source file where, be installed in which file, how in registration table, to add self relevant information etc..
Step S120: the information according to each described driver, the system of will not belong to carries and the equipment of correspondence is not that the driver of central processing unit, CD-ROM drive and virtual unit is as candidate backup driver.
Owing to the many drivers in operating system are that operating system carries, just have when installing operating system, it is not necessary to backup, even if driver lost, it is also possible to repaired by system and recover.Additionally, also have such as virtual drive software, software virtual machine etc. may install the driver of some virtual units, and these drivers to be virtual drive software, software virtual machine carry, it is not required that backup.If be backed-up by these drivers that need not back up, both not in all senses, waste again memory space.
When implementing this step, judge whether a driver belongs to the driver that system carries, generally can judge according to the INF file name that each driver is corresponding, such as, the INF file name of the driver that the system of typically not belonging to carries starts with OEM, therefore, whether can be judge whether this driver belongs to system and carry with OEM beginning by first judging the INF file name of driver, if the INF file name of this driver is to start with OEM, then can be determined that this driver is not that system carries.But, some is not that the driver that system carries also is not required to backup, such as some CPU (CentralProcessingUnit, central processing unit) sometimes for installing third-party driver, the INF file name of this third-party driver is also start with OEM, but this driver is generally by the BIOS (BasicInputOutputSystem of mainboard, basic input output system) provide, also without backup, owing to the device type that the driver of CPU is corresponding is processor (processor), therefore, such driver can be got rid of at the row of backup by the driver that device type is processor is filtered;On the other hand, owing to the driver of CD-ROM drive is usually what system carried, need not back up, whether what have passed through INF file name is get rid of the row in backup with OEM beginning, but the driver of virtual drive is not belonging to system to be carried, and owing to the driver of virtual drive is included in virtual drive software, it is not required that backup, therefore, it can further the driver of virtual drive be got rid of the row in backup by being filtered by the driver that device type is cdrom (CD-ROM drive);In addition, the driver of virtual unit is also contained in virtual device software, also without backup, and because by the device class of its correspondence, hardware ID, description information and manufacturer information, the driver of virtual unit can judge whether corresponding equipment is that virtual unit judges, such as, the data base about the device class of known virtual unit, hardware ID, description information and manufacturer's information can be pre-build, virtual unit is associated with its device class respectively, hardware ID, description information and manufacturer's information, when specifically judgingCan according to device class corresponding to acquired driver, hardware ID, description One or more in information and manufacturer's information judges, for instance such as Vmware company of the manufacturer having, only manufacture virtual unit, if manufacturer's information of the driver obtained by API calls is Vmware company, then directly can be determined that the equipment that this driver is corresponding is virtual unit.So, it is also possible to further the driver of virtual unit is got rid of the row in backup.
In addition, some equipment in operating system, such as switchable pair of video card or multifunctional card reader, enumerating out by the API calls in order to enumerate device driver is multiple equipment, but these multiple equipment are installed by an installation procedure, corresponding INF file is same, namely the file name that there is facility information file corresponding at least two driver is identical, in this case, only facility information file corresponding to one of them driver and driver file are backed-up, to avoid backing up out driver data many parts identical, reduce the memory space shared by Backup Data further.
Step S130: judge whether the facility information file that each described candidate backup driver is corresponding exists, if existing, is then backed-up corresponding facility information file and driver file.
When implementing this step, can according to the file name of facility information file corresponding to each candidate backup driver, whether search has the file of same file title to exist under behaviour's system disk catalogue, for Windows system, windows make a look up under INF catalogue, if finding the file of same file title, then illustrate that the facility information file that this candidate backup driver is corresponding exists.
When the candidate backup driver that facility information file is existed is backed-up, according to preset backup path, corresponding driving data (facility information file and driver file) can be stored to preset backup path the local disk except system disk or server that point to.Such as, when driving data being stored to local disk except system disk, assume that C dish is system disk, it is possible to preset backup path is: D: Drivers, the driving data of respective drive program is stored to this preset backup path, wherein, here D dish can be fixed disk, it is also possible to for mobile USB flash disk (USB flash drive, USBflashdisk) stored etc..If selecting local disk storage driving data, then, overall formatting will not be can select that when refitting system, the driving data otherwise backed up will all be lost.For this, it is also possible to driving data is stored on the server so that the selection of formatting can not be subject to the restriction of backup path totally.Further, it is also possible to sectional lists stores corresponding driving data, for instance, it is possible to set up respective backup storage catalogue respectively for equipment such as mainboard, video card, sound card, printers, in order to search the driving data of each equipment.
The information of acquired driver is judged by above-described embodiment, system is carried and driver that software of installing carries gets rid of the row in backup, the system that only will not belong to carries, and the equipment of correspondence is not central processing unit, the driver that the installation software such as CD-ROM drive and virtual unit carries is as candidate backup driver, and then the candidate backup driver that facility information file exists is backed-up, so, owing to only the driver that must be backed-up being backed-up, decrease the memory space shared by Backup Data, and when re-operating system, according to the driver backed up, required driver can be installed, avoid the model needing to identify distinct device when repacking operation system and search the trouble of driver, required time is shorter, improve the efficiency installing driver.
The embodiment of the method that drive backup aforementioned with the present invention adapts, and Fig. 2 illustrates the device schematic diagram driving backup of one embodiment of the invention, as it can be seen, the device of this driving backup includes:
Getter 210, is configured to obtain the information of driver in operating system;
Screening washer 220, is configured to the information according to each described driver, and the system of will not belong to carries and the equipment of correspondence is not that the driver of central processing unit and CD-ROM drive and virtual unit is as candidate backup driver;
Backup device 230, is configured to judge whether the facility information file that each described candidate backup driver is corresponding exists, if existing, then corresponding facility information file and driver file is backed-up.
Optionally, the information of wherein said driver includes the file name of facility information file, device class, hardware ID, description information and manufacturer's information;Described screening washer includes: the first judge module, and the file name being configured to the facility information file corresponding according to each described driver judges whether it belongs to the driver that system carries;Second judge module, is configured to for being not belonging to the driver that system carries, and judges according to the device type of its correspondence whether the equipment of correspondence is central processing unit and CD-ROM drive;3rd judge module, it is configured to carry and the equipment of correspondence is not the driver of central processing unit and CD-ROM drive for being not belonging to system, judges whether corresponding equipment is virtual unit according to the device class of its correspondence, hardware ID, description information and manufacturer information;Determine module, be configured to the system that will not belong to carry and correspondence equipment neither the driver of central processing unit and CD-ROM drive and virtual unit as candidate backup driver.
Optionally, wherein said driver file is by opening described facility information file, obtains the title of respective drive program file, and searches under system disk catalogue according to the title of described driver file and obtain.
Optionally, if the file name that there is facility information file corresponding to candidate backup driver described at least two is identical, then only facility information file corresponding to candidate backup driver one of them described and driver file are backed-up.
Optionally, described backup device is specifically configured to, according to preset backup path, store described facility information file and driver file to the local disk except system disk or server.
Optionally, the device of above-mentioned driving backup also includes: drives and recovers determiner, is configured to determine that the hardware device needing to recover driver;Drive backup getter, be configured to, according to the described hardware device needing to recover driver, from Backup Data, obtain corresponding facility information file and driver file;Drive load device, is configured to be loaded in operating system described facility information file and driver file.
Optionally, described driving recovers determiner and includes: first drives recovery to determine module, is configured in detection operating system and whether there is unknown device, if existing, then described unknown device is defined as needing the hardware device of recovery driver;And/or, second drives recovery to determine module, it is configured to obtain the list of hardware device in operating system, receive user the selection of hardware devices one or more in described list is inputted, and the user received selects one or more hardware devices of input be defined as the hardware device needing to recover driver.
After the driver in operating system is backed-up, rapidly driver can be loaded in operating system according to the driving data backed up when repacking operation system.
Fig. 3 illustrates the method flow diagram driving recovery according to an embodiment of the invention;As it can be seen, the method that this driving recovers includes:
Step S310: determine the hardware device needing to recover driver in operating system.
When implementing this step, various ways can be had to automatically determine the hardware device needing to recover driver in operating system, for instance, it is possible to whether detection operating system exists unknown device, if existing, then described unknown device is defined as the hardware device needing to recover driver.Again such as, the list of hardware device in operating system can also be obtained, hardware device in wherein said list can be the hardware device that the driver backed up in aforementioned driving backup method embodiment is corresponding, and receive user's selection to hardware devices one or more in described list and input, and then the user received select one or more hardware devices of input be defined as the hardware device needing to recover driver.
Step S320: according to the described hardware device needing to recover driver, obtaining corresponding facility information file and driver file from Backup Data, wherein said Backup Data is the Backup Data of driver in operating system.
After step S310 determines the hardware device needing to recover driver, can according to this hardware device, title or ID such as this hardware device, automatically according to the store path (local disk or server) except system disk of Backup Data, make a look up from the Backup Data this store path and obtain corresponding facility information file and driver file, wherein, Backup Data here can be the aforementioned stored driving data of embodiment of the method driving backup.In addition, when Backup Data enters to store with equipment sectional lists such as mainboard, video card, sound card, printers, it is also possible to the title of the hardware device recovering driver as required finds corresponding facility information file and driver file automatically from store path.Step S330: described facility information file and driver file are loaded in operating system.
Owing to facility information document understands hardware driving, how this is installed in operating system, source file where, be installed in which file, how in registration table, to add self relevant information etc., according to the explanation in facility information file, can automatically driver file be loaded under destination folder.
Wherein, the selection input of one or more hardware devices in reception user is to list, and then when selecting one or more hardware devices of input to be defined as the hardware device needing to recover driver the user received, the words described from user side, for WindowsXP system, user can recover the driver of selected hardware device as follows:
1. the equipment manager of opening operation system, user is it can be seen that the list of hardware device in operating system;
2. from this list, choose the hardware device needing to recover to drive, click right mouse button (it can also be provided that clicking left mouse button), select " more newer driver " in a menu;
3. in the dialog box ejected, select " installing from the device driver list of computer or appointment position ";
4. in next dialog box, click " installing from disk " button;
5. select dialog box is clicked the Browse button at the file ejected;
6. select dialog box selects the catalogue at backup driver place in catalogue;
7. clicking the Next button to install, period is likely to also some confirmation dialog boxes needs user to confirm.
For other operating system or the operating system of other version of Windows, the operating procedure of the driver recovering selected hardware device may be slightly different, and repeats no more here.
Above-described embodiment can automatically determine or accept the hardware device needing to recover driver in user's assigned operation system, and then find facility information file and the driver file of correspondence rapidly, and it is automatically mounted in operating system, easy and simple to handle, the required time is shorter, improve the efficiency recovering driver, it is to avoid need to identify the model of each hardware device and search the trouble of respective drive CD when recovering driver.
The embodiment of the method that drive recovery aforementioned with the present invention adapts, and Fig. 4 illustrates the device schematic diagram driving recovery of one embodiment of the invention.As it can be seen, the device that this driving recovers includes:
Driving and recover determiner 410, being configured to determine that in operating system needs to recover the hardware device of driver;
Driving backup getter 420, be configured to, according to the described hardware device needing to recover driver, obtain corresponding facility information file and driver file from Backup Data, wherein said Backup Data is the Backup Data of driver in operating system;
Drive load device 430, is configured to be loaded in operating system described facility information file and driver file.
Optionally, described driving recovers determiner and includes: first drives recovery to determine module, is configured in detection operating system and whether there is unknown device, if existing, then described unknown device is defined as needing the hardware device of recovery driver;Or, second drives recovery to determine module, it is configured to obtain the list of hardware device in operating system, receive user the selection of hardware devices one or more in described list is inputted, and the user received selects one or more hardware devices of input be defined as the hardware device needing to recover driver.
Not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant in algorithm and the display of this offer.Various general-purpose systems can also with use based on together with this teaching.As described above, the structure constructed required by this kind of system is apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to utilize various programming language to realize the content of invention described herein, and the description above language-specific done is the preferred forms in order to disclose the present invention.
In description mentioned herein, describe a large amount of detail.It is to be appreciated, however, that embodiments of the invention can be put into practice when not having these details.In some instances, known method, structure and technology it are not shown specifically, in order to do not obscure the understanding of this description.
Similarly, it is to be understood that, one or more in order to what simplify that the disclosure helping understands in each inventive aspect, herein above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or descriptions thereof sometimes.But, the method for the disclosure should be construed to and reflect an intention that namely the present invention for required protection requires feature more more than the feature being expressly recited in each claim.More precisely, as the following claims reflect, inventive aspect is in that all features less than single embodiment disclosed above.Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, wherein each claim itself as the independent embodiment of the present invention.
Those skilled in the art are appreciated that, it is possible to carry out the module in the equipment in embodiment adaptively changing and they being arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit excludes each other, it is possible to adopt any combination that all processes or the unit of all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment are combined.Unless expressly stated otherwise, each feature disclosed in this specification (including adjoint claim, summary and accompanying drawing) can be replaced by the alternative features providing purpose identical, equivalent or similar.
In addition, those skilled in the art it will be appreciated that, although embodiments more described herein include some feature included in other embodiments rather than further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can mode use in any combination.
The all parts embodiment of the present invention can realize with hardware, or realizes with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize the some or all parts in equipment according to embodiments of the present invention.The present invention is also implemented as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can store on a computer-readable medium, or can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment without departing from the scope of the appended claims.In the claims, any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not exclude the presence of the element or step not arranged in the claims.Word "a" or "an" before being positioned at element does not exclude the presence of multiple such element.The present invention by means of including the hardware of some different elements and can realize by means of properly programmed computer.In the unit claim listing some devices, several in these devices can be through same hardware branch and specifically embody.Word first, second and third use do not indicate that any order.Can be title by these word explanations.