Time synchronization method, device and system, network equipment and storage medium
By using the time synchronization method of the motherboard real-time clock chip and the substrate management controller chip during the BIOS and OS startup process, the problem of high cost of time synchronization between BMC and OS is solved, and efficient time synchronization and accurate logging without additional hardware are achieved.
Patent Information
- Application Number
- CN202510757085.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, time synchronization of the substrate management controller (BMC) and operating system (OS) requires adding an RTC clock chip and external battery power to the BMC management board, resulting in a high cost of time synchronization.
When the computer is started, the basic input and output system (BIOS) accesses the motherboard real-time clock chip register to obtain time data and passes the data to the real-time clock register of the substrate management controller chip when the operating system is started, time synchronization between BMC and OS is achieved, avoiding additional RTC chips and power supplies.
Without adding additional hardware, realizing time synchronization between BMC and OS reduces the cost of time synchronization, improves the accuracy of time synchronization and logging accuracy, and reduces the risk of time out-of-synchronization caused by BMC upgrades or restarts.
Smart Images

Figure CN120276552A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of servers, and in particular, to a time synchronization method, apparatus, system, network device, and storage medium. Background Art
[0002] Server time synchronization can be used, for example, to indicate a process in which multiple servers in a network or a server and other time elements maintain consistent time. Among them, time synchronization can be performed, for example, through a Real Time Clock (RTC). However, when some embodiments of the platform implement time synchronization between the Baseboard Management Controller (BMC) and the Operating System (OS), an RTC clock chip and an external battery corresponding to the chip need to be added to the BMC management board for power supply. Therefore, the cost of time synchronization will increase. Summary of the Invention
[0003] The present disclosure provides a time synchronization method, apparatus, system, network device, and storage medium. Its main purpose is to solve the problem of relatively high cost of time synchronization.
[0004] According to a first aspect of the present disclosure, a time synchronization method is provided, including: When it is determined that the computer receives a startup instruction, controlling the Basic Input / Output System (BIOS) to access the motherboard real-time clock chip register to obtain first time data; Controlling the Basic Input / Output System (BIOS) to process the first time data to obtain second time data; When it is determined that the operating system starts, controlling the operating system to access the motherboard real-time clock chip register to obtain third time data; Controlling the Basic Input / Output System (BIOS) to send the second time data to the Baseboard Management Controller (BMC) chip, and controlling the Baseboard Management Controller (BMC) chip to store the second time data in the real-time clock register integrated on the Baseboard Management Controller (BMC) chip. When the second time data is used to determine that the time data of the Baseboard Management Controller (BMC) chip meets the data acquisition condition, controlling the Baseboard Management Controller (BMC) chip to access the real-time clock register of the Baseboard Management Controller (BMC) chip to obtain fourth time data, where the fourth time data is data obtained by the real-time clock register of the Baseboard Management Controller (BMC) chip tracking the second time data.
[0005] According to a second aspect of the present disclosure, a time synchronization apparatus is provided, including: A data acquisition unit, configured to control the basic input / output system to access the motherboard real-time clock chip register and acquire first time data when it is determined that the computer receives a start instruction; The data acquisition unit is further configured to control the basic input / output system to process the first time data and acquire second time data; The data acquisition unit is further configured to control the operating system to access the motherboard real-time clock chip register to acquire third time data when it is determined that the operating system starts; A time synchronization unit, configured to control the basic input / output system to send the second time data to the baseboard management controller chip, and control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip. When the second time data is used to determine that the time data of the baseboard management controller chip meets the data acquisition condition, control the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to acquire fourth time data, where the fourth time data is the data obtained by the real-time clock register of the baseboard management controller chip tracking the second time data.
[0006] According to a third aspect of the present disclosure, a time synchronization system is provided, including: a motherboard chip and a baseboard management controller chip. Among them, a motherboard real-time clock chip is provided on the motherboard chip, and a real-time clock register is integrated on the baseboard management controller chip. The motherboard real-time clock chip is configured to acquire and process the time data of the motherboard real-time clock chip to obtain the processed time when it is determined that the computer starts for the basic input / output system. The motherboard real-time clock chip is further configured to control the operating system to access the motherboard real-time clock chip register to acquire third time data when it is determined that the operating system starts. The real-time clock register is configured to store the second time data sent from the basic input / output system to the baseboard management controller chip. When the second time data is used to determine that the time data of the baseboard management controller chip meets the data acquisition condition, control the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to acquire fourth time data, where the fourth time data is the data obtained by the real-time clock register of the baseboard management controller chip tracking the second time data.
[0007] According to a fourth aspect of the present disclosure, a network device is provided, including: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the foregoing first aspect.
[0008] According to a fifth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in the foregoing first aspect.
[0009] According to a sixth aspect of the present disclosure, there is provided a computer program product including a computer program that implements the method described in the foregoing first aspect when executed by a processor.
[0010] Through the present disclosure, in the case of determining that the computer receives a startup instruction, the basic input / output system is controlled to access the motherboard real-time clock chip register to obtain first time data; the basic input / output system is controlled to process the first time data to obtain second time data; in the case of determining that the operating system is started, the operating system is controlled to access the motherboard real-time clock chip register to obtain third time data; the basic input / output system is controlled to send the second time data to the baseboard management controller chip, and the baseboard management controller chip is controlled to store the second time data in the real-time clock register integrated on the baseboard management controller chip. In the case of determining that the time data of the baseboard management controller chip meets the data acquisition condition, the real-time clock register of the baseboard management controller chip can be accessed to obtain fourth time data. Therefore, without additionally adding an RTC chip and an additional power supply on the BMC chip, the time synchronization between the BMC chip and the operating system can be realized, the complexity of the server structure during time synchronization can be reduced, the time asynchronization caused by BMC upgrade or restart can be reduced, the situation where the server cost is relatively high due to the additional power supply can be reduced, the time synchronization accuracy can be improved while reducing the cost of time synchronization, and the accuracy of the BMC log record timestamp can be improved.
[0011] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them: Figure 1 is a schematic flowchart of a time synchronization method provided by an embodiment of the present disclosure; Figure 2 is a schematic flowchart of another time synchronization method provided by an embodiment of the present disclosure; Figure 3 Schematic diagram for exemplifying a time synchronization method provided by an embodiment of the present disclosure; Figure 4 Schematic diagram for exemplifying another time synchronization method provided by an embodiment of the present disclosure; Figure 5 Schematic structural diagram of a time synchronization device provided by an embodiment of the present disclosure. Detailed implementation manners
[0013] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0014] According to some embodiments, in scenarios such as distributed systems, databases, log management, and security authentication, time synchronization is very important. Among them, the Management Engine (ME) can, for example, implement time synchronization. Since the management engine is a low-power, independently operating processor function, it can be used for system management, remote management, and tasks related to system security. Specifically, for example, the management engine is separated from the operating system and can monitor and manage the system when the operating system is not started. The BMC can obtain the system time by accessing the management engine to achieve time synchronization between the BMC and the server operating system OS.
[0015] Among them, in some platforms, since there is no ME, the BMC can only be pushed with the system time once by the Basic Input Output System (BIOS) when the system is powered on. When the BMC is restarted after the system is powered on, the BMC loses its original time, resulting in the BMC time being out of sync with the operating system time. In some embodiments, for the platform BMC time and the operating system time to be synchronized, an RTC clock chip needs to be added to the BMC management board and powered by an external battery. That is, the BIOS can synchronize the system time to the BMC, and the BMC then writes the system into the register of the RTC chip on the BMC management board. The BMC can obtain the time from the register of the RTC chip, making the BMC time and the operating system time synchronized. However, since an additional power supply is required, the server cost is relatively high, and the cost of time synchronization is relatively high.
[0016] The following describes the time synchronization method, device, system, network device, and storage medium of the embodiments of the present disclosure with reference to the accompanying drawings.
[0017] Figure 1 Schematic flowchart of a time synchronization method provided by an embodiment of the present disclosure.
[0018] As Figure 1 shown, the method includes the following steps: Step 101, when it is determined that the computer receives a start instruction, control the Basic Input Output System (BIOS) to access the motherboard Real Time Clock (RTC) chip register to obtain first time data; According to some embodiments, the execution subject of the embodiment of the present disclosure may be, for example, a server.
[0019] Among them, the start instruction may be, for example, an instruction for starting the computer. The start instruction includes, but is not limited to, a voice start instruction, a click start instruction, etc.
[0020] In some embodiments, the Basic Input Output System (BIOS) may store, for example, the most important basic input and output programs of the computer, the power-on self-test program, and the system self-start program.
[0021] Among them, the Real Time Clock (RTC) is a hardware device used to track the current time (such as year, month, day, hour, minute, second). It is usually used in computers and embedded systems to maintain the continuity of time even when the device is turned off or powered off. The RTC can work independently of the system main processor (which may be, for example, a Central Processing Unit (CPU)). Therefore, when the device is powered off, it can still maintain accurate time. The motherboard of the embodiment of the present disclosure may be provided with a Real Time Clock chip, that is, an RTC chip. The motherboard RTC chip register may be used to store the time data tracked by the motherboard RTC chip. Among them, the time data may be stored in the Binary Coded Decimal (BCD) format. The embodiment of the present disclosure does not limit this.
[0022] Among them, the first time data may be, for example, the data obtained when the BIOS accesses the motherboard RTC chip register when the computer starts. The first time data may also be referred to as the time data of the motherboard RTC chip. The first time data may be the time data tracked by the motherboard RTC chip, and the first time data does not specifically refer to a certain fixed data. For example, when the data acquisition time point changes, the first time data may also change accordingly. For example, when the storage format of the first time data changes, the first time data may also change accordingly. Among them, the first in the first time data is used to distinguish it from the remaining time data.
[0023] According to some embodiments, when it is determined that the computer has received a startup instruction, control the basic input / output system to access the motherboard real-time clock chip register to obtain first time data. That is, when the computer starts up, the basic input / output system can access the motherboard real-time clock chip register to obtain the first time data tracked by the motherboard real-time clock chip.
[0024] Step 102, control the basic input / output system to process the first time data to obtain second time data; In some embodiments, the processing of the first time data can be, for example, processed in a pre-set manner, and can also be processed according to the obtained first time data. Specifically, for example, it can include identifying the data format of the first time data to determine the specific processing method.
[0025] According to some embodiments, the second time data can be, for example, the data obtained after processing the first time data. The "second" in the second time data is used to distinguish it from other time data and does not specifically refer to a certain fixed time data. For example, when the data processing method corresponding to the first time data changes, the second time data can also change accordingly. For example, when the data format corresponding to the second time data changes, the second time data can also change accordingly.
[0026] In some embodiments, for example, control the basic input / output system to process the first time data to obtain second time data.
[0027] Step 103, when it is determined that the operating system has started, control the operating system to access the motherboard real-time clock chip register to obtain third time data; According to some embodiments, step 103 and step 104 can be performed independently. For example, only step 103 can be executed without executing step 104. For example, only step 104 can be executed without executing step 103. For example, step 103 and step 104 can also be executed simultaneously. Among them, the specific situation needs to be determined according to the startup information of the operating system, the restart information and the running information of the baseboard management controller chip.
[0028] In some embodiments, the third time data can be, for example, the time data obtained when the operating system starts up and accesses the motherboard real-time clock chip register. The third time data can be, for example, obtained by tracking the first time data. The third time data does not specifically refer to a certain fixed data. For example, when the acquisition time point corresponding to the third time data changes, the third time data can also change accordingly.
[0029] In some embodiments, when it is determined that the operating system has started, control the operating system to access the motherboard real-time clock chip register to obtain third time data.
[0030] Step 104: Control the basic input / output system to send the second time data to the baseboard management controller chip, and control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip. The second time data is used to control the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to obtain the fourth time data when it is determined that the time data of the baseboard management controller chip meets the data acquisition condition. The fourth time data is the data obtained by the real-time clock register of the baseboard management controller chip tracking the second time data.
[0031] According to some embodiments, when the second time data is obtained, the basic input / output system can be controlled to send the second time data to the baseboard management controller chip, and the baseboard management controller chip can be controlled to store the second time data in the real-time clock register integrated on the baseboard management controller chip.
[0032] Among them, the real-time clock register integrated on the baseboard management controller chip can be, for example, the real-time clock register integrated on the baseboard management controller chip. This real-time clock register can also become a real-time clock module, and the embodiments of the present disclosure do not limit this. The real-time clock register does not specifically refer to a certain fixed register. For example, when the storage space corresponding to the real-time clock register changes, the real-time clock register can also change accordingly. That is to say, in the embodiments of the present disclosure, there is a real-time clock register integrated on the baseboard management controller chip, and there is also a real-time clock chip register integrated on the motherboard.
[0033] Among them, the BMC chip can be set on the server motherboard, for example, to monitor and manage the hardware and software of the server. The BMC in the embodiments of the present disclosure can, for example, achieve remote management through an independent management network interface, and can perform operations such as diagnosis, troubleshooting, and configuration management when the server cannot access the operating system or the operating system has an exception. The BMC chip can be composed of a hardware chip and embedded firmware, and can communicate with other components on the server motherboard. Among them, other components can include a processor, a memory, a storage device, etc.
[0034] Among them, the BMC chip does not specifically refer to a certain fixed chip. For example, when the chip identification of the BMC chip changes, the BMC chip can also change accordingly. Among them, the server client can access the BMC through an access tool to obtain server information.
[0035] In some embodiments, for example, the fourth time data may be the time data obtained by tracking the second time data after the real-time clock register stores the second time data. The fourth time data does not specifically refer to a certain fixed data. For example, when the data acquisition condition corresponding to the fourth time data changes, the fourth time data may also change accordingly.
[0036] According to some embodiments, for example, when it is determined that the time data of the baseboard management controller chip meets the data acquisition condition, the baseboard management controller chip is controlled to access the real-time clock register of the baseboard management controller chip to obtain the fourth time data. Therefore, the need of the server BMC for time recording can be met, and the accuracy of log data recording can be improved.
[0037] Wherein, the third time data and the fourth time data are synchronized time data. That is, the time values corresponding to the third time data and the fourth time data are synchronized time values.
[0038] Through the present disclosure, since when it is determined that the computer receives a startup instruction, the basic input / output system is controlled to access the motherboard real-time clock chip register to obtain the first time data; the basic input / output system is controlled to process the first time data to obtain the second time data; when it is determined that the operating system starts, the operating system is controlled to access the motherboard real-time clock chip register to obtain the third time data; the basic input / output system is controlled to send the second time data to the baseboard management controller chip, and the baseboard management controller chip is controlled to store the second time data in the real-time clock register integrated on the baseboard management controller chip, the real-time clock register of the baseboard management controller chip can be accessed to obtain the fourth time data when it is determined that the time data of the baseboard management controller chip meets the data acquisition condition. Therefore, without additionally adding an RTC chip and an additional power supply on the BMC chip, the time synchronization between the BMC chip and the operating system can be realized, the time asynchronization caused by BMC upgrade or restart can be reduced, the situation that the server cost is relatively high due to the additional power supply can be reduced, the cost of time synchronization can be reduced while improving the time synchronization accuracy, and the accuracy of the log record timestamp can be improved.
[0039] It should be noted that the embodiments of the present disclosure may include multiple steps. For the convenience of description, these steps are numbered, but these numbers are not intended to limit the execution time slots and execution orders between the steps; these steps can be implemented in any order, and the embodiments of the present disclosure do not make any limitations in this regard.
[0040] Further, in a possible implementation manner of this embodiment, Figure 2 is a schematic flowchart of another time synchronization method provided by the embodiment of the present disclosure. As Figure 2 shown, the method includes the following steps: Step 201: When it is determined that the computer has received a startup instruction, control the basic input / output system to access the motherboard real-time clock chip register to obtain first time data; Among them, related descriptions can be as described above and will not be elaborated here.
[0041] Among them, the technical solution of the embodiment of the present disclosure can be applied to, for example, the server time synchronization scenario based on a platform without ME.
[0042] According to some embodiments, Figure 3 This is an example schematic diagram of a time synchronization method provided by an embodiment of the present disclosure. As Figure 3 shown, the motherboard can be, for example, a server motherboard. An RTC chip can be, for example, configured on the server motherboard. When it is determined that the computer starts up, the BIOS system can perform initialization operations during the system self-check process. For example, it can control the basic input / output system to obtain the data in the RTC chip, that is, time data, by accessing the motherboard real-time clock chip register.
[0043] Step 202: Control the basic input / output system to process the first time data to obtain second time data; Among them, related descriptions can be as described above and will not be elaborated here.
[0044] According to some embodiments, controlling the basic input / output system to process the first time data to obtain second time data includes: Controlling the basic input / output system to perform format conversion processing on the first time data, converting the first time data into data in a preset time format to obtain the second time data, and displaying the second time data on the startup interface of the computer. Therefore, the accuracy of the time data acquisition format can be improved, the convenience of time data transmission can be improved, and the situation of waste of transmission resources caused by inconsistent time data formats can be reduced. Among them, the preset format can be, for example, a standard time format or a specified format.
[0045] In some embodiments, the second time data can be displayed on the startup interface of the computer. Specifically, for example, the time or date part can be displayed on the startup interface. The display method for the second time data is not limited. For example, it can be displayed at a preset position on the display interface, and can also be displayed in a preset font size.
[0046] Step 203: When it is determined that the operating system starts up, control the operating system to access the motherboard real-time clock chip register to obtain third time data; Among them, related descriptions can be as described above and will not be elaborated here.
[0047] According to some embodiments, when the operating system starts up, time data can be obtained from the motherboard RTC chip and the synchronization of the time data can be maintained.
[0048] Step 204: Control the basic input / output system to send the second time data to the baseboard management controller chip, and control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip. Among them, the related descriptions can be as described above, and will not be elaborated here.
[0049] According to some embodiments, a real-time clock module can be integrated in the BMC chip. The BMC chip can also include other modules, which are not limited in the embodiments of the present disclosure.
[0050] According to some embodiments, controlling the basic input / output system to send the second time data to the baseboard management controller chip includes: Control the basic input / output system to send an Intelligent Platform Management Interface command to the baseboard management controller chip, where the Intelligent Platform Management Interface command includes the second time data. Therefore, the transmission of time data can be carried out through the Intelligent Platform Management Interface (IPMI) command, which can improve the convenience of time transmission.
[0051] Among some embodiments, the Intelligent Platform Management Interface (IPMI) command can be, for example, a command for sending the second time data between the basic input / output system and the baseboard management controller chip. The IPMI command does not specifically refer to a certain fixed instruction. For example, when the second time data included in the IPMI command changes, the IPMI command can also change accordingly.
[0052] According to some embodiments, as Figure 3 shown, the BIOS system can send the time data in the motherboard RTC chip to the BMC through the IPMI command, for example.
[0053] Step 205: When it is determined that the baseboard management controller chip restarts, control the baseboard management controller chip to access the real-time clock register integrated on the baseboard management controller chip to obtain the fourth time data. Among them, the related descriptions can be as described above, and will not be elaborated here.
[0054] According to some embodiments, at least one of Step 205 and Step 206 can be selected for execution, for example.
[0055] According to some embodiments, for example, when the BMC restarts, since the standby power does not lose power, the real-time clock register integrated on the baseboard management controller chip can continue to run. Therefore, during the startup initialization process of the BMC, the current time can be obtained by accessing the real-time clock register integrated on the baseboard management controller chip, thereby achieving synchronization between the BMC and the operating time, and an additional power supply needs to be set for the RTC chip, which can reduce the time synchronization cost.
[0056] Step 206, when it is determined that the baseboard management controller chip is in an operating state, control the baseboard management controller chip to access the real-time clock register integrated on the baseboard management controller chip once every preset time period to obtain the fourth time data.
[0057] The relevant descriptions can be as described above, and will not be elaborated here.
[0058] Among them, when storing the second time data into the real-time clock register integrated on the baseboard management controller chip, the BMC can obtain the time data from the real-time clock register integrated on the baseboard management controller chip once every 10 minutes. Therefore, during the operation of the BMC, the current time can be obtained by accessing the real-time clock register integrated on the baseboard management controller chip, thereby achieving synchronization between the BMC and the operating time, and an additional power supply needs to be set for the RTC chip, which can reduce the time synchronization cost.
[0059] According to some embodiments, controlling the basic input / output system to send the second time data to the baseboard management controller chip includes: When it is determined that the time synchronization information meets the information acquisition condition, obtain the time synchronization information of the operating system and the baseboard management controller chip, and execute the time synchronization measure corresponding to the time synchronization information. Therefore, the synchronization between the BMC and the operating system time can be improved.
[0060] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation manner.
[0061] According to some embodiments, Figure 4 is an example schematic diagram of another time synchronization method provided by the embodiments of the present disclosure. As Figure 4As shown, a Real-Time Clock (RTC) module can be integrated in the BMC chip. After time calibration, it can meet the time recording requirements of the server BMC. Among them, an RTC chip is equipped on the server motherboard. When the computer starts, the BIOS will be initialized during the system self-check process. The BIOS will obtain the data in the RTC chip by accessing the registers of the motherboard RTC chip. Among them, the data can be stored in BCD (Binary Coded Decimal) format, for example. After reading the RTC data, the BIOS will convert it into a standard time format and display it in the time / date part of the startup interface. At the same time, the BIOS can send the time in the motherboard RTC chip to the BMC through IPMI commands. After the operating system starts, it will obtain the time from the motherboard RTC chip registers and keep it synchronized.
[0062] Among them, after receiving the time sent by the BIOS, the BMC writes the time into the RTC module register in the BMC chip; and the BMC can obtain the time from the RTC module register every 10 minutes.
[0063] Among them, when the BMC restarts, since the standby power does not lose power, the RTC module in the BMC chip will continue to run. The BMC obtains the current time by accessing the RTC module register during the startup initialization process, thus realizing the synchronization of the BMC and the operating system time.
[0064] According to an embodiment of the present disclosure, the present disclosure also provides a time synchronization device.
[0065] Exemplarily, Figure 5 It is a schematic structural diagram of a time synchronization device provided by an embodiment of the present disclosure. The time synchronization device 500 includes: a data acquisition unit 501 and a time synchronization unit 502; among them, The data acquisition unit 501 is configured to control the Basic Input / Output System to access the motherboard real-time clock chip register and obtain first time data when it is determined that the computer receives a startup instruction; The data acquisition unit 501 is further configured to control the Basic Input / Output System to process the first time data and obtain second time data; The data acquisition unit 501 is further configured to control the operating system to access the motherboard real-time clock chip register to obtain third time data when it is determined that the operating system starts; The time synchronization unit 502 is used to control the basic input / output system to send second time data to the baseboard management controller chip, and control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip. The second time data is used to control the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to obtain fourth time data when it is determined that the time data of the baseboard management controller chip meets the data acquisition condition. The fourth time data is the data obtained by the real-time clock register of the baseboard management controller chip tracking the second time data.
[0066] Further, after the time synchronization unit 502 is used to control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip, it is specifically used for: When it is determined that the baseboard management controller chip restarts, control the baseboard management controller chip to access the real-time clock register integrated on the baseboard management controller chip to obtain fourth time data.
[0067] Further, after the time synchronization unit 502 is used to control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip, it is specifically used for: When it is determined that the baseboard management controller chip is in the running state, control the baseboard management controller chip to access the real-time clock register integrated on the baseboard management controller chip once every preset time period to obtain fourth time data.
[0068] Further, when the data acquisition unit 501 is used to control the basic input / output system to process the first time data and obtain the second time data, it is specifically used for: Control the basic input / output system to perform format conversion processing on the first time data, convert the first time data into data in a preset time format, obtain the second time data, and display the second time data on the startup interface of the computer.
[0069] Further, when the data acquisition unit 501 is used to control the basic input / output system to send the second time data to the baseboard management controller chip, it is specifically used for: Control the basic input / output system to send an intelligent platform management interface command to the baseboard management controller chip, where the intelligent platform management interface command includes the second time data.
[0070] Further, when the time synchronization unit 502 is used to control the basic input / output system to send the second time data to the baseboard management controller chip, it is specifically used for: When it is determined that the time synchronization information meets the information acquisition condition, acquire the time synchronization information of the operating system and the baseboard management controller chip, and execute the time synchronization measure corresponding to the time synchronization information.
[0071] It should be noted that the description of the features in the embodiments corresponding to the time synchronization device can refer to the relevant description of the embodiments corresponding to the time synchronization method, and will not be elaborated here one by one.
[0072] An embodiment of the present disclosure also provides a time synchronization system, including: a main board chip and a baseboard management controller chip. Among them, a main board real-time clock chip is provided on the main board chip, and a real-time clock register is integrated on the baseboard management controller chip. The main board real-time clock chip is used to obtain and process the time data of the main board real-time clock chip when the basic input / output system determines that the computer starts, and obtain the processed time. The main board real-time clock chip is also used to control the operating system to access the main board real-time clock chip register to obtain the third time data when the operating system starts. The real-time clock register is used to store the second time data sent from the basic input / output system to the baseboard management controller chip. When the second time data is used to determine that the time data of the baseboard management controller chip meets the data acquisition condition, it controls the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to obtain the fourth time data.
[0073] An embodiment of the present disclosure also provides a network device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned time synchronization method embodiments.
[0074] An embodiment of the present disclosure also provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above-mentioned time synchronization method embodiments when running.
[0075] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (abbreviated as ROM), random access memory (abbreviated as RAM), mobile hard disk, magnetic disk or optical disc and other media that can store computer programs.
[0076] An embodiment of the present disclosure also provides a computer program product. The above-mentioned computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-mentioned time synchronization method embodiments.
[0077] Embodiments of the present disclosure also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps in any of the above-described embodiments of the time synchronization method.
[0078] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.
[0079] The above has introduced in detail a time synchronization method provided by the present disclosure. Specific examples are used herein to illustrate the principle and implementation manner of the present disclosure. The description of the above embodiments is only used to help understand the method and its core idea of the present disclosure. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present disclosure, several improvements and modifications can be made to the present disclosure, and these improvements and modifications also fall within the protection scope of the claims of the present disclosure.
Claims
1. A time synchronization method, characterized in that Including: When it is determined that the computer receives a startup instruction, control the basic input / output system to access the motherboard real-time clock chip register to obtain first time data; Control the basic input / output system to process the first time data to obtain second time data; When it is determined that the operating system starts, control the operating system to access the motherboard real-time clock chip register to obtain third time data; Control the basic input / output system to send the second time data to the baseboard management controller chip, and control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip. When it is determined that the time data of the baseboard management controller chip meets the data acquisition condition, control the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to obtain fourth time data. The fourth time data is the data obtained by the real-time clock register of the baseboard management controller chip tracking the second time data.
2. The method according to claim 1, characterized in that, After controlling the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip, it further includes: When it is determined that the baseboard management controller chip restarts, control the baseboard management controller chip to access the real-time clock register integrated on the baseboard management controller chip to obtain fourth time data.
3. The method according to claim 1, wherein After controlling the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip, it further includes: When it is determined that the baseboard management controller chip is in an operating state, control the baseboard management controller chip to access the real-time clock register integrated on the baseboard management controller chip once every preset time period to obtain fourth time data.
4. The method according to claim 1, wherein The control of the basic input / output system to process the first time data to obtain second time data includes: Control the basic input / output system to perform format conversion processing on the first time data, convert the first time data into time data in a preset time format to obtain second time data, and display the second time data on the startup interface of the computer.
5. The method according to claim 1, wherein The control of the basic input / output system to send the second time data to the baseboard management controller chip includes: Control the basic input / output system to send an intelligent platform management interface command to the baseboard management controller chip, where the intelligent platform management interface command includes the second time data.
6. The method according to claim 1, wherein The control of the basic input / output system to send the second time data to the baseboard management controller chip includes: When it is determined that the time synchronization information meets the information acquisition condition, obtain the time synchronization information between the operating system and the baseboard management controller chip, and execute the time synchronization measures corresponding to the time synchronization information.
7. A time synchronization device, characterized in that, Including: A data acquisition unit, configured to control the basic input / output system to access the motherboard real-time clock chip register and acquire first time data when it is determined that the computer receives a startup instruction; The data acquisition unit is further configured to control the basic input / output system to process the first time data to acquire second time data; The data acquisition unit is further configured to control the operating system to access the motherboard real-time clock chip register to acquire third time data when it is determined that the operating system is started; A time synchronization unit, configured to control the basic input / output system to send the second time data to the baseboard management controller chip, and control the baseboard management controller chip to store the second time data in the real-time clock register integrated on the baseboard management controller chip. When the second time data is used to determine that the time data of the baseboard management controller chip meets the data acquisition condition, control the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to acquire fourth time data, where the fourth time data is data obtained by the real-time clock register of the baseboard management controller chip tracking the second time data.
8. A time synchronization system, characterized in that, Comprising: A motherboard chip and a baseboard management controller chip. Among them, a motherboard real-time clock chip is provided on the motherboard chip, and a real-time clock register is integrated on the baseboard management controller chip. The motherboard real-time clock chip is used to acquire and process the time data of the motherboard real-time clock chip to obtain the processed time when the basic input / output system determines that the computer is started. The motherboard real-time clock chip is further used to control the operating system to access the motherboard real-time clock chip register to acquire third time data when it is determined that the operating system is started. The real-time clock register is used to store the second time data sent from the basic input / output system to the baseboard management controller chip. When the second time data is used to determine that the time data of the baseboard management controller chip meets the data acquisition condition, control the baseboard management controller chip to access the real-time clock register of the baseboard management controller chip to acquire fourth time data, where the fourth time data is data obtained by the real-time clock register of the baseboard management controller chip tracking the second time data.
9. A network device, characterized in that Comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 6.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
BMC time acquiring method, device, equipment and storable medium
CN108415817A
BMC time retention method and device, electronic equipment and storage medium
CN110008105A
System clock synchronization method, device and system and storage medium
CN114779883A
Server time calibration method and device, equipment and medium
CN117148918A
Clock synchronization method and device, server, storage medium and program product
CN119576070A