Temperature measurement method, device and electronic device

By using the first temperature detection module close to the heating device and the second temperature detection module far away from the heating device in the electronic device, combined with the temperature compensation coefficient, the ambient temperature value is calculated, which solves the problem that the temperature sensor in the electronic device cannot accurately measure the ambient temperature, and improves the accuracy of measurement.

CN114199394BActive Publication Date: 2025-06-27SHENZHEN LUMIUNITED TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111500763.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-09
Publication Date
2025-06-27
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

Due to the influence of heating devices, temperature sensors in existing electronic devices cannot accurately measure ambient temperature.

Method used

Two temperature detection modules are adopted. The first temperature detection module is close to the heating device and is used to measure the internal temperature; the second temperature detection module is far away from the heating device and is used to measure the external temperature. By obtaining the temperature values ​​and temperature compensation coefficients of the two, the ambient temperature value is calculated.

Benefits of technology

It reduces the impact of heating of electronic equipment on ambient temperature measurement and improves the accuracy of ambient temperature measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114199394B_ABST
    Figure CN114199394B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a temperature measurement method, apparatus, and electronic device. The method includes: obtaining a first temperature value collected by the first temperature detection module; obtaining a second temperature value collected by the second temperature detection module; and obtaining an ambient temperature value based on the first temperature value, the second temperature value, and a temperature compensation coefficient. By the above method, by using the first temperature value, the second temperature value, and the temperature compensation coefficient collected by two temperature detection modules at different positions from the heat source to calculate the ambient temperature, the influence of the heat generation of the electronic device on the ambient temperature measurement can be reduced, and the accuracy of the ambient temperature measurement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of electronic devices, and more particularly, to a temperature measurement method, apparatus, and electronic device. Background Art

[0002] As electronic products develop towards the direction of diversified functions and dense devices, electronic devices such as thermostats or temperature displays generally measure temperature by placing temperature sensors on the circuit board. Due to the existence of losses, some devices in the circuit board can generate heat, making the temperature sensors arranged inside the product unable to accurately measure the ambient temperature. Summary of the Invention

[0003] In view of the above problems, this application proposes a temperature measurement method, apparatus, and electronic device to improve the above problems.

[0004] In a first aspect, this application provides a temperature measurement method applied to an electronic device. The electronic device includes a heat-generating device and a temperature detection module. The temperature detection module includes a first temperature detection module and a second temperature detection module. The distance between the first temperature detection module and the heat-generating device is less than the distance between the second temperature detection module and the heat-generating device. The method includes: obtaining a first temperature value collected by the first temperature detection module; obtaining a second temperature value collected by the second temperature detection module; and obtaining an ambient temperature value based on the first temperature value, the second temperature value, and a temperature compensation coefficient.

[0005] In a second aspect, this application provides a temperature measurement apparatus applied to an electronic device. The electronic device includes a heat-generating device and a temperature detection module. The temperature detection module includes a first temperature detection module and a second temperature detection module. The distance between the first temperature detection module and the heat-generating device is less than the distance between the second temperature detection module and the heat-generating device. The apparatus includes: a first temperature value obtaining unit for obtaining a first temperature value collected by the first temperature detection module; a second temperature value obtaining unit for obtaining a second temperature value collected by the second temperature detection module; and an ambient temperature value obtaining unit for obtaining an ambient temperature value based on the first temperature value, the second temperature value, and a temperature compensation coefficient.

[0006] In a third aspect, the present application provides a temperature measurement device, which is applied to an electronic device. The temperature measurement device includes a temperature detection module and a processing module. The temperature detection module includes a first temperature detection module and a second temperature detection module. Among them, the distance between the first temperature detection module and the heat-generating device is less than the distance between the second temperature detection module and the heat-generating device. The processing module is configured to obtain a first temperature value collected by the first temperature detection module, and to obtain a second temperature value collected by the second temperature detection module, and to obtain an ambient temperature value based on the first temperature value, the second temperature value, and a temperature compensation coefficient.

