Power-on control method and device, electronic equipment and storage medium

By building a multi-strategy selection solution for power-on configuration options and function tags, combined with BIOS and BMC, the high operation and maintenance costs and poor user experience when the server is powered abnormally, and the server is stable power-on and automatic control in different scenarios is achieved.

CN120447716APending Publication Date: 2025-08-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, when the server power supply is abnormal, the operation and maintenance cost is high, the user experience is poor, and it is not applicable to multiple scenarios. There are defects in manual inspection and automatic CPU regulation.

Method used

Build power-on configuration options and functional tags, combine BIOS with BMC, and provide multiple policy selection power-on solutions. Users can customize power-on policies through scripts to avoid CPU and BMC control conflicts, and prioritize BMC control.

Benefits of technology

It reduces operation and maintenance workload, reduces operation and maintenance costs, improves user experience, and ensures stable power-on of the server in different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120447716A_ABST
    Figure CN120447716A_ABST
Patent Text Reader

Abstract

The invention discloses a power-on control method and device, electronic equipment and a storage medium, and relates to the technical field of servers, a user can select different power-on modes according to different service scenes through a constructed multi-strategy power-on selection scheme, and the power-on configuration options are provided, so that the user can select different power-on modes according to different service scenes. A user can adjust a power-on strategy through script customization, so that the maintenance workload is reduced; when a user executes batch racking or repeated power-on and power-off verification operation of the server, automatic power-on and power-off of the server can be controlled by modifying the default function tag of the power-on configuration option, operation and maintenance personnel do not need to be on duty on site, the investment of operation and maintenance cost is reduced, and the operation efficiency is improved by setting the power-on configuration option and the function tag. In addition, conflicts caused by CPU automatic control power-on and BMC control power-on can be avoided, priority execution of BMC control power-on is better guaranteed, and a user can conveniently debug the server according to different application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a power-on control method, device, electronic device, and storage medium. Background Art

[0002] In the related art, when the power supply of the server is abnormal, in order to ensure the safety of the server, the following two power-on methods are mainly used to power on the server, including: (1) manual troubleshooting and manual power-on; (2) automatic control by the CPU (Central Processing Unit); However, the power-on solution for abnormal power supply has the following problems: (1) When the power supply of the user's computer room server is abnormal or it is necessary to repeatedly power on and off to verify the stability of the server, if the manual troubleshooting and manual power-on solution is adopted, the operation and maintenance personnel will need to watch for a long time, which increases the operation and maintenance cost. If the operation and maintenance personnel fail to find that the server is not turned on or the power supply is abnormal in time, it will affect the work efficiency of the server and cause a waste of time; (2) For users, if the power supply is abnormal during the operation of the server and cannot be quickly restored or the root cause of the problem cannot be quickly identified, the user experience will be reduced; (3) The automatic control function of the CPU is to notify the CPLD (Complex Programmable Logic Controller) when it detects that the server cannot be turned on. Device, complex programmable logic device) is automatically powered on immediately. At this time, the hardware environment of some servers that have not been powered on is not yet ready. Immediate power-on will cause hardware environment abnormalities and the server will not be able to power on. At the same time, some users require that the environment be preserved for R&D analysis when a server abnormality occurs. Enabling this function will destroy the abnormal environment and have an adverse impact on problem analysis. Summary of the Invention

[0003] The present application provides a power-on control method, device, electronic device and storage medium to at least solve the problems of high operation and maintenance costs, poor user experience and inability to apply to multiple scenarios in related technologies.

[0004] This application provides a power-on control method, including:

[0005] Construct power-on configuration options and corresponding function labels for the power-on configuration options;

[0006] In response to receiving a server power-on request, parsing the server power-on request, and determining a default function label corresponding to a power-on configuration option according to a parsed result of the server power-on request, where the default function label can be dynamically adjusted;

[0007] Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies;

[0008] Power on the server based on the target power-on policy.

[0009] The present application also provides a power-on control device, comprising:

[0010] A construction module, used for constructing power-on configuration options and function labels corresponding to the power-on configuration options;

[0011] a parsing module, configured to parse the server power-on request in response to receiving the server power-on request, and determine a default function label corresponding to the power-on configuration option according to the parsing result of the server power-on request, wherein the default function label can be dynamically adjusted;

[0012] A determination module, configured to determine a target power-on strategy for the server based on a default function label corresponding to a power-on configuration option and a mapping relationship between the function label and the power-on strategy;

[0013] The power-on module is used to power on the server based on the target power-on policy.

[0014] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the following steps of the power-on control method when executing the computer program:

[0015] Construct power-on configuration options and corresponding function labels for the power-on configuration options;

[0016] In response to receiving a server power-on request, parsing the server power-on request, and determining a default function label corresponding to a power-on configuration option according to a parsed result of the server power-on request, where the default function label can be dynamically adjusted;

[0017] Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies;

[0018] Power on the server based on the target power-on policy.

[0019] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the following steps of the power-on control method are implemented:

[0020] Construct power-on configuration options and corresponding function labels for the power-on configuration options;

