Drive control method, device, equipment, storage medium and program product

By acquiring and detecting the protocol interface to be used by the target device, precise control of UEFI drivers is achieved, solving the problem of inaccurate control in the prior art, and improving startup speed and security.

CN115509618BActive Publication Date: 2025-08-08DAWNING INFORMATION IND (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211007647.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-08-08
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

The control method of UEFI drivers in computer equipment in the prior art is not accurate enough, resulting in slow startup speed and may affect device safety.

Method used

By obtaining the protocol interface to be used by the target device and detecting whether it can consume the interface, if possible, the matching driver is installed, otherwise the installation is prohibited. Combined with the information database matching and protocol interface tag management, precise control of the UEFI driver is achieved.

Benefits of technology

Improves the flexibility and accuracy of the installation control of UEFI drivers, and improves the startup speed and safety of computer equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509618B_ABST
    Figure CN115509618B_ABST
Patent Text Reader

Abstract

The present application relates to a driver control method, apparatus, device, storage medium, and program product. The method comprises: obtaining a target device for installing a driver, and obtaining a protocol interface to be used that is pre-set by a user; matching the protocol interface to be used with the type of the target device; detecting whether the target device can consume the protocol interface to be used; if the target device can consume the protocol interface to be used, installing a driver that matches the protocol interface to be used on the target device using the protocol interface to be used; otherwise, prohibiting the target device from installing a driver that matches the protocol interface to be used. This method can improve the flexibility of controlling UEFI drivers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a drive control method, apparatus, device, storage medium, and program product. Background Art

[0002] As computers become increasingly complex and diverse, the number of UEFI (a motherboard firmware specification) drivers required to be installed within a computer's BIOS (Basic Input Output System) is increasing. Installing too many drivers can slow down computer boot times, and some drivers can also harm and compromise computer security. Therefore, controlling the drivers installed on computers is crucial.

[0003] In the related art, when controlling the drivers installed on a computer device, the control of the drivers is usually achieved by controlling whether the UEFI driver is loaded in the memory of the computer device. For example, if a UEFI driver is not loaded into the memory, the driver will not be installed on the various sub-devices in the computer device.

[0004] However, the above-mentioned method of controlling the UEFI driver has the problem of being not precise enough. Summary of the Invention

[0005] Based on this, it is necessary to provide a drive control method, device, equipment, storage medium and program product that can improve the flexibility of controlling UEFI drivers in order to address the above technical problems.

[0006] In a first aspect, the present application provides a drive control method, the method comprising:

[0007] Obtaining a target device for which a driver is to be installed, and obtaining a protocol interface to be used that is pre-set by the user; the protocol interface to be used matches the type of the target device;

[0008] Detecting whether the target device is capable of consuming the protocol interface to be used;

[0009] If the target device can consume the protocol interface to be used, the driver matching the protocol interface to be used is installed on the target device using the protocol interface to be used; otherwise, the target device is prohibited from installing the driver matching the protocol interface to be used.

[0010] In this embodiment, since the user can customize the configuration protocol interface, taking the installation of UEFI drivers as an example, the UEFI drivers can be installed on devices that need to install UEFI drivers according to user needs, and the installation of UEFI drivers on devices that do not need to install UEFI drivers is prohibited. This can not only ensure the functions of devices that need to install UEFI drivers, but also ensure that UEFI drivers are not required to be installed on all devices to improve the startup speed of computer devices. Therefore, the installation of UEFI drivers in computer devices can be accurately controlled, and the flexibility and accuracy of UEFI driver control can be improved.

[0011] In one embodiment, before detecting whether the target device can consume the protocol interface to be used, the method further includes:

[0012] Obtaining the to-be-matched device information corresponding to the target device; the to-be-matched device information includes at least one of a target device identification ID, a target device name, and a location of the target device in the computer device;

[0013] Input the device information to be matched into a preset information database for matching; the information database includes device information of multiple devices, and the device information includes at least device ID, device name, and location of the device in the computer device;

[0014] If the information of the device to be matched is successfully matched in the information database, the process returns to the step of detecting whether the target device can consume the protocol interface to be used.

[0015] In this embodiment, by matching the target device's to-be-matched device information in a preset information database, and determining whether to execute the step of detecting whether the target device can consume the protocol interface based on the matching result, devices that the user does not need to control autonomously can be preliminarily screened out, thereby improving the efficiency of controlling the drive of the target device.

[0016] In one embodiment, the information database further includes the first protocol interface consumed and the second protocol interface generated by the target device during the initial connection process; and the step of obtaining the protocol interface to be used preset by the user includes:

[0017] Acquire the protocol interface to be used selected by the user from the first protocol interface.

[0018] In this embodiment, by obtaining the protocol interface selected by the user from the first protocol interface consumed by the target device during the initial connection process as the protocol interface to be used, the user can freely select the protocol interface to be controlled, thereby satisfying the user's need to use the same protocol interface for different driver installations on the device. Therefore, the flexibility of driver control can be improved, the actual needs of the user can be met, and the user experience can be improved.

[0019] In one embodiment, the detecting whether the target device can consume the protocol interface to be used includes:

[0020] Check whether the label corresponding to the protocol interface to be used is an unoccupied label;

[0021] If the tag is an unoccupied tag, it is determined that the target device can consume the protocol interface to be used; or if the tag is an occupied tag, it is determined that the target device cannot consume the protocol interface to be used.

[0022] In this embodiment, by detecting whether the tag of the protocol interface to be used is an unoccupied tag or an occupied tag, it is possible to simply and effectively determine whether the target device can consume the protocol interface to be used, thereby improving the efficiency and accuracy of detection, and further improving the efficiency and accuracy of controlling the drive of the target device.

[0023] In one embodiment, the method further includes:

[0024] After the driver matching the protocol interface to be used is successfully installed on the target device using the protocol interface to be used, the tag of the protocol interface to be used is set as an occupied tag.

[0025] In this embodiment, after the protocol interface to be used is used for driver installation, its label can be set to an occupied label. This can avoid using the protocol interface to be used to install other drivers matching the protocol interface to be used on the target device, thereby improving the effectiveness and flexibility of driver control of the device.

[0026] In one embodiment, the method further includes:

[0027] If the device information to be matched fails to be matched in the information database, the driver on the target device is installed according to the installation priority of each driver on the target device.

[0028] In this embodiment, when the device information of the target device fails to match the information in the information library, the driver can continue to be installed according to the installation priority of the driver corresponding to the target device. This ensures that the target device can execute the driver installation process normally, avoids the problem that the target device cannot install the driver and cannot be used normally, thereby improving the working stability of the computer device.

[0029] In a second aspect, the present application further provides a drive control device, comprising:

[0030] An acquisition module is used to acquire a target device for which a driver is to be installed, and to acquire a protocol interface to be used that is preset by a user; the protocol interface to be used matches the type of the target device;

[0031] A detection module, configured to detect whether the target device is capable of consuming the protocol interface to be used;

[0032] The control module is used to install a driver matching the protocol interface to be used on the target device using the protocol interface to be used if the target device can consume the protocol interface to be used; otherwise, prohibit the target device from installing a driver matching the protocol interface to be used.

[0033] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0034] Obtaining a target device for which a driver is to be installed, and obtaining a protocol interface to be used that is pre-set by the user; the protocol interface to be used matches the type of the target device;

