Network card management method and device, equipment and storage medium

By associating network card information with device model and storing it in a configuration file and updating it in real time, the problem of low compatibility between management software and network card hardware is solved, achieving efficient hardware adaptation, reducing maintenance costs, and improving system reliability and user experience.

CN120956595APending Publication Date: 2025-11-14JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510936904.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

The low compatibility between management software and network card hardware leads to high maintenance costs, and existing technologies require frequent code modifications and branch development to adapt to hardware changes.

Method used

By acquiring network interface card (NIC) information and storing it in a configuration file, associating it with the device model, monitoring changes in NIC information and updating the configuration file, and dynamically loading the information acquisition scheme for the target device model, unified management and display of NIC information can be achieved.

Benefits of technology

It significantly shortens the adaptation cycle for hardware changes, reduces maintenance costs, improves the timeliness of fault response and system reliability, reduces the need for customized page development, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956595A_ABST
    Figure CN120956595A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer networks, in particular to a network card management method and device, equipment and a storage medium. The network card management method comprises the steps that network card information of management network cards is obtained, the network card information is associated with device types matched with the network card information, each device type is compatible with at least one management network card, the network card information is stored in a configuration file, and an information obtaining scheme for obtaining the network card information of different device types is stored in the configuration file. And monitoring network card information change of the management network card and updating network card information stored in the configuration file, loading an information acquisition scheme of a target network card adaptive to the target machine type from the configuration file, taking the information acquisition scheme as a target scheme, acquiring network card information of the target network card according to the target scheme, and displaying the network card information. According to the method, the technical problems that the adaptation efficiency of management software and network card hardware is low and the maintenance cost is increased are solved, and the technical effects of improving the network card management efficiency and the system resource utilization rate are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer network technology, and in particular to a network interface card (NIC) management method, apparatus, device, and storage medium. Background Technology

[0002] With the widespread adoption of technologies such as cloud computing and artificial intelligence, network interface cards (NICs), as the key interface for interaction between servers and external networks, are experiencing rapid technological iteration. Market demands for NIC performance, such as bandwidth and intelligence levels, are constantly increasing, prompting the evolution of NIC types from traditional basic NICs to intelligent NICs and high-performance NICs. However, while hardware is rapidly iterating, the software adaptation of storage systems faces significant challenges.

[0003] The current storage system management software is deeply coupled with the hardware network interface card (NIC), meaning that changes to the underlying NIC, such as adding a new model or customizing a device, require modifications to the upper-layer software code. For example, when a new NIC is introduced in a new model, a separate software branch needs to be pulled for adaptation development, and after adaptation, it needs to be merged back into the previous version. When a new NIC is added to a customer-customized model, a patch package needs to be customized on the existing version, and subsequent version upgrades require repeated adaptation. This tight coupling design results in low efficiency in adapting the management software to the NIC hardware and increases maintenance costs. Summary of the Invention

[0004] This application provides a network interface card (NIC) management method, apparatus, device, and storage medium to at least solve the technical problems of low compatibility between management software and NIC hardware, and increased maintenance costs.

[0005] This application provides a network interface card (NIC) management method, which includes: obtaining NIC information for the managed NIC; storing the NIC information in a configuration file and associating it with the device model it is compatible with, and storing information acquisition schemes for different device models in the configuration file; wherein each device model is compatible with at least one managed NIC; monitoring changes in the NIC information of the managed NIC and updating the NIC information stored in the configuration file; loading the information acquisition scheme of the target NIC compatible with the target model from the configuration file as the target scheme; obtaining the NIC information of the target NIC according to the target scheme and displaying it on a display page.

[0006] This application also provides a network interface card (NIC) management device, which includes:

[0007] The acquisition module is used to acquire network card information for the management network card;

[0008] The storage module is used to store network card information in a configuration file and associate it with the device model it is compatible with. The configuration file stores information acquisition schemes for different device models to obtain network card information. Each device model is compatible with at least one management network card.

[0009] The monitoring module is used to monitor changes in network card information and update the network card information stored in the configuration file.

[0010] The display module is used to load the information acquisition scheme of the target network card that is compatible with the target model from the configuration file, and use it as the target scheme; based on the target scheme, it obtains the network card information of the target network card and displays it on the display page.