[0021] In response to receiving a server power-on request, parsing the server power-on request, and determining a default function label corresponding to a power-on configuration option according to a parsed result of the server power-on request, where the default function label can be dynamically adjusted;

[0022] Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies;

[0023] Power on the server based on the target power-on policy.

[0024] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the following steps of the power-on control method:

[0025] Construct power-on configuration options and corresponding function labels for the power-on configuration options;

[0026] In response to receiving a server power-on request, parsing the server power-on request, and determining a default function label corresponding to a power-on configuration option according to a parsed result of the server power-on request, where the default function label can be dynamically adjusted;

[0027] Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies;

[0028] Power on the server based on the target power-on policy.

[0029] This application constructs a multi-strategy power-on selection solution, which allows users to choose different power-on methods according to different business scenarios. Through the provided power-on configuration options, users can adjust the power-on strategy through script customization, reducing maintenance workload; when users perform batch deployment of servers or repeated power-on and power-off verification operations, they can control the automatic power-on and power-off of the server by modifying the default function label of the power-on configuration option, without the need for on-site operation and maintenance personnel, reducing the investment in operation and maintenance costs. Through the setting of power-on configuration options and function labels, conflicts caused by automatic control of CPU power-on and BMC control power-on can also be avoided, better ensuring the priority execution of BMC control power-on, so that users can debug servers for different application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0031] Figure 1 An application environment diagram of a power-on control method is provided for an embodiment of the present application;

[0032] Figure 2 A schematic diagram of the overall flow of a power-on control method is provided for an embodiment of the present application;

[0033] Figure 3 Another overall flow chart of a power-on control method is provided for an embodiment of the present application;

[0034] Figure 4 A structural block diagram of a power-on control device is provided for an embodiment of the present application;

[0035] Figure 5 FIG. 1 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0036] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0038] It should be noted that the terms "S1", "S2", etc. are used only for the purpose of describing the steps and do not specifically refer to the order or sequence, nor are they used to limit this application. They are merely for the convenience of describing the method of this application and should not be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0039] In the current server design, the role of BIOS (Basic Output and Input) is no longer simply to guide the boot. How to more intelligently control the power supply is more important. Therefore, a multi-strategy power-on control solution has become a key research topic of BIOS, which is used to ensure that the server has enough options to control the system power-on when the power is abnormally cut off. In the development and design stage of the server, users are most concerned about whether the server can be powered on normally. They do not pay much attention to the abnormal power off or rapid recovery after the power off. During the extensive use of the server, it is found that improper power-on strategy will lead to the following potential hazards and risks: (1) Data anomaly: When reading and writing data, the user server generally has power-off protection to protect the data when the server power supply is abnormal. At this time, an inappropriate power-on strategy will affect the settings of the user server; (2) Hardware damage: An abnormal power-on strategy will cause the server hardware to be powered on when it is not ready, causing the hardware to be subjected to current shock, thereby damaging the server's electronic components; (3) Long-term service interruption: Abnormal power off of the server will cause server application and service anomalies, which will have a negative impact on customers. If the server is not If the system cannot be restored as soon as possible, it will inevitably affect the user experience and cause great economic losses to users, thus affecting users' trust in server suppliers. In order to avoid the impact of improper power-on strategies after abnormal power outages or power outages, major manufacturers have made strategies suitable for their own servers, such as: (1) Sequential power-on: In an environment with multiple servers or server components, each server or component is powered on in a certain order to ensure the stable startup and operation of the system; (2) Redundant power supply power-on strategy: Servers are usually equipped with multiple power supply units to provide system reliability and stability. In this case, the computer room will make reasonable adjustments to the power-on and working modes of multiple power supplies to prepare for emergencies; (3) Delayed power-on strategy: After receiving the power-on command, the server does not power on immediately, but waits for a period of time before performing the power-on operation. In order to be able to control the power-on of the server, an automatic power-on control strategy is reserved when the CPU is designed. When the CPU detects that the server is in the off state, the BIOS will automatically write the power-on control signal into the corresponding CPU register. Then the CPU notifies the CPLD (Complex Power Supply Device) to power on the server. Programmable Logic Device (CPLD) draws power to the server, but this solution is not conducive to intelligent power-on management and control.

[0040] To solve the above technical problems, the present application provides a power-on control method, device, electronic device and storage medium. By combining BIOS and BMC, a multi-strategy power-on selection scheme is generated. Based on the multi-strategy power-on control scheme, users can select different power-on methods according to different business scenarios, and provide corresponding Setup options. Users can adjust the power-on strategy through BIOS script customization, reducing maintenance workload; when users perform batch deployment of servers or repeated power-on and power-off verification operations, there is no need for operation and maintenance personnel to be on duty on site. The automatic power-on and power-off of the server can be controlled by modifying the default function label of the BIOS option through the script, reducing the investment in operation and maintenance costs; through the promotion and execution of this strategy, the conflict caused by CPU automatic power-on control and BMC control power-on is avoided, and the priority execution of BMC control power-on is better guaranteed, so that users can debug the server for different application scenarios.