[0035] Detecting whether the target device is capable of consuming the protocol interface to be used;

[0036] If the target device can consume the protocol interface to be used, the driver matching the protocol interface to be used is installed on the target device using the protocol interface to be used; otherwise, the target device is prohibited from installing the driver matching the protocol interface to be used.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0038] Obtaining a target device for which a driver is to be installed, and obtaining a protocol interface to be used that is pre-set by the user; the protocol interface to be used matches the type of the target device;

[0039] Detecting whether the target device is capable of consuming the protocol interface to be used;

[0040] If the target device can consume the protocol interface to be used, the driver matching the protocol interface to be used is installed on the target device using the protocol interface to be used; otherwise, the target device is prohibited from installing the driver matching the protocol interface to be used.

[0041] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the following steps:

[0042] Obtaining a target device for which a driver is to be installed, and obtaining a protocol interface to be used that is pre-set by the user; the protocol interface to be used matches the type of the target device;

[0043] Detecting whether the target device is capable of consuming the protocol interface to be used;

[0044] If the target device can consume the protocol interface to be used, the driver matching the protocol interface to be used is installed on the target device using the protocol interface to be used; otherwise, the target device is prohibited from installing the driver matching the protocol interface to be used.

[0045] The above-mentioned drive control method, apparatus, device, storage medium and program product obtain the target device for installing the driver and the protocol interface to be used that is pre-set by the user and matches the type of the target device, and detect whether the target device can consume the protocol interface to be used. If it can be consumed, the target device is controlled to install the driver using the protocol interface to be used, otherwise the target device is prohibited from installing the driver using the protocol interface to be used. In this method, since the protocol interface can be customized by the user, taking the installation of the UEFI driver as an example, the UEFI driver can be installed on the device that needs to install the UEFI driver according to the user's needs, and the installation of the UEFI driver on the device that does not need to install the UEFI driver can be prohibited. This can not only ensure the functions of the device that needs to install the UEFI driver, but also ensure that the UEFI driver is not required to be installed on all devices to improve the startup speed of the computer device, so that the installation of the UEFI driver in the computer device can be accurately controlled, and the flexibility and accuracy of the UEFI driver control can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is an example diagram of the storage location of a UEFI driver in one embodiment;

[0047] Figure 2 is a diagram of the internal structure of a computer device in one embodiment;

[0048] Figure 3 A schematic diagram of a process for installing a UEFI driver on a computer device in one embodiment;

[0049] Figure 4 1 is a flow chart of a drive control method according to an embodiment;

[0050] Figure 5 is a flow chart of a drive control method according to another embodiment;

[0051] Figure 6 An exemplary diagram of an information base established in another embodiment;

[0052] Figure 7 is a flow chart of a drive control method according to another embodiment;

[0053] Figure 8 FIG. 4 is a structural block diagram of a drive control device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0055] Before describing the specific embodiments of the present application, the following describes the technical terms involved in the present application:

[0056] BIOS: Basic Input Output System, which in this application refers to the motherboard firmware that complies with the UEFI specification;