[0007] In a fourth aspect, the present application provides an electronic device, which includes a heat-generating device, one or more temperature detection modules, one or more processors, and a memory. The temperature detection module includes a first temperature detection module and a second temperature detection module. Among them, the distance between the first temperature detection module and the heat-generating device is less than the distance between the second temperature detection module and the heat-generating device. One or more computer programs are stored in the memory and executed by the one or more processors. When the processor executes the computer program, the steps of the above method are implemented.

[0008] In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0009] For a temperature measurement method, device, electronic device, and storage medium provided by the present application, after obtaining the first temperature value collected by the first temperature detection module, the second temperature value collected by the second temperature detection module is obtained, and the ambient temperature value is obtained based on the first temperature value, the second temperature value, and the temperature compensation coefficient. By the above method, since the installation position of the first temperature detection module is closer to the heat-generating device than that of the second temperature detection module, the first temperature value measured by the first temperature detection module more reflects the internal temperature of the electronic device, and the second temperature value measured by the second temperature detection module more reflects the external temperature of the electronic device. Among them, the external temperature is affected by the ambient temperature and the internal temperature of the electronic device. Therefore, by using the first temperature value and the second temperature value collected by the first temperature detection module and the second temperature detection module with different distances from the heat source and the temperature compensation coefficient to calculate the ambient temperature, the influence of the heat generation of the electronic device on the ambient temperature measurement can be reduced, and the accuracy of the ambient temperature measurement is improved. Description of the Drawings

[0010] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0011] Figure 1 The flowchart of a temperature measurement method proposed in an embodiment of the present application is shown;

[0012] Figure 2 The present application is shown Figure 1 The flowchart of an embodiment of S130 in the present application is shown;

[0013] Figure 3 The schematic diagram of a temperature measurement circuit proposed in the present application is shown;

[0014] Figure 4 The schematic diagram of the circuit board of a temperature measurement electronic device proposed in the present application is shown;

[0015] Figure 5 The flowchart of a temperature measurement method proposed in another embodiment of the present application is shown;

[0016] Figure 6 The structural block diagram of a temperature measurement device proposed in an embodiment of the present application is shown;

[0017] Figure 7 The structural block diagram of another temperature measurement device proposed in an embodiment of the present application is shown;

[0018] Figure 8 The structural block diagram of an electronic device proposed in the present application is shown;

[0019] Figure 9 It is a storage unit for storing or carrying the program code for implementing the temperature measurement method according to the embodiments of the present application. Detailed implementation manners

[0020] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0021] As electronic products develop towards the direction of diversified functions and device density, electronic devices such as thermostats or temperature displays generally measure temperature by placing temperature sensors on the circuit board. At the same time, in order to achieve functions such as real-time display and execution of relevant control instructions according to temperature, multiple electronic devices such as a screen, a main control chip, a power supply, and a relay need to be integrated inside the electronic device.

[0022] In the relevant research, the inventors found that when measuring the ambient temperature using a temperature sensor placed on the circuit board, due to losses, some devices in the circuit board can generate heat, making the temperature sensor arranged inside the product unable to accurately measure the ambient temperature.

[0023] Therefore, the inventors proposed a temperature measurement method, device, and electronic device in this application. After obtaining the first temperature value collected by the first temperature detection module, the second temperature value collected by the second temperature detection module is obtained, and based on the first temperature value, the second temperature value, and the temperature compensation coefficient, the ambient temperature value is obtained. By the above method, since the installation position of the first temperature detection module is closer to the heat-generating device than the second temperature detection module, the first temperature value measured by the first temperature detection module more reflects the internal temperature of the electronic device, and the second temperature value measured by the second temperature detection module more reflects the external temperature of the electronic device. The external temperature is affected by the ambient temperature and the internal temperature of the electronic device. Therefore, by using the first temperature value and the second temperature value collected by the first temperature detection module and the second temperature detection module at different distances from the heat source and the temperature compensation coefficient to calculate the ambient temperature, the influence of the heat generation of the electronic device on the ambient temperature measurement can be reduced, and the accuracy of the ambient temperature measurement is improved.

[0024] Please refer to Figure 1 A temperature measurement method provided in this application is applied to an electronic device. The electronic device includes a heat-generating device and a temperature detection module. The temperature detection module includes a first temperature detection module and a second temperature detection module. Among them, the distance between the first temperature detection module and the heat-generating device is less than the distance between the second temperature detection module and the heat-generating device. The method includes:

[0025] S110: Obtain the first temperature value collected by the first temperature detection module.

[0026] Among them, because the position of the first temperature detection module is closer to the heat-generating device than the position of the second temperature detection module, and the heat-generating device can be a device that generates heat included in the electronic device, the first temperature detection module can be used to measure the internal temperature of the electronic device, and the first temperature value more reflects the internal temperature of the electronic device.

[0027] S120: Obtain the second temperature value collected by the second temperature detection module.

[0028] Among them, since the position of the second temperature detection module is farther from the heat-generating device than the position of the first temperature detection module, the second temperature detection module can be used to measure the external temperature of the electronic device. The second temperature value more reflects the external temperature of the electronic device, where the external temperature is affected by the ambient temperature and the internal temperature of the electronic device.

[0029] It should be noted that the first temperature detection module and the second temperature detection module in the embodiments of the present application can be temperature sensors, specifically, they can be Negative Temperature Coefficient (NTC) thermistors, Positive Temperature Coefficient (PTC) thermistors, digital temperature sensors, platinum resistors, thermocouples, infrared thermometers, etc., and the device types of the first temperature detection module and the second temperature detection module can be different.

[0030] Furthermore, it should be noted that the accuracies corresponding to the devices of the first temperature detection module and the second temperature detection module can be different.

[0031] S130: Obtain the ambient temperature value based on the first temperature value, the second temperature value, and the temperature compensation coefficient.

[0032] Among them, as Figure 2 shown, obtaining the ambient temperature value based on the first temperature value, the second temperature value, and the temperature compensation coefficient includes:

[0033] S131: Obtain a first difference based on the first temperature value and the second temperature value.

[0034] Among them, the first difference can be the difference between the internal temperature value and the external temperature value of the electronic device. As one way, the first difference can be obtained by using the first temperature value minus the second temperature value. As another way, it can also be the absolute value obtained by using the second temperature value minus the first temperature value. Since the first temperature value and the second temperature value can be obtained simultaneously, the operating modes and device switches of the electronic device corresponding to the first temperature value and the second temperature value are the same, that is, the influence of the heating power of the electronic device on the first temperature value and the second temperature value is the same. Therefore, the first difference can be unaffected by the change in the heating power of the electronic device, has strong adaptability, and can thus improve the accuracy of ambient temperature measurement.

[0035] S132: Obtain a second difference based on the first difference and the temperature compensation coefficient.

[0036] Among them, the temperature compensation coefficient refers to the parameter for correcting the ambient temperature value, which can specifically be a determined value. This value can be used to adjust the difference between the first temperature value and the second temperature value (the first difference) to obtain the second difference. The second difference is the ambient temperature compensation value, that is, the difference between the second temperature value collected by the second temperature detection module and the ambient temperature value. As a way, the first difference can be multiplied by the temperature compensation coefficient to obtain the second difference.

[0037] As a way, the temperature compensation coefficient can be determined based on the distance between the heat-generating device and the first temperature detection module. Among them, the smaller the distance between the heat-generating device and the first temperature detection module, the smaller the temperature compensation coefficient. The heat-generating device can include the devices that generate heat in the electronic device. In this way, when the distance between the heat-generating device and the second temperature detection module remains unchanged, the closer the first temperature detection module is to the heat-generating device, the larger the measured first temperature value. Through the transformation of the calculation method in step S130, it can be known that: temperature compensation = (second temperature value - ambient temperature value) / (first temperature value - second temperature value). The larger the first temperature value, the smaller the temperature compensation coefficient.

[0038] As another way, the temperature compensation coefficient can be determined based on the distance between the first temperature detection module and the second temperature detection module. Among them, the smaller the distance between the first temperature detection module and the second temperature detection module, the larger the temperature compensation coefficient. In this way, the smaller the distance between the first temperature detection module and the second temperature detection module, the smaller the thermal impedance, and the larger the temperature compensation coefficient.