[0041] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0042] The power-on control method provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with a data processing platform provided on the server 104 via a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0043] like Figure 2 As shown, the embodiment of the present application provides a power-on control method, which is applied to Figure 1 The following steps are used as an example to illustrate the terminal:

[0044] S1: Construct power-on configuration options and corresponding function labels of the power-on configuration options.

[0045] It should be noted that the power-on configuration option refers to the Setup option, also known as the BIOS option. The power-on configuration option may include a first power-on configuration option, a second power-on configuration option and a third power-on configuration option, wherein the first power-on configuration option is AC Power Loss, the second power-on configuration option is Restore onAC Power Loss, and the third power-on configuration option is CPU Power Loss Control. The function labels corresponding to the power-on configuration options include a first function label, a second function label, a third function label, a fourth function label and a fifth function label, wherein the first function label is Power On, the second function label is Power Off, the third function label is Previous, the fourth function label is Enabled, and the fifth function label is Disabled.

[0046] In some specific implementations, constructing the power-on configuration options and the function labels corresponding to the power-on configuration options includes:

[0047] Constructing a first power-on configuration option, the first power-on configuration option is used to synchronize the power-on strategy of the baseboard management controller to the basic input and output system, that is, AC Power Loss is used to synchronize the power-on strategy of the BMC to the BIOS;

[0048] Determine a function tag of the first power-on configuration option, where the function tag includes at least a first function tag, a second function tag, and a third function tag;

[0049] Based on the first power-on configuration option and the function label corresponding to the first power-on configuration option, a one-to-one mapping relationship is generated, and the selected first target function label is defined as the default function label corresponding to the first power-on configuration option, wherein the default function label can be selected according to actual needs. Preferably, the default function label corresponding to the first power-on configuration option of this application is Power Off.

[0050] In some specific implementations, constructing the power-on configuration options and the function labels corresponding to the power-on configuration options further includes:

[0051] Construct a second power-on configuration option, which is used to synchronize the power-on policy of the basic input and output system to the baseboard management controller. That is, Restore on AC Power Loss is used to synchronize the power-on policy of the BIOS to the BMC.

[0052] Determine a function label of a second power-on configuration option, where the function label includes at least a first function label, a second function label, and a third function label, wherein the function label of the second power-on configuration option is the same as the function label of the first power-on configuration option;

[0053] Based on the second power-on configuration option and the function label corresponding to the second power-on configuration option, a one-to-one mapping relationship is generated, and the selected second target function label is defined as the default function label corresponding to the second power-on configuration option, wherein the default function label can be selected according to actual needs. Preferably, the default function label corresponding to the second power-on configuration option of the present application is Power Off.

[0054] In the above implementation, by setting the first power-on configuration option and the second power-on configuration option, the BMC power-on policy is synchronized to the BIOS and the BIOS power-on policy is synchronized to the BMC respectively, so as to realize the interaction between the BIOS and the BMC regarding the power-on signal. The power-on policies of different scenarios are distinguished based on the two different options, and the power-on mode is managed by the BMC. Since the BMC is a remote control interface, it is more convenient to operate, and the server power-on process is optimized. The adjustment of the server power-on policy in different application scenarios is realized based on the BMC, and the corresponding Setup option is provided to facilitate users to adjust the power-on policy, thereby improving the user experience.

[0055] In some specific implementations, constructing the power-on configuration options and the function labels corresponding to the power-on configuration options further includes:

[0056] Construct the third power-on configuration option, which is used to control whether the automatic power-on function of the central processing unit is enabled. That is, CPU Power Loss Control is used to control whether the automatic power-on function of the CPU is enabled.

[0057] determining a function tag of a third power-on configuration option, where the function tag includes at least a fourth function tag and a fifth function tag;

[0058] Based on the third power-on configuration option and the function label corresponding to the third power-on configuration option, a one-to-one mapping relationship is generated, and the selected third target function label is defined as the default function label corresponding to the third power-on configuration option, wherein the default function label can be selected according to actual needs. Preferably, the default function label corresponding to the third power-on configuration option of this application is Disabled.

[0059] In the above embodiment, whether to perform the CPU automatic power-on control operation is determined by setting the third power-on configuration option, thereby avoiding the conflict caused by the CPU automatic power-on control and the BMC control power-on control, and providing a guarantee for the priority execution of the BMC control power-on strategy.

[0060] S2: In response to receiving the server power-on request, parsing the server power-on request, and determining a default function label corresponding to the power-on configuration option according to the parsing result of the server power-on request. The default function label can be dynamically adjusted.

[0061] It should be noted that the server power-on request may include user business scenarios and user power-on requirements. The default function label corresponding to the power-on configuration option set in step S1 may be dynamically adjusted according to the parsing result of the server power-on request.

[0062] In some specific implementations, determining the default function tag corresponding to the power-on configuration option according to the parsing result of the server power-on request includes:

