Network card upgrading method and device, electronic equipment and storage medium

By assigning unique identifiers to multi-vendor network cards in the substrate management controller (BMC), and establishing mapping relationships, automated network cards are achieved, which solves the problems of difficulty and cumbersome operation of multi-vendor network cards in the existing technology, and improves the upgrade efficiency and security.

CN119835160APending Publication Date: 2025-04-15NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411974581.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When upgrading the existing technology on electronic devices of multi-manufacturer network cards, it is necessary to power off the network cards of other manufacturers, which increases the difficulty and cost of upgrading and is cumbersome to operate.

Method used

The network card connected to it through the target bus is determined through the board management controller (BMC), and a unique identifier is assigned to each network card, and a mapping relationship between the identifier and the network card is established. The upgrade file is sent to the target network card in response to the upgrade instruction to achieve automated upgrade.

Benefits of technology

It reduces the difficulty and cost of upgrading network cards, improves upgrade efficiency, avoids power outages of network cards of other manufacturers, and simplifies user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835160A_ABST
    Figure CN119835160A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a network card upgrading method and device, electronic equipment and a storage medium, which are used for improving the network card upgrading efficiency and reducing the network card upgrading difficulty. The method comprises the steps that the BMC determines a network card connected with the BMC through a target bus, wherein the target bus is based on a high-speed serial computer expansion bus standard; the BMC allocates a first identifier to each network card; the BMC establishes a mapping relationship between the first identifier and each network card; the BMC responds to an upgrading instruction and sends an upgrading file to a target network card corresponding to a target first identifier based on the mapping relation, and the target first identifier represents the first identifier of the network card needing to be upgraded.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] At present, more and more electronic devices are installed with two or even more network cards. Generally speaking, the firmware version of the network card needs to be upgraded so that the network card can support new functions. The common way to upgrade the network card is to run the upgrade software of the network card manufacturer. The network cards installed on the same electronic device may not be from the same manufacturer. Before running the upgrade software of a network card manufacturer, the network cards of other manufacturers need to be powered off. It can be seen that in the case where network cards from different manufacturers may be installed on electronic devices, the difficulty of upgrading the network card is also increasing. There is an urgent need for a solution that can reduce the difficulty of upgrading the network card and improve the upgrade efficiency. Summary of the invention

[0003] The embodiments of the present application provide a network card upgrade method, device, electronic device and storage medium to improve the network card upgrade efficiency and reduce the difficulty of network card upgrade.

[0004] In a first aspect, the present application provides a network card upgrade method in an embodiment, which is applied to a baseboard management controller BMC, and the method includes:

[0005] The BMC determines a network card connected to the BMC via a target bus, wherein the target bus is based on a high-speed serial computer expansion bus standard;

[0006] The BMC assigns a first identifier to each network card;

[0007] The BMC establishes a mapping relationship between the first identifier and each network card;

[0008] The BMC responds to the upgrade instruction and sends the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship, where the target first identifier represents the first identifier of the network card that needs to be upgraded.

[0009] In specific implementation, the BMC can determine the network cards connected to the BMC through the bus, and automatically assign the first identifier to each network card. The BMC performs network card upgrade management based on the mapping relationship between the first identifier and the network card. Such a design can uniformly manage network cards provided by different manufacturers.

[0010] In some application scenarios, most of the current network card devices can support the PLDM protocol. The BMC can use the platform-level data mode (PLDM) protocol to provide upgrade files to the network card. The first identifier can be used as the only network card identifier used in the PLDM protocol. For the target network card that needs to be upgraded, the BMC can use the target first identifier and the platform-level data mode (PLDM) protocol to send the upgrade file to the target network card. Such a design allows the network card that needs to be upgraded to receive the upgrade file, reducing the difficulty of upgrading the network card. In this process, the BMC can automatically execute the network card upgrade method, reduce user operations, and improve the efficiency of network card upgrades.

[0011] In a possible implementation manner, the network card upgrade method provided in the embodiment of the present application further includes:

[0012] The BMC receives the upgrade file, where the upgrade file includes a first descriptor;

[0013] The BMC obtains the second descriptor of each network card;

[0014] The BMC matches the first descriptor with the second descriptor of each network card to obtain a first network card;

[0015] The identifier of the first network card includes the target first identifier, or the identifier of the first network card is the target first identifier.

[0016] In specific implementation, the BMC uses the first descriptor in the upgrade file to match the second descriptor of each network card, and can automatically find the first network card that can use the upgrade file. The BMC can upgrade some or all of the first network cards.

[0017] In a possible implementation manner, in the network card upgrade method provided in the embodiment of the present application, the BMC establishes a mapping relationship between the first identifier and each network card, including:

[0018] The BMC obtains device information of each network card, where the device information includes a second identifier of the network card;