[0011] This application also provides an electronic device, which includes:

[0012] Memory, used to store computer programs;

[0013] A processor is used to implement any of the above-described network interface card (NIC) management methods when executing computer programs.

[0014] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described network interface card (NIC) management methods.

[0015] This application unifies the acquisition scheme of network interface card (NIC) information and device model association in a configuration file, enabling adaptation to hardware changes by simply updating the configuration content. This avoids the code modification, branch development, and patch maintenance processes triggered by the introduction of new models or NIC replacements in traditional solutions, significantly shortening the adaptation cycle and reducing maintenance costs. Secondly, by continuously monitoring changes in NIC information and updating the configuration file in real time, it ensures that the physical device status is synchronized with the software layer data, solving the problem of status lag and improving the timeliness of fault response and system reliability. Finally, it dynamically loads the information acquisition scheme of the target device model based on the configuration file and standardizes the display of NIC information through a unified interface, enabling consistent processing of different NIC models in terms of location mapping, status presentation, and style rendering. This reduces the need for customized page development for various hardware types, reduces code redundancy, and improves the user experience.

[0016] Therefore, this method can solve the technical problems of low compatibility between management software and network card hardware and increased maintenance costs, and achieve the technical effect of improving the compatibility between management software and network card hardware and reducing maintenance costs. Attached Figure Description

[0017] 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.

[0018] Figure 1 An application environment diagram of a network interface card (NIC) management method provided in this application embodiment;

[0019] Figure 2 A flowchart illustrating a network interface card (NIC) management method provided in an embodiment of this application;

[0020] Figure 3 A schematic diagram of a configuration file provided in an embodiment of this application;

[0021] Figure 4 A flowchart illustrating another network interface card (NIC) management method provided in the embodiments of this application;

[0022] Figure 5 This is a schematic diagram of the structure of a network interface card (NIC) management device provided in an embodiment of this application;

[0023] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0024] 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.

[0025] 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.

[0026] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0027] To address the technical problem of low compatibility between management software and network interface card (NIC) hardware, which increases maintenance costs, this application achieves the following technical effects: obtaining NIC information of the management NIC; storing the NIC information in a configuration file and associating it with the compatible device model; storing information acquisition schemes for different device models in the configuration file; wherein each device model is compatible with at least one management NIC; monitoring changes in the management NIC's NIC information and updating the NIC information stored in the configuration file; loading the information acquisition scheme of the target NIC compatible with the target device model from the configuration file as the target scheme; and obtaining the NIC information of the target NIC according to the target scheme and displaying it on the display page. This achieves the technical effect of improving the compatibility efficiency between management software and NIC hardware and reducing maintenance costs.

[0028] 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. The network interface card (NIC) management method provided in this application can be applied to, for example... Figure 1 , Figure 1 This diagram illustrates an application environment for a network interface card (NIC) management method provided in this embodiment. Terminal 12 communicates with server 14 via a network. Terminal 12 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 14 can be a standalone server or a server cluster consisting of multiple servers.

[0029] 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.

[0030] The embodiments of this application provide a network interface card (NIC) management method, and the method is described in detail below in conjunction with the execution flow of the NIC management method.

[0031] In one embodiment, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a network interface card (NIC) management method provided in an embodiment of this application.

[0032] S101: Obtain network card information for the management network card.

[0033] In this embodiment, network interface card (NIC) information refers to the attribute dataset for managing NICs, which may include static intrinsic information and dynamic status information. Essentially, it is an abstract description of hardware characteristics and is used to form the data foundation for software-hardware decoupling.

[0034] Specifically, the physical attributes and real-time operating parameters of the network card can be read through the operating system interface or hardware management protocol. This creates a digital image of the hardware characteristics, providing data input for configuration decoupling and avoiding manual input errors.

[0035] S102: Store network card information in a configuration file and associate it with the device model it is compatible with, and store information acquisition schemes for different device models to obtain network card information in the configuration file; wherein, each device model is compatible with at least one management network card.

[0036] In this embodiment, the configuration file refers to the carrier that stores network interface card (NIC) information and information acquisition schemes. It can adopt a structured format to achieve machine readability. Device model association refers to binding the NIC information in the configuration file with a specific hardware model, forming a "model-NIC" mapping relationship. This is used for the configurable encapsulation of device differences and supports unified management of heterogeneous hardware.