[0063] Based on the parsing result, determine the function labels corresponding to the first power-on configuration option, the second power-on configuration option, and the third power-on configuration option corresponding to the server power-on request, that is, based on the parsing result, determine the function label corresponding to the Setup option selected by the user according to business requirements;

[0064] comparing the function label of the first power-on configuration option corresponding to the server power-on request with the default function label of the first power-on configuration option, and in response to an unsuccessful comparison, adjusting the default function label of the first power-on configuration option based on the function label of the first power-on configuration option corresponding to the server power-on request, i.e., defining the function label of the first power-on configuration option corresponding to the server power-on request as the default function label of the first power-on configuration option; and if the comparison is successful, not making any adjustment;

[0065] comparing the function label of the second power-on configuration option corresponding to the server power-on request with the default function label of the second power-on configuration option, and in response to an unsuccessful comparison, adjusting the default function label of the second power-on configuration option based on the function label of the second power-on configuration option corresponding to the server power-on request, i.e., defining the function label of the second power-on configuration option corresponding to the server power-on request as the default function label of the second power-on configuration option; and if the comparison is successful, not making any adjustment;

[0066] The function tag of the third power-on configuration option corresponding to the server power-on request is compared with the default function tag of the third power-on configuration option. In response to an unsuccessful comparison, the default function tag of the third power-on configuration option is adjusted based on the function tag of the third power-on configuration option corresponding to the server power-on request, that is, the function tag of the third power-on configuration option corresponding to the server power-on request is defined as the default function tag of the third power-on configuration option. If the comparison is successful, no adjustment is made.

[0067] Exemplarily, the three schemes for controlling the power-on policy can adjust the default function labels of the Setup options according to the user's business needs: (1) If the user wants the server's power-on to be completely controlled by the BMC, then set the default function label of CPU Power Loss Control to Disabled and Restore on AC Power Loss to Power Off, and the BIOS will completely synchronize the default function label of the BMC; (2) If the user wants to set the power-on policy by himself, then set the default function label of CPU Power Loss Control to Disabled and AC Power Loss to Power Off. The user can modify AC Loss Control or Restore on AC Power Loss on the BMC Web or Setup to adjust the power-on policy; (3) If the user wants the server's power-on to be controlled by the CPU, then set AC Power Loss to Power Off, Restore on AC Power Loss to Power Off, and CPU Power Loss Control to Enabled. That is, the user can dynamically select the default function label corresponding to the server's power-on policy according to his own business needs and problem handling needs.

[0068] In the above implementation, based on the set Setup option, the user can adjust the power-on strategy through BIOS script customization, so that the user can choose different power-on methods according to different business scenarios, reducing the maintenance workload. Based on this, when the user performs batch deployment of servers or repeated power-on and power-off verification operations, the user can control the automatic power-on and power-off of the server by modifying the default function label of the BIOS option through the script, without the need for on-site operation and maintenance personnel, thereby reducing the investment in operation and maintenance costs.

[0069] S3: Determine a target power-on policy for the server based on the default function label corresponding to the power-on configuration option and the mapping relationship between the function label and the power-on policy.

[0070] It should be noted that the mapping relationship between function labels and power-on policies includes the following: the power-on policy corresponding to the function label Power On is that when a server power supply anomaly occurs, the server will power on immediately after power is restored; the power-on policy corresponding to Power Off is that when a server power supply anomaly occurs, the server will be in the shutdown state after power is restored, waiting for manual power-on. That is, after the power outage is restored, the server remains in the shutdown state; the power-on policy corresponding to Previous is that when a server power supply anomaly occurs, the server waiting for power to be restored will remain in the state when the server anomaly occurred. If the server was in the power-on state when the power anomaly occurred, Previous is Power On; if the server was in the power-off state when the power anomaly occurred, Previous is Power Off; the power-on policy corresponding to Enabled is that the CPU-controlled automatic power-on function is enabled. The BIOS will delay the action of writing registers to control server power-on for a preset time. The preset time can be set according to actual conditions, and the preferred value is one minute. This function is to avoid the situation where the BMC hangs and the server cannot be automatically powered on; the power-on policy corresponding to Disabled is that the CPU-controlled automatic power-on function is disabled. In this case, whether the server is powered on is completely controlled by the BMC.

[0071] In some specific implementations, determining a target power-on policy for the server based on a default function label corresponding to the power-on configuration option and a mapping relationship between the function label and the power-on policy includes:

[0072] In response to the server being in a first stage of startup, reading a power-on policy of a baseboard management controller and a default function tag corresponding to a first power-on configuration option, wherein the first stage of startup refers to a pre-DXE stage of server startup, the power-on policy of the baseboard management controller is read through an IPMI command sent by the BIOS, and the default function tag corresponding to the first power-on configuration option is read through the BIOS;

[0073] In response to reading the power-on policy of the baseboard management controller, determining the power-on policy corresponding to the first power-on configuration option based on the default function label corresponding to the first power-on configuration option and the mapping relationship between the function label and the power-on policy, and in response to not reading the power-on policy of the baseboard management controller, keeping the default function label corresponding to the first power-on configuration option unchanged;

