CN117806665A - Method, device, equipment and medium for accelerating display card drive installation - Google Patents

Method, device, equipment and medium for accelerating display card drive installation Download PDF

Info

Publication number
CN117806665A
CN117806665A CN202410123950.7A CN202410123950A CN117806665A CN 117806665 A CN117806665 A CN 117806665A CN 202410123950 A CN202410123950 A CN 202410123950A CN 117806665 A CN117806665 A CN 117806665A
Authority
CN
China
Prior art keywords
file
resource
display card
directory
installation
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
CN202410123950.7A
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.)
Hangzhou Wulian Technology Co ltd
Original Assignee
Hangzhou Wulian 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 Hangzhou Wulian Technology Co ltd filed Critical Hangzhou Wulian Technology Co ltd
Priority to CN202410123950.7A priority Critical patent/CN117806665A/en
Publication of CN117806665A publication Critical patent/CN117806665A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for accelerating display card drive installation, relates to the technical field of computers, and comprises the following steps: acquiring a system driving warehouse driving package catalog with the same catalog structure as a display card driving installation package resource catalog, and creating a first resource file in the system driving warehouse driving package catalog; creating a second resource file in the system catalog based on a corresponding relation information list obtained by analyzing the INF file; redirecting the access to the first resource file and the access to the second resource file to the file in the resource catalog of the display card drive installation package by using a file filtering technology; when a new process is created, calling a callback function, and if the new process is judged to be a display card driving installation process, enabling the display card driving installation process to load a target DLL file by using a thread injection technology; executing a hook target key function, removing the first attribute by the target key function, and adding the second attribute to accelerate the installation driving process of the new display card hardware. The speed of the display card driving installation is quickened.

Description