[0039] As still another way, the electronic device further includes a circuit board. The heat-generating device and the temperature detection module are arranged on the circuit board. The temperature compensation coefficient can be determined based on the heat conduction performance of the circuit board. Among them, the better the heat conduction performance of the circuit board, the larger the temperature compensation coefficient. In this way, the better the heat conduction performance, the smaller the thermal impedance, and the larger the temperature compensation coefficient.

[0040] It should be noted that the temperature compensation coefficient is a preset value and can be obtained through multiple prototype tests. The larger the temperature compensation coefficient, the faster the response speed of the temperature sensor, that is, the faster the temperature measurement speed; the smaller the temperature compensation coefficient, the more stable the performance of the temperature sensor. Therefore, the temperature compensation coefficient can be set to any constant between 0.5 and 3. Further, in order to balance the stability of the temperature sensor while improving the temperature measurement response speed, the temperature compensation coefficient can be set to any constant between 1.5 and 2.5.

[0041] S133: Obtain the ambient temperature value based on the second temperature value and the second difference.

[0042] Among them, as a way, the ambient temperature value can be obtained by subtracting the second difference from the second temperature value. As another way, the ambient temperature value can be obtained by subtracting the second temperature value from the second difference and then taking the absolute value. After obtaining the ambient temperature value, as Figure 3 shown, the electronic device can display the ambient temperature value in real time on the display screen, and can also input the ambient temperature value into the controller as an input condition of the controller for subsequent processing. For example: the controller can use the ambient temperature value to control the switch of the air conditioner, adjust the wind speed, etc. Exemplarily, the ambient temperature value is A, and the preset temperature for turning on / off the air conditioner is B. If A is greater than B and the air conditioner is in the off state, the controller can control the air conditioner to start to achieve the purpose of reducing the temperature. And the circuit structure and calculation program of the temperature measurement method in the embodiments of the present application are simple, thus reducing the implementation cost.

[0043] Optionally, the first temperature detection module, the second temperature detection module, and the heating device can be arranged in a straight line on the circuit board of the electronic device. The circuit board can be a printed circuit board (PCB). By this setting method, a series thermal path can be constructed. According to the principle of equal heat transfer in the series thermal path, after the heat from the heating device flows into the first temperature detection module, it can then flow into the second temperature detection module, and there is no bypass heat flow between the first temperature detection module and the second temperature detection module, so that the first temperature detection module and the second temperature detection module are basically affected by the heating device in the same way during the temperature acquisition process, thereby further improving the accuracy of ambient temperature measurement. Exemplarily, as Figure 4 shown, there are heating device 1, heating device 2, the first temperature detection module, and the second temperature detection module arranged on an inclined straight line in the electronic device. Among them, the first temperature detection module is closer to heating device 1 and heating device 2 than the second temperature detection module. By arranging both the first temperature detection module and the second temperature detection module inside the housing, it is possible to avoid affecting the neatness and aesthetics of the electronic device due to the exposure of the first temperature detection module and the second temperature detection module.

[0044] It should be noted that the first temperature detection module and the second temperature detection module can also be arranged at positions close to the edge of the circuit board, and there are no other heating devices near the above two temperature detection modules. By this setting method, air can be used to reduce the heat flow in the middle and prevent interference with the series thermal path.

[0045] Furthermore, it should be noted that when the accuracies of the two temperature detection modules are different, the temperature detection module with lower accuracy can be used as the second temperature detection module and set at a position far from the heat-generating device; the temperature detection module with higher accuracy can be used as the first temperature detection module and set at a position close to the heat-generating device. By this setting method, the measured ambient temperature value can be made more accurate. Exemplarily, assume that the accuracy of temperature sensor A is lower than that of temperature sensor B, the temperature deviation of temperature sensor A is +0.7°C, the temperature deviation of temperature sensor B is +0.07°C, and the temperature compensation coefficient is 3. If temperature sensor A is used as the first temperature detection module and temperature sensor B is used as the second temperature detection module, according to the calculation method in step S130: Ambient temperature = Second temperature value - Temperature compensation coefficient × (Second temperature value - First temperature value), it can be known that the absolute value of the ambient temperature deviation at this time is 1.82°C; if temperature sensor B is used as the first temperature detection module and temperature sensor A is used as the second temperature detection module, according to the calculation method in step S130, it can be known that the absolute value of the ambient temperature deviation at this time is 1.19°C. Therefore, using the temperature sensor with lower accuracy as the second temperature detection module results in a smaller ambient temperature deviation.

