[go: up one dir, main page]

CN103064767B - Method and device for driver backup and restoration - Google Patents

Method and device for driver backup and restoration Download PDF

Info

Publication number
CN103064767B
CN103064767B CN201310007866.0A CN201310007866A CN103064767B CN 103064767 B CN103064767 B CN 103064767B CN 201310007866 A CN201310007866 A CN 201310007866A CN 103064767 B CN103064767 B CN 103064767B
Authority
CN
China
Prior art keywords
driver
file
equipment
backup
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310007866.0A
Other languages
Chinese (zh)
Other versions
CN103064767A (en
Inventor
何世伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201310007866.0A priority Critical patent/CN103064767B/en
Priority to CN201610113234.6A priority patent/CN105786652B/en
Publication of CN103064767A publication Critical patent/CN103064767A/en
Application granted granted Critical
Publication of CN103064767B publication Critical patent/CN103064767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for backup and recovery of a drive, wherein the method for backup of the drive comprises the following steps: acquiring information of a driver in an operating system; according to the information of each drive program, taking the drive program which does not belong to the system and the corresponding equipment is not a central processing unit, an optical drive and virtual equipment as a candidate backup drive program; and judging whether the equipment information file corresponding to each candidate backup driving program exists, and if so, backing up the corresponding equipment information file and the driving program file. The invention reduces the storage space occupied by driving the backup data, and can install the required driver according to the backed-up driver when operating the system again, thereby avoiding the trouble of identifying the models of different devices and searching the driver when reinstalling the operating system, having shorter time and improving the efficiency of installing the driver.

Description

驱动备份、恢复的方法及装置Method and device for driver backup and recovery

技术领域technical field

本发明涉及计算机技术领域,具体涉及一种驱动备份、恢复的方法及装置。The invention relates to the technical field of computers, in particular to a method and device for driving backup and restoration.

背景技术Background technique

驱动程序是操作系统控制硬件设备正常工作的一类接口程序。操作系统把指令发送给驱动程序,由驱动程序驱动硬件工作,同时还可以调整硬件的工作性能。例如,在安装完操作系统后,屏幕的显示颜色无法显示真彩色,这是由于只使用了显卡自带的最初级的驱动程序,导致显卡的性能无法正常发挥。为了使显卡的性能得到正常发挥,就需要安装一个显卡制造商为该显卡特定开发的驱动程序。A driver is a type of interface program used by the operating system to control the normal operation of hardware devices. The operating system sends instructions to the driver, and the driver drives the hardware to work, and can also adjust the performance of the hardware. For example, after the operating system is installed, the display color of the screen cannot display true color. This is because only the most basic driver program that comes with the graphics card is used, resulting in the performance of the graphics card not being able to perform normally. In order to make the performance of the graphics card play normally, it is necessary to install a driver specially developed by the graphics card manufacturer for the graphics card.

而驱动程序的安装也是用户调试和维护计算机时最头疼的问题,例如在重装系统后,需要安装显卡、声卡、网卡、视频头、打印机等设备的驱动程序,在安装驱动程序的过程中,要识别不同设备的型号,并查找相应的驱动程序,操作非常繁琐,而且效率较低。The installation of drivers is also the most troublesome problem when users debug and maintain computers. For example, after reinstalling the system, drivers for graphics cards, sound cards, network cards, video heads, printers, etc. need to be installed. During the driver installation process, It is very cumbersome and inefficient to identify the models of different devices and find the corresponding drivers.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的驱动备份、恢复的方法及装置。In view of the above problems, the present invention is proposed to provide a method and device for driver backup and recovery that overcome the above problems or at least partially solve the above problems.

根据本发明的一个方面,提供了一种驱动备份的方法,包括:获取操作系统中驱动程序的信息;根据每个所述驱动程序的信息,将不属于系统自带、并且对应的设备不是中央处理器、光驱和虚拟设备的驱动程序作为候选备份驱动程序;判断每个所述候选备份驱动程序对应的设备信息文件是否存在,若存在,则将对应的设备信息文件及驱动程序文件进行备份。According to one aspect of the present invention, a method for driver backup is provided, including: obtaining information about drivers in the operating system; The drivers of processor, optical drive and virtual device are used as candidate backup drivers; it is judged whether the device information files corresponding to each candidate backup driver exist, and if they exist, the corresponding device information files and driver files are backed up.

其中所述驱动程序的信息包括设备信息文件的文件名称、设备类别、硬件ID、描述信息和制造商信息;所述根据每个所述驱动程序的信息,将不属于系统自带、并且对应的设备不是中央处理器、光驱或和虚拟设备的驱动程序作为候选备份驱动程序包括:根据每个所述驱动程序对应的设备信息文件的文件名称判断其是否属于系统自带的驱动程序;对于不属于系统自带的驱动程序,根据其对应的设备类型判断对应的设备是否是中央处理器或光驱;对于不属于系统自带、并且对应的设备也不是中央处理器和光驱的驱动程序,根据其对应的设备类别、硬件ID、描述信息和制造商信息判断对应的设备是否是虚拟设备;将不属于系统自带、并且对应的设备也不是中央处理器、光驱和虚拟设备的驱动程序作为候选备份驱动程序。Wherein the information of the driver includes the file name of the device information file, device category, hardware ID, description information and manufacturer information; the information according to each driver will not belong to the system's own and corresponding Devices that are not central processing units, optical drives, or virtual device drivers as candidate backup drivers include: judging whether it belongs to the driver program that comes with the system according to the file name of the device information file corresponding to each driver; For the driver program that comes with the system, judge whether the corresponding device is a central processing unit or an optical drive according to its corresponding device type; for drivers that do not belong to the system and the corresponding device is not a central The device type, hardware ID, description information and manufacturer information to determine whether the corresponding device is a virtual device; the driver that does not belong to the system and the corresponding device is not a central processing unit, optical drive or virtual device is used as a candidate backup driver program.

其中所述驱动程序文件是通过打开所述设备信息文件,获取相应驱动程序文件的名称,并根据所述驱动程序文件的名称在系统盘目录下查找得到。The driver file is obtained by opening the device information file, obtaining the name of the corresponding driver file, and searching under the system disk directory according to the name of the driver file.

可选的,如果存在至少两个所述候选备份驱动程序对应的设备信息文件的文件名称相同,则只对其中一个所述候选备份驱动程序对应的设备信息文件和驱动程序文件进行备份。Optionally, if there are at least two device information files corresponding to the candidate backup driver with the same file name, only the device information file and the driver file corresponding to one of the candidate backup drivers are backed up.

可选的,所述备份步骤包括:根据预置备份路径,将所述设备信息文件及驱动程序文件存储至所述预置备份路径指向的除系统盘外的本地磁盘或者服务器。Optionally, the backup step includes: according to a preset backup path, storing the device information file and the driver program file to a local disk or server other than the system disk pointed to by the preset backup path.

可选的,上述方法还包括:确定操作系统中需要恢复驱动程序的硬件设备;根据所述需要恢复驱动程序的硬件设备,从备份数据中获取相应的设备信息文件及驱动程序文件;将所述设备信息文件及驱动程序文件加载到操作系统中。Optionally, the above method further includes: determining the hardware device in the operating system that needs to restore the driver; according to the hardware device that needs to restore the driver, obtain the corresponding device information file and the driver file from the backup data; Device information files and driver files are loaded into the operating system.

可选的,所述确定操作系统中需要恢复驱动程序的硬件设备包括:检测操作系统中是否存在未知设备,若存在,则将所述未知设备确定为需要恢复驱动程序的硬件设备;或者,获取操作系统中硬件设备的列表,接收用户对所述列表中一个或多个硬件设备的选择输入,以及将所述一个或多个硬件设备确定为需要恢复驱动程序的硬件设备。Optionally, the determining the hardware device that needs to restore the driver in the operating system includes: detecting whether there is an unknown device in the operating system, and if it exists, determining the unknown device as a hardware device that needs to restore the driver; or, obtaining A list of hardware devices in the operating system, receiving a user's selection input of one or more hardware devices in the list, and determining the one or more hardware devices as hardware devices that need to restore drivers.

根据本发明的另一个方面,还提供了一种驱动备份的装置,包括:获取器,被配置为获取操作系统中驱动程序的信息;筛选器,被配置为根据每个所述驱动程序的信息,将不属于系统自带、并且对应的设备不是中央处理器、光驱和虚拟设备的驱动程序作为候选备份驱动程序;备份器,被配置为判断每个所述候选备份驱动程序对应的设备信息文件是否存在,若存在,则将对应的设备信息文件及驱动程序文件进行备份。According to another aspect of the present invention, there is also provided a device for driver backup, including: an acquirer configured to acquire driver information in an operating system; a filter configured to A driver that does not belong to the system itself and whose corresponding device is not a central processing unit, an optical drive, or a virtual device is used as a candidate backup driver; the backup device is configured to determine the device information file corresponding to each candidate backup driver Whether it exists, if it exists, back up the corresponding device information file and driver program file.

其中所述驱动程序的信息包括设备信息文件的文件名称、设备类别、硬件ID、描述信息和制造商信息;所述筛选器包括:第一判断模块,被配置为根据每个所述驱动程序对应的设备信息文件的文件名称判断其是否属于系统自带的驱动程序;第二判断模块,被配置为对于不属于系统自带的驱动程序,根据其对应的设备类型判断对应的设备是否是中央处理器或光驱;第三判断模块,被配置为对于不属于系统自带、并且对应的设备不是中央处理器和光驱的驱动程序,根据其对应的设备类别、硬件ID、描述信息和制造商信息判断对应的设备是否是虚拟设备;确定模块,被配置为将不属于系统自带、并且对应的设备也不是中央处理器、光驱和虚拟设备的驱动程序作为候选备份驱动程序。Wherein the information of the driver includes the file name of the device information file, device category, hardware ID, description information and manufacturer information; the filter includes: a first judging module configured to correspond to each driver according to The file name of the device information file judges whether it belongs to the driver program that comes with the system; the second judging module is configured to judge whether the corresponding device is a central processing device according to the corresponding device type for the driver program that does not belong to the system device or optical drive; the third judging module is configured to judge according to the corresponding device category, hardware ID, description information and manufacturer information for drivers that do not belong to the system and whose corresponding devices are not central processing units and optical drives Whether the corresponding device is a virtual device; the determination module is configured to use a driver that does not belong to the system itself, and the corresponding device is not a central processing unit, an optical drive, or a virtual device as a candidate backup driver.

其中所述驱动程序文件是通过打开所述设备信息文件,获取相应驱动程序文件的名称,并根据所述驱动程序文件的名称在系统盘目录下查找得到。The driver file is obtained by opening the device information file, obtaining the name of the corresponding driver file, and searching under the system disk directory according to the name of the driver file.

可选的,如果存在至少两个所述候选备份驱动程序对应的设备信息文件的文件名称相同,则只对其中一个所述候选备份驱动程序对应的设备信息文件和驱动程序文件进行备份。Optionally, if there are at least two device information files corresponding to the candidate backup driver with the same file name, only the device information file and the driver file corresponding to one of the candidate backup drivers are backed up.

可选的,所述备份器具体被配置为根据预置备份路径,将所述设备信息文件及驱动程序文件存储至所述预置备份路径指向的除系统盘外的本地磁盘或者服务器。Optionally, the backup device is specifically configured to store the device information file and the driver program file to a local disk or server other than the system disk pointed to by the preset backup path according to a preset backup path.

可选的,上述装置还包括:驱动恢复确定器,被配置为确定操作系统中需要恢复驱动程序的硬件设备;驱动备份获取器,被配置为根据所述需要恢复驱动程序的硬件设备,从备份数据中获取相应的设备信息文件及驱动程序文件;驱动加载器,被配置为将所述设备信息文件及驱动程序文件加载到操作系统中。Optionally, the above device further includes: a driver restoration determiner, configured to determine the hardware device whose driver program needs to be restored in the operating system; a driver backup acquirer, configured to restore the driver program to the hardware device according to the need, from the backup Obtain corresponding device information files and driver program files from the data; the driver loader is configured to load the device information files and driver program files into the operating system.

可选的,所述驱动恢复确定器包括:第一驱动恢复确定模块,被配置为检测操作系统中是否存在未知设备,若存在,则将所述未知设备确定为需要恢复驱动程序的硬件设备;和/或,第二驱动恢复确定模块,被配置为获取操作系统中硬件设备的列表,接收用户对所述列表中一个或多个硬件设备的选择输入,以及将所述一个或多个硬件设备确定为需要恢复驱动程序的硬件设备。Optionally, the drive recovery determiner includes: a first drive recovery determination module configured to detect whether there is an unknown device in the operating system, and if so, determine the unknown device as a hardware device that needs to restore the driver; And/or, the second drive recovery determination module is configured to obtain a list of hardware devices in the operating system, receive user selection input for one or more hardware devices in the list, and set the one or more hardware devices to Identify hardware devices that require driver recovery.

根据本发明的又一个方面,还提供了一种驱动恢复的方法,包括:确定操作系统中需要恢复驱动程序的硬件设备;根据所述需要恢复驱动程序的硬件设备,从备份数据中获取相应的设备信息文件及驱动程序文件,其中所述备份数据是操作系统中驱动程序的备份数据;将所述设备信息文件及驱动程序文件加载到操作系统中。According to another aspect of the present invention, there is also provided a method for driver recovery, including: determining the hardware device in the operating system that needs to restore the driver program; according to the hardware device that needs to restore the driver program, obtain the corresponding The device information file and the driver program file, wherein the backup data is the backup data of the driver program in the operating system; the device information file and the driver program file are loaded into the operating system.

可选的,所述确定操作系统中需要恢复驱动程序的硬件设备包括:检测操作系统中是否存在未知设备,若存在,则将所述未知设备确定为需要恢复驱动程序的硬件设备;或者,获取操作系统中硬件设备的列表,接收用户对所述列表中一个或多个硬件设备的选择输入,以及将所述一个或多个硬件设备确定为需要恢复驱动程序的硬件设备。Optionally, the determining the hardware device that needs to restore the driver in the operating system includes: detecting whether there is an unknown device in the operating system, and if it exists, determining the unknown device as a hardware device that needs to restore the driver; or, obtaining A list of hardware devices in the operating system, receiving a user's selection input of one or more hardware devices in the list, and determining the one or more hardware devices as hardware devices that need to restore drivers.

根据本发明的再一个方面,还提供了一种驱动恢复的装置,包括:驱动恢复确定器,被配置为确定操作系统中需要恢复驱动程序的硬件设备;驱动备份获取器,被配置为根据所述需要恢复驱动程序的硬件设备,从备份数据中获取相应的设备信息文件及驱动程序文件,其中所述备份数据是操作系统中驱动程序的备份数据;驱动加载器,被配置为将所述设备信息文件及驱动程序文件加载到操作系统中。According to still another aspect of the present invention, there is also provided a device for driver restoration, including: a driver restoration determiner configured to determine a hardware device in an operating system that needs to restore a driver; a driver backup acquirer configured to Describe the hardware device that needs to restore the driver program, and obtain the corresponding device information file and driver program file from the backup data, wherein the backup data is the backup data of the driver program in the operating system; the driver loader is configured to convert the device Information files and driver files are loaded into the operating system.

可选的,所述驱动恢复确定器包括:第一驱动恢复确定模块,被配置为检测操作系统中是否存在未知设备,若存在,则将所述未知设备确定为需要恢复驱动程序的硬件设备;或者,第二驱动恢复确定模块,被配置为获取操作系统中硬件设备的列表,接收用户对所述列表中一个或多个硬件设备的选择输入,以及将所述一个或多个硬件设备确定为需要恢复驱动程序的硬件设备。Optionally, the drive recovery determiner includes: a first drive recovery determination module configured to detect whether there is an unknown device in the operating system, and if so, determine the unknown device as a hardware device that needs to restore the driver; Alternatively, the second drive recovery determination module is configured to obtain a list of hardware devices in the operating system, receive user selection input on one or more hardware devices in the list, and determine the one or more hardware devices as Hardware devices that require driver recovery.

本发明的技术方案可以自动地将操作系统中不属于系统自带、并且对应的设备不是中央处理器、光驱和虚拟设备的驱动程序进行备份,一方面避免了在重装操作系统时查找驱动程序的麻烦,另一方面由于只对必需进行备份的驱动程序进行备份,减少了备份数据所占用的存储空间。在重装操作系统时,可以根据所备份的驱动数据将相应的驱动程序加载到操作系统中,而不再需要识别不同设备的型号,也不需要查找驱动程序光盘,操作简单,所需时间较短,提高了安装驱动程序的效率。The technical scheme of the present invention can automatically back up the driver programs in the operating system that are not included in the system and whose corresponding devices are not central processing units, CD-ROM drives and virtual devices. On the one hand, it avoids searching for drivers when reinstalling the operating system On the other hand, because only the drivers that must be backed up are backed up, the storage space taken by the backup data is reduced. When reinstalling the operating system, the corresponding driver can be loaded into the operating system according to the backed-up driver data, and it is no longer necessary to identify the models of different devices, and it is not necessary to search for the driver disc. The operation is simple and the time required is relatively short. Short, improve the efficiency of driver installation.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1为本发明一个实施例的驱动备份的方法流程图;Fig. 1 is the method flowchart of the drive backup of an embodiment of the present invention;

图2示出了本发明一个实施例的驱动备份的装置示意图;Fig. 2 shows a schematic diagram of a drive backup device according to an embodiment of the present invention;

图3示出了根据本发明一个实施例的驱动恢复的方法流程图;FIG. 3 shows a flowchart of a method for driving recovery according to an embodiment of the present invention;

图4示出了本发明一个实施例的驱动恢复的装置示意图。Fig. 4 shows a schematic diagram of a drive recovery device according to an embodiment of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

图1为本发明一个实施例的驱动备份的方法流程图;如图所示,该驱动备份的方法包括:Fig. 1 is the method flowchart of the drive backup of an embodiment of the present invention; As shown in the figure, the method for drive backup comprises:

步骤S110:获取操作系统中驱动程序的信息。Step S110: Obtain information about the driver in the operating system.

这里的操作系统可以是桌面操作系统,如MacOSX,Debian,Ubuntu,LinuxMint,SuseLinux,Fedora等Unix和类Unix操作系统,以及Windows2000,WindowsXP,WindowsVista,Windows7,Windows8等Windows操作系统;也可以是服务器操作系统,如SUNSolaris,IBM-AIX,HP-UX,FreeBSD等Unix系列操作系统,RedHatLinux,CentOS,Debian,Ubuntu等Linux系列操作系统,以及WindowsServer2003,WindowsServer2008,WindowsServer2008R2等Windows系列操作系统;还可以是嵌入式操作系统,如嵌入式Linux、WindowsCE等嵌入式操作系统以及广泛应用在智能手机和平板电脑的Android、iOS、Symbian、WindowsPhone和BlackBerryOS等操作系统。本发明实施例仅以Windows操作系统为例进行说明,其它操作系统可以参照Windows操作系统来执行。The operating system here can be a desktop operating system, such as MacOSX, Debian, Ubuntu, LinuxMint, SuseLinux, Fedora and other Unix and Unix-like operating systems, as well as Windows operating systems such as Windows2000, WindowsXP, WindowsVista, Windows7, Windows8; it can also be a server operation System, such as SUNSolaris, IBM-AIX, HP-UX, FreeBSD and other Unix series operating systems, RedHatLinux, CentOS, Debian, Ubuntu and other Linux series operating systems, and WindowsServer2003, WindowsServer2008, WindowsServer2008R2 and other Windows series operating systems; it can also be embedded Operating systems, such as embedded Linux, WindowsCE and other embedded operating systems, as well as Android, iOS, Symbian, WindowsPhone and BlackBerryOS and other operating systems widely used in smart phones and tablet computers. The embodiment of the present invention is described only by taking the Windows operating system as an example, and other operating systems may be executed with reference to the Windows operating system.

获取操作系统中驱动程序的信息,可以通过调用用以枚举设备驱动程序的系统API(ApplicationProgrammingInterface,应用程序编程接口)函数来实现,例如在Windows系统中可以通过调用SetupAPI函数来枚举统中安装的驱动程序,并获取每个驱动程序的详细信息,这些信息可以包括硬件ID、设备类别、描述信息、制造商信息、INF(DeviceINFormationFile,设备信息文件)文件名称等,其中对于驱动备份最重要的信息就是INF文件名称。其中设备类别是硬件设备所属的类别,在系统设备管理器中该硬件设备的常规信息中包含有设备类别项,该设备类别项对应的内容,如处理器、显卡等,即是硬件设备的设备类别;制造商信息是硬件设备的生产者信息,在系统设备管理器中该硬件设备的常规信息中包含有制造商项,该制造商项对应的内容即是硬件设备的制造商信息;硬件ID是指硬件设备的编号,在系统的设备管理器中硬件设备的详细信息中包含有硬件ID项,从该硬件ID项下可以找到该硬件设备的硬件ID;描述信息是指设备在系统中的名称,也就是在设备管理器中显示的设备名称。INF是Microsoft公司为硬件设备制造商发布其驱动程序推出的一种文件格式,INF文件中包含硬件设备的信息或脚本以控制硬件操作。在INF文件中指明了硬件驱动该如何安装到系统中,源文件在哪里、安装到哪一个文件夹中、怎样在注册表中加入自身相关信息等等。Obtaining the information of the driver in the operating system can be achieved by calling the system API (Application Programming Interface, application programming interface) function used to enumerate the device driver. driver, and get the detailed information of each driver, which can include hardware ID, device category, description information, manufacturer information, INF (DeviceINFormationFile, device information file) file name, etc., among which the most important for driver backup The information is the INF file name. The device category is the category to which the hardware device belongs. The general information of the hardware device in the system device manager contains the device category item. The corresponding content of the device category item, such as processor, graphics card, etc., is the device of the hardware device. Category; manufacturer information is the producer information of the hardware device. The general information of the hardware device in the system device manager contains a manufacturer item, and the content corresponding to the manufacturer item is the manufacturer information of the hardware device; hardware ID Refers to the serial number of the hardware device. The hardware ID item is included in the detailed information of the hardware device in the device manager of the system, and the hardware ID of the hardware device can be found under the hardware ID item; the description information refers to the device's status in the system. Name, which is the name of the device as it appears in Device Manager. INF is a file format launched by Microsoft for hardware device manufacturers to release their drivers. The INF file contains hardware device information or scripts to control hardware operations. In the INF file, it is specified how to install the hardware driver into the system, where the source file is, which folder it is installed in, how to add its own related information in the registry, and so on.

步骤S120:根据每个所述驱动程序的信息,将不属于系统自带、并且对应的设备不是中央处理器、光驱和虚拟设备的驱动程序作为候选备份驱动程序。Step S120: according to the information of each driver, take the driver that does not belong to the system and whose corresponding device is not a central processing unit, an optical drive, or a virtual device as a candidate backup driver.

由于操作系统中的许多驱动程序是操作系统自带的,在安装操作系统的时候就已经有了,不需要备份,即使驱动程序丢失了,也可以通过系统修复来恢复。此外,还有诸如虚拟光驱软件、虚拟机软件等可能会安装一些虚拟设备的驱动程序,而这些驱动程序是虚拟光驱软件、虚拟机软件自带的,也不需要备份。如果将这些不需要备份的驱动程序进行备份,既没有任何意义,又浪费了存储空间。Since many drivers in the operating system are self-contained, they already exist when the operating system is installed, and there is no need to back them up. Even if the drivers are lost, they can be restored through system repair. In addition, there are drivers such as virtual CD-ROM software and virtual machine software that may install some virtual devices, and these drivers are built-in by the virtual CD-ROM software and virtual machine software, and do not need to be backed up. If these drivers that do not need to be backed up are backed up, it is meaningless and a waste of storage space.

在具体实现本步骤时,判断一个驱动程序是否属于系统自带的驱动程序,一般可以根据每个驱动程序对应的INF文件名称来判断,例如,一般不属于系统自带的驱动程序的INF文件名称以OEM开头,因此,可以通过先判断驱动程序的INF文件名称是否是以OEM开头来判断该驱动程序是否属于系统自带,如果该驱动程序的INF文件名称是以OEM开头,则可以判定该驱动程序不是系统自带的。然而,有些不是系统自带的驱动程序也并不需要备份,如有些CPU(CentralProcessingUnit,中央处理器)有时需要安装第三方的驱动程序,该第三方的驱动程序的INF文件名称也是以OEM开头,但这种驱动程序一般由主板的BIOS(BasicInputOutputSystem,基本输入输出系统)提供,也不需要备份,由于CPU的驱动程序对应的设备类型为processor(处理器),因此,可以通过将设备类型为processor的驱动程序滤除来将该类驱动程序排除在备份之列;另一方面,由于光驱的驱动程序一般是系统自带的,不需要备份,已通过INF文件名称的是否是以OEM开头排除在备份之列,但虚拟光驱的驱动程序不属于系统自带,而由于虚拟光驱的驱动程序包含在虚拟光驱软件中,也不需要备份,因此,可以通过将设备类型为cdrom(光驱)的驱动程序滤除进一步将虚拟光驱的驱动程序排除在备份之列;此外,虚拟设备的驱动程序也包含在虚拟设备软件中,也不需要备份,而由于虚拟设备的驱动程序可以通过其对应的设备类别、硬件ID、描述信息和制造商信息判断对应的设备是否是虚拟设备来判定,例如,可以预先建立关于已知虚拟设备的设备类别、硬件ID、描述信息和制造商信息的数据库,将虚拟设备与分别其设备类别、硬件ID、描述信息和制造商信息相关联,在具体判定时,可以根据所获取的驱动程序对应的设备类别、硬件ID、描述信息和制造商信息中的一项或多项进行判定,例如有的制造商如Vmware公司,只制造虚拟设备,如果通过系统API函数获取的驱动程序的制造商信息为Vmware公司,则直接可以判定该驱动程序对应的设备为虚拟设备。这样,也可以进一步将虚拟设备的驱动程序排除在备份之列。When implementing this step specifically, to judge whether a driver program belongs to the driver program that comes with the system, it can generally be judged according to the INF file name corresponding to each driver program, for example, the INF file name that generally does not belong to the driver program that comes with the system Start with OEM, therefore, you can judge whether the driver is included with the system by first judging whether the INF file name of the driver starts with OEM. If the INF file name of the driver starts with OEM, you can determine whether the driver The program is not native to the system. However, some drivers that are not included in the system do not need to be backed up. For example, some CPUs (Central Processing Unit, central processing unit) sometimes need to install a third-party driver. The INF file name of the third-party driver also starts with OEM. However, this driver is generally provided by the motherboard's BIOS (BasicInputOutputSystem, basic input and output system), and does not need to be backed up. Since the device type corresponding to the CPU driver is processor (processor), you can set the device type to processor Filter out the driver program to exclude this type of driver program from the backup; on the other hand, since the driver program of the CD-ROM drive is generally built-in by the system, no backup is required, and whether the INF file name starts with OEM is excluded from the backup, but the driver of the virtual CD-ROM is not included in the system, and since the driver of the virtual CD-ROM is included in the virtual CD-ROM software, it does not need to be backed up. Filtering out further excludes the driver of the virtual CD-ROM from the list of backup; in addition, the driver of the virtual device is also included in the virtual device software, and does not need to be backed up, and because the driver of the virtual device can pass its corresponding device category, hardware ID, description information, and manufacturer information to determine whether the corresponding device is a virtual device. The device category, hardware ID, description information, and manufacturer information are associated with each other. When making a specific decision, one or more of the obtained driver's corresponding device category, hardware ID, description information, and manufacturer information can be used. To determine, for example, some manufacturers, such as Vmware, only manufacture virtual devices. If the manufacturer information of the driver obtained through the system API function is Vmware, it can be directly determined that the device corresponding to the driver is a virtual device. In this way, the driver of the virtual device can also be further excluded from the backup.

此外,操作系统中的有些设备,比如可切换的双显卡或多功能读卡器,通过用以枚举设备驱动程序的系统API函数枚举出来是多个设备,但是这多个设备是通过一个安装程序安装的,对应的INF文件是同一个,即存在至少两个驱动程序对应的设备信息文件的文件名称相同,这种情况下,只对其中一个驱动程序对应的设备信息文件和驱动程序文件进行备份,以避免备份出多份相同的驱动程序数据,进一步减少备份数据所占的存储空间。In addition, some devices in the operating system, such as switchable dual graphics cards or multi-function card readers, are enumerated as multiple devices through the system API function used to enumerate device drivers, but these multiple devices are passed through a Installed by the installer, the corresponding INF file is the same, that is, there are at least two device information files corresponding to the driver with the same file name. In this case, only the device information file and driver file corresponding to one of the drivers Make a backup to avoid backing up multiple copies of the same driver data, further reducing the storage space occupied by the backup data.

步骤S130:判断每个所述候选备份驱动程序对应的设备信息文件是否存在,若存在,则将对应的设备信息文件及驱动程序文件进行备份。Step S130: Determine whether the device information file corresponding to each candidate backup driver exists, and if so, back up the corresponding device information file and driver file.

在具体实现本步骤时,可以根据每个候选备份驱动程序对应的设备信息文件的文件名称,查找操系统盘目录下是否有相同文件名称的文件存在,对于Windows系统而言,在windows\INF目录下进行查找,如果查找到相同文件名称的文件,则说明该候选备份驱动程序对应的设备信息文件存在。When implementing this step, you can search whether there is a file with the same file name in the operating system disk directory according to the file name of the device information file corresponding to each candidate backup driver. For the Windows system, in the windows\INF directory If a file with the same file name is found, it means that the device information file corresponding to the candidate backup driver exists.

在对设备信息文件存在的候选备份驱动程序进行备份时,可以按照预置备份路径,将对应的驱动数据(设备信息文件和驱动程序文件)存储至预置备份路径指向的除系统盘外的本地磁盘或者服务器。例如,在将驱动数据存储至除系统盘外的本地磁盘时,假设C盘为系统盘,那么,可以预置备份路径为:D:\Drivers,将相应驱动程序的驱动数据存储至该预置备份路径下,其中,这里的D盘可以为固定磁盘,也可以为移动存储的U盘(USB闪存盘,USBflashdisk)等等。如果选择本地磁盘存储驱动数据,那么,在重装系统的时候将不能选择全盘格式化,否则备份的驱动数据将全部丢失。为此,还可以将驱动数据存储在服务器上,使得全盘格式化的选择可以不受备份路径的限制。此外,还可以分目录存储相应的驱动数据,例如,可以为主板、显卡、声卡、打印机等设备分别建立各自的备份存储目录,以便于查找各设备的驱动数据。When backing up candidate backup drivers with device information files, the corresponding driver data (device information files and driver files) can be stored in a local location other than the system disk pointed to by the preset backup path according to the preset backup path disk or server. For example, when storing the driver data to a local disk other than the system disk, assuming that the C disk is the system disk, then you can preset the backup path as: D:\Drivers, and store the driver data of the corresponding driver to this preset Under the backup path, the D disk here can be a fixed disk, or a U disk (USB flash disk, USB flashdisk) for mobile storage, etc. If you choose the local disk to store the driver data, then you cannot choose to format the entire disk when reinstalling the system, otherwise the backup driver data will be lost. For this reason, the drive data can also be stored on the server, so that the choice of full disk formatting can not be limited by the backup path. In addition, corresponding driver data can also be stored in sub-directories. For example, separate backup storage directories can be established for motherboards, graphics cards, sound cards, printers and other devices, so as to find the driver data of each device.

上述实施例对所获取的驱动程序的信息进行判断,将系统自带以及装机软件自带的驱动程序排除在备份之列,只将不属于系统自带、并且对应的设备不是中央处理器、光驱和虚拟设备等装机软件自带的驱动程序作为候选备份驱动程序,进而将设备信息文件存在的候选备份驱动程序进行备份,这样,由于只对必需进行备份的驱动程序进行备份,减少了备份数据所占用的存储空间,而且在重新操作系统时,可以根据所备份的驱动程序安装所需的驱动程序,避免了在重装操作系统时需要识别不同设备的型号及查找驱动程序的麻烦,所需时间较短,提高了安装驱动程序的效率。The above-described embodiment judges the information of the acquired driver, excludes the driver that comes with the system and the installed software from the list of backups, and only does not belong to the system, and the corresponding equipment is not a central processing unit or a CD-ROM. The drivers that come with installed software such as virtual devices and virtual devices are used as candidate backup drivers, and then the candidate backup drivers that exist in the device information files are backed up. In this way, since only the drivers that must be backed up are backed up, the backup data is reduced. The storage space occupied, and when reinstalling the operating system, the required driver can be installed according to the backed up driver, avoiding the trouble of identifying different device models and finding the driver when reinstalling the operating system, and the time required Shorter, which improves the efficiency of driver installation.

与本发明前述驱动备份的方法实施例相适应,图2示出了本发明一个实施例的驱动备份的装置示意图,如图所示,该驱动备份的装置包括:Compatible with the foregoing method embodiment of drive backup in the present invention, Fig. 2 shows a schematic diagram of a device for drive backup in an embodiment of the present invention, as shown in the figure, the device for drive backup includes:

获取器210,被配置为获取操作系统中驱动程序的信息;The acquirer 210 is configured to acquire the information of the driver in the operating system;

筛选器220,被配置为根据每个所述驱动程序的信息,将不属于系统自带、并且对应的设备不是中央处理器和光驱和虚拟设备的驱动程序作为候选备份驱动程序;The filter 220 is configured to use, according to the information of each driver, a driver that does not belong to the system and whose corresponding device is not a central processing unit, an optical drive, or a virtual device as a candidate backup driver;

备份器230,被配置为判断每个所述候选备份驱动程序对应的设备信息文件是否存在,若存在,则将对应的设备信息文件及驱动程序文件进行备份。The backup device 230 is configured to determine whether a device information file corresponding to each candidate backup driver exists, and if so, back up the corresponding device information file and driver file.

可选的,其中所述驱动程序的信息包括设备信息文件的文件名称、设备类别、硬件ID、描述信息和制造商信息;所述筛选器包括:第一判断模块,被配置为根据每个所述驱动程序对应的设备信息文件的文件名称判断其是否属于系统自带的驱动程序;第二判断模块,被配置为对于不属于系统自带的驱动程序,根据其对应的设备类型判断对应的设备是否是中央处理器和光驱;第三判断模块,被配置为对于不属于系统自带、并且对应的设备不是中央处理器和光驱的驱动程序,根据其对应的设备类别、硬件ID、描述信息和制造商信息判断对应的设备是否是虚拟设备;确定模块,被配置为将不属于系统自带、并且对应的设备也不是中央处理器和光驱和虚拟设备的驱动程序作为候选备份驱动程序。Optionally, the information of the driver includes the file name, device category, hardware ID, description information and manufacturer information of the device information file; the filter includes: a first judging module configured to According to the file name of the device information file corresponding to the driver program, it is judged whether it belongs to the driver program that comes with the system; the second judging module is configured to judge the corresponding device according to the corresponding device type for the driver program that does not belong to the system. Whether it is a central processing unit and an optical drive; the third judging module is configured to, according to its corresponding device category, hardware ID, description information and The manufacturer information determines whether the corresponding device is a virtual device; the determination module is configured to use a driver that does not belong to the system itself, and the corresponding device is not a central processing unit, an optical drive, or a virtual device as a candidate backup driver.

可选的,其中所述驱动程序文件是通过打开所述设备信息文件,获取相应驱动程序文件的名称,并根据所述驱动程序文件的名称在系统盘目录下查找得到。Optionally, the driver file is obtained by opening the device information file, obtaining the name of the corresponding driver file, and searching under the system disk directory according to the name of the driver file.

可选的,如果存在至少两个所述候选备份驱动程序对应的设备信息文件的文件名称相同,则只对其中一个所述候选备份驱动程序对应的设备信息文件和驱动程序文件进行备份。Optionally, if there are at least two device information files corresponding to the candidate backup driver with the same file name, only the device information file and the driver file corresponding to one of the candidate backup drivers are backed up.

可选的,所述备份器具体被配置为根据预置备份路径,将所述设备信息文件及驱动程序文件存储至除系统盘外的本地磁盘或者服务器。Optionally, the backup device is specifically configured to store the device information file and driver program file to a local disk or server other than the system disk according to a preset backup path.

可选的,上述驱动备份的装置还包括:驱动恢复确定器,被配置为确定需要恢复驱动程序的硬件设备;驱动备份获取器,被配置为根据所述需要恢复驱动程序的硬件设备,从备份数据中获取相应的设备信息文件及驱动程序文件;驱动加载器,被配置为将所述设备信息文件及驱动程序文件加载到操作系统中。Optionally, the above-mentioned device for driver backup further includes: a driver recovery determiner configured to determine the hardware device that needs to restore the driver program; Obtain corresponding device information files and driver program files from the data; the driver loader is configured to load the device information files and driver program files into the operating system.

可选的,所述驱动恢复确定器包括:第一驱动恢复确定模块,被配置为检测操作系统中是否存在未知设备,若存在,则将所述未知设备确定为需要恢复驱动程序的硬件设备;和/或,第二驱动恢复确定模块,被配置为获取操作系统中硬件设备的列表,接收用户对所述列表中一个或多个硬件设备的选择输入,以及将所接收的用户选择输入的一个或多个硬件设备确定为需要恢复驱动程序的硬件设备。Optionally, the drive recovery determiner includes: a first drive recovery determination module configured to detect whether there is an unknown device in the operating system, and if so, determine the unknown device as a hardware device that needs to restore the driver; And/or, the second drive recovery determination module is configured to obtain a list of hardware devices in the operating system, receive user selection input on one or more hardware devices in the list, and use one of the received user selection inputs One or more hardware devices were identified as hardware devices that require driver recovery.

在对操作系统中的驱动程序进行备份后,即可在重装操作系统时根据所备份的驱动数据快速地将驱动程序加载到操作系统中。After the driver program in the operating system is backed up, the driver program can be quickly loaded into the operating system according to the backed up driver data when the operating system is reinstalled.

图3示出了根据本发明一个实施例的驱动恢复的方法流程图;如图所示,该驱动恢复的方法包括:FIG. 3 shows a flowchart of a method for driving recovery according to an embodiment of the present invention; as shown in the figure, the method for driving recovery includes:

步骤S310:确定操作系统中需要恢复驱动程序的硬件设备。Step S310: Determine the hardware device in the operating system that needs to restore the driver.

在具体实现本步骤时,可以有多种方式自动确定操作系统中需要恢复驱动程序的硬件设备,例如,可以检测操作系统中是否存在未知设备,若存在,则将所述未知设备确定为需要恢复驱动程序的硬件设备。又例如,还可以获取操作系统中硬件设备的列表,其中所述列表中的硬件设备可以是前述驱动备份方法实施例中所备份的驱动程序对应的硬件设备,并接收用户对所述列表中一个或多个硬件设备的选择输入,进而将所接收的用户选择输入的一个或多个硬件设备确定为需要恢复驱动程序的硬件设备。When implementing this step, there can be multiple ways to automatically determine the hardware device that needs to restore the driver in the operating system. For example, it can detect whether there is an unknown device in the operating system, and if it exists, then determine the unknown device as requiring recovery. Drivers for hardware devices. For another example, a list of hardware devices in the operating system may also be obtained, wherein the hardware devices in the list may be hardware devices corresponding to the drivers backed up in the aforementioned embodiment of the driver backup method, and a user request for one of the list in the list may be received. or multiple hardware devices, and then determine the received one or more hardware devices selected by the user as the hardware devices that need to restore the driver.

步骤S320:根据所述需要恢复驱动程序的硬件设备,从备份数据中获取相应的设备信息文件及驱动程序文件,其中所述备份数据是操作系统中驱动程序的备份数据。Step S320: Obtain the corresponding device information file and driver program file from the backup data according to the hardware device whose driver program needs to be restored, wherein the backup data is the backup data of the driver program in the operating system.

在步骤S310确定需要恢复驱动程序的硬件设备后,即可根据该硬件设备,如该硬件设备的名称或ID,自动按照备份数据的存储路径(除系统盘外的本地磁盘或服务器),从该存储路径下的备份数据中进行查找得到相应的设备信息文件及驱动程序文件,其中,这里的备份数据可以是前述驱动备份的方法实施例所存储的驱动数据。此外,在备份数据以主板、显卡、声卡、打印机等设备分目录进进行存储时,也可以根据需要恢复驱动程序的硬件设备的名称自动从存储路径下找到相应的设备信息文件及驱动程序文件。步骤S330:将所述设备信息文件及驱动程序文件加载到操作系统中。After step S310 determines the hardware device that needs to restore the driver, it can automatically follow the storage path of the backup data (local disk or server except the system disk) according to the hardware device, such as the name or ID of the hardware device, from the hardware device. Search the backup data under the storage path to obtain the corresponding device information file and driver program file, wherein the backup data here may be the drive data stored in the above-mentioned embodiment of the drive backup method. In addition, when the backup data is stored in sub-directories of motherboards, graphics cards, sound cards, printers and other devices, the corresponding device information files and driver files can also be automatically found from the storage path according to the name of the hardware device that needs to restore the driver. Step S330: Load the device information file and driver program file into the operating system.

由于设备信息文件中指明了硬件驱动该如何安装到操作系统中,源文件在哪里、安装到哪一个文件夹中、怎样在注册表中加入自身相关信息等等,按照设备信息文件中的说明,即可自动将驱动程序文件加载到目标文件夹下。Since the device information file specifies how to install the hardware driver into the operating system, where the source file is, which folder it is installed in, how to add its own information in the registry, etc., according to the instructions in the device information file, The driver file can be automatically loaded into the target folder.

其中,当接收用户对列表中一个或多个硬件设备的选择输入,进而将所接收的用户选择输入的一个或多个硬件设备确定为需要恢复驱动程序的硬件设备时,从用户侧描述的话,以WindowsXP系统为例,用户可以通过如下步骤恢复所选择的硬件设备的驱动程序:Wherein, when receiving the user's selection input on one or more hardware devices in the list, and then determining the one or more hardware devices received by the user's selection input as the hardware device that needs to restore the driver, if described from the user side, Taking the WindowsXP system as an example, the user can restore the driver of the selected hardware device through the following steps:

1.打开操作系统的设备管理器,用户可以看到操作系统中硬件设备的列表;1. Open the device manager of the operating system, the user can see the list of hardware devices in the operating system;

2.从该列表中选中需要恢复驱动的硬件设备,点击鼠标右键(也可以设置为点击鼠标左键),在菜单中选择“更新驱动程序”;2. Select the hardware device that needs to restore the driver from the list, click the right mouse button (you can also set it to click the left mouse button), and select "Update Driver" in the menu;

3.在弹出的对话框中选择“从计算机的设备驱动程序列表或指定位置安装”;3. In the pop-up dialog box, select "Install from the computer's device driver list or a specified location";

4.在下一个对话框中点击“从磁盘安装”按钮;4. In the next dialog box, click the "Have Disk" button;

5.在弹出的文件选择对话框中点击“浏览”按钮;5. Click the "Browse" button in the pop-up file selection dialog box;

6.在目录选择对话框中选择备份驱动程序所在的目录;6. In the directory selection dialog box, select the directory where the backup driver is located;

7.点击“下一步”按钮进行安装,期间可能还有若干确认对话框需要用户确认。7. Click the "Next" button to proceed with the installation, during which there may be several confirmation dialog boxes that need to be confirmed by the user.

对于其它的操作系统或Windows其它版本的操作系统而言,恢复所选择的硬件设备的驱动程序的操作步骤可能会略有不同,这里不再赘述。For other operating systems or operating systems of other versions of Windows, the operation steps for restoring the driver of the selected hardware device may be slightly different, and will not be repeated here.

上述实施例可以自动确定或接受用户指定操作系统中需要恢复驱动程序的硬件设备,进而快速地查找到对应的设备信息文件和驱动程序文件,并自动安装到操作系统中,操作简便,所需的时间较短,提高了恢复驱动程序的效率,避免了恢复驱动程序时需要识别各硬件设备的型号并查找相应驱动光盘的麻烦。The above-mentioned embodiment can automatically determine or accept the hardware device in the operating system specified by the user that needs to restore the driver, and then quickly find the corresponding device information file and driver file, and automatically install them into the operating system. The operation is simple and the required The time is short, which improves the efficiency of restoring the driver, and avoids the trouble of identifying the models of each hardware device and searching for the corresponding driver CD when restoring the driver.

与本发明前述驱动恢复的方法实施例相适应,图4示出了本发明一个实施例的驱动恢复的装置示意图。如图所示,该驱动恢复的装置包括:Compatible with the aforementioned embodiment of the drive recovery method of the present invention, FIG. 4 shows a schematic diagram of a drive recovery device according to an embodiment of the present invention. As shown in the figure, the recovery device includes:

驱动恢复确定器410,被配置为确定操作系统中需要恢复驱动程序的硬件设备;The driver restoration determiner 410 is configured to determine the hardware device in the operating system that needs to restore the driver;

驱动备份获取器420,被配置为根据所述需要恢复驱动程序的硬件设备,从备份数据中获取相应的设备信息文件及驱动程序文件,其中所述备份数据是操作系统中驱动程序的备份数据;The driver backup obtainer 420 is configured to restore the hardware device of the driver according to the needs, and obtain the corresponding device information file and driver file from the backup data, wherein the backup data is the backup data of the driver in the operating system;

驱动加载器430,被配置为将所述设备信息文件及驱动程序文件加载到操作系统中。The driver loader 430 is configured to load the device information file and the driver program file into the operating system.

可选的,所述驱动恢复确定器包括:第一驱动恢复确定模块,被配置为检测操作系统中是否存在未知设备,若存在,则将所述未知设备确定为需要恢复驱动程序的硬件设备;或者,第二驱动恢复确定模块,被配置为获取操作系统中硬件设备的列表,接收用户对所述列表中一个或多个硬件设备的选择输入,以及将所接收的用户选择输入的一个或多个硬件设备确定为需要恢复驱动程序的硬件设备。Optionally, the drive recovery determiner includes: a first drive recovery determination module configured to detect whether there is an unknown device in the operating system, and if so, determine the unknown device as a hardware device that needs to restore the driver; Alternatively, the second drive recovery determination module is configured to obtain a list of hardware devices in the operating system, receive user selection input on one or more hardware devices in the list, and use one or more of the received user selection input A hardware device is identified as a hardware device that needs to restore the driver.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings), as well as any method or method so disclosed, may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the device according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