[0074] comparing the power-on strategy of the baseboard management controller with the power-on strategy corresponding to the first power-on configuration option;

[0075] In response to an unsuccessful comparison, the default function label corresponding to the first power-on configuration option is adjusted based on the power-on policy of the baseboard management controller, that is, the BIOS overwrites the default function label of the AC Loss Control with the function label corresponding to the power-on policy obtained by the BMC. In response to a successful comparison, the default function label corresponding to the first power-on configuration option remains unchanged.

[0076] In response to the adjustment being completed, reading a default function tag corresponding to the third power-on configuration option, and when the default function tag corresponding to the third power-on configuration option is a fourth function tag, disabling the automatic power-on function of the central processing unit;

[0077] When the default function tag corresponding to the third power-on configuration option is the fifth function tag, the server status is checked within a preset time to see whether it meets a preset standard. As mentioned above, the preferred value of the preset time is one minute. That is, within one minute, the BIOS will continuously check whether the server status meets the preset standard. The preset standard refers to whether the server is in the Power On state. If the preset standard is met, the server is in the Power On state. If the preset standard is not met, the server is in the Power Off state.

[0078] In response to meeting the preset criteria, after the preset time period, the automatic power-on function of the central processing unit is enabled, and in response to not meeting the preset criteria, the automatic power-on function of the central processing unit is disabled;

[0079] In response to the server being in a second stage of startup, reading a default function tag corresponding to a second power-on configuration option, wherein the second stage of startup refers to the server being in a late DXE stage of startup;

[0080] In response to the default function tag corresponding to the second power-on configuration option not being the second function tag, synchronizing the power-on policy corresponding to the default function tag to the baseboard management controller.

[0081] Specifically, such as Figure 3As shown, first, in the early DXE stage of server startup, BIOS will send IPMI commands to BMC to read BMC's power-on policy. At the same time, BIOS will also read the default function tag of AC Loss Control. If the function tag corresponding to BMC's power-on policy is different from the default function tag of AC Loss Control, BIOS will overwrite the default function tag of AC Loss Control with the function tag obtained from BMC, so that the power-on policy of BIOS is synchronized with BMC. There is also an AC Loss Control option in BMC Web. Users can change the power-on policy by manually modifying the default function tag of the option on BMC Web, and then synchronize the default function tag of BMC to BIOS. If the BMC status is abnormal and BIOS cannot obtain the power-on policy of BMC, then BIOS will keep the default function tag of AC Loss Control. Secondly, BIOS will read CPU Power Loss. The default function label of Control, when its default function label is Disabled, the BIOS will disable the function of writing registers to control power-on, so that the CPU cannot control the power-on of the server; when its default function label is Enabled, the BIOS will delay the action of writing CPU registers for one minute. During this minute, the BIOS will continue to judge the status of the server. If the server is in the Power On state, the BIOS will disable the action of modifying the register. If the server is in the Power Off state, the BIOS will write the value of controlling CPU power-on into the CPU register at the end of one minute, and then the CPU will notify the CPLD to power on; finally, in the later DXE stage of the server startup, the BIOS will also read the default function label of Restore onAC Power Loss to confirm whether the BIOS startup policy needs to be synchronized to the BMC. If the default function label of the option is not Power Off, the BIOS will synchronize the default function label of the option to the BMC. At the same time, after the server starts and enters Setup, the user can manually modify Restore onAC The default function tag of PowerLoss. After the save restart action is executed, the BIOS will synchronize the modification result to the BMC through the IPMI command during the boot DXE phase, thereby overwriting the BMC default power-on policy and ensuring that the BMC can perceive the user's modification in a timely manner.

[0082] In the above implementation, the two different options, AC Power Loss and Restore on AC Power Loss, are used to differentiate power-on strategies for different scenarios. The CPU Power Loss Control option implements delayed execution of automatic CPU power-on control, ensuring the execution of the BMC-controlled power-on strategy. For different application scenarios, the default function labels of different options are adjusted to determine the corresponding power-on strategy, thereby ensuring the accuracy of power-on strategy selection.

[0083] S4: Power on the server based on the target power-on policy.

[0084] In some specific implementations, in response to the server power-on completion, obtaining the server power-on time node, the target power-on strategy, and the user identifier who selected the power-on strategy, wherein if the user identifier does not exist, terminating the process;

[0085] In response to the power-on time node appearing a number of times greater than a second preset threshold value and the target power-on strategy corresponding to the time node appearing a number of times greater than a third preset threshold value within multiple time periods, a one-to-one mapping relationship is generated based on the user identifier, the target power-on strategy, and the power-on time node, and the mapping relationship is saved in a mapping list, wherein the range value of the time period can be set according to actual needs, such as one week, one month, etc., the power-on time node can be Monday morning at 9 o'clock, etc., and the second preset threshold value and the third preset threshold value can both be set according to actual needs;

[0086] Compare multiple time nodes in the next time period with the time nodes in the mapping list. If the comparison is successful, extract the user ID corresponding to the time node and compare the user ID with the user ID of the current time node. If the comparison is successful, define the target power-on policy corresponding to the time node as the power-on policy corresponding to the current time node.