[0057] UEFI: Unified Extensible Firmware Interface, one of the most popular motherboard firmware specifications;

[0058] PCI: Peripheral Component Interface, peripheral component interface;

[0059] ROM: Read-Only-Memory, read-only memory;

[0060] UEFI Driver Model: A device driver model defined by the UEFI specification. Drivers that conform to this model provide three interfaces after loading: Support, Start, and Stop, which are used to connect the device to the driver.

[0061] UEFI driver: A driver that complies with the UEFI driver model. It can be stored in the BIOS chip or packaged into an optional ROM and stored on an external card.

[0062] Connect: refers to the connection between the device and the UEFI driver. The Support and Start interfaces of the UEFI driver will be called in sequence to install the device driver.

[0063] Disconnect: disconnects the device from the UEFI driver. After the device driver is successfully installed, this operation executes the UEFI driver's Stop interface to uninstall the device driver.

[0064] Support: UEFI driver interface, used to test whether the UEFI driver supports a certain device;

[0065] Start: UEFI driver interface, which is called only after Support returns successfully, completing the main functions of the device driver;

[0066] Stop: UEFI driver interface. After Start is executed, calling Stop can uninstall the driver.

[0067] GUID: Globally Unique Identifier, a 128-bit binary digital identifier generated by an algorithm. The probability of two identical GUIDs being randomly generated is very small.

[0068] Protocol: A concept defined in the UEFI specification. It is an interface provided by a device or driver that can be called across modules. It is distinguished by a GUID. In this application, it specifically refers to the protocol interface provided by the device. Generally, a device can only have one protocol with the same GUID.

[0069] Currently, most computer motherboards use firmware that complies with the UEFI specification. The BIOS can perform self-tests and initialization on each device during the motherboard power-on phase. Installing the UEFI driver for the device is a common method. Figure 1 The example diagram of the storage location of the UEFI driver shown is that the UEFI driver can be in source code form or binary code form. It can be located in the memory chip of the BIOS or in the memory chip of an external device (for example, in the optional ROM of an external PCI device).

[0070] As computer systems become increasingly complex and diverse, the number of UEFI drivers required to be installed in a computer's BIOS is also increasing. This excessive number of devices can lead to lengthy driver installation times. For example, some network devices may have up to 48 network ports, and installing drivers for each port can significantly slow down boot speeds. Furthermore, some option ROMs contain bugs, and installing their UEFI drivers can damage the computer system, compromising the device's security.

[0071] Currently, when controlling the drivers installed on a computer device, the control of the driver is usually achieved by controlling whether the UEFI driver is loaded into the computer device's memory. For example, if a UEFI driver is not loaded into the memory, the driver will not be installed on the various sub-devices in the computer device. However, this control method has the problem of insufficient flexibility. Based on this, the embodiments of the present application provide a driver control method, apparatus, device, storage medium, and program product that can solve the above technical problems.

[0072] The drive control method provided in the embodiment of the present application can be applied to a computer device, which can be a terminal or a server. Taking the terminal as an example, its internal structure diagram can be as follows: Figure 2 As shown. The computer device includes a processor, a memory, a communication interface, and multiple external devices connected through a system bus. The external devices here may include, for example, a display screen and an input device. Among them, the processor of the computer device is used 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 program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a drive control method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.

[0073] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0074] Before introducing the specific implementation scheme of the embodiment of the present application, taking the UEFI driver installed on the computer device as an example, the process of installing the UEFI driver on the computer device is first described. Figure 3 As shown, the specific process is as follows: first execute step 1. After the BIOS system of the computer device is turned on, all UEFI drivers that need to be installed will be loaded into the memory of the computer device. Each UEFI driver can provide a support interface, a start interface, and a stop interface. Then, multiple external devices that the computer device needs to connect to and sub-devices in the computer device can be enumerated, all of which are called devices. The connect process is executed for each device in turn. After that, it can be determined whether there is another device. If so, continue to execute the steps of executing the connect process for the device. Otherwise, it can be determined that the driver installation process of the computer device is completed.

[0075] Specifically, when executing the connect process for each device, taking executing the connect process for one device as an example, that is, executing step 2, the connect process of one device may specifically include: obtaining the UEFI driver with the highest installation priority in the UEFI drivers corresponding to the device, calling the support interface of the UEFI driver with the highest installation priority with the overall properties of the device as return parameters, and determining whether the support interface returns successfully through the support return value; if the support interface returns successfully, then the start interface of the UEFI driver with the highest installation priority can be called with the overall properties of the device as return parameters, and determining whether the start interface returns successfully through the start return value. When the start interface returns successfully, it can be determined that the UEFI driver with the highest installation priority has been successfully installed on the device; if the support interface returns failure or the start interface returns failure, it can be determined whether there is the next UEFI driver. If so, return to the step of obtaining the UEFI driver with the highest installation priority in the UEFI drivers corresponding to the device, otherwise continue to execute the above step of determining whether there is still a next device.

[0076] In one embodiment, Figure 4 As shown, a drive control method is provided, which is applied to Figure 2 Taking the computer device in the example as an example, the method may include the following steps:

[0077] S102, obtaining a target device for which a driver is to be installed, and obtaining a protocol interface to be used that is preset by a user; the protocol interface to be used matches the type of the target device.