Claims (14)

1. A method of driving a backup, comprising:
acquiring information of a driver in an operating system;
according to the information of each driver, taking the driver which does not belong to the system and the corresponding equipment is not a central processing unit, an optical drive and virtual equipment as a candidate backup driver, and the method comprises the following steps: judging whether the corresponding equipment is a central processing unit or an optical drive according to the equipment type corresponding to each drive program; judging whether the corresponding equipment is virtual equipment or not according to the equipment type, the hardware ID, the description information or the manufacturer information corresponding to each driver;
and judging whether the equipment information file corresponding to each candidate backup driving program exists, and if so, backing up the corresponding equipment information file and the driving program file.
2. The method of claim 1, wherein the driver's information includes a file name of a device information file, a device class, a hardware ID, description information, and manufacturer information;
the step of taking the driver which does not belong to the system and the corresponding device is not a central processing unit, an optical drive or a virtual device as a candidate backup driver according to the information of each driver comprises:
judging whether the device information files belong to the drivers of the system according to the file names of the device information files corresponding to the drivers;
judging whether the corresponding equipment is a central processing unit or an optical drive according to the corresponding equipment type of the drive program which does not belong to the system;
judging whether the corresponding equipment is virtual equipment or not according to the corresponding equipment type, hardware ID, description information and manufacturer information of the equipment, wherein the equipment does not belong to a system self-contained device and is not a drive program of a central processing unit and an optical drive;
and taking the driver which does not belong to the system self-bring and corresponds to the device and is not the central processor, the optical drive and the virtual device as a candidate backup driver.
3. The method according to claim 1, wherein the driver file is obtained by opening the device information file, obtaining a name of the corresponding driver file, and searching in a system disk directory according to the name of the driver file.
4. The method as claimed in claim 1, if there are at least two backup drivers with the same file name of their corresponding device information files, backing up only the device information file and the driver file corresponding to one of the candidate backup drivers.
5. The method of claim 1, the step of backing up comprising:
and storing the equipment information file and the driver program file to a local disk or a server which is pointed by the preset backup path and is except for the system disk according to the preset backup path.
6. The method of claim 1, further comprising:
determining hardware equipment needing to recover a driver in an operating system;
according to the hardware equipment needing to recover the driver, acquiring a corresponding equipment information file and a corresponding driver file from backup data;
and loading the equipment information file and the driver program file into an operating system.
7. The method of claim 6, the determining a hardware device in the operating system that requires a recovery driver comprising:
detecting whether unknown equipment exists in an operating system, and if so, determining the unknown equipment as hardware equipment needing to recover a driver;
or,
the method comprises the steps of obtaining a list of hardware devices in an operating system, receiving selection input of one or more hardware devices in the list from a user, and determining the one or more hardware devices as the hardware devices needing driver restoration.
8. An apparatus to drive a backup, comprising:
an acquirer configured to acquire information of a driver in an operating system;
the filter is configured to take the drivers which do not belong to the system and correspond to the devices which are not the central processor, the optical drive and the virtual device as candidate backup drivers according to the information of each driver, and comprises the following steps: judging whether the corresponding equipment is a central processing unit or an optical drive according to the equipment type corresponding to each drive program; judging whether the corresponding equipment is virtual equipment or not according to the equipment type, the hardware ID, the description information or the manufacturer information corresponding to each driver;
and the backup device is configured to judge whether the equipment information file corresponding to each candidate backup driving program exists or not, and if so, backup the corresponding equipment information file and the driving program file.
9. The apparatus of claim 8, wherein the information of the driver includes a file name of a device information file, a device class, a hardware ID, description information, and manufacturer information;
the screen includes:
the first judging module is configured to judge whether the device information files belong to the drivers of the system according to the file names of the device information files corresponding to the drivers;
the second judgment module is configured to judge whether the corresponding equipment is a central processing unit or an optical drive according to the corresponding equipment type of the drive program which does not belong to the system;
the third judging module is configured to judge whether the corresponding equipment is virtual equipment or not according to the corresponding equipment type, the hardware ID, the description information and the manufacturer information of the equipment, wherein the equipment does not belong to the system and the corresponding equipment is not a driving program of a central processing unit and an optical drive;
and the determining module is configured to take the drivers which do not belong to the system and correspond to the devices which are not the central processor, the optical drive and the virtual device as candidate backup drivers.
10. The apparatus according to claim 8, wherein the driver file is obtained by opening the device information file, obtaining a name of the corresponding driver file, and searching in a system disk directory according to the name of the driver file.
11. The apparatus of claim 8, wherein if at least two of the candidate backup drivers have the same device information file, only one of the candidate backup drivers is backed up with the device information file and the driver file.
12. The apparatus of claim 8, wherein the backup appliance is configured to store the device information file and the driver file to a local disk or a server other than a system disk pointed by a preset backup path according to the preset backup path.
13. The apparatus of claim 8, further comprising:
a driver recovery determiner configured to determine a hardware device in the operating system that requires recovery of the driver;
the drive backup acquirer is configured to acquire a corresponding device information file and a corresponding driver file from backup data according to the hardware device needing to recover the driver;
a driver loader configured to load the device information file and the driver file into an operating system.
14. The apparatus of claim 13, the drive recovery determiner comprising:
the first drive recovery determining module is configured to detect whether unknown equipment exists in an operating system, and if so, determine the unknown equipment as hardware equipment needing to recover a drive program;
and/or the presence of a gas in the gas,
the second driver recovery determining module is configured to acquire a list of hardware devices in an operating system, receive a selection input of a user on one or more hardware devices in the list, and determine the one or more hardware devices as the hardware devices needing to recover the driver.
CN201310007866.0A 2013-01-09 2013-01-09 Method and device for driver backup and restoration Active CN103064767B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310007866.0A CN103064767B (en) 2013-01-09 2013-01-09 Method and device for driver backup and restoration
CN201610113234.6A CN105786652B (en) 2013-01-09 2013-01-09 The method and device of driving backup, recovery

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310007866.0A CN103064767B (en) 2013-01-09 2013-01-09 Method and device for driver backup and restoration

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201610113234.6A Division CN105786652B (en) 2013-01-09 2013-01-09 The method and device of driving backup, recovery