[0037] Specifically, by creating a structured configuration file, the static attributes and dynamic behaviors of the network interface card (NIC) are extracted from the software code. The NIC information is stored in this configuration file, which is bound to the device model. That is, one configuration file corresponds to one device model, and one device model is compatible with at least one NIC. In other words, the number of NICs can be one or more.

[0038] S103: Monitor and manage changes in network interface card (NIC) information and update the NIC information stored in the configuration file.

[0039] In this embodiment, the information acquisition scheme refers to the operational logic of collecting real-time status from the physical network card. By standardizing and abstracting hardware access instructions, the acquisition logic and the calling interface are separated.

[0040] Specifically, by deploying a background daemon to periodically check the network card status, the corresponding fields in the configuration file can be automatically rewritten when network card information changes, thus achieving real-time consistency between physical devices and software configurations.

[0041] S104: Load the target network card information acquisition scheme adapted to the target model from the configuration file as the target scheme; obtain the network card information of the target network card according to the target scheme and display it on the display page.

[0042] In this embodiment, the target scheme refers to a network card information collection strategy instance dynamically loaded for the target model, which serves as an executable adaptation strategy that is matched on demand at runtime.

[0043] Specifically, an information acquisition scheme adapted to the target model is obtained through a configuration file. This information acquisition scheme is then used as the target scheme for the target model to obtain the network card information of the target network card. The obtained network card information is then used to render the front-end page and display the network card information on the display page to achieve network card management.

[0044] In this embodiment, by uniformly storing the network interface card (NIC) information and device model association in a configuration file, adaptation can be completed simply by updating the configuration content when hardware changes occur. This avoids the code modification, branch development, and patch maintenance processes triggered by the introduction of new devices or NIC replacements in traditional solutions, significantly shortening the adaptation cycle and reducing maintenance costs. Secondly, by continuously monitoring changes in NIC information and updating the configuration file in real time, the physical device status and software layer data are synchronized, solving the problem of status lag and improving the timeliness of fault response and system reliability. Finally, the information acquisition scheme for the target device model is dynamically loaded based on the configuration file, and the NIC information is displayed in a standardized manner through a unified interface. This ensures consistent processing of different NIC models in terms of location mapping, status presentation, and style rendering, reducing the need for customized page development for various hardware types, reducing code redundancy, and improving the user experience.

[0045] In one embodiment, such as Figure 3 As shown, Figure 3 This is a schematic diagram of a configuration file provided in an embodiment of this application.

[0046] In this embodiment, the network card information is configured first. The configuration file is stored with the model name as the file name. One configuration file corresponds to one model and is used to record the inherent type information of all network cards of the corresponding model.

[0047] Specifically, the configuration file stores the inherent type information of the network interface card (NIC), which includes NIC style information and NIC location information.

[0048] Configuring network interface card (NIC) style information includes obtaining the NIC speed of the managed NIC. The NIC speed can be gigabit (Gbps), 10 gigabit (Gbps), etc. Multiple managed NICs are divided into several speed groups based on their speed; for example, NICs with a speed of 1 gigabit are in one group, and NICs with a speed of 10 gigabit are in another group. A NIC style information display scheme matching the speed group is then set as the style scheme for the corresponding NIC.

[0049] Each network interface card (NIC) display scheme includes at least two display schemes: one for NICs in normal operation and another for NICs in abnormal operation. That is, the display scheme for any group of NICs includes both the display scheme for NICs in normal operation and the display scheme for NICs in abnormal operation. The NIC speed can be displayed in the display scheme, such as by directly showing the NIC speed in text format.

[0050] Specifically, the network interface card (NIC) style information configuration can be referenced in the following code example:

[0051] {

[0052] "1Gnic":{

[0053] "normal":"1Gnic.png",

[0054] "abnormal":"abnormal1Gnic.png",

[0055] },

[0056] "10Gnic":{

[0057] "normal":"10Gnic.png",

[0058] "abnormal":"abnormal10Gnic.png",

[0059] }

[0060] }

