Method for measuring environment temperature and electronic equipment

By setting up a partition structure in the electronic device and using a compensating temperature sensor, the problem that the heat of the heat source device in the electronic device affects the measurement results of the ambient temperature sensor is solved, and more accurate ambient temperature measurement is achieved.

CN119413316APending Publication Date: 2025-02-11ZHEJIANG FUTURE ELF ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411472053.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

During the operation of electronic devices, due to the heat generated by components such as processors and power modules, the ambient temperature value measured by the temperature sensor may be affected by the heat of the high-temperature device, resulting in the measurement results being higher than the actual ambient temperature.

Method used

By providing a partition structure in the housing of the electronic device, the cavity is divided into a first cavity and a second cavity separated from each other. The ambient temperature sensor is provided in the first cavity connected to the opening of the housing, and the compensation temperature sensor is provided in the housing. The second cavity with a heat source device is close to the ambient temperature sensor. Determine the degree of influence of the heat generated by the heat source device on the ambient temperature sensor based on the temperature measurement value of the compensation temperature sensor, calculate the compensation temperature value and compensate the temperature measurement value of the ambient temperature sensor.

Benefits of technology

Through temperature compensation, the impact of heat source devices on the ambient temperature sensor is reduced or eliminated, and the accuracy of ambient temperature measurement results is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119413316A_ABST
    Figure CN119413316A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method for measuring environment temperature and electronic equipment, and the method comprises the steps: employing a separation structure to divide a cavity in a housing into a first cavity and a second cavity which are separated from each other, enabling an environment temperature sensor to be disposed in the first cavity which is communicated with an opening of the housing, a compensation temperature sensor is arranged in a second cavity with a heat source device and is close to the environment temperature sensor, and the influence degree of heat generated by the heat source device on the environment temperature sensor is determined according to a second temperature measurement value of the compensation temperature sensor. And the compensation temperature value is determined and temperature compensation is performed on the first temperature measurement value of the environment temperature sensor so that the influence of the heat source device on the environment temperature sensor can be reduced or eliminated and the accuracy of the environment temperature measurement result can be enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of temperature measurement, and more particularly to a method and electronic equipment for measuring ambient temperature. Background Art

[0002] As electronic devices are becoming more and more versatile, the temperature detection function of electronic devices has become a key part of many application scenarios. However, during the operation of electronic devices, components such as processors and power modules generate a lot of heat, which makes the temperature environment around the temperature sensor in the electronic device unstable. The temperature value measured by the temperature sensor may be affected by the heat of these high-temperature components, making the measured ambient temperature higher than the actual ambient temperature. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method for measuring ambient temperature and an electronic device, which are helpful to improve the accuracy of the measurement result of the ambient temperature by the electronic device.

[0004] In a first aspect, an embodiment of the present invention provides a method for measuring ambient temperature, which is used for an electronic device, and the method includes: obtaining a first temperature measurement value of an ambient temperature sensor, wherein a shell of the electronic device has a cavity, a side wall of the shell has an opening, the cavity has a partition structure, the partition structure divides the cavity into a first cavity and a second cavity separated from each other, the first cavity is connected to the opening of the side wall of the shell, the second cavity has a heat source device of the electronic device, and the ambient temperature sensor is arranged in the first cavity; obtaining a second temperature measurement value of a compensation temperature sensor, the compensation temperature sensor is arranged in the second cavity and close to the ambient temperature sensor; determining a compensation temperature value according to the second temperature measurement value; and determining an actual ambient temperature value according to the first temperature measurement value and the compensation temperature value.

[0005] Further, obtaining the second temperature measurement value of the compensated temperature sensor includes: in response to detecting a power-on event, obtaining the second temperature measurement value of the compensated temperature sensor; determining the compensated temperature value based on the second temperature measurement value includes: determining the compensated reference temperature based on the second temperature measurement value at the power-on time; and determining the compensated temperature value at the current time based on the difference between the second temperature measurement value at the current time and the compensated reference temperature.

[0006] Furthermore, the current compensation temperature value is calculated by the following formula:

[0007] S a =K|S2 Tn -S2 T0 |

[0008] Among them, S a is the compensation temperature value at the current time, K is the correlation coefficient, S2 Tn is the second temperature measurement value at the current time, S2 T0 is the compensated reference temperature.

[0009] Furthermore, the method further includes: determining a sensing deviation value of the ambient temperature sensor; and calculating the actual ambient temperature value by the following formula:

[0010] S1 r =S1 d -ΔS-S a