Publications (2)

Publication Number Publication Date
CN103064767A CN103064767A (en) 2013-04-24
CN103064767B true CN103064767B (en) 2016-03-23

Family

ID=48107400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310007866.0A Active CN103064767B (en) 2013-01-09 2013-01-09 Method and device for driver backup and restoration

Country Status (1)

Country Link
CN (1) CN103064767B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902338B (en) * 2014-03-21 2017-08-04 珠海市君天电子科技有限公司 A kind of drive load and processing method, client, server and system
CN104331311B (en) * 2014-11-19 2017-07-28 广东欧珀移动通信有限公司 A kind of AKU generation method and device
CN104572347B (en) * 2014-12-02 2018-01-30 上海爱数信息技术股份有限公司 Based on block level restoration and edit the registry and inject the system recovery method of driving
CN110045966A (en) * 2019-04-01 2019-07-23 龙芯中科(合肥)技术有限公司 Processing method, device and the equipment of erector
CN117215602A (en) * 2023-10-30 2023-12-12 广州鼎甲计算机科技有限公司 Method, device, computer equipment and storage medium for updating drive program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044707A1 (en) * 2000-06-19 2004-03-04 Hewlett-Packard Company Automatic backup/recovery process
CN102147754A (en) * 2011-04-01 2011-08-10 奇智软件(北京)有限公司 Automatic backup method and device for driver
CN102841825A (en) * 2011-06-23 2012-12-26 珠海市君天电子科技有限公司 Drive backup method and device and drive restoration method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441582A (en) * 2007-11-20 2009-05-27 北京和力记易科技有限公司 Backup and recovery method of computer data object and system and program product for implementing the same
CN102073517A (en) * 2009-11-23 2011-05-25 中兴通讯股份有限公司 Upgrading and backup method and device for embedded system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044707A1 (en) * 2000-06-19 2004-03-04 Hewlett-Packard Company Automatic backup/recovery process
CN102147754A (en) * 2011-04-01 2011-08-10 奇智软件(北京)有限公司 Automatic backup method and device for driver
CN102841825A (en) * 2011-06-23 2012-12-26 珠海市君天电子科技有限公司 Drive backup method and device and drive restoration method and device

