CN117215602A - Method, device, computer equipment and storage medium for updating drive program - Google Patents

Method, device, computer equipment and storage medium for updating drive program Download PDF

Info

Publication number
CN117215602A
CN117215602A CN202311420333.5A CN202311420333A CN117215602A CN 117215602 A CN117215602 A CN 117215602A CN 202311420333 A CN202311420333 A CN 202311420333A CN 117215602 A CN117215602 A CN 117215602A
Authority
CN
China
Prior art keywords
identifier
hardware
driver
target
file
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.)
Pending
Application number
CN202311420333.5A
Other languages
Chinese (zh)
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.)
Guangzhou Dingjia Computer Technology Co ltd
Original Assignee
Guangzhou Dingjia Computer Technology 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 Guangzhou Dingjia Computer Technology Co ltd filed Critical Guangzhou Dingjia Computer Technology Co ltd
Priority to CN202311420333.5A priority Critical patent/CN117215602A/en
Publication of CN117215602A publication Critical patent/CN117215602A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present application relates to a driver updating method, apparatus, computer device, storage medium, and computer program product. The method comprises the following steps: scanning the hardware of the target terminal to obtain a hardware identifier of the hardware, and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system; screening a first target identifier matched with the hardware identifier from the matched identifiers, and starting a driver corresponding to the first target identifier; acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers; and installing the driver corresponding to the driver file into an operating system of the target terminal. By adopting the method, the driving program required by the operating system can be efficiently updated.

Description