[0046] A temperature measurement method provided in this embodiment, after obtaining the first temperature value collected by the first temperature detection module, obtains the second temperature value collected by the second temperature detection module, and based on the first temperature, the second temperature, and the temperature compensation coefficient, obtains the ambient temperature value. By the above method, since the setting position of the first temperature detection module is closer to the heat-generating device than that of the second temperature detection module, the first temperature value measured by the first temperature detection module more reflects the internal temperature of the electronic device, and the second temperature value measured by the second temperature detection module more reflects the external temperature of the electronic device. The external temperature is affected by the ambient temperature and the internal temperature of the electronic device. Therefore, by using the first temperature value, the second temperature value, and the temperature compensation coefficient collected by the first temperature detection module and the second temperature detection module at different distances from the heat source to calculate the ambient temperature, the influence of the heat generation of the electronic device on the ambient temperature measurement can be reduced, and the accuracy of the ambient temperature measurement can be improved.

[0047] Please refer to Figure 5 , a temperature measurement method provided in this application is applied to an electronic device. The electronic device includes a heat-generating device and multiple temperature detection modules. The temperature detection module includes a first temperature detection module and a second temperature detection module. Among them, the distance between the first temperature detection module and the heat-generating device is less than the distance between the second temperature detection module and the heat-generating device. The method includes:

[0048] S210: Obtain the first temperature value collected by the first temperature detection module.

[0049] Among them, as a way, multiple temperature detection modules can be set at different positions inside the electronic device, and the first temperature values collected by the first temperature detection module in each temperature detection module are obtained respectively.

[0050] S220: Obtain the second temperature value collected by the second temperature detection module.

[0051] Among them, as a way, multiple temperature detection modules can be set at different positions inside the electronic device, and the second temperature values collected by the second temperature detection module in each temperature detection module are obtained respectively.

[0052] S230: Based on the first temperature value, the second temperature value and the temperature compensation coefficient collected by each temperature detection module, obtain the reference temperature value corresponding to each temperature detection module.

[0053] Among them, in the embodiment of the present application, the reference temperature value refers to a value that can provide reference information for detecting the ambient temperature value of the electronic device, and specifically may be multiple ambient temperature values detected by multiple temperature detection modules.

[0054] S240: Obtain the ambient temperature value based on multiple reference temperature values.

[0055] Among them, as a way, the average value of the reference temperature values corresponding to multiple temperature detection modules can be calculated, and this average value is used as the ambient temperature value. In this way, the measurement error of the ambient temperature caused by the type, measurement accuracy, etc. of the sensor itself can be reduced by calculating the average value of multiple reference temperature values.

[0056] As another way, the minimum value of the reference temperature values corresponding to multiple temperature detection modules can be used as the ambient temperature value. In this way, the electronic device can be provided with a device for detecting a heat source (such as an infrared sensor, etc.) for measuring whether there is an external heat source around the electronic device. In the case of measuring an external heat source, the minimum value of multiple reference temperature values can be used as the ambient temperature value to exclude the interference of the external heat source on the ambient temperature measurement. In this way, the electronic device can also integrate a device with network communication function (such as a gateway) to receive messages from other devices. When the electronic device receives a message that there is an external heat source around, the minimum value of multiple reference temperature values can be used as the ambient temperature value to exclude the interference of the external heat source on the ambient temperature measurement.

[0057] Optionally, it can be determined whether to use the average value or the minimum value of multiple reference temperature values as the ambient temperature value by determining whether the third difference between the maximum value and the minimum value among the multiple reference temperature values is less than or equal to a preset value. If the third difference is less than or equal to the preset value, the average value of the multiple reference temperature values is used as the ambient temperature value; if the third difference is greater than the preset value, the minimum value among the multiple reference temperature values is used as the ambient temperature value. Exemplarily, the third difference between the maximum value and the minimum value among the multiple reference temperature values is A, and the preset value is B. If A is greater than or equal to B, it indicates that the difference is large, and the minimum value of the multiple reference temperature values can be used as the ambient temperature value; if A is less than B, it indicates that the difference is small, and the average value of the multiple reference temperature values can be used as the ambient temperature value. Through the above method, the flexibility of ambient temperature measurement can be improved, and the calculation method of ambient temperature can be selected according to the difference between the maximum value and the minimum value among the multiple reference temperature values, which can improve the matching degree between the calculation method and the actual situation, thereby improving the accuracy of the ambient temperature.