[0061] Specifically, "1Gnic" indicates that the network card speed of this group is 1 gigabit, "normal" indicates that this scheme is for the network card in a normal state, and "abnormal" indicates that this scheme is for the network card in an abnormal state. "1Gnic.png" indicates that the network card speed is displayed as "1Gnic" when it is in a normal state, and "abnormal1Gnic.png" indicates that the network card speed is displayed as "abnormal1Gnic" when it is in an abnormal state.

[0062] In this embodiment, network interface card (NIC) status information can also be displayed using colors. For example, when the NIC is in a normal state, a green icon is used to display the NIC status information, with "1G" displayed on the icon to indicate that the corresponding NIC's speed is 1 gigabit and the NIC is in a normal state. If the NIC is in an abnormal state, a red icon is used to display the NIC status information, with "1G" displayed on the icon to indicate that the corresponding NIC's speed is 1 gigabit and the NIC is in an abnormal state. Similarly, corresponding colors can be set for other speed groups of the NIC to indicate the NIC's status, and text can be used to represent the NIC's speed.

[0063] The management interface card (NIC) style scheme and its speed are used as its NIC style information. After the NIC style information is configured, it is stored in the configuration file and used to display the status of the corresponding NIC using the style scheme.

[0064] Furthermore, configure the network card location information. The network card location information is related to the machine model and is stored in the file name with the machine model name. This includes obtaining the correspondence between the physical slot used to install and manage the network card and the network card location coordinates, so as to establish the mapping relationship between the physical slot and its network card location coordinates. The mapping relationship can be stored in the configuration file in the form of a mapping table, and the mapping relationship in the mapping table is used as the network card location information for managing the network card.

[0065] Specifically, a physical slot refers to the physical slot identifier on the server motherboard where a network card is installed, such as the silkscreen markings on network cards like PCIE1-0 (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) and OCP0-1 (Onboard Communications Processor). The position coordinates correspond to the display position of the network card icon on the management software's display page, expressed in pixels as vertical (top) and horizontal (left) coordinates. By parsing the configuration file, the system obtains the two-dimensional positioning data for each physical slot, forming a structured key-value pair mapping table. For example, slot PCIE1-0 is mapped to coordinates {top:500, left:500}, indicating that the network card icon should be rendered 500 pixels from the top and 500 pixels from the left of the page. Storing the network card position information in the configuration file means storing the above mapping relationship in a machine-readable format. Its structure clearly reflects the correspondence between slots and coordinates. The network card position information configuration can be seen in the following code example:

[0066]

[0067] Specifically, the hardware layout is transformed into a computable digital model through key-value pairs. Each primary key, such as "OCP0-0", represents the physical network card slot identifier on the server motherboard. This identifier usually corresponds to the network card silkscreen. The nested coordinate object declares the rendering position of the network card in the management page. The "top" field sets the vertical distance from the top of the page in pixels, and the "left" field sets the horizontal distance from the left side of the page in pixels. Together, they form the positioning reference in the Cartesian coordinate system.

[0068] The specific mapping logic can be reflected in the correspondence between multiple slots and coordinates. For example, slot OCP0-0 is mapped to coordinates (100, 100), indicating that the network card icon should be rendered in the upper left area of ​​the page; slot OCP0-1 corresponds to coordinates (200, 200), positioned in the upper middle area; the three sets of PCIe expansion slots (PCIE0-0 to PCIE1-0) are distributed arithmetically from coordinates (300, 300) to (500, 500) to reflect the actual arrangement order of the physical slots on the motherboard from the center to the lower right corner. This structured design allows the complex hardware layout inside the server to be intuitively projected onto a two-dimensional operation page. For example, when the network card in slot PCIE1-0 triggers an anomaly, maintenance personnel can directly locate the faulty hardware at coordinates (500, 500) on the page.

[0069] In this embodiment, by decoupling network interface card (NIC) style information from the code layer to a configuration file, hardware appearance and software control are decoupled. When a new NIC type is added or the speed is upgraded, only the style definition in the configuration file needs to be updated, without modifying the front-end rendering logic, thus reducing the resource consumption of repeatedly writing page components in traditional development. A key-value pair structure is used to establish a precise mapping between physical slots and page coordinates, transforming hardware layout changes into configuration parameter adjustments. When server models are iterated, maintenance personnel only need to modify the coordinate data in the configuration file to synchronously update the NIC positioning on the visualization page, avoiding the cumbersome process of refactoring the front-end layout code. This configuration-based approach enables unified management of heterogeneous devices such as gigabit NICs and smart NICs at the page layer, significantly improving operational response efficiency and system maintainability.