Method, device, equipment and medium for accelerating display card drive installation
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for accelerating installation of a graphics card driver.
Background
The diskless system provides an operating system and an application program through a network or cloud service, so that the requirement of local storage is reduced, the management and maintenance of equipment are simplified, the system is widely applied in various scenes, and the problems in the aspects of display card drive installation and update are faced due to the fact that different diskless client display card hardware is different.
In the prior art, a mode of leading a system display card driving package in a starting process to enable the system to automatically install a display card driving is generally adopted to avoid the problems, but the problem of slow installation of the display card driving is met, and the installation is completed only about half a minute after the desktop is accessed; the cloud computer/system can be utilized to transfer computing resources from local equipment to the cloud server, a user can access the cloud system and resources through a network, under a cloud computer scene, the user can also face the problem that the display card drive needs to be installed and updated due to switching among different equipment, particularly the situation of the display card drive is related, when the computing host with different display card models is called, the display card drive is complex and the resource file is huge, so that reinstallation and configuration of the display card drive can be caused, the process consumes long time, and the installation is completed after the user enters a desktop for a period of time.
In summary, how to quickly complete the installation of the graphics card driver so as to improve the user experience is a problem to be solved in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a method, apparatus, device and medium for accelerating installation of a graphics card driver, so as to achieve fast completion of the installation of the graphics card driver, thereby improving the user experience. The specific scheme is as follows:
in a first aspect, the present application discloses a method for accelerating installation of a graphics card driver, including:
acquiring a storage path of a display card drive installation package resource directory and INF files, acquiring a system drive warehouse drive package directory based on the display card drive installation package resource directory and the storage path, and creating a first resource file in the system drive warehouse drive package directory; the system driving warehouse driving package catalog has the same catalog structure as the display card driving installation package resource catalog;
analyzing the INF file to obtain a corresponding relation information list, and creating a second resource file in a system directory based on the corresponding relation information list; the size of the occupied space and the tail end position of the second resource file are the same as those of the driver file, and the attribute of the second resource file is sparse;
Redirecting the access to the first resource file and the access to the second resource file to the file in the resource catalog of the display card drive installation package by using a file filtering technology;
when a new process is created, calling a callback function, acquiring a process name and a command line parameter of the new process in the callback function, judging that the new process is a display card drive installation process if the process name and the command line parameter meet preset conditions, and enabling the display card drive installation process to load a target DLL file by using a thread injection technology;
and executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute to accelerate the installation driving process of the new display card hardware.
Optionally, the method for accelerating the installation of the graphics card driver further includes:
acquiring the complete file name of the current pre-creation operation;
if the complete file name belongs to the system driver warehouse driver package catalog, modifying the complete file name based on the display card driver installation package resource catalog to obtain a first modified name, and redirecting the current pre-creation operation to a file in the display card driver installation package resource catalog based on the first modified name;
And if the complete file name belongs to the corresponding relation information list, modifying the complete file name based on the corresponding relation information list to obtain a second modified name, and redirecting the current pre-creation operation to a driving resource file based on the second modified name.
Optionally, the executing the hooking target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute, includes:
executing a hook target key function in a DLLmain function of the target DLL file, and determining a mask value of a marking parameter; the target key function is a setup filter queue W function;
if the mask value is 0x620, the objective key function removes the first attribute and adds the second attribute; wherein the first attribute is 0x200 and the second attribute is 0x1.
Optionally, the obtaining the system driver warehouse driver package directory based on the display card driver installation package resource directory and the storage path includes:
reading the INF file based on the storage path to acquire a first directory name and a first directory path of a system driver warehouse driver package directory;
And splicing the first directory path with a second directory path of the display card drive installation package resource directory to obtain the system drive warehouse drive package directory with the directory name being the first directory name.
Optionally, the first resource file is the same as a directory location structure, a file location structure, a directory name, a file occupation space size and a file end location of a file in the display card driving installation package resource directory, and the attribute of the first resource file is sparse.
Optionally, the correspondence between the storage path of the system resource file and the storage path of the driving resource file is recorded in the correspondence information list.
Optionally, after redirecting the access to the first resource file and the access to the second resource file to the file in the graphics card driver installation package resource directory by using a file filtering technology, the method further includes:
and the registration system process creates callback notification, and when the system equipment installation service detects new display card hardware, a display card drive installation process is created so as to start to install and drive the new display card hardware.
In a second aspect, the present application discloses a device for accelerating display card drive installation, comprising:
The first file creation module is used for obtaining a storage path of a display card drive installation package resource directory and INF files, obtaining a system drive warehouse drive package directory based on the display card drive installation package resource directory and the storage path, and creating a first resource file in the system drive warehouse drive package directory; the system driving warehouse driving package catalog has the same catalog structure as the display card driving installation package resource catalog;
the second file creation module is used for analyzing the INF file to obtain a corresponding relation information list and creating a second resource file in the system catalog based on the corresponding relation information list; the size of the occupied space and the tail end position of the second resource file are the same as those of the driver file, and the attribute of the second resource file is sparse;
the redirection module is used for redirecting the access to the first resource file and the access to the second resource file to the file in the display card drive installation package resource catalog by utilizing a file filtering technology;
the file loading module is used for calling a callback function when a new process is created, acquiring a process name and a command line parameter of the new process in the callback function, judging that the new process is a display card driving installation process if the process name and the command line parameter meet preset conditions, and enabling the display card driving installation process to load a target DLL file by utilizing a thread injection technology;
And the accelerated drive installation module is used for executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute to accelerate the installation and drive process of the new display card hardware.
In a third aspect, the present application discloses an electronic device comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the steps of the method for accelerating the installation of the display card driver.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; the method comprises the steps of executing a computer program by a processor, wherein the step of accelerating the installation method of the display card driver is realized.
The beneficial effects of the application are that: the method comprises the steps of obtaining a storage path of a display card drive installation package resource directory and INF files, obtaining a system drive warehouse drive package directory based on the display card drive installation package resource directory and the storage path, and creating a first resource file in the system drive warehouse drive package directory; the system driving warehouse driving package catalog has the same catalog structure as the display card driving installation package resource catalog; analyzing the INF file to obtain a corresponding relation information list, and creating a second resource file in a system directory based on the corresponding relation information list; the size of the occupied space and the tail end position of the second resource file are the same as those of the driver file, and the attribute of the second resource file is sparse; redirecting the access to the first resource file and the access to the second resource file to the file in the resource catalog of the display card drive installation package by using a file filtering technology; when a new process is created, calling a callback function, acquiring a process name and a command line parameter of the new process in the callback function, judging that the new process is a display card drive installation process if the process name and the command line parameter meet preset conditions, and enabling the display card drive installation process to load a target DLL file by using a thread injection technology; and executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute to accelerate the installation driving process of the new display card hardware. Therefore, the method and the device acquire the system driving package catalog and the corresponding relation information list, and generate complete catalog and sparse files corresponding to the driving installation resource package, namely, create a first resource file and a second resource file; redirecting the access to the sparse files to the corresponding real files in the drive installation resource package, namely redirecting the access to the first resource file and the access to the second resource file to files in the resource directory of the display card drive installation package by using a file filtering technology, calling a callback function when a new process is created, acquiring the process name and command line parameters of the new process in the callback function, and if the new process is judged to be the display card drive installation process, enabling the display card drive installation process to load a target DLL file by using a thread injection technology; and executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute, thus omitting comparison and integrity of the file and signature verification behavior, only reserving detection of whether the file exists or not, accelerating the installation speed of the display card driver to improve the experience of a user, and redirecting all accesses to related files of the drive resource to corresponding files in a pre-prepared display card drive installation package resource when and after the installation of the drive is completed, so that the system and the drive can work normally.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flow chart of a method for accelerating the installation of a graphics card driver disclosed in the present application;
FIG. 2 is a schematic diagram illustrating the generation of a specific driving resource file disclosed in the present application;
FIG. 3 is a schematic diagram illustrating a specific redirection of a drive resource file disclosed herein;
FIG. 4 is a schematic diagram of a specific drive installation process injection hook disclosed herein;
FIG. 5 is a schematic diagram of a display card driving device disclosed in the present application;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The diskless system provides an operating system and an application program through a network or cloud service, so that the requirement of local storage is reduced, the management and maintenance of equipment are simplified, the system is widely applied in various scenes, and the problems in the aspects of display card drive installation and update are faced due to the fact that different diskless client display card hardware is different.
In the prior art, a mode of leading a system display card driving package in a starting process to enable the system to automatically install a display card driving is generally adopted to avoid the problems, but the problem of slow installation of the display card driving is met, and the installation is completed only about half a minute after the desktop is accessed; the cloud computer/system can be utilized to transfer computing resources from local equipment to the cloud server, a user can access the cloud system and resources through a network, under a cloud computer scene, the user can also face the problem that the display card drive needs to be installed and updated due to switching among different equipment, particularly the situation of the display card drive is related, when the computing host with different display card models is called, the display card drive is complex and the resource file is huge, so that reinstallation and configuration of the display card drive can be caused, the process consumes long time, and the installation is completed after the user enters a desktop for a period of time.
Therefore, the application correspondingly provides a scheme for accelerating the installation of the display card drive, so that the installation of the display card drive is completed rapidly, and the user experience is improved.
Referring to fig. 1, an embodiment of the present application discloses a method for accelerating installation of a graphics card driver, including:
step S11: acquiring a storage path of a display card drive installation package resource directory and INF files, acquiring a system drive warehouse drive package directory based on the display card drive installation package resource directory and the storage path, and creating a first resource file in the system drive warehouse drive package directory; and the directory structure of the system driver warehouse driver package directory is the same as the directory structure of the display card driver installation package resource directory.
In this embodiment, the obtaining the system driver repository driver package directory based on the display card driver installation package resource directory and the storage path includes: reading the INF file based on the storage path to acquire a first directory name and a first directory path of a system driver warehouse driver package directory; and splicing the first directory path with a second directory path of the display card drive installation package resource directory to obtain the system drive warehouse drive package directory with the directory name being the first directory name. For example, a specific driving resource file generation schematic diagram shown in fig. 2, when the system is started, the driving resource file generation module obtains a preset storage path of the resource directory of the display card driving installation package and the corresponding INF file, which is specifically as follows:
Z:\dispres\nvidia\546.29-desktop-win10-win11-64bit-international-dch-whql\Display.Driver;
Z:\dispres\nvidia\546.29-desktop-win10-win11-64bit-international-dch-whql\Display.Driver\nv_dispig.inf;
Reading the data of the whole INF file based on the storage path to obtain the name and path of the system driver warehouse driver package directory to be installed, namely a first directory name and a first directory path, wherein the first directory name is, for example, "nv_dispig. Inf_amd64_950f824e94ba1225", and then splicing the first directory path with the second directory path of the display card driver installation package resource directory to obtain a system driver warehouse driver package directory with the directory name of the first directory name, and the specific system driver warehouse driver package directory is, for example:
C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_950f824e94ba1225。
in this embodiment, the first resource file is the same as a directory location structure, a file location structure, a directory name, a file name, a size of a file occupied space, and a file end location of a file in the display card driver installation package resource directory, and an attribute of the first resource file is sparse. The method comprises the steps of recursively enumerating a whole display card drive installation package resource directory, creating an equivalent directory structure and the same file in a system drive warehouse drive package directory, setting file attributes to be sparse, and setting the same file occupation size and file end position, namely, the same points of a first resource file and the file in the display card drive installation package resource directory comprise an internal file directory structure, file names and file numbers, corresponding file attributes such as (occupation space size and file end position), and the only difference point is that the attribute of the first resource file is sparse, namely, the first resource file is sparse.
Step S12: analyzing the INF file to obtain a corresponding relation information list, and creating a second resource file in a system directory based on the corresponding relation information list; the size of the occupied space and the tail end position of the second resource file are the same as those of the driver file, and the attribute of the second resource file is sparse.
In this embodiment, the correspondence between the storage path of the system resource file and the storage path of the drive resource file is recorded in the correspondence information list. The correspondence information list records a correspondence between a storage path of a system resource file and a storage path of a driving resource file, and may be specifically as shown in table one:
list one
And creating a second resource file in the system catalog according to the appointed information in the corresponding relation information list, setting the attribute of the second resource file to be sparse, and setting the same occupied size and end position of the file.
It can be understood that after the second resource file is created, the generation of the resource file of the whole display card driver to be installed is finally completed, the files are set as sparse attributes, so as to omit the read/write IO (Input/Output) overhead and write-back occupation caused by actually writing the file data, and meanwhile, the size and end position of the file occupation are set to be consistent with those of the file in the corresponding driving resource, so that the file attributes are checked to be consistent with the placement of the system from the system level, but the internal data are sparse and all 0, and when the system needs to actually access the file content, the file is processed through the display card driver resource file redirection module, so that the effective file data are obtained.
Step S13: and redirecting the access to the first resource file and the access to the second resource file to the file in the resource directory of the display card drive installation package by using a file filtering technology.
For example, a specific driver resource file redirection schematic shown in fig. 3, the graphic card driver resource file redirection module loads the file filtering driver and registers the pre_create operation of the file, that is, the system can operate the real and effective file data by redirecting the access of the system to the sparse file (i.e. the first resource file) in the driver package directory and the access to the sparse file (i.e. the second resource file) of the related system resource to the corresponding file in the driver installation package resource directory.
In this embodiment, the method further includes: acquiring the complete file name of the current pre-creation operation; if the complete file name belongs to the system driver warehouse driver package catalog, modifying the complete file name based on the display card driver installation package resource catalog to obtain a first modified name, and redirecting the current pre-creation operation to a file in the display card driver installation package resource catalog based on the first modified name; and if the complete file name belongs to the corresponding relation information list, modifying the complete file name based on the corresponding relation information list to obtain a second modified name, and redirecting the current pre-creation operation to a driving resource file based on the second modified name. After the PRE_CREATE operation of the registered file is successfully completed, the system will call back to the registered callback function before executing CREATE operation on all files, at this time, the complete file name of the CREATE operation is obtained, when the file path or name accessed by the system accords with the system drive warehouse drive package catalog created in the drive resource file generating module, the complete file name is modified based on the display card drive installation package resource catalog to obtain a first modified name, for example: the complete file name of the current pre-creation operation is:
C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_950f824e94ba1225\nvlddmkm.sys;
And therefore, determining that the file belongs to a system driver warehouse driver package directory created in the file generation module, wherein the system driver warehouse driver package directory is specifically as follows:
C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_950f824e94ba1225\;
the CREATE operation is redirected and the file name is reset to obtain a first modified name, which is specifically shown as follows:
Z:\dispres\nvidia\546.29-desktop-win10-win11-64bit-international-dch-whql\Display.Driver\nvlddmkm.sys;
and if the complete name of the current access file is 'C \Windows\System 32\nvcpl.dll', and therefore, the current file name is judged to exist in the corresponding relation information list of the related System resource file needing to be installed and driven, the CREATE operation is subjected to redirection processing, and the file name is reset according to the information stored in the corresponding relation to obtain a second modified name, wherein the second modified name is specifically shown as follows:
Z:\dispres\nvidia\546.29-desktop-win10-win11-64bit-international-dch-whql\Display.Driver\nvcpl.dll;
after the operation, the system can access the effective data of the driving resource file, so that the system and the display card driver can work normally.
In this embodiment, after redirecting the access to the first resource file and the access to the second resource file to the file in the graphics card driver installation package resource directory by using the file filtering technology, the method further includes: and the registration system process creates callback notification, and when the system equipment installation service detects new display card hardware, a display card drive installation process is created so as to start to install and drive the new display card hardware. For example, as shown in fig. 4, a specific driver installation process injects a hook schematic diagram, where an injection hook module registers a system process to create a callback notification, when a system device installation Service detects that new graphics card hardware exists, a DrvInst process (i.e., a graphics card driver installation process) is created to start installing a driver for a graphics card, and this triggers a callback, that is, when the system detects that new graphics card hardware exists, a driver is installed for the graphics card instance, and a specific process is a winlogo process (Windows Logon Process, a system core process) starts a file to be a umnpmgr.dll (User-mode Plug-and-Play Service), i.e., a User mode Plug-and-Play Service file) of a device installation, and the device installation Service detects a graphics card device marked as a driver to be installed, and creates a DrvInst process as a graphics card hardware instance installation driver.
Step S14: when a new process is created, a callback function is called, a process name and a command line parameter of the new process are obtained in the callback function, if the process name and the command line parameter meet preset conditions, the new process is judged to be a display card driving installation process, and a thread injection technology is utilized to enable the display card driving installation process to load a target DLL file.
It can be understood that after all the processes are created, the system can call the callback function, so that the process name and the command line parameter of the corresponding process can be obtained, if the process name and the command line parameter meet the preset conditions, the new process is determined to be the display card driving installation process, that is, if the process name accords with DrvInst.exe and the command line parameter contains the display card instance ID, the new process is determined to be the display card driving installation process, the new process is added to the process, and the preset DLL (Dynamic Link Library, namely the dynamic link library) file is injected and loaded into the process in a thread creation mode.
Step S15: and executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute to accelerate the installation driving process of the new display card hardware.
In this embodiment, the executing the hooking target key function in the dllmin function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute, includes: executing a hook target key function in a DLLmain function of the target DLL file, and determining a mask value of a marking parameter; the target key function is a setup filter queue W function; if the mask value is 0x620, the objective key function removes the first attribute and adds the second attribute; wherein the first attribute is 0x200 and the second attribute is 0x1.
By analyzing the detailed process of the system installation driver, it is known that when installing the driver it is mainly time-consuming to operate for the driver installation file list, while the key operation function is to set up the scan file queue as a publicly derived function setucanfilequeue in setucapi, which is interpreted as scanning the installation file queue and performing an operation on each node in its list to affect the function specific operation so as to Flag the parameter (Flag), wherein the Flag parameter is a set of mask values, for example, as shown in fig. 4, a hook target key function, i.e., setucanfilequeue function, is performed in the DLLmain function of the target DLL file, and if the mask value of the Flag parameter is 0x620 when installing the driver, the target key function removes the first attribute and adds the second attribute, wherein the first attribute is 0x200 (i.e., file read vs. check attribute), and the second attribute is 0x1 (i.e., attribute indicating that the presence of the file is checked during the file queue scan), and if the file already exists at the target location, the copy operation is skipped, the system is not read.
The removed files are compared with the scanning operation, and the stability and the function of the system driver installation are not affected, because the driver resource redirection module can ensure that the system access to the driver files is redirected to the resource directory file of the display card driver installation package, and the system installation driving process and the display card driver are normally executed.
Therefore, the method and the device acquire the system driving package catalog and the corresponding relation information list, and generate complete catalog and sparse files corresponding to the driving installation resource package, namely, create a first resource file and a second resource file; redirecting the access to the sparse files to the corresponding real files in the drive installation resource package, namely redirecting the access to the first resource file and the access to the second resource file to files in the resource directory of the display card drive installation package by using a file filtering technology, calling a callback function when a new process is created, acquiring the process name and command line parameters of the new process in the callback function, and if the new process is judged to be the display card drive installation process, enabling the display card drive installation process to load a target DLL file by using a thread injection technology; and executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute, thus omitting comparison and integrity of the file and signature verification behavior, only reserving detection of whether the file exists or not, accelerating the installation speed of the display card driver to improve the experience of a user, and redirecting all accesses to related files of the drive resource to corresponding files in a pre-prepared display card drive installation package resource when and after the installation of the drive is completed, so that the system and the drive can work normally.
Referring to fig. 5, an embodiment of the present application discloses a device for accelerating display card driving installation, including:
a first file creating module 11, configured to obtain a storage path of a display card driver installation package resource directory and an INF file, so as to obtain a system driver warehouse driver package directory based on the display card driver installation package resource directory and the storage path, and create a first resource file in the system driver warehouse driver package directory; the system driving warehouse driving package catalog has the same catalog structure as the display card driving installation package resource catalog;
a second file creating module 12, configured to parse the INF file to obtain a corresponding relationship information list, and create a second resource file in the system directory based on the corresponding relationship information list; the size of the occupied space and the tail end position of the second resource file are the same as those of the driver file, and the attribute of the second resource file is sparse;
a redirection module 13, configured to redirect, by using a file filtering technique, access to the first resource file and access to the second resource file to a file in the graphics card driver installation package resource directory;
The file loading module 14 is configured to call a callback function when a new process is created, acquire a process name and a command line parameter of the new process in the callback function, determine that the new process is a display card driving installation process if the process name and the command line parameter meet preset conditions, and enable the display card driving installation process to load a target DLL file by using a thread injection technology;
the speeding up driver installation module 15 is configured to execute a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute, so as to speed up the installation driver process of the new graphics card hardware.
Therefore, the method and the device acquire the system driving package catalog and the corresponding relation information list, and generate complete catalog and sparse files corresponding to the driving installation resource package, namely, create a first resource file and a second resource file; redirecting the access to the sparse files to the corresponding real files in the drive installation resource package, namely redirecting the access to the first resource file and the access to the second resource file to files in the resource directory of the display card drive installation package by using a file filtering technology, calling a callback function when a new process is created, acquiring the process name and command line parameters of the new process in the callback function, and if the new process is judged to be the display card drive installation process, enabling the display card drive installation process to load a target DLL file by using a thread injection technology; and executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute, thus omitting comparison and integrity of the file and signature verification behavior, only reserving detection of whether the file exists or not, accelerating the installation speed of the display card driver to improve the experience of a user, and redirecting all accesses to related files of the drive resource to corresponding files in a pre-prepared display card drive installation package resource when and after the installation of the drive is completed, so that the system and the drive can work normally.
Further, the embodiment of the application also provides electronic equipment. Fig. 6 is a block diagram of an electronic device 20, according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Specifically, the method comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, where the computer program is loaded and executed by the processor 21, so as to implement relevant steps in the method for installing a graphics card driver by using the electronic device disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon include an operating system 221, a computer program 222, and data 223, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows, unix, linux. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the accelerated graphics card driver installation method performed by the electronic device as disclosed in any of the previous embodiments. The data 223 may include, in addition to data received by the electronic device and transmitted by the external device, data collected by the input/output interface 25 itself, and so on.
Further, the application also discloses a computer readable storage medium for storing a computer program; the method for accelerating the installation of the display card driver is realized when the computer program is executed by a processor. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be placed in random access Memory (Random Access Memory), memory, read-Only Memory (ROM), electrically programmable EPROM (Erasable Programmable Read Only Memory), electrically erasable programmable EEPROM (Electrically Erasable Programmable Read Only Memory), registers, hard disk, removable disk, CD-ROM (CoMP 24000184act Disc Read-Only Memory), or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the medium for accelerating the installation of the display card drive provided by the invention are described in detail, and specific examples are applied to the description of the principle and the implementation mode of the invention, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A method for accelerating the installation of a graphics card driver, comprising:
acquiring a storage path of a display card drive installation package resource directory and INF files, acquiring a system drive warehouse drive package directory based on the display card drive installation package resource directory and the storage path, and creating a first resource file in the system drive warehouse drive package directory; the system driving warehouse driving package catalog has the same catalog structure as the display card driving installation package resource catalog;
analyzing the INF file to obtain a corresponding relation information list, and creating a second resource file in a system directory based on the corresponding relation information list; the size of the occupied space and the tail end position of the second resource file are the same as those of the driver file, and the attribute of the second resource file is sparse;
redirecting the access to the first resource file and the access to the second resource file to the file in the resource catalog of the display card drive installation package by using a file filtering technology;
when a new process is created, calling a callback function, acquiring a process name and a command line parameter of the new process in the callback function, judging that the new process is a display card drive installation process if the process name and the command line parameter meet preset conditions, and enabling the display card drive installation process to load a target DLL file by using a thread injection technology;
And executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute to accelerate the installation driving process of the new display card hardware.
2. The accelerated graphics card drive installation method of claim 1, further comprising:
acquiring the complete file name of the current pre-creation operation;
if the complete file name belongs to the system driver warehouse driver package catalog, modifying the complete file name based on the display card driver installation package resource catalog to obtain a first modified name, and redirecting the current pre-creation operation to a file in the display card driver installation package resource catalog based on the first modified name;
and if the complete file name belongs to the corresponding relation information list, modifying the complete file name based on the corresponding relation information list to obtain a second modified name, and redirecting the current pre-creation operation to a driving resource file based on the second modified name.
3. The accelerated graphics card driver installation method of claim 1, wherein executing a hook target key function in a DLLmain function of the target DLL file such that the target key function removes a first attribute and adds a second attribute comprises:
Executing a hook target key function in a DLLmain function of the target DLL file, and determining a mask value of a marking parameter; the target key function is a setup filter queue W function;
if the mask value is 0x620, the objective key function removes the first attribute and adds the second attribute; wherein the first attribute is 0x200 and the second attribute is 0x1.
4. The accelerated graphics card driver installation method of claim 1, wherein the obtaining a system driver repository driver package directory based on the graphics card driver package resource directory and the storage path comprises:
reading the INF file based on the storage path to acquire a first directory name and a first directory path of a system driver warehouse driver package directory;
and splicing the first directory path with a second directory path of the display card drive installation package resource directory to obtain the system drive warehouse drive package directory with the directory name being the first directory name.
5. The accelerated graphics port driver installation method of any one of claims 1 to 4, wherein the first resource file is the same as a directory location structure, a file location structure, a directory name, a file footprint size, a file end location of a file in the graphics port driver installation package resource directory, and the attribute of the first resource file is sparse.
6. The accelerated graphics card driver installation method of claim 1, wherein the correspondence between the storage path of the system resource file and the storage path of the driver resource file is recorded in the correspondence information list.
7. The method for installing the graphics card driver according to claim 1, wherein after redirecting the access to the first resource file and the access to the second resource file to the files in the graphics card driver installation package resource directory by using a file filtering technique, further comprises:
and the registration system process creates callback notification, and when the system equipment installation service detects new display card hardware, a display card drive installation process is created so as to start to install and drive the new display card hardware.
8. A device for accelerating the driving and mounting of a graphics card, comprising:
the first file creation module is used for obtaining a storage path of a display card drive installation package resource directory and INF files, obtaining a system drive warehouse drive package directory based on the display card drive installation package resource directory and the storage path, and creating a first resource file in the system drive warehouse drive package directory; the system driving warehouse driving package catalog has the same catalog structure as the display card driving installation package resource catalog;
The second file creation module is used for analyzing the INF file to obtain a corresponding relation information list and creating a second resource file in the system catalog based on the corresponding relation information list; the size of the occupied space and the tail end position of the second resource file are the same as those of the driver file, and the attribute of the second resource file is sparse;
the redirection module is used for redirecting the access to the first resource file and the access to the second resource file to the file in the display card drive installation package resource catalog by utilizing a file filtering technology;
the file loading module is used for calling a callback function when a new process is created, acquiring a process name and a command line parameter of the new process in the callback function, judging that the new process is a display card driving installation process if the process name and the command line parameter meet preset conditions, and enabling the display card driving installation process to load a target DLL file by utilizing a thread injection technology;
and the accelerated drive installation module is used for executing a hook target key function in the DLLmain function of the target DLL file, so that the target key function removes the first attribute and adds the second attribute to accelerate the installation and drive process of the new display card hardware.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the accelerated graphics card drive installation method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program; wherein the computer program when executed by a processor implements the steps of the accelerated graphics card drive installation method of any one of claims 1 to 7.
CN202410123950.7A 2024-01-29 2024-01-29 Method, device, equipment and medium for accelerating display card drive installation Pending CN117806665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410123950.7A CN117806665A (en) 2024-01-29 2024-01-29 Method, device, equipment and medium for accelerating display card drive installation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410123950.7A CN117806665A (en) 2024-01-29 2024-01-29 Method, device, equipment and medium for accelerating display card drive installation

