Fan control method, storage medium, electronic device, and computer program product
By acquiring temperature information and alternative temperature information from multiple temperature sensors, and using a PID control algorithm to calculate and compensate for fan speed, the problem of inaccurate fan rotation when server component temperatures are abnormal is solved, ensuring stable heat dissipation for the server.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-04-02
AI Technical Summary
When the internal components of a server experience abnormal temperatures, existing technologies cannot accurately control fan rotation, resulting in reduced heat dissipation efficiency.
By acquiring temperature information from multiple temperature sensors and alternative temperature information, the fan speed is calculated using a proportional-integral-derivative control algorithm. Compensation is performed when the time difference reaches a threshold to ensure the accuracy of the fan speed.
This improved the accuracy of fan rotation, prevented prolonged temperature anomalies, ensured the effective operation of the server's cooling system, and increased system stability and fault tolerance.
Smart Images

Figure CN2025118539_02042026_PF_FP_ABST
Abstract
Description
Fan control method, storage medium, electronic device, and computer program product
[0001] Cross-reference to related applications
[0002] The present application takes the patent document with the application number 2024113430035 and the name "Fan control method, storage medium, electronic device, and computer program product" submitted on September 25, 2024 as the priority document, the entire content of which is incorporated herein by reference. TECHNICAL FIELD
[0003] The embodiments of the present application relate to the field of computers, in particular, to a fan control method, storage medium, electronic device, and computer program product. BACKGROUND
[0004] The fan is an important part of the server system, and the fan rotates to dissipate heat for the components inside the server, thereby ensuring the normal operation of the server. In related technologies, the controller calculates the fan speed value based on the temperature of the components in the server, so as to control the fan to rotate according to the fan speed value. However, when the temperature of the components inside the server is abnormal, the speed value calculated by the controller will have errors, thereby affecting the heat dissipation of the server.
[0005] In view of the problem that in related technologies, the fan cannot be accurately controlled to rotate when the temperature of the components inside the server is abnormal, no effective solution has been proposed so far. SUMMARY
[0006] The embodiments of the present application provide a fan control method, storage medium, electronic device, and computer program product to at least solve the problem that the fan cannot be accurately controlled to rotate when the temperature of the components inside the server is abnormal.
[0007] According to one embodiment of the present application, a fan control method is provided, comprising: obtaining temperature information of N temperature sensors in a server, wherein N is a positive integer greater than or equal to 2, and the monitoring objects of the N temperature sensors include components of the server and / or an environment in which the server is located; in the case that temperature information of M temperature sensors among the N temperature sensors is abnormal, obtaining M substitute temperature information corresponding to the M temperature sensors, wherein the mth substitute temperature information in the M substitute temperature information is used to reflect the temperature of the monitoring object corresponding to the mth temperature sensor among the M temperature sensors, and M is a positive integer greater than or equal to 1 and less than or equal to N; determining a fan speed value according to the temperature information of N-M temperature sensors and the M substitute temperature information, and controlling the fan of the server to rotate at the fan speed value.
[0008] In an example embodiment, the acquiring the M pieces of substitute temperature information corresponding to the M temperature sensors comprises: determining a temperature detector on a mainboard of the server according to a position of a monitoring object of an mth temperature sensor in the M temperature sensors, wherein a distance between the temperature detector and the monitoring object is less than a preset distance; and determining the substitute temperature information corresponding to the mth temperature sensor according to temperature information of the temperature detector.
[0009] In an example embodiment, the determining the fan rotating speed value according to the temperature information of the N-M temperature sensors and the M pieces of substitute temperature information comprises: determining a jth rotating speed value according to temperature information of a jth temperature sensor in the N-M temperature sensors, to obtain N-M rotating speed values, wherein j takes 1, …, N-M-1, N-M; determining M rotating speed values according to the M pieces of substitute temperature information; and determining a maximum rotating speed value in the N-M rotating speed values and the M rotating speed values as the fan rotating speed value.
[0010] In an example embodiment, the determining the jth rotating speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors comprises: determining the jth rotating speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors based on a proportional-integral-derivative control algorithm.
[0011] In an example embodiment, before the determining the jth rotating speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors, the method further comprises: determining a time difference between a jth reference time and a jth time, to obtain a jth time difference value, wherein the jth time is a time of acquiring the temperature information of the jth temperature sensor, and the jth reference time is a time of starting to determine the jth rotating speed value according to the temperature information of the jth temperature sensor; determining a jth temperature compensation amount according to the jth time difference value, and performing compensation processing on the temperature information of the jth temperature sensor according to the jth temperature compensation amount, to update the acquired temperature information of the jth temperature sensor.
[0012] In an example embodiment, the determining the jth temperature compensation amount according to the jth time difference value, and performing the compensation processing on the temperature information of the jth temperature sensor according to the jth temperature compensation amount comprises: determining a jth first time threshold corresponding to the jth temperature sensor; in a case where the jth time difference value is greater than or equal to the jth first time threshold, determining the jth temperature compensation amount according to the jth time difference value, and performing the compensation processing on the temperature information of the jth temperature sensor according to the jth temperature compensation amount; and in a case where the jth time difference value is less than the jth first time threshold, not performing the compensation processing on the temperature information of the jth temperature sensor.
[0013] In an example embodiment, the determining the jth temperature compensation amount according to the jth time difference value and the compensating the temperature information of the jth temperature sensor according to the jth temperature compensation amount comprises: determining a jth second time threshold corresponding to the jth temperature sensor, wherein the jth second time threshold is greater than the jth first time threshold; and in a case that the jth time difference value is greater than or equal to the jth first time threshold and less than the jth second time threshold, determining the jth temperature compensation amount according to the jth time difference value and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation amount.
[0014] In an example embodiment, the method further comprises: in a case that the jth time difference value is greater than or equal to the jth second time threshold, determining an importance degree of the temperature information of the jth temperature sensor according to attribute information of the jth temperature sensor; and determining the jth rotation speed value according to the importance degree of the temperature information of the jth temperature sensor and prohibiting the determination of the jth rotation speed value according to the temperature information of the jth temperature sensor among the N-M temperature sensors.
[0015] In an example embodiment, the determining the jth temperature compensation amount according to the jth time difference value comprises: determining a first change rate of the temperature detected by the jth temperature sensor within a preset time before the jth time; and multiplying the first change rate by the jth time difference value to obtain the jth temperature compensation amount.
[0016] In an example embodiment, after the determining the fan rotation speed value as the maximum rotation speed value among the N-M rotation speed values and the M rotation speed values, the method further comprises: determining a target time, wherein the target time is a starting time of the determination of the fan rotation speed value according to the temperature information of the N-M temperature sensors and the M substitute temperature information; determining a time difference value between a specified time and the target time to obtain a target time difference value, wherein the specified time is a time when the fan of the server is to be controlled to rotate according to the determined rotation speed value; determining a rotation speed value compensation amount according to the target time difference value and compensating the fan rotation speed value according to the rotation speed value compensation amount to update the fan rotation speed value.
[0017] In an example embodiment, the determining the rotation speed value compensation amount according to the target time difference value and the compensating the fan rotation speed value according to the rotation speed value compensation amount comprises: in a case that the target time difference value is greater than or equal to a first preset threshold, determining the rotation speed value compensation amount according to the target time difference value and compensating the fan rotation speed value according to the rotation speed value compensation amount; and in a case that the target time difference value is less than the first preset threshold, not compensating the fan rotation speed value.
[0018] In an example embodiment, the method further comprises: in a case where the target time difference value is greater than or equal to the second preset threshold value, updating the fan rotating speed value to a maximum rotating speed value of the fan of the server.
[0019] In an example embodiment, the method further comprises: in a case where the target time difference value is greater than or equal to the second preset threshold value, updating the fan rotating speed value to a maximum rotating speed value of the fan of the server.
[0020] In an example embodiment, the method further comprises: in a case where the target time difference value is greater than or equal to the second preset threshold value, updating the fan rotating speed value to a maximum rotating speed value of the fan of the server.
[0021] In an example embodiment, the method further comprises: in a case where only P pieces of substitute temperature information corresponding to P pieces of temperature sensors in the M pieces of temperature sensors are obtained, determining a first rotating speed value according to attribute information of M-P pieces of temperature sensors, and determining a second rotating speed value according to temperature information of N-M pieces of temperature sensors and the P pieces of substitute temperature information, P being an integer greater than or equal to 0 and less than M, wherein the attribute information of the temperature sensor is used to indicate a monitoring object of the temperature sensor; and controlling the fan of the server to rotate at a target rotating speed value, wherein the target rotating speed value is a maximum value in the first rotating speed value and the second rotating speed value.
[0022] In an example embodiment, the method further comprises: in a case where only P pieces of substitute temperature information corresponding to P pieces of temperature sensors in the M pieces of temperature sensors are obtained, determining a first rotating speed value according to attribute information of M-P pieces of temperature sensors, and determining a second rotating speed value according to temperature information of N-M pieces of temperature sensors and the P pieces of substitute temperature information, P being an integer greater than or equal to 0 and less than M, wherein the attribute information of the temperature sensor is used to indicate a monitoring object of the temperature sensor; and controlling the fan of the server to rotate at a target rotating speed value, wherein the target rotating speed value is a maximum value in the first rotating speed value and the second rotating speed value.
[0023] In an example embodiment, the method further comprises: in a case where only P pieces of substitute temperature information corresponding to P pieces of temperature sensors in the M pieces of temperature sensors are obtained, determining a first rotating speed value according to attribute information of M-P pieces of temperature sensors, and determining a second rotating speed value according to temperature information of N-M pieces of temperature sensors and the P pieces of substitute temperature information, P being an integer greater than or equal to 0 and less than M, wherein the attribute information of the temperature sensor is used to indicate a monitoring object of the temperature sensor; and controlling the fan of the server to rotate at a target rotating speed value, wherein the target rotating speed value is a maximum value in the first rotating speed value and the second rotating speed value.
[0024] According to another embodiment of the present application, a fan control device is also provided, comprising: a first obtaining module, configured to obtain temperature information of N temperature sensors in a server, wherein N is a positive integer greater than or equal to 2, and monitoring objects of the N temperature sensors include components of the server and / or an environment in which the server is located; a second obtaining module, configured to obtain M pieces of substitute temperature information corresponding to M temperature sensors in a case where temperature information of the M temperature sensors is abnormal, wherein an mth piece of substitute temperature information in the M pieces of substitute temperature information is used to reflect a temperature of an mth temperature sensor in the M temperature sensors, and M is a positive integer greater than or equal to 1 and less than or equal to N; and a control module, configured to determine a fan rotating speed value according to temperature information of N-M temperature sensors and the M pieces of substitute temperature information, and control the fan of the server to rotate at the fan rotating speed value.
[0025] According to still another embodiment of the present application, a nonvolatile computer readable storage medium is also provided, and the nonvolatile computer readable storage medium stores a computer program, wherein the computer program is configured to execute steps in any of the above method embodiments when running.
[0026] According to still another embodiment of the present application, an electronic device is also provided, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to perform steps in any of the above method embodiments.
[0027] According to still another embodiment of the present application, a computer program product is also provided, and the computer program product comprises a computer program, and the computer program is executed by a processor to implement steps in any of the above method embodiments.
[0028] According to the present application, in a case where temperature information of the M temperature sensors cannot be read or other faults occur, the corresponding substitute temperature information is used to participate in calculation of the rotating speed value of the fan, so that the rotating speed value of the fan calculated by the controller is more accurate, that is, the rotation of the fan can be more accurately controlled, and the problem that the rotation of the fan cannot be accurately controlled in a case where the temperature of a component in the server is abnormal is solved. BRIEF DESCRIPTION OF DRAWINGS
[0029] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate certain illustrative embodiments of the present application and together with the general description of the present application given above and the detailed description of the present application given below, serve to explain the present application. In the drawings:
[0030] FIG. 1 is a hardware structure block diagram of a server device according to a fan control method according to an embodiment of the present application;
[0031] FIG. 2 is a flowchart of a fan control method according to an embodiment of the present application;
[0032] FIG. 3 is a schematic diagram of an optional abnormal temperature sensing of a component according to an embodiment of the present application;
[0033] FIG. 4 is a schematic diagram of an optional fan device according to an embodiment of the present application;
[0034] FIG. 5 is a schematic diagram of an optional relationship between fan speed and temperature according to an embodiment of the present application;
[0035] FIG. 6 is a schematic diagram of an optional control of fan rotation according to an embodiment of the present application;
[0036] FIG. 7 is a flowchart of an optional control of fan rotation according to an embodiment of the present application;
[0037] FIG. 8 is a flowchart of another optional control of fan rotation according to an embodiment of the present application;
[0038] FIG. 9 is a structural block diagram of a fan control apparatus according to an embodiment of the present application;
[0039] FIG. 10 is a structural schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0040] Hereinafter, the embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.
[0041] It should be noted that the terms "first", "second", and the like in the description and claims of the present application and the above-described accompanying drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.
[0042] The fan control method embodiments provided in the embodiments of the present application can be executed in a server device or similar computing apparatus. Taking an example of running on a server device, FIG. 1 is a hardware structural block diagram of a server device of a fan control method according to an embodiment of the present application. As shown in FIG. 1, the server device can include one or more (only one is shown in FIG. 1) processors 102 (the processor 102 can include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device can further include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that the structure shown in FIG. 1 is only schematic, which does not limit the structure of the above-mentioned server device. For example, the server device can further include more or less components than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1.
[0043] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the fan control method in the embodiments of the present application. The processor 102 can execute various functional applications and data processing, i.e., implement the above method, by running the computer program stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and the remote memory can be connected to a server device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0044] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication service provider of the server device. In one example, the transmission device 106 includes a network adapter (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.
[0045] To solve the above problems, the embodiments of the present application provide a fan control method, as shown in FIG. 2, which includes the following steps S202-S206:
[0046] In step S202, temperature information of N temperature sensors in the server is obtained, where N is a positive integer greater than or equal to 2, and the monitoring objects of the N temperature sensors include components of the server and / or an environment in which the server is located.
[0047] Optionally, in the embodiments of the present application, the execution subject of the fan control method is a controller, and the controller is a baseboard management controller (BMC).
[0048] Optionally, the monitoring objects corresponding to some or all of the N temperature sensors can be the same or different.
[0049] Optionally, the controller in the server monitors the temperature information of each component and environment in the server in real time through N temperature sensors, the components of the server include but are not limited to: hard disk, network card, controller on the motherboard in the server, etc., each temperature sensor monitors different components, so as to ensure that the server can monitor the temperature of all components, and once an abnormality occurs, it can be handled in time.
[0050] Optionally, when the controller determines that the temperature information of M temperature sensors in the N temperature sensors is abnormal, the controller can send an alarm message.
[0051] Step S204: In the case that the temperature information of M temperature sensors in the N temperature sensors is abnormal, M substitute temperature information corresponding to the M temperature sensors is obtained, wherein the mth substitute temperature information in the M substitute temperature information is used to reflect the temperature of the monitoring object corresponding to the mth temperature sensor in the M temperature sensors, and M is a positive integer greater than or equal to 1 and less than or equal to N;
[0052] Step S206: Determine the fan speed value according to the temperature information of N-M temperature sensors and the M substitute temperature information, and control the fan of the server to rotate at the fan speed value.
[0053] Through the above steps, when the M temperature sensors cannot read the temperature information or other faults occur, the corresponding substitute temperature information is used to participate in the calculation of the fan speed value, so that the fan speed value calculated by the controller is more accurate, that is, the rotation of the fan can be more accurately controlled, solving the problem that the rotation of the fan cannot be accurately controlled when the temperature of the components in the server is abnormal, so that the system does not stay in the temperature abnormal condition for a long time and the server's heat dissipation system can still work effectively, avoiding the reduction of heat dissipation efficiency, increasing the stability and fault tolerance of the system.
[0054] In an exemplary embodiment, obtaining M substitute temperature information corresponding to the M temperature sensors can be achieved by the following steps S11-S12:
[0055] Step S11: Determine the temperature detector on the motherboard of the server according to the position of the monitoring object of the mth temperature sensor in the M temperature sensors, wherein the distance between the temperature detector and the monitoring object is less than a preset distance;
[0056] Step S12: Determine the substitute temperature information corresponding to the mth temperature sensor according to the temperature information of the temperature detector.
[0057] Optionally, the temperature detector can be multiple.
[0058] Optionally, assuming that there are temperature information of a temperature detectors, where a is greater than or equal to 2, the mth temperature sensor corresponding to the alternative temperature information is the average temperature corresponding to the temperature information of the a temperature detectors.
[0059] In an exemplary embodiment, the fan speed value is determined according to the temperature information of the N-M temperature sensors and the M alternative temperature information, which can be achieved by the following steps S21-S23:
[0060] Step S21: determining the jth speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors, obtaining N-M speed values, where j takes 1,..., N-M-1, N-M;
[0061] Step S22: determining M speed values according to M alternative temperature information;
[0062] It should be noted that the method of determining the jth speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors is consistent with the method of determining the mth speed value in the M speed values according to the mth alternative temperature information in the M alternative temperature information.
[0063] Step S23: determining the maximum speed value in the N-M speed values and the M speed values as the fan speed value.
[0064] In an exemplary embodiment, the jth speed value is determined according to the temperature information of the jth temperature sensor in the N-M temperature sensors, which can be achieved by the following steps: determining the jth speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors based on a proportional-integral-derivative control algorithm.
[0065] Optionally, referring to FIG. 6, the proportional-integral-derivative (PID) control algorithm is based on a preset formula, and the corresponding speed value is calculated in real time according to the speed regulation parameters and the temperature information of the N-M temperature sensors.
[0066] Optionally, the preset formula is: u(t) = kP(e(t) + 1 / T1∫e(t)dt + TD*(de(t) / dt)); wherein, u(t) is the output signal generated by the controller, i.e. the speed value; kP is the proportional gain, which controls the strength of the proportional term, and determines the degree of direct influence of the error (e(t)) on the output (u(t)); e(t) is the error signal; 1 / T1 is the gain of the integral term, wherein T1 represents the integral time constant ∫e(t)dt is the integral of the error signal (e(t)), and the integral term can ensure that the controller output adjusts the accumulated error over time; TD is the differential time constant, which controls the strength of the differential term, and the differential term functions to predict future error changes to reduce overshoot in the response process; de(t) / dt is the differential of the error signal (e(t)), i.e. the rate of change of the error over time.
[0067] Optionally, FIG. 5 shows the relationship between the speed value calculated by the PID algorithm and the temperature, and it can be seen that as the temperature (known through the temperature information) increases, the fan speed will also increase accordingly.
[0068] It should be noted that the PID control algorithm calculates the speed value by considering the current value, past value (integral term) and future value (derivative term) of the error in a more complex and more adaptive way to dynamic systems. In heat dissipation control, this can help the system to reach the target temperature more quickly and maintain stability, while reducing unnecessary fluctuations in fan speed.
[0069] In an exemplary embodiment, before determining the jth speed value according to the temperature information of the jth temperature sensor among the N-M temperature sensors, the method further comprises the following steps S31-S32:
[0070] Step S31: determining the time difference between the jth reference time and the jth time, to obtain the jth time difference value, wherein the jth time is the time when the temperature information of the jth temperature sensor is obtained, and the jth reference time is the time when the determination of the jth speed value according to the temperature information of the jth temperature sensor starts;
[0071] Optionally, the jth time is the time when the controller sends an acquisition instruction to the jth temperature sensor, and the acquisition instruction is used to indicate the acquisition of the temperature information of the jth temperature sensor.
[0072] Optionally, when the controller acquires the temperature information of the jth temperature sensor, a timestamp record is synchronously acquired and stored in the volatile memory and / or non-volatile memory of the server, thereby obtaining the time when the temperature information of the jth temperature sensor is acquired.
[0073] Step S32: determining a jth temperature compensation amount according to the jth time difference value, and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation amount to update the acquired temperature information of the jth temperature sensor.
[0074] It should be noted that there will be a period of time between the time when the temperature information of the jth temperature sensor is acquired and the time when the jth rotational speed value is determined according to the temperature information of the jth temperature sensor. If there is a large temperature change during this period of time, the difference between the temperature information detected by the jth temperature sensor at the jth reference time and the temperature information detected by the jth temperature sensor at the jth time will be large, which will result in an inaccurate rotational speed value of the fan. In order to more accurately determine the rotational speed value of the fan, the jth temperature compensation amount needs to be determined according to the jth time difference value, and the temperature information of the jth temperature sensor needs to be compensated according to the jth temperature compensation amount.
[0075] In an exemplary embodiment, determining the jth temperature compensation amount according to the jth time difference value and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation amount can be achieved by the following steps S41-S42:
[0076] Step S41: determining a jth first time threshold corresponding to the jth temperature sensor;
[0077] Step S42: in the case where the jth time difference value is greater than or equal to the jth first time threshold, determining the jth temperature compensation amount according to the jth time difference value, and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation amount; in the case where the jth time difference value is less than the jth first time threshold, the temperature information of the jth temperature sensor is not compensated.
[0078] Optionally, the compensation processing of the temperature information can be a threshold compensation triggered selectively, that is, a reasonable first time threshold is determined according to an abnormal temperature level, for example, the processor is a more important component, and when the temperature information of the processor is delayed for 100 milliseconds (i.e., a first preset threshold), compensation is started, and the temperature information of the remaining components is delayed for 1 second before compensation is started.
[0079] It should be noted that with reference to FIG. 8, it can be seen that there is a large time delay in the server system, and if the jth time difference value is greater than or equal to the jth first time threshold value, it means that the time from the time when the temperature information of the jth temperature sensor is obtained to the time when the jth rotational speed value is determined according to the temperature information of the jth temperature sensor is long, and the temperature information of the jth temperature sensor is most likely to have changed greatly, and in order to more accurately determine the rotational speed value of the fan, the temperature information of the jth temperature sensor needs to be compensated.
[0080] In an exemplary embodiment, the jth temperature compensation amount is determined according to the jth time difference value, and the temperature information of the jth temperature sensor is compensated according to the jth temperature compensation amount, which can be achieved by the following steps S51-S52:
[0081] Step S51: determining the jth second time threshold value corresponding to the jth temperature sensor, wherein the jth second time threshold value is greater than the jth first time threshold value;
[0082] Step S52: in the case where the jth time difference value is greater than or equal to the jth first time threshold value and less than the jth second time threshold value, determining the jth temperature compensation amount according to the jth time difference value, and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation amount.
[0083] It should be noted that by presetting the second time threshold value, it can be ensured that the jth temperature compensation amount is effective, i.e. the temperature information of the jth temperature sensor is compensated in a short time, and the rotational speed value obtained according to the compensated temperature information is effective.
[0084] In an exemplary embodiment, the method further comprises the following steps S61-S62:
[0085] Step S61: in the case where the jth time difference value is greater than or equal to the jth second time threshold value, determining the importance of the temperature information of the jth temperature sensor according to the attribute information of the jth temperature sensor;
[0086] Step S62: determining the jth rotational speed value according to the importance of the temperature information of the jth temperature sensor, and prohibiting the determination of the jth rotational speed value according to the temperature information of the jth temperature sensor among the N-M temperature sensors.
[0087] Optionally, the jth rotational speed value can be full rotation, i.e. the maximum rotational speed value of the fan.
[0088] In an exemplary embodiment, the method further comprises the following steps S61 and S63. Step S63 comprises: determining a compensation rotation speed value of the jth rotation speed value according to the importance of the temperature information of the jth temperature sensor, wherein the jth rotation speed value is updated by adding the compensation rotation speed value of the jth rotation speed value to the jth rotation speed value after determining the jth rotation speed value according to the temperature information of the jth temperature sensor.
[0089] It should be noted that when the jth time difference value is greater than or equal to the jth second time threshold value, it means that the time from the time when the temperature information of the jth temperature sensor is obtained to the time when the jth rotation speed value is determined according to the temperature information of the jth temperature sensor is relatively long, and even if the temperature compensation amount is calculated and / or predicted, it may not cover the actual temperature change. When the jth time difference value exceeds the second time threshold value, it should be directly judged as temperature invalid, and the heat dissipation enters an abnormal mode, and the maximum rotation speed or the corresponding rotation speed is selected according to the temperature importance, so as to prevent the system from over-temperature.
[0090] In an exemplary embodiment, the jth temperature compensation amount is determined according to the jth time difference value, which can be achieved by the following steps S71-S72:
[0091] Step S71: determining a first change rate of the temperature detected by the jth temperature sensor within a preset time before the jth time;
[0092] Step S72: multiplying the first change rate by the jth time difference value to obtain the jth temperature compensation amount.
[0093] That is, in the present embodiment, the trend of the temperature change multiple times needs to be calculated, such as the slope of the temperature change, whether it is steeply increasing or relatively stable or steeply decreasing, and then the change slope (i.e. the first change rate) is multiplied by the temperature delay (i.e. the jth time difference value) to predict the temperature change amount that may occur within the delay time, and finally the predicted temperature change amount is involved in the PID calculation, so that the calculation is more accurate.
[0094] In an exemplary embodiment, after determining the fan rotation speed value as the maximum rotation speed value in the N-M rotation speed values and the M rotation speed values, the method further comprises the following steps S81-S83:
[0095] Step S81: determining a target time, wherein the target time is the starting time of determining the fan rotation speed value according to the temperature information of the N-M temperature sensors and the M substitute temperature information;
[0096] Optionally, determining the jth rotation speed value according to the temperature information of the jth temperature sensor and determining the j+1th rotation speed value according to the temperature information of the j+1th temperature sensor are executed asynchronously.
[0097] Optionally, determining the mth rotational speed value according to the mth alternative temperature information is asynchronous with determining the (m+1)th rotational speed value according to the (m+1)th alternative temperature information.
[0098] It should be noted that the target time is the earliest one of the plurality of times, wherein the plurality of times comprises a start time of determining the jth rotational speed value according to the temperature information of the jth temperature sensor and a start time of determining the mth rotational speed value according to the mth alternative temperature information.
[0099] Step S82: determining a time difference between the specified time and the target time to obtain a target time difference, wherein the specified time is a time at which the fan of the server is to be controlled to rotate according to the determined rotational speed value;
[0100] Step S83: determining a rotational speed value compensation amount according to the target time difference, and compensating the rotational speed value of the fan according to the rotational speed value compensation amount to update the rotational speed value of the fan.
[0101] It should be noted that there is a period of time between the start time of determining the rotational speed value of the fan according to the temperature information of the N-M temperature sensors and the M alternative temperature information and the time at which the fan of the server is to be controlled to rotate according to the determined rotational speed value. If there is a large rotational speed change during this period of time, the final rotational speed of the fan to be controlled to rotate will be inaccurate. Therefore, in order to more accurately determine the rotational speed value of the fan, it is necessary to determine a rotational speed value compensation amount according to the target time difference, and to compensate the rotational speed value of the fan according to the rotational speed value compensation amount.
[0102] In an exemplary embodiment, determining the rotational speed value compensation amount according to the target time difference, and compensating the rotational speed value of the fan according to the rotational speed value compensation amount can be achieved by the following steps: in the case that the target time difference is greater than or equal to a first preset threshold, determining the rotational speed value compensation amount according to the target time difference, and compensating the rotational speed value of the fan according to the rotational speed value compensation amount; wherein in the case that the target time difference is less than the first preset threshold, the rotational speed value of the fan is not compensated.
[0103] Optionally, the compensation processing of the rotational speed value can be a threshold type compensation triggered selectively, that is, a reasonable first preset threshold is determined, for example, the compensation is started when the rotational speed value of the fan is delayed by 200 milliseconds (i.e. the first preset threshold).
[0104] In an exemplary embodiment, the step of determining the rotation speed value compensation amount according to the target time difference value, and the step of compensating the fan rotation speed value according to the rotation speed value compensation amount, can be implemented by the following steps: in a case where the target time difference value is greater than or equal to a first preset threshold value and less than a second preset threshold value, determining the rotation speed value compensation amount according to the target time difference value, and compensating the fan rotation speed value according to the rotation speed value compensation amount, wherein the second preset threshold value is greater than the first preset threshold value.
[0105] It should be noted that by presetting the second preset threshold value, it can be ensured that the rotation speed value compensation amount is effective, that is, the fan rotation speed value is compensated within a short time, and the fan is controlled according to the compensated fan rotation speed value.
[0106] In an exemplary embodiment, the method further comprises the following steps: in a case where the target time difference value is greater than or equal to the second preset threshold value, updating the fan rotation speed value to the maximum rotation speed value of the fan of the server.
[0107] It should be noted that when the target time difference value is greater than or equal to the second preset threshold value (for example, 10 seconds), it is inferred that the system heat dissipation is out of control, and at this time, compensating the fan rotation speed value may make the system heat dissipation ineffective more likely, thereby forcing the system fan to maximize heat dissipation (that is, updating the fan rotation speed value to the maximum rotation speed value of the fan of the server) to prevent the system from overheating.
[0108] In an exemplary embodiment, the step of determining the rotation speed value compensation amount according to the target time difference value can be implemented by the following steps S91-S92:
[0109] Step S91: determining a second change rate of the rotation speed of the fan of the server within a preset time before a specified time;
[0110] Step S92: multiplying the second change rate by the target time difference value to obtain the rotation speed value compensation amount.
[0111] Optionally, the trend of the final fan rotation speed change in the previous times can be calculated, such as the slope of the rotation speed change, whether it is steeply increasing or relatively stable or steeply decreasing, and then the calculated delay is multiplied according to the change slope to obtain the rotation speed value compensation amount, and the obtained rotation speed value compensation amount is used to compensate the fan rotation speed value.
[0112] In an exemplary embodiment, the method further comprises the following steps S101-S102:
[0113] Step S101: In the case that only P pieces of substitute temperature information corresponding to P pieces of temperature sensors in the M pieces of temperature sensors are acquired, determining a first rotation speed value according to the attribute information of M-P pieces of temperature sensors, and determining a second rotation speed value according to the temperature information of N-M pieces of temperature sensors and the P pieces of substitute temperature information, P being an integer greater than or equal to 0 and smaller than M, wherein the attribute information of the temperature sensor is used to indicate the monitoring object of the temperature sensor.
[0114] Step S102: Controlling the fan of the server to rotate at a target rotation speed value, wherein the target rotation speed value is the maximum value in the first rotation speed value and the second rotation speed value.
[0115] It should be noted that through the above steps, in the case that the M pieces of temperature sensors only read part of the substitute temperature information (P pieces of substitute temperature information) or other faults occur, the first rotation speed value is determined according to the attribute information of M-P pieces of temperature sensors, and the second rotation speed value is determined according to the temperature information of N-M pieces of temperature sensors and the P pieces of substitute temperature information, and then the fan of the server is controlled to rotate at a target rotation speed value, so that the system is not in the case of temperature anomaly for a long time and over-temperature, thereby increasing the stability and fault tolerance of the system.
[0116] In an exemplary embodiment, in the case that P is equal to 0, that is, the temperature information of M pieces of temperature sensors in the N pieces of temperature sensors is abnormal, and there is no M pieces of substitute temperature information corresponding to the M pieces of temperature sensors, and then the first rotation speed value is determined according to the attribute information of the M pieces of temperature sensors, and the second rotation speed value is determined according to the temperature information of N-M pieces of temperature sensors, and the fan of the server is controlled to rotate at a target rotation speed value.
[0117] In an exemplary embodiment, determining the first rotation speed value according to the attribute information of M-P pieces of temperature sensors can be achieved by the following steps S111-112:
[0118] Step S111: Determining the abnormal temperature level of the server according to the attribute information of M-P pieces of temperature sensors to obtain a target abnormal temperature level, and determining a corresponding target rotation speed value calculation algorithm according to the target abnormal temperature level;
[0119] Optionally, based on the target configuration file, the corresponding target rotation speed value calculation algorithm is determined according to the target abnormal temperature level, the target configuration file has different abnormal temperature level corresponding rotation speed value calculation algorithms, and the rotation speed value calculation algorithm includes the target rotation speed value calculation algorithm.
[0120] Optionally, the rotation speed value calculation algorithm includes but is not limited to:
[0121] A linear equation algorithm, i.e., using a linear relationship to calculate the speed value, for example, when the target abnormal temperature level is level 9, the formula Y = 9X + 2 can be used, where X is the average temperature of the server case, and Y is the target speed value; when the target abnormal temperature level is level 1, Y = X + 1 can be used.
[0122] A multi-level ladder algorithm, i.e., based on the target abnormal temperature level of the server, different ladder intervals are set, and different types of speed value calculation algorithms are used in each interval, for example, when the target abnormal temperature level is between level 1 and level 3, the first type of speed value calculation formula is used; when the target abnormal temperature level is between level 4 and level 7, the second type of speed value calculation algorithm is used; when the target abnormal temperature level is between level 8 and level 9, the third type of speed value calculation algorithm is used. Alternatively, the first type of speed value calculation algorithm can be a linear equation algorithm (for example, the first level corresponds to the algorithm Y = 1X + 2, the second level corresponds to the algorithm Y = 2X + 2, and the third level corresponds to the algorithm Y = 3X + 2), the second type of speed value calculation algorithm can be a quadratic equation algorithm (for example, the fourth level corresponds to the algorithm Y = 4X 2 + 4, the fifth level corresponds to the algorithm Y = 5X 2 + 5, the sixth level corresponds to the algorithm Y = 6X 2 + 6, and the seventh level corresponds to the algorithm Y = 7X 2 + 7), and the second type of speed value calculation algorithm can be a cubic equation algorithm (for example, the eighth level corresponds to the algorithm Y = 8X 3 + 8, and the ninth level corresponds to the algorithm Y = 9X 3 + 9).
[0123] It should be noted that the multi-level ladder algorithm can be more finely controlled according to the severity of the temperature anomaly.
[0124] It should be noted that the speed value calculation algorithm corresponding to different abnormal temperature levels requires high coverage and low, for example: the speed value calculation algorithm corresponding to a high abnormal temperature level should have a larger speed value than the speed value calculation algorithm corresponding to a low abnormal temperature level under the same conditions.
[0125] Step S112: using the target speed value calculation algorithm, determining the first speed value according to the average temperature of the server case.
[0126] Through the above steps, different speed value calculation algorithms can be used for different server abnormal temperature levels, making the fan speed adjustment more accurate, effectively responding to temperature changes in the server internal or external environment, especially in server-intensive environments such as data centers. This method can better balance the heat dissipation efficiency and energy consumption.
[0127] In one example embodiment, before the first rotating speed value is determined according to the average temperature of the server cabinet using the target rotating speed value calculation algorithm, the method further comprises: obtaining temperatures detected by a plurality of temperature detectors on the mainboard of the server; and determining the average temperature of the cabinet according to the temperatures detected by the plurality of temperature detectors.
[0128] Optionally, the temperatures detected by the plurality of temperature detectors on the mainboard are different from the temperatures detected by the N temperature sensors.
[0129] It should be noted that the average temperature of the cabinet can be accurately determined through the above steps, so that the target rotating speed value is calculated according to the average temperature of the cabinet when the target rotating speed value calculation algorithm is a first-order equation algorithm.
[0130] In one example embodiment, the determination of the abnormal temperature level of the server according to the attribute information of the M-P temperature sensors can be implemented through the following steps S121-S122:
[0131] Step S121: determining M-P abnormal temperature levels corresponding to the M-P temperature sensors according to the attribute information of the M-P temperature sensors, wherein the abnormal temperature level of the i-th temperature sensor in the M-P temperature sensors is determined according to the attribute information of the i-th temperature sensor, and i is a positive integer greater than or equal to 1 and less than or equal to M-P;
[0132] Step S122: determining the highest level in the M-P abnormal temperature levels as the target abnormal temperature level.
[0133] Optionally, different components and environments have different temperature levels, different temperature sensors monitor different components and environments, and the M abnormal temperature levels can be determined according to the components and environments indicated by the attribute information of the temperature sensors, and the abnormal temperature level with the highest temperature level in the M abnormal temperature levels is selected as the abnormal temperature level of the server, i.e., the target abnormal temperature level.
[0134] Optionally, the temperature level is represented by a number from natural number 1 to natural number 9, different natural numbers represent different temperature levels, and the larger the number, the higher the level, for example, the number 1 represents the lowest level (level 1), and the number 9 represents the highest level (level 9); the temperature level is determined according to the influence of temperature abnormalities (including temperature loss and temperature out of the set range) of different components and environments in the server on the heat dissipation performance of the server; the greater the influence of the temperature abnormalities, the higher the temperature level.
[0135] The importance of the temperature of the components and the environment monitored by the temperature sensor can be represented by the influence of the abnormal temperature on the server heat dissipation performance. For example, whether the temperature of the hard disk is high or low has a very high influence on the server heat dissipation performance. If the temperature of the hard disk is lower, the server heat dissipation performance is superior. Therefore, it is necessary to monitor the temperature of the hard disk, that is, the importance of the temperature of the hard disk is higher. If the temperature of the hard disk is lost, the corresponding temperature sensor fails to reflect the temperature of the hard disk, which will cause a great influence. Therefore, the temperature level of the hard disk is 9 levels.
[0136] It should be noted that through the above steps, the abnormal temperature level of the server can be accurately judged, so that the corresponding rotation speed value calculation algorithm can be determined faster, and the rotation of the fan can be controlled more efficiently, thereby maximizing the heat dissipation efficiency of the server.
[0137] In an exemplary embodiment, determining the second rotation speed value according to the temperature information of the N-M temperature sensors and the P alternative temperature information includes: determining the jth rotation speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors, obtaining N-M rotation speed values, wherein j takes 1,..., N-M-1, N-M; determining P rotation speed values according to the P alternative temperature information; and determining the maximum rotation speed value in the N-M rotation speed values and the P rotation speed values as the second rotation speed value.
[0138] In an exemplary embodiment, after determining the maximum rotation speed value in the N-M rotation speed values and the P rotation speed values as the second rotation speed value, the method further includes: determining a first target time, wherein the first target time is a starting time of determining the second rotation speed value according to the temperature information of the N-M temperature sensors and the P alternative temperature information; determining a time difference value between a specified time and the first target time, obtaining a first target time difference value, wherein the specified time is a time when the fan of the server is to be controlled to rotate according to the determined rotation speed value; determining a rotation speed value compensation amount according to the first target time difference value, and compensating the rotation speed value of the fan according to the rotation speed value compensation amount to update the second rotation speed value.
[0139] Obviously, the above-described embodiments are only part of the embodiments of the present disclosure, not all. In order to better understand the above method, the above process is described in combination with the embodiments below, but is not used to limit the technical solutions of the embodiments of the present disclosure. Alternatively, when the controller is BMC:
[0140] I. Use the temperature abnormality severity level to more accurately obtain the heat dissipation speed of the temperature acquisition abnormal scene;
[0141] 1、BMC according to the importance of its temperature to make temperature grade, such as the core temperature of the environment temperature / CPU / memory is the most important temperature, its temperature loss will have a very serious impact on the system cooling, then this kind of temperature serious level is high, such as 9 level; and some general important temperature such as hard disk temperature / network card temperature, this kind of temperature loss has a general impact on the system cooling, then this kind of temperature is general, can be set to 5 level; Some temperature of the small controller on the motherboard is not very important, and there is no special risk of over temperature burn, so the temperature loss has little effect on the system cooling, which can be set to 1 level; There is no temperature loss in the normal operation of the system, and no abnormal condition speed is needed, so the normal condition is set to 0 level;
[0142] 2、BMC in accordance with the temperature of the fan speed, if the abnormal temperature level is not 0, the abnormal speed operation is started synchronously, if there are multiple abnormal serious levels, the highest serious level is taken, the corresponding calculation method is called according to the current abnormal level, and the calculation method of different levels is set to cover low, such as the method adopts a one-order equation, Y=KX+B, then the speed value calculated by the method of high abnormal level under the same condition is greater than that of low abnormal level, such as 1 level is Y=X+1, and 9 level is Y=9X+9, and the PID algorithm is the same.
[0143] 3、As shown in Figure 7, the BMC system compares the results of normal temperature calculation and abnormal level speed after calculation (such as PID control algorithm), and the higher one is taken to adjust the fan speed.
[0144] II. Delay compensation processing;
[0145] Air-cooled server system is the most popular server system at present, and its cooling speed is generally controlled by BMC as the main controller. Referring to Figure 8, BMC cyclically collects all temperature points necessary for system cooling, and continuously calculates the speed of the fan through algorithm, and finally BMC sets the speed to the fan through physical way, and the fan rotates to cool the system. The ultimate purpose of PID algorithm is also to maintain stable cooling, but as can be seen from Figure 8, there are two large time delays in the server system, one is the time delay of BMC cyclically acquiring temperature, and the other is the delay of BMC setting the speed calculated according to temperature to the fan. The first delay is collectively referred to as temperature delay, and the second delay is collectively referred to as calculation delay. The two delays will seriously damage the stability, resulting in that the temperature may have changed when BMC calculates the speed according to the temperature, and the calculation delay will further aggravate the possibility of change. If there is a large change in temperature during the delay, it may cause unstable cooling or high and low speed of the fan. The present application adds the two cooling delay concepts and combines a series of algorithm mechanisms to make the PID algorithm speed more stable.
[0146] 1、In the BMC to obtain temperature link to increase the temperature acquisition timestamp record, the record can be stored in the system volatile and non-volatile storage, the meaning of the timestamp is to record the time of each successful temperature acquisition, that is, the whole cooling process increases the temperature time concept.
[0147] 2、In BMC calculation and successful set to the fan speed after increasing the timestamp record, the record can be stored in the system volatile and non-volatile storage, the meaning of the timestamp is to record the time of each successful calculation and set to the fan really cooling effective time.
[0148] 3、Calculate temperature delay, when BMC obtains temperature, subtract the timestamp recorded in 1 from the current timestamp, and the intermediate difference is the temperature delay.
[0149] 4、Calculate the calculation delay, subtract the recorded timestamp from the current timestamp, and the intermediate difference is the calculation delay.
[0150] 5、Temperature delay compensation, compensation trigger condition: can be a selective trigger threshold type compensation, such as each temperature has a threshold according to importance, such as CPU temperature and other important temperature delay 100 milliseconds to start compensation, the rest of the less important temperature 1 second to start compensation, or the temperature delay can be used as a parameter to participate in compensation every time, temperature delay compensation value or proportional calculation method: prediction compensation, that is, according to the algorithm to calculate the trend of temperature change many times before, such as temperature change slope, is steep increase or relatively stable or steep decline, then according to the change slope * temperature delay, predict the temperature change amount that may appear in the delay time, finally make the predicted temperature change amount participate in the PID calculation, at the same time, a temperature invalid judgment threshold can be set according to the temperature importance, such as CPU temperature importance, CPU temperature temperature delay more than 3 seconds after the temperature change amount prediction may also be unable to cover the real temperature change of the temperature, more than the threshold should be directly judged as temperature invalid, at the same time, the cooling enters the abnormal mode, according to the temperature importance to choose to pull the full rotation or increase the corresponding speed, to prevent system over temperature.
[0151] 6. Calculate delay compensation. Compensation trigger conditions: It can be a selectively triggered threshold-type compensation, such as triggering delay compensation only when the delay since the last calculation exceeds 1 second, or the calculation delay can be used as a parameter in each calculation. The calculation method for the delay compensation value or ratio is as follows: predictive compensation, that is, based on the algorithm to calculate the final fan speed change trend of the previous few calculations, such as the slope of the speed change, whether it is a steep increase, relatively stable or a steep drop, and then predict the most likely speed change within the delay time by multiplying the change slope by the calculation delay. The change is directly added to the speed of the current calculation, thereby predictively adjusting the speed. At the same time, a speed invalidation judgment threshold can be set as needed. For example, if the delay since the last calculation is greater than 10 seconds, it is inferred that the system heat dissipation is out of control. At this time, prediction may not have a good effect, but may instead increase the possibility of system heat dissipation failure, thereby forcing the system fan to maximize heat dissipation and preventing system overheating.
[0152] It should be noted that this solution also has the following advantages:
[0153] 1. By differentiating the severity of abnormalities, the system classifies heat dissipation anomalies, avoiding direct full-speed operation. This ensures a smoother and more stable process when the server system experiences abnormal heat dissipation, reducing unnecessary increases in fan speed and power consumption.
[0154] 2. The concept of temperature latency and computation latency has been added to the server heat dissipation. Latency is unavoidable, but it can be predicted based on latency. Through the calculation of latency prediction, the heat dissipation of the entire system can be made smoother and more accurate, saving server power consumption and noise. At the same time, the concept of latency failure is introduced to avoid the risk of heat dissipation failure due to excessive temperature and computation latency, making server heat dissipation more efficient and stable.
[0155] Optionally, referring to Figure 3, when the component temperature sensor is abnormal, it cannot participate in fan speed regulation. The backup temperature sensor (i.e., the above-mentioned alternative temperature information) will replace the component temperature sensor in fan speed regulation to ensure the normal operation of the server.
[0156] Meanwhile, referring to Figure 4, the fan has a backup design that can intelligently adjust its speed according to the temperature inside the chassis, keeping the device away from the risk of high temperatures.
[0157] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software on a general hardware platform as necessary, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution, and the computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the method of each embodiment of the present application.
[0158] In the present embodiment, a fan control device is also provided for implementing the above embodiments and preferred embodiments, which have been described and will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.
[0159] Fig. 9 is a structural block diagram of a fan control device according to an embodiment of the present application, which includes:
[0160] The first obtaining module 92 is configured to obtain temperature information of N temperature sensors in the server, where N is a positive integer greater than or equal to 2, and the monitoring objects of the N temperature sensors include components of the server and / or an environment in which the server is located.
[0161] The second obtaining module 94 is configured to, in a case where temperature information of M temperature sensors among the N temperature sensors is abnormal, obtain M pieces of substitute temperature information corresponding to the M temperature sensors, where the mth piece of substitute temperature information in the M pieces of substitute temperature information is used to reflect a temperature of a monitoring object corresponding to an mth temperature sensor in the M temperature sensors, and M is a positive integer greater than or equal to 1 and less than or equal to N.
[0162] The control module 96 is configured to determine a fan rotating speed value according to the temperature information of the N-M temperature sensors and the M pieces of substitute temperature information, and control the fan of the server to rotate at the fan rotating speed value.
[0163] The device can use the corresponding alternative temperature information to participate in the calculation of the rotation speed value of the fan when the M temperature sensors cannot read temperature information or other faults occur, so that the rotation speed value of the fan calculated by the controller is more accurate, that is, the rotation of the fan can be more accurately controlled, the problem that the rotation of the fan cannot be accurately controlled in the case that the temperature of the components inside the server is abnormal is solved, the system is prevented from being in an overheated state for a long time in the case of temperature abnormality, the heat dissipation system of the server can still work effectively, the reduction of heat dissipation efficiency is avoided, and the stability and fault tolerance of the system are increased.
[0164] In an example embodiment, the second acquisition module 94 is further configured to determine a temperature detector on the mainboard of the server according to the position of the monitoring object of the mth temperature sensor in the M temperature sensors, wherein the distance between the temperature detector and the monitoring object is less than a preset distance; and determine the alternative temperature information corresponding to the mth temperature sensor according to the temperature information of the temperature detector.
[0165] In an example embodiment, the control module 96 includes a first determination unit configured to determine the jth rotation speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors, to obtain N-M rotation speed values, wherein j is 1,..., N-M-1, N-M; determine M rotation speed values according to the M alternative temperature information; and determine the maximum rotation speed value in the N-M rotation speed values and the M rotation speed values as the rotation speed value of the fan.
[0166] In an example embodiment, the first determination unit is further configured to determine the jth rotation speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors based on a proportional-integral-derivative control algorithm.
[0167] In an example embodiment, the first determination unit is further configured to determine the jth time difference value before determining the jth rotation speed value according to the temperature information of the jth temperature sensor in the N-M temperature sensors, wherein the jth time difference value is the time difference between the jth reference time and the jth time, the jth time is the time when the temperature information of the jth temperature sensor is acquired, and the jth reference time is the time when the determination of the jth rotation speed value according to the temperature information of the jth temperature sensor starts; and the device further includes a compensation module including a second determination unit configured to determine the jth temperature compensation amount according to the jth time difference value, and perform compensation processing on the temperature information of the jth temperature sensor according to the jth temperature compensation amount to update the acquired temperature information of the jth temperature sensor.
[0168] In an example embodiment, the compensation module is further configured to determine a jth first time threshold corresponding to the jth temperature sensor; in a case where the jth time difference value is greater than or equal to the jth first time threshold, determine a jth temperature compensation value according to the jth time difference value, and compensate the temperature information of the jth temperature sensor according to the jth temperature compensation value; and in a case where the jth time difference value is less than the jth first time threshold, not compensate the temperature information of the jth temperature sensor.
[0169] In an example embodiment, the compensation module is further configured to determine a jth second time threshold corresponding to the jth temperature sensor, wherein the jth second time threshold is greater than the jth first time threshold; in a case where the jth time difference value is greater than or equal to the jth first time threshold and less than the jth second time threshold, determine a jth temperature compensation value according to the jth time difference value, and compensate the temperature information of the jth temperature sensor according to the jth temperature compensation value.
[0170] In an example embodiment, the compensation module is further configured to, in a case where the jth time difference value is greater than or equal to the jth second time threshold, determine an importance degree of the temperature information of the jth temperature sensor according to attribute information of the jth temperature sensor; determine a jth rotation speed value according to the importance degree of the temperature information of the jth temperature sensor, and prohibit determining the jth rotation speed value according to the temperature information of the jth temperature sensor among the N-M temperature sensors.
[0171] In an example embodiment, the compensation module is further configured to determine a first change rate of the temperature detected by the jth temperature sensor within a preset time before the jth time; multiply the first change rate by the jth time difference value to obtain a jth temperature compensation value.
[0172] In an example embodiment, the compensation module is further configured to, after determining the maximum rotation speed value among the N-M rotation speed values and the M rotation speed values as the fan rotation speed value, determine a target time, wherein the target time is a starting time of determining the fan rotation speed value according to the temperature information of the N-M temperature sensors and the M alternative temperature information; determine a time difference value between the specified time and the target time to obtain a target time difference value, wherein the specified time is a time when the fan is to be controlled to rotate according to the determined rotation speed value; determine a rotation speed value compensation value according to the target time difference value, and compensate the fan rotation speed value according to the rotation speed value compensation value to update the fan rotation speed value.
[0173] In an example embodiment, the compensation module is further configured to, in a case where the target time difference value is greater than or equal to the first preset threshold, determine a rotation speed value compensation amount according to the target time difference value, and perform compensation processing on the fan rotation speed value according to the rotation speed value compensation amount; and in a case where the target time difference value is less than the first preset threshold, not perform compensation processing on the fan rotation speed value.
[0174] In an example embodiment, the compensation module is further configured to, in a case where the target time difference value is greater than or equal to the first preset threshold and less than a second preset threshold, determine a rotation speed value compensation amount according to the target time difference value, and perform compensation processing on the fan rotation speed value according to the rotation speed value compensation amount, wherein the second preset threshold is greater than the first preset threshold.
[0175] In an example embodiment, the compensation module is further configured to, in a case where the target time difference value is greater than or equal to the second preset threshold, update the fan rotation speed value to a maximum rotation speed value of a fan of the server.
[0176] In an example embodiment, the compensation module is further configured to determine a second change rate of the rotation speed of the fan of the server within a preset time before a specified time; and multiply the second change rate by the target time difference value to obtain the rotation speed value compensation amount.
[0177] In an example embodiment, the first determination unit is further configured to, in a case where only P pieces of substitute temperature information corresponding to P pieces of temperature sensors of the M pieces of temperature sensors are obtained, determine a first rotation speed value according to attribute information of M-P pieces of temperature sensors, and determine a second rotation speed value according to temperature information of N-M pieces of temperature sensors and the P pieces of substitute temperature information, P being an integer greater than or equal to 0 and less than M, wherein the attribute information of the temperature sensor is used to indicate a monitoring object of the temperature sensor; and the control module 96 further includes a control unit configured to control the fan of the server to rotate at a target rotation speed value, wherein the target rotation speed value is a maximum value of the first rotation speed value and the second rotation speed value.
[0178] In an example embodiment, the first determination unit is further configured to determine an abnormal temperature level of the server according to attribute information of M-P pieces of temperature sensors to obtain a target abnormal temperature level, and determine a corresponding target rotation speed value calculation algorithm according to the target abnormal temperature level; and determine the first rotation speed value according to the average temperature of the case of the server using the target rotation speed value calculation algorithm.
[0179] In an example embodiment, the first determining unit is further configured to determine M-P abnormal temperature levels corresponding to the M-P temperature sensors according to the attribute information of the M-P temperature sensors, wherein an abnormal temperature level of an i th temperature sensor in the M-P temperature sensors is determined according to the attribute information of the i th temperature sensor, i is a positive integer greater than or equal to 1 and less than or equal to M-P, and the highest level in the M-P abnormal temperature levels is determined as the target abnormal temperature level.
[0180] It should be noted that the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all the above modules are located in the same processor; or the above modules are located in different processors in any combination.
[0181] Embodiments of the present application also provide a non-volatile computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0182] Optionally, in the present embodiment, the above computer program can be configured to execute the following steps by the computer program:
[0183] S1, obtaining temperature information of N temperature sensors in a server, wherein N is a positive integer greater than or equal to 2, and the monitoring objects of the N temperature sensors include components of the server and / or an environment in which the server is located;
[0184] S2, in a case where temperature information of M temperature sensors in the N temperature sensors is abnormal, obtaining M substitute temperature information corresponding to the M temperature sensors, wherein an m th substitute temperature information in the M substitute temperature information is used to reflect a temperature of a monitoring object corresponding to an m th temperature sensor in the M temperature sensors, and M is a positive integer greater than or equal to 1 and less than or equal to N;
[0185] S3, determining a fan rotation speed value according to the temperature information of the N-M temperature sensors and the M substitute temperature information, and controlling the fan of the server to rotate at the fan rotation speed value.
[0186] In an example embodiment, the above non-volatile computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0187] An embodiment of the present application further provides an electronic device, as shown in FIG. 10, which comprises a memory 1002 in which a computer program is stored and a processor 1004 configured to execute steps in any of the above method embodiments by the computer program.
[0188] Optionally, in the embodiment, the processor 1004 can be configured to execute the following steps by the computer program:
[0189] S1, obtaining temperature information of N temperature sensors in a server, wherein N is a positive integer greater than or equal to 2, and monitoring objects of the N temperature sensors include components of the server and / or an environment in which the server is located;
[0190] S2, in a case where temperature information of M temperature sensors among the N temperature sensors is abnormal, obtaining M pieces of substitute temperature information corresponding to the M temperature sensors, wherein an mth piece of substitute temperature information in the M pieces of substitute temperature information is used to reflect a temperature of a monitoring object corresponding to an mth temperature sensor among the M temperature sensors, and M is a positive integer greater than or equal to 1 and less than or equal to N;
[0191] S3, determining a fan rotating speed value according to the temperature information of the N-M temperature sensors and the M pieces of substitute temperature information, and controlling the fan of the server to rotate at the fan rotating speed value.
[0192] Specific examples in the embodiment can refer to examples described in the above embodiments and exemplary embodiments, which will not be described herein again.
[0193] Optionally, those skilled in the art can understand that the structure shown in FIG. 10 is only schematic, and FIG. 10 does not limit the structure of the above electronic device. For example, the electronic device can further comprise more or less components (such as a network interface) than those shown in FIG. 10, or have a different configuration from that shown in FIG. 10.
[0194] The memory 1002 can be used to store software programs and modules, such as program instructions / modules corresponding to the fan control method and the fan control apparatus in the embodiments of the present application. The processor 1004 executes various functions and data processing, i.e., implements the fan control method described above, by running the software programs and modules stored in the memory 1002. The memory 1002 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 1002 can further include a memory remotely arranged with respect to the processor 1004, which can be connected to the terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. Specifically, the memory 1002 can be, but is not limited to, used to store system configuration files and the like. As an example, as shown in FIG. 10, the memory 1002 can include, but is not limited to, the first acquisition module 92, the second acquisition module 94, and the control module 96 in the fan control apparatus described above. In addition, other module units in the fan control apparatus described above can also be included, but are not limited to, which will not be described herein again.
[0195] Optionally, the transmission device 1006 is configured to receive or send data via a network. Specific examples of the network can include wired networks and wireless networks. In an example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network. In an example, the transmission device 1006 is a radio frequency (Radio Frequency, RF) module, which is configured to communicate with the Internet in a wireless manner.
[0196] In addition, the electronic device further includes a display 1008, and a connection bus 1010 configured to connect various module components in the electronic device.
[0197] The embodiments of the present application also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the method embodiments described above are implemented.
[0198] The embodiments of the present application also provide another computer program product, which includes a non-volatile computer readable storage medium. The non-volatile computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps in any of the method embodiments described above are implemented.
[0199] The embodiment of the present application further provides a computer program, which comprises computer instructions stored in a non-volatile computer readable storage medium; a processor of a computer device reads the computer instructions from the non-volatile computer readable storage medium, and executes the computer instructions, so that the computer device executes the steps in any one of the method embodiments.
[0200] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by using general computing devices, and can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and can be realized by using program codes executable by the computing devices, so that the program codes can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different sequences, or can be respectively manufactured into individual integrated circuit modules, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0201] The above merely describes the preferred embodiments of the present application, but is not intended to limit the present application, and various modifications and changes can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A fan control method, comprising: obtaining temperature information of N temperature sensors in a server, wherein N is a positive integer greater than or equal to 2, and monitoring objects of the N temperature sensors include components of the server and / or an environment in which the server is located; in a case where temperature information of M temperature sensors among the N temperature sensors is abnormal, obtaining M substitute temperature information corresponding to the M temperature sensors, wherein an mth substitute temperature information in the M substitute temperature information is used to reflect a temperature of a monitoring object corresponding to an mth temperature sensor among the M temperature sensors, and M is a positive integer greater than or equal to 1 and less than or equal to N; determining a fan speed value according to temperature information of N-M temperature sensors and the M substitute temperature information, and controlling a fan of the server to rotate at the fan speed value.
2. The method of claim 1, wherein the obtaining the M substitute temperature information corresponding to the M temperature sensors comprises: determining a temperature detector on a mainboard of the server according to a position of a monitoring object of an mth temperature sensor among the M temperature sensors, wherein a distance between the temperature detector and the monitoring object is less than a preset distance; determining substitute temperature information corresponding to the mth temperature sensor according to temperature information of the temperature detector.
3. The method of claim 1, wherein the determining the fan speed value according to the temperature information of the N-M temperature sensors and the M substitute temperature information comprises: determining a jth speed value according to temperature information of a jth temperature sensor among the N-M temperature sensors, to obtain N-M speed values, wherein j takes 1,..., N-M-1, N-M; determining M speed values according to the M substitute temperature information; determining a maximum speed value in the N-M speed values and the M speed values as the fan speed value.
4. The method of claim 3, wherein the determining the jth speed value according to the temperature information of the jth temperature sensor among the N-M temperature sensors comprises: determining the jth speed value according to the temperature information of the jth temperature sensor among the N-M temperature sensors based on a proportional-integral-derivative control algorithm.
5. The method of claim 3, wherein before the determining the jth speed value according to the temperature information of the jth temperature sensor among the N-M temperature sensors, the method further comprises: determining a time difference between a jth reference time and a jth time, to obtain a jth time difference value, wherein the jth time is a time at which the temperature information of the jth temperature sensor is obtained, and the jth reference time is a time at which the determining of the jth speed value according to the temperature information of the jth temperature sensor is started; determining a jth temperature compensation amount according to the jth time difference value, and performing compensation processing on the temperature information of the jth temperature sensor according to the jth temperature compensation amount, to update the obtained temperature information of the jth temperature sensor. 6. The method of claim 5, wherein the determining the jth temperature compensation value according to the jth time difference value and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation value comprises: determining a jth first time threshold corresponding to the jth temperature sensor; in a case that the jth time difference value is greater than or equal to the jth first time threshold, determining the jth temperature compensation value according to the jth time difference value and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation value; wherein in a case that the jth time difference value is less than the jth first time threshold, the temperature information of the jth temperature sensor is not compensated.
7. The method of claim 5, wherein the determining the jth temperature compensation value according to the jth time difference value and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation value comprises: determining a jth first time threshold corresponding to the jth temperature sensor and determining a jth second time threshold corresponding to the jth temperature sensor, wherein the jth second time threshold is greater than the jth first time threshold; in a case that the jth time difference value is greater than or equal to the jth first time threshold and less than the jth second time threshold, determining the jth temperature compensation value according to the jth time difference value and compensating the temperature information of the jth temperature sensor according to the jth temperature compensation value; wherein in a case that the jth time difference value is less than the jth first time threshold, the temperature information of the jth temperature sensor is not compensated.
8. The method of claim 7, wherein the method further comprises: in a case that the jth time difference value is greater than or equal to the jth second time threshold, determining an importance degree of the temperature information of the jth temperature sensor according to attribute information of the jth temperature sensor; determining the jth rotation speed value according to the importance degree of the temperature information of the jth temperature sensor and prohibiting the jth rotation speed value from being determined according to the temperature information of the jth temperature sensor among the N-M temperature sensors.
9. The method of claim 5, wherein the determining the jth temperature compensation value according to the jth time difference value comprises: determining a first change rate of temperature detected by the jth temperature sensor within a preset time before the jth time point; multiplying the first change rate by the jth time difference value to obtain the jth temperature compensation value.
10. The method of claim 3, wherein after the determining the fan rotation speed value as the maximum rotation speed value among the N-M rotation speed values and the M rotation speed values, the method further comprises: determining a target time point, wherein the target time point is a starting time point of determining the fan speed value according to the temperature information of the N-M temperature sensors and the M pieces of substitute temperature information; determining a time difference value between a specified time point and the target time point, to obtain a target time difference value, wherein the specified time point is a time point at which the fan of the server is to be controlled to rotate according to the determined speed value; determining a speed value compensation amount according to the target time difference value, and performing compensation processing on the fan speed value according to the speed value compensation amount, to update the fan speed value.
11. The method of claim 10, wherein the determining the speed value compensation amount according to the target time difference value and performing the compensation processing on the fan speed value according to the speed value compensation amount comprises: in a case where the target time difference value is greater than or equal to a first preset threshold, determining the speed value compensation amount according to the target time difference value, and performing the compensation processing on the fan speed value according to the speed value compensation amount.
12. The method of claim 11, wherein the determining the speed value compensation amount according to the target time difference value and performing the compensation processing on the fan speed value according to the speed value compensation amount comprises: in a case where the target time difference value is greater than or equal to a first preset threshold and less than a second preset threshold, determining the speed value compensation amount according to the target time difference value, and performing the compensation processing on the fan speed value according to the speed value compensation amount, wherein the second preset threshold is greater than the first preset threshold.
13. The method of claim 12, wherein the method further comprises: in a case where the target time difference value is greater than or equal to the second preset threshold, updating the fan speed value to a maximum speed value of the fan of the server.
14. The method of claim 10, wherein the determining the speed value compensation amount according to the target time difference value comprises: determining a second change rate of the speed of the fan of the server within a preset time before the specified time point; multiplying the second change rate by the target time difference value to obtain the speed value compensation amount.
15. The method of claim 1, wherein the method further comprises: in a case where only P pieces of substitute temperature information corresponding to P temperature sensors of the M temperature sensors are obtained, determining a first speed value according to attribute information of M-P temperature sensors, and determining a second speed value according to the temperature information of the N-M temperature sensors and the P pieces of substitute temperature information, P being an integer greater than or equal to 0 and less than M, wherein the attribute information of the temperature sensor is used to indicate a monitoring object of the temperature sensor; controlling the fan of the server to rotate at a target speed value, wherein the target speed value is a maximum value of the first speed value and the second speed value.
16. The method of claim 15, wherein The first rotating speed value is determined according to attribute information of the M-P temperature sensors, including: The target rotating speed value calculation algorithm is determined according to the target abnormal temperature level. The first rotating speed value is determined according to the case average temperature of the server using the target rotating speed value calculation algorithm.
17. The method of claim 16, wherein The target abnormal temperature level is determined according to the attribute information of the M-P temperature sensors, including: The M-P abnormal temperature levels corresponding to the M-P temperature sensors are determined according to the attribute information of the M-P temperature sensors, wherein the abnormal temperature level of the i-th temperature sensor among the M-P temperature sensors is determined according to the attribute information of the i-th temperature sensor, i is a positive integer greater than or equal to 1 and less than or equal to M-P; The highest level among the M-P abnormal temperature levels is determined as the target abnormal temperature level.
18. A non-volatile computer readable storage medium, wherein The non-volatile computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of the method in any one of claims 1 to 17.
19. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein The processor executes the computer program to implement the steps of the method in any one of claims 1 to 17.
20. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method in any one of claims 1 to 17.
Citation Information
Patent Citations
Heat dissipation control method, system and device and storage medium
CN108958429A
Fan speed regulation method and device, computer equipment, storage medium and program product
CN116360566A
Server and heat dissipation control method thereof
CN116466810A
Fan control method
CN117365994A
Fan speed regulation method, device and equipment based on CPU temperature jump and storage medium
CN118361409A