[0078] The target device may be a device for which a driver is currently required to be installed, and may be an external device of a computer device, such as a keyboard, a mouse, etc., or a sub-device within the computer device, such as a speaker, a network port, etc. The driver installed on the target device may generally be a driver that complies with various protocols or specifications. In this embodiment, UEFI drivers are mainly used as an example for description.

[0079] The protocol interface to be used refers to the protocol interface required for driver installation. The user-preset protocol interface to be used that matches the target device type may involve the user obtaining multiple protocol interfaces that match the target device type and selecting one as the protocol interface to be used. Alternatively, the user may directly specify a protocol interface that matches the target device as the protocol interface to be used based on their needs. Other methods are also possible and are not specifically limited here.

[0080] In summary, before installing the target driver, the computer device can know in advance the target device on which the driver is to be installed. At the same time, the computer device can also obtain the protocol interface to be used that is preset by the user and matches the target device type.

[0081] S104: Detect whether the target device can consume the protocol interface to be used.

[0082] Among them, generally, multiple UEFI drivers can be installed on a device. However, if there are multiple UEFI drivers that need to consume the same protocol interface of the device, then generally only one UEFI driver can be consumed successfully (that is, installed successfully), and the other UEFI drivers cannot be consumed successfully (that is, cannot be installed successfully).

[0083] Here, the target device can be controlled to attempt to install a UEFI driver using the protocol interface to be used to determine whether the installation is successful. If the UEFI driver is successfully installed, it is determined that the target device can consume the protocol interface to be used; if the UEFI driver is not successfully installed, it is determined that the target device cannot consume the protocol interface to be used. In short, a detection result of whether the target device can consume the protocol interface to be used can be obtained.

[0084] S106: If the target device can consume the protocol interface to be used, the driver matching the protocol interface to be used is installed on the target device using the protocol interface to be used; otherwise, the target device is prohibited from installing the driver matching the protocol interface to be used.

[0085] In this step, after obtaining the above detection result of whether the target device can consume the protocol interface to be used, if the target device can consume the protocol interface to be used, the UEFI driver can be installed on the target device using the protocol interface to be used; otherwise, the UEFI driver will not be installed using the protocol interface to be used.

[0086] From the above description, it can be seen that when the embodiment of the present application controls the UEFI driver installed on the target device, regardless of whether the UEFI driver is in source code form or binary code form, the UEFI driver can be controlled without modifying the UEFI driver. Therefore, the drive control method of the embodiment of the present application is easier to implement, thereby reducing the complexity of controlling the driver.

[0087] In the above-mentioned drive control method, the target device to be installed with the driver and the protocol interface to be used that is pre-set by the user and matches the type of the target device are obtained, and whether the target device can consume the protocol interface to be used is detected. If it can be consumed, the target device is controlled to install the driver using the protocol interface to be used, otherwise the target device is prohibited from installing the driver using the protocol interface to be used. In this method, since the protocol interface can be customized by the user, taking the installation of the UEFI driver as an example, the UEFI driver can be installed on the device that needs to install the UEFI driver according to the user's needs, and the installation of the UEFI driver on the device that does not need to install the UEFI driver is prohibited. This can not only ensure the functions of the device that needs to install the UEFI driver, but also ensure that the UEFI driver is not required to be installed on all devices to improve the startup speed of the computer device, so that the installation of the UEFI driver in the computer device can be accurately controlled, and the flexibility and accuracy of the UEFI driver control can be improved.

[0088] In the above embodiment, before detecting whether the target device can consume the protocol interface to be used, the device information of the target device may be detected. This process is described in detail below.

[0089] In another embodiment, another drive control method is provided. Based on the above embodiment, Figure 5 As shown, before the above S104, the above method may further include the following steps:

[0090] S202, obtaining the to-be-matched device information corresponding to the target device; the to-be-matched device information includes at least one of a target device identification ID, a target device name, and a location of the target device in the computer device.

[0091] Specifically, after the target device is successfully connected to the computer device, the computer device can read the target device's information and record it as the device information to be matched. The device information to be matched can include the target device ID, the target device name, and the location of the target device in the computer device, or it can include one or both of these information.

[0092] S204, inputting the device information to be matched into a preset information database for matching; the information database includes device information of multiple devices, and the device information includes at least device ID, device name, and location of the device in the computer device.

[0093] In this step, before matching the device information to be matched in the information database, an information database can be pre-established. The process for establishing this information database is as follows: an initial connection process with the driver can be pre-executed for each device connected to the computer device. After the connection process is completed, the computer device can collect and obtain device information for each device and establish an information database based on the obtained device information. This device information can include the device ID, device name, the device's location within the computer device, and of course, the protocol interface corresponding to each device.

[0094] After the information database is established, after obtaining the target device's to-be-matched device information, the device ID, device name, location of the device in the computer device, etc. included in the to-be-matched device information can be entered into the information database in sequence for matching. If the same device information is found in the information database for the device ID, device name, and location, it can be considered that the external device corresponding to the to-be-matched device information is successfully matched; otherwise, it can be considered that the external device corresponding to the to-be-matched device information fails to match.