[0070] In one embodiment, such as Figure 4 As shown, Figure 4 This is a flowchart illustrating another network interface card (NIC) management method provided in an embodiment of this application.

[0071] Obtain the network card information of the target network card based on the target solution.

[0072] S201: In response to the startup of the management software service, the network card information of the network card is collected periodically by the management software service at preset time intervals.

[0073] In this embodiment, when the management software service starts, it automatically creates a scheduled task, such as triggering it every 5 minutes, to collect network card information at preset intervals to ensure the timeliness of network card status updates.

[0074] S202: In response to the loading of the target scheme from the self-configuration file and the target network card adapted to the target model, the target scheme is invoked.

[0075] In this embodiment, the target solution associated with the requested target model name is retrieved from the configuration file, as illustrated in the following code example:

[0076]

[0077] Specifically, if the requested target device name is device 1, the corresponding target solution for device 1 is "get_location_0x3e_0x6f"; if the requested target device name is device 2, the corresponding target solution for device 2 is "get_location_0x3c_0x02". In this embodiment, hardware differences are isolated by configuration files, so no code modification is required when introducing a new device model.

[0078] S203: Extraction command for the target solution.

[0079] In this embodiment, since different hardware platforms use different instructions to obtain network card information, it is necessary to establish a correspondence between the instructions and the target solution, as shown in Table 1. Table 1 is a target solution-acquisition instruction mapping table:

[0080] Table 1 Target Solution - Obtaining the Instruction Mapping Table

[0081] Target Plan Get instructions get_location_0x3e_0x6f ipmitoolraw0x3e0x6fxx get_location_0x3c_0x02 ipmitoolraw0x3c0x020x06xx … …

[0082] Specifically, the hardware operation instructions of the target solution are extracted, i.e., the acquisition instructions. For example, if the target solution is get_location_0x3e_0x6f, then its corresponding acquisition instruction is ipmitool raw 0x3e 0x6fxx. The acquisition instructions are used to obtain the real-time status information of the target network card.

[0083] S204: Execute the acquisition command to obtain network card data packets that retrieve the real-time status information of the target network card.

[0084] In this embodiment, the acquisition instruction is executed to obtain a data packet containing real-time status information of the target network card.

[0085] Furthermore, this embodiment may also include synchronously monitoring execution thresholds or error codes when executing hardware commands. If it is detected that the execution of the acquisition command exceeds a preset time of the execution threshold, such as 5 seconds, a non-zero status code or invalid data packet is returned to indicate that the acquisition command has failed. Then, it automatically queries whether the acquisition command matches other target solutions, or uses a manual intervention mechanism to match other target solutions. This reduces the interruption of solution matching due to command failure, and allows maintenance personnel to quickly select or fine-tune the command template based on historical successful solutions to match other target solutions, thereby improving the system's anomaly handling capabilities and achieving effective management of network card status.

[0086] S205: Parse network card data packets to obtain network card location information and real-time status information.

[0087] In this embodiment, the real-time status can be dynamic indicators such as the network card's connection status and packet loss rate. The network card location refers to the physical slot, such as PCIe 1-0. By reading the configuration file, the inherent type information of the network card for the corresponding machine model is obtained, and by calling the interface, the relationship between the network card and information such as silkscreen location and network card type is obtained.

[0088] After obtaining the network card location and real-time status information, the following is also included:

[0089] S206: Extract the slot information of the physical slot carried by the network card location information.

[0090] In this embodiment, the physical slot, such as PCIE1-0, is extracted from the parsing results of the network card data packets.

[0091] S207: Query the mapping relationship between the physical slot and its network card location coordinates to obtain the network card location coordinates mapped by the slot information as coordinate information.

[0092] In this embodiment, the configuration file is queried to obtain the page coordinates corresponding to the network card slot. This embodiment associates the hardware location, slot, software coordinates, and real-time network card status, laying the foundation for displaying a visual page.

[0093] S208: Store slot information, coordinate information, and real-time status information in a preset database.