[0087] Based on the power-on policy, a default function label corresponding to the power-on configuration option is adjusted to power on the server based on the default function label.

[0088] In the above implementation, the mapping relationship constructed can be used to determine the user's power-on strategy selection preference at a certain time node. Based on this, the corresponding power-on strategy can be directly selected to power on the server in the next time period, thereby improving power-on efficiency and user experience.

[0089] The above-mentioned power-on control method includes: constructing power-on configuration options and function tags corresponding to the power-on configuration options; in response to receiving a server power-on request, parsing the server power-on request, and determining the default function tag corresponding to the power-on configuration option according to the parsing result of the server power-on request, and the default function tag can be dynamically adjusted; based on the default function tag corresponding to the power-on configuration option and the mapping relationship between the function tag and the power-on strategy, determining the target power-on strategy of the server; based on the target power-on strategy, the server is powered on. The multi-strategy power-on selection scheme constructed in this application can enable users to select different strategies according to different business scenarios. The power-on method provides power-on configuration options, allowing users to adjust power-on strategies through script customization, reducing maintenance workload. When users perform batch server rollouts or repeated power-on and power-off verification operations, they can control automatic server power-on and power-off by modifying the default function tags of the power-on configuration options. This eliminates the need for on-site operation and maintenance personnel, reducing operation and maintenance costs. By setting power-on configuration options and function tags, conflicts between automatic CPU power-on control and BMC power-on control can be avoided, better ensuring the priority execution of BMC power-on control, allowing users to debug servers for different application scenarios.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0091] It should be understood that although Figure 2-Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2-Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0092] The embodiment of the present application also provides a power-on control device, such as Figure 4 As shown, it includes a construction module, a parsing module, a determination module and a power-on module, wherein:

[0093] A construction module, used for constructing power-on configuration options and function labels corresponding to the power-on configuration options;

[0094] a parsing module, configured to parse the server power-on request in response to receiving the server power-on request, and determine a default function label corresponding to the power-on configuration option according to the parsing result of the server power-on request, wherein the default function label can be dynamically adjusted;

[0095] A determination module, configured to determine a target power-on strategy for the server based on a default function label corresponding to a power-on configuration option and a mapping relationship between the function label and the power-on strategy;

[0096] The power-on module is used to power on the server based on the target power-on policy.

[0097] As a preferred implementation, in an embodiment of the present invention, the construction module is specifically used to:

[0098] Constructing a first power-on configuration option, the first power-on configuration option being used to synchronize a power-on strategy of a baseboard management controller to a basic input / output system;

[0099] Determine a function tag of the first power-on configuration option, where the function tag includes at least a first function tag, a second function tag, and a third function tag;

[0100] A one-to-one mapping relationship is generated based on the first power-on configuration option and the function label corresponding to the first power-on configuration option, and the selected first target function label is defined as a default function label corresponding to the first power-on configuration option.

[0101] As a preferred implementation, in an embodiment of the present invention, the construction module is further used to:

[0102] Constructing a second power-on configuration option, where the second power-on configuration option is used to synchronize a power-on strategy of a basic input / output system to a baseboard management controller;

[0103] Determining a function tag of a second power-on configuration option, where the function tag includes at least a first function tag, a second function tag, and a third function tag;

[0104] Based on the second power-on configuration option and the function label corresponding to the second power-on configuration option, a one-to-one mapping relationship is generated, and the selected second target function label is defined as a default function label corresponding to the second power-on configuration option.

[0105] As a preferred implementation, in an embodiment of the present invention, the construction module is further used to:

[0106] Constructing a third power-on configuration option, which is used to control whether to enable the automatic power-on function of the CPU;

[0107] determining a function tag of a third power-on configuration option, where the function tag includes at least a fourth function tag and a fifth function tag;

[0108] A one-to-one mapping relationship is generated based on the third power-on configuration option and the function label corresponding to the third power-on configuration option, and the selected third target function label is defined as a default function label corresponding to the third power-on configuration option.

[0109] As a preferred implementation, in an embodiment of the present invention, the determination module is specifically configured to:

[0110] In response to the server being in a first stage of startup, reading a power-on strategy of a baseboard management controller and a default function tag corresponding to a first power-on configuration option;

[0111] In response to reading the power-on policy of the baseboard management controller, determining the power-on policy corresponding to the first power-on configuration option based on the default function label corresponding to the first power-on configuration option and the mapping relationship between the function label and the power-on policy;

[0112] comparing the power-on strategy of the baseboard management controller with the power-on strategy corresponding to the first power-on configuration option;

[0113] In response to the comparison being unsuccessful, adjusting a default function label corresponding to the first power-on configuration option based on a power-on strategy of the baseboard management controller;

[0114] In response to the adjustment being completed, reading a default function tag corresponding to the third power-on configuration option, and when the default function tag corresponding to the third power-on configuration option is a fourth function tag, disabling the automatic power-on function of the central processing unit;