[0095] It should be noted that before matching the target device's to-be-matched device information in the information database, you can first obtain the information database, that is, determine whether the information database exists. If the information database exists, you can return to execute the above-mentioned step of matching the target device's to-be-matched device information in the information database; if the information database does not exist, it indicates that the target device is a device that the user does not need to control the driver, and you can install the driver on the device according to the normal device driver installation process, that is, the connect process executed by each device mentioned above.

[0096] S206: If the information of the device to be matched is successfully matched in the information database, the process returns to the step of detecting whether the target device can consume the protocol interface to be used.

[0097] In this step, if the device information of the above-mentioned target device is successfully matched in the information database, it indicates that the target device is a device associated with the computer device and is a device that the user needs to control. Therefore, the UEFI driver can be installed on the target device using the protocol interface to be used, and the step of detecting whether the driver can be installed can be executed, that is, the above-mentioned step S104 can be returned to execute.

[0098] It should be noted that after the device information of the above-mentioned target device is successfully matched in the information database, it is also possible to determine whether the protocol interface to be used pre-set by the user is empty, that is, whether there is a set protocol interface to be used. If so, it indicates that the support interface of the driver using the protocol interface returns successfully, and the above-mentioned S104 step can be continued. Otherwise, it indicates that the support interface of the driver using the protocol interface returns failure, and then the driver on the device can be installed according to the normal installation process of the driver on the device, that is, the connect process executed by each device mentioned above.

[0099] In this embodiment, by matching the target device's to-be-matched device information in a preset information database, and determining whether to execute the step of detecting whether the target device can consume the protocol interface based on the matching result, devices that the user does not need to control autonomously can be preliminarily screened out, thereby improving the efficiency of controlling the drive of the target device.

[0100] The above embodiment mentioned the information library and the user can pre-set the protocol interface to be used. Based on the above embodiment, the above information library also includes the first protocol interface consumed by the target device during the initial connection process and the second protocol interface generated. Here we will explain how the user sets the protocol interface to be used according to the protocol interface in the information library.

[0101] In another embodiment, another drive control method is provided. Based on the above embodiment, the step of obtaining the protocol interface to be used preset by the user in S102 may include the following steps A:

[0102] Step A: obtaining the protocol interface to be used selected by the user from the first protocol interface.

[0103] The first protocol interface matches the device type of the target device. The first protocol interface is the protocol interface consumed by the target device during the initial connection process. The initial connection process here refers to the connect process for each device mentioned when establishing the information library. By executing the connect process for each device, the protocol interface consumed by each device during the initial connection process can be collected and stored in the device information corresponding to the device.

[0104] Generally, a device may consume one or more protocol interfaces during the initial connection process. After obtaining the first protocol interface (i.e., the protocol interface consumed by the device) and the second protocol interface (i.e., the protocol interface generated by the device) corresponding to each device, they can be stored in the device information corresponding to the device in the information library. For example, the information library established can be found in Figure 6 As shown. The device information corresponding to each device may include the device name, device ID, location information of the device within the computer, and all protocol interfaces of the device. After the user selects a protocol interface from each first protocol interface, the identifier of the selected protocol interface can be obtained, which is recorded as a GUID.

[0105] After obtaining the protocol interface to be used selected by the user, the protocol interface selected by the user can be used as the protocol interface to be used. Generally, if the user currently selects a protocol interface, it will only take effect the next time the device driver is installed.

[0106] In this embodiment, by obtaining the protocol interface selected by the user from the first protocol interface consumed by the target device during the initial connection process as the protocol interface to be used, the user can freely select the protocol interface to be controlled, thereby satisfying the user's need to use the same protocol interface for different driver installations on the device. Therefore, the flexibility of driver control can be improved, the actual needs of the user can be met, and the user experience can be improved.

[0107] The above embodiment mentions a simple process for detecting whether the target device is capable of consuming the protocol interface to be used. The following embodiment specifically describes this process.

[0108] In another embodiment, another drive control method is provided. Based on the above embodiment, Figure 7 As shown, the above S104 may include the following steps:

[0109] S302: Detect whether the tag corresponding to the protocol interface to be used is an unoccupied tag.

[0110] In this embodiment, a corresponding label can be set in advance for each protocol interface of the device. The label can indicate whether the protocol interface has been occupied by a driver of the device, that is, the label can include an unoccupied label and an occupied label. For example, the number 1 is used as the occupied label and 0 is used as the unoccupied label. Then, whether the protocol interface has been occupied can be known through the obtained label.

[0111] After knowing whether the protocol interface to be used is occupied through the label corresponding to the protocol interface to be used, if the label of the protocol interface to be used is an unoccupied label, execute the following step S304; if the label of the protocol interface to be used is an occupied label, execute the following step S306.

[0112] S304: If the tag is an unoccupied tag, determine that the target device can consume the protocol interface to be used.

[0113] In this step, if the label of the protocol interface to be used is an unoccupied label, it is determined that the protocol interface to be used is not occupied by a certain driver, and it can be determined that the target device can consume the protocol interface to be used, that is, it can be indicated that the start interface of the driver using the protocol interface returns successfully, and subsequently the protocol interface to be used can be used to install the UEFI driver on the target device.