Method, device, computer equipment and storage medium for updating drive program
Technical Field
The present application relates to the field of computer technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for updating a driver.
Background
When the system recovery is carried out on the Windows system, the original driver program is not recovered, so that the recovered Windows system is easy to report errors.
At present, a user is often required to manually inquire an abnormal driver in the recovered Windows system and repair the abnormal driver, so that the user is required to have corresponding knowledge and complicated operation, and the problem of low updating efficiency of the driver of the recovered Windows system is easily caused.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a driver update method, apparatus, computer device, computer-readable storage medium, and computer program product that are capable of efficiently restoring a system driver.
In a first aspect, the present application provides a method for updating a driver, including:
scanning the hardware of a target terminal to obtain a hardware identifier of the hardware, and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
screening a first target identifier matched with the hardware identifier from the matched identifiers, and starting a driver corresponding to the first target identifier;
Acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
and installing the driver corresponding to the driver file into an operating system of the target terminal.
In one embodiment, before the obtaining, from the backup storage system of the target terminal, the driver file corresponding to the second target identifier, the method further includes:
acquiring a pre-stored driver file;
obtaining a matching identifier and a matching operating system of the pre-stored driver file according to the information file in the pre-stored driver file;
constructing an index file of the pre-stored driver file according to the matching identifier of the pre-stored driver file and the matching operation system;
storing the prestored driver file and the index file in the backup storage system;
the obtaining the driver file corresponding to the second target identifier from the backup storage system of the target terminal includes:
and inquiring the index file, and obtaining a driver file corresponding to the second target identifier from the backup storage system.
In one embodiment, the hardware identifier comprises a hardware unique identifier and a hardware compatible identifier;
the screening the first target identifier matched with the hardware identifier from the matched identifiers comprises the following steps:
screening an identifier matched with a hardware unique identifier of any hardware from the matched identifiers as the first target identifier;
and when the identifier matched with the hardware unique identifier of any hardware is not screened out from the matched identifiers, screening the identifier matched with the hardware compatible identifier of any hardware from the matched identifiers as the first target identifier.
In one embodiment, the screening the identifier matched with the hardware compatible identifier of any hardware from the matched identifiers as the first target identifier includes:
acquiring the priority of the hardware compatible identifier according to any hardware;
and screening out the identifiers matched with the hardware compatible identifiers of any hardware and the identifier with the highest priority as the first target identifier.
In one embodiment, the operating system is a Windows system;
the starting the driver corresponding to the first target identifier includes:
inquiring starting parameters of a driver corresponding to the first target identifier from a registry of the Windows system;
and modifying the starting parameter to update the state of the driver corresponding to the first target identifier to a starting state.
In one embodiment, the installing the driver corresponding to the driver file in the operating system of the target terminal includes:
carrying out integrity check on the driver file;
and under the condition that the integrity check of the driver file is passed, installing a driver corresponding to the driver file into an operating system of the target terminal.
In a second aspect, the present application further provides a driver update apparatus, including:
the hardware scanning module is used for scanning the hardware of the target terminal to obtain a hardware identifier of the hardware and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
The drive starting module is used for screening a first target identifier matched with the hardware identifier from the matched identifiers and starting a drive program corresponding to the first target identifier;
the drive acquisition module is used for acquiring a drive program file corresponding to the second target identifier from the backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
and the drive installation module is used for installing the drive program corresponding to the drive program file into the operating system of the target terminal.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
scanning the hardware of a target terminal to obtain a hardware identifier of the hardware, and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
screening a first target identifier matched with the hardware identifier from the matched identifiers, and starting a driver corresponding to the first target identifier;
Acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
and installing the driver corresponding to the driver file into an operating system of the target terminal.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
scanning the hardware of a target terminal to obtain a hardware identifier of the hardware, and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
screening a first target identifier matched with the hardware identifier from the matched identifiers, and starting a driver corresponding to the first target identifier;
acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
And installing the driver corresponding to the driver file into an operating system of the target terminal.
In a fifth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
scanning the hardware of a target terminal to obtain a hardware identifier of the hardware, and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
screening a first target identifier matched with the hardware identifier from the matched identifiers, and starting a driver corresponding to the first target identifier;
acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
and installing the driver corresponding to the driver file into an operating system of the target terminal.
The method, the device, the computer equipment, the storage medium and the computer program product for updating the driving program firstly scan the hardware of the target terminal which restores the operating system to obtain the hardware identifier of the hardware, and scan the information file of the driving program in the operating system of the target terminal to obtain the matching identifier of the driving program so as to know the current hardware configuration of the operating system and the available driving program information, thereby adopting different processing modes for the driving program required by the operating system; then, a first target identifier matched with the hardware identifier is screened out from the matched identifiers, a driver corresponding to the first target identifier is started, and the required driver stored by the operating system is required to be started and deployed so as to ensure that the hardware of the target terminal is supported by the proper driver; and finally, acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal, wherein the second target identifier is an identifier of the hardware identifier except the first target identifier, installing a driver corresponding to the driver file into an operating system of the target terminal, acquiring the driver file from the backup storage system for a required driver which is not stored in the operating system, and then installing and deploying the driver to ensure that the hardware of the target terminal is supported by the proper driver. According to the method, the existing drive program is automatically scanned in the hardware of the target terminal and the existing drive program in the operating system, and then the existing drive program is directly started and deployed or the corresponding drive program file is acquired from the backup storage system, so that the installation and deployment of the drive program are realized, the drive program required by the operating system can be efficiently and accurately updated, and the normal running of the operating system is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a method for updating a driver in one embodiment;
FIG. 2 is a flow chart of a first target identifier determination step in one embodiment;
FIG. 3 is a flow diagram of creating a drive index library in one embodiment;
FIG. 4 is a schematic flow diagram of an update driver after recovering a Windows system in one embodiment;
FIG. 5 is a block diagram of a driver update apparatus in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a driver update method is provided, where this embodiment is applied to a terminal to illustrate the method, and it is understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server. The terminal may be, but not limited to, various personal computers, notebook computers, smart phones and tablet computers. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. In this embodiment, the method includes the steps of:
step S101, scanning the hardware of the target terminal to obtain a hardware identifier of the hardware, and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver.
The target terminal is a terminal recovering an operating system.
Illustratively, when the operating system of the target terminal is abnormal, the user enters a small operating system in an operating system installation medium (such as an optical disc or a USB (Universal Serial Bus, universal serial bus) driver) in the target terminal, invokes an operating system recovery tool therein, and backs up or reloads the operating system in the target terminal. Then, after the operation system of the target terminal is restored, the target terminal identifies the hardware device installed on the target terminal through a proper hardware scanning tool, which may include identifying hardware components such as a Central Processing Unit (CPU), a graphics card, a sound card, a network adapter, a storage controller, and the like, to obtain hardware information including a hardware identifier. And the target terminal also scans file information (i.e. inf file) of the existing drivers in the operating system to obtain a matching identifier of each existing driver, i.e. a hardware identifier adapted by the driver.
Step S102, a first target identifier matched with the hardware identifier is screened out from the matched identifiers, and a driver corresponding to the first target identifier is started.
After the operating system is restored, there may be a situation that the existing driver does not start deployment, so the target terminal first screens the first target identifier matched with the hardware identifier from the matched identifiers, that is, the existing driver matched with the current hardware, and then directly starts the driver corresponding to the first target identifier, thereby quickly realizing restoration of part of drivers, ensuring normal operation of the hardware and avoiding abnormality of the operating system.
Step S103, obtaining the driver file corresponding to the second target identifier from the backup storage system of the target terminal.
Wherein the second target identifier is an identifier other than the first target identifier in the hardware identifiers.
The target terminal illustratively screens out identifiers other than the first target identifier from the hardware identifiers as the second target identifier. Then, the target terminal queries the driver file corresponding to the second target identifier from the backup storage system. In addition, after the driver corresponding to the first target identifier is started in step S102, the target terminal may verify the state of the hardware to ensure that the driver is installed correctly and the hardware device can work normally, and if the hardware is running abnormally, the target terminal may obtain the driver file corresponding to the abnormal hardware from the backup storage system, so as to reinstall and deploy the corresponding driver.
Step S104, installing the driver corresponding to the driver file into the operating system of the target terminal.
The target terminal uses a driver installation tool to install the driver corresponding to the driver file into the operating system. When a driver is installed, it is necessary to copy the necessary driver files to the system directory or related folders and register these files in the operating system to ensure that the driver can be loaded properly. Upon completion of the installation, the target terminal enables the newly installed driver. Finally, the target and the terminal verify whether the newly installed driver works normally or not, and can check a device manager, a system log or perform functional test of hardware devices, and if the driver is abnormal, the abnormal driver can be reinstalled or alarm information can be sent out.
In the method for updating the driver, firstly, the hardware of the target terminal of the operating system is scanned and recovered to obtain a hardware identifier of the hardware, and an information file of the driver in the operating system of the target terminal is scanned to obtain a matching identifier of the driver so as to know the current hardware configuration of the operating system and the available driver information, so that different processing modes are adopted for the driver needed by the operating system; then, a first target identifier matched with the hardware identifier is screened out from the matched identifiers, a driver corresponding to the first target identifier is started, and the required driver stored by the operating system is required to be started and deployed so as to ensure that the hardware of the target terminal is supported by the proper driver; and finally, acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal, wherein the second target identifier is an identifier of the hardware identifier except the first target identifier, installing a driver corresponding to the driver file into an operating system of the target terminal, acquiring the driver file from the backup storage system for a required driver which is not stored in the operating system, and then installing and deploying the driver to ensure that the hardware of the target terminal is supported by the proper driver. According to the method, the existing drive program is automatically scanned in the hardware of the target terminal and the existing drive program in the operating system, and then the existing drive program is directly started and deployed or the corresponding drive program file is acquired from the backup storage system, so that the installation and deployment of the drive program are realized, the drive program required by the operating system can be efficiently and accurately updated, and the normal running of the operating system is ensured.
In an exemplary embodiment, before the step S103, the step of obtaining the driver file corresponding to the second target identifier from the backup storage system of the target terminal further includes: acquiring a pre-stored driver file; obtaining a matching identifier and a matching operating system of a pre-stored driver file according to an information file in the pre-stored driver file; constructing an index file of the pre-stored driver file according to the matching identifier of the pre-stored driver file and the matching operation system; and storing the prestored driver files and the index files in a backup storage system.
Further, in an exemplary embodiment, the step S103 obtains, from the backup storage system of the target terminal, a driver file corresponding to the second target identifier, and further includes: and querying the index file to obtain the driver file corresponding to the second target identifier from the backup storage system.
The terminal obtains the pre-stored driver files needed to be pre-stored in the backup storage system, and then obtains the matching identifier, the matching operating system, version information and the like of each driver file according to the information file (i.e. inf file) of each driver file. Then, based on the data extracted from the information file, an index file is constructed for recording the matching identifier and the matching operating system of each pre-stored driver file. And finally, storing the index file and the pre-stored driver file into a backup storage system. And then, when the pre-stored driver files are acquired from the backup storage system, the target terminal queries the index files according to the second target identifier to determine the positions of the corresponding driver files, and then acquires the corresponding driver files from the backup storage system. It should be noted that, when the driver file is obtained from the backup storage system, it may be further required to query the corresponding driver file based on the type of the operating system and the system version. The pre-stored driver file can be obtained from the operating system before the abnormality of the target terminal, and when the operating system of the target terminal is restored, the driver can be updated directly based on the original driver in the backup storage system.
In this embodiment, by extracting the information file of the pre-stored driver to construct the index file, the pre-stored driver file can be managed more effectively, so that it is easy to maintain and retrieve. And the prestored driver files matched with the hardware of the target terminal can be quickly searched and retrieved through the index files, so that the recovery and repair process of the operating system is accelerated.
In one exemplary embodiment, the hardware identifier includes a hardware unique identifier and a hardware compatible identifier.
As shown in fig. 2, the step S102 of screening the first target identifier matched with the hardware identifier from the matched identifiers may also be implemented by the following steps:
step S201, screening out an identifier matched with a hardware unique identifier of any hardware from the matched identifiers as a first target identifier;
in step S202, when the identifier matching the hardware unique identifier of any hardware is not selected from the matching identifiers, the identifier matching the hardware compatible identifier of any hardware is selected from the matching identifiers as the first target identifier.
Illustratively, the hardware identifier of the hardware generally includes a hardware unique identifier and a hardware compatible identifier, and at the same time, the driver corresponding to the hardware unique identifier is matched with the hardware more than the driver corresponding to the hardware compatible identifier. When determining a first target identifier corresponding to each piece of hardware, the target terminal firstly inquires whether a unique hardware identifier exists in the matched identifiers, and if so, takes the unique hardware identifier as the first target identifier of the piece of hardware; if not, inquiring whether the matching identifier has a hardware compatible identifier, and if so, taking the hardware compatible identifier as a first target identifier of the hardware. If the unique hardware identifier and the compatible hardware identifier are not found in the matching identifiers, the hardware identifier of the hardware is used as a second target identifier.
Similarly, in step S103, when the matched driver file is queried from the backup storage system according to the second target identifier, the driver file may be queried based on the hardware unique identifier, and if the query is not completed, the driver file may be queried based on the hardware compatible identifier.
In this embodiment, by considering the unique hardware identifier and the compatible hardware identifier, a driver with a higher matching degree with the hardware device can be selected, so that more accurate matching with the hardware device is ensured, and problems of hardware conflict and compatibility are reduced.
In an exemplary embodiment, the step S202 filters, from the matched identifiers, an identifier that matches with a hardware compatible identifier of any hardware, as the first target identifier, and further includes: according to any hardware, acquiring the priority of the hardware compatible identifier; and screening out the identifiers matched with the hardware compatible identifiers of any hardware and having the highest priority from the matched identifiers, and taking the identifier as a first target identifier.
Illustratively, for the hardware to be matched, the target terminal obtains the priority of its respective hardware-compatible identifier. Then, from the matching identification Fu Zhongshai: the identifier that matches the hardware compatible identifier and has the highest priority is selected from the matching identifiers Fu Zhongshai as the first target identifier, i.e., the identifier that matches the hardware compatible identifier most preferably is selected to meet the hardware requirements. If there are multiple hardware compatible identifier matching identifiers and they have the same highest priority, one of them may be further filtered or selected according to a preset policy.
Similarly, in step S103, when the matching driver file is queried from the backup storage system according to the second target identifier, the driver file with the highest priority may be preferentially selected based on the priority of the hardware compatible identifier.
In this embodiment, by considering the priority of the hardware compatible identifier, the identifier that is most matched with the hardware device is selected more intelligently, so as to meet the requirement of the hardware device, and reduce the risk that an incorrect driver is associated with the hardware device, thereby reducing hardware conflict, and being beneficial to improving the performance and stability of the operating system.
In an exemplary embodiment, when the operating system is a Windows system, the step S102 starts the driver corresponding to the first target identifier, and further includes: inquiring starting parameters of a driver corresponding to the first target identifier from a registry of the Windows system; and modifying the starting parameter to update the state of the driver corresponding to the first target identifier to the starting state.
Illustratively, the target terminal queries the registry of the Windows system for the launch parameters of the driver corresponding to the first target identifier, typically including launch type (e.g., automatic launch, manual launch or disable), and other configuration information. The start-up parameters are modified to ensure that the driver corresponding to the first target identifier is in the correct start-up state. For example, if a driver needs to be automatically started at the system start-up, its start-up type is set to be automatic. And starting a driving program corresponding to the first target identifier to enable the driving program to normally run in an operating system.
In this embodiment, by managing the start parameters of the driver, it is ensured that the driver corresponding to the first target identifier can be started correctly when needed, so as to support the related hardware device. Meanwhile, the automatic management starting parameters, such as setting the driving program to be automatically started, are beneficial to reducing the requirement of manual intervention, better manage and control the starting state of the driving program, and improve the availability and stability of an operating system.
In an exemplary embodiment, the step S104 installs the driver corresponding to the driver file in the operating system of the target terminal, and further includes: carrying out integrity check on the driver file; and under the condition that the integrity check of the driver file is passed, installing the driver corresponding to the driver file into an operating system of the target terminal.
Illustratively, the target terminal first performs an integrity check on the driver file before starting to install the driver, which may be by calculating a hash value of the file (e.g., MD5, SHA-256, etc.) or verifying the authenticity of the file using a digital signature. If the integrity check is passed, i.e. the file has not been tampered with, the target terminal will continue to install the driver file into the operating system. If the integrity check fails, the target terminal will abort the installation process to avoid installing a damaged or maliciously tampered driver file.
In this embodiment, through integrity verification, a driver file that may have been tampered with maliciously can be identified and rejected, so that the risk that potential malicious software or security threat enters the operating system through tampering with the driver file is reduced, and thus the security of the operating system is improved. The integrity check also helps to prevent the installation of a corrupted driver file, only a driver file that passes the integrity check from causing system instability or hardware problems.
In an exemplary embodiment, in order to more clearly illustrate the driver update method provided in the embodiment of the present application, a specific embodiment is described below specifically. In one embodiment, the application further provides a method for updating the driver of the Windows system, which specifically comprises the following steps: the driver index library is built in Windows Pe (Windows Preinstallation Environment ) and the driver is updated after the Windows system is restored.
Wherein, as shown in fig. 3, the establishment of the driving index library in WindowsPe includes the following steps:
step S301, copying the collected drive to a specified directory: and c, driving.
Step S302, extracting operating system information and hardware ID information according to the driving inf file, and establishing an index file.
Step S303, copying the index file to a designated directory.
Step S304, manufacturing Window Pe: windowsPe was fabricated by ADK (Windows Assessment and Deployment Kit, windows evaluation and deployment toolkit).
In step S305, the drive and index file is copied to the directory corresponding to WindowsPe.
And step S306, finishing the manufacture of Window Pe.
As shown in fig. 4, the update driver after recovering the Windows system includes the following steps:
step S401, recovering the system: and recovering the Windows system.
Step S402, scanning the hardware information of the target machine, and obtaining the hardware ID of the hardware: including a hardware unique ID and a hardware compatible ID.
Step S403, scanning all inf files of the recovered system: after the scanning recovery, the inf under the Windows\inf directory and the inf files under the Windows\System32\driver store directory are scanned.
Step S404, judging whether the inf file of the recovered system has a hardware ID matched with the hardware. If not, steps S405 and S406 are executed, and if yes, step S407 is executed.
In step S405, the index file is driven to be searched by the hardware ID.
Step S406, adding a driver to the recovered system: the driver is deployed offline into the restored system through the disk (Deployment Image Servicing and Management), deploying image services and management).
Step S407, the registry of the recovered system is opened, and the corresponding drive is started: the registry is opened offline through an API (Application Programming Interface), and the start parameters of the corresponding driver under the \hkey_local_machine \control set 001\services directory are set to start.
In step S408, the system is restarted, and the drive update is completed.
In this embodiment, first, an index is established for a drive file, a hardware ID of a drive is associated with the drive file, a corresponding drive is automatically searched in a drive index library through the hardware ID and a compatibility ID, and then, a deployment is installed through a disc. And then, scanning INF catalogues and driverstore catalogues of the windows system, analyzing all the INF files, checking whether the drivers are stored, and if so, opening a registry offline through an API (application program interface) to start the registry. Through the steps, after the Windows system is restored, the drive update can be efficiently and accurately completed without human intervention.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a driver updating device for realizing the above related driver updating method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the driver updating device or devices provided below may be referred to the limitation of the driver updating method hereinabove, and will not be described herein.
In an exemplary embodiment, as shown in fig. 5, there is provided a driver updating apparatus including: a hardware scanning module 501, a drive starting module 502, a drive obtaining module 503 and a drive installing module 504, wherein:
the hardware scanning module 501 is configured to scan hardware of the target terminal to obtain a hardware identifier of the hardware, and scan an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
the driver starting module 502 is configured to screen out a first target identifier that matches with the hardware identifier from the matched identifiers, and start a driver corresponding to the first target identifier;
a driver acquiring module 503, configured to acquire a driver file corresponding to the second target identifier from the backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
the driver installation module 504 is configured to install a driver corresponding to the driver file into an operating system of the target terminal.
In one embodiment, the driver updating device further includes a driver backup module, configured to obtain a pre-stored driver file; obtaining a matching identifier and a matching operating system of a pre-stored driver file according to an information file in the pre-stored driver file; constructing an index file of the pre-stored driver file according to the matching identifier of the pre-stored driver file and the matching operation system; and storing the prestored driver files and the index files in a backup storage system.
In one embodiment, the driver obtaining module 503 is further configured to query the index file to obtain, from the backup storage system, a driver file corresponding to the second target identifier.
In one embodiment, the hardware identifier includes a hardware unique identifier and a hardware compatible identifier; the driving starting module 502 is further configured to screen, for any hardware, an identifier that matches with a hardware unique identifier of any hardware from the matched identifiers, as a first target identifier; in the case that the identifier matching the hardware unique identifier of any hardware is not selected from the matching identifiers, the identifier matching the hardware compatible identifier of any hardware is selected from the matching identifiers as the first target identifier.
In one embodiment, the driving start module 502 is further configured to obtain, according to any hardware, a priority of the hardware compatible identifier; and screening out the identifiers matched with the hardware compatible identifiers of any hardware and having the highest priority from the matched identifiers, and taking the identifier as a first target identifier.
In one embodiment, the operating system is a Windows system; the driver starting module 502 is further configured to query, from a registry of the Windows system, a starting parameter of a driver corresponding to the first target identifier; and modifying the starting parameter to update the state of the driver corresponding to the first target identifier to the starting state.
In one embodiment, the driver installation module 504 is further configured to perform integrity check on the driver file; and under the condition that the integrity check of the driver file is passed, installing the driver corresponding to the driver file into an operating system of the target terminal.
The respective modules in the above-described driver updating apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In an exemplary embodiment, a computer device, which may be a terminal, is provided, and an internal structure diagram thereof may be as shown in fig. 6. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a driver update method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for updating a driver, the method comprising:
scanning the hardware of a target terminal to obtain a hardware identifier of the hardware, and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
screening a first target identifier matched with the hardware identifier from the matched identifiers, and starting a driver corresponding to the first target identifier;
Acquiring a driver file corresponding to a second target identifier from a backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
and installing the driver corresponding to the driver file into an operating system of the target terminal.
2. The method of claim 1, further comprising, prior to the retrieving the driver file corresponding to the second target identifier from the backup storage system of the target terminal:
acquiring a pre-stored driver file;
obtaining a matching identifier and a matching operating system of the pre-stored driver file according to the information file in the pre-stored driver file;
constructing an index file of the pre-stored driver file according to the matching identifier of the pre-stored driver file and the matching operation system;
storing the prestored driver file and the index file in the backup storage system;
the obtaining the driver file corresponding to the second target identifier from the backup storage system of the target terminal includes:
And inquiring the index file, and obtaining a driver file corresponding to the second target identifier from the backup storage system.
3. The method of claim 1, wherein the hardware identifier comprises a hardware unique identifier and a hardware compatible identifier;
the screening the first target identifier matched with the hardware identifier from the matched identifiers comprises the following steps:
screening an identifier matched with a hardware unique identifier of any hardware from the matched identifiers as the first target identifier;
and when the identifier matched with the hardware unique identifier of any hardware is not screened out from the matched identifiers, screening the identifier matched with the hardware compatible identifier of any hardware from the matched identifiers as the first target identifier.
4. A method according to claim 3, wherein said screening out, from said matching identifiers, an identifier matching a hardware compatible identifier of said any hardware as said first target identifier comprises:
acquiring the priority of the hardware compatible identifier according to any hardware;
And screening out the identifiers matched with the hardware compatible identifiers of any hardware and the identifier with the highest priority as the first target identifier.
5. The method of claim 1, wherein the operating system is a Windows system;
the starting the driver corresponding to the first target identifier includes:
inquiring starting parameters of a driver corresponding to the first target identifier from a registry of the Windows system;
and modifying the starting parameter to update the state of the driver corresponding to the first target identifier to a starting state.
6. The method according to claim 1, wherein the installing the driver corresponding to the driver file into the operating system of the target terminal includes:
carrying out integrity check on the driver file;
and under the condition that the integrity check of the driver file is passed, installing a driver corresponding to the driver file into an operating system of the target terminal.
7. A driver update apparatus, the apparatus comprising:
The hardware scanning module is used for scanning the hardware of the target terminal to obtain a hardware identifier of the hardware and scanning an information file of a driver in an operating system of the target terminal to obtain a matching identifier of the driver; the target terminal is a terminal recovering an operating system;
the drive starting module is used for screening a first target identifier matched with the hardware identifier from the matched identifiers and starting a drive program corresponding to the first target identifier;
the drive acquisition module is used for acquiring a drive program file corresponding to the second target identifier from the backup storage system of the target terminal; the second target identifier is an identifier other than the first target identifier in the hardware identifiers;
and the drive installation module is used for installing the drive program corresponding to the drive program file into the operating system of the target terminal.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311420333.5A 2023-10-30 2023-10-30 Method, device, computer equipment and storage medium for updating drive program Pending CN117215602A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311420333.5A CN117215602A (en) 2023-10-30 2023-10-30 Method, device, computer equipment and storage medium for updating drive program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311420333.5A CN117215602A (en) 2023-10-30 2023-10-30 Method, device, computer equipment and storage medium for updating drive program

