Diskless computer network card driver installation method, device and equipment
By creating a new network card device instance item in a diskless computer and updating the device manager structure, the problem of missing network card device instance configuration and driver in a diskless system is solved, and the normal operation of network card and the simplified driver management process is realized.
Patent Information
- Application Number
- CN202411298312.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-20
AI Technical Summary
The missing configuration and driver of network card device instance in diskless systems causes network card to fail to work properly, and the update and management of network card drivers is high, due to technical complexity and user skill level.
When the diskless computer is started, create a new target network card device instance item, and create a device manager object through the system plug-and-play device management object function, write instance item data and driver configuration data to the system registry, and update the device manager Structure, reset the network card status to install the driver.
The diskless computer network card instance configuration and driver installation are realized, which ensures the normal operation of network card equipment, simplifies the complexity of network card driver updates and management, and reduces user operation difficulty and system stability issues.
Smart Images

Figure CN119166223A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a diskless computer network card driver installation method, device, equipment and computer-readable storage medium. Background Art
[0002] A diskless system is a computer system that does not rely on traditional physical storage devices. It usually provides operating systems and applications through the Internet and cloud services. The advantages of a diskless system are that it reduces local storage requirements, simplifies equipment maintenance and management, and improves security and flexibility. Therefore, diskless systems have been widely used in various fields.
[0003] Diskless systems can quickly access public resources on the server through the network on different terminal devices. However, unified system management can also bring some inconveniences. For example, different clients use the same system image but install different types of network card hardware. The network card will not work properly due to the lack of corresponding network card device instance configuration and driver in the system. In a disk-based system, the driver can be automatically retrieved and installed through the system User Plug and Play (UserPnP) service update mechanism. If there is no adapter driver, the driver installation software can also be used or the driver can be installed manually. However, the operation of a diskless system must rely on the network, resulting in startup failure. In addition, the update and management of network card drivers may be limited by technical complexity and user skill level.
[0004] In summary, how to effectively solve the problem that the network card cannot work properly due to the lack of corresponding network card device instance configuration and driver in the system, and the update and management of the network card driver may be limited by technical complexity and user skill level, are problems that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The purpose of this application is to provide a method for installing a network card driver for a diskless computer, which realizes the configuration and driver installation of the network card instance of the diskless computer, ensures the normal operation of the network card device, and simplifies the complexity of network card driver update and management; another purpose of this application is to provide a diskless computer network card driver installation device, equipment and computer-readable storage medium.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] A method for installing a diskless computer network card driver, comprising:
[0008] When it is determined that the system includes a target network card device that does not have an instance item, creating a new target instance item for the target network card device;
[0009] When the diskless computer is powered on, the instance item of the currently started network card is obtained, and the instance item data and driver configuration data of the currently started network card are written into the system registry;
[0010] Create a device manager object for the instance item of the currently started network card by creating a system plug-and-play device management object function;
[0011] Insert the device manager object into the instance item device manager structure, and call the initialization system plug-and-play device management list function to update the instance item device manager structure according to the preset device manager object structure index sequence;
[0012] The state of the currently started network card is reset, and a driver is installed for the currently started network card according to the system registry and the updated instance item device manager structure.
[0013] In a specific implementation of the present application, obtaining an instance item of a currently started network card includes:
[0014] Obtain the device identifier and instance identifier of the network card device to be started;
[0015] The currently started network card is obtained according to the device identifier and the instance identifier, and the instance item of the currently started network card is obtained according to the instance identifier.
[0016] In a specific implementation of the present application, writing the instance item data and driver configuration data of the currently started network card into the system registry includes:
[0017] Writing the instance item data into the system registry so that the diskless computer starts the currently started network card to load the corresponding driver according to the instance item data;
[0018] Writing driver corresponding description, configuration items and network card parameters into the system registry;
[0019] Writing network information into the system registry;
[0020] The binary data of the instance item of the currently started network card is written into the system registry to establish a connection binding relationship between the currently started network card and the network adapter.
[0021] In a specific implementation of the present application, before inserting the device manager object into the instance item device manager structure, it also includes:
[0022] The original device manager object in the instance item device manager structure is deleted.
[0023] In a specific implementation of the present application, deleting the original device manager object in the instance item device manager structure includes:
[0024] Get the target string corresponding to the created device manager object;
[0025] The target string is matched from a device manager object list in a binary tree structure, and the matched strings are deduplicated.
[0026] In a specific implementation manner of the present application, when it is determined that the system includes a target network card device for which no instance item exists, creating a target instance item for the target network card device includes:
[0027] When the system enumerates the network card devices under the peripheral component interconnect bus and determines that the system includes a target network card device whose instance entry does not exist, a new target instance entry is created for the target network card device.
[0028] In a specific implementation of the present application, calling the initialization system plug-and-play device management list function to update the instance item device manager structure according to the preset device manager object structure index sequence includes:
[0029] The initialization system plug-and-play device management list function is called in the device manager object structure index sequence of device instance item, device interface, device interface class, and device installation class to update the instance item device manager structure.
[0030] A diskless computer network card driver installation device, comprising:
[0031] An instance item creation module, used for creating a target instance item for the target network card device when it is determined that the system includes a target network card device for which no instance item exists;
[0032] The data writing module is used to obtain the instance item of the currently started network card when the diskless computer is powered on, and write the instance item data and driver configuration data of the currently started network card into the system registry;
[0033] A device manager object creation module, used for creating a device manager object for the instance item of the currently started network card by creating a system plug-and-play device management object function;
[0034] A device manager structure update module, used for inserting the device manager object into the instance item device manager structure, and calling the initialization system plug-and-play device management list function to update the instance item device manager structure according to the preset device manager object structure index sequence;
[0035] The network card driver installation module is used to reset the current startup network card state and install the driver for the current startup network card according to the system registry and the updated instance item device manager structure.
[0036] A diskless computer network card driver installation device, comprising:
[0037] Memory for storing computer programs;
[0038] The processor is used to implement the steps of the diskless computer network card driver installation method as described above when executing the computer program.
[0039] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned diskless computer network card driver installation method are implemented.
[0040] The method for installing a diskless computer network card driver provided by the present application comprises the following steps: when it is determined that a target network card device for which an instance item does not exist is included in the system, a new target instance item is created for the target network card device; when the diskless computer is powered on, the instance item of the currently started network card is obtained, and the instance item data and driver configuration data of the currently started network card are written into the system registry; a device manager object is created for the instance item of the currently started network card by creating a system plug-and-play device management object function; the device manager object is inserted into the instance item device manager structure, and the initialization system plug-and-play device management list function is called in accordance with a preset device manager object structure index sequence to update the instance item device manager structure; the current started network card state is reset, and a driver is installed for the currently started network card according to the system registry and the updated instance item device manager structure.
[0041] It can be seen from the above technical solution that by determining that the target network card device that does not have an instance item is included in the system, a new target instance item is created for the target network card device. When the diskless computer is turned on, the instance item data and driver configuration data of the currently started network card are written to the system registry, and a device manager object is created for the instance item of the currently started network card by creating a system plug-and-play device management object function, and the device manager object is inserted into the instance item device manager structure, and the initialization system plug-and-play device management list function is called according to the preset device manager object structure index sequence to update the instance item device manager structure, and the driver is installed for the currently started network card according to the system registry and the updated instance item device manager structure. The present application realizes the network card instance configuration and driver installation for the diskless computer, ensures the normal operation of the network card device, and simplifies the complexity of network card driver update and management.
[0042] Correspondingly, the present application also provides a diskless computer network card driver installation device, equipment and computer-readable storage medium corresponding to the above-mentioned diskless computer network card driver installation method, which has the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A flowchart of an implementation of the diskless computer network card driver installation method in the embodiment of the present application;
[0045] Figure 2 This is a structural block diagram of a diskless computer network card driver installation system in an embodiment of the present application;
[0046] Figure 3 Another implementation flow chart of the method for installing a diskless computer network card driver in the embodiment of the present application;
[0047] Figure 4 This is a structural block diagram of a diskless computer network card driver installation device in an embodiment of the present application;
[0048] Figure 5 This is a structural block diagram of a diskless computer network card driver installation device in an embodiment of the present application;
[0049] Figure 6 A specific structural diagram of a diskless computer network card driver installation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0051] See also Figure 1 , Figure 1 This is a flowchart of an implementation method of a diskless computer network card driver installation method in an embodiment of the present application. The method may include the following steps:
[0052] S101: When it is determined that the system includes a target network card device for which no instance item exists, a new target instance item is created for the target network card device.
[0053] See also Figure 2 , Figure 2 This is a structural block diagram of a diskless computer network card driver installation system in an embodiment of the present application. The diskless computer network card driver installation system mainly includes a network card device initial configuration module, a device driver configuration writing module, a device instance data update module, and a device status reset module. After the diskless computer is powered on, the network card device initial configuration module cyclically attempts to open the system peripheral component interconnect (PCI) driver object, waits for the peripheral component interconnect driver to enumerate all devices on the peripheral component interconnect bus, and initializes the network card device object, internal device management structure and instance items. Because the corresponding network card device will be configured and started according to the existing device instance items and the driver will be loaded when the system starts. When it is determined that the system contains a target network card device for which an instance item does not exist, a new target instance item is created for the target network card device.
[0054] S102: When the diskless computer is powered on, the instance item of the currently started network card is obtained, and the instance item data and driver configuration data of the currently started network card are written into the system registry.
[0055] The system registry is used to save the instance item data and driver configuration data of the currently started network card for network card device configuration and driver installation. When the diskless computer is powered on, the instance item of the currently started network card is obtained and the instance item data and driver configuration data of the currently started network card are written to the system registry.
[0056] S103: Create a device manager object for the instance item of the currently started network card by creating a system plug-and-play device management object function.
[0057] After obtaining the instance item of the currently started network card, a device manager object is created for the instance item of the currently started network card by creating a system plug-and-play device management object function.
[0058] S104: inserting the device manager object into the instance item device manager structure, and calling the initialization system plug-and-play device manager list function to update the instance item device manager structure according to the preset device manager object structure index sequence.
[0059] After creating a device manager object for the instance item of the currently started network card through the function of creating a system plug-and-play device management object, the device manager object is inserted into the instance item device manager structure, and the function of initializing the system plug-and-play device management list is called according to the preset device manager object structure index sequence to update the instance item device manager structure. By updating the system registry, the instance item data of the currently started network card is made effective.
[0060] Since the system no longer accesses the system registry instance data when initializing the device object and device node (DevNode) structure through the device instance information, writing data to the instance item in the system registry afterwards has no effect, because the system will only obtain it from the device manager (DeviceManager, DM) structure, and the system device manager structure initialization will only be executed once through the system plug-and-play device management initialization (PiDmInit) function when the kernel is initialized. The newly written device instance and the corresponding key data are not in the device manager structure, and need to be added so that the system can query and obtain them.
[0061] S105: Reset the state of the currently started network card, and install a driver for the currently started network card according to the system registry and the updated instance item device manager structure.
[0062] After calling the function of initializing the system plug-and-play device management list to update the instance item device manager structure according to the preset device manager object structure index sequence, the current startup network card state is reset, and the driver is installed for the current startup network card according to the system registry and the updated instance item device manager structure. At the same time, because the network card device instance item and related data can be found in the device manager structure, the system can be used normally through the network during operation.
[0063] After updating the instance item device manager structure, the currently started network card is in the initial configuration state and the driver is not installed. The system must re-execute the network card device initialization process. The current network card device is marked as not started, and ProblemStatus should be CM_PROB_NOT_CONFIGURED (0xc0000490) not configured. The network card device status is cleared through NtPlugPlayControl to trigger the reset operation of the network card device (PiProcessClearDeviceProblem -> PnpRestartDeviceNode).
[0064] like Figure 2As shown, when resetting the status of the currently started network card, the device status reset module calls the system Pnp device control function to clean up the network card device status, re-trigger the system enumeration and configuration of the network card device, so that the system re-reads the written network card instance related data and installs the specified network card driver for the network card.
[0065] It can be seen from the above technical solution that by determining that the target network card device that does not have an instance item is included in the system, a new target instance item is created for the target network card device. When the diskless computer is turned on, the instance item data and driver configuration data of the currently started network card are written to the system registry, and a device manager object is created for the instance item of the currently started network card by creating a system plug-and-play device management object function, and the device manager object is inserted into the instance item device manager structure, and the initialization system plug-and-play device management list function is called according to the preset device manager object structure index sequence to update the instance item device manager structure, and the driver is installed for the currently started network card according to the system registry and the updated instance item device manager structure. The present application realizes the network card instance configuration and driver installation for the diskless computer, ensures the normal operation of the network card device, and simplifies the complexity of network card driver update and management.
[0066] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the subsequent embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be repeated one by one in the following improved embodiments.
[0067] See also Figure 3 , Figure 3 This is another implementation flow chart of the method for installing a diskless computer network card driver in an embodiment of the present application. The method may include the following steps:
[0068] S301: When the system determines that the target network card device for which no instance entry exists is included in the system by enumerating the network card devices under the peripheral component interconnect bus, a target instance entry is created for the target network card device.
[0069] When the system enumerates the network card devices under the peripheral component interconnect bus and determines that the system contains a target network card device for which no instance item exists, a new target instance item is created for the target network card device. Since the system will configure and start the corresponding network card device and load the driver according to the existing device instance item when starting, the system enumerates the network card devices under the peripheral component interconnect bus to achieve rapid identification of the target network card device for which no instance item exists.
[0070] When it is determined that the device instance already exists, the existing network card device process is executed, the device is configured according to the existing system registry data description, and the network card driver is installed.
[0071] S302: When the diskless computer is powered on, a device identifier and an instance identifier of a network card device to be started are obtained.
[0072] When the diskless computer is started, the device identifier (ID) and instance identifier of the network card device to be started are obtained. For example, the globally unique identifier (GUID) corresponding to the current system network card configuration instance (NetConfigInstance) ID can be obtained from the existing network card instance, such as: {1B8C7B41-9A43-4923-81F0-D0B1D6E1C29D}.
[0073] S303: Acquire the currently started network card according to the device identifier and the instance identifier, and acquire the instance item of the currently started network card according to the instance identifier.
[0074] After obtaining the device identifier and instance identifier of the network card device to be started, the currently started network card is obtained according to the device identifier and instance identifier, and the instance item of the currently started network card is obtained according to the instance identifier. By obtaining the currently started network card and the instance item according to the device identifier and the instance identifier, the efficiency of obtaining the currently started network card and the instance item of the currently started network card is greatly improved.
[0075] In addition to obtaining the currently started network card and instance item based on the device identifier and instance identifier, the bus location information can also be added. By adding the bus location information as an identifier for obtaining the currently started network card and the instance item of the currently started network card, the efficiency of obtaining the currently started network card and the instance item of the currently started network card is further improved.
[0076] S304: Write the instance item data into the system registry, so that the diskless computer starts the currently started network card and loads the corresponding driver according to the instance item data.
[0077] After the instance item of the currently started network card is obtained, the instance item data is written into the system registry, so that the diskless computer starts the currently started network card according to the instance item data and loads the corresponding driver.
[0078] Write the instance key data in "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\%Network Card Device Instance Path%", so that the system can load the corresponding driver and display relevant information according to the data description configuration startup device. You can also extract the driver version, date and other data from the network card driver installation package resources, and add the driver version, date and other data under the sub-item\Properties\{a8b865dd-2e3d-4094-ad97-e593a70c75d6}.
[0079] S305: Write the driver corresponding description, configuration items and network card parameters into the system registry.
[0080] After obtaining the instance item of the currently started network card, write the corresponding driver description, configuration items and network card parameters into the system registry.
[0081] For example, you can extract the driver description, configuration items, and network card parameters from the network card driver installation package resources, and write the driver description, configuration items, and network card advanced parameters into "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\xxxx".
[0082] like Figure 2 As shown, the device driver configuration writing module writes the specified network card driver related configuration information into the system registry corresponding to the device instance item, including Enum\PCI instance data, the driver configuration corresponding to Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\xxxx, and the related description information of the network adapter.
[0083] S306: Write network information into the system registry.
[0084] After obtaining the instance item of the currently started network card, write the network information into the system registry.
[0085] For example, write the network information in "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%NetConfigInstanceID%".
[0086] S307: Write the binary data of the instance item of the currently started network card into the system registry to establish a connection binding relationship between the currently started network card and the network adapter.
[0087] After the instance item of the currently started network card is obtained, the binary data of the instance item of the currently started network card is written into the system registry, thereby establishing a connection binding relationship between the currently started network card and the network adapter.
[0088] Create the network card device instance item and network configuration instance (NetConfigInstance) ID data under the sub-items {cac88484-7515-4c03-82e6-71a87abac361} and ad498944-762f-11d0-8dcb-00c04fc3358c of the "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces%Network Card Device Instance Item%\Properties\{a111f1f4-5923-47c0-9a68-d0bafb577901}\" path, and fill in the binary data of the network card device instance item in the relevant sub-items under "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces%Network Card Device Instance Item%\Properties\{a111f1f4-5923-47c0-9a68-d0bafb577901}\" to establish the connection binding relationship between the network card device and the network adapter.
[0089] like Figure 2 As shown, the device instance data update module obtains system device management related data and operation functions from the system process through fixed binary code features, and updates the relevant data of the current network card device instance, so that the system considers the network card device to be an old device that has been installed.
[0090] By writing the above instance-related data of the currently started network card into the system registry, the instance item data and driver configuration data of the currently started network card are effectively saved.
[0091] S308: Create a device manager object for the instance item of the currently started network card by creating a system plug-and-play device management object function.
[0092] S309: Delete the original device manager object in the instance item device manager structure.
[0093] After creating a device manager object for the instance item of the currently started network card, the original device manager object in the instance item device manager structure is deleted. By deleting the original device manager object in the instance item device manager structure, interference with the device manager object created for the instance item of the currently started network card is avoided.
[0094] In a specific implementation of the present application, step S309 may include the following steps:
[0095] Step 1: Get the target string corresponding to the created device manager object;
[0096] Step 2: Match the target string from the device manager object list in the binary tree structure and remove duplicates from the matched strings.
[0097] For the convenience of description, the above two steps can be combined for explanation.
[0098] When deleting the original device manager object in the instance item device manager structure, since the device manager object list is a balanced (Adelson-Velsky and Landis Binary, AVL) binary tree structure, the target string corresponding to the created device manager object is obtained, and the target string is matched from the device manager object list of the binary tree structure, and the matched string is deduplicated, and then the new device manager object is inserted. The original device manager object in the instance item device manager structure is matched by matching the string, and the original device manager object in the instance item device manager structure is quickly deleted.
[0099] The structures of other device managers are similar, corresponding to the following data:
[0100] (1) DM2 - {4d36e972-e325-11ce-bfc1-08002be10318}
[0101] (2) DM3
[0102] \\?\%NetCfgInstanceID%
[0103] \\?\%Network card device instance path%#{cac88484-7515-4c03-82e6-71a87abac361}
[0104] (3) DM4
[0105] {4d36e972-e325-11ce-bfc1-08002be10318}
[0106] {ad498944-762f-11d0-8dcb-00c04fc3358c}
[0107] {cac88484-7515-4c03-82e6-71a87abac361}
[0108] S310: inserting the device manager object into the instance item device manager structure, and calling the initialization system plug-and-play device management list function in the device instance item, device interface, device interface class, and device installation class device manager object structure index sequence to update the instance item device manager structure.
[0109] After deleting the original device manager object in the instance item device manager structure, the device manager object is inserted into the instance item device manager structure, and the initialization system plug-and-play device management list function is called in the device manager object structure index sequence of device instance item, device interface, device interface class, and device installation class to update the instance item device manager structure. By updating the system registry in the device manager object structure index sequence of device instance item, device interface, device interface class, and device installation class, the instance item data of the currently started network card is quickly effective.
[0110] The system device manager structure is initialized in the following order, and each structure has a corresponding index, PiDmDeviceManager-1, PiDmDeviceInterfaceManager-3, PiDmDeviceInterfaceClassManager-4, PiDmDeviceContainerManager-5, PiDmDeviceInstallerClassManager-2, where the device manager structure indexed 1-4 related to the network card device corresponds to the device instance path, device installation class, device interface, and device interface class, respectively.
[0111] S311: Reset the current startup network card status, and install a driver for the current startup network card according to the system registry and the updated instance item device manager structure.
[0112] By updating the instance item device manager structure, the system considers the current startup network card as an old device with a driver installed, and installs the specified network card driver for the current startup network card. This method has good compatibility and is basically equivalent to manual installation, which solves the problem that the installation of network card drivers on diskless computers is difficult, the steps are cumbersome, and it is not easy to upgrade and manage. Users can complete the installation process of the network card driver for diskless computers without manual intervention, which saves time, reduces the complexity of operation, and improves the usability and management efficiency of the system. It eliminates the obstacles to the installation of network card drivers, reduces the startup failures and system stability problems caused by driver installation errors or mismatches, and makes it more convenient and efficient to use different models of network cards in diskless systems.
[0113] Corresponding to the above method embodiment, the present application also provides a diskless computer network card driver installation device. The diskless computer network card driver installation device described below and the diskless computer network card driver installation method described above can refer to each other.
[0114] See also Figure 4 , Figure 4 This is a structural block diagram of a diskless computer network card driver installation device in an embodiment of the present application, and the device may include:
[0115] An instance item creation module 41 is used to create a target instance item for the target network card device when it is determined that the system includes a target network card device for which no instance item exists;
[0116] The data writing module 42 is used to obtain the instance item of the current startup network card when the diskless computer is powered on, and write the instance item data and driver configuration data of the current startup network card into the system registry;
[0117] The device manager object creation module 43 is used to create a device manager object for the instance item of the currently started network card by creating a system plug-and-play device management object function;
[0118] The device manager structure updating module 44 is used to insert the device manager object into the instance item device manager structure, and call the initialization system plug-and-play device manager list function to update the instance item device manager structure according to the preset device manager object structure index sequence;
[0119] The network card driver installation module 45 is used to reset the current startup network card state and install the driver for the current startup network card according to the system registry and the updated instance item device manager structure.
[0120] It can be seen from the above technical solution that by determining that the target network card device that does not have an instance item is included in the system, a new target instance item is created for the target network card device. When the diskless computer is turned on, the instance item data and driver configuration data of the currently started network card are written to the system registry, and a device manager object is created for the instance item of the currently started network card by creating a system plug-and-play device management object function, and the device manager object is inserted into the instance item device manager structure, and the initialization system plug-and-play device management list function is called according to the preset device manager object structure index sequence to update the instance item device manager structure, and the driver is installed for the currently started network card according to the system registry and the updated instance item device manager structure. The present application realizes the network card instance configuration and driver installation for the diskless computer, ensures the normal operation of the network card device, and simplifies the complexity of network card driver update and management.
[0121] In a specific implementation of the present application, the data writing module 42 includes:
[0122] The identifier acquisition submodule is used to acquire the device identifier and instance identifier of the network card device to be started;
[0123] The network card and instance item acquisition submodule is used to acquire the currently started network card according to the device identifier and the instance identifier, and to acquire the instance item of the currently started network card according to the instance identifier.
[0124] In a specific implementation of the present application, the data writing module 42 includes:
[0125] The instance item data writing submodule is used to write the instance item data into the system registry so that the diskless computer starts the current startup network card to load the corresponding driver according to the instance item data;
[0126] The driver-related parameter writing submodule is used to write the driver-related description, configuration items and network card parameters into the system registry;
[0127] The network information writing submodule is used to write network information into the system registry;
[0128] The connection binding relationship establishment submodule is used to write the binary data of the instance item of the currently started network card into the system registry to establish a connection binding relationship between the currently started network card and the network adapter.
[0129] In a specific embodiment of the present application, the device may further include:
[0130] The device manager object deletion module is used to delete the original device manager object in the instance item device manager structure before inserting the device manager object into the instance item device manager structure.
[0131] In a specific implementation of the present application, the device manager object deletion module includes:
[0132] The string acquisition submodule is used to obtain the target string corresponding to the created device manager object;
[0133] The string deduplication submodule is used to match the target string from the device manager object list in the binary tree structure and dedupe the matched string.
[0134] In a specific implementation of the present application, the instance item creation module 41 is specifically a module for creating a target instance item for a target network card device when the system determines that the system contains a target network card device for which no instance item exists by enumerating each network card device under the peripheral component interconnect bus.
[0135] In a specific implementation of the present application, the system registry update module 44 is specifically a module that calls the initialization system plug-and-play device management list function to update the instance item device manager structure in the device manager object structure index sequence of device instance item, device interface, device interface class, and device installation class.
[0136] Corresponding to the above method embodiment, see Figure 5 , Figure 5 A schematic diagram of a diskless computer network card driver installation device provided in this application, which may include:
[0137] A memory 332, for storing computer programs;
[0138] The processor 322 is used to implement the steps of the diskless computer network card driver installation method of the above method embodiment when executing the computer program.
[0139] For details, please refer to Figure 6 , Figure 6 A specific structural diagram of a diskless computer network card driver installation device provided for this embodiment, the diskless computer network card driver installation device may have relatively large differences due to different configurations or performances, and may include a processor (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the diskless computer network card driver installation device 301.
[0140] The diskless computer network card driver installation device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0141] The steps in the diskless computer network card driver installation method described above can be implemented by the structure of the diskless computer network card driver installation device.
[0142] Corresponding to the above method embodiment, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:
[0143] When it is determined that the system contains a target network card device without an instance item, a new target instance item is created for the target network card device; when the diskless computer is powered on, the instance item of the currently started network card is obtained, and the instance item data and driver configuration data of the currently started network card are written into the system registry; a device manager object is created for the instance item of the currently started network card by creating a system plug-and-play device management object function; the device manager object is inserted into the instance item device manager structure, and the initialization system plug-and-play device management list function is called in accordance with the preset device manager object structure index sequence to update the instance item device manager structure; the current startup network card state is reset, and the driver is installed for the current startup network card according to the system registry and the updated instance item device manager structure.
[0144] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0145] For an introduction to the computer-readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.
[0146] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the devices, equipment and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0147] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the technical solution and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A method for installing a diskless computer network card driver, characterized in that: include: When it is determined that the system includes a target network card device that does not have an instance item, creating a new target instance item for the target network card device; When the diskless computer is powered on, the instance item of the currently started network card is obtained, and the instance item data and driver configuration data of the currently started network card are written into the system registry; Create a device manager object for the instance item of the currently started network card by creating a system plug-and-play device management object function; Insert the device manager object into the instance item device manager structure, and call the initialization system plug-and-play device management list function to update the instance item device manager structure according to the preset device manager object structure index sequence; The state of the currently started network card is reset, and a driver is installed for the currently started network card according to the system registry and the updated instance item device manager structure.
2. The diskless computer network card driver installation method according to claim 1, characterized in that: Get the instance items of the currently started network card, including: Obtain the device identifier and instance identifier of the network card device to be started; The currently started network card is obtained according to the device identifier and the instance identifier, and the instance item of the currently started network card is obtained according to the instance identifier.
3. The diskless computer network card driver installation method according to claim 1, characterized in that: Writing the instance item data and driver configuration data of the currently started network card into the system registry includes: Writing the instance item data into the system registry so that the diskless computer starts the currently started network card to load the corresponding driver according to the instance item data; Writing driver corresponding description, configuration items and network card parameters into the system registry; Writing network information into the system registry; The binary data of the instance item of the currently started network card is written into the system registry to establish a connection binding relationship between the currently started network card and the network adapter.
4. The diskless computer network card driver installation method according to claim 1, characterized in that: Before inserting the device manager object into the instance item device manager structure, the method further includes: The original device manager object in the instance item device manager structure is deleted.
5. The diskless computer network card driver installation method according to claim 4, characterized in that: Deleting the original device manager object in the instance item device manager structure includes: Get the target string corresponding to the created device manager object; The target string is matched from a device manager object list in a binary tree structure, and the matched strings are deduplicated.
6. The diskless computer network card driver installation method according to claim 1, characterized in that: When it is determined that the system includes a target network card device for which no instance item exists, creating a target instance item for the target network card device includes: When the system enumerates the network card devices under the peripheral component interconnect bus and determines that the system includes a target network card device whose instance entry does not exist, a new target instance entry is created for the target network card device.
7. The diskless computer network card driver installation method according to claim 1, characterized in that: Calling the initialization system plug-and-play device management list function to update the instance item device manager structure according to the preset device manager object structure index sequence includes: The initialization system plug-and-play device management list function is called in the device manager object structure index sequence of device instance item, device interface, device interface class, and device installation class to update the instance item device manager structure.
8. A diskless computer network card driver installation device, characterized in that: include: An instance item creation module, used for creating a target instance item for the target network card device when it is determined that the system includes a target network card device for which no instance item exists; The data writing module is used to obtain the instance item of the current startup network card when the diskless computer is powered on, and write the instance item data and driver configuration data of the current startup network card into the system registry; A device manager object creation module, used for creating a device manager object for the instance item of the currently started network card by creating a system plug-and-play device management object function; A device manager structure update module, used for inserting the device manager object into the instance item device manager structure, and calling the initialization system plug-and-play device management list function to update the instance item device manager structure according to the preset device manager object structure index sequence; The network card driver installation module is used to reset the current startup network card state and install the driver for the current startup network card according to the system registry and the updated instance item device manager structure.
9. A diskless computer network card driver installation device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the diskless computer network card driver installation method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the diskless computer network card driver installation method according to any one of claims 1 to 7 are implemented.