[0114] Optionally, after successfully installing a driver matching the protocol interface to be used on the target device using the protocol interface to be used, the tag of the protocol interface to be used is set to the occupied tag. In other words, after installing a UEFI driver on the target device using the protocol interface to be used, the tag of the protocol interface to be used can be set to the occupied tag. In this way, other UEFI drivers matching the protocol interface to be used cannot be installed using the protocol interface to be used, thereby achieving flexible driver control on the target device.

[0115] S306: If the tag is already occupied, determine that the target device cannot consume the protocol interface to be used.

[0116] In this step, if the label of the protocol interface to be used is an occupied label, it is determined that the protocol interface to be used has been occupied by a driver. Generally, the same protocol interface can only be used by one UEFI driver, so other drivers on the target device here cannot use the protocol interface to be used for driver installation, which means that the start interface of the driver using the protocol interface returns a failure.

[0117] After determining that the target device cannot consume the protocol interface to be used, the driver on the device can be installed according to the normal driver installation process on the device, that is, the connect process executed by each device mentioned above.

[0118] In this embodiment, by detecting whether the tag of the protocol interface to be used is an unused tag or an occupied tag, it is possible to simply and effectively determine whether the target device can consume the protocol interface to be used, thereby improving the efficiency and accuracy of detection, and thereby improving the efficiency and accuracy of driver control of the target device. In addition, after the protocol interface to be used is used for driver installation, its tag can be set to the occupied tag. This can avoid using the protocol interface to be used to install other drivers that match the protocol interface to be used on the target device, thereby improving the effectiveness and flexibility of driver control of the device.

[0119] The above embodiments mentioned the case where the to-be-matched device information of the target device can be matched in the information database and the matching is successful. The following embodiments describe the case where the matching fails.

[0120] In another embodiment, another drive control method is provided. Based on the above embodiment, the above method may further include the following step B:

[0121] Step B: If the to-be-matched device information fails to match in the information database, the driver on the target device is installed according to the installation priority of each driver on the target device.

[0122] In this step, if the target device's device information fails to match the information in the database, indicating that the target device is not a device that the user needs to control, the driver can be installed on the device according to the normal device driver installation process, that is, the connect process performed by each device mentioned above. In other words, if multiple drivers need to be installed on a device, each driver can be installed on the target device in sequence according to the installation priority of each driver to complete the driver installation process.

[0123] In this embodiment, when the device information of the target device fails to match the information in the information library, the driver can continue to be installed according to the installation priority of the driver corresponding to the target device. This ensures that the target device can execute the driver installation process normally, avoids the problem that the target device cannot install the driver and cannot be used normally, thereby improving the working stability of the computer device.

[0124] In order to explain the technical solution of the present application in more detail, the technical solution of the present application is explained below in conjunction with a specific embodiment. Based on the above embodiment, the above method may include the following steps:

[0125] S1. Establishing a preset information database, which includes device information of multiple devices, wherein the device information includes at least a device ID, a device name, a location of the device in the computer device, a first protocol interface consumed by the device during an initial connection, and a second protocol interface generated;

[0126] S2, obtaining a protocol interface to be used selected by the user from the first protocol interface;

[0127] S3, obtaining the target device to be installed with the driver and the device information to be matched corresponding to the target device, the device information to be matched including at least one of the target device identification ID, the target device name, and the location of the target device in the computer device;

[0128] S4, input the device information to be matched into the preset information database for matching. If the match is successful, execute S5, otherwise execute S9;

[0129] S5, detecting whether the tag corresponding to the protocol interface to be used is an unoccupied tag; if so, executing S6, otherwise executing S7;

[0130] S6, determining that the target device is capable of consuming the protocol interface to be used, and installing a driver matching the protocol interface to be used on the target device using the protocol interface to be used;

[0131] S7, determining that the target device cannot consume the protocol interface to be used, and prohibiting the target device from installing a driver matching the protocol interface to be used;

[0132] S8, after successfully installing a driver matching the protocol interface to be used on the target device using the protocol interface to be used, setting the tag of the protocol interface to be used to an occupied tag;

[0133] S9: Install the driver on the target device according to the installation priority of each driver on the target device.

[0134] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0135] Based on the same inventive concept, the present application also provides a drive control device for implementing the aforementioned drive control method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more drive control device embodiments provided below can be found in the above-mentioned limitations of the drive control method and will not be further elaborated here.

[0136] In one embodiment, Figure 8 As shown, a drive control device is provided, comprising: an acquisition module 11, a detection module 12 and a control module 13, wherein:

[0137] The acquisition module 11 is used to acquire the target device for which the driver is to be installed, and to acquire the protocol interface to be used that is preset by the user; the protocol interface to be used matches the type of the target device;

[0138] A detection module 12 is used to detect whether the target device can consume the protocol interface to be used;

[0139] The control module 13 is configured to install a driver matching the protocol interface to be used on the target device using the protocol interface to be used if the target device can consume the protocol interface to be used; otherwise, prohibit the target device from installing a driver matching the protocol interface to be used.

[0140] In another embodiment, another drive control device is provided. Based on the above embodiment, before the detection module 12 detects whether the target device can consume the protocol interface to be used, the device may further include: an information acquisition module, a matching module, and a return execution module, wherein:

[0141] An information acquisition module is used to obtain the to-be-matched device information corresponding to the target device; the to-be-matched device information includes at least one of the target device identification ID, the target device name, and the location of the target device in the computer device;