[0094] In this embodiment, the stored fields can be the physical slot of the network card, page coordinates, and real-time status. When used for front-end rendering, relevant data can be directly retrieved from the database, avoiding repeated parsing of configuration files.

[0095] In this embodiment, by periodically collecting data during service startup and dynamically loading hardware instructions, the system decouples hardware adaptation logic from the code layer to a configuration file. When facing different machine models or new network cards, only the configuration scheme needs to be updated to complete the data collection task, reducing and eliminating the need for repetitive development for specific hardware in traditional solutions. The process of executing the hardware instructions corresponding to the target scheme and parsing data packets standardizes the data collection process for heterogeneous hardware. From extracting physical slots to mapping page coordinates, and then to the structured storage process, a chain of association is established from hardware location to logical coordinates to the real-time status of the network card. This allows the front-end rendering to directly call a unified data source, achieving a synergistic improvement in fault location accuracy and operational efficiency.

[0096] In one embodiment, and before being displayed on the display page, it also includes:

[0097] Determine if there is an acquisition command that matches the device model. The acquisition command is used to obtain the real-time status information of the management network card.

[0098] If a matching acquisition command is found, a network interface card (NIC) information acquisition scheme suitable for the device model is obtained, and the acquisition command in the NIC information acquisition scheme is further executed.

[0099] If no matching acquisition command is found for the device model, a new network card information acquisition scheme will be matched for the device model or an existing network card information acquisition scheme will be matched as a derivative acquisition scheme, and the acquisition command in the derivative acquisition scheme will be executed.

[0100] Specifically, the target solution and acquisition command corresponding to the model are related. When a new model is added, if no corresponding target solution is added, you can choose to directly configure the existing target solution in the configuration file and configure the corresponding acquisition command to determine the correspondence between the new model and the target solution; or you can choose to add an acquisition command corresponding to the new model. You can first add a new target solution corresponding to the new model and configure the corresponding acquisition command, and then maintain the new model and the new target solution in the configuration file. This method can ensure that it does not affect the target solutions of other models.

[0101] In this embodiment, when a new model uses an existing network card type, only the mapping relationship between the model and the existing solution needs to be established in the configuration file to avoid redundant development and data collection. When a new model is equipped with a network card that is not supported, a new target solution needs to be added to ensure that the access of new hardware does not affect the configuration of historical models. The solution can be continuously accumulated and reused directly in the future for similar hardware. This achieves configuration isolation, limiting the impact domain to a single entry. The configuration update takes effect in real time without modifying the code. That is, when there are subsequent model expansions, it will not affect other models, providing a scalable technical foundation for the storage system.

[0102] In one embodiment, the network card information of the target network card is obtained according to the target scheme and displayed on the display page.

[0103] In this embodiment, after obtaining the network interface card (NIC) information, the NIC information is displayed on the front-end display page. Specifically, the configuration file is read, and the inherent type information of the NIC for the corresponding device model is obtained through the configuration file, including NIC style information and NIC location information. The following is a diagram of the location information code:

[0104]

[0105] Network cards with an OCP (Onboard Communications Processor) physical slot are located in slot 0 of group 0, at coordinates (100, 100), corresponding to the integrated network card position on the server display page, which is near the upper left area of ​​the motherboard. Network cards with a PCIe (Peripheral Component Interconnect Express) physical slot are located in slot 0 of group 1, at coordinates (500, 500), which is located in the lower right PCIe expansion area of ​​the motherboard.

[0106] The following is a sample of style information code:

[0107] {

[0108] "eth0": {

[0109] "OCP0-0",

[0110] "1Gnic"

[0111] },

[0112] "ens17": {

[0113] "PCIE1-0",

[0114] "10Gnic"

[0115] }

[0116] }

[0117] The operating system recognizes the network card device as "eth0", its corresponding physical slot is OCP0-0, and the network card speed group is 1 Gigabit. The operating system recognizes the network card device as "eth17", its corresponding physical slot is PCIe1-0, and the network card speed group is 10 Gigabit.

[0118] Furthermore, real-time status information is retrieved from a preset database based on the location information. The preset database is used to store network card location information and real-time status information for managing network cards.

[0119] After the front-end obtains the network card's location information and real-time status information, it matches the network card style information in the configuration file based on the network card's location information and real-time status information, and then renders the network card style information and displays it on the display page.