[0019] The BMC establishes a mapping relationship between the first identifier and the second identifier of each network card;

[0020] The second identifier is provided by each network card to the BMC, or the second identifier is provided by a basic input / output system (BIOS) to the BMC.

[0021] In specific implementation, the mapping relationship between the first identifier and the network card established by the BMC can implement the mapping relationship between the first identifier and the second identifier of the network card. The second identifier can be provided by the network card or provided by the BIOS. The BMC uses the first identifier to manage the network card upgrade and sends the upgrade file to the network card in combination with the first identifier, which has high processing efficiency.

[0022] In a possible implementation manner, in the network card upgrade method provided in the embodiment of the present application, the upgrade instruction carries the target second identifier of the target network card.

[0023] In specific implementation, the upgrade instruction carries the target second identifier of the target network card, and the upgrade instruction can indicate or reflect the situation of the network card that needs to be upgraded. The BMC can directly respond to the upgrade instruction and send the upgrade file to the target network card using the first identifier corresponding to the target second identifier.

[0024] In a possible implementation manner, the network card upgrade method provided in the embodiment of the present application further includes:

[0025] The BMC generates an alternative upgrade list based on the second identifier of the first network card, and provides the list to the display module for display. The upgrade instruction is triggered by a selection operation of a network card in the alternative upgrade list.

[0026] In specific implementation, after the BMC finds the first network card that can use the upgrade file, the BMC can use the second identifier of the first network card to generate an alternative upgrade list. The alternative upgrade list is provided to the display module, and the display module displays the alternative upgrade list. The information of the first network card in the alternative upgrade list displayed by the display module can have a corresponding relationship with the second identifier of the first network card. The operation of the user selecting a network card from the alternative upgrade list can indicate the second identifier of the selected network card.

[0027] In a possible implementation manner, the network card upgrade method provided in the embodiment of the present application, the BMC generates an upgrade candidate list based on the second identifier of the first network card, including:

[0028] The BMC generates a candidate upgrade list based on a mapping relationship between the second identifier of the network card and the network card entity identifier and the second identifier of the first network card, wherein the candidate upgrade list includes the network card entity identifier of the first network card.

[0029] In specific implementation, after the BMC finds the first network card that can use the upgrade file, the BMC can use the second identifier of the first network card to generate an alternative upgrade list, which includes the entity identifier of the network card. The alternative upgrade list is provided to the display module, and the display module displays the alternative upgrade list. The information of the first network card in the alternative upgrade list displayed by the display module can have a corresponding relationship with the second identifier of the first network card. The display module can display that the information of the first network card can be implemented as the network card entity identifier of the first network card. The user performs a network card selection operation based on the network card entity identifier and selects the network card that needs to be upgraded this time. The operation of selecting the network card can indicate the second identifier of the selected network card.

[0030] In a second aspect, an embodiment of the present application further provides an electronic device which may include a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the network card upgrade method provided in the first aspect or any possible implementation scheme of the first aspect.

[0031] In a third aspect, an embodiment of the present application further provides a network card upgrade device, the device comprising:

[0032] The determining unit is used to determine a network card connected to the baseboard management controller via a target bus, wherein the target bus is based on a high-speed serial computer expansion bus standard.

[0033] The processing unit is used to allocate a first identifier to each network card and establish a mapping relationship between the first identifier and each network card.

[0034] The sending unit is used to send the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship in response to the upgrade instruction, wherein the target first identifier represents the first identifier of the network card that needs to be upgraded.

[0035] In a possible implementation, the device further includes a matching unit. The matching unit is configured to:

[0036] receiving the upgrade file, wherein the upgrade file includes a first descriptor;

[0037] Get the second descriptor of each network card;

[0038] Matching the first descriptor with the second descriptor of each network card to obtain a first network card;

[0039] The identifier of the first network card includes the target first identifier, or the identifier of the first network card is the target first identifier.

[0040] In a possible implementation, in the operation of the processing unit establishing the mapping relationship between the first identifier and each network card, the following steps may be performed:

[0041] Acquire device information of each network card, wherein the device information includes a second identifier of the network card;

[0042] Establishing a mapping relationship between the first identifier and the second identifier of each network card;

[0043] The second identifier is provided by each network card to the BMC, or the second identifier is provided by a basic input / output system (BIOS) to the BMC.

[0044] In a possible implementation manner, the upgrade instruction carries the target second identifier of the target network card.

[0045] In a possible implementation manner, the processing unit is further configured to:

[0046] Based on the second identifier of the first network card, a candidate upgrade list is generated and provided to the display module for display, wherein the upgrade instruction is triggered by a selection operation of a network card in the candidate upgrade list.

[0047] In a possible implementation, the processing unit may perform the following steps in the operation of generating the candidate upgrade list based on the second identifier of the first network card:

[0048] Based on the mapping relationship between the second identifier of the network card and the network card entity identifier and the second identifier of the first network card, a candidate upgrade list is generated, wherein the candidate upgrade list includes the network card entity identifier of the first network card.

[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the network card upgrade method provided in the first aspect or any possible implementation method of the first aspect.

[0050] In a fifth aspect, the present application provides a computer program product. When the computer program product runs on a computer, the computer executes the steps of the network card upgrade method provided in the first aspect or any possible implementation method of the first aspect.

[0051] Other features and advantages of the present application will be described in the subsequent description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0053] Figure 1 A schematic diagram of a possible application scenario provided in an embodiment of the present application;

[0054] Figure 2 A flowchart of a network card upgrade method provided in an embodiment of the present application;

[0055] Figure 3 A schematic diagram of a mapping relationship provided in the embodiments of this book;

[0056] Figure 4 A schematic diagram of a mapping relationship provided in the embodiments of this book;

[0057] Figure 5 A schematic diagram of a mapping relationship provided in the embodiments of this book;

[0058] Figure 6 A schematic diagram of an alternative upgrade list provided in an embodiment of the present application;

[0059] Figure 7 A flowchart of a network card upgrade method provided in an embodiment of the present application;

[0060] Figure 8 A schematic diagram of the structure of a network card upgrade device provided in an embodiment of the present application;

[0061] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0062] Fig.10 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0064] It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. A and B are connected, which can represent two situations: A and B are directly connected and A and B are connected through C. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0065] Currently, more and more electronic devices are equipped with two or even more network cards. For example, a large number of network cards are installed in servers.

[0066] The firmware version of the network card needs to be upgraded so that the network card can support new functions. The common way to upgrade the network card is to run the upgrade software of the network card manufacturer. The network cards installed on the same electronic device may not be from the same manufacturer. Before running the upgrade software of a network card manufacturer, the network cards of other manufacturers need to be powered off. Before upgrading the network card of a certain manufacturer, the staff needs to power off the network cards of other manufacturers. There are many network cards in the server cluster. Powering off the network cards of other manufacturers will cost a lot of manpower and time costs, and the maintenance is difficult and the operation is cumbersome. There is an urgent need for a solution that can reduce the difficulty of network card upgrades and improve the upgrade efficiency.

[0067] It should be noted that the acquisition, storage, use, and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.

[0068] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0069] See also Figure 1 As shown, it is a schematic diagram of a possible application scenario applicable to the embodiment of the present application. The server may include a baseboard management controller (Baseboard Management Controller, BMC) 101 and a network card device 102 (hereinafter referred to as a network card). The number of network cards 102 can also be one or more, and the present application does not specifically limit the number of network cards 102. The network card upgrade method implemented in the present application can be applied to a terminal device, can also be applied to a server, and can also be executed interactively by a terminal device and a server. Specifically

[0070] See also Figure 2As shown, it is a flow chart of a network card upgrade method provided in an embodiment of the present application. The method can be applied to BMC, and the specific process is as follows:

[0071] S201, the BMC determines a network card connected to the BMC via a target bus, where the target bus is based on a high-speed serial computer expansion bus standard.

[0072] S202: The BMC allocates a first identifier to each network card.

[0073] S203: The BMC establishes a mapping relationship between the first identifier and each network card.

[0074] S204: In response to the upgrade instruction, the BMC sends the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship.

[0075] The target first identifier represents the first identifier of the network card that needs to be upgraded. In the embodiment of the present application, the BMC assigns the first identifier to the network card and establishes a mapping relationship between the network card and the first identifier. Using the mapping relationship between the first identifier and the network card, the target network card corresponding to the target first identifier is found, and the upgrade file is sent to the target network card to achieve the upgrade of the target network card. In such a design, there is no need to remove or power off the network cards other than the target network card, which reduces the difficulty of maintenance and improves the upgrade efficiency.

[0076] In a possible application scenario, the present application also provides an application programming interface (Application Programming Interface, API) that can support the network card upgrade method. In some application scenarios, the BMC can call the API interface or call the API in a script so that the BMC can execute any step in the network card upgrade method provided by the present application. In some examples, the API interface can be a Redfish interface, which is presented in the form of a URL and can be accessed through some script commands to implement network card device upgrades through scripts. The network card upgrade method provided by the present application is introduced below with BMC as the execution subject.

[0077] In step S201, the BMC may determine a network card to which the BMC is connected via a target bus, wherein the target bus is a bus compliant with Peripheral Component Interconnect Express (PCIe).

[0078] Based on the method provided in any of the above embodiments, in the operation of the BMC establishing the mapping relationship between the first identifier and each network card, the BMC may obtain device information of each network card, the device information including the second identifier of the network card, and establish the mapping relationship between the first identifier and the second identifier of each network card.