[0058] In the temperature measurement method provided in this embodiment, through the above method, since the installation position of the first temperature detection module is closer to the heating device than that of the second temperature detection module, the first temperature value measured by the first temperature detection module more reflects the internal temperature of the electronic device, and the second temperature value measured by the second temperature detection module more reflects the external temperature of the electronic device. Since the external temperature is affected by the ambient temperature and the internal temperature of the electronic device, the ambient temperature can be calculated by using the first temperature value, the second temperature value, and the temperature compensation coefficient collected by the first temperature detection module and the second temperature detection module at different distances from the heat source, which can reduce the influence of the heat generation of the electronic device on the ambient temperature measurement and improve the accuracy of the ambient temperature measurement. Moreover, in this embodiment, by calculating the reference temperature values corresponding to the obtained multiple temperature detection modules, the ambient temperature value can be obtained, which can reduce the measurement error and improve the accuracy of the ambient temperature measurement.

[0059] Please refer to Figure 6 , a temperature measurement device 400 provided in the present application is applied to an electronic device. The electronic device includes a heating device and a temperature detection module. The temperature detection module includes a first temperature detection module and a second temperature detection module. Among them, the distance between the first temperature detection module and the heating device is less than the distance between the second temperature detection module and the heating device. The device 400 includes:

[0060] A first temperature value acquisition unit 410, configured to acquire a first temperature value collected by the first temperature detection module.

[0061] A second temperature value acquisition unit 420, configured to acquire a second temperature value collected by the second temperature detection module.

[0062] An ambient temperature value acquisition unit 430 is configured to obtain an ambient temperature value based on a first temperature value, a second temperature value, and a temperature compensation coefficient.

[0063] As a method, the ambient temperature value acquisition unit 430 is specifically configured to obtain a first difference based on the first temperature value and the second temperature value; obtain a second difference based on the first difference and the temperature compensation coefficient; and obtain the ambient temperature value based on the second temperature value and the second difference.

[0064] As another method, there are multiple temperature detection modules. The ambient temperature value acquisition unit 430 is specifically configured to obtain a reference temperature value corresponding to each temperature detection module based on the first temperature value, the second temperature value, and the temperature compensation coefficient collected by each temperature detection module; and obtain the ambient temperature value based on the multiple reference temperature values.

[0065] Optionally, the ambient temperature value acquisition unit 430 is specifically configured to calculate the average value of the multiple reference temperature values and use the average value as the ambient temperature value; or use the minimum value of the multiple reference temperature values as the ambient temperature value.

[0066] Optionally, the ambient temperature value acquisition unit 430 is specifically configured to determine whether a third difference between the maximum value and the minimum value among the multiple reference temperature values is less than or equal to a preset value; if the third difference is less than or equal to the preset value, use the average value as the ambient temperature value; if the third difference is greater than the preset value, use the minimum value of the multiple reference temperature values as the ambient temperature value.

[0067] Optionally, the temperature compensation coefficient is determined based on the distance between the heating device and the first temperature detection module. Among them, the smaller the distance between the heating device and the first temperature detection module, the smaller the temperature compensation coefficient.

[0068] Optionally, the temperature compensation coefficient is determined based on the distance between the first temperature detection module and the second temperature detection module. Among them, the smaller the distance between the first temperature detection module and the second temperature detection module, the larger the temperature compensation coefficient.

[0069] Optionally, the electronic device further includes a circuit board. The heating device and the temperature detection module are arranged on the circuit board. The temperature compensation coefficient is determined based on the heat conduction performance of the circuit board. Among them, the better the heat conduction performance of the circuit board, the larger the temperature compensation coefficient.