Publications (1)

Publication Number Publication Date
CN117806665A true CN117806665A (en) 2024-04-02

Family

ID=90422077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410123950.7A Pending CN117806665A (en) 2024-01-29 2024-01-29 Method, device, equipment and medium for accelerating display card drive installation

Country Status (1)

Country Link
CN (1) CN117806665A (en)

Similar Documents

Publication Publication Date Title
US7823023B2 (en) Test framework for testing an application
US8689232B2 (en) Object synchronization in shared object space
CN110825456B (en) Loading time calculation method, loading time calculation device, computer equipment and storage medium
US8918783B2 (en) Managing virtual computers simultaneously with static and dynamic dependencies
US10289397B2 (en) Silent installation of software with dependencies
US10908948B2 (en) Multiple application instances in operating systems that utilize a single process for application execution
US20190258534A1 (en) Message oriented middleware with integrated rules engine
CN112667315A (en) Game engine editor starting method and device, electronic equipment and storage medium
CN109359092B (en) File management method, desktop display method, device, terminal and medium
CN112084488A (en) Application authority management method, device and system
CN111737275A (en) Database update event processing method and device and computer readable storage medium
CN111722888B (en) Operation execution method, device, equipment and readable storage medium
CN112395437B (en) 3D model loading method and device, electronic equipment and storage medium
CN111241540A (en) Service processing method and device
CN117806665A (en) Method, device, equipment and medium for accelerating display card drive installation
CN115586899A (en) Local refreshing method and device based on Flutter dynamic page
CN113590225B (en) Mapping detection method and device, electronic equipment and storage medium
CN109189551A (en) A kind of method, apparatus and computer storage medium creating middleware
CN115774742A (en) Data storage newly-increased method, device, equipment, medium and product of private cloud
CN114780166A (en) Pin configuration method, related device, equipment and readable storage medium
CN112506592B (en) Page loading time length determining method, device, equipment and storage medium
CN111858234A (en) Task execution method, device, equipment and medium
KR102567773B1 (en) Log information extraction device and method in combat system system
CN114489866B (en) Data management method and device
CN111625192B (en) Metadata object access method, device, equipment and medium

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