[0011] Among them, S1 r is the actual ambient temperature value at the current time, S1 d The first temperature measurement value at the current time, ΔS is the sensing deviation value of the ambient temperature sensor.

[0012] Further, the obtaining of the first temperature measurement value of the ambient temperature sensor includes: in response to detecting a power-on event, obtaining the first temperature measurement value of the ambient temperature sensor; the determining of the sensing deviation value of the ambient temperature sensor includes: obtaining a calibration standard temperature value; determining the calibration temperature value based on the first temperature measurement value at the power-on time; and determining the sensing deviation value of the ambient temperature sensor based on the difference between the calibration temperature value and the calibration standard temperature value.

[0013] In a second aspect, an embodiment of the present invention further provides an electronic device, comprising a housing, an ambient temperature sensor, a compensation temperature sensor, a heat source device and a control circuit; the housing has a cavity, the side wall of the housing has an opening, the cavity has a partition structure, the partition structure divides the cavity into a first cavity and a second cavity separated from each other, the first cavity is connected to the opening; the ambient temperature sensor is arranged in the first cavity; the compensation temperature sensor is arranged in the second cavity and close to the ambient temperature sensor; the heat source device is arranged in the second cavity and is spaced from the ambient temperature sensor and the compensation temperature sensor; the control circuit is electrically connected to the ambient temperature sensor and the compensation temperature sensor; wherein the control circuit is configured to: obtain a first temperature measurement value of the ambient temperature sensor; obtain a second temperature measurement value of the compensation temperature sensor, the compensation temperature sensor is arranged in the second cavity and close to the ambient temperature sensor; determine the compensation temperature value according to the second temperature measurement value; and determine the actual ambient temperature value according to the first temperature measurement value and the compensation temperature value.

[0014] Furthermore, the control circuit is also configured to obtain a second temperature measurement value of the compensation temperature sensor to determine the compensated reference temperature in response to detecting a power-on event; the control circuit is configured to determine the compensated temperature value at the current time based on the difference between the second temperature measurement value at the current time and the compensated reference temperature.

[0015] Furthermore, the control circuit calculates the compensated temperature value at the current time by the following formula:

[0016] S a =K|S2 Tn -S2 T0 |

[0017] Among them, S a is the compensation temperature value at the current time, K is the correlation coefficient, S2 Tn is the second temperature measurement value at the current time, S2 T0 is the compensated reference temperature.

[0018] Further, the control circuit is further configured to: determine a sensing deviation value of the ambient temperature sensor; the control circuit is configured to calculate the actual ambient temperature value by the following formula:

[0019] S1 r =S1 d -ΔS-S a

[0020] Among them, S1 r is the actual ambient temperature value at the current time, S1 d The first temperature measurement value at the current time, ΔS is the sensing deviation value of the ambient temperature sensor.

[0021] Furthermore, the control circuit is also configured to obtain a first temperature measurement value of the ambient temperature sensor in response to detecting a power-on event; the control circuit determines the sensing deviation value of the ambient temperature sensor including the following steps: obtaining a verification standard temperature value; determining the verification temperature value based on the first temperature measurement value at the power-on time; and determining the sensing deviation value of the ambient temperature sensor based on the difference between the verification temperature value and the verification standard temperature value.

[0022] Furthermore, the partition structure includes a top plate and a sealing side wall; the top plate has a first side surface and a second side surface arranged opposite to each other, and the first side surface is arranged opposite to the opening with a gap; the sealing side wall is arranged between the top plate and the inner wall of the outer shell, and the sealing side wall surrounds the opening in a circumferential direction; wherein the ambient temperature sensor is arranged on the first side surface.

[0023] Further, the compensation temperature sensor is arranged on the second side surface; or the top plate has a wing portion protruding outside the area defined by the sealing side wall, and the compensation temperature sensor is arranged on the first side surface and located on the wing portion.

[0024] Further, the top plate includes a first circuit board, and the ambient temperature sensor is electrically connected to the first circuit board; and / or the top plate has a wire hole passing through the first cavity and the second cavity, and the connecting wire of the ambient temperature sensor extends into the second cavity through the wire hole.

[0025] Furthermore, the compensation temperature sensor is arranged on the second side surface, and the electronic device also includes a temperature equalization cover arranged outside the compensation temperature sensor, and the projection of the temperature equalization cover on the top plate corresponds to the position of the ambient temperature sensor.