[0070] Optionally, the first temperature detection module, the second temperature detection module, and the heating device are arranged in a straight line on the circuit board of the electronic device.

[0071] Please refer to Figure 7, a temperature measurement device 600 provided by the present application. The device 600 includes a temperature detection module 610 and a processing module 620. Among them, the temperature measurement module 610 includes a first temperature detection module 611 and a second temperature detection module 612. The distance between the first temperature detection module 611 and the heating device is less than the distance between the second temperature detection module 612 and the heating device.

[0072] The processing module 620 is configured to obtain the first temperature value collected by the first temperature detection module and the second temperature value collected by the second temperature detection module; and is configured to obtain the ambient temperature value based on the first temperature value, the second temperature value, and the temperature compensation coefficient. Exemplarily, the processing module may be an MCU (Microcontroller Unit).

[0073] Next, Figure 8 an electronic device provided by the present application will be described.

[0074] Please refer to Figure 8 , based on the above temperature measurement method and device, another electronic device 1000 that can execute the foregoing temperature measurement method is further provided in an embodiment of the present application. The electronic device 1000 includes one or more (only one is shown in the figure) processors 102, a memory 104, a housing 106, and a temperature detection module 108 and a heating device 110 disposed in the housing. The temperature detection module 108 includes a first temperature detection module 1081 and a second temperature detection module 1082. The distance between the first temperature detection module 1081 and the heating device 110 is less than the distance between the second temperature detection module 1082 and the heating device 110. The memory 104 stores a program that can execute the content in the foregoing embodiments, and the processor 102 can execute the program stored in the memory 104.

[0075] Among them, the processor 102 may include one or more processors. The processor 102 connects various parts within the entire electronic device 1000 through various interfaces and lines, and executes various functions of the electronic device 1000 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and by calling data stored in the memory 104. Optionally, the processor 102 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 102 may integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the displayed content; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 102 and may be implemented separately through a communication chip.

[0076] The memory 104 may include random access memory (RAM) and may also include read-only memory (ROM). The memory 104 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created during the use of the terminal 1000 (such as phone book, audio and video data, chat record data, etc.).

[0077] Please refer to Figure 9 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable storage medium 800, and the program code can be called by a processor to execute the methods described in the above method embodiments.

[0078] The computer-readable storage medium 800 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has a storage space for program code 810 that executes any of the method steps in the above methods. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed in an appropriate form, for example.

[0079] In summary, for a temperature measurement method, device, and electronic device provided in this application, after obtaining a first temperature value collected by a first temperature detection module, a second temperature value collected by a second temperature detection module is obtained, and an ambient temperature value is obtained based on the first temperature value, the second temperature value, and a temperature compensation coefficient. By the above method, since the installation position of the first temperature detection module is closer to the heat-generating device than that of the second temperature detection module, the first temperature value measured by the first temperature detection module more reflects the internal temperature of the electronic device, and the second temperature value measured by the second temperature detection module more reflects the external temperature of the electronic device. Since the external temperature is affected by the ambient temperature and the internal temperature of the electronic device, by using the first temperature value and the second temperature value collected by the first temperature detection module and the second temperature detection module at different distances from the heat source and the temperature compensation coefficient to calculate the ambient temperature, the influence of the heat generation of the electronic device on the ambient temperature measurement can be reduced, and the accuracy of the ambient temperature measurement is improved.