[0142] A matching module is used to input the above-mentioned device information to be matched into a preset information database for matching; the above-mentioned information database includes device information of multiple devices, and the above-mentioned device information includes at least device ID, device name, and location of the device in the computer device;

[0143] The return execution module is used to return to the step of detecting whether the target device can consume the protocol interface to be used if the device information to be matched is successfully matched in the information database.

[0144] In another embodiment, another drive control device is provided. Based on the above embodiment, the above information library also includes the first protocol interface consumed by the above target device during the initial connection process and the second protocol interface generated; the above acquisition module 11 is specifically used to obtain the protocol interface to be used selected by the user from the above first protocol interface.

[0145] In another embodiment, another drive control device is provided. Based on the above embodiment, the detection module 12 may include a detection unit and a determination unit, wherein:

[0146] A detection unit, configured to detect whether the tag corresponding to the protocol interface to be used is an unoccupied tag;

[0147] The determining unit is configured to determine that the target device can consume the protocol interface to be used if the tag is an unoccupied tag; or to determine that the target device cannot consume the protocol interface to be used if the tag is an occupied tag.

[0148] In another embodiment, another drive control device is provided. Based on the above embodiment, the above device may further include a setting module, which is used to set the label of the above protocol interface to be used to an occupied label after successfully installing a driver matching the above protocol interface to be used on the above target device using the above protocol interface to be used.

[0149] In another embodiment, another driver control device is provided. Based on the above embodiment, the above device may further include an installation module, which is used to install the driver on the above target device according to the installation priority of each driver on the target device if the above device information to be matched fails to match in the above information database.

[0150] Each module in the aforementioned drive control device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0151] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0152] Obtain a target device for installing a driver, and obtain a protocol interface to be used that is pre-set by the user; the protocol interface to be used matches the type of the target device; detect whether the target device can consume the protocol interface to be used; if the target device can consume the protocol interface to be used, use the protocol interface to be used to install a driver that matches the protocol interface to be used on the target device; otherwise, prohibit the target device from installing a driver that matches the protocol interface to be used.

[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0154] Obtain the device information to be matched corresponding to the above-mentioned target device; the above-mentioned device information to be matched includes at least one of the target device identification ID, the target device name, and the location of the target device in the computer device; input the above-mentioned device information to be matched into a preset information library for matching; the above-mentioned information library includes device information of multiple devices, and the above-mentioned device information at least includes the device ID, the device name, and the location of the device in the computer device; if the above-mentioned device information to be matched is successfully matched in the above-mentioned information library, return to execute the above-mentioned step of detecting whether the above-mentioned target device can consume the above-mentioned protocol interface to be used.

[0155] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0156] Acquire the protocol interface to be used selected by the user from the first protocol interface.

[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0158] Detect whether the tag corresponding to the above-mentioned protocol interface to be used is an unoccupied tag; if the above-mentioned tag is an unoccupied tag, determine that the above-mentioned target device can consume the above-mentioned protocol interface to be used; or, if the above-mentioned tag is an occupied tag, determine that the above-mentioned target device cannot consume the above-mentioned protocol interface to be used.

[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0160] After the driver matching the protocol interface to be used is successfully installed on the target device using the protocol interface to be used, the tag of the protocol interface to be used is set as an occupied tag.

[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0162] If the device information to be matched fails to be matched in the information database, the driver on the target device is installed according to the installation priority of each driver on the target device.

[0163] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0164] Obtain a target device for installing a driver, and obtain a protocol interface to be used that is pre-set by the user; the protocol interface to be used matches the type of the target device; detect whether the target device can consume the protocol interface to be used; if the target device can consume the protocol interface to be used, use the protocol interface to be used to install a driver that matches the protocol interface to be used on the target device; otherwise, prohibit the target device from installing a driver that matches the protocol interface to be used.

[0165] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0166] Obtain the device information to be matched corresponding to the above-mentioned target device; the above-mentioned device information to be matched includes at least one of the target device identification ID, the target device name, and the location of the target device in the computer device; input the above-mentioned device information to be matched into a preset information library for matching; the above-mentioned information library includes device information of multiple devices, and the above-mentioned device information at least includes the device ID, the device name, and the location of the device in the computer device; if the above-mentioned device information to be matched is successfully matched in the above-mentioned information library, return to execute the above-mentioned step of detecting whether the above-mentioned target device can consume the above-mentioned protocol interface to be used.

[0167] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0168] Acquire the protocol interface to be used selected by the user from the first protocol interface.

[0169] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0170] Detect whether the tag corresponding to the above-mentioned protocol interface to be used is an unoccupied tag; if the above-mentioned tag is an unoccupied tag, determine that the above-mentioned target device can consume the above-mentioned protocol interface to be used; or, if the above-mentioned tag is an occupied tag, determine that the above-mentioned target device cannot consume the above-mentioned protocol interface to be used.

[0171] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0172] After the driver matching the protocol interface to be used is successfully installed on the target device using the protocol interface to be used, the tag of the protocol interface to be used is set as an occupied tag.

[0173] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0174] If the device information to be matched fails to be matched in the information database, the driver on the target device is installed according to the installation priority of each driver on the target device.