[0026] An embodiment of the present invention provides a method and an electronic device for measuring ambient temperature. A partition structure is used to divide a cavity in an outer shell into a first cavity and a second cavity separated from each other. An ambient temperature sensor is arranged in the first cavity connected to an opening of the outer shell, and a compensation temperature sensor is arranged in the second cavity having a heat source device and close to the ambient temperature sensor. The degree of influence of the heat generated by the heat source device on the ambient temperature sensor is determined according to the second temperature measurement value of the compensation temperature sensor, the compensation temperature value is determined, and temperature compensation is performed on the first temperature measurement value of the ambient temperature sensor, thereby reducing or eliminating the influence of the heat source device on the ambient temperature sensor, and improving the accuracy of the ambient temperature measurement result. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0028] Figure 1 is a schematic structural diagram of an electronic device according to a first embodiment of the present invention;

[0029] Figure 2 is a schematic structural diagram of an electronic device according to a second embodiment of the present invention;

[0030] Figure 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention;

[0031] Figure 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention;

[0032] Figure 5 is a schematic block diagram of the structure of an electronic device according to an embodiment of the present invention;

[0033] Figure 6is a flow chart of a method for measuring ambient temperature according to an embodiment of the present invention;

[0034] Figure 7 is a schematic flow chart of determining a compensation temperature value in a method for measuring ambient temperature according to an embodiment of the present invention;

[0035] Figure 8 The present invention is a flowchart of a method for measuring ambient temperature of an embodiment of the present invention for determining a sensing deviation value of an ambient temperature sensor.

[0036] Description of reference numerals:

[0037] A-electronic device; 1-housing; 11-opening; 12-partition structure; 121-top plate; 1211-first side surface; 1212-second side surface; 1213-wing; 1214-wire hole; 122-sealed side wall; 13-first cavity; 14-second cavity; 2-ambient temperature sensor; 3-compensation temperature sensor; 4-heat source device; 5-control circuit; 6-temperature hood. DETAILED DESCRIPTION

[0038] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.

[0039] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0040] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".

[0041] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.

[0042] Figure 1-Figure 5 Schematic diagram of the structure of electronic equipment A in several different embodiments of the present invention. Figure 1-Figure 5The electronic device A of the embodiment of the present invention comprises a housing 1, an ambient temperature sensor 2, a compensation temperature sensor 3, a heat source device 4 and a control circuit 5. The housing 1 has a cavity, and the ambient temperature sensor 2, the compensation temperature sensor 3, the heat source device 4 and the control circuit 5 are arranged in the cavity. The cavity has a partition structure 12, and the partition structure 12 divides the cavity into a first cavity 13 and a second cavity 14 separated from each other. The side wall of the housing 1 has an opening 11, wherein the first cavity 13 is connected to the opening 11. The shielding of the partition structure 12 plays a partitioning role between the second cavity 14 and the opening 11, and basically no air convection is generated between the first cavity 13 and the second cavity 14. The heat source device 4 is arranged in the second cavity 14. The heat source device 4 is a functional device, circuit, etc. in the electronic device A. There are different configuration modes according to the specific type of the electronic device A. For example, the heat source device 4 can be a central processing unit (CPU), a power module, a power amplifier or other devices that generate heat during operation. The heat generated by the heat source device 4 during operation is radiated into the air in the second cavity 14 , so that the temperature in the second cavity 14 rises.

[0043] The ambient temperature sensor 2 and the compensation temperature sensor 3 are spaced apart from the heat source device 4 and as far away from the heat source device 4 as possible to reduce the influence of the heat generated by the heat source device 4 on the detection results of the ambient temperature sensor 2 and the compensation temperature sensor 3. The ambient temperature sensor 2 is arranged in the first cavity 13. Since the air in the first cavity 13 can be connected to the atmosphere outside the electronic device A through the opening 11, the ambient temperature sensor 2 can detect the ambient temperature outside the electronic device A and generate a first temperature measurement value. The compensation temperature sensor 3 is arranged in the second cavity 14 and close to the ambient temperature sensor 2. The compensation temperature sensor 3 can detect the temperature of the position close to the ambient temperature sensor 2 in the second cavity 14 and generate a second temperature measurement value. Figure 5 As shown, the control circuit 5 is electrically connected to the ambient temperature sensor 2 and the compensation temperature sensor 3, respectively, to obtain a first temperature measurement value of the ambient temperature sensor 2 and a second temperature measurement value of the compensation temperature sensor 3. Since the second temperature measurement value of the compensation temperature sensor 3 can reflect the influence of the heat generated by the heat source device 4 on the ambient temperature sensor 2 to a certain extent, the control circuit 5 can determine the compensation temperature value according to the second temperature measurement value, and the compensation temperature value reflects the heat influence of the heat generated by the heat source device 4 on the ambient temperature sensor 2, and then the control circuit 5 can determine the actual ambient temperature value according to the first temperature measurement value and the compensation temperature value.