Publications (1)

Publication Number Publication Date
CN117215602A true CN117215602A (en) 2023-12-12

Family

ID=89035576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311420333.5A Pending CN117215602A (en) 2023-10-30 2023-10-30 Method, device, computer equipment and storage medium for updating drive program

Country Status (1)

Country Link
CN (1) CN117215602A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8132186B1 (en) * 2007-03-23 2012-03-06 Symantec Corporation Automatic detection of hardware and device drivers during restore operations
CN103064767A (en) * 2013-01-09 2013-04-24 北京奇虎科技有限公司 Driver backup method, driver backup device, driver restoring method and driver restoring device
CN103246534A (en) * 2013-04-12 2013-08-14 深信服网络科技(深圳)有限公司 Method and device for migrating operating system
CN103677812A (en) * 2013-11-29 2014-03-26 北京深思数盾科技有限公司 Hardware equipment state adaptive method and device
CN106055340A (en) * 2016-06-12 2016-10-26 北京金山安全软件有限公司 Driver control method and device
CN109766105A (en) * 2018-12-24 2019-05-17 新华三技术有限公司 Drive programe installation method, device, server and computer readable storage medium
US20220374179A1 (en) * 2021-05-21 2022-11-24 Canon Kabushiki Kaisha Non-transitory storage medium storing program for installing a driver, and related information processing method and information processing apparatus
CN115617419A (en) * 2022-10-28 2023-01-17 深圳市欧瑞博科技股份有限公司 Intelligent loading method, device, equipment and medium for driving of Internet of things operating system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8132186B1 (en) * 2007-03-23 2012-03-06 Symantec Corporation Automatic detection of hardware and device drivers during restore operations
CN103064767A (en) * 2013-01-09 2013-04-24 北京奇虎科技有限公司 Driver backup method, driver backup device, driver restoring method and driver restoring device
CN103246534A (en) * 2013-04-12 2013-08-14 深信服网络科技(深圳)有限公司 Method and device for migrating operating system
CN103677812A (en) * 2013-11-29 2014-03-26 北京深思数盾科技有限公司 Hardware equipment state adaptive method and device
CN106055340A (en) * 2016-06-12 2016-10-26 北京金山安全软件有限公司 Driver control method and device
CN109766105A (en) * 2018-12-24 2019-05-17 新华三技术有限公司 Drive programe installation method, device, server and computer readable storage medium
US20220374179A1 (en) * 2021-05-21 2022-11-24 Canon Kabushiki Kaisha Non-transitory storage medium storing program for installing a driver, and related information processing method and information processing apparatus
CN115617419A (en) * 2022-10-28 2023-01-17 深圳市欧瑞博科技股份有限公司 Intelligent loading method, device, equipment and medium for driving of Internet of things operating system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
余文芳等: "《新编大学计算机基础课程规划教材 计算机应用快速提高》", vol. 1, 30 September 2007, 北京:北京邮电大学出版社, pages: 100 - 103 *