[0120] In this embodiment, a unified interface-driven configurable rendering method is used to achieve visualization of network card management. By reading the network card location information in the configuration file, the spatial coordinates of the hardware on the page are accurately located. Then, based on the location information, real-time status information is retrieved from a preset database. Dynamic data is deeply associated with static configuration, so that the front-end page reflects the physical device's operating status in real time. Combined with the network card style information in the configuration file, the status and visual identifiers are automatically matched to achieve visual warning of faults. Finally, a unified and standardized display page is output through standardized rendering.

[0121] This network interface card (NIC) management method simplifies NIC information management. By maintaining NIC location information, style information, and real-time status acquisition methods in configuration files, the information management process is streamlined. This makes it easy to record and update the specific characteristics of different NIC models, improving information management efficiency. Furthermore, the configuration-based approach facilitates subsequent expansion and maintenance. Upgrades to new models or existing system functions can be achieved without modifying the source code, reducing maintenance costs and increasing work efficiency. It also enables efficient management and rapid adaptation to various NIC types, significantly enhancing the flexibility of the storage system. Effective support is provided for both existing and future NIC types.

[0122] In one embodiment, such as Figure 5 As shown, Figure 5 This is a schematic diagram of a network interface card (NIC) management device provided in an embodiment of this application. The NIC management device may include an acquisition module 21, a storage module 22, a monitoring module 23, and a display module 24.

[0123] Module 21 is used to obtain network card information for the management network card;

[0124] Storage module 22 is used to store network card information in a configuration file and associate it with the device model it is compatible with, and to store information acquisition schemes for different device models to obtain network card information in the configuration file; wherein, each device model is compatible with at least one management network card;

[0125] Monitoring module 23 is used to monitor changes in network card information of the network card and update the network card information stored in the configuration file;

[0126] The display module 24 is used to load the information acquisition scheme of the target network card that is compatible with the target model from the configuration file, and use it as the target scheme; it obtains the network card information of the target network card according to the target scheme and displays it on the display page.

[0127] Each module in the aforementioned network interface card (NIC) management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.

[0128] Embodiments of this application also provide an electronic device, including a memory for storing computer programs;

[0129] A processor, when executing a computer program, can perform at least the following steps:

[0130] Obtain network card information for the managed network card; store the network card information in a configuration file and associate it with the compatible device model, and store information acquisition schemes for different device models in the configuration file; wherein each device model is compatible with at least one managed network card; monitor changes in the network card information of the managed network card and update the network card information stored in the configuration file; load the information acquisition scheme of the target network card compatible with the target model from the configuration file as the target scheme; obtain the network card information of the target network card according to the target scheme and display it on the display page.

[0131] In one embodiment, the electronic device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores software management data. The network interface is used for communication with external terminals via a network connection.

[0132] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0133] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, can perform at least the following steps:

[0134] Obtain network card information for the managed network card; store the network card information in a configuration file and associate it with the compatible device model, and store information acquisition schemes for different device models in the configuration file; wherein each device model is compatible with at least one managed network card; monitor changes in the network card information of the managed network card and update the network card information stored in the configuration file; load the information acquisition scheme of the target network card compatible with the target model from the configuration file as the target scheme; obtain the network card information of the target network card according to the target scheme and display it on the display page.

[0135] 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.

[0136] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, can perform at least the following steps:

[0137] Obtain network card information for the managed network card; store the network card information in a configuration file and associate it with the compatible device model, and store information acquisition schemes for different device models in the configuration file; wherein each device model is compatible with at least one managed network card; monitor changes in the network card information of the managed network card and update the network card information stored in the configuration file; load the information acquisition scheme of the target network card compatible with the target model from the configuration file as the target scheme; obtain the network card information of the target network card according to the target scheme and display it on the display page.

[0138] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0139] It will also be appreciated 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.

[0140] The foregoing has provided a detailed description of a network interface card (NIC) management method, system, device, and storage medium 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 merely for the purpose of helping to understand the method and its core ideas. 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 network interface card (NIC) management method, characterized in that, The network interface card (NIC) management method includes: Obtain network card information for the network interface card (NIC); The network interface card (NIC) information is stored in a configuration file and associated with the device model it is compatible with. The configuration file stores information acquisition schemes for different device models to obtain the NIC information. Each device model is compatible with at least one of the management NICs. Monitor changes in the network interface card (NIC) information of the managed NIC and update the NIC information stored in the configuration file; The configuration file loads the target network card information acquisition scheme adapted to the target model as the target scheme; the network card information of the target network card is obtained according to the target scheme and displayed on the display page.