[0044] Preferably, the compensation temperature sensor 3 can be arranged close to the partition structure 12, so that the temperature of the partition structure 12 can be measured. Furthermore, the ambient temperature sensor 2 is also arranged close to the partition structure 12. Optionally, the ambient temperature sensor 2 and the compensation temperature sensor 3 can be patch temperature sensors, which are devices specially designed to measure the surface temperature of an object. Due to good contact with the surface of the object being measured, they can provide accurate temperature readings and have high measurement accuracy. Since the partition structure 12 blocks the air convection between the first cavity 13 and the second cavity 14, the heat radiated from the heat source device 4 to the second cavity 14 is transferred to the ambient temperature sensor 2 by heat conduction through the partition structure 12. The compensation temperature sensor 3 and the ambient temperature sensor 2 are arranged to be close to the partition structure 12, and the compensation temperature sensor 3 and the ambient temperature sensor 2 are as close to each other as possible, so that the second temperature measurement value measured by the compensation temperature sensor 3 can more accurately reflect the degree to which the ambient temperature sensor 2 is actually affected by the heat of the heat source device 4.

[0045] The partition structure 12 includes a top plate 121 and a sealing side wall 122, wherein the top plate 121 is spaced apart from a side wall of the housing 1 having the opening 11, the sealing side wall 122 is disposed between the top plate 121 and the inner wall of the housing 1, and the sealing side wall 122 surrounds the circumference of the opening 11. The top plate 121, the sealing side wall 122 and the side wall of the housing 1 together form a first cavity 13. The top plate 121 has a first side surface 1211 and a second side surface 1212 disposed opposite to each other, wherein the first side surface 1211 is disposed opposite to the opening 11, and the ambient temperature sensor 2 is disposed in the first cavity 13 and is located on the first side surface 1211 of the top plate 121. The second side surface 1212 is located in the second cavity 14.

[0046] The compensation temperature sensor 3 is disposed on the top plate 121, and the compensation temperature sensor 3 and the ambient temperature sensor 2 are disposed on the same structure, so that the second temperature measurement value measured by the compensation temperature sensor 3 can more accurately reflect the influence of the heat of the heat source device 4 on the ambient temperature sensor 2. Figure 1 and Figure 4 , the compensation temperature sensor 3 is disposed on the second side surface 1212, and the position of the compensation temperature sensor 3 may be opposite to the ambient temperature sensor 2. In other embodiments, referring to Figure 2 and Figure 3 The top plate 121 has a wing portion 1213 protruding from the outside of the area defined by the sealing side wall 122 , and the compensation temperature sensor 3 is arranged on the first side surface 1211 of the top plate 121 and located at the wing portion 1213 .

[0047] In some embodiments, the top plate 121 includes a first circuit board, the ambient temperature sensor 2 is electrically connected to the first circuit board, and the compensation temperature sensor 3 may also be electrically connected to the first circuit board. The first circuit board may be a printed circuit board (PCB) or a flexible printed circuit board (FPC), and the first circuit board may be electrically connected to a power module or other circuit in the second cavity 14 to realize power supply to the ambient temperature sensor 2 and the compensation temperature sensor 3 and signal interaction with an external circuit. The electronic device A may include a second circuit board, the heat source device 4 may be arranged on the second circuit board and away from the first circuit board, and the control circuit 5 may be at least partially arranged on the second circuit board. This arrangement is conducive to minimizing the influence of the ambient temperature sensor 2 on the heating of the device arranged in the second cavity 14. In one embodiment, a cable may be led out from the side of the first circuit board located in the second cavity 14 to connect to the second circuit board to realize the electrical connection between the ambient temperature sensor 2 and the second circuit board.

[0048] In some embodiments, reference Figure 3 The top plate 121 has a wire hole 1214 that passes through the first cavity 13 and the second cavity 14. The connecting wire of the ambient temperature sensor 2 passes through the wire hole 1214 of the top plate 121 and extends into the second cavity 14 and is connected to the corresponding circuit. The size of the wire hole 1214 matches the connecting wire of the ambient temperature sensor 2 to avoid convection between the hot air of the second cavity 14 and the first cavity 13 through the wire hole 1214 as much as possible. Preferably, after the connecting wire of the ambient temperature sensor 2 passes through the wire hole 1214 of the top plate 121, a sealant or other sealing material is used to fill the gap between the wire hole 1214 and the connecting wire to achieve a better sealing and air convection isolation effect.