[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A temperature measurement method, characterized in that, Applied to an electronic device, the electronic device includes a heating device and a plurality of temperature detection modules, the temperature detection modules include a first temperature detection module and a second temperature detection module, wherein the distance between the first temperature detection module and the heating device is less than the distance between the second temperature detection module and the heating device, the method includes: Obtain a first temperature value collected by the first temperature detection module; Obtain a second temperature value collected by the second temperature detection module; Based on the first temperature value, the second temperature value and the temperature compensation coefficient collected by each temperature detection module, obtain a reference temperature value corresponding to each temperature detection module; Determine whether a third difference between a maximum value and a minimum value among a plurality of the reference temperature values is less than or equal to a preset value; If the third difference is less than or equal to the preset value, use the average value of the plurality of reference temperature values as the ambient temperature value; If the third difference is greater than the preset value, use the minimum value among the plurality of reference temperature values as the ambient temperature value.

2. The method according to claim 1, wherein The obtaining, based on the first temperature value, the second temperature value and the temperature compensation coefficient collected by each temperature detection module, a reference temperature value corresponding to each temperature detection module includes: Based on the first temperature value and the second temperature value, obtain a first difference; Based on the first difference and the temperature compensation coefficient, obtain a second difference; Based on the second temperature value and the second difference, obtain the reference temperature value.

3. The method according to any one of claims 1-2, characterized in that, The method further includes: Determine the temperature compensation coefficient based on the distance between the heating device and the first temperature detection module, wherein the smaller the distance between the heating device and the first temperature detection module, the smaller the temperature compensation coefficient.

4. The method according to any one of claims 1-2, characterized in that, The method further includes: Determine the temperature compensation coefficient based on the distance between the first temperature detection module and the second temperature detection module, wherein the smaller the distance between the first temperature detection module and the second temperature detection module, the larger the temperature compensation coefficient.

5. The method according to any one of claims 1-2, characterized in that The electronic device further includes a circuit board, the heating device and the temperature detection module are arranged on the circuit board, the method further includes: Determine the temperature compensation coefficient based on the heat conduction performance of the circuit board, wherein the better the heat conduction performance of the circuit board, the larger the temperature compensation coefficient.

6. The method according to claim 1, wherein The first temperature detection module, the second temperature detection module and the heating device are arranged in a straight line on the circuit board of the electronic device.

7. A temperature measuring device, characterized in that, Applied to an electronic device, the electronic device includes a heating device and a plurality of temperature detection modules, the temperature detection modules include a first temperature detection module and a second temperature detection module, wherein the distance between the first temperature detection module and the heating device is less than the distance between the second temperature detection module and the heating device, the device includes: A first temperature value acquisition unit, configured to obtain a first temperature value collected by the first temperature detection module; A second temperature value acquisition unit, configured to obtain a second temperature value collected by the second temperature detection module; An ambient temperature value acquisition unit, configured to obtain a reference temperature value corresponding to each temperature detection module based on the first temperature value, the second temperature value, and the temperature compensation coefficient respectively collected by each temperature detection module; determine whether a third difference between a maximum value and a minimum value among the multiple reference temperature values is less than or equal to a preset value; if the third difference is less than or equal to the preset value, use the average value of the multiple reference temperature values as the ambient temperature value; if the third difference is greater than the preset value, use the minimum value among the multiple reference temperature values as the ambient temperature value.

8. A temperature measuring device, characterized in that, Applied to an electronic device, the temperature measuring device includes a plurality of temperature detection modules and a processing module, the temperature detection modules include a first temperature detection module and a second temperature detection module, wherein the distance between the first temperature detection module and the heating device is less than the distance between the second temperature detection module and the heating device; The processing module is configured to obtain the first temperature value collected by the first temperature detection module, and to obtain the second temperature value collected by the second temperature detection module, and is configured to obtain a reference temperature value corresponding to each temperature detection module based on the first temperature value, the second temperature value, and the temperature compensation coefficient respectively collected by each temperature detection module; determine whether a third difference between a maximum value and a minimum value among the multiple reference temperature values is less than or equal to a preset value; if the third difference is less than or equal to the preset value, use the average value of the multiple reference temperature values as the ambient temperature value; if the third difference is greater than the preset value, use the minimum value among the multiple reference temperature values as the ambient temperature value.

9. An electronic device, characterized in that, Comprising a heating device, a plurality of temperature detection modules, one or more processors, and a memory, the temperature detection modules include a first temperature detection module and a second temperature detection module, wherein the distance between the first temperature detection module and the heating device is less than the distance between the second temperature detection module and the heating device; One or more computer programs are stored in the memory and executed by the one or more processors, and when the processor executes the computer programs, the steps of the method according to any one of claims 1-6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Wall-mounted humidity transmitter and self-heating humiture compensation method

    CN107677318A

  • Temperature detection device and method

    CN110553758A

  • Environment temperature acquisition method, device and equipment and storage medium

    CN114878027A