[0079] The second identifier may be provided to the BMC by a basic input / output system (BIOS); or, the second identifier may be provided to the BMC by each network card.

[0080] In a possible implementation manner, the second identifier may be provided by a Basic Input Output System (BIOS) to the BMC.

[0081] For network cards connected to the PCIE bus, the BIOS can scan and identify devices connected to the PCIE bus. The BIOS can identify the bus, device, and function (Bus, Device, Function, BDF) numbers of PCIE devices. The BDF number generally includes the bus number, device number, and function number. The bus number represents the number of the bus where the device is located, and is used to indicate which bus the device is connected to. The device number represents the number of the physical device connected to the bus, and is used to distinguish different devices on the same bus. The function number represents the number of the independent functional unit in the device, and is used to distinguish multiple different functions on a physical device. Please combine Figure 3 , BIOS can establish a mapping relationship between the network card entity (NIC) and BDF.

[0082] Optionally, the second identifier may be implemented as a BDF of a network card, or the second identifier may be implemented as a network card entity (NIC) identifier.

[0083] In some examples, the second identifier can be implemented as a BDF of the network card. The BIOS can provide the BDF information of each network card connected to the PCIE bus to the BMC. The BMC can determine the network card connected to the BMC through the PCIE bus based on the information provided by the BIOS. In the operation of the BMC establishing the mapping relationship between the first identifier and each network card, the BMC can allocate the first identifier to each network card, and establish a mapping relationship between the BDF of each network card and the allocated first identifier.

[0084] Optionally, the first identifier assigned by the BMC to each network card may be a terminal identifier (TID). When the BMC interacts with the network card, the TID may uniquely identify the network card.

[0085] In another possible implementation, the second identifier may be provided by each network card to the BMC. The BMC may interact with the hardware device through a platform level data mode (PLDM). PLDM is a communication protocol based on a standard data model that allows standardized data exchange between different hardware devices and management tools. The BMC may be based on a predefined set of message formats and protocols, so that the BMC can communicate and manage each network card in a standardized message format.

[0086] Optionally, the second identifier may be implemented as a BDF of a network card, or the second identifier may be implemented as a network card entity (NIC) identifier.

[0087] In some examples, the second identifier can be implemented as a BDF of a network card. The BMC can interact with each hardware device based on PLDM and obtain the BDF of each hardware device. The BMC can interact with each hardware device based on PLDM to obtain the device type of each hardware device. The BMC can determine a hardware device whose device type is a network card type as a network card device.

[0088] In some examples, the BMC may obtain the BDF of each network card or the device entity (NIC) identifier of the network card based on the PLDM protocol. Optionally, the first identifier assigned by the BMC to each network card may be a TID, and when the BMC interacts with the network card, the TID may uniquely characterize the network card. Optionally, after the BMC assigns the first identifier to the network card, the first identifier assigned by the BMC may be used to interact with the network card device based on the PLDM protocol.

[0089] Optional, such as Figure 4 As shown, the mapping relationship between the first identifier and the network card established by the BMC may be a mapping relationship between the first identifier and the BDF of the network card. Figure 5 The BMC is shown to establish a mapping relationship between the first identifier and the network card entity (NIC) identifier.

[0090] In another possible implementation, the second identifier may be implemented as a NIC of a network card. The BMC may obtain the BDF of each network card based on the PLDM protocol. The network card that obtains the BDF in this manner is recorded as a first-class network card. The BMC may assign a first identifier to each first-class network card. The BMC may record the mapping relationship as a first mapping relationship based on the mapping relationship between the BDF and the first identifier of the first-class network card for ease of introduction.

[0091] The BIOS may provide the mapping relationship between the network card entity (NIC) identifier and the BDF to the BMC for easy introduction, and the mapping relationship is recorded as the second mapping relationship. The BMC may also receive the second mapping relationship provided by the BIOS.

[0092] Usually BIOS can provide the BDF and NIC identifiers of all network cards, that is, the second mapping relationship includes the BDF and NIC identifiers of all network cards connected to the BMC bus. Of course, all network cards connected to the BMC bus include the aforementioned first-class network cards. The aforementioned first-class network cards can be a part of or all of all network cards connected to the BMC bus. In one possible scenario, all network cards connected to the BMC bus can support the PLDM protocol to interact with the BMC, then the aforementioned first-class network cards are also all network cards connected to the BMC bus. In another possible scenario, among all the network cards connected to the BMC bus, there is at least one network card that cannot support the PLDM protocol, then the aforementioned first-class network card is a part of all the network cards connected to the BMC bus.

[0093] The BMC may match the first mapping relationship with the second mapping relationship to determine a mapping relationship between the first identifier of the first type of network card and the NIC of each first type of network card.

