Information system CPU temperature detection method, device and information system
By acquiring and analyzing the duty cycle of the CPU fan speed regulation PWM signal, the problems of low CPU temperature acquisition accuracy and poor real-time performance in the prior art are solved, and high-precision and real-time CPU temperature detection are achieved, which is suitable for various CPU chips.
Patent Information
- Application Number
- CN202311755775.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-12-19
AI Technical Summary
When obtaining CPU temperature, especially in consumer hardware, the out-of-band acquisition method has low accuracy and poor real-time performance, which cannot meet the needs of high precision and strong real-time performance.
By obtaining the duty cycle of the speed-regulating PWM signal of the control CPU fan on the motherboard, quickly obtain the CPU temperature value based on the correspondence between the duty cycle and the CPU temperature value, use a timer to measure the duration of the PWM signal to calculate the duty cycle, and The corresponding relationship between CPU temperature and duty cycle is constructed through linear relationships.
It realizes high-precision and real-time acquisition of CPU temperature. It is suitable for all types of CPU chips, and does not rely on special hardware, and has good applicability and real-timeness.
Smart Images

Figure CN117873819B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CPU detection and control, and in particular to an information system CPU temperature detection method, device and information system. Background Art
[0002] CPU temperature is an important monitoring data in computer systems and is widely used in cooling fan speed regulation, abnormal warning, troubleshooting and other fields.
[0003] Common CPU temperature acquisition methods include the following: 1. In-band software reading: mainstream CPU chips are integrated with temperature sensors. The operating system running on the CPU can obtain the CPU temperature through special CPU instructions. This method is supported in both consumer-level hardware and enterprise-level hardware, and is a standard method for obtaining CPU temperature in an in-band environment; the advantages of the above method are: accurate temperature and strong versatility, and its disadvantage is: it can only be obtained in-band. 2. Out-of-band management chip reading: In enterprise-level hardware, such as rack servers, the motherboard usually integrates a BMC (Baseboard Management Controller) chip. This chip can provide a large number of computer system management, maintenance and monitoring functions in an out-of-band environment. The chip usually has an independent network port to communicate with the outside world, and based on protocols such as IPMI and RedFish, it can remotely call various functions of the chip. Common functions include: obtaining hardware configuration information, controlling power on and off, obtaining monitoring information such as CPU temperature and fan speed, and remotely operating computer systems. The CPU temperature obtained by the BMC chip still comes from the temperature sensor inside the CPU. The advantages of the above solution are: accurate temperature and can be obtained out-of-band, and its disadvantages are: it depends on special hardware (enterprise-level motherboards containing BMC chips). 3. Out-of-band temperature sensor reading: Add a temperature sensor outside the CPU to obtain the temperature. This method usually sticks the temperature sensor on the CPU surface or radiator to indirectly read the CPU temperature. The advantages of the above method are: it does not rely on enterprise-level hardware and can be obtained out-of-band. Its disadvantages are: low accuracy (it is difficult to maintain consistency in the installation of the sensor, the temperature read is the CPU surface temperature rather than the temperature inside the chip, and it is greatly affected by the heat dissipation environment) and slow response speed (it relies on the temperature inside the CPU to be transmitted to the outside). Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide an information system CPU temperature detection method, device and information system, by obtaining the duty cycle of the speed regulation PWM signal that controls the CPU fan on the mainboard, and quickly obtaining the CPU temperature value based on the corresponding relationship between the duty cycle and the CPU temperature value. The above-mentioned CPU temperature acquisition method has many advantages such as high accuracy, strong real-time performance and high applicability to various types of CPU chips.
[0005] To solve the above technical problem, a first aspect of an embodiment of the present invention provides a method for detecting CPU temperature of an information system, comprising the following steps:
[0006] Get the speed regulation PWM signal of the CPU cooling fan in the current detection cycle;
[0007] Based on the speed regulation PWM signal, calculating the duty cycle of the speed regulation PWM signal;
[0008] Based on the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal, the real-time temperature value of the CPU is obtained.
[0009] Furthermore, after obtaining the real-time temperature value of the CPU, the method further includes:
[0010] Based on the real-time temperature value of the CPU, the operating status of the information system CPU radiator and chassis fan is controlled.
[0011] Furthermore, the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal is a linear relationship or a piecewise linear relationship.
[0012] Furthermore, the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulating PWM signal is obtained by the following steps:
[0013] Acquire a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer;
[0014] Based on the second timer signal, obtaining a second duration between a rising edge and a subsequent first falling edge of the speed regulating PWM signal in a plurality of detection cycles;
[0015] Based on the proportional relationship between the plurality of second time periods and the first time period, respectively, the duty cycle of the speed regulating PWM signal and the CPU temperature value in the detection period corresponding to the second time period are obtained, and a linear relationship between the CPU temperature value and the duty cycle of the speed regulating PWM signal is obtained;
[0016] Wherein, the first timer and the second timer are synchronously reset at the rising edge of the speed regulation PWM signal.
[0017] Further, the calculating the duty cycle of the speed regulating PWM signal includes:
[0018] Acquire a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer;
[0019] Based on the second timer signal, obtaining a second duration between a rising edge and a first falling edge of the speed regulation PWM signal in a current detection cycle;
[0020] Based on the proportional relationship between the second time length and the first time length, the duty cycle of the speed regulation PWM signal in the current detection cycle is obtained.
[0021] Furthermore, after obtaining the speed regulation PWM signal of the CPU cooling fan in real time, the method further includes:
[0022] The speed regulating PWM signal is preprocessed by a PWM signal processing circuit.
[0023] Furthermore, the PWM signal processing circuit includes: a first resistor, a first diode, a second diode, a second resistor and a first MOS tube; one end of the first resistor is connected to the input end of the PWM signal processing circuit, and the other end is respectively connected to the anode of the first diode, the cathode of the second diode and the gate of the first MOS tube; the cathode of the first diode is connected to the drain of the first MOS tube through the second resistor; the cathode of the second diode and the source of the first MOS tube are grounded respectively; the drain of the first MOS tube is connected to the output end of the PWM signal processing circuit.
[0024] Accordingly, a second aspect of an embodiment of the present invention provides an information system CPU temperature detection device, comprising:
[0025] A PWM signal acquisition module is used to obtain the speed regulation PWM signal of the CPU cooling fan in the current detection cycle;
[0026] A duty cycle calculation module, used for calculating the duty cycle of the speed regulation PWM signal based on the speed regulation PWM signal;
[0027] The temperature value calculation module is used to obtain the real-time temperature value of the CPU based on the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal.
[0028] Furthermore, the information system CPU temperature detection device also includes:
[0029] The chassis fan control module is used to control the operating status of the information system CPU radiator and the chassis fan based on the real-time temperature value of the CPU.
[0030] Furthermore, the information system CPU temperature detection device further comprises: a linear relationship acquisition module, the linear relationship acquisition module comprising:
[0031] A first duration acquisition unit, which is used to acquire a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer;
[0032] A second duration acquisition unit, which is used to acquire a second duration between a rising edge and a subsequent first falling edge of the speed regulation PWM signal in a plurality of detection cycles based on a second timer signal;
[0033] a linear relationship building unit, configured to obtain the PWM signal duty cycle and the CPU temperature value in the detection period corresponding to the second time length based on the proportional relationship between the plurality of second time lengths and the first time length, and obtain a linear relationship between the CPU temperature value and the speed regulating PWM signal duty cycle;
[0034] Wherein, the first timer and the second timer are synchronously reset at the rising edge of the speed regulation PWM signal.
[0035] Furthermore, the information system CPU temperature detection device further includes: a duty cycle calculation module, the duty cycle calculation module including:
[0036] a cycle length acquisition unit, configured to acquire a first duration of two consecutive falling edges of the speed regulating PWM signal based on a first timer;
[0037] A pulse width acquisition unit, which is used to acquire a second duration between a rising edge and a first falling edge of the speed regulation PWM signal in a current detection cycle based on a second timer signal;
[0038] A duty cycle calculation unit is used to obtain the duty cycle of the speed regulation PWM signal in a current detection cycle based on a proportional relationship between the second time length and the first time length.
[0039] Furthermore, the information system CPU temperature detection device also includes:
[0040] The signal preprocessing module is used to perform signal preprocessing on the speed regulating PWM signal through a PWM signal processing circuit.
[0041] Correspondingly, a third aspect of an embodiment of the present invention provides an information system, which acquires real-time temperature values of several CPUs through the CPU temperature detection device of the information system.
[0042] Correspondingly, the fourth aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the information system CPU temperature detection method as described above.
[0043] Correspondingly, a fifth aspect of an embodiment of the present invention provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned information system CPU temperature detection method is implemented.
[0044] The above technical solution of the embodiment of the present invention has the following beneficial technical effects:
[0045] By obtaining the duty cycle of the speed regulation PWM signal that controls the CPU fan on the motherboard, the CPU temperature value can be quickly obtained based on the corresponding relationship between the duty cycle and the CPU temperature value. The above CPU temperature acquisition method has many advantages such as high accuracy, strong real-time performance and high applicability to various CPU chips. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of the information system CPU temperature detection method provided by an embodiment of the present invention;
[0047] Figure 2a is a schematic diagram of a first linear relationship between a CPU temperature value and a duty cycle provided by an embodiment of the present invention;
[0048] Figure 2b is a schematic diagram of a second linear relationship between a CPU temperature value and a duty cycle provided by an embodiment of the present invention;
[0049] Figure 2c is a schematic diagram of a third linear relationship between a CPU temperature value and a duty cycle provided by an embodiment of the present invention;
[0050] Figure 3 is a schematic diagram of duty cycle calculation provided by an embodiment of the present invention;
[0051] Figure 4 is a schematic diagram of the information system mainboard port provided by an embodiment of the present invention;
[0052] Figure 5 It is a schematic diagram of the principle of a PWM signal processing circuit provided by an embodiment of the present invention;
[0053] Figure 6 It is a module block diagram of an information system CPU temperature detection device provided by an embodiment of the present invention.
[0054] Reference numerals:
[0055] 1. PWM signal acquisition module, 2. Duty cycle calculation module, 3. Temperature value calculation module. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.
[0057] At present, mainstream consumer-grade computer motherboards all use PWM interface signals to control CPU cooling fans. The motherboard BIOS can accurately and timely obtain the CPU temperature, and use this temperature to control the speed of the CPU heat sink, chassis fan and other fans in the information system to achieve a reasonable balance in cooling efficiency, fan life, noise and other aspects.
[0058] Please refer to Figure 1 A first aspect of an embodiment of the present invention provides a method for detecting CPU temperature of an information system, comprising the following steps:
[0059] Step S200, obtaining the speed regulation PWM signal of the CPU cooling fan in the current detection cycle.
[0060] Step S400, calculating the duty cycle of the speed regulation PWM signal based on the speed regulation PWM signal.
[0061] Step S600, based on the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal, obtain the real-time temperature value of the CPU.
[0062] The above technical solution is mainly used to obtain the real-time temperature values of one or more CPUs in an out-of-band manner in a consumer-level information system that is not equipped with a BMC chip. By obtaining the duty cycle of the speed regulation PWM signal that controls the CPU fan on the motherboard, the CPU temperature value is quickly obtained based on the correspondence between the duty cycle and the CPU temperature value. The above CPU temperature acquisition method has many advantages such as high accuracy, strong real-time performance and high applicability to various types of CPU chips.
[0063] During the specific implementation process, the above technical solution is completely independent of the CPU model in the information system, and does not need to communicate with the operating system to obtain data. It is highly applicable to hardware.
[0064] For the cooling fan that cools the CPU in the information system, the motor starts to rotate when the DC motor input pin is at a high level; when the input is at a high level, the motor will rotate but increase the speed evenly; when the high level suddenly turns to a low level, the motor will not stop because the inductor has the function of preventing the current from changing suddenly, and will maintain the original speed, and the motor speed corresponds to the average voltage value output within the cycle. Therefore, motor speed regulation is a constantly adjusted operating state, and its average speed in a detection cycle is the speed adjusted by the duty cycle of the speed regulation PWM signal output by the motherboard.
[0065] Furthermore, after obtaining the real-time temperature value of the CPU in step S600, the method further includes:
[0066] Step S700, based on the real-time temperature value of the CPU, control the operating status of the information system CPU radiator and chassis fan.
[0067] The CPU temperature value in the information system can also be used to assist in adjusting the temperature value in the information system chassis, reduce the ambient temperature of the CPU, and achieve balanced control of hardware heat dissipation and system power consumption.
[0068] For details, please refer to Figure 2a , Figure 2b and Figure 2c The numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal is a linear relationship or a piecewise linear relationship.
[0069] Furthermore, the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulating PWM signal is obtained by the following steps:
[0070] Step S110: obtaining a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer.
[0071] Step S120: Based on the second timer signal, obtain a second duration between a rising edge of the speed regulating PWM signal and the first falling edge thereafter in a plurality of detection cycles.
[0072] Step S130, based on the proportional relationship between the plurality of second durations and the first duration, the duty cycle of the speed regulating PWM signal and the CPU temperature value in the detection period corresponding to the second duration are obtained to obtain a linear relationship between the CPU temperature value and the duty cycle of the speed regulating PWM signal.
[0073] Specifically, in the specific implementation of the embodiment of the present invention, the following are three common functional relationships between CPU temperature and PWM signal duty cycle (hereinafter Duty is the duty cycle of PWM, k, k1, k2 are coefficients of the linear function, a, b, c1, c2 are constants of the linear function, these values can be obtained from the technical documentation of the managed system, or directly tested and calibrated from the managed system):
[0074] Function 1: T (degrees Celsius) = k * Duty + a, where k = 100 and a = 0;
[0075] Function 2: T (degrees Celsius) = k * Duty + b, where k = 80 and b = 20;
[0076] Function 3: T (degrees Celsius) = {k1 * Duty + c1, where k1 = 100 and c1 = 20 for 0 < Duty < 40%; k2 * Duty + c2, where k2 = 66.6 and c2 = 33.3 for 40% < Duty < 100%}. Among them, the first timer and the second timer are synchronously cleared at the rising edge of the speed control PWM signal.
[0077] The above three functions respectively correspond to Figure 2a 、 2b 、as shown in 2c.
[0078] Furthermore, please refer to Figure 3 , the calculation of the duty cycle of the speed control PWM signal in step S400 includes:
[0079] Step S410, obtaining the first duration between two consecutive falling edges of the speed control PWM signal based on the first timer.
[0080] Step S420, obtaining the second duration between the rising edge and the first falling edge of the speed control PWM signal in the current detection period based on the second timer signal.
[0081] Step S430, obtaining the duty cycle of the speed control PWM signal in the current detection period based on the ratio relationship between the second duration and the first duration.
[0082] Furthermore, after the real-time acquisition of the speed control PWM signal of the CPU cooling fan in step S200, it also includes:
[0083] Step S300, performing signal preprocessing on the speed control PWM signal through a PWM signal processing circuit.
[0084] As Figure 4 and Figure 5 shown, wire from the SYS_FAN socket (standard 4-pin PWM connector) of the main board to the PWM signal processing circuit. On this board, after the original SYS_FAN_PWM signal is processed by an overvoltage protection, level conversion, and reverse circuit, it becomes the PWM_Input_Signal# signal and is input to the GPIO of the MCU (including the first timer and the second timer).
[0085] Further, the PWM signal processing circuit includes: a first resistor R1, a first diode D1, a second diode D2, a second resistor R2 and a first MOS transistor Q1; one end of the first resistor R1 is connected to the input end of the PWM signal processing circuit, and the other end is respectively connected to the anode of the first diode D1, the cathode of the second diode D2 and the gate G of the first MOS transistor Q1; the cathode of the first diode D1 is connected to the drain D of the first MOS transistor Q1 through the second resistor R2; the cathode of the second diode D2 and the source S of the first MOS transistor Q1 are respectively grounded; the drain D of the first MOS transistor Q1 is connected to the output end of the PWM signal processing circuit. The first diode D1 can eliminate the input voltage that may appear in the mainboard PWM signal and is higher than the IO voltage of the MCU to the IO voltage to protect the MCU. Similarly, the second diode D2 can pull up the input level that may appear in the mainboard PWM signal and is lower than the MCU ground voltage to the MCU ground voltage to protect the MCU. The first resistor R1 implements current limitation when eliminating the high / low input voltage out of the range to prevent the line current from being too large to damage the PWM output circuit; the second resistor R2 and the first MOS tube Q1 form a reverse circuit. When the PWM signal processed by the aforementioned circuit passes through this reverse circuit, the high and low levels will be flipped, which is convenient for the two timers of the MCU to work.
[0086] Accordingly, please refer to Figure 6 A second aspect of an embodiment of the present invention provides an information system CPU temperature detection device, comprising:
[0087] PWM signal acquisition module 1, which is used to obtain the speed regulation PWM signal of the CPU cooling fan in the current detection cycle;
[0088] A duty cycle calculation module 2, which is used to calculate the duty cycle of the speed regulation PWM signal based on the speed regulation PWM signal;
[0089] The temperature value calculation module 3 is used to obtain the real-time temperature value of the CPU based on the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal.
[0090] Furthermore, the information system CPU temperature detection device also includes:
[0091] The chassis fan control module is used to control the operating status of the information system CPU radiator and chassis fan based on the real-time temperature value of the CPU.
[0092] Furthermore, the information system CPU temperature detection device further includes: a linear relationship acquisition module, the linear relationship acquisition module includes:
[0093] A first duration acquisition unit, which is used to acquire a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer;
[0094] A second duration acquisition unit, which is used to acquire a second duration between a rising edge and a subsequent first falling edge of the speed regulation PWM signal in a plurality of detection cycles based on a second timer signal;
[0095] A linear relationship building unit, which is used to obtain the PWM signal duty cycle and the CPU temperature value in the detection period corresponding to the second time length based on the proportional relationship between the plurality of second time lengths and the first time length, and obtain the linear relationship between the CPU temperature value and the speed regulation PWM signal duty cycle;
[0096] The first timer and the second timer are synchronously reset at the rising edge of the speed regulation PWM signal.
[0097] Furthermore, the information system CPU temperature detection device further includes: a duty cycle calculation module, the duty cycle calculation module includes:
[0098] A cycle length acquisition unit, which is used to acquire a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer;
[0099] A pulse width acquisition unit, which is used to acquire a second duration between a rising edge and a first falling edge of the speed regulation PWM signal in a current detection cycle based on a second timer signal;
[0100] The duty cycle calculation unit is used to obtain the duty cycle of the speed regulation PWM signal in the current detection cycle based on the proportional relationship between the second time length and the first time length.
[0101] Furthermore, the information system CPU temperature detection device also includes:
[0102] The signal preprocessing module is used to perform signal preprocessing on the speed regulation PWM signal through the PWM signal processing circuit.
[0103] Correspondingly, a third aspect of an embodiment of the present invention provides an information system, including the above-mentioned information system CPU temperature detection device.
[0104] Accordingly, the fourth aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the information system CPU temperature detection method as described above.
[0105] Correspondingly, a fifth aspect of an embodiment of the present invention provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned information system CPU temperature detection method is implemented.
[0106] The embodiment of the present invention aims to protect a CPU temperature detection method, device and information system of an information system, wherein the detection method comprises the following steps: obtaining a speed regulation PWM signal of a CPU cooling fan in the current detection cycle; calculating the duty cycle of the speed regulation PWM signal based on the speed regulation PWM signal; obtaining the real-time temperature value of the CPU based on the numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal. The above technical solution has the following effects:
[0107] By obtaining the duty cycle of the speed regulation PWM signal that controls the CPU fan on the motherboard, the CPU temperature value can be quickly obtained based on the corresponding relationship between the duty cycle and the CPU temperature value. The above CPU temperature acquisition method has many advantages such as high accuracy, strong real-time performance and high applicability to various CPU chips.
[0108] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0109] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for detecting CPU temperature of an information system, characterized in that: The steps include: Get the CPU cooling fan speed control PWM signal in the current detection cycle; Calculating a duty cycle of the speed-regulating PWM signal based on the speed-regulating PWM signal; Acquiring a real-time temperature value of the CPU based on a numerical correspondence between the CPU temperature value and the duty cycle of the speed regulating PWM signal; The numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal is a linear relationship or a piecewise linear relationship; The numerical correspondence between the CPU temperature value and the duty cycle of the speed regulation PWM signal is obtained by the following steps: Obtaining a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer; Based on the second timer signal, obtaining a second duration between a rising edge and a subsequent first falling edge of the speed regulation PWM signal in a plurality of detection cycles; Based on proportional relationships between a plurality of second time periods and the first time period, respectively, obtaining a PWM signal duty cycle and a CPU temperature value in a detection period corresponding to the second time period, and obtaining a linear relationship between the CPU temperature value and the speed regulation PWM signal duty cycle; Wherein, the first timer and the second timer are synchronously reset at the rising edge of the speed regulation PWM signal; The calculating the duty cycle of the speed regulating PWM signal includes: Obtaining a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer; Based on the second timer signal, obtaining a second duration between a rising edge and a first falling edge of the speed regulation PWM signal in a current detection cycle; Based on the proportional relationship between the second time length and the first time length, obtaining the duty cycle of the speed regulation PWM signal in the current detection period; The PWM signal processing circuit includes: a first resistor, a first diode, a second diode, a second resistor, and a first MOS transistor; one end of the first resistor is connected to the input end of the PWM signal processing circuit, and the other end is respectively connected to the anode of the first diode, the cathode of the second diode, and the gate of the first MOS transistor; the cathode of the first diode is connected to the drain of the first MOS transistor through the second resistor; the cathode of the second diode and the source of the first MOS transistor are respectively grounded; and the drain of the first MOS transistor is connected to the output end of the PWM signal processing circuit.
2. The information system CPU temperature detection method according to claim 1, characterized in that: After obtaining the real-time temperature value of the CPU, the method further includes: Based on the real-time temperature value of the CPU, the operating status of the information system CPU radiator and chassis fan is controlled.
3. The information system CPU temperature detection method according to claim 1 or 2, characterized in that: After obtaining the CPU cooling fan speed regulation PWM signal in real time, the method further includes: The speed regulation PWM signal is pre-processed by a PWM signal processing circuit.
4. An information system CPU temperature detection device, characterized in that: include: PWM signal acquisition module, which is used to obtain the speed regulation PWM signal of the CPU cooling fan in the current detection cycle; a duty cycle calculation module, configured to calculate the duty cycle of the speed-regulating PWM signal based on the speed-regulating PWM signal; a temperature value calculation module, configured to obtain a real-time temperature value of the CPU based on a numerical correspondence between the CPU temperature value and the duty cycle of the speed regulating PWM signal; The information system CPU temperature detection device further includes: a linear relationship acquisition module, which includes: a first duration acquisition unit, configured to acquire a first duration of two consecutive falling edges of the speed regulation PWM signal based on a first timer; A second duration acquisition unit, configured to acquire, based on a second timer signal, a second duration between a rising edge of the speed regulation PWM signal and a first subsequent falling edge in a plurality of detection cycles; a linear relationship building unit, configured to obtain, based on proportional relationships between the plurality of second time periods and the first time period, the PWM signal duty cycle and the CPU temperature value in detection periods corresponding to the second time periods, and obtain a linear relationship between the CPU temperature value and the speed regulation PWM signal duty cycle; Wherein, the first timer and the second timer are synchronously reset at the rising edge of the speed regulation PWM signal; Also included: a duty cycle calculation module, the duty cycle calculation module includes: a cycle length acquiring unit, configured to acquire a first duration of two consecutive falling edges of the speed-regulating PWM signal based on a first timer; a pulse width acquisition unit, configured to acquire, based on a second timer signal, a second duration between a rising edge and a first falling edge of the speed regulation PWM signal in a current detection cycle; The duty cycle calculation unit is used to obtain the duty cycle of the speed regulation PWM signal in the current detection period based on the proportional relationship between the second time length and the first time length.
5. An information system, characterized in that: The real-time temperature values of several CPUs are obtained by the information system CPU temperature detection device as claimed in claim 4.
6. An electronic device, characterized in that: include: at least one processor; And a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the information system CPU temperature detection method as described in any one of claims 1-3.