[0049] In one embodiment, referring to Figure 4 , the electronic device A also includes a temperature-averaging cover 6 that is arranged outside the compensation temperature sensor 3. The temperature-averaging cover 6 can be made of plastic and covered outside the compensation temperature sensor 3. The temperature-averaging cover 6 constructs a buffer zone with a relatively balanced temperature, ensuring that the temperature near the compensation temperature sensor 3 is relatively balanced, which is conducive to improving the accuracy of the measurement result of the compensation temperature sensor 3. Preferably, the compensation temperature sensor 3 is arranged on the second side surface 1212, and the projection of the temperature-averaging cover 6 on the top plate 121 corresponds to the position of the ambient temperature sensor 2, which is conducive to further improving the accuracy of the ambient temperature measurement result of the electronic device A.

[0050] In this embodiment, when the control circuit 5 detects the power-on event, it obtains the second temperature measurement value of the compensation temperature sensor 3, and determines the compensation reference temperature according to the second temperature measurement value within the power-on time, which is used as the calculation basis for subsequently determining the influence of the heat of the heat source device 4 on the compensation temperature sensor 3. The power-on time can be a predetermined time after the power-on event occurs. When the electronic device A is powered on, the heat source device 4 has not yet started to generate heat or the heat generated is small. At this time, the compensation temperature sensor 3 has not been affected by the heat of the heat source device 4. At this time, the second temperature measurement value can more accurately reflect the ambient temperature. Then, according to the difference between the second temperature measurement value at the current time and the compensation reference temperature, the compensation temperature value at the current time is determined.

[0051] The power-on event can be implemented by software status detection, power status detection or other methods. In one embodiment, the electronic device A also includes a reference temperature sensor, which is arranged near the heat source device 4 (such as a CPU), for example, it can be arranged on the second circuit board. The reference temperature sensor measures the temperature near the heat source device 4, and the time when the power-on event occurs can be determined by comparing the temperature measurement value of the reference temperature sensor with the second temperature measurement value of the compensation temperature sensor 3. Specifically, the system time corresponding to the second temperature measurement value when the difference between the second temperature measurement value of the compensation temperature sensor 3 and the temperature measurement value of the reference temperature sensor is within a predetermined range when the power is turned on can be determined as the power-on time.

[0052] The control circuit 5 can calculate the compensation temperature value at the current time by the following formula:

[0053] S a =K|S2 Tn -S2 T0 |

[0054] Among them, S a is the current compensation temperature value, K is the correlation coefficient, S2 Tn is the second temperature measurement value at the current time, S2 T0 To compensate for the reference temperature, the value of K is greater than 0 and less than 1, and the specific value can be determined through testing or simulation.

[0055] The current time can be determined by calling the system time of the electronic device A. According to the current time corresponding to the first temperature measurement value, the second temperature measurement value of the corresponding time is obtained to calculate the compensation temperature value of the current time. The control circuit 5 can perform temperature compensation on the first temperature measurement value of the current time according to the compensation temperature value to determine the actual ambient temperature value. The actual ambient temperature value calculated in this way reduces the influence of the heat generated by the heat source device 4 on the detection result of the ambient temperature sensor 2.

[0056] In some embodiments, the sensing deviation value of the ambient temperature sensor 2 may also be predetermined, and the sensing deviation value represents the deviation between the detection value of the predetermined ambient temperature sensor 2 and the actual ambient temperature, or the measurement deviation of the ambient temperature sensor 2 itself. Then the control circuit 5 may calculate the actual ambient temperature value by the following formula:

[0057] S1 r =S1 d -ΔS-S a

[0058] Among them, S1 r is the actual ambient temperature value at the current time, S1 d The first temperature measurement value at the current time, ΔS is the sensing deviation value of the ambient temperature sensor 2 .

[0059] In one embodiment, the control circuit 5 can obtain the calibration standard temperature value, and when detecting the power-on event, obtain the first temperature measurement value of the ambient temperature sensor 2 at the power-on time as the calibration temperature value, and then determine the sensing deviation value of the ambient temperature sensor 2 according to the difference between the calibration temperature value and the calibration standard temperature value. The calibration standard temperature value can be obtained by the electronic device A based on the user's input or from an external device. For example, the user can obtain the ambient temperature value of the environment where the electronic device A is located through other means (for example, by observing a mercury thermometer) and then input the ambient temperature value into the electronic device A through the interactive device as the calibration standard temperature value.