[0115] When the default function tag corresponding to the third power-on configuration option is the fifth function tag, detecting whether the status of the server meets the preset standard within a preset time;

[0116] In response to meeting the preset criteria, after the preset time period, the automatic power-on function of the central processing unit is enabled, and in response to not meeting the preset criteria, the automatic power-on function of the central processing unit is disabled;

[0117] In response to the server being in the second stage of startup, reading a default function tag corresponding to the second power-on configuration option;

[0118] In response to the default function tag corresponding to the second power-on configuration option not being the second function tag, synchronizing the power-on policy corresponding to the default function tag to the baseboard management controller.

[0119] As a preferred implementation, in an embodiment of the present invention, the determination module is further configured to:

[0120] In response to not reading the BMC power-on policy, or successfully comparing the BMC power-on policy with the power-on policy corresponding to the first power-on configuration option, the default function tag corresponding to the first power-on configuration option remains unchanged.

[0121] As a preferred implementation, in an embodiment of the present invention, the parsing module is specifically used to:

[0122] Determine, based on the parsing result, function tags corresponding to the first power-on configuration option, the second power-on configuration option, and the third power-on configuration option corresponding to the server power-on request;

[0123] comparing the function tag of the first power-on configuration option corresponding to the server power-on request with the default function tag of the first power-on configuration option, and in response to an unsuccessful comparison, adjusting the default function tag of the first power-on configuration option based on the function tag of the first power-on configuration option corresponding to the server power-on request;

[0124] comparing the function tag of the second power-on configuration option corresponding to the server power-on request with the default function tag of the second power-on configuration option, and in response to an unsuccessful comparison, adjusting the default function tag of the second power-on configuration option based on the function tag of the second power-on configuration option corresponding to the server power-on request;

[0125] The function tag of the third power-on configuration option corresponding to the server power-on request is compared with the default function tag of the third power-on configuration option. In response to unsuccessful comparison, the default function tag of the third power-on configuration option is adjusted based on the function tag of the third power-on configuration option corresponding to the server power-on request.

[0126] For descriptions of the features of the embodiments corresponding to the power-on control device, please refer to the relevant descriptions of the embodiments corresponding to the power-on control method, and will not be repeated here. Each module in the above-mentioned power-on control device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the electronic device in hardware form, or can be stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0127] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a power-on control method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

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

[0129] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform steps in an embodiment of a power-on control method, including:

[0130] S1: Construct power-on configuration options and corresponding function labels of the power-on configuration options;

[0131] S2: In response to receiving the server power-on request, parsing the server power-on request, and determining a default function label corresponding to the power-on configuration option according to the parsing result of the server power-on request, where the default function label can be dynamically adjusted;

[0132] S3: Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies.

[0133] S4: Power on the server based on the target power-on policy.

[0134] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the steps of the power-on control method embodiment when running, including:

[0135] S1: Construct power-on configuration options and corresponding function labels of the power-on configuration options;

[0136] S2: In response to receiving the server power-on request, parsing the server power-on request, and determining a default function label corresponding to the power-on configuration option according to the parsing result of the server power-on request, where the default function label can be dynamically adjusted;

[0137] S3: Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies.

[0138] S4: Power on the server based on the target power-on policy.

[0139] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0140] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in the power-on control method embodiment are implemented, including:

[0141] S1: Construct power-on configuration options and corresponding function labels of the power-on configuration options;

[0142] S2: In response to receiving the server power-on request, parsing the server power-on request, and determining a default function label corresponding to the power-on configuration option according to the parsing result of the server power-on request, where the default function label can be dynamically adjusted;

[0143] S3: Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies.

[0144] S4: Power on the server based on the target power-on policy.

[0145] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps in the power-on control method embodiment are implemented, including:

[0146] S1: Construct power-on configuration options and corresponding function labels of the power-on configuration options;

[0147] S2: In response to receiving the server power-on request, parsing the server power-on request, and determining a default function label corresponding to the power-on configuration option according to the parsing result of the server power-on request, where the default function label can be dynamically adjusted;

[0148] S3: Determine a target power-on policy for the server based on the default function labels corresponding to the power-on configuration options and the mapping relationship between the function labels and the power-on policies.

[0149] S4: Power on the server based on the target power-on policy.

[0150] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0151] The above is a detailed introduction to a power-on control method, device, electronic device and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A power-on control method, characterized in that: The method comprises: Constructing power-on configuration options and function labels corresponding to the power-on configuration options; In response to receiving a server power-on request, parsing the server power-on request, and determining a default function label corresponding to the power-on configuration option according to a parsing result of the server power-on request, wherein the default function label can be dynamically adjusted; Determining a target power-on policy for the server based on a default function label corresponding to the power-on configuration option and a mapping relationship between the function label and the power-on policy; The server is powered on based on the target power-on policy.

2. The power-on control method according to claim 1, wherein: Constructing power-on configuration options and function tags corresponding to the power-on configuration options include: Constructing a first power-on configuration option, wherein the first power-on configuration option is used to synchronize a power-on strategy of a baseboard management controller with a basic input and output system; Determining function tags of the first power-on configuration option, where the function tags include at least a first function tag, a second function tag, and a third function tag; A one-to-one mapping relationship is generated based on the first power-on configuration option and the function label corresponding to the first power-on configuration option, and the selected first target function label is defined as a default function label corresponding to the first power-on configuration option.

3. The power-on control method according to claim 2, characterized in that: Constructing power-on configuration options and function tags corresponding to the power-on configuration options include: Constructing a second power-on configuration option, wherein the second power-on configuration option is used to synchronize a power-on strategy of a basic input / output system to a baseboard management controller; determining a function tag of the second power-on configuration option, where the function tag includes at least the first function tag, the second function tag, and the third function tag; A one-to-one mapping relationship is generated based on the second power-on configuration option and the function label corresponding to the second power-on configuration option, and the selected second target function label is defined as a default function label corresponding to the second power-on configuration option.

4. The power-on control method according to claim 3, characterized in that: Constructing power-on configuration options and function tags corresponding to the power-on configuration options include: Constructing a third power-on configuration option, wherein the third power-on configuration option is used to control whether to enable the automatic power-on function of the central processing unit; Determining a function tag of the third power-on configuration option, where the function tag includes at least a fourth function tag and a fifth function tag; A one-to-one mapping relationship is generated based on the third power-on configuration option and the function label corresponding to the third power-on configuration option, and the selected third target function label is defined as a default function label corresponding to the third power-on configuration option.

5. The power-on control method according to claim 4, characterized in that: Determining a target power-on strategy for the server based on a default function tag corresponding to the power-on configuration option and a mapping relationship between the function tag and the power-on strategy includes: In response to the server being in a first stage of startup, reading a power-on strategy of a baseboard management controller and a default function tag corresponding to the first power-on configuration option; In response to reading the power-on policy of the baseboard management controller, determining the power-on policy corresponding to the first power-on configuration option based on a default function label corresponding to the first power-on configuration option and a mapping relationship between the function label and the power-on policy; comparing the power-on strategy of the baseboard management controller with the power-on strategy corresponding to the first power-on configuration option; In response to the comparison being unsuccessful, adjusting a default function label corresponding to the first power-on configuration option based on a power-on strategy of the baseboard management controller; In response to the adjustment being completed, reading a default function tag corresponding to the third power-on configuration option, and when the default function tag corresponding to the third power-on configuration option is a fourth function tag, disabling an automatic power-on function of the central processing unit; When the default function tag corresponding to the third power-on configuration option is the fifth function tag, detecting whether the state of the server meets a preset standard within a preset time; In response to meeting the preset criteria, after the preset time period, the automatic power-on function of the central processing unit is enabled, and in response to not meeting the preset criteria, the automatic power-on function of the central processing unit is disabled; In response to the server being in the second stage of startup, reading a default function tag corresponding to a second power-on configuration option; In response to the default function tag corresponding to the second power-on configuration option not being the second function tag, synchronizing the power-on policy corresponding to the default function tag to the baseboard management controller.

6. The power-on control method according to claim 5, characterized in that: The method further comprises: In response to not reading the power-on policy of the baseboard management controller, or successfully comparing the power-on policy of the baseboard management controller with the power-on policy corresponding to the first power-on configuration option, the default function tag corresponding to the first power-on configuration option remains unchanged.

7. The power-on control method according to claim 4, characterized in that: Determining, based on the parsing result of the server power-on request, a default function tag corresponding to the power-on configuration option includes: Based on the parsing result, determining function tags corresponding to a first power-on configuration option, a second power-on configuration option, and a third power-on configuration option corresponding to the server power-on request; comparing the function label of the first power-on configuration option corresponding to the server power-on request with the default function label of the first power-on configuration option, and in response to an unsuccessful comparison, adjusting the default function label of the first power-on configuration option based on the function label of the first power-on configuration option corresponding to the server power-on request; comparing the function tag of the second power-on configuration option corresponding to the server power-on request with the default function tag of the second power-on configuration option, and in response to an unsuccessful comparison, adjusting the default function tag of the second power-on configuration option based on the function tag of the second power-on configuration option corresponding to the server power-on request; The function tag of the third power-on configuration option corresponding to the server power-on request is compared with the default function tag of the third power-on configuration option. In response to unsuccessful comparison, the default function tag of the third power-on configuration option is adjusted based on the function tag of the third power-on configuration option corresponding to the server power-on request.

8. A power-on control device, characterized in that: The device comprises: a construction module for constructing power-on configuration options and function labels corresponding to the power-on configuration options; a parsing module for, in response to receiving a server power-on request, parsing the server power-on request, and determining a default function label corresponding to the power-on configuration option based on the parsed result of the server power-on request, wherein the default function label is dynamically adjustable; a determination module, configured to determine a target power-on policy for the server based on a default function label corresponding to the power-on configuration option and a mapping relationship between the function label and the power-on policy; A power-on module is configured to power on the server based on the target power-on strategy.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the power-on control method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the power-on control method according to any one of claims 1 to 7.