Method and apparatus for synchronizing duids

CN116048636BActive Publication Date: 2026-10-20INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211718026.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2026-10-20
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

[0004]本发明提供的DUID的同步方法及装置,用以解决现有技术中由于DUID保存在SMBIOS中,可能会导致DUID无效或因BIOS刷写而消失的缺陷,实现确保DUID有效且不被丢失

Benefits of technology

[0044]本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述DUID的同步方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048636B_ABST
    Figure CN116048636B_ABST
Patent Text Reader

Abstract

The application provides a DUID synchronization method and device, and belongs to the technical field of computers, and comprises the following steps: obtaining a character string of a device unique identifier (DUID) in a baseboard management controller (BMC); in the case where a flag bit of the character string indicates that a device parameter in the DUID is inconsistent with a device parameter of BIOS, performing parameter setting on the character string to obtain a first DUID; the flag bit of the character string is determined by a checking result of the DUID according to a hardware parameter of the BIOS; and the first DUID is synchronized to the BMC, so that the first DUID is obtained by the BIOS and the end device from the BMC. The DUID synchronization method and device can ensure the effectiveness of the DUID and prevent the DUID from being lost by performing parameter setting on the checked DUID and synchronizing the set DUID to the BMC, so that the character string of the DUID can be called by the flashed BIOS.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a DUID synchronization method and device. BACKGROUND

[0002] Since the technology for uniquely identifying a device is usually outdated with the development of technology, Microsoft developed a device ID format called Device Unique Identifier (DUID), which is extensible and can be combined with new technologies to identify available devices.

[0003] However, since the DUID is saved in the Non-Volatile Random Access Memory (NVRAM) of the System Management BIOS (SMBIOS), it may cause the DUID to be invalid or disappear due to BIOS flashing. SUMMARY

[0004] The DUID synchronization method and device provided by the present application solve the defect that the DUID may be invalid or disappear due to BIOS flashing because the DUID is saved in the SMBIOS, and ensure that the DUID is valid and not lost.

[0005] The present application provides a DUID synchronization method, the execution subject of which is a BIOS, comprising:

[0006] obtaining a string of a Device Unique Identifier (DUID) in a Baseboard Management Controller (BMC);

[0007] in a case where it is determined that a flag bit of the string indicates that a device parameter in the DUID is inconsistent with a device parameter of the BIOS, performing parameter setting on the string to obtain a first DUID; the flag bit of the string is determined by a check result of the DUID according to a hardware parameter of the BIOS by an end device;

[0008] synchronizing the first DUID to the BMC, so that the first DUID is obtained by the BIOS and the end device from the BMC.

[0009] According to the DUID synchronization method provided by the present application, the parameter setting on the string comprises:

[0010] in a case where the type of the DUID is DUID-LLT, obtaining a device identification number of the BIOS;

[0011] The string is parameterized using the device identifier;

[0012] If the type of the DUID is DUID-UUID, obtain the universally unique identifier (UUID) of the BIOS.

[0013] The string is configured with parameters using the UUID.

[0014] According to a DUID synchronization method provided by the present invention, after obtaining the string of the device unique identifier DUID in the baseboard management controller (BMC), the method further includes:

[0015] If the flag in the string indicates a change in the BIOS network card configuration, delete the DUID.

[0016] Determine the type of DUID based on the variables in the BIOS;

[0017] Generate a second DUID based on the type of the DUID;

[0018] The second DUID is saved to the NVRAM of the BIOS and synchronized to the BMC so that the BIOS and end devices can obtain the second DUID from the BMC.

[0019] According to a DUID synchronization method provided by the present invention, generating a second DUID based on the type of the DUID includes:

[0020] If the type of the DUID is determined to be DUID-LLT, a timestamp is generated;

[0021] Obtain the device identifier of the BIOS, and generate the second DUID based on the timestamp and the device identifier;

[0022] If the type of the DUID is DUID-UUID, obtain the UUID of the BIOS;

[0023] The second DUID is generated based on the UUID.

[0024] According to a DUID synchronization method provided by the present invention, obtaining the string of the device unique identifier DUID in the baseboard management controller (BMC) includes:

[0025] Send an identifier acquisition command to the BMC;

[0026] Receive the string returned by the BMC, the string being determined by the BMC in response to the acquire identifier instruction.

[0027] The present invention also provides a DUID synchronization system, including: BIOS, BMC and end device;

[0028] The BIOS is used to perform the DUID synchronization method described above;

[0029] Retrieve DUID from the BMC;

[0030] If the type of the DUID is determined to be DUID-LLT, the device identifier of the BIOS is retrieved to verify the DUID and obtain the verification result.

[0031] If the type of the DUID is determined to be DUID-UUID, the BIOS UUID is retrieved to verify the DUID and the verification result is obtained.

[0032] Based on the verification result, set the flag bit of the DUID string;

[0033] The BMC is specifically used for:

[0034] Receive the identifier acquisition command sent by the BIOS;

[0035] In response to the instruction to obtain the identifier, the DUID is determined in the memory space;