[0060] The electronic device A of the embodiment of the present invention divides the cavity in the shell 1 into a first cavity 13 and a second cavity 14 separated from each other through a partition structure 12, arranges the ambient temperature sensor 2 in the first cavity 13 connected to the opening 11 of the shell 1, and arranges the compensation temperature sensor 3 in the second cavity 14 having a heat source device 4 and close to the ambient temperature sensor 2. The degree of influence of the heat generated by the heat source device 4 on the ambient temperature sensor 2 is determined according to the second temperature measurement value of the compensation temperature sensor 3, the compensation temperature value is determined, and temperature compensation is performed on the first temperature measurement value of the ambient temperature sensor 2, thereby reducing or eliminating the influence of the heat source device 4 on the ambient temperature sensor 2, and improving the accuracy of the ambient temperature measurement result.

[0061] The embodiment of the present invention also provides a method for measuring ambient temperature, which can be applied to an electronic device A having an ambient temperature measurement function. The housing 1 of the electronic device A has a cavity, the side wall of the housing 1 has an opening 11, the cavity has a partition structure 12, the partition structure 12 divides the cavity into a first cavity 13 and a second cavity 14 separated from each other, the first cavity 13 is connected to the opening 11 of the side wall of the housing 1, and the second cavity 14 has a heat source device 4 of the electronic device A. Optionally, the method can be described by referring to the above. Figure 1-Figure 5The control circuit 5 in the electronic device A of at least some embodiments described is implemented. Figure 6 The method includes the following steps S100 to S400:

[0062] Step S100: Acquire a first temperature measurement value of an ambient temperature sensor.

[0063] The electronic device A includes an ambient temperature sensor 2 , and the ambient temperature sensor 2 is disposed in the first cavity 13 .

[0064] Step S200: Acquire a second temperature measurement value of the compensation temperature sensor.

[0065] The electronic device A further comprises a compensation temperature sensor 3 disposed in the second cavity 14 and close to the ambient temperature sensor 2. Step S200 and step S100 may be performed sequentially within a time period, for example, step S100 is performed first and then step S200, or step S200 may be performed first and then step S100; or step S200 and step S100 may be performed simultaneously.

[0066] Step S300: determining a compensation temperature value according to a second temperature measurement value.

[0067] Since the second temperature measurement value of the compensation temperature sensor 3 can reflect the influence of the heat generated by the heat source device 4 on the ambient temperature sensor 2 to a certain extent, the compensation temperature value can be determined according to the second temperature measurement value.

[0068] Step S400: Determine the actual ambient temperature value according to the first temperature measurement value and the compensated temperature value.

[0069] The first temperature measurement value of the ambient temperature sensor 2 is compensated according to the compensation temperature value, the influence of the heat generated by the heat source device 4 on the ambient temperature sensor 2 is eliminated, and the actual ambient temperature value is calculated.

[0070] Figure 7 is a flow chart of one method of determining a compensation temperature value. Figure 7 , step S200 includes the following step S210:

[0071] Step S210: In response to detecting a power-on event, obtaining a second temperature measurement value of a compensation temperature sensor.

[0072] The power-on event can be realized by software status detection, power status detection or other methods. When the power-on event is detected, the control circuit 5 obtains the second temperature measurement value of the compensation temperature sensor 3 .

[0073] Step S300 includes the following steps S310 and S320:

[0074] Step S310: determining a compensation reference temperature according to a second temperature measurement value during the startup time.

[0075] The power-on time may be a predetermined time after the power-on event occurs. When the electronic device A is powered on, the heat source device 4 has not yet started to generate heat or the amount of heat generated is small. At this time, the compensation temperature sensor 3 has not yet been affected by the heat of the heat source device 4. At this time, the second temperature measurement value can more accurately reflect the ambient temperature. The compensation reference temperature is determined based on the second temperature measurement value of the power-on time as a reference for calculating the compensation temperature value. For example, the compensation reference temperature can be determined based on the second temperature measurement value of the power-on time.

[0076] Step S320: Determine the compensated temperature value at the current time according to the difference between the second temperature measurement value at the current time and the compensated reference temperature.

[0077] The current time can be determined by calling the system time of electronic device A. According to the current time corresponding to the first temperature measurement value, the second temperature measurement value of the corresponding time is obtained, and the compensated temperature value of the current time is calculated. Optionally, the compensated temperature value of the current time is calculated by the following formula:

[0078] S a =K|S2 Tn -S2 T0 |

[0079] Among them, S a is the current compensation temperature value, K is the correlation coefficient, S2 Tn is the second temperature measurement value at the current time, S2 T0 To compensate for the reference temperature, the value of K is greater than 0 and less than 1, and the specific value can be determined through testing or simulation.

[0080] In some embodiments, before step S400, the method for measuring ambient temperature further includes the following step S500:

[0081] Step S500: determining a sensing deviation value of the ambient temperature sensor.

[0082] The sensing deviation value represents the deviation between the predetermined detection value of the ambient temperature sensor 2 and the actual ambient temperature, or in other words, the measurement deviation of the ambient temperature sensor 2 itself. Figure 8 is a flow chart of a method for determining a sensing deviation value of an ambient temperature sensor. Figure 8 Optionally, step S500 includes the following steps S510 to S530:

[0083] Step S510, obtaining a calibration standard temperature value.

[0084] The calibration standard temperature value may be obtained by electronic device A based on user input or from an external device. For example, the user may obtain the ambient temperature value of the environment in which electronic device A is located through other means (for example, by observing a mercury thermometer) and then input the ambient temperature value into electronic device A through an interactive device as the calibration standard temperature value.

[0085] Step S520: determining a verification temperature value according to a first temperature measurement value at the startup time.

[0086] Wherein, step S100 includes step S110: in response to detecting a power-on event, obtaining a first temperature measurement value of an ambient temperature sensor, and determining a verification temperature value according to the first temperature measurement value at the power-on time, for example, the first temperature measurement value at the power-on time can be used as the verification temperature value.

[0087] Step S530: determining a sensing deviation value of the ambient temperature sensor according to a difference between the calibration temperature value and the calibration standard temperature value.

[0088] For example, the sensing deviation value of the ambient temperature sensor 2 may be equal to the difference between the calibration temperature value and the calibration standard temperature value.

[0089] After step S500, the actual ambient temperature value in step S400 is calculated by the following formula:

[0090] S1 r =S1 d -ΔS-S a

[0091] Among them, S1 r is the actual ambient temperature value at the current time, S1 d The first temperature measurement value at the current time, ΔS is the sensing deviation value of the ambient temperature sensor 2 .

[0092] The method for measuring ambient temperature in an embodiment of the present invention determines the degree of influence of the heat generated by the heat source device 4 on the ambient temperature sensor 2 according to the second temperature measurement value of the compensation temperature sensor 3, determines the compensation temperature value and performs temperature compensation on the first temperature measurement value of the ambient temperature sensor 2, thereby reducing or eliminating the influence of the heat source device 4 on the ambient temperature sensor 2 and improving the accuracy of the ambient temperature measurement result.

[0093] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for measuring ambient temperature, used in electronic equipment, characterized in that: The method comprises: Acquire a first temperature measurement value of an ambient temperature sensor, wherein a housing of the electronic device has a cavity, a side wall of the housing has an opening, the cavity has a partition structure, the partition structure divides the cavity into a first cavity and a second cavity separated from each other, the first cavity is connected to the opening of the side wall of the housing, a heat source device of the electronic device is contained in the second cavity, and the ambient temperature sensor is disposed in the first cavity; Acquire a second temperature measurement value of a compensation temperature sensor, wherein the compensation temperature sensor is disposed in the second cavity and close to the ambient temperature sensor; determining a compensated temperature value based on the second temperature measurement value; and An actual ambient temperature value is determined according to the first temperature measurement value and the compensated temperature value.

2. The method according to claim 1, characterized in that The obtaining of a second temperature measurement value of the compensation temperature sensor comprises: In response to detecting a power-on event, obtaining a second temperature measurement value of the compensated temperature sensor; Determining the compensation temperature value according to the second temperature measurement value comprises: Determining a compensated reference temperature according to a second temperature measurement value during the power-on time; and The compensated temperature value at the current time is determined according to the difference between the second temperature measurement value at the current time and the compensated reference temperature.

3. The method according to claim 2, characterized in that The compensation temperature value at the current time is calculated by the following formula: S a =K|S2 Tn -S2 T0 | Among them, S a is the compensation temperature value at the current time, K is the correlation coefficient, S2 Tn is the second temperature measurement value at the current time, S2 T0 is the compensated reference temperature.

4. The method according to claim 3, characterized in that The method further comprises: determining a sensing deviation value of the ambient temperature sensor; The actual ambient temperature value is calculated by the following formula: S1 r =S1 d -ΔS-S a Among them, S1 r is the actual ambient temperature value at the current time, S1 d The first temperature measurement value at the current time, ΔS is the sensing deviation value of the ambient temperature sensor.