[0094] In some examples, the BMC establishes a mapping relationship between the first identifier and each network card, which can be implemented as a mapping relationship between the first identifier of the first type of network card and the NIC of each first type of network card. In some examples, the BMC establishes a mapping relationship between the first identifier and each network card, which can be implemented as a mapping relationship between the first identifier of the first type of network card, the BDF and the NIC.

[0095] In such a design, the BMC can provide the NIC identifier of any first-class network card to the front-end display module for display based on the mapping relationship between the first identifier and each network card. The BMC can use the TID and PLDM protocol of the first-class network card to send a response upgrade file to the first-class network card.

[0096] Based on the method provided by any of the above embodiments, the BMC can manage each network card based on the mapping relationship between the first identifier of the network card and the network card. In response to the upgrade instruction, the BMC sends the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship. For example, the BMC can determine the situation of the network card corresponding to the target first identifier based on the mapping relationship, and send the upgrade file to the relevant network card based on the situation.

[0097] In one possible design, the mapping relationship between the first identifier and the network card can be implemented as a mapping relationship between the TID of the network card and the BDF of the network card. Based on the mapping relationship, the BMC can determine the BDF of the target network card corresponding to the target first identifier, and send the upgrade file to the target network card based on the BDF of the target network card.

[0098] In another possible design, the mapping relationship between the first identifier and the network card can be implemented as a mapping relationship between the TID of the network card and the network card entity (NIC) identifier. The BMC can determine the BDF of the target network card corresponding to the target first identifier based on the mapping relationship and the mapping relationship between the network card entity (NIC) identifier and the BDF, and send the upgrade file to the target network card based on the BDF of the target network card.

[0099] Based on the method provided by any of the above embodiments, the upgrade instruction may carry the second identifier of the target network card.

[0100] The BMC establishes a mapping relationship between the first identifier and the second identifier of each network card. In the operation of sending the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship in response to the upgrade instruction, the BMC can determine the first identifier corresponding to each target network card based on the mapping relationship between the first identifier and the second identifier of each network card and according to the second identifier of the target network card, so as to determine the network card that needs to be upgraded.

[0101] In some embodiments, the first identifier may be implemented as a TID. The BCM may send the upgrade file to the target network card based on the PLDM and the first identifier of the target network card. Exemplarily, when the BCM sends the upgrade file to the target network card, the upgrade file may be sent to the target network card via a PCIE bus.

[0102] In a possible design, based on the method provided in any of the above embodiments, among all the network cards connected to the BMC via PCIE (abbreviated as all network cards), the BMC can determine the network cards that can be upgraded according to the upgrade file.

[0103] The BCM may receive an upgrade file, wherein the upgrade file includes a first descriptor. The BMC obtains a second descriptor of each network card. The BMC matches the first descriptor with the second descriptor of each network card to obtain a first network card. The first network card includes the target network card, or the first network card is the target network card.

[0104] The upgrade file received by the BMC may also be called a firmware package file. The header information of the upgrade file may carry a first descriptor, which is an important basis for determining whether the network card can use the upgrade file for upgrade.

[0105] In the operation of the BMC obtaining the second descriptor of each network card, the BMC can query the second descriptor of each network card through a PLDM command, wherein the second descriptor can be implemented as a device identifier of the network card (QueryDeviceIdentifiers).

[0106] The BMC matches the second descriptor of each network card with the first descriptor of the upgrade file, and determines the network card corresponding to the second descriptor matching the first descriptor as the first network card. For example, if the second descriptor is completely consistent with the first descriptor, it can be reflected that the second descriptor matches the first descriptor.

[0107] Optionally, the first network card is the target network card included in step S204. In other words, the number of the first network cards can be one or more. When the number of the first network cards is multiple, the target network card can be a part of the first network cards, or the target network card can be all the first network cards. When the number of the first network cards is one, the first network card can be implemented as the target network card.

[0108] In some possible application scenarios, all network cards in the first network card determined by matching are used as target network cards. In such a design, the BMC determines the target network card that can be upgraded by matching the upgrade file with the network card, and sends the upgrade file to the target network card. In this process, the BMC can automatically upgrade the target network card.

[0109] In some other possible application scenarios, the user can select a part of the first network card for upgrading. The BMC generates an upgrade candidate list based on the second identifier of the first network card and provides it to the display module for display. The upgrade instruction is triggered by selecting the network card in the upgrade candidate list.

[0110] In some examples, the BMC generates an alternative upgrade list based on a mapping relationship between the second identifier of the first network card and the network card entity identifier and the second identifier of the first network card, wherein the alternative upgrade list includes the network card entity identifier of the first network card.

[0111] In a specific implementation, the BMC may generate an alternative upgrade list based on the second identifier of the first network card, wherein the second identifier may be implemented as the BDF of the network card. The BMC may determine the network card entity (NIC) identifier of the first network card based on the BDF of the network card and the network card entity (NIC) identifier, as well as the BDF of the first network card. The BMC may generate an alternative upgrade list based on the network card entity (NIC) identifier of the first network card. The BMC provides the alternative upgrade list to the display module for display, such as Figure 6 As shown, the user can see the network card entity (NIC) identification of the upgradeable network card through the display module, so that the user can select the network card to be upgraded from the candidate upgrade list.

[0112] The user selects a network card from the candidate upgrade list, which can trigger the generation of an upgrade instruction. The upgrade instruction can carry the second identifier of the selected network card, that is, the second identifier of the target network card. The BMC can determine the first identifier of the target network card based on the mapping relationship between the first identifier and the second identifier. The BMC can send an upgrade file to the target network card based on the first identifier of the target network card and PLDM.

[0113] Figure 7 An exemplary method for upgrading a network card is shown, which may be performed by a BMC. The method may include the following steps:

[0114] S701, the BMC determines a network card connected to the BMC via a target bus, wherein the target bus is based on a high-speed serial computer expansion bus standard.

[0115] In specific implementation, the network card is generally a PLDM device. In PLDM technology, the network card can interact with the BMC during initialization.

[0116] S702: The BMC allocates a first identifier to each network card.

[0117] During the initialization phase of the network card, when interacting with the BMC, the BMC may allocate a first identifier for each network card. Optionally, the first identifier may be implemented as a TID. During the interaction between the BMC and the network card based on the PLDM protocol, the TID serves as the unique identifier of the network card.

[0118] S703: The BMC establishes a mapping relationship between the first identifier and the second identifier of the network card.

[0119] In specific implementation, the second identifier of the network card can be implemented as the BDF of the network card. That is, the BMC can establish a first mapping relationship between the TID and the BDF. According to the first mapping relationship, the BMC can determine the BDF of the network card through the TID, or determine the TID of the network card through the BDF.

[0120] In a possible implementation, in the operation of the BMC establishing a mapping relationship between the first identifier and the second identifier of the network card, the BMC can obtain the BDF of the network card supporting the PLDM protocol through the PLDM protocol. The network card supporting the PLDM protocol is recorded as a first-class network card. The mapping relationship between the first identifier and the second identifier of the network card established by the BMC can be implemented as a mapping relationship between the first identifier and the second identifier of the first-class network card.

[0121] In some scenarios, the BIOS provides the BMC with a second mapping relationship between the BDF of the network card and the network card entity (NIC) identifier. According to the second mapping relationship, the BMC can determine the network card entity (NIC) identifier through the BDF, or the BMC can determine the BDF of the network card through the network card entity (NIC) identifier. The BMC can determine the NIC identifier corresponding to the first type of network card by using the second mapping relationship between the BDF and the NIC identifier of each network card provided by the BIOS. The aforementioned mapping relationship between the first identifier and the second identifier of the first type of network card can also include the NIC identifier corresponding to the first identifier of each first type of network card.

[0122] In this embodiment, the execution order of step S704 and step S705 can be that step S704 occurs before step S705, or that step S705 occurs before step S704. This embodiment of the present application does not make any specific limitation on this.

[0123] S704: The BMC obtains the second descriptor of each network card.

[0124] The BMC can interact with the network card based on the PLDM and obtain the firmware information of each first-class network card by means of commands. The firmware information of the network card includes the second descriptor of the network card.

[0125] S705, the BMC receives the upgrade file, the upgrade file includes a first descriptor

[0126] S706: The BMC matches the first descriptor with the second descriptor of each network card to obtain a first network card.

[0127] S707: The BMC generates a candidate upgrade list based on the mapping relationship between the second identifier of the network card and the network card entity identifier and the second identifier of the first network card, wherein the candidate upgrade list includes the network card entity identifier of the first network card.

[0128] S708: The BMC provides the candidate upgrade list to the display module for display.

[0129] S709, the BMC responds to the upgrade instruction and sends the upgrade file to the target network card corresponding to the first identifier based on the mapping relationship between the first identifier and the second identifier of the network card, wherein the upgrade instruction carries the second identifier of the target network card, and the upgrade instruction is triggered by the network card selection operation in the candidate upgrade list.

[0130] In specific implementation, the user can see the network card entity (NIC) identifier of the upgradeable network card through the display module, and the user can select the network card that needs to be upgraded. The selection operation can trigger the generation of an upgrade instruction, and the upgrade instruction can carry the BDF corresponding to the network card entity (NIC) identifier selected by the user. The network card selected by the user represents the target network card. The BMC can respond to the upgrade instruction and determine the TID of the target network card according to the first mapping relationship between the first identifier and the second identifier of the network card, and the second identifier of the target network card. In this way, the BMC can determine the TID of the network card that needs to be upgraded selected by the user.

[0131] Based on the TID of the target network card and the PLDM protocol, the BMC provides an upgrade file to the target network card so that the target network card is upgraded. In some examples, the first process of the BMC can determine the TID of the target network card and provide the TID of the target network card to the second process of the BMC. The second process of the BMC can be implemented as a PLDM process, which can interact with the network card based on the PLDM protocol. The second process of the BMC can send the upgrade file to the target network card according to the TID of the target network card.

[0132] Optionally, the BMC may update the network card version information of the target network card after the target network card is upgraded, so as to facilitate the management of the network card.

[0133] Based on the same inventive concept, the present application embodiment provides a network card upgrade device. Figure 8 As shown, it is a schematic diagram of the structure of a network card upgrade device, which may include:

[0134] The determining unit is used to determine a network card connected to the BMC via a target bus, wherein the target bus is based on a high-speed serial computer expansion bus standard.

[0135] The processing unit is used to allocate a first identifier to each network card and establish a mapping relationship between the first identifier and each network card.

[0136] The sending unit is used to send the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship in response to the upgrade instruction, wherein the target first identifier represents the first identifier of the network card that needs to be upgraded.

[0137] In a possible implementation, the device further includes a matching unit. The matching unit is configured to:

[0138] receiving the upgrade file, wherein the upgrade file includes a first descriptor;

[0139] Get the second descriptor of each network card;

[0140] Matching the first descriptor with the second descriptor of each network card to obtain a first network card;

[0141] The identifier of the first network card includes the target first identifier, or the identifier of the first network card is the target first identifier.

[0142] In a possible implementation, in the operation of the processing unit establishing the mapping relationship between the first identifier and each network card, the following steps may be performed:

[0143] Acquire device information of each network card, wherein the device information includes a second identifier of the network card;

[0144] Establishing a mapping relationship between the first identifier and the second identifier of each network card;

[0145] The second identifier is provided by each network card to the BMC, or the second identifier is provided by a basic input / output system (BIOS) to the BMC.

[0146] In a possible implementation manner, the upgrade instruction carries the target second identifier of the target network card.

[0147] In a possible implementation manner, the processing unit is further configured to:

[0148] Based on the second identifier of the first network card, a candidate upgrade list is generated and provided to the display module for display, wherein the upgrade instruction is triggered by a selection operation of a network card in the candidate upgrade list.

[0149] In a possible implementation, the processing unit may perform the following steps in the operation of generating the candidate upgrade list based on the second identifier of the first network card:

[0150] Based on the mapping relationship between the second identifier of the network card and the network card entity identifier and the second identifier of the first network card, a candidate upgrade list is generated, wherein the candidate upgrade list includes the network card entity identifier of the first network card.

[0151] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0152] Regarding the device in the above embodiment, the specific manner in which each unit executes the request has been described in detail in the embodiment of the method, and will not be elaborated here.

[0153] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0154] After introducing the network card upgrading method and device according to an exemplary embodiment of the present application, next, an electronic device according to an exemplary embodiment of the present application is introduced.

[0155] Fig. 9 is a block diagram of an electronic device 900 according to an exemplary embodiment, the device comprising:

[0156] Processor 910;

[0157] A memory 920 for storing instructions executable by the processor 910;

[0158] The processor 910 is configured to execute instructions to implement the steps in the network card upgrade method provided in any one of the aforementioned embodiments.

[0159] In an exemplary embodiment, a storage medium including an operation is also provided, for example, a memory 920 including an operation, and the above operation can be executed by the processor 910 of the electronic device 900 to complete the steps in the network card upgrade method provided in any of the above embodiments. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a portable compact disk read only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0160] Based on the same inventive concept, see Fig.10As shown, the embodiment of the present application further provides a terminal device 1000, which includes a display unit 1040, a processor 1080 and a memory 1020, wherein the display unit 1040 includes a display panel 1041, which is used to display information input by a user or information provided to a user and various operation interfaces of the terminal device 1000, etc., and in the embodiment of the present application, it is mainly used to display the operation interface, shortcut window, etc. of the application installed in the terminal device 1000. Optionally, the display panel 1041 can be configured in the form of LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0161] The processor 1080 is used to read the computer program and then execute the method defined by the computer program. For example, the processor 1080 reads the application, thereby running the application on the terminal device 1000 and displaying the operation interface on the display unit 1040. The processor 1080 may include one or more general-purpose processors and may also include one or more DSPs (Digital Signal Processors) to perform related operations to implement the technical solutions provided in the embodiments of the present application.

[0162] The memory 1020 generally includes internal memory and external memory, and the internal memory may be RAM, ROM, and cache (CACHE), etc. The external memory may be a hard disk, an optical disk, a USB disk, a floppy disk, or a tape drive, etc. The memory 1020 is used to store computer programs and other data, and the computer programs include applications, etc. Other data may include data generated after the operating system or application is run, and the data includes system data (such as configuration parameters of the operating system) and user data. In the embodiment of the present application, program instructions are stored in the memory 1020, and the processor 1080 executes the program instructions in the memory 1020 to implement the network card upgrade method discussed above.

[0163] In addition, the terminal device 1000 may also include a display unit 1040 for receiving input digital information, character information or contact touch operation / contactless gesture, and generating signal input related to user settings and function control of the terminal device 1000. Specifically, in the embodiment of the present application, the display unit 1040 may include a display panel 1041. The display panel 1041, for example, a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the display panel 1041 or on the display panel 1041 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the display panel 1041 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. In an embodiment of the present application, if a user selects a control in the operation interface, the touch detection device in the display panel 1041 detects the touch operation, and sends a signal corresponding to the detected touch operation to the touch controller. The touch controller converts the signal into touch point coordinates and sends them to the processor 1080. The processor 1080 determines the control selected by the user based on the received touch point coordinates.

[0164] The display panel 1041 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 1040, the terminal device 1000 may further include an input unit 1030, which may include but is not limited to one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick. Fig.10 In the figure, the input unit 1030 includes an image input device 1031 and other input devices 1032 as an example.

[0165] In addition to the above, the terminal device 1000 may also include a power supply 1090 for supplying power to other modules, an audio circuit 1060, a near field communication module 1070, and an RF circuit 1010. The terminal device 1000 may also include one or more sensors 1050, such as an accelerometer, a light sensor, a pressure sensor, etc. The audio circuit 1060 specifically includes a speaker 1061 and a microphone 1062, etc. For example, the user can use voice control, the terminal device 1000 can collect the user's voice through the microphone 1062, can be controlled by the user's voice, and when the user needs to be prompted, the corresponding prompt tone is played through the speaker 1061.

[0166] Based on the same inventive concept, the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the network card upgrade method provided in various optional implementations in the above embodiments.

[0167] In some possible implementations, various aspects of the network card upgrade method provided in the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on a computer device, the computer program is used to enable the computer device to execute the steps of the network card upgrade method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the following steps: Figure 2 or Figure 7 Follow the steps shown in .

[0168] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0169] The program product of the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with a command execution system, device or device.

[0170] The readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in combination with a command execution system, device, or device. Although the preferred embodiments of the present application have been described, once the basic creative concept is known to those skilled in the art, additional changes and modifications may be made to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0171] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A network card upgrade method, characterized in that: Applied to a baseboard management controller BMC, the method comprises: The BMC determines a network card connected to the BMC via a target bus, wherein the target bus is based on a high-speed serial computer expansion bus standard; The BMC assigns a first identifier to each network card; The BMC establishes a mapping relationship between the first identifier and each network card; The BMC responds to the upgrade instruction and sends the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship, where the target first identifier represents the first identifier of the network card that needs to be upgraded.

2. The method according to claim 1, characterized in that The method further comprises: The BMC receives the upgrade file, where the upgrade file includes a first descriptor; The BMC obtains the second descriptor of each network card; The BMC matches the first descriptor with the second descriptor of each network card to obtain a first network card; The identifier of the first network card includes the target first identifier, or the identifier of the first network card is the target first identifier.

3. The method according to claim 1 or 2, characterized in that The BMC establishes a mapping relationship between the first identifier and each network card, including: The BMC obtains device information of each network card, where the device information includes a second identifier of the network card; The BMC establishes a mapping relationship between the first identifier and the second identifier of each network card; The second identifier is provided by each network card to the BMC, or the second identifier is provided by a basic input / output system (BIOS) to the BMC.

4. The method according to claim 3, characterized in that The upgrade instruction carries the target second identifier of the target network card.

5. The method according to claim 4, characterized in that The method further comprises: The BMC generates an alternative upgrade list based on the second identifier of the first network card, and provides the list to the display module for display. The upgrade instruction is triggered by a selection operation of a network card in the alternative upgrade list.

6. The method according to claim 5, characterized in that The BMC generates a candidate upgrade list based on the second identifier of the first network card, including: The BMC generates a candidate upgrade list based on a mapping relationship between the second identifier of the network card and the network card entity identifier and the second identifier of the first network card, wherein the candidate upgrade list includes the network card entity identifier of the first network card.

7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 6.

8. A network card upgrade device, characterized in that: The device comprises: A determination unit, used to determine a network card connected to the baseboard management controller via a target bus, wherein the target bus is based on a high-speed serial computer expansion bus standard; A processing unit, used to allocate a first identifier to each network card, and establish a mapping relationship between the first identifier and each network card; The sending unit is used to send the upgrade file to the target network card corresponding to the target first identifier based on the mapping relationship in response to the upgrade instruction, wherein the target first identifier represents the first identifier of the network card that needs to be upgraded.

9. A computer-readable storage medium, characterized in that: It includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any method described in claims 1 to 6.

10. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.