[0036] Return the DUID to the BIOS;

[0037] Upon receiving the first DUID or the second DUID synchronized by the BIOS, the memory space is updated using the first DUID or the second DUID.

[0038] The present invention also provides a DUID synchronization device, comprising:

[0039] The module is used to retrieve the string "DUID" from the BMC.

[0040] The setting module is used to set parameters for the string to obtain a first DUID when the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS; the flag bit of the string is determined by the end device based on the verification result of the DUID by the hardware parameters of the BIOS.

[0041] A synchronization module is used to synchronize the first DUID to the BMC so that the BIOS and end devices can obtain the first DUID from the BMC.

[0042] The present invention also provides an electronic device, including 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 synchronization method of DUID as described above.

[0043] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the synchronization method of DUID as described in any of the above.

[0044] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the synchronization method of DUID as described above.

[0045] The DUID synchronization method and apparatus provided by this invention, by setting parameters for the verified DUID and synchronizing the set DUID to the BMC, enables the flashed BIOS to retrieve the DUID string, ensuring the validity of the DUID and preventing its loss. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0047] Figure 1 This is one of the flowcharts illustrating the DUID synchronization method provided by the present invention;

[0048] Figure 2 This is the second flowchart illustrating the DUID synchronization method provided by this invention;

[0049] Figure 3 This is a schematic diagram of the DUID synchronization device provided by the present invention;

[0050] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0052] In the description of this invention, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0053] The BIOS is a set of programs embedded in a ROM chip on the motherboard. It stores the computer's most important basic input / output programs, system settings information, power-on self-test programs, and system startup programs.

[0054] The Non-Volatile Random Access Memory (NVRAM) in the BIOS is non-volatile storage; its data is not lost even in the event of power failure or battery failure, and it can be used to store DUID information. However, when updating or upgrading the BIOS using flash memory or recovery, the entire BIOS NVRAM is erased and updated, causing the data stored in the NVRAM to be updated as well. As a result, specific data stored in the NVRAM, such as the motherboard serial number and DUID information, will also be erased.

[0055] The following is combined with Figures 1 to 4 This invention describes a DUID synchronization method, BIOS, DUID synchronization system, apparatus, electronic device, storage medium, and product provided by embodiments of the present invention.

[0056] The DUID synchronization method provided in this embodiment of the invention can be executed by an electronic device or software, functional module, or functional entity within the electronic device capable of implementing the DUID synchronization method. In this embodiment, the electronic device includes, but is not limited to, a server built into the BIOS. It should be noted that the aforementioned execution entity does not constitute a limitation of this invention.

[0057] Figure 1 This is one of the flowcharts illustrating the DUID synchronization method provided by the present invention, such as... Figure 1 As shown, including but not limited to the following steps:

[0058] First, in step S1, the string of the device unique identifier DUID in the baseboard management controller (BMC) is obtained.

[0059] The Baseboard Management Controller (BMC) contains memory space open to the BIOS, which can be used to store BIOS backup DUIDs. The DUID string can include user-defined flags.

[0060] Optionally, the string of the device unique identifier DUID in the baseboard management controller (BMC) is obtained, including:

[0061] Send an identifier acquisition command to the BMC;

[0062] Receive the string returned by the BMC, the string being determined by the BMC in response to the acquire identifier instruction.

[0063] For example, after the Powered Self-Test (POST), in order to obtain the backup DUID from the BMC, the BIOS generates a Get DUID command and sends it to the BMC;

[0064] After receiving the instruction to obtain the identifier, the BMC determines the string of DUID in the memory space open to the BIOS and returns it to the BIOS.

[0065] According to the DUID synchronization method provided by the present invention, the BIOS backs up the DUID in the BMC and retrieves it from the BMC after the flashing is completed, which can effectively avoid the loss of DUID caused by BIOS flashing.

[0066] Further, in step S2, if it is determined that the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS, the string is parameter-set to obtain a first DUID; the flag bit of the string is determined by the end device based on the verification result of the DUID according to the hardware parameters of the BIOS.

[0067] In cases where the device parameters in DUID are inconsistent with the device parameters in the BIOS, the flag bit can be 0x81. Under this flag bit, the BIOS forces a set of the string parameters in DUID.

[0068] Since the end device cannot directly obtain data from the BIOS, it can retrieve the BIOS DUID from the memory space that the BMC has opened to the BIOS and verify the validity of the DUID. If the device parameters in the DUID are inconsistent with the hardware parameters of the BIOS, the DUID is deemed invalid. The end device sets the flag bit of the DUID to 0x81 and returns the set DUID to the BMC to update the memory space that the BMC has opened to the BIOS.

[0069] For example, if the flag bit of the DUID string is determined to be 0x81, the DUID string is parameterized according to the BIOS hardware parameters (Set variable to DUID) to obtain the first DUID.

[0070] Optionally, setting parameters for the string includes:

[0071] When the type of the DUID is DUID-LLT, obtain the device identifier of the BIOS;

[0072] The string is parameterized using the device identifier;

[0073] If the type of the DUID is DUID-UUID, obtain the universally unique identifier (UUID) of the BIOS.

[0074] The string is configured with parameters using the UUID.

[0075] The DUID provided by this invention can include two types: DUID-LLT and DUID-UUID, and can also include DUID-LL and DUID-EN. In specific application scenarios, it can be flexibly configured according to the actual situation.

[0076] Specifically, when the DUID type is DUID-LLT, the parameters of the DUID string include: DUID type, hardware address type, timestamp, and the device identifier (Media Access Control Address, MAC) of the BIOS network card. The BIOS MAC is obtained as MAC 0, and MAC 0 is used to update the parameter part of the DUID string related to the BIOS MAC.

[0077] When the DUID type is DUID-UUID, the string parameters of the DUID include: DUID type and Universally Unique Identifier (UUID). The BIOS UUID is obtained, and the UUID-related parameters in the DUID string are updated using the UUID. The UUID can be defined by the DUID.

[0078] According to the DUID synchronization method provided by the present invention, the validity of DUID can be effectively guaranteed by setting the parameters of DUID.

[0079] Optionally, after obtaining the string of the device unique identifier DUID in the baseboard management controller (BMC), the method further includes:

[0080] If the flag in the string indicates a change in the BIOS network card configuration, delete the DUID.

[0081] Determine the type of DUID based on the variables in the BIOS;

[0082] Generate a second DUID based on the type of the DUID;

[0083] The second DUID is saved to the NVRAM of the BIOS and synchronized to the BMC so that the BIOS and end devices can obtain the second DUID from the BMC.

[0084] In cases where the BIOS network card configuration changes, the flag bit can be 0x82. Under this flag bit, the BIOS resets the DUID string and deletes the DUID.

[0085] Since the end device cannot directly obtain data from the BIOS, it can retrieve the BIOS DUID from the memory space that the BMC has opened to the BIOS. If the network card configuration changes, the DUID is deemed invalid. The end device sets the flag of the DUID to 0x82 and returns the set DUID to the BMC to update the memory space that the BMC has opened to the BIOS.

[0086] For example, if the flag of the DUID string is determined to be 0x81, the DUID string is deleted, and the type of DUID is obtained in the BIOS variable (Setup).

[0087] Different types of DUIDs have different parameters that make up the DUID, resulting in different second DUIDs. The generated second DUID is then saved to the BIOS's NVRAM.

[0088] In addition, the second DUID can be synchronized to the BMC to update the DUID in the memory space that the BMC opens to the BIOS.

[0089] According to the DUID synchronization method provided by the present invention, the validity and real-time performance of the DUID can be guaranteed by regenerating the DUID when the network card configuration changes.

[0090] Optionally, generating a second DUID based on the type of the DUID includes:

[0091] Given that the type of the DUID is DUID-LLT, a timestamp is generated;

[0092] Obtain the device identifier of the BIOS, and generate the second DUID based on the timestamp and the device identifier;

[0093] If the type of the DUID is DUID-UUID, obtain the UUID of the BIOS;

[0094] The second DUID is generated based on the UUID.

[0095] Given that the DUID type is DUID-LLT, generate a timestamp;

[0096] Obtain the BIOS device identifier MAC 0, and fill the DUID with DUID type, hardware address type, timestamp and device identifier MAC 0 to generate a second DUID;

[0097] If the DUID type is DUID-UUID, obtain the BIOS UUID; use the DUID type (DUIDType) and UUID to generate a second DUID.

[0098] The DUID synchronization method provided by this invention generates new DUIDs based on the type of DUID, which can effectively solve the problem of DUID failure caused by changes in the network card configuration of the device.

[0099] Further, in step S3, the first DUID is synchronized to the BMC so that the BIOS and the end device can obtain the first DUID from the BMC.

[0100] The modified first DUID is synchronized to the memory space that the BMC opens to the BIOS. This allows the BIOS to retrieve it again after flashing, and also allows the end device to retrieve the first DUID from the memory space that the BMC opens to the BIOS for verification and flag setting.

[0101] The DUID synchronization method provided by this invention sets parameters for the verified DUID and synchronizes the set DUID to the BMC, enabling the flashed BIOS to retrieve the DUID string, ensuring the validity of the DUID and preventing its loss.

[0102] Figure 2 This is the second flowchart illustrating the DUID synchronization method provided by this invention, as shown below. Figure 2 As shown, it includes:

[0103] After the Powered Self-Test (POST), the BIOS sends a GetDUID command to the BMC to retrieve the DUID stored in the memory space that the BMC has opened to the BIOS; the DUID is set by the end device (user) and sent to the BMC.

[0104] After obtaining the DUID flag, the BIOS identifies the DUID flag. If the DUID flag is 0x81, it sets the variable to DUID, sets the next DUID flag to 0x80, and sends a command to the BMC to retrieve the DUID.

[0105] If the DUID flag is determined to be 0x82, delete the DUID, set the flag of the new DUID (Next DUID) to 0x80, and send a command to the BMC to retrieve the DUID (Set DUID to BIOS).

[0106] If the DUID flag is set to 0x80, no action is taken.

[0107] After setting the flag of the new DUID (Next DUID) to 0x80, or doing nothing, the original logic of the BIOS is executed to generate the new DUID and obtain the DIUD by retrieving the variable from NVRAM.

[0108] If the DUID in NVRAM is not empty, the DUID is retrieved (Save DUID) and sent to the BMC (BIOS set DUID to BMC) to update the current DUID. This allows the BIOS to retrieve the DUID again after a flash, and the end device (user) can retrieve the new DUID from the memory space provided by the BMC to the BIOS (get DUID) for verification and flag setting (Set BIOS to DUID).

[0109] If the DUID in NVRAM is empty, obtain the DUID type from the BIOS variable (Setup);

[0110] When the DUID type is DUID-LLT, generate a timestamp;

[0111] Obtain the BIOS device identifier (MAC 0) to determine a new DUID based on the DUID type, hardware address type (HardwareType), timestamp, and device identifier;

[0112] If the DUID type is DUID-UUID, obtain the UUID to determine a new DUID based on the DUID type and the UUID;

[0113] The new DUID is saved to the NVRAM, and the new DUID is obtained (Save DUID) and sent to the BMC (BIOS set DUID to BMC) to update the current DUID. On the one hand, the BIOS can obtain the new DUID after flashing, and on the other hand, the end device (user) can retrieve the new DUID from the memory space opened by the BMC to the BIOS (get DUID from BIOS) for verification and flag setting.

[0114] The present invention also provides a BIOS for performing the DUID synchronization method as described in any of the above embodiments.

[0115] First, the BIOS retrieves the string of the device unique identifier DUID from the baseboard management controller (BMC).

[0116] The Baseboard Management Controller (BMC) contains memory space open to the BIOS, which can be used to store BIOS backup DUIDs. The DUID string can include user-defined flags.

[0117] Optionally, the specific operation of the BIOS is as follows:

[0118] Send an identifier acquisition command to the BMC;

[0119] Receive the string returned by the BMC, the string being determined by the BMC in response to the acquire identifier instruction.

[0120] For example, after the Powered Self-Test (POST), in order to obtain the backup DUID from the BMC, the BIOS generates a Get DUID command and sends it to the BMC;

[0121] After receiving the instruction to obtain the identifier, the BMC determines the string of DUID in the memory space open to the BIOS and returns it to the BIOS.

[0122] According to the BIOS provided by this invention, the BIOS backs up the DUID in the BMC and retrieves it from the BMC after the flashing is completed, which can effectively avoid the loss of DUID caused by BIOS flashing.

[0123] Furthermore, if the BIOS determines that the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS, the BIOS sets the parameters of the string to obtain a first DUID; the flag bit of the string is determined by the end device based on the verification result of the DUID by the hardware parameters of the BIOS.

[0124] In cases where the device parameters in DUID are inconsistent with the device parameters in the BIOS, the flag bit can be 0x81. Under this flag bit, the BIOS forces a set of the string parameters in DUID.

[0125] Since the end device cannot directly obtain data from the BIOS, it can retrieve the BIOS DUID from the memory space that the BMC has opened to the BIOS and verify the validity of the DUID. If the device parameters in the DUID are inconsistent with the hardware parameters of the BIOS, the DUID is deemed invalid. The end device sets the flag bit of the DUID to 0x81 and returns the set DUID to the BMC to update the memory space that the BMC has opened to the BIOS.

[0126] For example, if the flag bit of the DUID string is determined to be 0x81, the DUID string is parameterized according to the BIOS hardware parameters (Set variable to DUID) to obtain the first DUID.

[0127] Optionally, the BIOS is specifically used for:

[0128] If the type of DUID is DUID-LLT, obtain the device identifier of the BIOS;

[0129] The string is parameterized using the device identifier;

[0130] If the type of the DUID is DUID-UUID, obtain the universally unique identifier (UUID) of the BIOS.

[0131] The string is configured with parameters using the UUID.

[0132] The DUID provided by this invention can include two types: DUID-LLT and DUID-UUID, and can also include DUID-LL and DUID-EN. In specific application scenarios, it can be flexibly configured according to the actual situation.

[0133] Specifically, when the DUID type is DUID-LLT, the parameters of the DUID string include: DUID type, hardware address type, timestamp, and the device identifier (Media Access Control Address, MAC) of the BIOS network card. The BIOS MAC is obtained as MAC 0, and MAC 0 is used to update the parameter part of the DUID string related to the BIOS MAC.

[0134] When the DUID type is DUID-UUID, the string parameters of the DUID include: DUID type and Universally Unique Identifier (UUID). The BIOS UUID is obtained, and the UUID-related parameters in the DUID string are updated using the UUID. The UUID can be defined by the DUID.

[0135] According to the BIOS provided by the present invention, the validity of DUID can be effectively guaranteed by setting parameters for DUID.

[0136] Optionally, after obtaining the string of the device unique identifier DUID in the baseboard management controller (BMC), the BIOS further configures itself to:

[0137] If the flag in the string indicates a change in the BIOS network card configuration, delete the DUID.

[0138] Determine the type of DUID based on the variables in the BIOS;

[0139] Generate a second DUID based on the type of the DUID;

[0140] The second DUID is saved to the NVRAM of the BIOS and synchronized to the BMC so that the BIOS and end devices can obtain the second DUID from the BMC.

[0141] In cases where the BIOS network card configuration changes, the flag bit can be 0x82. Under this flag bit, the BIOS resets the DUID string and deletes the DUID.

[0142] Since the end device cannot directly obtain data from the BIOS, it can retrieve the BIOS DUID from the memory space that the BMC has opened to the BIOS. If the network card configuration changes, the DUID is deemed invalid. The end device sets the flag of the DUID to 0x82 and returns the set DUID to the BMC to update the memory space that the BMC has opened to the BIOS.

[0143] For example, if the flag of the DUID string is determined to be 0x81, the DUID string is deleted, and the type of DUID is obtained in the BIOS variable (Setup).

[0144] Different types of DUIDs have different parameters that make up the DUID, resulting in different second DUIDs. The generated second DUID is then saved to the BIOS's NVRAM.

[0145] In addition, the second DUID can be synchronized to the BMC to update the DUID in the memory space that the BMC opens to the BIOS.

[0146] According to the BIOS provided by this invention, the validity and real-time performance of the DUID can be guaranteed by regenerating the DUID when the network card configuration changes.

[0147] Optionally, the BIOS is specifically used for:

[0148] The step of generating a second DUID based on the type of the first DUID includes:

[0149] Given that the type of the DUID is DUID-LLT, a timestamp is generated;

[0150] Obtain the device identifier of the BIOS, and generate the second DUID based on the timestamp and the device identifier;

[0151] If the type of the DUID is DUID-UUID, obtain the UUID of the BIOS;

[0152] The second DUID is generated based on the UUID.

[0153] Given that the DUID type is DUID-LLT, generate a timestamp;

[0154] Obtain the BIOS device identifier MAC 0, and fill the DUID with DUID type, hardware address type, timestamp and device identifier MAC 0 to generate a second DUID;

[0155] If the DUID type is DUID-UUID, obtain the BIOS UUID; use the DUID type (DUIDType) and UUID to generate a second DUID.

[0156] According to the BIOS provided by this invention, a new DUID is generated based on the type of DUID, which can effectively solve the problem of DUID failure caused by changes in the network card configuration of the device.

[0157] Furthermore, the BIOS synchronizes the first DUID to the BMC so that the BIOS and the end device can obtain the first DUID from the BMC.

[0158] The modified first DUID is synchronized to the memory space that the BMC opens to the BIOS. This allows the BIOS to retrieve it again after flashing, and also allows the end device to retrieve the first DUID from the memory space that the BMC opens to the BIOS for verification and flag setting.

[0159] The BIOS provided by this invention sets parameters for the verified DUID and synchronizes the set DUID to the BMC, enabling the flashed BIOS to retrieve the DUID string, ensuring the validity of the DUID and preventing its loss.

[0160] The present invention also provides a DUID synchronization system, including: BIOS, BMC and end device;

[0161] The BIOS is used to execute the DUID synchronization method as described in any of the above embodiments.

[0162] Optionally, the terminal device is specifically used for:

[0163] Retrieve DUID from the BMC;

[0164] If the type of the DUID is determined to be DUID-LLT, the device identifier of the BIOS is retrieved to verify the DUID and obtain the verification result.

[0165] If the type of the DUID is determined to be DUID-UUID, the BIOS UUID is retrieved to verify the DUID and the verification result is obtained.

[0166] Based on the verification result, set the flag bit of the DUID string.

[0167] Since the end device cannot directly read data from the BIOS, it is necessary to retrieve the BIOS DUID from the BMC and verify the DUID.

[0168] Specifically, when the DUID type is DUID-LLT, the parameters of the DUID string include: DUID type, hardware address type, timestamp, and the device identifier (Media Access Control Address, MAC) of the BIOS network card. The BIOS MAC is obtained as MAC 0, and MAC 0 is used to update the parameter part of the DUID string related to the BIOS MAC.

[0169] When the DUID type is DUID-UUID, the string parameters of the DUID include: DUID type and Universally Unique Identifier (UUID). The BIOS UUID is obtained, and the UUID-related parameters in the DUID string are updated using the UUID. The UUID can be defined by the DUID.

[0170] If the type of the DUID is determined to be DUID-LLT, the device identifier of the BIOS is retrieved to verify the DUID. If the device identifier of the DUID does not match the device identifier of the BIOS, the verification fails.

[0171] When the type of DUID is DUID-UUID, the BIOS UUID is retrieved to verify the DUID. If the UUID part of the DUID is inconsistent with the UUID of the BIOS, the verification fails.

[0172] Set the flag of the DUID string that failed verification to 0x81. If the verification is successful, obtain the BIOS network card configuration. If the network card configuration has changed, set the flag of the DUID string to 0x82. If the network card configuration has not changed, set the flag of the DUID string to 0x80.

[0173] Optionally, the BMC is specifically used for:

[0174] Receive the identifier acquisition command sent by the BIOS;

[0175] In response to the instruction to obtain the identifier, the DUID is determined in the memory space;

[0176] Return the DUID to the BIOS;

[0177] Upon receiving the first DUID or the second DUID synchronized by the BIOS, the memory space is updated using the first DUID or the second DUID.

[0178] After receiving the retrieval identifier instruction from the BIOS, the BMC responds by determining the BIOS's DUID from the memory space provided to the BIOS by the BMC, and returns the DUID to the BIOS.

[0179] Upon receiving the first or second DUID synchronized by the BIOS, the BMC replaces the original DUID in the memory space that the BMC has opened to the BIOS with the first or second DUID, thus completing the update.

[0180] The DUID synchronization device provided by the present invention will be described below. The DUID synchronization device described below can be referred to in correspondence with the DUID synchronization method described above.

[0181] Figure 3 This is a schematic diagram of the DUID synchronization device provided by the present invention, as shown below. Figure 3 As shown, it includes:

[0182] Module 301 is used to retrieve the string of DUID from the BMC;

[0183] The setting module 302 is used to set parameters for the string to obtain a first DUID when it is determined that the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS; the flag bit of the string is determined by the end device based on the verification result of the DUID by the hardware parameters of the BIOS.

[0184] Synchronization module 303 is used to synchronize the first DUID to the BMC so that the BIOS and end devices can obtain the first DUID from the BMC.

[0185] During device operation, the acquisition module 301 acquires the string of DUID in the BMC; the setting module 302 sets the parameters of the string when it determines that the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS, so as to acquire the first DUID; the flag bit of the string is determined by the end device based on the verification result of the DUID by the hardware parameters of the BIOS; the synchronization module 303 synchronizes the first DUID to the BMC so that the BIOS and the end device can acquire the first DUID from the BMC.

[0186] First, module 301 retrieves the string of DUID from the BMC.

[0187] The Baseboard Management Controller (BMC) contains memory space open to the BIOS, which can be used to store BIOS backup DUIDs. The DUID string can include user-defined flags.

[0188] Optionally, module 301 is used specifically for:

[0189] Send an identifier acquisition command to the BMC;

[0190] Receive the string returned by the BMC, the string being determined by the BMC in response to the acquire identifier instruction.

[0191] For example, after the Powered Self-Test (POST), in order to obtain the backup DUID from the BMC, the BIOS generates a Get DUID command and sends it to the BMC;

[0192] After receiving the instruction to obtain the identifier, the BMC determines the string of DUID in the memory space open to the BIOS and returns it to the BIOS.

[0193] According to the DUID synchronization device provided by the present invention, the BIOS backs up the DUID in the BMC and retrieves it from the BMC after the flashing is completed, which can effectively avoid the loss of DUID caused by BIOS flashing.

[0194] Furthermore, when the setting module 302 determines that the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS, it sets the parameters of the string to obtain the first DUID; the flag bit of the string is determined by the end device based on the verification result of the DUID according to the hardware parameters of the BIOS.

[0195] In cases where the device parameters in DUID are inconsistent with the device parameters in the BIOS, the flag bit can be 0x81. Under this flag bit, the BIOS forces a set of the string parameters in DUID.

[0196] Since the end device cannot directly obtain data from the BIOS, it can retrieve the BIOS DUID from the memory space that the BMC has opened to the BIOS and verify the validity of the DUID. If the device parameters in the DUID are inconsistent with the hardware parameters of the BIOS, the DUID is deemed invalid. The end device sets the flag bit of the DUID to 0x81 and returns the set DUID to the BMC to update the memory space that the BMC has opened to the BIOS.

[0197] For example, if the flag bit of the DUID string is determined to be 0x81, the DUID string is parameterized according to the BIOS hardware parameters (Set variable to DUID) to obtain the first DUID.

[0198] Optionally, module 302 is configured to:

[0199] When the type of the DUID is DUID-LLT, obtain the device identifier of the BIOS;

[0200] The string is configured with parameters using the device identifier;

[0201] If the type of the DUID is DUID-UUID, obtain the universally unique identifier (UUID) of the BIOS.

[0202] The string is configured with parameters using the UUID.

[0203] The DUID provided by this invention can include two types: DUID-LLT and DUID-UUID, and can also include DUID-LL and DUID-EN. In specific application scenarios, it can be flexibly configured according to the actual situation.

[0204] Specifically, when the DUID type is DUID-LLT, the parameters of the DUID string include: DUID type, hardware address type, timestamp, and the device identifier (Media Access Control Address, MAC) of the BIOS network card. The BIOS MAC is obtained as MAC 0, and MAC 0 is used to update the parameter part of the DUID string related to the BIOS MAC.

[0205] When the DUID type is DUID-UUID, the string parameters of the DUID include: DUID type and Universally Unique Identifier (UUID). The BIOS UUID is obtained, and the UUID-related parameters in the DUID string are updated using the UUID. The UUID can be defined by the DUID.

[0206] The DUID synchronization device provided by the present invention can effectively ensure the validity of DUID by setting the parameters of DUID.

[0207] Optionally, the device further includes a reset module for performing the following steps after obtaining the string of the device unique identifier DUID in the baseboard management controller (BMC):

[0208] If the flag in the string indicates a change in the BIOS network card configuration, delete the DUID.

[0209] Determine the type of DUID based on the variables in the BIOS;

[0210] Generate a second DUID based on the type of the DUID;

[0211] The second DUID is saved to the NVRAM of the BIOS and synchronized to the BMC so that the BIOS and end devices can obtain the second DUID from the BMC.

[0212] In cases where the BIOS network card configuration changes, the flag bit can be 0x82. Under this flag bit, the BIOS resets the DUID string and deletes the DUID.

[0213] Since the end device cannot directly obtain data from the BIOS, it can retrieve the BIOS DUID from the memory space that the BMC has opened to the BIOS. If the network card configuration changes, the DUID is deemed invalid. The end device sets the flag of the DUID to 0x82 and returns the set DUID to the BMC to update the memory space that the BMC has opened to the BIOS.

[0214] For example, if the flag of the DUID string is determined to be 0x81, the DUID string is deleted, and the type of DUID is obtained in the BIOS variable (Setup).

[0215] Different types of DUIDs have different parameters that make up the DUID, resulting in different second DUIDs. The generated second DUID is then saved to the BIOS's NVRAM.

[0216] In addition, the second DUID can be synchronized to the BMC to update the DUID in the memory space that the BMC opens to the BIOS.

[0217] The DUID synchronization device provided by the present invention can ensure the validity and real-time performance of DUID by regenerating DUID when the network card configuration changes.

[0218] Optionally, the reset module includes a generation submodule, specifically used for:

[0219] Given that the type of the DUID is DUID-LLT, a timestamp is generated;

[0220] Obtain the device identifier of the BIOS, and generate the second DUID based on the timestamp and the device identifier;

[0221] If the type of the DUID is DUID-UUID, obtain the UUID of the BIOS;

[0222] The second DUID is generated based on the UUID.

[0223] Given that the DUID type is DUID-LLT, generate a timestamp;

[0224] Obtain the BIOS device identifier MAC 0, and fill the DUID with DUID type, hardware address type, timestamp and device identifier MAC 0 to generate a second DUID;

[0225] If the DUID type is DUID-UUID, obtain the BIOS UUID; use the DUID type (DUIDType) and UUID to generate a second DUID.

[0226] The DUID synchronization device provided by the present invention generates new DUIDs according to the type of DUID, which can effectively solve the problem of DUID failure caused by changes in the network card configuration of the device.

[0227] Furthermore, the synchronization module 303 synchronizes the first DUID to the BMC so that the BIOS and the end device can obtain the first DUID from the BMC.

[0228] The modified first DUID is synchronized to the memory space that the BMC opens to the BIOS. This allows the BIOS to retrieve it again after flashing, and also allows the end device to retrieve the first DUID from the memory space that the BMC opens to the BIOS for verification and flag setting.

[0229] The DUID synchronization device provided by this invention sets parameters for the verified DUID and synchronizes the set DUID to the BMC, enabling the flashed BIOS to retrieve the DUID string, ensuring the validity of the DUID and preventing its loss.

[0230] The DUID synchronization device provided by this invention sets parameters for the verified DUID and synchronizes the set DUID to the BMC, enabling the flashed BIOS to retrieve the DUID string, ensuring the validity of the DUID and preventing its loss.

[0231] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can invoke logical instructions in the memory 430 to execute a DUID synchronization method. This method includes: obtaining a string of a device unique identifier (DUID) from the baseboard management controller (BMC); setting parameters on the string to obtain a first DUID if a flag bit in the string indicates that the device parameters in the DUID are inconsistent with the device parameters in the BIOS; the flag bit in the string is determined by the end device based on the verification result of the DUID using the hardware parameters of the BIOS; and synchronizing the first DUID to the BMC so that the BIOS and the end device can obtain the first DUID from the BMC.

[0232] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0233] The aforementioned electronic devices can be implemented in various forms, such as servers. The electronic devices described in the embodiments of this invention may include mobile terminals such as mobile phones, smartphones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), navigation devices, smart bracelets, smartwatches, digital cameras, etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Hereinafter, it is assumed that the electronic device is a mobile terminal. However, those skilled in the art will understand that, in addition to elements specifically designed for mobile purposes, the construction according to embodiments of the invention can also be applied to fixed-type terminals.

[0234] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the DUID synchronization method provided by the above methods. The method includes: obtaining a string of a device unique identifier (DUID) in a baseboard management controller (BMC); setting parameters on the string to obtain a first DUID when it is determined that a flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS; the flag bit of the string is determined by the end device based on the verification result of the DUID by the hardware parameters of the BIOS; and synchronizing the first DUID to the BMC so that the BIOS and the end device can obtain the first DUID from the BMC.

[0235] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a DUID synchronization method provided by the above methods. The method includes: obtaining a string of a device unique identifier (DUID) from a baseboard management controller (BMC); setting parameters on the string to obtain a first DUID when a flag bit in the string indicates that the device parameters in the DUID are inconsistent with the device parameters of the BIOS; the flag bit in the string is determined by an end device based on the verification result of the DUID using the hardware parameters of the BIOS; and synchronizing the first DUID to the BMC so that the BIOS and the end device can obtain the first DUID from the BMC.

[0236] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0237] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0238] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A DUID synchronization method, characterized in that, The execution entity is the Basic Input / Output System (BIOS), and the method includes: The system retrieves the string of the Device Unique Identifier (DUID) from the Baseboard Management Controller (BMC); the BMC contains memory space open to the BIOS; the string includes a flag bit, which is determined by the end device based on the verification result of the DUID according to the hardware parameters of the BIOS; wherein, the end device retrieves the DUID from the memory space open to the BIOS from the BMC, verifies the DUID according to the hardware parameters of the BIOS, sets the flag bit, and returns the DUID with the flag bit set to the BMC to update the memory space open to the BIOS from the BMC; If the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters in the BIOS, the string is parameter-set to obtain a first DUID; The first DUID is synchronized to the BMC so that the BIOS and end devices can obtain the first DUID from the BMC.

2. The DUID synchronization method according to claim 1, characterized in that, Setting parameters for the string includes: When the type of the DUID is DUID-LLT, obtain the device identifier of the BIOS; The string is configured with parameters using the device identifier; If the type of the DUID is DUID-UUID, obtain the universally unique identifier (UUID) of the BIOS. The string is configured with parameters using the UUID.

3. The DUID synchronization method according to claim 2, characterized in that, After obtaining the string of the device unique identifier DUID in the baseboard management controller (BMC), the method further includes: If the flag in the string indicates a change in the BIOS network card configuration, delete the DUID. Determine the type of DUID based on the variables in the BIOS; Generate a second DUID based on the type of the DUID; The second DUID is saved to the NVRAM of the BIOS and synchronized to the BMC so that the BIOS and end devices can obtain the second DUID from the BMC.

4. The DUID synchronization method according to claim 3, characterized in that, The step of generating a second DUID based on the type of the first DUID includes: If the type of the DUID is determined to be DUID-LLT, a timestamp is generated; Obtain the device identifier of the BIOS, and generate the second DUID based on the timestamp and the device identifier; If the type of the DUID is DUID-UUID, obtain the UUID of the BIOS; The second DUID is generated based on the UUID.

5. The DUID synchronization method according to claim 1, characterized in that, The process of obtaining the string of the device unique identifier (DUID) in the baseboard management controller (BMC) includes: Send an identifier acquisition command to the BMC; Receive the string returned by the BMC, the string being determined by the BMC in response to the acquire identifier instruction.

6. A synchronization system for DUID, characterized in that, include: BIOS, BMC, and end devices; The BIOS is used to perform the DUID synchronization method as described in claim 3 or 4; The terminal device is specifically used for: Retrieve DUID from the BMC; If the type of the DUID is determined to be DUID-LLT, the device identifier of the BIOS is retrieved to verify the DUID and obtain the verification result. If the type of the DUID is determined to be DUID-UUID, the BIOS UUID is retrieved to verify the DUID and the verification result is obtained. Based on the verification result, set the flag bit of the DUID string; The BMC is specifically used for: Receive the identifier acquisition command sent by the BIOS; In response to the instruction to obtain the identifier, the DUID is determined in the memory space; Return the DUID to the BIOS; Upon receiving the first DUID or the second DUID synchronized by the BIOS, the memory space is updated using the first DUID or the second DUID.

7. A synchronization device for DUID, characterized in that, include: The module is used to retrieve the string "DUID" from the BMC. The BMC contains memory space that is open to the BIOS; The string includes a flag bit, which is determined by the end device based on the verification result of the DUID according to the hardware parameters of the BIOS. The end device retrieves the DUID from the memory space opened by the BMC to the BIOS, verifies the DUID according to the hardware parameters of the BIOS, sets the flag bit, and returns the DUID with the flag bit set to the BMC to update the memory space opened by the BMC to the BIOS. The setting module is used to set parameters for the string to obtain a first DUID when the flag bit of the string indicates that the device parameters in the DUID are inconsistent with the device parameters in the BIOS. A synchronization module is used to synchronize the first DUID to the BMC so that the BIOS and end devices can obtain the first DUID from the BMC.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the DUID synchronization method as described in any one of claims 1-5.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the DUID synchronization method as described in any one of claims 1-5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the DUID synchronization method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Network card management method and device, equipment and storage medium

    CN114840263A

  • Method and device for generating DUID information data, equipment and medium

    CN114915613A