5. The method according to claim 4, characterized in that The obtaining of a first temperature measurement value of the ambient temperature sensor comprises: In response to detecting a power-on event, obtaining a first temperature measurement value of an ambient temperature sensor; Determining the sensing deviation value of the ambient temperature sensor includes: Get the calibration standard temperature value; Determining a calibration temperature value according to a first temperature measurement value at the startup time; and A sensing deviation value of the ambient temperature sensor is determined according to a difference between the calibration temperature value and the calibration standard temperature value.

6. An electronic device, characterized in that: include: A shell, wherein the shell has a cavity therein, a side wall of the shell has an opening, and the cavity has a partition structure therein, the partition structure divides the cavity into a first cavity and a second cavity separated from each other, and the first cavity is connected to the opening; An ambient temperature sensor is disposed in the first cavity; A compensation temperature sensor is disposed in the second cavity and close to the ambient temperature sensor; A heat source device is disposed in the second cavity and is spaced apart from the ambient temperature sensor and the compensation temperature sensor; as well as A control circuit, electrically connected to the ambient temperature sensor and the compensation temperature sensor; Wherein, the control circuit is configured as follows: Obtaining a first temperature measurement value of an ambient temperature sensor; Acquire a second temperature measurement value of a compensation temperature sensor, wherein the compensation temperature sensor is disposed in the second cavity and close to the ambient temperature sensor; determining a compensated temperature value based on the second temperature measurement value; and An actual ambient temperature value is determined according to the first temperature measurement value and the compensated temperature value.

7. The electronic device according to claim 6, characterized in that: The control circuit is further configured to obtain a second temperature measurement value of the compensation temperature sensor to determine a compensated reference temperature in response to detecting a power-on event; The control circuit is configured to determine a compensated temperature value at a current time according to a difference between the second temperature measurement value at a current time and the compensated reference temperature.

8. The electronic device according to claim 7, characterized in that: The control circuit calculates the compensated temperature value at the current time by the following formula: S a =K|S2 Tn -S2 T0 | Among them, S a is the compensation temperature value at the current time, K is the correlation coefficient, S2 Tn is the second temperature measurement value at the current time, S2 T0 is the compensated reference temperature.

9. The electronic device according to claim 8, characterized in that: The control circuit is further configured to: determining a sensing deviation value of the ambient temperature sensor; The control circuit is configured to calculate the actual ambient temperature value by the following formula: S1 r =S1 d -ΔS-S a Among them, S1 r is the actual ambient temperature value at the current time, S1 d The first temperature measurement value at the current time, ΔS is the sensing deviation value of the ambient temperature sensor.

10. The electronic device according to claim 9, characterized in that: The control circuit is further configured to obtain a first temperature measurement value of the ambient temperature sensor in response to detecting a power-on event; The control circuit determines the sensing deviation value of the ambient temperature sensor including the following steps: Get the calibration standard temperature value; Determining a calibration temperature value according to a first temperature measurement value at the startup time; and A sensing deviation value of the ambient temperature sensor is determined according to a difference between the calibration temperature value and the calibration standard temperature value.

11. The electronic device according to claim 6, characterized in that: The partition structure comprises: A top plate having a first side surface and a second side surface disposed opposite to each other, wherein the first side surface is disposed opposite to the opening at an interval; A sealing side wall is disposed between the top plate and the inner wall of the shell, and the sealing side wall surrounds the circumference of the opening; Wherein, the ambient temperature sensor is arranged on the first side surface.

12. The electronic device according to claim 11, characterized in that: The compensation temperature sensor is arranged on the second side surface; or The top plate has a wing portion protruding from the outside of the area defined by the sealing side wall, and the compensation temperature sensor is arranged on the first side surface and located at the wing portion.

13. The electronic device according to claim 11, characterized in that: The top plate includes a first circuit board, and the ambient temperature sensor is electrically connected to the first circuit board; and / or The top plate has a wire-passing hole penetrating the first cavity and the second cavity, and the connecting wire of the ambient temperature sensor extends into the second cavity through the wire-passing hole.

14. The electronic device according to claim 11, characterized in that: The compensation temperature sensor is arranged on the second side surface, and the electronic device further comprises a temperature-averaging cover arranged outside the compensation temperature sensor, and the projection of the temperature-averaging cover on the top plate corresponds to the position of the ambient temperature sensor.