Power supply in-situ detection device, server and power supply on-line replacement method
The power supply presence detection device and method address server restarts during online PSU replacement by using a button and cable tie system to ensure accurate power supply placement and signal filtering, improving reliability and stability.
Patent Information
- Application Number
- CN202411044714.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-27
AI Technical Summary
Existing server power supply systems face issues with restarting during online replacement of power supply units, affecting reliability and stability due to signal oscillations and misjudgment by the main control chip.
A power supply presence detection device with a button that changes state based on user operation, coupled with a cable tie and fastener, provides accurate feedback on power supply device placement, and a method to adjust sampling periods for power state signals to prevent server restarts during online replacement.
Ensures accurate determination of power supply device placement, preventing server restarts and maintaining stability by filtering out signal interference, thus enhancing system reliability and reducing data loss.
Smart Images

Figure CN119200798A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a power supply presence detection device, a server, and a power supply online replacement method. Background Art
[0002] The power supply modules currently used in servers are generally two power supply units (PSUs), which implement redundant power supply design to improve the reliability and fault tolerance of the entire server system. The two PSUs can share the power demand of the server, reduce the load of a single PSU, and increase its life. At the same time, the dual PSU configuration can realize online replacement of the server PSU, that is, if one PSU needs to be repaired or replaced, the other PSU can continue to power the server, allowing maintenance without interrupting service.
[0003] In the related technology, the entire server system may be restarted during the process of online replacement of the PSU of the server, and the online replacement of the PSU of the server cannot be achieved, which affects the normal operation of the server.
[0004] Therefore, how to prevent the server from restarting when the power supply device is replaced online and improve the reliability and stability of the server has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0005] The present application provides a power supply presence detection device, a server and a power supply online replacement method, which are used to solve the technical problem of how to prevent the server from restarting when the power supply device is replaced online, thereby improving the reliability and stability of the server.
[0006] The present application provides a power supply presence detection device, comprising a body, a button, a detection column, a cable tie and a fastener; The detection column is arranged on the body; The button is arranged at one end of the detection column close to the body; The fastener is inserted into the detection column from an end of the detection column away from the body; The first end of the cable tie is used to pass through the detection column from above the button, and the second end is used to fasten the power cord of the power supply device; The pressed state of the button is used to indicate that the power supply device is in the in-position state; the pop-up state of the button is used to indicate that the power supply device is in the out-position state.
[0007] In some embodiments, the fastener is used to: In response to a first operation by a user, the device moves toward the main body, tightens the first end of the cable tie and places the button in a pressed state; In response to a second operation by the user, the button moves in a direction away from the body, loosens the first end of the cable tie, and puts the button in a pop-up state.
[0008] In some embodiments, the device is disposed in a chassis of a server; and the buttons correspond one-to-one to power supply devices in the server.
[0009] The present application provides a method for online replacement of a power supply, which is applied to a server, wherein the server includes the power supply in-place detection device, and the method includes: In case of online replacement of the power supply device in the server, detecting the status of each button in the power supply detection device; Based on the status of each button, determine the status of the power supply device corresponding to each button; Based on the status of the power supply device corresponding to each button, a restart judgment result of the server is determined.
[0010] In some embodiments, determining the state of the power supply device corresponding to each button based on the state of each button includes: When any button is detected to be in a pop-up state, determining that the power supply device corresponding to the button is in an out-of-position state; When it is detected that any button is in a pressed state, it is determined that the power supply device corresponding to the any button is in an in-place state.
[0011] In some embodiments, determining the restart judgment result of the server based on the state of the power supply device corresponding to each button includes: When it is determined that any power supply device is in an off-position state, adjusting the sampling period of the power state signal from the first sampling period to the second sampling period; Based on the second sampling period, sampling the power state signal of the power supply device in the on-state for multiple times to obtain multiple power state sampling results; When the plurality of power state sampling results are consistent, determining that the power supply device in the in-place state is operating normally; In the case where the plurality of power state sampling results are inconsistent, determining that the power supply device in the in-place state is operating abnormally; When the power supply device in the in-place state operates normally, determining that the restart judgment result of the server is not to restart; In the case that the power supply device in the in-place state operates abnormally, determining that the restart judgment result of the server is restart; The first sampling period is shorter than the signal period of the power status signal; and the second sampling period is longer than the signal period of the power status signal.
[0012] In some embodiments, after determining that the restart judgment result of the server is restart, the method further includes: Saving the files being written in the server; Restart the server.
[0013] The present application provides a server, including a chassis, a processor, a power supply device and the power supply presence detection device; The processor, the power supply device and the power supply presence detection device are arranged in the chassis; The first end of the cable tie of the power supply detection device is used to be fastened above the button by a fastener, and the second end is used to fasten the power cord of the power supply device; The processor is connected to the button and is used to execute the power supply online replacement method.
[0014] The present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the power supply online replacement method when executing the computer program.
[0015] The present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program implements the power supply online replacement method when executed by a processor.
[0016] The power supply in-place detection device provided by the present application has a button that changes state according to the force applied by the fastener. The pressed state indicates that the power supply device is in-place, and the pop-up state indicates that the power supply device is out of place. This achieves accurate feedback on whether the power supply device is in place, helps to assist the server in determining whether the power supply device is working normally, and can prevent the server from restarting when the power supply device is replaced online. In addition, the cable tie can prevent the power cord of the power supply device from being disturbed and falling off in normal working state, thereby improving the reliability and stability of the server.
[0017] The online power supply replacement method provided in the present application can accurately judge whether a power supply device is in place and a power supply device is out of place by the state of the power supply device corresponding to the button, thereby accurately feeding back whether the power supply device is in place, helping the auxiliary server to judge whether the power supply device is working normally, and preventing the server from restarting when the power supply device is replaced online, thereby improving the reliability and stability of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 It is a structural schematic diagram of the power supply presence detection device provided in this application.
[0021] Figure 2 It is a schematic diagram of the installation of the power supply in-place detection device provided in this application.
[0022] Figure 3 It is a flow chart of the online power supply replacement method provided in this application.
[0023] Figure 4 It is a schematic diagram of the structure of the server provided by this application.
[0024] Figure 5 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second" etc. in the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units or modules need not be limited to those steps or units or modules clearly listed, but may include other steps or units or modules that are not clearly listed or inherent to these processes, methods, products or equipment.
[0027] The power supply configuration of the server is generally two power supply units (PSU). A server motherboard is powered by two PSUs at the same time (which can be recorded as PSU0 and PSU1), realizing the redundant design of power supply, improving the reliability and stability of the system, and realizing the replacement of PSU while the server is running online without shutting down.
[0028] During the process of replacing the PSU of the server online, for example, when PSU0 is powered and PSU1 is plugged in and out, the signal connecting PSU0 and the server motherboard may oscillate due to physical or electrical disturbances, which may cause the main control chip (Complex Programmable Logic Device, CPLD) or central processing unit (Central Processing Unit, CPU) that monitors the signal to misjudge, thereby controlling the server to shut down and restart after the signal stabilizes, causing the server to restart.
[0029] Therefore, how to accurately determine whether the power supply device is in place and provide a stable power supply to the server can prevent the server from restarting when the power supply device is replaced online, thereby improving the reliability and stability of the server.
[0030] Figure 1 is a schematic diagram of the structure of the power supply in-place detection device provided by the present application, such as Figure 1 As shown, the power supply presence detection device 100 includes a body 110 , a button 111 , a detection column 112 , a cable tie 113 and a fastener 114 .
[0031] The detection column is arranged on the body. The button is arranged at one end of the detection column close to the body. The fastener is inserted into the detection column from one end of the detection column away from the body. The first end of the cable tie is used to pass through the detection column from above the button, and the second end is used to fasten the power cord of the power supply device.
[0032] The pressed state of the button is used to indicate that the power supply device is in the on-position state; the pop-up state of the button is used to indicate that the power supply device is in the off-position state.
[0033] Specifically, the power supply in-place detection device provided in the embodiment of the present application is mainly used to detect the state of the power supply device in the server or computer. The state of the power supply device includes an in-place state and an out-of-place state. The in-place state indicates that the power supply device is installed in the server chassis and can supply power to the server, and the out-of-place state indicates that the power supply device is taken out of the server chassis by the user for replacement and cannot supply power to the server.
[0034] From a structural point of view, the power supply presence detection device includes a body and multiple groups of detection components arranged on the body. One group of detection components includes a button, a detection column, a cable tie and a fastener.
[0035] The main body of the power supply detection device refers to the main structural part of the power supply detection device. The main body can be arranged in a position close to the power supply device in the server chassis.
[0036] The detection column is arranged on the main body. The longitudinal axis direction of the detection column can be kept perpendicular to the contact surface between the detection column and the main body. The detection column is a hollow structure, and a button is arranged at one end close to the main body.
[0037] The fastener is used to insert the detection column from the end of the detection column away from the body, and the end close to the body is used to contact the button, which can apply force to the button to change the state of the button; the end away from the body is used to move in the detection column in response to the user's operation.
[0038] The fastener may be a hand screw connected to the inner wall of the detection column through a thread. The user may rotate the fastener to tighten or loosen the fastener so that the fastener is close to or away from the button in the detection column.
[0039] When approaching the button, force is applied to the button so that the button is in a pressed state, indicating that the power supply device is in the in-position state; when moving away from the button, the force applied to the button is removed so that the button is in a pop-up state (the button has a spring inside), indicating that the power supply device is in a disengaged state.
[0040] The power-on detection device may further include an interconnect cable, which may connect the button and a processor of a server or a main control chip that monitors the power-on detection device, and may provide feedback on the status of the button via an electrical signal.
[0041] Cable ties are tools used to bind and fix cables, wire harnesses, etc., usually made of nylon or other soft but strong materials. The first end of the cable tie is used to pass through the detection column from above the button. When the power supply device is in place, the fastener will use the force to fix the first end of the cable tie above the button; the second end of the cable tie is used to fasten the power cord of the power supply device to prevent the power cord of the power supply device from being disturbed and falling off in normal working state.
[0042] The power supply in-place detection device provided in the embodiment of the present application includes a main body, a button, a detection column, a cable tie and a fastener; the detection column is arranged on the main body; the button is arranged at one end of the detection column close to the main body; the fastener is inserted into the detection column from the end of the detection column away from the main body; the first end of the cable tie is used to pass through the detection column from above the button, and the second end is used to fasten the power cord of the power supply device; because the button changes its state according to the force applied by the fastener, the pressed state indicates that the power supply device is in-place, and the pop-up state indicates that the power supply device is out of place, thereby achieving accurate feedback on whether the power supply device is in place, helping to assist the server in determining whether the power supply device is working normally, and preventing the server from restarting when the power supply device is replaced online; in addition, the cable tie can prevent the power cord of the power supply device from being disturbed and falling off in the normal working state, thereby improving the reliability and stability of the server.
[0043] In some embodiments, the fastener is used to: In response to a first operation by the user, the device moves toward the main body, tightens the first end of the cable tie and places the button in a pressed state; In response to a second operation by the user, the button moves in a direction away from the body, loosens the first end of the cable tie, and puts the button in a pop-up state.
[0044] Specifically, the user may perform different operations according to different types of fasteners.
[0045] In the case where the fastener is a device that is fixed by threads (such as a hand screw, etc.), when the power supply device does not need to be replaced, the user can use the first operation (tightening in the direction close to the body) to move the fastener in the direction close to the body (screwing in), tighten the first end of the cable tie, and apply a force to the button so that the button is in a pressed state. When the power supply device needs to be replaced, the user can use the second operation (loosening in the direction away from the body) to move the fastener in the direction away from the body (screwing out), loosen the first end of the cable tie, and remove the force applied to the button so that the button is in a pop-up state.
[0046] In the case where the fastener is a device that is fixed by pressing (such as a pressing pin, etc.), when the power supply device does not need to be replaced, the user can use the first operation (pressing toward the main body) to move the fastener toward the main body, tighten the first end of the cable tie, and apply force to the button, so that the button is in a pressed state. When the power supply device needs to be replaced, the user can use the second operation (pulling away from the main body) to move the fastener away from the main body, loosen the first end of the cable tie, and remove the force applied to the button, so that the button is in a pop-up state.
[0047] The power supply presence detection device provided in the embodiment of the present application has a fastener that can respond to different user operations to tighten or loosen the cable tie and change the state of the button, thereby accurately feeding back whether the power supply device is in place, helping to assist the server in determining whether the power supply device is working properly, and preventing the server from restarting when the power supply device is replaced online.
[0048] In some embodiments, the device is disposed in a chassis of a server; the buttons correspond one-to-one to the power supply devices in the server.
[0049] Specifically, the power supply presence detection device can be arranged in a chassis of the server at a position close to the power supply device to reduce the length of the cable tie.
[0050] Considering that the server may include multiple redundant power supply devices, buttons may be provided so that the buttons correspond to the power supply devices one by one. Correspondingly, the detection column, the cable tie and the fastener also correspond to the power supply devices one by one. The buttons, the detection column, the cable tie and the fastener are used as a set of detection components, so that the detection components correspond to the power supply devices one by one, and in-situ detection can be performed on all the power supply devices in the server.
[0051] Figure 2 is an installation diagram of the power supply in-place detection device provided in this application, such as Figure 2 As shown, the server includes a chassis 210, a first power supply device (PSU0) 220, a second power supply device (PSU1) 230, a mainboard 240, a mainboard main control chip 250, a first power line 260, a second power line 270, a first cable tie 280, a second cable tie 290, a power supply presence detection device 100 and a cable 211.
[0052] A power supply presence detection device is arranged above the installation positions of the first power supply device and the second power supply device. The power supply presence detection device is installed on the server chassis. A first power cord (AC) is installed on the first power supply device, and a second power cord is installed on the second power supply device. A first cable tie is sleeved on the first power cord to prevent the power cord from falling off the first power supply device, and a second cable tie is sleeved on the second power cord to prevent the power cord from falling off the second power supply device. The first cable tie and the second cable tie are connected to the power supply presence detection device.
[0053] The working principle of the power supply detection device is as follows: Taking the first power supply device being in place normally as an example, the first cable tie passes through the detection column of the power supply in place detection device, the detection column is installed on the power supply in place detection device body, the fastener is tightened to push the cable tie and then push the button to be pressed, and the power supply in place detection device transmits the button status to the main control chip of the main board through the cable. When the power supply device is in place, the first cable tie is detached from the detection column of the power supply in place detection device, the fastener is loose, and the button is in a pop-up state. The power supply detection device transmits the button status to the main control chip of the main board through the cable, so that the main control chip of the main board can judge whether the server is replacing the power supply device. At the same time, the cable realizes the power supply function of the power supply in place detection device.
[0054] Figure 3 is a flow chart of the power supply online replacement method provided by this application, such as Figure 3 As shown, the method is applied to a server, and the server includes the power supply presence detection device in the above embodiment. The method includes step 310, step 320 and step 330.
[0055] Step 310: When the power supply device in the server is replaced online, the status of each button in the power supply detection device is detected.
[0056] Specifically, the execution subject of the power supply online replacement method provided in the embodiment of the present application is a power supply online replacement device. The device can be implemented by software, such as a power supply online replacement program running in a server; it can also be a device for executing the power supply online replacement method, such as a central processing unit (CPU) or a complex programmable logic device (CPLD), and a desktop computer or server containing the central processing unit or complex programmable logic device (CPLD).
[0057] Online replacement is the process of replacing parts of a redundant power supply unit while the server continues to operate.
[0058] Step 320: Based on the status of each button, determine the status of the power supply device corresponding to each button.
[0059] Specifically, the state of each button can be used to determine the state of the corresponding power supply device.
[0060] If the button is in a pressed state, the corresponding power supply device is in an in-place state, indicating that the power supply device has not been replaced; if the button is in a pop-up state, the corresponding power supply device is in an out-of-place state, indicating that the power supply device is being replaced.
[0061] Step 330: Determine a restart judgment result of the server based on the status of the power supply device corresponding to each button.
[0062] Specifically, generally, during the process of replacing the power supply device of the server online, for example, when the first power supply device is supplying power and the second power supply device is plugged in and out, due to the existence of physical disturbance or electrical disturbance, the signal (signal related to power supply monitoring) connecting the first power supply device to the server mainboard may oscillate, thereby causing the main control chip or central processing unit that monitors the signal to misjudge (mistakenly believing that there is a fault in the first power supply device), thereby controlling the server to shut down and restart after the signal stabilizes, causing the server to restart.
[0063] In the embodiment of the present application, the power supply device in the in-place state (not replaced) and the power supply device in the out-of-place state (being replaced) can be accurately determined according to the state of the power supply device corresponding to each button. By combining the state of the power supply device with the signal related to power supply monitoring, it is possible to more accurately determine whether there is a power supply device in place, thereby avoiding misjudgment and preventing the server from restarting.
[0064] The method for online power replacement provided in the embodiment of the present application detects the status of each button in a power supply presence detection device when the power supply device in the server is replaced online; determines the status of the power supply device corresponding to each button based on the status of each button; determines the restart judgment result of the server based on the status of the power supply device corresponding to each button; because the power supply device in the in-place state and the power supply device in the out-of-place state are accurately judged by the status of the power supply device corresponding to the button, accurate feedback on whether the power supply device is in place is achieved, which helps to assist the server in judging whether the power supply device is working normally, and can prevent the server from restarting when the power supply device is replaced online, thereby improving the reliability and stability of the server.
[0065] In some embodiments, based on the status of each button, determining the status of the power supply device corresponding to each button includes: When any button is detected to be in a pop-up state, determining that the power supply device corresponding to any button is in an out-of-position state; When it is detected that any button is in a pressed state, it is determined that the power supply device corresponding to any button is in an in-place state.
[0066] Specifically, the state of each button can be detected. If any button is in a pop-up state, it means that the power supply device corresponding to the button is in an out-of-position state; if any button is in a pressed state, it means that the power supply device corresponding to the button is in-position state.
[0067] The online power supply replacement method provided in the embodiment of the present application can accurately determine the status of the power supply device corresponding to each button through the status of each button, which helps the auxiliary server to determine whether the power supply device is working normally, and can prevent the server from restarting when the power supply device is replaced online, thereby improving the reliability and stability of the server.
[0068] In some embodiments, determining a restart determination result of the server based on the state of the power supply device corresponding to each button includes: When it is determined that any power supply device is in an off-position state, adjusting the sampling period of the power state signal from the first sampling period to the second sampling period; Based on the second sampling period, sampling the power state signal of the power supply device in the on-state for multiple times to obtain multiple power state sampling results; When the sampling results of multiple power supply states are consistent, it is determined that the power supply device in the in-place state is operating normally; In the case where the sampling results of multiple power supply states are inconsistent, determining that the power supply device in the in-place state is operating abnormally; When the power supply device in the in-position state is operating normally, determining that the restart judgment result of the server is not to restart; In the case that the power supply device in the in-position state operates abnormally, determining that the restart judgment result of the server is restart; The first sampling period is shorter than the signal period of the power state signal; and the second sampling period is longer than the signal period of the power state signal.
[0069] Specifically, the power status signal is a signal used to indicate the operating status of the power supply device. For example, the signal may be a voltage signal, a current signal or other signal. Generally, the power status signal may be a periodic signal, and the operating status of the corresponding power supply device may be determined by periodically sending the power status signal to the central processing unit or the main control chip. For example, if the signal is sampled within a certain sampling period, if the results of multiple samplings are consistent, it means that the power status signal is valid. However, the online replacement of a battery supply device will cause physical disturbances due to the plugging and unplugging action. In addition, the impact on the entire server power supply system will produce certain electrical disturbances, and the power status signal sent by the power supply device that has not been replaced is susceptible to physical or electrical disturbances, which may cause the central processing unit or the main control chip that monitors the signal to misjudge, thereby controlling the server to shut down and restart.
[0070] The embodiment of the present application provides a method for combining the power supply status with the power supply status signal to determine whether the power supply device is operating normally. This method helps to achieve online replacement of the power supply.
[0071] When it is determined that any power supply device is in an off-site state, the sampling period of the power supply state signal is adjusted from a first sampling period to a second sampling period. The first sampling period is used when the power supply is not replaced online, and the second sampling period is used when the power supply is replaced online.
[0072] It is understandable that in order to accurately sample the power status signal, the first sampling period is smaller than the signal period of the power status signal. For example, if the signal period of the power status signal is 1 millisecond (ms), the first sampling period may be 1 microsecond (us). When the power supply is replaced online, the power status signal will inevitably generate some interference. At this time, the sampling period can be increased to filter out some normal signal interference disturbances and avoid filtering out signal fluctuations with collection value. At this time, the second sampling period is set to be larger than the signal period of the power status signal. For example, the second sampling period may be 10 milliseconds (ms).
[0073] The second acquisition period may also be determined by performing spectrum analysis on the impact of physical interference or electrical interference on the power state signal during the online power supply replacement process. For example, the second acquisition period may be determined based on the duration of fluctuations caused by physical interference or electrical interference on the power state signal, so that the second acquisition period is greater than the duration of interference on the power state signal.
[0074] According to the second sampling period, the power state signal of the power supply device in the on-state is sampled multiple times to obtain multiple power state sampling results. The power state sampling results refer to the sampling results of the power state signal.
[0075] These power state sampling results are compared. If multiple power state sampling results are consistent, it means that the power supply device in the in-place state is operating normally; if multiple power state sampling results are inconsistent, it means that the power supply device in the in-place state is operating abnormally.
[0076] In the case that the power supply device in the in-place state operates normally, it can be determined that the power supply device can still operate normally under physical interference or electrical interference, and the restart judgment result of the server is not to restart.
[0077] When the power supply device in the in-place state operates abnormally, it can be determined that the power supply device cannot operate normally under physical interference or electrical interference, and there may be risks. It is necessary to shut down and wait for the power supply to stabilize before restarting, thereby determining that the restart judgment result of the server is restart.
[0078] The power supply online replacement method provided in the embodiment of the present application combines the power supply status with the power supply status signal to determine whether the power supply device is operating normally, and then determine whether the server needs to be restarted, thereby improving the reliability and stability of the server.
[0079] In some embodiments, after determining that the restart judgment result of the server is restart, the method further includes: Save the files being written in the server; Restart the server.
[0080] Specifically, after determining that the restart judgment result of the server is restart, the file being written in the server can be saved to avoid data loss or damage. After saving the file, the server is controlled to shut down. Wait until the power status signal of the power supply device is stable before restarting.
[0081] The power supply online replacement method provided in the embodiment of the present application saves the files being written in the server before the server is restarted, which can avoid data loss or damage and improve business continuity and user satisfaction.
[0082] Figure 4 It is a schematic diagram of the structure of the server provided by this application, such as Figure 4 As shown, the server 400 includes a chassis 410 , a processor 420 , a power supply device 430 , and a power supply presence detection device 100 .
[0083] The processor, the power supply device and the power supply in-place detection device are arranged in the chassis. The first end of the cable tie of the power supply in-place detection device is used to be fastened above the button by the fastener, and the second end is used to fasten the power line of the power supply device.
[0084] The processor is connected to the button and is used to execute the power supply online replacement method.
[0085] Specifically, the processor here may be a central processing unit in a server, or may be a separately provided main control chip for detecting the power supply presence detection device, and the chip may be implemented using a complex programmable logic device (CPLD).
[0086] When the server is in normal working state, one end of the cable tie is fastened to the power supply in-place detection device, and the other end is put on the power cord of the power supply device, which can prevent the power cord of the power supply device from being disturbed and falling off in normal working state. When preparing to replace the power supply device, first loosen the fasteners that fasten the cable tie corresponding to the power supply device on the power supply device in-place detection device. At this time, the main control chip of the mainboard monitors the corresponding in-place button to know that the server needs to replace the power supply device online. After replacing the new power supply device, the cable tie on the power cord of the power supply device is re-transferred through the detection column of the power supply device in-place detection device, and then the corresponding fasteners are tightened to push and press the in-place button. At this time, the main control chip monitors the corresponding in-place button to know that the server needs to complete the online replacement of the power supply device.
[0087] The main control chip performs certain filtering on the relevant signals of the power supply device, that is, the signal is sampled at a certain frequency within a filtering cycle. If multiple samples within a filtering cycle give the same result, the signal is considered valid, otherwise the signal is considered invalid. The filtering cycle is generally designed at the microsecond level. This cycle is designed based on the balance between filtering processing and effective signal monitoring. When the server is operating normally, the main control chip has a filtering cycle of 10us for the relevant signals of the power supply device, which can filter out some normal signal interference and disturbances, and avoid filtering out signal fluctuations with collection value. When the main control chip monitors that the server is replacing the power supply device online, the filtering cycle of the relevant signals of the power supply device is adjusted to 10ms, so as to avoid the signal oscillation caused by physical disturbances and electrical disturbances when replacing the power supply device to the greatest extent, and prevent the occurrence of server restarts.
[0088] Since it can avoid restarting when the power supply is replaced online, it can reduce system crashes and service interruptions caused by unexpected restarts, reduce the time cost of system recovery and maintenance, and allow users to complete their work more efficiently. At the same time, the cable tie effectively prevents the power cord from accidentally falling during the normal operation of the power supply device, thereby improving the stability of the entire system.
[0089] The server provided in the embodiment of the present application includes the power supply presence detection device in the above embodiment, executes the power supply online replacement method in the above embodiment, and accurately judges the power supply device in the in-place state and the power supply device in the out-of-place state through the state of the power supply device corresponding to the button, thereby realizing accurate feedback on whether the power supply device is in place, helping to assist the server in judging whether the power supply device is working normally, and preventing the server from restarting when the power supply device is replaced online, thereby improving the reliability and stability of the server.
[0090] Figure 5 is a schematic diagram of the structure of the electronic device provided by this application, such as Figure 5 As shown, the electronic device may include: a processor (Processor) 510, a communication interface (Communications Interface) 520, a memory (Memory) 530 and a communication bus (Communications Bus) 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic command in the memory 530 to execute the method described in the above embodiment, for example: When the power supply device in the server is replaced online, the status of each button in the power supply detection device is detected; based on the status of each button, the status of the power supply device corresponding to each button is determined; based on the status of the power supply device corresponding to each button, the restart judgment result of the server is determined.
[0091] In addition, the logical commands in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several commands to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0092] The processor in the electronic device provided in the embodiment of the present application can call the logic instructions in the memory to implement the above method. Its specific implementation method is consistent with the implementation method of the aforementioned method and can achieve the same beneficial effects, which will not be repeated here.
[0093] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the methods provided in the above embodiments are implemented.
[0094] Its specific implementation is consistent with the aforementioned method implementation and can achieve the same beneficial effects, so it will not be repeated here.
[0095] An embodiment of the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0096] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A power supply presence detection device, characterized in that: Includes body, button, detection column, cable tie and fasteners; The detection column is arranged on the body; The button is arranged at one end of the detection column close to the body; The fastener is inserted into the detection column from an end of the detection column away from the body; The first end of the cable tie is used to pass through the detection column from above the button, and the second end is used to fasten the power cord of the power supply device; The pressed state of the button is used to indicate that the power supply device is in the in-position state; the pop-up state of the button is used to indicate that the power supply device is in the out-position state.
2. The power supply presence detection device according to claim 1, characterized in that: The fasteners are used for: In response to a first operation by a user, the device moves toward the main body, tightens the first end of the cable tie and places the button in a pressed state; In response to a second operation by the user, the button moves in a direction away from the body, loosens the first end of the cable tie, and puts the button in a pop-up state.
3. The power supply presence detection device according to claim 2, characterized in that: The device is arranged in the chassis of the server; the buttons correspond one to one with the power supply devices in the server.
4. A method for online replacement of a power supply, characterized in that: Applied to a server, the server comprising the power supply presence detection device according to any one of claims 1 to 3, the method comprising: In case of online replacement of the power supply device in the server, detecting the status of each button in the power supply detection device; Based on the status of each button, determine the status of the power supply device corresponding to each button; Based on the status of the power supply device corresponding to each button, a restart judgment result of the server is determined.
5. The method for online replacement of power supply according to claim 4, characterized in that: The step of determining the state of the power supply device corresponding to each button based on the state of each button includes: When any button is detected to be in a pop-up state, determining that the power supply device corresponding to the button is in an out-of-position state; When it is detected that any button is in a pressed state, it is determined that the power supply device corresponding to the any button is in an in-place state.
6. The method for online replacement of power supply according to claim 4, characterized in that: The step of determining the restart judgment result of the server based on the state of the power supply device corresponding to each button includes: When it is determined that any power supply device is in an off-position state, adjusting the sampling period of the power state signal from the first sampling period to the second sampling period; Based on the second sampling period, sampling the power state signal of the power supply device in the on-state for multiple times to obtain multiple power state sampling results; When the plurality of power state sampling results are consistent, determining that the power supply device in the in-place state is operating normally; In the case where the plurality of power state sampling results are inconsistent, determining that the power supply device in the in-place state is operating abnormally; When the power supply device in the in-place state operates normally, determining that the restart judgment result of the server is not to restart; In the case that the power supply device in the in-place state operates abnormally, determining that the restart judgment result of the server is restart; The first sampling period is shorter than the signal period of the power status signal; and the second sampling period is longer than the signal period of the power status signal.
7. The method for online replacement of a power supply according to claim 6, characterized in that: After determining that the restart judgment result of the server is restart, the method further includes: Saving the files being written in the server; Restart the server.
8. A server, characterized in that: It comprises a chassis, a processor, a power supply device and the power supply presence detection device according to any one of claims 1 to 3; The processor, the power supply device and the power supply presence detection device are arranged in the chassis; The first end of the cable tie of the power supply detection device is used to be fastened above the button by a fastener, and the second end is used to fasten the power cord of the power supply device; The processor is connected to the button and is used to execute the power supply online replacement method according to any one of claims 4 to 7.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for online replacement of a power supply according to any one of claims 4 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for online replacement of a power supply according to any one of claims 4 to 7 is implemented.