[0175] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0176] Obtain a target device for installing a driver, and obtain a protocol interface to be used that is pre-set by the user; the protocol interface to be used matches the type of the target device; detect whether the target device can consume the protocol interface to be used; if the target device can consume the protocol interface to be used, use the protocol interface to be used to install a driver that matches the protocol interface to be used on the target device; otherwise, prohibit the target device from installing a driver that matches the protocol interface to be used.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0178] Obtain the device information to be matched corresponding to the above-mentioned target device; the above-mentioned device information to be matched includes at least one of the target device identification ID, the target device name, and the location of the target device in the computer device; input the above-mentioned device information to be matched into a preset information library for matching; the above-mentioned information library includes device information of multiple devices, and the above-mentioned device information at least includes the device ID, the device name, and the location of the device in the computer device; if the above-mentioned device information to be matched is successfully matched in the above-mentioned information library, return to execute the above-mentioned step of detecting whether the above-mentioned target device can consume the above-mentioned protocol interface to be used.

[0179] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0180] Acquire the protocol interface to be used selected by the user from the first protocol interface.

[0181] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0182] Detect whether the tag corresponding to the above-mentioned protocol interface to be used is an unoccupied tag; if the above-mentioned tag is an unoccupied tag, determine that the above-mentioned target device can consume the above-mentioned protocol interface to be used; or, if the above-mentioned tag is an occupied tag, determine that the above-mentioned target device cannot consume the above-mentioned protocol interface to be used.

[0183] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0184] After the driver matching the protocol interface to be used is successfully installed on the target device using the protocol interface to be used, the tag of the protocol interface to be used is set as an occupied tag.

[0185] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0186] If the device information to be matched fails to be matched in the information database, the driver on the target device is installed according to the installation priority of each driver on the target device.

[0187] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0188] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0189] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0190] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A drive control method, characterized in that: The method comprises: Obtaining a target device for which a driver is to be installed, and obtaining a protocol interface to be used that is preset by a user; wherein the protocol interface to be used matches the type of the target device; Detecting whether the target device can consume the protocol interface to be used; If the target device can consume the protocol interface to be used, then using the protocol interface to be used to install a driver matching the protocol interface to be used on the target device; otherwise, prohibiting the target device from installing a driver matching the protocol interface to be used; Before detecting whether the target device can consume the protocol interface to be used, the method further includes: Obtaining the to-be-matched device information corresponding to the target device; the to-be-matched device information includes at least one of a target device identification ID, a target device name, and a location of the target device in the computer device; Input the device information to be matched into a preset information database for matching; the information database includes device information of multiple devices, and the device information includes at least device ID, device name, and location of the device in the computer device; If the information of the device to be matched is successfully matched in the information database, returning to the step of detecting whether the target device can consume the protocol interface to be used; The detecting whether the target device can consume the protocol interface to be used includes: Detecting whether the tag corresponding to the protocol interface to be used is an unoccupied tag; If the tag is an unoccupied tag, it is determined that the target device can consume the protocol interface to be used; or if the tag is an occupied tag, it is determined that the target device cannot consume the protocol interface to be used.

2. The method according to claim 1, characterized in that The information database also includes the first protocol interface consumed by the target device during the initial connection process and the second protocol interface generated; the obtaining of the protocol interface to be used preset by the user includes: Acquire a protocol interface to be used selected by the user from the first protocol interface.

3. The method according to claim 1, characterized in that The method further comprises: After the driver matching the protocol interface to be used is successfully installed on the target device using the protocol interface to be used, the tag of the protocol interface to be used is set as an occupied tag.

4. The method according to claim 2, characterized in that The method further comprises: If the to-be-matched device information fails to match in the information database, the driver on the target device is installed according to the installation priority of each driver on the target device.

5. A drive control device, characterized in that: The device comprises: An acquisition module, configured to acquire a target device for which a driver is to be installed, and to acquire a protocol interface to be used input by a user; the protocol interface to be used matches the type of the target device; A detection module, configured to detect whether the target device is capable of consuming the protocol interface to be used; a control module configured to install a driver matching the protocol interface to be used on the target device using the protocol interface to be used if the target device is capable of consuming the protocol interface to be used; otherwise, prohibiting the target device from installing a driver matching the protocol interface to be used; An information acquisition module is used to acquire the to-be-matched device information corresponding to the target device; the to-be-matched device information includes at least one of a target device identification ID, a target device name, and a location of the target device in the computer device; A matching module, configured to input the device information to be matched into a preset information database for matching; the information database includes device information of multiple devices, the device information including at least a device ID, a device name, and a location of the device in the computer device; a return execution module, configured to return to the step of detecting whether the target device can consume the protocol interface to be used if the information of the device to be matched is successfully matched in the information database; The detection module includes a detection unit and a determination unit; The detection unit is used to detect whether the tag corresponding to the protocol interface to be used is an unoccupied tag; The determining unit is configured to determine that the target device can consume the protocol interface to be used if the tag is an unoccupied tag; or to determine that the target device cannot consume the protocol interface to be used if the tag is an occupied tag.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Network port management method and device, terminal equipment and storage medium

    CN109815110A

  • Method for constructing Redis data model and accessing Redis data model based on Protobuf protocol

    CN114218223A