Similar Documents

Publication Publication Date Title
CN107870968B (en) Performing real-time updates to a file system volume
US8983870B2 (en) Apparatus and method for managing software applications using partitioned data storage devices
US20130054531A1 (en) Database cloning
CN105138347A (en) Difference upgrade patch generating method, software upgrading method and corresponding apparatus
US20150106652A1 (en) System repair method and device, and storage medium
WO2021072861A1 (en) Application service processing method and apparatus, and terminal and storage medium
CN112970020A (en) Monitoring device components using distributed ledger
US9690944B2 (en) System and method updating disk encryption software and performing pre-boot compatibility verification
US20140046902A1 (en) Method for a cloning process to enable cloning a larger System drive to a smaller system
US8966238B2 (en) Personalization of shared electronic devices
US9384353B2 (en) System and method for encryption of disk based on pre-boot compatibility testing
US20160188249A1 (en) System and method for erasing a storage medium
WO2023087622A1 (en) Virtual machine boot configuration method and apparatus, computer device, and storage medium
US20140046905A1 (en) Organized Data Removal or Redirection from a Cloning Process to Enable Cloning a Larger System to a Smaller System
CN111198703A (en) Version upgrading method, system, equipment and medium
CN113485755B (en) Device driver verification method, device and storage medium
CN112631832A (en) File system data volume updating method, terminal equipment, storage medium and device
CN113032183A (en) System management method, device, computer equipment and storage medium
CN116880877A (en) Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium
CN117215602A (en) Method, device, computer equipment and storage medium for updating drive program
CN113505026B (en) Method, device and equipment for verifying backup data and storage medium
CN111488232A (en) System and method for out-of-box solution level configuration and diagnostic logging and reporting
JP6559984B2 (en) Digital evidence creation device, digital evidence creation system, and digital evidence creation program
US20240291670A1 (en) Selecting, authenticating, and installing individual components of agent software stacks
CN116028100B (en) Software version upgrading method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination