Method for managing matching of device identifiers and device
By constructing a dynamic mapping table and an intelligent matching mechanism, the problem of PCIe device EID mapping failure in traditional BMC management is solved, realizing automatic device identification and cross-vendor compatibility, and improving the automation level of management and system stability.
Patent Information
- Application Number
- CN202511544026.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-10-27
AI Technical Summary
In the traditional BMC static management mode, PCIe device EID management suffers from problems such as mapping failure due to device replacement or restart, poor compatibility, and high maintenance costs. It is especially difficult to achieve automatic identification and dynamic adaptation in heterogeneous server environments.
By constructing a target dynamic mapping table, based on the media access control address and peripheral component interconnection bus topology information, the device context association is dynamically registered, and the mapping is updated using a lock-independent hash table and version number marking mechanism, thereby achieving intelligent matching and autonomous repair of device identifiers.
It improves the automation, reliability, and cross-vendor compatibility of PCIe device EID management, reduces operation and maintenance complexity and labor costs, and ensures the accuracy of device identification and system stability.
Smart Images

Figure CN121029497B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of servers, and in particular to a device identifier matching management method and device. BACKGROUND
[0002] In a traditional server system, the EID (Equipment Identifier) management of a PCIe (Peripheral Component Interconnect Express) device by a BMC (Baseboard Management Controller) is usually in a static configuration mode, which requires an administrator to manually maintain the mapping relationship between the EID and the physical device after the device is accessed or replaced. However, when the EID assigned by the protocol layer changes due to device restart or hot plugging, the static configuration cannot be dynamically adapted, which easily causes device recognition failure, monitoring data loss and other problems, significantly increasing the operation and maintenance complexity and labor cost.
[0003] In addition, due to the lack of unified standards in the EID generation mechanism of PCIe devices from different manufacturers, and the lack of real-time sensing capability of the BMC for the devices, it is difficult to automatically identify and update the mapping relationship after the device is hot plugged or restarted, which increases the configuration complexity and error probability, and needs to be solved urgently. SUMMARY
[0004] The present application provides a device identifier matching management method and device to solve the problems of EID mapping failure, poor compatibility and high maintenance cost caused by device replacement or restart in the traditional BMC static management mode, and significantly improves the automation degree, reliability and cross-manufacturer compatibility of PCIe device EID management through dynamic sensing, intelligent mapping and self-repairing mechanisms.
[0005] To achieve the above-mentioned purpose, the first aspect embodiment of the present application provides a device identifier matching management method, comprising the following steps:
[0006] A target dynamic mapping table is constructed based on a preset table structure, and a media access control address, attribute information and peripheral component interconnect bus topology information of a target access peripheral device are obtained;
[0007] Based on the media access control address and the peripheral component interconnect bus topology information, a context association relationship corresponding to the target access peripheral device is registered in the target dynamic mapping table, and after the target access peripheral device is initialized, an actual device identifier of the target access peripheral device is obtained;
[0008] determine a mapping relationship between a temporary device identifier of the target access peripheral device and the actual device identifier according to the attribute information, and update the context association relationship corresponding to the target access peripheral device by using the mapping relationship;
[0009] The target dynamic mapping table adopts a lock-independent hash table structure to store the association relationship between the device identifier and the device context, and performs atomic update of the target dynamic mapping table based on a preset version number marking mechanism.
[0010] According to the device identifier matching management method provided in the embodiments of the present application, a target dynamic mapping table is constructed, the context association relationship corresponding to the target access peripheral device is registered in the target dynamic mapping table based on the media access control address of the target access peripheral device and the peripheral component interconnect bus topology information, and the actual device identifier of the target access peripheral device is obtained after the target access peripheral device is initialized. A mapping relationship between a temporary device identifier and the actual device identifier is determined according to attribute information, and the context association relationship corresponding to the target access peripheral device is updated by using the mapping relationship. Thus, the problem of EID mapping failure, poor compatibility and high maintenance cost caused by device replacement or restart in the traditional BMC static management mode is solved, and the automation degree, reliability and cross-vendor compatibility of PCIe device EID management are significantly improved through a dynamic perception, intelligent mapping and self-repair mechanism.
[0011] To achieve the above object, a device identifier matching management device is provided in the second aspect of the present application, which comprises:
[0012] A construction and acquisition module is configured to construct a target dynamic mapping table based on a preset table structure, and acquire the media access control address, attribute information and peripheral component interconnect bus topology information of a target access peripheral device.
[0013] A registration module is configured to register the context association relationship corresponding to the target access peripheral device in the target dynamic mapping table based on the media access control address and the peripheral component interconnect bus topology information, and acquire the actual device identifier of the target access peripheral device after the target access peripheral device is initialized.
[0014] An update module is configured to determine a mapping relationship between a temporary device identifier of the target access peripheral device and the actual device identifier according to the attribute information, and update the context association relationship corresponding to the target access peripheral device by using the mapping relationship.
[0015] The target dynamic mapping table adopts a lock-independent hash table structure to store the association relationship between the device identifier and the device context, and performs atomic update of the target dynamic mapping table based on a preset version number marking mechanism.
[0016] According to the device identifier matching management apparatus provided by the embodiments of the present application, a target dynamic mapping table is constructed, the context association relationship corresponding to the target access peripheral device is registered in the target dynamic mapping table based on the media access control address of the target access peripheral device and the peripheral component interconnect bus topology information, and the actual device identifier of the target access peripheral device is obtained after the target access peripheral device is initialized. The mapping relationship between the temporary device identifier and the actual device identifier is determined according to the attribute information, and the context association relationship corresponding to the target access peripheral device is updated by using the mapping relationship. Thus, the problem that the EID mapping is invalid, the compatibility is poor, and the maintenance cost is high due to device replacement or restart in the traditional BMC static management mode is solved, and the automation degree, the reliability, and the cross-vendor compatibility of the PCIe device EID management are significantly improved through the dynamic perception, intelligent mapping, and self-repairing mechanism.
[0017] To achieve the above object, the third aspect of the present application provides an electronic device, comprising: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the device identifier matching management method as described in the above embodiments.
[0018] To achieve the above object, the fourth aspect of the present application provides a non-volatile computer readable storage medium, which stores a computer program, wherein the program is executed by a processor to implement the device identifier matching management method as described in the above embodiments.
[0019] To achieve the above object, the fifth aspect of the present application provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the device identifier matching management method as described in the above embodiments.
[0020] Additional aspects and advantages of the present application will be made apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0022] Figure 1 A flowchart of a device identifier matching management method according to an embodiment of the present application is provided.
[0023] Figure 2A flow chart of a device identifier matching management method according to an embodiment of the present application;
[0024] Figure 3 A block diagram of a device identifier matching management apparatus according to an embodiment of the present application;
[0025] Figure 4 A structural diagram of an electronic device according to an embodiment of the present application.
[0026] The reference signs: 10, device identifier matching management apparatus, 100, construction and acquisition module, 200, registration module, 300, update module; 401, memory, 402, processor, 403, communication interface. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
[0028] It should be noted that, in the description of the present application, the terms “include”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0029] As can be appreciated by those skilled in the art, PCIe is a computer bus standard for connecting various devices and components (such as graphics cards, storage devices, expansion cards, etc.) within a computer. BMC (Baseboard Management Controller) is a separate microcontroller embedded in the mainboard of a server, providing out-of-band management functions, and can remotely monitor / control hardware status (such as power supply, temperature, firmware) even if the host system is down. EID (Equipment Identifier) is the unique identity code of PCIe devices, used to accurately identify hardware (such as serial number, manufacturer information), and to achieve automatic discovery, topology matching and security policy binding in BMC management.
[0030] In a traditional server system, the baseboard management controller generally adopts a static configuration mode for the device identifier of a PCIe device, such as an HBA (Host Bus Adapter) card, a RAID (Redundant Array of Independent Disks Adapter) card, and the like. This mode has three significant defects: first, the configuration maintenance cost is high, and the device identifier mapping relationship needs to be manually updated after hardware replacement or system restart. When the device restarts, the device identifier allocated by the PCIe device at the protocol layer may change probabilistically, which may cause the EID to fail to match the PCIE device information, resulting in problems such as failure of device temperature monitoring reading; second, the compatibility is poor, and different manufacturers' devices have differences in the device identifier generation logic. The static configuration is difficult to adapt to diversified implementation mechanisms, and is prone to recognition errors; and third, the scalability is limited, and it cannot effectively support the dynamic access and recognition requirements of devices in a large-scale heterogeneous server environment.
[0031] Therefore, the prior art solution cannot fundamentally solve the dynamic adaptation problem between the baseboard management controller and the device, and there is a technical risk (such as fixed EID at the driver layer) caused by manufacturer lock-in.
[0032] Specifically, the existing solution faces the following key problems at the device identifier management level: the device identifier generation logic presents a fragmented feature, and different manufacturers' BMC and PCIe devices (such as GPU, NVMe card) adopt different EID generation rules (such as based on MAC address, serial number, hardware coding combination), which makes it impossible to automatically identify cross-platform devices.
[0033] At the same time, the static configuration mode of the device identifier is inconsistent with the demand for dynamic identifier in the cloud environment and virtualization scenario. Hardware manufacturers usually require the EID to be fixed and unchanged during the device life cycle, but the cloud environment or virtualization scenario needs to dynamically generate EID (such as based on instance ID), and the static configuration is difficult to adapt.
[0034] In addition, the device discovery and registration mechanism has obvious defects, which are manifested in the insufficient real-time discovery capability for hot-plug devices. The real-time discovery capability of the BMC for the PCIe device is limited, and the BMC cannot automatically detect the added / removed device and update the EID mapping table, and relies on manual intervention or restart of the service. In addition, the acquisition of part of the device information needs to rely on a specific driver (such as a proprietary closed-source driver) to expose the device information (including EID), which makes the operating system or BMC unable to directly parse the general protocol (such as PCIe BAR address), further limiting the flexibility and automation degree of management.
[0035] Based on the technical problems existing in the above related technologies, the present application proposes a BMC and PCIe device EID matching method based on dynamic perception, which solves the problems of low PCIe device EID matching efficiency and poor fault tolerance in the traditional BMC static management mode through dynamic perception, intelligent mapping and autonomous repair mechanism.
[0036] The matching management method of the device identifier proposed in the present application is introduced below.
[0037] In order to enable those skilled in the art to better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0038] Specifically, Figure 1 is a flowchart of the matching management method of the device identifier according to an embodiment of the present application.
[0039] As Figure 1 shown, the matching management method of the device identifier includes the following steps:
[0040] In step S101, a target dynamic mapping table is constructed based on a preset table structure, and the media access control address, attribute information and peripheral component interconnect bus topology information of the target access peripheral device are obtained.
[0041] Specifically, the target dynamic mapping table is a data structure maintained in the baseboard management controller (BMC), which is used to store the association relationship between the device identifier (EID) and the device context. The mapping table adopts a dynamic updating mechanism to support the hot plug and state change of the device, and can adopt a lock-free hash table (Lock-free Hash Table) structure to store the EID and BMC instance mapping, support concurrent reading and writing, and avoid system blocking in the matching process. The construction of the mapping table in the present application includes initializing its storage structure, defining the key-value pair relationship (such as the mapping of EID and device context object), and realizing the atomic updating of the mapping table through the versioning mechanism.
[0042] Further, the media access control address is a unique link layer identifier of the network device, which can be used to generate a temporary device identifier in the device initialization phase, especially as a transitional identifier when the device has not reported its real EID. The peripheral component interconnect bus topology describes the logical position of the device in the PCIe bus structure, usually in the form of bus / device / function number (BDF), and forms a complete topology path in combination with upstream port information (such as switch port ID). In the device access phase, i.e. in the case of insertion of the target access peripheral device, the baseboard management controller reads the media access control address through the system management bus or the directly mapped PCIe configuration space register. In addition, the bus-device-function number of the device can also be read by the baseboard management controller, and the peripheral component interconnect bus topology information can be obtained in combination with the upstream switch port information.
[0043] Further, in some embodiments, the attribute information of the target access peripheral device is obtained, including: collecting the device identifier, the vendor identifier and the hardware version information of the target access peripheral device by a multi-protocol probe built in the baseboard management controller; generating a device fingerprint based on the device identifier, the vendor identifier and the hardware version information, and taking the device fingerprint as the attribute information of the target access peripheral device.
[0044] Specifically, the embodiments of the present application can collect the device identifier (EID), the vendor identifier (Vendor ID) and the hardware version information (Revision) of the PCIe device in real time through the multi-protocol probe built in the baseboard management controller, such as SNMP (Simple Network Management Protocol), or IPMI (Intelligent Platform Management Interface), or MLM (Management LAN Module, network management module on BMC), so as to establish a dynamic recognition mechanism based on the device fingerprint (combination of vendor identifier, hardware version information and device identifier).
[0045] Exemplarily, the embodiment of the present application can obtain the original EID of the PCIe device by the baseboard management controller using the IPMI command Get DeviceInformation. In addition, for the device of the host bus adapter type, the private EID field of the FCoE / iSCSI protocol layer can be additionally parsed. The vendor identification and the device class (Device Class) such as “Network controller”, “Storage controller” or “Graphics controller” can also be obtained by the lspci- nn command. In addition, the physical slot position information can also be obtained by parsing the system kernel log dmesg | grep -i pci.
[0046] Further, by combining the vendor identification, the device class and the device attribute of the physical slot position information, a unique context association is established.
[0047] It should be noted that the embodiment of the present application realizes the acquisition of multi-source heterogeneous EID. The original EID is extracted from the configuration space (such as Vendor-Specific Capability) of the PCIe device, the electrically erasable programmable read-only memory EEPROM (such as the VPD (Vital Product Data) area) or the custom register of the manufacturer, which is compatible with the storage location difference of different manufacturers. Various EID formats such as EUI-64, MAC address derived identification and hash digest are supported, and are converted into a unified format through a parsing rule library (such as a regular expression or a bit field mapping).
[0048] According to the above technical means, by combining the vendor, the physical position, the hardware version and other multi-dimensional information, a device fingerprint with higher distinguishability can be constructed, and the accuracy of device identification and the compatibility of different manufacturers and different models of devices are improved.
[0049] In step S102, based on the media access control address and the peripheral component interconnect bus topology information, a context association relationship corresponding to the target access peripheral device is registered in the target dynamic mapping table, and after the target access peripheral device is initialized, an actual device identifier of the target access peripheral device is obtained.
[0050] Further, in some embodiments, based on the media access control address and the peripheral component interconnect bus topology information, the context association relationship corresponding to the target access peripheral device is registered in the target dynamic mapping table, including: generating a temporary device identifier according to the media access control address and the peripheral component interconnect bus topology information; and registering the temporary device identifier and the context association relationship of the target access peripheral device in the target dynamic mapping table.
[0051] Optionally, the target dynamic mapping table of the embodiments of the present application can be designed as a hash table-based dynamic mapping table EID-DeviceContext, which supports generating a temporary EID through a MAC address + PCI Bus topology when a new device is inserted, and subsequently binding with a real EID, and using a timestamp and a device unique identifier for conflict detection to solve the EID duplication problem.
[0052] Specifically, first, a temporary device identifier is generated according to a media access control address and peripheral component interconnect bus topology information. The MAC address is a globally unique identifier at the data link layer, providing the identity characteristics of the device at the network layer; and the PCIe bus topology accurately describes the logical position of the device in the system hardware interconnection structure through the BDF number (bus number, device number, function number) of the device and its port path in the upstream switch or root complex. The two types of information are combined and derived through a specific algorithm (for example, the hash value is calculated after splicing, or the predefined structured coding rule is followed), thereby generating a device identifier in the current system environment. The temporary EID ensures the addressability of the device in the management system during the initialization transition period.
[0053] Further, the registration of the temporary device identifier and the context association relationship of the target access peripheral device in the target dynamic mapping table is performed. The context association relationship is a logical data structure containing the current known state information of the device, which can include the original MAC address and PCIe topology path according to which the temporary EID is generated, the vendor identification of the device, the device category, the physical slot position, and other key attributes. The embodiments of the present application can write or update the temporary EID as the primary key and the context association relationship as the corresponding value into the target dynamic mapping table. This registration action essentially completes the preliminary logical filing of the new device in the management system, establishes a mapping link from the temporary identifier to the preliminary context of the device, lays a foundation for subsequent device discovery, monitoring, and final binding with the real EID, and realizes the seamless connection of the device from physical access to logical management.
[0054] Therefore, by generating a temporary EID through a MAC address and bus topology and registering it, a unique and traceable temporary identity is provided for a device that is target access but has not reported a real EID, ensuring that the device can be recognized and managed by the system during the initialization phase, and realizing the seamless connection of the management process.
[0055] Further, in some embodiments, after the target access peripheral device completes initialization, further comprising: reporting the actual device identifier of the target access peripheral device to the baseboard management controller based on a preset communication protocol; wherein the key fields of the preset communication protocol include event type, timestamp, device model, and the actual device identifier of the target access peripheral device.
[0056] Specifically, the preset communication protocol of the embodiments of the present application can be a lightweight communication protocol (such as BMC-DeviceSync v1.0), which supports active reporting of EID change events by devices.
[0057] In detail, as an active reporting party, the device side constructs a data frame conforming to the protocol specification, and sends the notification message to the BMC through a predetermined in-band or out-of-band communication channel (for example, using the OEM custom command of IPMI, or through the standard interface based on PLDM for PCIe), and reports the actual device identifier of the target access peripheral device.
[0058] Optionally, the key field examples of the embodiments of the present application can be:
[0059] json
[0060] {
[0061] "type": "EID_UPDATE",
[0062] "timestamp": 1672531200,
[0063] "device_id": "0x3B9ACA00",
[0064] "new_eid": "0x1234567890AB"
[0065] }
[0066] Wherein, type is the event type, timestamp is the timestamp, device_id is the device model, and new_eid is the actual device identifier of the target access peripheral device.
[0067] According to the above technical means, a standardized communication protocol for active reporting of real EID by devices is defined, and a bidirectional information synchronization channel between the device and the BMC is established, so that the update of EID information is more timely and accurate, the overhead of BMC polling is reduced, and the matching delay or error caused by information asynchronization is reduced.
[0068] In step S103, the mapping relationship between the temporary device identifier and the actual device identifier of the target access peripheral device is determined according to the attribute information, so as to update the context association relationship corresponding to the target access peripheral device by using the mapping relationship.
[0069] Specifically, after the target access peripheral device completes initialization and reports its actual device identifier (EID), the mapping relationship between the temporary device identifier and the actual device identifier is determined according to the attribute information. By comparing the device attribute of the reported real EID with the initial context record indexed by the temporary EID in the target dynamic mapping table, multi-dimensional consistency verification is performed. For example, it is verified whether the Vendor ID and the physical slot position of the reported device match the corresponding attributes recorded when the temporary EID is generated, so as to ensure that the mapping relationship to be established is accurate and correct, and effectively prevent mapping confusion caused by device identification error or conflict.
[0070] After the mapping relationship is successfully verified and confirmed, the context association relationship corresponding to the target access peripheral device is updated by using the mapping relationship, and the complete context record of the device is located in the target dynamic mapping table (usually a lock-independent hash table optimized for high concurrency access) with the temporary EID as the key. Then, the temporary EID field in the record is replaced with the real EID, and all other management attributes (such as power consumption policy, temperature monitoring threshold, firmware version information, etc.) bound with the real EID are also updated or confirmed. In addition, the atomicity of the update is ensured by the version number marking mechanism, and the consistency of the mapping table state in the concurrent environment is ensured.
[0071] Finally, according to the updated context association relationship of the target access peripheral device, subsequent device management can be performed. According to the device model and category recorded in the context, the corresponding health monitoring policy (such as setting specific temperature and power consumption sensor alarm thresholds) can be loaded; specific compliance checks can be performed according to the supplier information; and the device can be bound with a logical unit (LUN) in network storage or a specific virtualization function policy based on the unique real EID.
[0072] Further, in some embodiments, the device identifier matching management method further comprises: based on a preset verification period, verifying the matching result of the real identifier of at least one registered peripheral device in the target dynamic mapping table; based on the matching result, screening out a target peripheral device whose matching failure number reaches a preset number, and generating alarm information of the target peripheral device, and sending the alarm information to a preset information technology service management system; wherein the alarm information includes at least one of the device serial number and the historical device identifier record of the target peripheral device.
[0073] The preset check period is configured by balancing the monitoring real-time performance and system overhead, for example, configured to be performed once every 5 minutes.
[0074] Specifically, to ensure the continuous reliability and state consistency of the peripheral device management in the system, the embodiment of the application proposes a periodic health check mechanism. Based on the preset check period, the matching result of the real identifier (EID) of at least one peripheral device registered in the target dynamic mapping table is checked. Initiated by the baseboard management controller (BMC), a state query request (for example, using the IPMI or PLDM standard command) is sent to the target device, and it is compared whether the current EID in the device response is consistent with the EID recorded in the dynamic mapping table. The matching result directly reflects the validity of the device identifier binding, and the matching failure may be caused by device failure, abnormal reset, firmware update, or unauthorized hardware replacement.
[0075] After obtaining the matching result of the batch check, based on the matching result, a filtering logic is executed, which identifies the target peripheral device whose matching failure times have reached a preset number of times. The preset number of times threshold (for example, 3 consecutive check failures) can effectively filter the occasional and single matching failure caused by transient communication interference or signal jitter, so as to accurately capture persistent abnormalities, reduce false positives, and improve the effectiveness of the alarm.
[0076] When the device is screened and determined as the target peripheral device, alarm information of the target peripheral device is generated, including at least one of the device serial number of the target peripheral device and the historical device identifier record. The device serial number is the unique identity that cannot be changed in the life cycle of the device, and is the key basis for the operation and maintenance personnel to accurately locate the physical hardware. The historical device identifier record can include the EID (including the temporary EID and the real EID at each time point) recorded in the dynamic mapping table and the corresponding time stamp.
[0077] For example, the health check period is set (default 5 minutes), if EID mismatch is detected for 3 consecutive times, the device is marked as an abnormal state, and an alarm (including device serial number, historical EID record) is sent to the ITSM (Information Technology Service Management) system, and automatically rolled back to the last valid mapping configuration.
[0078] Through the above technical means, the periodic check mechanism and alarm strategy are introduced, which can actively discover and report the matching abnormal device, so that the administrator can timely master the device health status, effectively improve the observability and operation and maintenance efficiency of the system, and reduce the business risk caused by the device disconnection.
[0079] Further, in some embodiments, after sending the alarm information to the preset information technology service management system, further comprising: based on the target dynamic mapping table, calling the context association relationship when the target peripheral device last matched successfully; rolling back the current device identifier of the target peripheral device to the actual device identifier in the context association relationship when the target peripheral device last matched successfully.
[0080] Specifically, based on the target dynamic mapping table, the context association relationship when the target peripheral device last matched successfully is called. The target dynamic mapping table, as a versioned or history-keeping data structure, not only stores the current latest state of the device, but also retains the historical state snapshot or at least records the key information of the last stable state. By querying the mapping table, the complete context association relationship corresponding to the target device when it was last successfully verified and in a stable working state before the exception occurred can be accurately located and retrieved. This context association relationship is a comprehensive data structure that usually includes the effective actual device identifier (EID), the logical topology path (BDF number) of the device, the physical slot position, the vendor identifier, the device serial number, and other important management attributes.
[0081] Further, the current device identifier of the target peripheral device is rolled back to the actual device identifier in the context association relationship when the target peripheral device last matched successfully. That is, the verified and stable actual device identifier in the retrieved historical context association relationship is used to overwrite or replace the device identifier that has occurred an exception or has failed, which is currently recorded in the target dynamic mapping table.
[0082] According to the above technical means, when the device appears an exception or the firmware upgrade fails, it can quickly recover to the last stable state, greatly enhancing the fault tolerance and service continuity of the system, achieving self-healing of the fault, and reducing the dependence on manual intervention.
[0083] Taking the application scenario of financial data center disaster recovery switching as an example, when the main HBA card in the data center server is physically replaced with a new HBA card due to hardware failure, the new HBA card generates a temporary device identifier 0xTEMP_EID_123 after restarting. The dynamic perception engine in the baseboard management controller detects the existence of the new device in real time, and obtains the vendor identifier (Vendor ID) = 0x10DE and the device class (Device Class) = Network controller by analyzing its PCIe configuration space. Based on these attributes, the BMC can intelligently match it with the predefined business policy and automatically associate it to the storage array worldwide name (WWN) mapping table corresponding to the original main HBA card of the server.
[0084] When the new HBA card completes its full startup and self-checking process, it actively reports its actual device identifier 0xABCDEF1234 to the BMC it manages through an SNMP Trap message. After receiving this reporting information, the BMC triggers its adaptive mapping algorithm to complete the update of the device entry in the target dynamic mapping table in a very short time (for example, within 10 seconds). This fast and accurate mapping update enables the upper-layer operating system or volume management software to almost automatically remount the corresponding iSCSI storage volume without awareness, thereby quickly restoring the access capability to critical data and greatly shortening the business interruption time during disaster recovery switching or hardware maintenance, ensuring the stringent requirements of financial business continuity.
[0085] Further, in some embodiments, after obtaining the actual device identifier of the target access peripheral device, further comprising: judging whether the actual device identifier satisfies a preset unique condition; if the actual device identifier does not satisfy the preset unique condition, obtaining physical slot position information and a logical topology path of the target access peripheral device to generate a composite key according to the physical slot position information and the logical topology path; and binding the composite key with a device management instance of the baseboard management controller.
[0086] Specifically, after obtaining the actual device identifier (EID) of the target access peripheral device, in order to ensure the absolute uniqueness of the identifier in the global scope of the management system, thereby avoiding device management confusion or policy application errors caused by identifier conflicts, a topology-aware uniqueness check is performed. First, the uniqueness of the just-obtained actual device identifier is judged, and the EID is taken as a key value to search and compare in the target dynamic mapping table and the current known device registration information, to confirm whether there is another registered device holding the same EID. This situation may occur in some specific scenarios, for example, batch-deployed devices of the same model and batch may have duplicate firmware identifiers due to manufacturer programming errors.
[0087] If the judgment result is that the actual device identifier is not unique, that is, an EID conflict is detected, the conflict resolution algorithm is automatically activated. At this time, a composite key is generated according to the physical slot position information and the logical topology path of the target access peripheral device. The physical slot position information is obtained by the BMC reading the number (for example, Slot_2A) in the FRU (field replaceable unit) Inventory corresponding to the slot or the physical position code recorded by the CPLD (complex programmable logic device), which represents the unchangeable physical coordinates of the device in the chassis.
[0088] Meanwhile, the logical topology path is constructed by combining the BDF number (bus number, device number, function number, such as 01:00.0) of the device and its port ID (such as Upstream Port 5) in the upstream PCIe switch, which accurately describes the logical connection relationship of the device in the system bus level. By reading the slot number (such as Slot_2A) in the FRU Inventory or the physical location code recorded by the CPLD through the BMC, and double-checking with the logical topology, when the EID is repeated, the physical slot is preferred, and the composite key (its format is EID:XX-XX+Slot_2A+BDF_01:00.0, for example) is generated by combining the logical topology, solving the industry problem of EID conflict of the same type of device, and improving the identification reliability.
[0089] Therefore, when the device with EID repetition appears in the system, a globally unique identifier can be generated by combining the physical location and the logical path, which fundamentally solves the identification conflict problem caused by the same EID of the same type of device, and ensures the accuracy of device management and the stability of the system.
[0090] Further, in some embodiments, the matching management method of the device identifier further includes: judging whether the target access peripheral device is a device satisfying a preset security condition; if the target access peripheral device is a device satisfying the preset security condition, performing asymmetric encryption signature on the target access peripheral device to generate signed device identification data; and performing legality verification on the device identification data by the baseboard management controller through a preset public key.
[0091] Specifically, first, it is judged whether the target access peripheral device is a device satisfying a preset security condition, i.e., the device belongs to a critical device category, such as a security acceleration card, a trusted platform module (TPM), a hardware security module (HSM), or other PCIe devices that process sensitive data or perform security functions. By reading the vendor identification (Vendor ID), device identification (Device ID), device class (Device Class), and possible specific capability identification (Capability ID) of the device, and matching with a predefined critical device security list, a judgment is made.
[0092] If the result of the judgment is that the target access peripheral device is a device that meets the preset security condition, the target access peripheral device is subjected to asymmetric encryption signature to generate signed device identification data. The device combines its core identity information, including the actual device identifier (EID), together with a random number (Nonce) or a timestamp that is resistant to replay attacks, into a data block to be signed. The data block is subjected to a digital signature operation (for example, using the RSA-PSS or ECDSA algorithm) using a private key that is preset on the device side and is strictly protected, and a set of signed device identification data is finally generated.
[0093] Further, the device identification data is verified for legitimacy by the baseboard management controller using a preset public key. The BMC, as the management side, holds a preset public key corresponding to the private key of the device side. The public key has been burned in at the factory of the BMC or imported into a protected key storage area by the system administrator in a secure environment. After receiving the original EID (or related information) and its digital signature sent by the device, the BMC uses the preset public key to decrypt and verify the signature. If the verification is successful, it proves that the device indeed holds a legitimate private key and its EID has not been tampered with, and the device identity is authentic and trustworthy; if the verification fails, it means that the device may be fake or has been tampered with, and the BMC will refuse to register it to the dynamic mapping table and immediately trigger a security alarm and record a security event log.
[0094] In addition, the anti-tampering audit log is also designed in the embodiments of the present application, and all matching operation records are recorded to the TPM encryption log of the BMC, supporting NIST SP800-171 compliance audit.
[0095] Thus, through the EID signature and verification mechanism based on asymmetric encryption, it is possible to effectively prevent malicious devices from illegally accessing the system by forging EIDs, to provide hardware-level identity authentication, and to greatly enhance the security and anti-tampering capability of the system.
[0096] Further, in some embodiments, before obtaining the media access control address, attribute information and peripheral component interconnect bus topology information of the target access peripheral device, the method further includes: judging whether the target access peripheral device is inserted into the slot based on a hardware signal; if the target access peripheral device is inserted into the slot, obtaining the presence signal and the hot plug monitoring signal of the slot; judging whether the presence signal and the hot plug monitoring signal of the slot meet a preset condition; and if the presence signal and the hot plug monitoring signal of the slot do not meet the preset condition, generating an insertion abnormity prompt.
[0097] Further, in some embodiments, after obtaining the presence signal and the hot plug monitoring signal of the slot, the method further includes: if the presence signal of the slot meets a preset signal change condition, and / or if a hot plug event in a preset format is monitored, determining that the presence signal and the hot plug monitoring signal of the slot meet the preset condition.
[0098] Wherein, the in-place signal refers to the level state of the PRSNT# (Present) pin monitored by the CPLD (Complex Programmable Logic Device) or special logic circuit behind the slot, which directly reflects whether there is a physical card in the slot. The hot plug monitoring signal is derived from the capture of ACPI (Advanced Configuration and Power Management Interface) events at the operating system or firmware level, such as monitoring the ACPI namespace object like _SB.PCI0.HPCE, which represents that the system software level has perceived the occurrence of a hot plug operation.
[0099] Specifically, whether the target access peripheral device is inserted into the slot can be determined based on the change of the electrical characteristics of the slot, and if it is determined that the target access peripheral device is inserted into the slot, the in-place signal and the hot plug monitoring signal of the slot are obtained in parallel.
[0100] The two signals obtained are compared with the preset conditions. If the in-place signal and the hot plug monitoring signal of the slot do not meet the preset conditions, for example, the in-place signal fluctuates continuously and is unstable, or although the PRSNT# signal is valid, the corresponding ACPI hot plug event cannot be monitored within the timeout range, indicating that the physical connection or logical recognition process of the device is abnormal. At this time, an insertion exception prompt is generated, which can guide the operation and maintenance personnel to check the physical contact, slot or motherboard hardware state, so as to avoid invalid device initialization and management attempts in the case of unstable connection.
[0101] On the contrary, if the in-place signal of the slot meets the preset signal change condition (for example, the `PRSNT#` pin is stably changed from high level to low level and remains), and / or if the system monitors the hot plug event of the preset format (such as a specific ACPI event notification from the operating system kernel), it can be determined that the in-place signal and the hot plug monitoring signal of the slot meet the preset conditions.
[0102] Thus, the millisecond-level response of device insertion / removal is realized, and the compliance verification of double signals breaks through the limitation of traditional static configuration and solves the problem of non-uniform identification source of heterogeneous devices.
[0103] Further, in some embodiments, the device identifier matching management method further comprises: determining whether the target access peripheral device is a host bus adapter type device based on the attribute information; if the target access peripheral device is a host bus adapter type device, parsing the private device identifier field of the storage network protocol layer, and updating the target dynamic mapping table according to the parsing result.
[0104] Specifically, it is determined whether the target access peripheral device is a host bus adapter (HBA) type device. The determination can be based on standardized fields read from the device PCIe configuration space, mainly including the device class code (Class Code) and the subclass code (Subclass Code). For example, if the read class code indicates a mass storage controller, and the subclass code further indicates a fibre channel (Fibre Channel) or the like, it can be accurately determined that the device is an HBA type device.
[0105] If the determination result is that the target access peripheral device is a host bus adapter (HBA) type device, the private device identifier field of the storage network protocol layer is parsed.
[0106] For example, for a fibre channel HBA, its world wide port name (WWPN) and world wide node name (WWNN) need to be parsed or obtained through a specific driver interface (such as sysfs or sg_* toolset under Linux system). For an iSCSI HBA or a network card supporting iSCSI boot, its iSCSI qualified name (IQN) or extended unique identifier (EUI) needs to be extracted, which is the core identifier for the iSCSI initiator to establish a connection with the target.
[0107] Thus, for HBA type devices, the parsing of the private EID field of the storage network protocol layer is specially added, which can be compatible with and correctly identify professional devices that store key identification information outside the standard PCIe configuration space.
[0108] In addition, the application can also use the PLDM for PCIe standard protocol to obtain device attributes (such as power consumption upper limit, temperature threshold), bypass the operating system to directly communicate with the BMC, eliminate the defects of the traditional scheme relying on host restart or manual refresh, and realize management without host intervention.
[0109] Further, in some embodiments, after updating the context association relationship corresponding to the target access peripheral device by using the mapping relationship, the method further includes: monitoring the running state of the target access peripheral device through a hardware watchdog timer of the baseboard management controller; in the case that the device identifier of the target access peripheral device is detected to be in a matching abnormal state based on the context association relationship corresponding to the target access peripheral device, automatically triggering a predefined management action within a preset time threshold; wherein the predefined management action includes at least one of generating an advanced alarm, performing device reset, and isolating a faulty device.
[0110] Specifically, in order to achieve a low-delay response, the embodiments of the present application can also monitor the PCIe device state through the BMC hardware watchdog, trigger an alarm or reset within 200 ms when matching an exception.
[0111] By using the independent timing circuit integrated in the BMC hardware, the PCIe device is continuously and frequently polled or heartbeat detected. The real-time state of the device is compared with the context association relationship established in the dynamic mapping table. For example, when the BMC can communicate with the device through IPMI, but the EID reported by the device is inconsistent with the EID bound for the device slot and topology path in the mapping table, it is determined as a kind of dynamic matching exception, and a predefined management action is automatically triggered within a preset time threshold, for example, immediately sending a structured alarm to the ITSM system, which can include device disconnection, providing accurate troubleshooting information for operation and maintenance personnel, or power cycling or signal level reset of the target device, trying to automatically restore its normal working state.
[0112] In this way, the reliability of the hardware watchdog, the intelligence of the context awareness, the real-time of the low-delay response, and the automation ability driven by the strategy are combined to form a complete closed loop from fault detection, diagnosis to recovery, which fundamentally improves the self-healing ability and operation automation level of the system when facing dynamic hardware faults.
[0113] In order to make those skilled in the art more intuitively understand the device identifier matching management method proposed in the present application, the following will be described in detail in combination with Figure 2 .
[0114] As shown in Figure 2 , the device identifier matching management method includes the following steps:
[0115] Step S201, start.
[0116] Step S202, scan the PCIe device and try to extract the device identifier (EID) of the device.
[0117] Step S203, determine whether the EID is successfully extracted. If the EID is successfully extracted, execute S204; if the EID extraction fails, execute S205.
[0118] Step S204, execute EID standardization. Convert the original EID from different manufacturers and different formats into a unified standardized format.
[0119] Step S205, record error log.
[0120] Step S206, topology verification is performed, combining the logical topology path of the device with the physical slot position information for verification.
[0121] Step S207, it is judged whether the EID is unique, if yes, S208 is executed, otherwise, S209 is executed.
[0122] Step S208, BMC instance binding is performed.
[0123] Step S209, a globally unique composite key is generated according to the physical slot position and the logical topology path of the device, so as to solve the conflict and ensure the reliable identification of the device, and then BMC instance binding is performed.
[0124] Step S210, policy execution is performed.
[0125] Step S211, the end.
[0126] Thus, the embodiments of the present application solve the problems of low PCIe device EID matching efficiency and poor fault tolerance in the traditional BMC static management mode through the dynamic perception, intelligent mapping and autonomous repair mechanism, are suitable for scenes such as cloud computing and edge computing which have high requirements on availability, and can support EID management of NVMe devices in the future. The dynamic EID generation rule proposed in the present application protects the algorithm logic of generating EID based on the combination of BIOS flash data and dynamic environment parameters (such as tenant ID and virtual machine instance ID), and ensures the uniqueness of cross-vendor devices.
[0127] According to the device identifier matching management method proposed in the embodiments of the present application, a target dynamic mapping table is constructed, the context association relationship corresponding to the target access peripheral device is registered in the target dynamic mapping table based on the media access control address of the target access peripheral device and the peripheral component interconnect bus topology information, and the actual device identifier of the target access peripheral device is obtained after the target access peripheral device is initialized; the mapping relationship between the temporary device identifier and the actual device identifier is determined according to the attribute information, and the context association relationship corresponding to the target access peripheral device is updated by using the mapping relationship. Thus, the problems of EID mapping failure, poor compatibility and high maintenance cost caused by device replacement or restart in the traditional BMC static management mode are solved, and the automation degree, reliability and cross-vendor compatibility of PCIe device EID management are significantly improved through the dynamic perception, intelligent mapping and autonomous repair mechanism.
[0128] Secondly, the device identifier matching management device proposed in the embodiments of the present application is described with reference to the accompanying drawings.
[0129] Figure 3 is a block schematic diagram of the device identifier matching management device of an embodiment of the present application.
[0130] AsFigure 3 As shown, the device identifier matching management apparatus 10 comprises a construction and acquisition module 100, a registration module 200 and an update module 300.
[0131] The construction and acquisition module 100 is configured to construct a target dynamic mapping table based on a preset table structure, and acquire a media access control address, attribute information and peripheral component interconnect bus topology information of a target access peripheral device; the registration module 200 is configured to register a context association relationship corresponding to the target access peripheral device in the target dynamic mapping table based on the media access control address and the peripheral component interconnect bus topology information, and acquire an actual device identifier of the target access peripheral device after the target access peripheral device completes initialization; and the update module 300 is configured to determine a mapping relationship between a temporary device identifier and the actual device identifier of the target access peripheral device according to the attribute information, and update the context association relationship corresponding to the target access peripheral device by using the mapping relationship, wherein the target dynamic mapping table adopts a lock-independent hash table structure to store the association relationship between the device identifier and the device context, and the atomic update of the target dynamic mapping table is performed based on a preset version number marking mechanism.
[0132] Further, in some embodiments, the device identifier matching management apparatus 10 is further configured to: check a matching result of a real identifier of at least one registered peripheral device in the target dynamic mapping table based on a preset check period; based on the matching result, filter out a target peripheral device whose number of matching failures reaches a preset number, and generate alarm information of the target peripheral device, and send the alarm information to a preset information technology service management system; wherein the alarm information comprises at least one of a device serial number of the target peripheral device and a historical device identifier record.
[0133] Further, in some embodiments, after the alarm information is sent to the preset information technology service management system, the device identifier matching management apparatus 10 is further configured to: based on the target dynamic mapping table, call a context association relationship when the target peripheral device last time matched successfully; and roll back a current device identifier of the target peripheral device to an actual device identifier in the context association relationship when the target peripheral device last time matched successfully.
[0134] Further, in some embodiments, the registration module 200 is configured to: generate a temporary device identifier according to the media access control address and the peripheral component interconnect bus topology information; and register the temporary device identifier and the context association relationship of the target access peripheral device in the target dynamic mapping table.
[0135] Further, in some embodiments, after obtaining the actual device identifier of the target access peripheral device, the registration module 200 is further configured to: determine whether the actual device identifier meets a preset uniqueness condition; if the actual device identifier does not meet the preset uniqueness condition, obtain physical slot position information and a logical topology path of the target access peripheral device, to generate a composite key according to the physical slot position information and the logical topology path; and bind the composite key to a device management instance of the baseboard management controller.
[0136] Further, in some embodiments, the construction and acquisition module 100 is configured to: collect a device identifier, a vendor identifier, and hardware version information of the target access peripheral device through a multi-protocol detector built in the baseboard management controller; generate a device fingerprint based on the device identifier, the vendor identifier, and the hardware version information, and use the device fingerprint as attribute information of the target access peripheral device.
[0137] Further, in some embodiments, after updating the context association relationship corresponding to the target access peripheral device by using the mapping relationship, the update module 300 is further configured to: monitor a running state of the target access peripheral device through a hardware watchdog timer of the baseboard management controller; in a case where it is detected based on the context association relationship corresponding to the target access peripheral device that the device identifier of the target access peripheral device is in a matching abnormal state, automatically trigger a predefined management action within a preset time threshold; and the predefined management action includes at least one of generating a high-level alarm, performing device reset, and isolating a faulty device.
[0138] Further, in some embodiments, after the target access peripheral device completes initialization, the registration module 200 is further configured to: report an actual device identifier of the target access peripheral device to the baseboard management controller based on a preset communication protocol; and a key field of the preset communication protocol includes an event type, a timestamp, a device model, and the actual device identifier of the target access peripheral device.
[0139] Further, in some embodiments, the device identifier matching management apparatus 10 is further configured to: determine whether the target access peripheral device is a device that meets a preset security condition; if the target access peripheral device is a device that meets the preset security condition, perform asymmetric encryption signature on the target access peripheral device to generate signed device identification data; and perform legality verification on the device identification data through a preset public key by using the baseboard management controller.
[0140] Further, in some embodiments, before acquiring the media access control address, attribute information and peripheral component interconnect bus topology information of the target access peripheral device, the obtaining module 100 is further configured to: determine whether the target access peripheral device is inserted into the slot based on a hardware signal; if the target access peripheral device is inserted into the slot, acquire the in-place signal and hot plug monitoring signal of the slot; determine whether the in-place signal and the hot plug monitoring signal of the slot meet a preset condition; and if the in-place signal and the hot plug monitoring signal of the slot do not meet the preset condition, generate an insertion abnormity prompt.
[0141] Further, in some embodiments, after determining whether the in-place signal and the hot plug monitoring signal of the slot meet the preset condition, the obtaining module 100 is further configured to: if the in-place signal of the slot meets a preset signal change condition, and / or if a hot plug event in a preset format is monitored, determine that the in-place signal and the hot plug monitoring signal of the slot meet the preset condition.
[0142] Further, in some embodiments, the device identifier matching management apparatus 10 is further configured to: determine whether the target access peripheral device is a host bus adapter type device based on the attribute information; if the target access peripheral device is a host bus adapter type device, parse the private device identifier field of the storage network protocol layer, and update the target dynamic mapping table according to the parsing result.
[0143] It should be noted that the foregoing explanation and description of the device identifier matching management method embodiment also applies to the device identifier matching management apparatus of this embodiment, which will not be described here again.
[0144] According to the device identifier matching management apparatus provided in the embodiments of the present application, the target dynamic mapping table is constructed, the context association relationship corresponding to the target access peripheral device is registered in the target dynamic mapping table based on the media access control address and the peripheral component interconnect bus topology information of the target access peripheral device, and the actual device identifier of the target access peripheral device is acquired after the target access peripheral device is initialized; the mapping relationship between the temporary device identifier and the actual device identifier is determined according to the attribute information, and the context association relationship corresponding to the target access peripheral device is updated by using the mapping relationship. Thus, the problem of EID mapping failure, poor compatibility and high maintenance cost caused by device replacement or restart in the traditional BMC static management mode is solved, and the automation degree, reliability and cross-vendor compatibility of PCIe device EID management are significantly improved through the dynamic perception, intelligent mapping and self-repairing mechanism.
[0145] Figure 4 A structural schematic diagram of an electronic device is provided for the embodiments of the present application. The electronic device can include:
[0146] The memory 401, the processor 402 and the computer program stored in the memory 401 and executable on the processor 402.
[0147] The processor 402 implements the matching management method of the device identifier provided in the above embodiments when executing the program.
[0148] Further, the electronic device further comprises:
[0149] The communication interface 403 is used for communication between the memory 401 and the processor 402.
[0150] The memory 401 is used for storing the computer program executable on the processor 402.
[0151] The memory 401 can include a high-speed RAM (Random Access Memory) memory, and can also include a non-volatile memory, such as at least one disk memory.
[0152] If the memory 401, the processor 402 and the communication interface 403 are independently implemented, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and complete communication between each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 4 In the figure, only one thick line is used to represent, but it does not mean that there is only one bus or only one type of bus.
[0153] Optionally, in specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can complete communication between each other through an internal interface.
[0154] The processor 402 can be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0155] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the device identifier matching management method.
[0156] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to realize the device identifier matching management method.
[0157] Those skilled in the art will further appreciate that the units and algorithms described in connection with the examples disclosed herein can be embodied directly in hardware, computer software, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, various components and steps are described herein above generally in terms of their functionality, without reference to the specific manner in which such functionality is achieved. Those skilled in the art will recognize that the exemplary components and steps described herein can be implemented in one or more general purpose or special purpose computing devices, computer programs configured by one or more computer program modules, or any combination thereof. For example, one or more computer program modules can be downloaded to the memory of a special purpose computing device from the Internet or in response to request. Thus, the exemplary embodiments can be implemented in a computing device or other processing system that includes hardware for executing computer program instructions.
[0158] The above describes in detail a device identifier matching management method provided by the present application. The principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A method of managing matching of device identifiers, characterized by, The method comprises the following steps: constructing a target dynamic mapping table based on a preset table structure, and obtaining a media access control address, attribute information, and peripheral component interconnect bus topology information of a target access peripheral device; registering a context association relationship corresponding to the target access peripheral device in the target dynamic mapping table based on the media access control address and the peripheral component interconnect bus topology information, and obtaining an actual device identifier of the target access peripheral device after the target access peripheral device completes initialization; determining a mapping relationship between a temporary device identifier and the actual device identifier of the target access peripheral device according to the attribute information, and updating the context association relationship corresponding to the target access peripheral device by using the mapping relationship; wherein the target dynamic mapping table uses a lock-independent hash table structure to store the association relationship between device identifiers and device contexts; performing atomic update of the target dynamic mapping table based on a preset version number marking mechanism.
2. The method of claim 1, wherein, Further comprising: checking a matching result of a real identifier of at least one registered peripheral device in the target dynamic mapping table based on a preset checking period; based on the matching result, screening out a target peripheral device whose matching failure times reach a preset number, and generating alarm information of the target peripheral device, and sending the alarm information to a preset information technology service management system; wherein the alarm information comprises at least one of a device serial number and a historical device identifier record of the target peripheral device.
3. The method of claim 2, wherein, After sending the alarm information to the preset information technology service management system, further comprising: based on the target dynamic mapping table, calling a context association relationship when the target peripheral device last matched successfully; rollback the current device identifier of the target peripheral device to the actual device identifier in the context association relationship when the target peripheral device last matched successfully.
4. The method of claim 1, wherein, The registration of the context association relationship corresponding to the target access peripheral device in the target dynamic mapping table based on the media access control address and the peripheral component interconnect bus topology information comprises: generating the temporary device identifier according to the media access control address and the peripheral component interconnect bus topology information; registering the context association relationship between the temporary device identifier and the target access peripheral device in the target dynamic mapping table.
5. The method of claim 1, wherein, After obtaining the actual device identifier of the target access peripheral device, further comprising: determining whether the actual device identifier satisfies a preset unique condition; if the actual device identifier does not satisfy the preset unique condition, obtaining physical slot position information and logical topology path of the target access peripheral device, to generate a composite key according to the physical slot position information and the logical topology path; binding the composite key with a device management instance of a baseboard management controller.
6. The method of claim 1, wherein, The obtaining of the attribute information of the target access peripheral device comprises: collecting device identifiers, vendor identifiers, and hardware version information of the target access peripheral device by a multi-protocol detector built in a baseboard management controller; Generate a device fingerprint based on the combination of the device identifier, the vendor identification and the hardware version information, and use the device fingerprint as attribute information of the target access peripheral device.
7. The method of claim 1, wherein, After updating the context association relationship corresponding to the target access peripheral device using the mapping relationship, further comprising: Monitoring the running state of the target access peripheral device through a hardware watchdog timer of the baseboard management controller; In the case where the device identifier of the target access peripheral device is in a matching abnormal state based on the context association relationship corresponding to the target access peripheral device, automatically triggering a predefined management action within a preset time threshold; Wherein, the predefined management action includes at least one of generating a high-level alarm, performing device reset and isolating a faulty device.
8. The method of claim 1, wherein, After the target access peripheral device completes initialization, further comprising: Reporting the actual device identifier of the target access peripheral device to the baseboard management controller based on a preset communication protocol; Wherein, the key fields of the preset communication protocol include event type, timestamp, device model and the actual device identifier of the target access peripheral device.
9. The method of claim 1, wherein, Further comprising: Determine whether the target access peripheral device is a device that meets a preset security condition; If the target access peripheral device is a device that meets the preset security condition, perform asymmetric encryption signature on the target access peripheral device to generate signed device identification data; Using the baseboard management controller, perform legitimacy verification on the device identification data through a pre-set public key.
10. The method of claim 1, wherein, Before obtaining the media access control address, attribute information and peripheral component interconnect bus topology information of the target access peripheral device, further comprising: Determine whether the target access peripheral device is inserted into the slot based on hardware signals; If the target access peripheral device is inserted into the slot, obtain the present signal and hot plug monitoring signal of the slot; Determine whether the present signal and the hot plug monitoring signal of the slot meet a preset condition; If the present signal and the hot plug monitoring signal of the slot do not meet the preset condition, generate an insertion abnormality reminder.
11. The method of claim 10, wherein, After determining whether the present signal and the hot plug monitoring signal of the slot meet a preset condition, further comprising: If the present signal of the slot meets a preset signal change condition, and / or if a hot plug event of a preset format is monitored, it is determined that the present signal and the hot plug monitoring signal of the slot meet the preset condition.
12. The method of claim 1, wherein, Further comprising: Based on the attribute information, determine whether the target access peripheral device is a host bus adapter type device; If the target access peripheral device is the host bus adapter type device, parse the private device identifier field of the storage network protocol layer and update the target dynamic mapping table according to the parsing result.
13. An electronic device, comprising: Comprising: A memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program to implement the device identifier matching management method of any one of claims 1-12.
Citation Information
Patent Citations
Device position determination method and device, electronic device and storage medium
CN119883991A
PCIe (Peripheral Component Interconnect Express) equipment function failure positioning method, system and server
CN120523764A