2. The network interface card (NIC) management method according to claim 1, characterized in that, The network interface card (NIC) information includes inherent type information, and the inherent type information includes NIC style information. The step of storing the network card information in the configuration file includes: Obtain the network interface speed of the managed network interface card; The multiple management network cards are divided into multiple rate groups according to the network card rate; a display scheme for the network card style information matching the rate group is configured as its style scheme; wherein, the style scheme includes at least a network card rate display scheme when the management network card is in a normal state and a network card rate display scheme when it is in an abnormal state. The style scheme and speed of the management network card are used as its network card style information; The network interface card (NIC) style information is stored in the configuration file.

3. The network interface card (NIC) management method according to claim 1 or 2, characterized in that, The network interface card (NIC) information includes inherent type information, which includes NIC location information; storing the NIC information in the configuration file further includes: Obtain the correspondence between the physical slot used to install the management network card and the coordinates of the network card's location, so as to... Establish a mapping relationship between the physical slot and its network card location coordinates, and use the mapping relationship as the network card location information of the management network card; The network card location information is stored in the configuration file.

4. The network interface card (NIC) management method according to claim 3, characterized in that, The process of obtaining the network card information of the target network card according to the target scheme includes: In response to the startup of the management software service, the network card information of the managed network card is collected periodically at preset time intervals using the management software service; In response to loading the target scheme from the configuration file that is compatible with the target network card of the target machine model, the target scheme is invoked; Extract the acquisition instruction of the target solution; wherein, the acquisition instruction is used to acquire the real-time status information of the target network card; Execute the acquisition instruction to obtain network card data packets containing real-time status information of the target network card; The network interface card (NIC) data packets are parsed to obtain the NIC location information and the real-time status information.

5. The network interface card (NIC) management method according to claim 4, characterized in that, After obtaining the network card location and the real-time status information, the process further includes: Extract the slot information of the physical slot carried by the network card location information; Query the mapping relationship between the physical slot and its network card location coordinates to obtain the network card location coordinates mapped by the slot information as coordinate information; The slot information, the coordinate information, and the real-time status information are stored in a preset database.

6. The network interface card (NIC) management method according to claim 1, characterized in that, The following are mentioned and displayed on the display page: Read the network card location information from the configuration file; The system retrieves real-time status information from a preset database based on the location information; wherein, the preset database is used to store the network card location information and real-time status information of the management network card. Match the network card style information in the configuration file based on the network card location information and real-time status information; The network interface card (NIC) style information is rendered and displayed on the display page.

7. The network interface card (NIC) management method according to claim 1, characterized in that, The following, which are displayed before the display page, also include: Determine whether there is an acquisition instruction matching the device model; wherein, the acquisition instruction is used to acquire the real-time status information of the management network card; In response to the existence of an acquisition instruction that matches the device model, a network interface card (NIC) information acquisition scheme suitable for the device model is acquired, and the acquisition instruction in the NIC information acquisition scheme is executed. If no matching acquisition instruction is found for the specified model, a new network card information acquisition scheme is matched for the specified model, or an existing network card information acquisition scheme is matched as a derivative acquisition scheme; the acquisition instruction in the derivative acquisition scheme is then executed.

8. A network interface card (NIC) management device, characterized in that, include: The acquisition module is used to acquire network card information for the management network card; A storage module is used to store the network card information in a configuration file and associate it with the device model it is compatible with, and to store information acquisition schemes for different device models to obtain the network card information in the configuration file; wherein, each device model is compatible with at least one of the management network cards; The monitoring module is used to monitor changes in the network card information of the managed network card and update the network card information stored in the configuration file; the display module is used to load the information acquisition scheme of the target network card adapted to the target model from the configuration file as the target scheme; and to obtain the network card information of the target network card according to the target scheme and display it on the display page.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the network interface card management 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, wherein the computer program, when executed by a processor, implements the steps of the network interface card management method as described in any one of claims 1 to 7.