Also Published As

Publication number Publication date
CN103064767A (en) 2013-04-24

Similar Documents

Publication Publication Date Title
US8751783B2 (en) Booting computing devices with EFI aware operating systems
US10067835B2 (en) System reset
US20040172578A1 (en) Method and system of operating system recovery
CN102955706B (en) A kind of installation method of dual operating systems and guiding loading method
CN103064767B (en) Method and device for driver backup and restoration
CN101650660A (en) Booting a computer system from a central storage
CN102135893A (en) Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server
CN101763277A (en) Method for automatically installing operating system
US20150324209A1 (en) Operating System Switching Method and Dual-Operating System Electronic Device Using the Same
WO2016177067A1 (en) Mobile phone memory expanding method and terminal
US20100049961A1 (en) Update method for basic input/output system and update system thereof
US8375198B2 (en) Boot system and method having a BIOS that reads an operating system from first storage device via an input/output chip based on detecting a temperature of a second storage device
CN120066598B (en) Classification method of operating system startup items, computer program products and services
US11263082B2 (en) Data recovery of guest virtual machines
CN102053848A (en) Automatic installation method for Linux operating system
US10185573B2 (en) Caching based operating system installation
US8949588B1 (en) Mobile telephone as bootstrap device
US7849300B2 (en) Method for changing booting sources of a computer system and a related backup/restore method thereof
US9852029B2 (en) Managing a computing system crash
CN104077196A (en) Linux boot failure recovering method and device
US8762699B1 (en) System, apparatus, and method for initiating a reboot of a personal computer system by pressing a button on an attached storage device and causing the operating system on the attached storage device to be booted
US8918630B1 (en) System, apparatus, and method for initiating a reboot of a personal computer system by pressing a button on an attached storage device and causing the operating system on the attached storage device to be booted
CN105786652B (en) The method and device of driving backup, recovery
CN100472441C (en) Method for changing starting source of computer and data backup reduction using the same
JP2003076614A (en) Backup and restoration method for data in hard disc device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220715

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right