Server component drive installation method and electronic device
By acquiring server performance parameters and connection information, and utilizing standardized installation flowcharts and parallel thread technology, the problems of low compatibility and efficiency in server component driver installation were solved, achieving a highly efficient driver installation process.
Patent Information
- Application Number
- CN202511409138.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Existing technologies for installing server component drivers suffer from compatibility issues and low installation efficiency.
By acquiring server performance parameters, a driver installation process is generated using a pre-created standardized installation flowchart. Target component information is determined based on connection information, and the installation process is executed through multiple parallel threads based on component dependencies.
It improves the efficiency and compatibility of driver installation, avoids the need for manual design of installation steps, and optimizes the execution efficiency of the installation process.
Smart Images

Figure CN120892066B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to a server component driver installation method and electronic device. Background Technology
[0002] During server operation, hardware components need to interact with the operating system through drivers. Drivers act as a bridge between the operating system and the hardware, responsible for translating high-level operating system instructions into low-level, executable instructions for the hardware and feeding back the hardware's operational status to the operating system. In server testing or deployment scenarios, test engineers need to configure the server hardware according to the test task and install the appropriate drivers.
[0003] Currently, in related technologies, driver installation involves remotely mounting driver files through a baseboard management controller and installing them according to the modules within the controller in a specific order. However, this driver installation method is incompatible with some servers, and the method of installing component drivers according to a fixed installation order suffers from low installation efficiency. Summary of the Invention
[0004] This application provides a server component driver installation method and an electronic device to at least solve the problem of low installation efficiency in related technologies.
[0005] This application provides a method for installing server component drivers, including:
[0006] In response to the input test task, the server performance parameters in the test task are obtained, and the initial component information of the server is determined based on the server performance parameters.
[0007] The driver installation process is generated according to the pre-created standardized installation flowchart and the initial component information of the server.
[0008] Obtain the server's connection information and determine the target component information of the server based on the server's connection information, where the connection information is obtained from the server under test set up by the test personnel.
[0009] The initial component information is functionally compared with the target component information to generate comparison data.
[0010] If the initial component information and the target component information in the comparison data have the same function, then the driver installation process is executed by multiple parallel threads according to the component dependencies in the target component information to complete the driver installation.
[0011] This application also provides a server component driver installation device, including:
[0012] The first acquisition module is used to acquire server performance parameters in response to the input test task, and determine the initial component information of the server based on the server performance parameters.
[0013] The first generation module is used to generate a driver installation process according to a pre-created standardized installation flowchart and based on the initial component information of the server.
[0014] The second acquisition module is used to acquire the server's connection information and determine the target component information of the server based on the server's connection information, wherein the connection information is acquired from the server under test set up by the test personnel.
[0015] The comparison module is used to compare the initial component information with the target component information to generate comparison data.
[0016] The execution module is used to complete the driver installation process by executing the driver installation process through multiple parallel threads based on the component dependencies in the target component information if the initial component information and the target component information in the comparison data have the same function.
[0017] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described server component driver installation methods when executing the computer program.
[0018] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described server component driver installation methods.
[0019] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described server component driver installation methods.
[0020] This application solves the problem of low installation efficiency in related technologies by obtaining server performance parameters from the test task, determining initial component information based on performance parameters, generating a driver installation process for the initial component information using a pre-created standardized installation flowchart, collecting server connection information based on the server set up by the testers, determining target component information based on the connection information, comparing the initial component information with the target component information for functionality, and executing the installation process based on component dependencies using parallel thread technology if the functions are the same. Attached Figure Description
[0021] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram illustrating an application scenario of the server component driver installation method provided in the embodiments of this application;
[0023] Figure 2 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 1 ;
[0024] Figure 3 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 2 ;
[0025] Figure 4 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 3 ;
[0026] Figure 5 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 4 ;
[0027] Figure 6 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 5 ;
[0028] Figure 7 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 6 ;
[0029] Figure 8 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 7 ;
[0030] Figure 9 This is a schematic diagram of the structure of the server component driver installation device provided in the embodiments of this application;
[0031] Figure 10 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0033] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0034] To address the issue of low installation efficiency of server component drivers in related technologies, this application proposes the following technical concept: The inventors consider obtaining server performance parameters for heavy testing tasks, determining initial component information based on these parameters, and generating a driver installation process using a pre-created standardized installation flowchart. The inventors also collect server connection information from the server set up by testers, determine target component information based on this connection information, and compare the initial component information with the target component information functionally. If the functions are identical, the inventors utilize parallel threading technology to execute the installation process based on component dependencies, thereby improving driver installation efficiency.
[0035] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0036] The specific application environment architecture or specific hardware architecture on which the execution of the server component driver installation method depends is described here.
[0037] refer to Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario for the server component driver installation method provided in this application embodiment. The scenario includes a computer device 101 and a server under test 102.
[0038] Specifically, computer device 101 obtains server performance parameters based on the input test task, determines the initial component information of the server based on the server performance parameters, parses the initial component information according to the pre-created standardized installation flowchart to generate a driver installation process, computer device 101 collects the connection information of the server under test 102, determines the target component information of the server based on the connection information, compares the target component information with the initial component information in terms of function, and if the functions are the same, the driver installation process is executed through multiple parallel threads according to the dependency relationship in the target component information.
[0039] Figure 2 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 1 ,like Figure 2 As shown, embodiments of this application provide a server component driver installation method, which is described in detail below:
[0040] S201: In response to the input test task operation, obtain the server performance parameters in the test task, and determine the initial component information of the server based on the server performance parameters.
[0041] In this embodiment, the format of the input test task is a test list.
[0042] In this embodiment, the server performance parameters recorded in the test task include, but are not limited to, the server operating system version, the number of components in the server, and whether the components in the server are replaceable.
[0043] In this embodiment, the initial component information is based on the components recorded in the test list.
[0044] S202: Generate the driver installation process according to the pre-created standardized installation flowchart and the initial component information of the server.
[0045] In this embodiment, the driver installation process includes multiple nodes, and each node includes a component name and execution steps.
[0046] In this embodiment, the content recorded in the driver installation process includes, but is not limited to, the component name, node execution order, and node time in the node.
[0047] Specifically, based on the initial component information, and according to the determined operating system type, operating system version, and component combination, the pre-created standardized installation flowchart is traversed to obtain the driver installation process for each component in the initial component information.
[0048] S203: Obtain the server's connection information and determine the target component information of the server based on the server's connection information, wherein the connection information is obtained from the server under test set up by the test personnel.
[0049] Specifically, testers set up the server under test according to the configuration list of the test task. If any component in the configuration list is missing, the testers will replace it with a component of the same function according to the function of the missing component.
[0050] In this embodiment, the server connection information refers to the connection relationships between various components in the server set up by the testers.
[0051] In this embodiment, the target component information is the component information in the server under test set up by the tester.
[0052] S204: Compare the initial component information with the target component information to generate comparison data.
[0053] Specifically, functional simulation test information for each component in the initial component and the target component is generated based on the initial component information and the target component information, respectively. The functional simulation test information is used to determine whether the functions of the initial component and the target component are the same.
[0054] In this embodiment, the functional simulation test information of each component is recorded in the comparison data, and the replaced component will be highlighted.
[0055] Specifically, if there is a functional difference between the initial component and the target component, the tester will be prompted that the function is abnormal.
[0056] S205: If the initial component information and the target component information in the comparison data have the same function, then the driver installation process is executed by multiple parallel threads according to the component dependency relationship in the target component information to complete the driver installation.
[0057] Specifically, multiple parallel threads parse component dependencies to obtain the identifiers and dependency lists of multiple driver components to be installed. A driver dependency graph is generated based on the identifiers and dependency lists of the multiple driver components to be installed. A linear sequence of multiple nodes in the dependency graph is calculated using a topological sorting algorithm. The driver components are then allocated to parallel threads based on the linear sequence, and the parallel threads execute the driver installation process.
[0058] In this embodiment, the system for installing server component drivers mainly includes: a standard process module for installing component drivers, a customizable driver installation process orchestration module for component combinations, an installation execution module, and a result verification and feedback module.
[0059] The component driver installation standard process module is used to formulate standard processes for driver execution installation for various components.
[0060] The component combination customized driver installation process orchestration module is used to orchestrate the customized execution process of component driver installation based on the actual server configuration combination.
[0061] The installation execution module is used to execute the component driver installation process.
[0062] The result verification and feedback module is used to verify the driver installation results and provide feedback if discrepancies are found.
[0063] As can be seen from the above embodiments, by obtaining the server performance parameters in the test task, determining the initial component information based on the performance parameters, generating the driver installation process of the initial component information using a pre-created standardized installation flowchart, collecting the server connection information based on the server set up by the testers, determining the target component information based on the connection information, comparing the initial component information with the target component information for functionality, and if the functionality comparison is the same, then executing the installation process based on the component dependency relationship using parallel thread technology, thereby improving the efficiency of driver installation.
[0064] Figure 3 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 2 ,like Figure 3 As shown, in one embodiment of this application, before step S202, the following steps are further included:
[0065] S301: Obtain server component information, which is obtained by calling the server component library interface.
[0066] In this embodiment, the component information of the server includes, but is not limited to, component name, component model, and component quantity.
[0067] S302: Classify components based on the server's component information and generate classified component information.
[0068] In this embodiment, the categorized component information includes, but is not limited to, network cards, GPUs, and disk array cards.
[0069] S303: Detect the environmental compatibility of server components based on the classified component information, and generate component-environment matching information based on the environmental compatibility data of the server components.
[0070] Specifically, the categorized component information and operating system environment information are used as input to query the environment compatibility database, obtain the environment compatibility data of the server components, and sort the environment compatibility data of the server components from high to low to obtain the matching information between the components and the environment.
[0071] S304: Retrieve driver installation packages from the driver library based on the component and environment matching information, and generate matching information for the driver installation packages, which includes multiple compatible driver installation packages.
[0072] Specifically, based on the matching information between components and the environment, driver installation packages in the driver library are retrieved, and driver installation packages with compatible formats and versions are matched to obtain matching information for the driver installation packages.
[0073] In this embodiment, the driver installation package format includes, but is not limited to, zip, tar, and rpm.
[0074] S305: Parse the matching information of the driver installation package and generate a sequence of operation instructions for multiple driver installation packages.
[0075] Specifically, the instruction engine template is invoked, and the file format and metadata are written into the instruction engine template according to the matching information of the driver installation package to obtain the operation instruction sequence of the driver installation department.
[0076] S306: Create installation process information for multiple component drivers based on component and environment matching information and operation instruction sequences for multiple driver installation packages.
[0077] Specifically, by integrating the matching information between components and the environment through the process orchestration engine, the operation instructions of multiple driver installation packages are assigned to the corresponding components, thereby obtaining the installation process information of multiple component drivers.
[0078] S307: Generates a standardized installation flowchart based on installation process information driven by multiple components.
[0079] In this embodiment, the standardized installation flowchart includes multi-level nodes, wherein the content recorded in the nodes includes, but is not limited to, component names, operating system names, and driver names.
[0080] In this embodiment, the server is classified into three levels: first-level classification based on the type of server components, second-level classification based on the operating system environment and version, and third-level classification based on the driver format and version.
[0081] As can be seen from the above embodiments, by calling the server's component library interface to obtain the server's component information, classifying the components according to the component information, detecting the environmental compatibility of the classified components, generating component-environment matching information based on the environmental compatibility data, retrieving driver installation packages from the driver library based on the component-environment matching information, generating matching information for the driver installation packages, parsing the operation instruction sequence in the matching information, and generating component driver installation process information based on the operation instruction sequence and component-environment matching information, and generating a standardized installation flowchart based on the component driver installation process information, the driver installation steps are unified, avoiding manual design of installation steps, and improving the compatibility and efficiency of driver installation.
[0082] Figure 4 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 3 ,like Figure 4 As shown, in one embodiment of this application, after step S307, the method further includes:
[0083] S308: Based on the matching information between components and the environment, query the dependency knowledge base to perform dependency resolution and generate a list of dependency packages for components and the environment.
[0084] Specifically, by using the dependency engine as input, the engine queries the dependency knowledge base based on the matching information between the component and the environment. Based on the response data from the dependency knowledge base, the response data is sorted, deduplicated, and a list of dependency packages for the component and the environment is generated.
[0085] S309: Create a container image file based on the list of dependency packages for components and the environment, and the installation process information for multiple component drivers.
[0086] Specifically, the image building engine takes the list of dependent packages and the installation process information driven by multiple components as input, generates an executable container image building script, pulls a corresponding base image based on the target operating system in the component and environment matching information, generates an installation command based on the list of dependent packages, calls the installation command to write the script to the base image, and obtains the container image file.
[0087] S310: Writes the container image file to the image storage directory and calls the container packaging instruction to create a component-driven container image based on the image storage directory.
[0088] Specifically, the image building engine writes the built container image file to the image storage directory, calls the container packaging instructions to load the stored image file into the container runtime environment, and tags it.
[0089] As can be seen from the above embodiments, by using containerization encapsulation technology, the installation environment of component drivers is isolated, avoiding conflicts caused by dependencies. Container technology is used to improve the reusability of component driver installation and reduce file transfer and decompression time.
[0090] Figure 5 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 4 ,like Figure 5 As shown, in one embodiment of this application, after step S205, the method further includes:
[0091] S206: Obtain the driver execution log generated during driver installation.
[0092] In this embodiment, during the driver installation process, the operating system's logging interface is called to write detailed installation steps, return results, timestamps, involved files and registry entries, error codes, and other information to one or more log files in real time.
[0093] S207: Input the driver execution log into the pre-created driver installation process diagnostic model to output a diagnostic knowledge graph of the driver installation process.
[0094] In this embodiment, natural language processing technology is used to extract relationship information between entities based on historical driver installation log samples, driver documentation, hardware compatibility lists, and fault solution knowledge bases. The driver installation process diagnostic model is then trained based on this relationship information.
[0095] Specifically, the driver execution log is parsed, and the extracted entities and relationships are matched and mapped with the pre-stored knowledge graph to generate a diagnostic knowledge graph of the driver installation process.
[0096] S208: Generate an optimization strategy set based on the information of the items to be optimized in the diagnostic knowledge graph.
[0097] Specifically, the strategy planning engine traverses the nodes of the project to be optimized marked in the knowledge graph, traverses the strategy mapping library to obtain the corresponding optimization strategy according to the type of the project to be optimized, and determines multiple optimization strategies as an optimization strategy set.
[0098] S209: Optimize the pre-created standardized installation flowchart based on the optimization strategy set.
[0099] Specifically, the pre-created standardized installation flowchart is optimized based on the strategy set, and the optimized flowchart is saved as a new version.
[0100] As can be seen from the above embodiments, by obtaining the driver execution log, inputting the driver execution log into the pre-created driver installation process diagnostic model, outputting a diagnostic knowledge graph, creating an optimization strategy set based on the items to be optimized in the diagnostic knowledge graph, optimizing the standardized installation flowchart, and improving the efficiency of the installation process generated by the standardized installation flowchart.
[0101] In one embodiment of this application, step S205 includes:
[0102] S205a: The component dependencies in the target component information are parsed by multiple parallel threads to obtain the identifiers and dependency lists of multiple driver components to be installed.
[0103] In this embodiment, the driver component identifier includes, but is not limited to, driver name, driver ID, and driver version.
[0104] In this embodiment, component dependency refers to other components that a component depends on for normal operation.
[0105] Specifically, the parsing results are aggregated through multiple parallel threads to generate a structured dependency list.
[0106] S205b: Generate an initial driver dependency graph based on the identifiers of multiple driver components to be installed and the dependency list, wherein the multiple driver components to be installed in the driver dependency graph are used as driver component nodes in the graph.
[0107] In this embodiment, each driver component identifier is instantiated as a driver component node in the graph, which represents a component entity to be installed with a driver.
[0108] In this embodiment, directed edges are established between nodes in the graph based on the dependencies recorded in the dependency list.
[0109] S205c: Calculate a linear sequence of multiple nodes in the driving dependency graph based on the topological sorting algorithm.
[0110] In this embodiment, the topological sorting algorithm is a linear sequence algorithm.
[0111] Specifically, the topological sorting algorithm is used to traverse the nodes in the graph, calculate the in-degree of each node, add nodes with an in-degree of 0 to a queue, remove a node from the queue and add it to the result sequence of the topological sort, and decrement the in-degree of all neighboring nodes pointed to by that node by 1. If the in-degree of a neighboring node becomes 0 as a result, it is added to the queue, and the operation is repeated until the queue is empty.
[0112] S205d: Assigns multiple driver components to multiple parallel threads according to the linear sequence of multiple nodes, and executes the driver installation process through multiple parallel threads according to the linear sequence of multiple nodes to complete the driver installation.
[0113] Specifically, multiple driver installation tasks are created, stored in a task thread pool with multiple parallel threads, executed by multiple parallel threads, generating execution status of multiple driver installation tasks, and updating the execution status of multiple driver installation tasks to the status manager.
[0114] As can be seen from the above embodiments, by parsing the component dependencies in the target component information, establishing a driver dependency graph based on the dependencies, dynamically generating a linear sequence of multiple driver components to be installed through topological sorting, and adjusting the installation order according to the linear sequence, the execution efficiency of the installation process is optimized.
[0115] Figure 6 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 5 ,like Figure 6 As shown, in one embodiment of this application, step S205d includes:
[0116] S401: Multiple driver installation tasks are created using multiple parallel threads based on the linear sequence of multiple nodes and the driver installation process.
[0117] Specifically, each parallel thread obtains an unprocessed node from the linear sequence sequentially or according to a preset strategy, binds and parameterizes the node information with the driver installation process, and encapsulates it into an independent "driver installation task" object.
[0118] In this embodiment, the content recorded in the driver installation task includes, but is not limited to, the identifier of the target driver, the source path where the driver file is located, and the timeout period.
[0119] S402: Store multiple driver installation tasks into a task thread pool with multiple parallel threads.
[0120] In this embodiment, the task thread pool with multiple parallel threads is a concurrent queue structure under the producer-consumer model, used to store the generated driver installation tasks.
[0121] S403: Executes multiple driver installation tasks through multiple parallel threads to generate the execution status of multiple driver installation tasks, and updates the execution status of multiple driver installation tasks to the status manager to complete the driver installation.
[0122] Specifically, multiple parallel threads continuously poll and obtain driver installation tasks from the task thread pool. After obtaining a task, the parallel threads begin to execute the task, that is, to run the driver installation process encapsulated within the task.
[0123] In this embodiment, the execution status of the task includes, but is not limited to, success, failure, and in progress.
[0124] As can be seen from the above embodiments, multiple driver installation tasks are established through a linear sequence of multiple nodes and a driver installation process. The driver installation tasks are stored in a task thread pool, the driver installation tasks are executed, an execution status is generated, and the execution status is synchronized to the status manager. By using multi-threaded parallel execution technology to schedule driver installation tasks, the installation efficiency is improved.
[0125] In one embodiment of this application, after step S205d, the method further includes:
[0126] S205e: Obtain multiple performance metrics of the server under test, and obtain multiple performance data based on these metrics.
[0127] In this embodiment, performance metrics include, but are not limited to, CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization.
[0128] Specifically, performance data corresponding to performance indicators is collected periodically.
[0129] S205f: Compares multiple performance data with preset performance thresholds and generates comparison results.
[0130] Specifically, if the performance data exceeds the corresponding performance threshold, an adjustment instruction is generated.
[0131] S205g: Generate adjustment instructions for at least one parallel thread based on the comparison results, and adjust the concurrency of driver installation based on the adjustment instructions for at least one parallel thread.
[0132] For example, if the comparison result is "Resources are sufficient, load can be increased", then an instruction to "increase the number of parallel threads" is generated.
[0133] For example, if the comparison result is "Resources are scarce, load needs to be reduced", then an instruction to "reduce the number of parallel threads" is generated.
[0134] As can be seen from the above embodiments, by detecting multiple performance indicators of the server under test, obtaining performance data based on the performance indicators, comparing the performance data with preset performance thresholds, generating comparison results, and generating adjustment instructions for parallel threads based on the comparison results, adjusting the concurrency of driver installation, and avoiding system resource overload.
[0135] Figure 7 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 6 ,like Figure 7 As shown, in one embodiment of this application, before step S205, the following steps are further included:
[0136] S501: Get multiple restart requests triggered when multiple parallel threads install drivers.
[0137] In this embodiment, the content recorded in the restart request includes, but is not limited to, device identifier, driver version information, and restart timestamp.
[0138] S502: Based on the component dependencies, parse the dependency graph between the installation tasks of each component and generate the dependency parsing results.
[0139] In this embodiment, the content recorded in the dependency resolution result includes, but is not limited to, topological sequence, dependency level, critical path information, and circular dependency warning.
[0140] Specifically, the dependency graph is parsed using a topological sorting algorithm.
[0141] S503: Prioritize multiple restart requests based on dependency resolution results and generate priority allocation information.
[0142] In this embodiment, the priority allocation method includes, but is not limited to, assigning the highest priority to the restart request corresponding to the installation task located on the critical path, dynamically adjusting the priority of requests without dependency conflicts according to the device type or system resource usage, and assigning high priority to tasks with deep dependency levels.
[0143] S504: Generate a restart queue for driver installation based on priority allocation information and pre-created execution scripts, whereby the restart queue for driver installation is used to optimize the pre-created standardized installation flowchart.
[0144] In this embodiment, the restart queue is implemented using a priority queue data structure, where higher-priority requests are processed first. After the queue is generated, the system calls a pre-created execution script to perform the restart operations in the queue order.
[0145] As can be seen from the above embodiments, by obtaining multiple restart requests triggered when multiple parallel threads install drivers, prioritizing the restart requests according to the dependency resolution results, generating a restart queue for driver installation based on the priority allocation information and the pre-created execution script, introducing driver installation priority elements, and optimizing the pre-created standardized installation flowchart, the robustness of the optimized installation process is improved.
[0146] Figure 8 A flowchart illustrating the server component driver installation method provided in this application embodiment. Figure 7 ,like Figure 8 As shown, in one embodiment of this application, before step S504, the following steps are further included:
[0147] S601: Obtain historical driver installation logs and system environment configuration information.
[0148] In this embodiment, the historical driver installation logs originate from multiple different computing devices that have completed driver installation. The historical driver installation logs record, but are not limited to, the name, version, installation order of the installed driver, command-line instructions invoked during installation, success or failure status indicators, and error codes or messages that may have occurred during installation.
[0149] In this embodiment, the system environment configuration information records, but is not limited to, the operating system type and version, hardware configuration information, a list of installed software, and system service configuration.
[0150] S602: Generate a pre-trained driver execution model based on historical driver installation logs and system environment configuration information.
[0151] Specifically, feature engineering is performed on the training data. The installation order and command-line instructions in the installation log are parsed into operation sequence features; the hardware model and operating system version in the system environment configuration information are parsed into environment context features; and "installation successful" is used as the label data to select a model for training.
[0152] S603: Input the component dependencies and target component information from the target component information into the pre-trained driver execution model to output a pre-created execution script.
[0153] In this embodiment, the target component information refers to the information of the hardware components on the target device for which the driver is to be installed.
[0154] In this embodiment, component dependencies describe the dependencies required by the drivers for hardware components.
[0155] As can be seen from the above embodiments, by obtaining historical driver installation logs and system environment configuration information, a driver execution model is pre-trained. The component dependencies and target component information in the target component information are input into the pre-trained driver execution model to automatically generate the execution script, avoiding manual writing of the execution script and improving testing efficiency.
[0156] In one embodiment of this application, after step S205d, the method further includes:
[0157] S701: Obtain driver installation process execution information, input the driver installation process execution information into the pre-created driver installation model, and output the driver installation failure rate.
[0158] In this embodiment, the driver installation process execution information includes, but is not limited to, hardware characteristics, software characteristics, and driver package characteristics.
[0159] S702: Adjust the driver installation process based on the driver installation failure rate.
[0160] Specifically, if the driver installation failure rate exceeds the threshold, the driver installation process order is adjusted, and the failure rate after the order adjustment is calculated.
[0161] As can be seen from the above embodiments, by calculating the failure rate of the driver installation process and dynamically adjusting the installation order in the driver installation process, the installation success rate is improved.
[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0163] Figure 9This is a schematic diagram of the server component driver installation device provided in an embodiment of this application. Figure 9 As shown, embodiments of this application also provide a server component driver installation device 90, including: a first acquisition module 901, a first generation module 902, a second acquisition module 903, a comparison module 904, and an execution module 905.
[0164] The first acquisition module 901 is used to acquire server performance parameters in the test task in response to the input test task, and determine the initial component information of the server based on the server performance parameters.
[0165] The first generation module 902 is used to generate a driver installation process according to a pre-created standardized installation flowchart and based on the initial component information of the server.
[0166] The second acquisition module 903 is used to acquire the server's connection information and determine the target component information of the server based on the server's connection information, wherein the connection information is acquired from the server under test set up by the acquisition test personnel.
[0167] The comparison module 904 is used to compare the initial component information with the target component information to generate comparison data.
[0168] The execution module 905 is used to complete the driver installation by executing the driver installation process through multiple parallel threads based on the component dependencies in the target component information if the initial component information and the target component information in the comparison data have the same function.
[0169] In one embodiment of this application, the server component driver installation device 90 further includes:
[0170] The third acquisition module is used to acquire server component information, which is obtained by calling the server's component library interface.
[0171] The classification module is used to classify components based on the component information of the server and generate classified component information.
[0172] The detection module is used to detect the environmental compatibility of server components based on the classified component information, and to generate component-environment matching information based on the server component's environmental compatibility data.
[0173] The second generation module is used to retrieve driver installation packages from the driver library based on the matching information between the component and the environment, and generate matching information for the driver installation packages, wherein the matching information for the driver installation packages includes multiple compatible driver installation packages.
[0174] The first parsing module is used to parse the matching information of the driver installation package and generate a sequence of operation instructions for multiple driver installation packages.
[0175] The first creation module is used to create installation process information for multiple component drivers based on the matching information between components and the environment and the sequence of operation instructions for multiple driver installation packages.
[0176] The third generation module is used to generate a standardized installation flowchart based on the installation process information driven by multiple components.
[0177] In one embodiment of this application, the server component driver installation device 90 further includes:
[0178] The second parsing module is used to query the dependency knowledge base based on the matching information between components and the environment to perform dependency parsing and generate a list of dependency packages for components and the environment.
[0179] The second creation module is used to create container image files based on the list of dependency packages of components and environment and the installation process information of multiple component drivers.
[0180] The write module is used to write container image files to the image storage directory and call container packaging instructions to create component-driven container images based on the image storage directory.
[0181] In one embodiment of this application, the server component driver installation device 90 further includes:
[0182] The fourth module is used to obtain the driver execution log generated during driver installation.
[0183] The first output module is used to input the driver execution log into the pre-created driver installation process diagnostic model to output a diagnostic knowledge graph of the driver installation process.
[0184] The fourth generation module is used to generate an optimization strategy set based on the information of the items to be optimized in the diagnostic knowledge graph.
[0185] The optimization module is used to optimize pre-created standardized installation flowcharts based on a set of optimization strategies.
[0186] In one embodiment of this application, the execution module 905 includes:
[0187] The parsing unit is used to parse the component dependencies in the target component information through multiple parallel threads to obtain the identifiers and dependency lists of multiple driver components to be installed.
[0188] The first generation unit is used to generate an initialized driver dependency graph based on the identifiers of multiple driver components to be installed and the dependency list, wherein the multiple driver components to be installed in the driver dependency graph are used as driver component nodes in the graph.
[0189] The computation unit is used to compute a linear sequence of multiple nodes in the driving dependency graph according to the topological sorting algorithm.
[0190] The allocation unit is used to allocate multiple driver components to multiple parallel threads according to a linear sequence of multiple nodes, and to execute the driver installation process through multiple parallel threads according to a linear sequence of multiple nodes to complete the driver installation.
[0191] In one embodiment of this application, the allocation unit includes:
[0192] A subunit is created to generate multiple driver installation tasks using multiple parallel threads based on a linear sequence of multiple nodes and the driver installation process.
[0193] The storage subunit is used to store multiple driver installation tasks into a task thread pool with multiple parallel threads.
[0194] The execution subunit is used to execute multiple driver installation tasks through multiple parallel threads to generate the execution status of multiple driver installation tasks, and update the execution status of multiple driver installation tasks to the status manager to complete the driver installation.
[0195] In one embodiment of this application, the execution module 905 further includes:
[0196] The acquisition unit is used to acquire multiple performance metrics of the server under test and to obtain multiple performance data based on these metrics.
[0197] The comparison unit is used to compare multiple performance data with preset performance thresholds and generate comparison results.
[0198] The second generation unit is used to generate adjustment instructions for at least one parallel thread based on the comparison results, and to adjust the concurrency of driver installation based on the adjustment instructions for at least one parallel thread.
[0199] In one embodiment of this application, the server component driver installation device 90 further includes:
[0200] The fifth acquisition module is used to acquire multiple restart requests triggered by multiple parallel threads installing the driver.
[0201] The fifth generation module is used to parse the dependency graph between the installation tasks of each component based on the component dependency relationship and generate the dependency parsing results.
[0202] The allocation module is used to prioritize multiple restart requests based on the dependency resolution results and generate priority allocation information.
[0203] The sixth generation module is used to generate a restart queue for driver installation based on priority allocation information and pre-created execution scripts. The restart queue for driver installation is used to optimize the pre-created standardized installation flowchart.
[0204] In one embodiment of this application, the server component driver installation device 90 further includes:
[0205] The sixth module is used to obtain historical driver installation logs and system environment configuration information.
[0206] The seventh generation module is used to generate a pre-trained driver execution model based on historical driver installation logs and system environment configuration information.
[0207] The second output module is used to input the component dependencies and target component information from the target component information into the pre-trained driver execution model to output a pre-created execution script.
[0208] For a description of the features in the embodiment corresponding to the server component driver installation device, please refer to the relevant description in the embodiment corresponding to the server component driver installation method, which will not be repeated here.
[0209] Figure 10 A schematic diagram of the structure of the electronic device provided in this application. Figure 10 As shown, the electronic device 100 provided in this embodiment includes at least one processor 1001 and a memory 1002. Optionally, the electronic device 100 further includes a communication component 1003. The processor 1001, memory 1002, and communication component 1003 are connected via a bus.
[0210] In a specific implementation, at least one processor 1001 executes computer execution instructions stored in memory 1002, causing at least one processor 1001 to execute the above-described server component driver installation method embodiment.
[0211] The specific implementation process of processor 1001 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0212] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0213] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0214] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0215] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described server component driver installation method embodiments when it runs.
[0216] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0217] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described server component driver installation method embodiments.
[0218] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described server component driver installation method embodiments.
[0219] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0220] The foregoing has provided a detailed description of a server component driver installation method and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for installing server component drivers, characterized in that, include: In response to the input of a test task, the server performance parameters in the test task are obtained, and the initial component information of the server is determined based on the server performance parameters; wherein, the format type of the input test task is a test list; and the initial component information is the components recorded in the test list. The driver installation process is generated according to the pre-created standardized installation flowchart and the initial component information of the server. The connection information of the server is obtained, and the target component information of the server is determined based on the connection information of the server. The connection information is obtained from the server under test set up by the tester. The connection information of the server is the connection relationship of each component in the server set up by the tester. The target component information is the hardware component information in the server under test. Based on the initial component information and the target component information, generate functional simulation test information for each component in the initial component and the target component respectively, and determine whether the functions of the initial component and the target component are the same based on the functional simulation test information; If the initial component has the same function as the target component, then the component dependency relationship in the target component information is parsed by multiple parallel threads to obtain the identifiers and dependency list of multiple driver components to be installed; An initialized driver dependency graph is generated based on the identifiers of the multiple driver components to be installed and the dependency list, wherein the multiple driver components to be installed in the driver dependency graph are used as driver component nodes in the graph. A linear sequence of multiple nodes in the driving dependency graph is calculated using a topological sorting algorithm; Multiple driving components are allocated to multiple parallel threads according to the linear sequence of the multiple nodes, and Multiple driver installation tasks are created using the multiple parallel threads based on the linear sequence of the multiple nodes and the driver installation process. The multiple driver installation tasks are stored in the task thread pool of the multiple parallel threads; The multiple driver installation tasks are executed by the multiple parallel threads to generate the execution status of the multiple driver installation tasks, and the execution status of the multiple driver installation tasks is updated to the status manager to complete the driver installation. Before generating the driver installation process according to the pre-created standardized installation flowchart and the initial component information of the server, the process also includes: Obtain the server's component information, wherein the server's component information is obtained by calling the server's component library interface; Based on the component information of the server, the components are classified, and the classified component information is generated; The environmental compatibility of server components is detected based on the classified component information, and matching information between components and environment is generated based on the environmental compatibility data of server components. Based on the matching information between the component and the environment, the driver installation package in the driver library is retrieved, and matching information of the driver installation package is generated, wherein the matching information of the driver installation package includes multiple adapted driver installation packages. The matching information of the driver installation package is parsed to generate a sequence of operation instructions for multiple driver installation packages; Based on the matching information between the components and the environment and the sequence of operation instructions for the multiple driver installation packages, installation process information for multiple component drivers is created; A standardized installation flowchart is generated based on the installation process information driven by the multiple components; After generating the standardized installation flowchart based on the installation process information driven by the multiple components, the process further includes: Based on the matching information between the components and the environment, the dependency knowledge base is queried to perform dependency parsing and generate a list of dependency packages for the components and the environment. Create a container image file based on the list of dependencies of the components and environment and the installation process information of multiple component drivers; Write the container image file to the image storage directory, and call the container packaging instruction to create a component-driven container image based on the image storage directory; After the driver installation process is completed by executing the driver installation process using multiple parallel threads based on the component dependencies in the target component information, the process further includes: Obtain the driver execution log generated during driver installation; The driver execution log is input into a pre-created driver installation process diagnostic model to output a diagnostic knowledge graph of the driver installation process; wherein, the driver installation process diagnostic model is obtained by extracting the relationship information between entities using natural language processing technology based on historical driver installation log samples, driver documents, hardware compatibility lists and fault solution knowledge bases, and training based on the relationship information between entities. An optimization strategy set is generated based on the information of the items to be optimized in the diagnostic knowledge graph. Optimize the pre-created standardized installation flowchart according to the optimization strategy set; After allocating multiple driving components to multiple parallel threads according to the linear sequence of the multiple nodes, the method further includes: Obtain multiple performance metrics of the server under test, and obtain multiple performance data based on the multiple performance metrics; The multiple performance data are compared with preset performance thresholds to generate comparison results; Based on the comparison results, an adjustment instruction for at least one parallel thread is generated, and the concurrency of the driver installation is adjusted based on the adjustment instruction for the at least one parallel thread; wherein, if the comparison results indicate sufficient resources, an instruction to increase the number of parallel threads is generated. If the comparison result indicates resource scarcity, then an instruction to reduce the number of parallel threads is generated.
2. The server component driver installation method according to claim 1, characterized in that, Before the step of executing the driver installation process through multiple parallel threads based on the component dependencies in the target component information to complete the driver installation, the method further includes: Obtain multiple restart requests triggered when the multiple parallel threads install the driver; Based on the component dependencies, the dependency graph between the installation tasks of each component is parsed, and the dependency parsing results are generated. Based on the dependency resolution results, priority allocation information is generated for the multiple restart requests. A restart queue for driver installation is generated based on the priority allocation information and the pre-created execution script, wherein the restart queue for driver installation is used to optimize the pre-created standardized installation flowchart.
3. The server component driver installation method according to claim 2, characterized in that, Before generating the driver installation restart queue based on the priority allocation information and the pre-created execution script, the process also includes: Obtain historical driver installation logs and system environment configuration information; A pre-trained driver execution model is generated based on the historical driver installation logs and system environment configuration information; The component dependencies and target component information from the target component information are input into the pre-trained driver execution model to output a pre-created execution script.
4. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the server component driver installation method as described in any one of claims 1 to 3 when executing the computer program.
Citation Information
Patent Citations
Method and device for installing application software based on automated script
CN115904419A