CN112414587B - Temperature detection method and terminal equipment - Google Patents

Temperature detection method and terminal equipment Download PDF

Info

Publication number
CN112414587B
CN112414587B CN202011046068.5A CN202011046068A CN112414587B CN 112414587 B CN112414587 B CN 112414587B CN 202011046068 A CN202011046068 A CN 202011046068A CN 112414587 B CN112414587 B CN 112414587B
Authority
CN
China
Prior art keywords
temperature
values
value
sensors
terminal device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011046068.5A
Other languages
Chinese (zh)
Other versions
CN112414587A (en
Inventor
朱向军
张腾飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN202011046068.5A priority Critical patent/CN112414587B/en
Publication of CN112414587A publication Critical patent/CN112414587A/en
Application granted granted Critical
Publication of CN112414587B publication Critical patent/CN112414587B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01KMEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
    • G01K13/00Thermometers specially adapted for specific purposes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01KMEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
    • G01K15/00Testing or calibrating of thermometers
    • G01K15/005Calibration

Abstract

The embodiment of the invention discloses a temperature detection method and terminal equipment, which are applied to the technical field of terminal equipment and can solve the problem that the detected environmental temperature value is inaccurate. The method comprises the following steps: acquiring reading values of M sensors to obtain M first temperature values, wherein the M sensors are arranged in the terminal equipment, and the distances between different sensors and the surface of the terminal equipment are different, wherein M is an integer greater than or equal to 3; judging whether the M first temperature values and the distances between the different sensors and the surface of the terminal equipment have a direct proportion relation or an inverse proportion relation; if a direct proportion relation or an inverse proportion relation exists, fitting by adopting a least square method according to the M first temperature values to obtain a temperature parabolic curve; determining a vertex temperature value of the temperature parabolic curve as an ambient temperature value; and outputting the ambient temperature value. The method is applied to a scene where the ambient temperature value of the user changes suddenly.

Description

Temperature detection method and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of terminal equipment, in particular to a temperature detection method and terminal equipment.
Background
At present, terminal equipment is provided with a temperature sensor for measuring temperature. However, when a user enters a new environment, the reading of the sensor may not be quickly stabilized, which requires a long time for detection, and air may flow in the environment, which may cause heat to flow, resulting in inaccurate temperature values detected by the sensor.
Disclosure of Invention
The embodiment of the invention provides a temperature detection method and terminal equipment, which are used for solving the problem of inaccurate temperature detection in the prior art. In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, a method for detecting temperature is provided, the method comprising: acquiring reading values of M sensors to obtain M first temperature values, wherein the M sensors are arranged in the terminal equipment, and the distances between different sensors and the surface of the terminal equipment are different, wherein M is an integer greater than or equal to 3;
judging whether the M first temperature values and the distances between the different sensors and the surface of the terminal equipment have a direct proportion relation or an inverse proportion relation or not;
if a direct proportion relation or an inverse proportion relation exists, fitting by adopting a least square method according to the M first temperature values to obtain a temperature parabolic curve;
determining a vertex temperature value of the temperature parabolic curve as an ambient temperature value;
and outputting the environment temperature value.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, after determining whether there is a direct proportional relationship or an inverse proportional relationship between the M first temperature values and the distances between the different sensors and the surface of the terminal device, the method further includes:
if the inverse proportion relation exists, determining that the temperature of the environment where the terminal equipment is located is increased;
and if the direct proportional relation exists, determining that the temperature of the environment where the terminal equipment is located is reduced.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, after determining that the temperature of the environment in which the terminal device is located increases, the method further includes:
outputting a first prompt message, wherein the first prompt message is used for prompting the temperature rise of the environment where the terminal equipment is located;
after determining that the temperature of the environment in which the terminal device is located is reduced, the method further includes:
and outputting a second prompt message, wherein the second prompt message is used for prompting the temperature reduction of the environment where the terminal equipment is located.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, before acquiring the readings of the M sensors to obtain the M first temperature values, the method further includes:
in a constant temperature environment, obtaining the reading values of the M sensors to obtain M second temperature values;
according to the M second temperature values, calculating the temperature difference value of two adjacent sensors to obtain M-1 first difference values;
the acquiring the reading values of the M sensors to obtain M first temperature values includes:
if the M-1 first difference values are all smaller than a first preset value, reading values of the M sensors are obtained to obtain M first temperature values;
alternatively, the first and second electrodes may be,
if a second difference value of the M-1 first difference values is larger than or equal to a first preset value, calibrating the temperature values of all the sensors according to any second temperature value corresponding to a third difference value, wherein the third difference value is any difference value of the M-1 first difference values except the second difference value.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, after acquiring the readings of the M sensors to obtain the M first temperature values, the method further includes:
according to the M first temperature values, calculating a fourth difference value between a first target temperature value and a second target temperature value, wherein the first target temperature value is a first temperature value detected by a sensor with the largest distance to the surface of the terminal equipment, and the second target temperature value is a first temperature value detected by a sensor with the smallest distance to the surface of the terminal equipment;
and if the absolute value of the fourth difference is greater than the second preset value, outputting third prompt information, wherein the third prompt information is used for prompting a user to increase or decrease clothes.
In a second aspect, a terminal device is provided, which includes: the acquisition module is used for acquiring the reading values of M sensors to obtain M first temperature values, the M sensors are arranged in the terminal equipment, the distances between different sensors and the surface of the terminal equipment are different, and M is an integer greater than or equal to 3;
the processing module is used for judging whether a direct proportion relation or an inverse proportion relation exists between the M first temperature values and the distances between the different sensors and the surface of the terminal equipment, and for obtaining a temperature parabolic curve by adopting least square fitting according to the M first temperature values if the direct proportion relation or the inverse proportion relation exists;
the determining module is used for determining the vertex temperature value of the temperature parabolic curve as an environment temperature value;
and the output module is used for outputting the environment temperature value.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the determining module is further configured to determine that the temperature of the environment in which the terminal device is located is increased if an inverse proportional relationship exists, and determine that the temperature of the environment in which the terminal device is located is decreased if a direct proportional relationship exists.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the output module is further configured to output a first prompt message after determining that the temperature of the environment in which the terminal device is located is increased, where the first prompt message is used to prompt the temperature of the environment in which the terminal device is located to be increased.
The output module is further configured to output a second prompt message after determining that the temperature of the environment where the terminal device is located is reduced, where the second prompt message is used to prompt the temperature of the environment where the terminal device is located to be reduced.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the obtaining module is further configured to obtain, in a constant temperature environment, the reading values of the M sensors to obtain M second temperature values;
the processing module is further configured to calculate a temperature difference value between two adjacent sensors according to the M second temperature values to obtain M-1 first difference values;
the acquisition module is further configured to acquire the reading values of the M sensors to obtain M first temperature values if the M-1 first difference values are all smaller than a first preset value;
the processing module is further configured to calibrate the temperature values of all the sensors according to any one of second temperature values corresponding to a third difference value if a second difference value of the M-1 first difference values is greater than or equal to a first preset value, where the third difference value is any one of the M-1 first difference values except the second difference value.
As an optional implementation manner, in a second aspect of the embodiment of the present invention, the processing module is further configured to calculate a fourth difference between a first target temperature value and a second target temperature value according to the M first temperature values, where the first target temperature value is a first temperature value detected by a sensor with a largest distance from a surface of the terminal device, and the second target temperature value is a first temperature value detected by a sensor with a smallest distance from the surface of the terminal device;
the output module is further configured to output third prompt information if the absolute value of the fourth difference is greater than a second preset value, wherein the third prompt information is used for prompting a user to increase or decrease clothes.
In a third aspect, a terminal device is provided, which includes:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the temperature detection method in the first aspect of the embodiment of the present invention.
In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program that causes a computer to execute the temperature detection method in the first aspect of the embodiment of the present invention. The computer readable storage medium includes a ROM/RAM, a magnetic or optical disk, or the like.
In a fifth aspect, there is provided a computer program product which, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect.
A sixth aspect provides an application publishing platform for publishing a computer program product, wherein the computer program product, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, M temperature values detected by M sensors arranged in terminal equipment at the same time are obtained, if the M temperature values and the distance between the sensor and the surface of the terminal equipment have a direct proportion or inverse proportion relation, the change of the external environment temperature of a user can be explained, then a temperature parabolic curve is obtained by least square fitting according to the M temperature values, the temperature value corresponding to the vertex of the temperature parabolic curve is determined as the environment temperature value, and finally the obtained environment temperature value is output to the user. According to the technical scheme, the environment temperature value can be calculated in a short time without waiting for the stable reading of the sensor, and the calculated environment temperature value can be more accurate by a least square fitting method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1a is a first schematic flow chart of a temperature detection method according to an embodiment of the present invention;
fig. 1b is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 1c is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
FIG. 1d is a first schematic diagram illustrating a relationship between a temperature value and a distance between a sensor and a surface of a terminal device according to an embodiment of the present invention;
fig. 1e is a schematic diagram illustrating a relationship between a temperature value and a distance between a sensor and a surface of a terminal device according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a temperature detection method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart diagram of a temperature detection method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram three of a terminal device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first temperature value and the second temperature value, etc. are used to distinguish different temperature values, rather than to describe a particular sequence of temperature values.
The terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The embodiment of the invention provides a temperature detection method and terminal equipment, which can quickly and accurately detect the external environment temperature of a user and output a temperature value.
The terminal device according to the embodiment of the present invention may be a Mobile phone, a tablet Computer, a notebook Computer, a palm Computer, a vehicle-mounted terminal device, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook, or a Personal Digital Assistant (PDA). The wearable device may be a smart watch, a smart bracelet, a watch phone, a smart foot ring, a smart earring, a smart necklace, a smart headset, or the like, and the embodiment of the present invention is not limited.
An execution main body of the temperature detection method provided in the embodiment of the present invention may be the terminal device, or may also be a functional module and/or a functional entity that can implement the temperature detection method in the terminal device, and may be specifically determined according to actual use requirements, which is not limited in the embodiment of the present invention. The following takes a terminal device as an example to exemplarily explain the temperature detection method provided by the embodiment of the present invention.
The temperature detection method provided by the embodiment of the invention can be applied to the scene of temperature change caused by sudden change of the environment where the user is located.
Example one
As shown in fig. 1a, an embodiment of the present invention provides a temperature detection method, which may include the following steps:
101. and acquiring the reading values of the M sensors to obtain M first temperature values.
The terminal equipment is internally provided with M sensors, the distances between different sensors and the surface of the terminal equipment are different, and M is an integer greater than or equal to 3. At any moment, reading values of a first sensor, a second sensor, \ 8230and an Mth sensor are respectively obtained to obtain M first temperature values.
In the embodiment of the present invention, taking a terminal device as an example, as shown in fig. 1b, M sensors are disposed inside a terminal device 11, and because the surface of the terminal device is exposed to the air, the distance between each sensor and a surface 12 of the terminal device needs to be different, for example, only M sensors are disposed in a space inside the terminal device near a surface where a display 13 is located, and a certain distance exists between any two sensors, and the distance may be a fixed distance or a flexibly set distance. Reading values of a first sensor, a second sensor, \ 8230and an Mth sensor are respectively obtained at any moment so as to obtain M first temperature values at the moment.
However, facing the wearable device, since the wearable device may have a part of the surface contacting with the human body and not be exposed to the air, each sensor provided in the wearable device only needs to have a different distance from a certain plane where the display screen of the wearable device is located. Taking a telephone watch as an example, as shown in fig. 1c, M sensors are arranged inside the watch body 14 of the telephone watch, each sensor being at a different distance from the watch body's case 16 from the bottom plate 15 of the watch body to the middle region of the watch body's case 16, there being a certain distance between any two sensors. Reading values of a first sensor, a second sensor, \ 8230and an Mth sensor are respectively obtained at any moment so as to obtain M first temperature values at the moment.
Optionally, before obtaining the reading values of the M sensors, the terminal device may further detect whether the terminal device is in a wearing state, and if the terminal device is detected to be in the wearing state, perform steps 101 to 105 according to the sensor setting in fig. 1 c. If the terminal device is detected not to be in a wearing state, the temperature detection is carried out only by the sensor close to the surface where the display screen is located according to the sensor arrangement in fig. 1b, and the steps 101 to 105 are carried out.
102. And judging whether the M first temperature values and the distances between different sensors and the surface of the terminal equipment have a direct proportion relation or an inverse proportion relation.
In the embodiment of the invention, the relation between the temperature value and the distance between the sensor and the surface of the terminal device can be determined by the M first temperature values and the distances between the M sensors and the surface of the terminal device. In the M sensors, each sensor has a reading value, and the reading value of each sensor and the distance between each sensor and the surface of the terminal equipment are in one-to-one correspondence, and then the relationship between the reading value of each sensor and the distance between each sensor and the surface of the terminal equipment is determined.
It can be understood that when a user is in a fixed environment for a period of time, no heat flows inside the terminal device, the reading values of the plurality of sensors inside the terminal device should be the same, and when the user suddenly leaves the fixed environment and enters a new environment, the external environment temperature changes, which may cause the reading values of the M sensors to change. It is conceivable that the closer the sensor is to the surface of the terminal device, the closer the sensor is to the external environment, the faster the temperature change speed will be; conversely, the farther the sensor is from the surface of the terminal device, the farther away from the environment, the slower the temperature change will be. It can therefore be stated that the reading of the sensor which is closer to the surface of the terminal changes more rapidly, i.e. the value changes more rapidly, whether the temperature of the environment increases or decreases.
103. If a direct proportion relation or an inverse proportion relation exists, a temperature parabolic curve is obtained by adopting least square fitting according to the M first temperature values.
If the M first temperature values and the distances between the different sensors and the surface of the terminal equipment have a direct proportional relationship or an inverse proportional relationship, it can be determined that the user leaves the fixed environment and enters a brand new environment with different temperatures. At the moment, curve fitting is carried out through a least square algorithm according to the M temperature values at the same moment, and a temperature parabolic curve can be obtained. The abscissa of the temperature parabolic curve is the distance between the sensor and the surface of the terminal device, and the ordinate of the temperature parabolic curve is the temperature value. Curve fitting is a data processing method for approximately depicting a curve composed of a plurality of discrete points and representing the functional relationship among the points by using a continuous curve.
In the embodiment of the invention, a plurality of data points p are obtained by acquiring the reading values of M sensors and associating the reading values with the distance between the sensor and the surface of the terminal equipment i (x i ,y i ) Which isWhere i =1,2, \8230:, k (3 ≦ k ≦ M), and then approximate curves y = φ (x) for the k data points, in order to minimize the deviation between the approximate curves and each data point, a least squares method is required, which can determine a temperature parabolic curve according to the principle of minimum sum of squares of deviations and fitting of a polynomial.
First, the fitting polynomial can be assumed to be the following formula (1):
y=a 0 +a 1 x+…+a k x k (1)
the parabolic curve of the temperature obtained by fitting needs to have the smallest difference with the temperature value of each data point as much as possible, so that the sum of squares of the difference between the ordinate value of each data point and the curve needs to be obtained, as shown in the following formula (2):
Figure BDA0002705896660000091
then, the partial derivative is calculated for the sum of squared differences, and the following formulas (3), (4), (5) and the like can be obtained:
Figure BDA0002705896660000092
then, the following formulas (6), (7) and (8) can be obtained by respectively simplifying the formulas (3), (4) and (5):
Figure BDA0002705896660000093
Figure BDA0002705896660000094
Figure BDA0002705896660000095
then, the equations (6), (7) and (8) are expressed in a matrix form, and the equation (9) can be obtained:
Figure BDA0002705896660000096
simplifying each matrix in equation (9) can result in equation (10):
Figure BDA0002705896660000101
i.e. X a = Y, so a = (X '× X-1 × X' × Y), which results in the coefficient matrix a, i.e. a 0 ,a 1 ,…,a k The temperature parabolic curve can be obtained by substituting the value of (2) into the fitting polynomial (1).
104. And determining the vertex temperature value of the temperature parabolic curve as the environment temperature value.
The terminal device may use a temperature value corresponding to a vertex of the temperature parabolic curve as the ambient temperature value.
If the user enters the environment with low temperature from the environment with high temperature, the temperature parabolic curve is a parabola which is firstly decreased and then increased, the opening is upward, as shown in fig. 1d, and the temperature value corresponding to the lowest point of the temperature parabolic curve can be determined as the ambient temperature value; if the user enters the environment with high temperature from the environment with low temperature, the temperature parabolic curve is a parabola which is increased and then decreased, the opening is downward, and as shown in fig. 1e, the temperature value corresponding to the highest point of the temperature parabolic curve can be determined as the ambient temperature value.
105. And outputting the ambient temperature value.
The embodiment of the invention provides a temperature detection method, which comprises the steps of obtaining a plurality of temperature values by obtaining reading values of a plurality of sensors arranged in terminal equipment at the same time, if a certain direct proportional relation or inverse proportional relation exists between the plurality of temperature values and the distance between the sensors and the surface of the terminal equipment, then showing that the current environment temperature of a user is changed to a certain degree, fitting a temperature parabolic curve according to the plurality of temperature values, determining the temperature value corresponding to the vertex of the curve as an environment temperature value, and finally outputting the environment temperature value. According to the technical scheme, after the current environment temperature of the user is detected to be changed to a certain degree, the reading value of the sensor does not need to be stable, the accurate environment temperature value can be quickly obtained by acquiring the reading values of the plurality of sensors at any moment, and the temperature of the current environment of the user is reminded.
As an optional implementation manner, the terminal device may further obtain the readings of M sensors at N times to obtain N × M first temperature values; obtaining a temperature parabolic curve according to the M first temperature values at each moment so as to obtain N temperature parabolic curves; respectively obtaining the vertex temperature value of each temperature parabolic curve to obtain N vertex temperature values; and taking the average value of the N vertex temperature values as an environment temperature value, and outputting the environment temperature value.
In this optional embodiment, the terminal device may obtain a plurality of temperature values at a plurality of times, and then average the temperature values corresponding to the vertexes determined at each time, so as to obtain the ambient temperature value. According to the scheme, the final environment temperature value is obtained by averaging a plurality of temperature values, so that the environment temperature can be detected more accurately, and the condition that the environment temperature value is inaccurate due to insufficient sensitivity of the sensor is avoided.
As an optional implementation manner, the terminal device may further obtain the schedule information of the user, and if it is detected that the body temperature of the user is increased and is higher than the normal body temperature range of the human body at the end time of the physical education session, it may be indicated that the user has just ended the physical education session, at this time, the readings of the M sensors may be obtained to obtain M first temperature values, and a temperature parabolic curve is obtained according to the M first temperature values, and a vertex temperature value of the temperature parabolic curve is determined as the environmental temperature value. And comparing the environment temperature value with a preset temperature value, and if the environment temperature value is lower than the preset temperature value, outputting a fourth prompt message to prompt a user that the current environment temperature is lower and a cold risk exists. Optionally, if the ambient temperature value is lower than the preset temperature value, the terminal device may further control the screen to send a red light warning to prompt the user.
Illustratively, the preset temperature value is a pre-stored temperature that is sensed by the user to be suitable (for example, it may be a temperature value lower than the normal body temperature of the human body), and the preset temperature value may be set by the terminal device according to the local geographical location of the user, the season, and user information (which may include a medical record of the user, a curriculum schedule, etc.), or may be set by the user.
For example: when the terminal device acquires that the temperature of a user on a certain day is 20 degrees when the user asks for illness and faking, which indicates that 20 degrees is relatively cold and unsuitable for the user, the preset temperature value can be prestored as 25 degrees.
For example: when the terminal device detects that the body temperature of the user is 39 degrees and exceeds the normal body temperature range of the human body at the end time 16 of the physical education course in the schedule, the terminal device can determine that the user just finishes the physical education course.
For example: according to the temperature detection method provided by the embodiment of the invention, 5 sensors arranged in the terminal equipment determine that the current environment temperature is 20 ℃ and is lower than 25 ℃, so that the user can be shown to enter a cooler air-conditioning room, at the moment, a prompt message of 'entering the cooler environment and being careful to catch a cold' can be output to prompt the user that the current environment temperature is lower, and the screen continuously flickers red light until the user leaves the environment with the temperature value of 20 ℃.
The embodiment can output a prompt or flash red light on a screen to prompt a user that the temperature of the environment is low when the user who just finished a physical class enters a cold environment. Generally speaking, children can enter the air-conditioned room as soon as possible after finishing a physical education course when the children are hot, but the children are prone to getting ill, the current environment temperature is detected timely, and a corresponding prompt is output when the temperature is low, so that the user can be prompted, and the user can be prevented from getting ill to a certain extent.
It should be noted that the prompt information in the embodiment of the present invention may include a voice, a text, an animation, or a flashing light, and may be set according to an actual requirement in an actual implementation, and the embodiment of the present invention is not limited specifically.
Example two
As shown in fig. 2, the temperature detection method provided in the embodiment of the present invention may further include the following steps:
201. and acquiring the reading values of the M sensors to obtain M first temperature values.
202. And judging whether the M first temperature values and the distances between different sensors and the surface of the terminal equipment have a direct proportion relation or an inverse proportion relation.
In the embodiment of the present invention, for the description of steps 201 to 202, please refer to the detailed description of steps 101 to 102 in the first embodiment, which is not repeated herein.
203. And if the inverse proportional relation exists, determining the temperature rise of the environment where the terminal equipment is located.
If the reading value of the sensor closer to the surface of the terminal device is larger and the reading value of the sensor farther from the surface of the terminal device is smaller in the two adjacent sensors, it can be shown that the temperature value before the change of the two adjacent sensors is lower than the reading value of the sensor farther from the surface of the terminal device, and thus it can be shown that the reading values of the two sensors are becoming larger, that is, the temperature of the environment where the terminal device is located is rising.
Illustratively, if sensor a and sensor B are adjacent, sensor a is closer to the surface of the terminal device than sensor B, and if it is detected that the reading value of sensor a is 25 degrees and the reading value of sensor B is 20 degrees, and because the reading value of the sensor closer to the surface of the terminal device changes faster, it can be obtained that the reading value before the change of sensor a and sensor B is lower than 20 degrees, it indicates that the reading values of sensor a and sensor B are becoming larger, i.e. the temperature of the environment in which the terminal device is located is increasing.
In the embodiments of the present invention, adjacent may refer to contact or not contact. For example: the sensor a and the sensor B are adjacent to each other, which may mean that the sensor a and the sensor B are in contact arrangement inside the terminal device, and there is no space interval therebetween, or that there is a certain space interval between the sensor a and the sensor B, and there is no contact, but there is no other sensor disposed between the two sensors.
204. And outputting the first prompt message.
After determining that the temperature of the environment in which the terminal device is located is increased, a first prompt message for prompting the temperature increase of the environment in which the terminal device is located may be output.
205. And if the direct proportional relation exists, determining that the temperature of the environment where the terminal equipment is located is reduced.
If it is detected that the reading value of the sensor farther from the surface of the terminal device is larger and the reading value of the sensor closer to the surface of the terminal device is smaller in the two adjacent sensors, it can be said that the temperature value before the change of the two adjacent sensors is higher than the reading value of the sensor farther from the surface of the terminal device, which can indicate that the reading values of the two sensors are becoming smaller, that is, the temperature of the environment where the terminal device is located is decreasing.
Illustratively, if sensor a and sensor B are adjacent, sensor a is closer to the surface of the terminal device than sensor B, if the reading value of sensor a is detected to be 20 degrees, the reading value of sensor B is 25 degrees, and since the reading value of the sensor closer to the surface of the terminal device changes faster, the reading value before the change of sensor a and sensor B can be obtained to be higher than 25 degrees, which indicates that the reading values of sensor a and sensor B are becoming smaller, i.e. the temperature of the environment in which the terminal device is located is decreasing.
206. And outputting the second prompting message.
After determining that the temperature of the environment in which the terminal device is located decreases, a second prompt message for prompting the temperature decrease of the environment in which the terminal device is located may be output.
207. And obtaining a temperature parabolic curve according to the M first temperature values.
208. And determining the vertex temperature value of the temperature parabolic curve as the environment temperature value.
209. And outputting the ambient temperature value.
In the embodiment of the present invention, for the description of steps 207 to 209, please refer to the detailed description of steps 102 to 104 in the first embodiment, and the details of the embodiment of the present invention are not repeated.
It should be noted that, in the embodiment of the present invention, steps 203 to 204 and steps 205 to 206 are two different cases of step 202, and do not occur at the same time. Steps 203 to 204 or steps 205 to 206 and steps 207 to 209 may occur simultaneously, or steps 203 to 204 or steps 205 to 206 may be performed first followed by steps 207 to 209, or steps 207 to 209 may be performed first followed by steps 203 to 204 or steps 205 to 206, and the embodiment of the present invention is not particularly limited.
Similarly, for the output of the first prompt message in the step 204 or the output of the second prompt message in the step 206 and the output of the ambient temperature value in the step 209, the ambient temperature value and the first prompt message or the second prompt message may be output at the same time, the ambient temperature value may be output after the first prompt message or the second prompt message is output, or the ambient temperature value may be output before the first prompt message or the second prompt message is output, which is not limited in the embodiment of the present invention.
The embodiment of the invention provides a temperature detection method, which can determine the relationship between a temperature value and the distance between a sensor and the surface of terminal equipment through temperature values obtained by a plurality of sensors arranged in the terminal equipment, can determine that the current environment temperature is reduced if the temperature value is in a direct proportion relationship, can determine that the current environment temperature is increased if the temperature value is in an inverse proportion relationship, and then outputs different prompt messages and environment temperature values according to different environment temperature changes. According to the technical scheme, a user can know the change of the ambient temperature more visually, the detected ambient temperature value is more accurate, the ambient temperature value can be output, the change condition of the ambient temperature can also be output, and the method is more visual.
As an optional implementation manner, after a temperature parabolic curve is fitted through a temperature value obtained by a sensor arranged in the terminal device and a current environment temperature value is determined, the terminal device may further obtain an average temperature value of the previous day, and if an absolute value of a difference between the current environment temperature value and the average temperature value of the previous day is greater than a preset temperature difference value, a prompt message may be sent to the associated guardian device to prompt the guardian that the temperature of the environment where the user is currently located changes greatly compared with the average temperature of the previous day, so that the guardian can be prompted to pay attention to the dressing or traveling condition of the user.
Illustratively, the preset temperature difference is set according to the local four-season environmental temperature change and a human body acceptable temperature change value, and is assumed to be 8 degrees. The first user associates the mobile phone of the mother of the first user in the terminal device as guardian equipment, if a temperature parabolic curve is fitted by the terminal device of the first user through a temperature value obtained by an internal sensor and the current environment temperature value is determined to be 20 degrees, and the average temperature value of yesterday is detected to be 30 degrees, the current environment temperature is reduced by 10 degrees and is more than 30 degrees, the change trend that the current environment temperature is greatly reduced can be explained, and the terminal device can send a prompt message to the mobile phone of the mother of the first user to prompt the mother of the first user to greatly reduce the current environment temperature.
The implementation mode can remind a parent user that the current environment temperature of the parent user is greatly changed compared with yesterday, so that the parent can remind the user of paying attention to the temperature change and take some measures to prevent diseases.
As an optional implementation manner, after a temperature parabolic curve is fitted through a temperature value obtained by a sensor arranged in the terminal device and a current environment temperature value is determined, the terminal device may further obtain positioning information of the associated friend device, determine a distance between the friend device and the terminal device according to the positioning information, obtain one or more target friend devices whose distance is less than a preset distance, and then send a prompt message to the target friend devices to prompt the temperature of the environment where the friend is located to increase or decrease.
The embodiment can determine the position of the friend according to the distance between the associated friend device and the terminal device, and if the distance between the friend device and the terminal device is less than the preset distance, it indicates that the friend may be in the same environment as the user of the terminal device, and at this time, the same prompt message can be output to the friend device to prompt the temperature of the environment where the friend is located to increase or decrease.
EXAMPLE III
As shown in fig. 3, the temperature detection method provided in the embodiment of the present invention may further include the following steps:
301. and in a constant temperature environment, reading values of the M sensors are obtained to obtain M second temperature values.
When the terminal equipment keeps the starting state in the constant temperature environment, the reading values of the M sensors can be obtained, and M second temperature values can be obtained. The constant temperature environment may be a closed space with a constant temperature or a thermostat with a set temperature.
302. And calculating the temperature difference value of two adjacently arranged sensors to obtain M-1 first difference values.
And calculating the temperature difference between two adjacent sensors according to the M second temperature values, so as to obtain M-1 first difference values.
303. And if the M-1 first difference values are all smaller than the first preset value, acquiring the reading values of the M sensors to obtain M first temperature values.
In an ideal situation, the readings of the sensors should be equal in a constant temperature environment because the heat flow is balanced, i.e. the M first differences are all zero. However, in practical situations, considering that the sensitivity of the sensors and a part of air flowing in the internal space of the terminal device may cause a weak heat flow, when the M-1 first differences are not zero but are all smaller than the first preset value, the readings of the M sensors may be considered to be accurate. And then, reading values of the M sensors are obtained to obtain M first temperature values.
The first preset value is a very small value set by the terminal device according to objective factors such as sensitivity of the built-in sensor and air flow in the internal space of the terminal device, for example, 0.05 degree and 0.08 degree.
Illustratively, assuming that M is 5, the first preset value is 0.05 degrees. If 5 readings can be obtained through a sensor in the terminal device, the reading of the sensor A is 25.50 degrees, the reading of the sensor B is 25.51 degrees, the reading of the sensor C is 25.51 degrees, the reading of the sensor D is 25.54 degrees, and the reading of the sensor E is 25.56 degrees. Then four first differences of 0.01 degrees, 0 degrees, 0.03 degrees and 0.02 degrees, respectively, can be calculated, and all four first differences are less than 0.05 degrees, and it can be determined that the five sensors are accurate.
304. And if a second difference value in the M-1 first difference values is larger than or equal to a first preset value, calibrating the temperature values of all the sensors according to any second temperature value corresponding to the third difference value.
Wherein the third difference is any one difference other than the second difference among the M-1 first differences.
If at least one second difference value which is greater than or equal to the first preset value exists in the M-1 first difference values, it can be shown that at least one sensor reading corresponding to the second difference value is inaccurate, and calibration is needed at this time. And calibrating all the sensors according to the reading value of any one of the two sensors corresponding to the third difference value.
Illustratively, assuming that M is 5, the first preset value is 0.05 degrees. If 5 readings are obtained through the sensor in the terminal device, the reading of the sensor A is 25.50 degrees, the reading of the sensor B is 25.52 degrees, the reading of the sensor C is 25.59 degrees, the reading of the sensor D is 25.65 degrees, and the reading of the sensor E is 25.68 degrees. Then 4 first differences, 0.02 degrees, 0.07 degrees, 0.06 degrees, and 0.03 degrees can be calculated, wherein if two second differences, 0.07 degrees and 0.06 degrees, are greater than 0.05 degrees, calibration is required. In this case, the calibration may be performed by taking any one of the two third differences of 0.02 degree and 0.03 degree, for example, 0.02 degree. The readings of the two sensors a and B corresponding to the third difference of 0.02 degree are 25.50 degrees and 25.52 degrees, respectively, and the readings of the five sensors can be calibrated to be 25.50 degrees of the reading of the sensor a or 25.52 degrees of the reading of the sensor B. Similarly, the third difference 0.03 degree may be used for calibration, where the readings of the two sensors D and E corresponding to the third difference 0.03 degree are 25.65 degrees and 25.68 degrees, respectively, and then the readings of all the sensors are calibrated to be 25.65 degrees of the reading of the sensor D or 25.68 degrees of the reading of the sensor E.
305. And acquiring the reading values of the M sensors to obtain M first temperature values.
In the embodiment of the present invention, for the description of step 305, please refer to the detailed description of step 101 in the first embodiment, which is not repeated herein.
306. And calculating a fourth difference value between the first target temperature value and the second target temperature value according to the M first temperature values.
The first target temperature value is a reading value of a sensor which is closest to the surface of the terminal equipment, and the second target temperature value is a reading value of a sensor which is farthest from the surface of the terminal equipment. After the readings of the two sensors are obtained, a fourth difference between the two is calculated.
307. And if the absolute value of the fourth difference is greater than the second preset value, outputting third prompt information.
If the absolute value of the fourth difference is larger than the second preset value, the temperature of the external environment is changed greatly, and at the moment, third prompt information is output and used for prompting a user to increase or decrease clothes.
If the terminal device detects that the reading value of the sensor closest to the surface of the terminal device is larger than the reading value of the sensor farthest from the surface of the terminal device, and the difference value between the reading value and the reading value is larger than a second preset value, it can be said that the user enters a hotter environment from a cooler environment, and the environmental temperature difference is larger, at this moment, a third prompt message is output, and the user is advised to take some measures to cool; if the terminal device detects that the reading value of the sensor closest to the surface of the terminal device is smaller than the reading value of the sensor farthest from the surface of the terminal device, and the difference value between the reading value and the reading value is larger than the second preset value, it can be stated that the user enters a cooler environment from a hotter environment, the environment temperature difference is large, at this moment, a third prompt message is output, and the user is advised to take some measures to keep warm.
Illustratively, the second preset value is set according to the local four-season environmental temperature change and the acceptable temperature change value of the human body, and is assumed to be 8 degrees. When the reading value of the sensor A closest to the surface of the terminal equipment is 26 degrees, the reading value of the sensor B farthest from the surface of the terminal equipment is 36 degrees, the absolute value of the temperature difference between the reading value of the sensor A and the reading value of the sensor B is 10 degrees and is larger than 8 degrees, and the reading value of the sensor A is smaller than the reading value of the sensor B, the situation that a user possibly enters a cooler air-conditioned room from a warmer outdoor environment can be shown, and at the moment, the terminal equipment can output a prompt message to prompt the user that the current environment temperature is greatly increased.
308. And obtaining a temperature parabolic curve according to the M first temperature values.
309. And determining the vertex temperature value of the temperature parabolic curve as the environment temperature value.
310. And outputting the ambient temperature value.
In the embodiment of the present invention, for the descriptions of steps 308 to 310, please refer to the detailed descriptions of steps 102 to 104 in the first embodiment, which is not described again in the embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, the steps 303 and 304 to 305 are two different cases of the step 302, and do not occur at the same time. The steps 306 to 307 and the steps 308 to 310 may be performed simultaneously, or the steps 306 to 307 may be performed first and then the steps 308 to 310 may be performed, or the steps 308 to 310 may be performed first and then the steps 306 to 307 may be performed, and the embodiment of the present invention is not particularly limited.
Similarly, for the third prompt message output in the step 307 and the ambient temperature value output in the step 310, the third prompt message and the ambient temperature value may be output at the same time, or the third prompt message is output first and then the ambient temperature value is output, or the ambient temperature value is output first and then the third prompt message is output, which is not limited in the embodiment of the present invention.
The embodiment of the invention provides a temperature detection method, which comprises the steps of firstly obtaining the reading values of each sensor in a constant temperature environment, comparing the difference value between every two adjacent sensors, and if the difference values are smaller than a certain value, indicating that the sensors are accurate, so that the sensitivity of the sensors and the influence of weak air flow in terminal equipment on a detected temperature value can be reduced, and the condition that the finally obtained environment temperature value is inaccurate is avoided. And comparing the temperature value difference between the two sensors closest to and farthest from the surface of the terminal equipment, so that the change of the current environment temperature can be determined, and the user can be directly reminded whether the current environment temperature is increased or decreased.
Example four
As shown in fig. 4, an embodiment of the present invention provides a terminal device, where the terminal device includes:
the obtaining module 401 is configured to obtain reading values of M sensors to obtain M first temperature values, where the M sensors are disposed inside the terminal device, and distances between different sensors and a surface of the terminal device are different, where M is an integer greater than or equal to 3.
The processing module 402 is configured to determine whether a direct proportional relationship or an inverse proportional relationship exists between the M first temperature values and the distances between the different sensors and the surface of the terminal device, and if the direct proportional relationship or the inverse proportional relationship exists, obtain a temperature parabolic curve by performing least square fitting according to the M first temperature values.
A determining module 403, configured to determine a vertex temperature value of the temperature parabolic curve as an ambient temperature value.
And an output module 404, configured to output the ambient temperature value.
Optionally, the determining module 403 is further configured to determine, if an inverse proportional relationship exists, that the temperature of the environment where the terminal device is located is increased, and if a direct proportional relationship exists, that the temperature of the environment where the terminal device is located is decreased.
Optionally, the output module 404 is further configured to output a first prompt message after determining that the temperature of the environment where the terminal device is located is increased, where the first prompt message is used to prompt the temperature of the environment where the terminal device is located to be increased.
The output module 404 is further configured to output a second prompt message after determining that the temperature of the environment where the terminal device is located is reduced, where the second prompt message is used to prompt that the temperature of the environment where the terminal device is located is reduced.
Optionally, the obtaining module 401 is further configured to obtain, in a constant temperature environment, the reading values of the M sensors to obtain M second temperature values.
The processing module 402 is further configured to calculate a temperature difference between two adjacent sensors according to the M second temperature values, so as to obtain M-1 first difference values.
The obtaining module 401 is further configured to obtain the reading values of the M sensors to obtain M first temperature values if the M-1 first difference values are all smaller than the first preset value.
The processing module 402 is further configured to calibrate the temperature values of all the sensors according to any one of second temperature values corresponding to a third difference value if a second difference value of the M-1 first difference values is greater than or equal to a first preset value, where the third difference value is any difference value other than the second difference value of the M-1 first difference values.
Optionally, the processing module 402 is further configured to calculate a fourth difference between the first target temperature value and the second target temperature value according to the M first temperature values, where the first target temperature value is a first temperature value detected by a sensor with a largest distance from the surface of the terminal device, and the second target temperature value is a first temperature value detected by a sensor with a smallest distance from the surface of the terminal device.
The output module 404 is further configured to output a third prompt message if the absolute value of the fourth difference is greater than the second preset value, where the third prompt message is used to prompt the user to increase or decrease the clothes.
In the embodiment of the present invention, each module may implement the temperature detection method provided in the above method embodiment, and may achieve the same technical effect, and for avoiding repetition, details are not described here.
As shown in fig. 5, an embodiment of the present invention further provides a terminal device, where the terminal device may include:
a memory 501 in which executable program code is stored;
a processor 502 coupled to a memory 501;
the processor 502 calls the executable program code stored in the memory 501 to execute the temperature detection method executed by the terminal device in the above embodiments of the methods.
The terminal device according to the embodiment of the present invention may be a Mobile phone, a tablet Computer, a notebook Computer, a palm Computer, a vehicle-mounted terminal device, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook, or a Personal Digital Assistant (PDA). The wearable device may be a smart watch, a smart bracelet, a telephone watch, a smart foot ring, a smart earring, a smart necklace, a smart headset, or the like, and the embodiment of the present invention is not limited.
As shown in fig. 6, an embodiment of the present invention further provides a terminal device, where the terminal device includes, but is not limited to: a Radio Frequency (RF) circuit 601, a memory 602, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a WiFi (wireless communication) module 607, a processor 608, a power supply 609, and a camera 610. Among other things, the radio frequency circuit 601 includes a receiver 6011 and a transmitter 6012. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 6 is not limiting of terminal devices and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The RF circuit 601 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 608; in addition, the data for designing uplink is transmitted to the base station. In general, the RF circuit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 601 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communication (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE), email, short Message Service (SMS), etc.
The memory 602 may be used to store software programs and modules, and the processor 608 executes various functional applications and data processing of the terminal device by operating the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal device, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 603 can be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the input unit 603 may include a touch panel 6031 and other input devices 6032. The touch panel 6031, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 6031 (e.g., operations of a user on or near the touch panel 6031 using any suitable object or accessory such as a finger, a stylus, etc.) and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 6031 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 608, and can receive and execute commands sent by the processor 608. In addition, the touch panel 6031 can be implemented by using various types of materials such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 603 can include other input devices 6032 in addition to the touch panel 6031. In particular, other input devices 6032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 604 may be used to display information input by the user or information provided to the user and various menus of the terminal device. The display unit 604 may include a display panel 6041, and optionally, the display panel 6041 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting diode (OLED), or the like. Further, the touch panel 6031 can cover the display panel 6041, and when the touch panel 6031 detects a touch operation on or near the touch panel 6031, the touch operation is transmitted to the processor 608 to determine a touch event, and then the processor 608 provides a corresponding visual output on the display panel 6041 according to the touch event. Although in fig. 6, the touch panel 6031 and the display panel 6041 are two separate components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 6031 and the display panel 6041 may be integrated to implement the input and output functions of the terminal device.
The terminal device may also include at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that can adjust the brightness of the display panel 6041 according to the brightness of ambient light, and a proximity sensor that can exit the display panel 6041 and/or backlight when the terminal device is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of the terminal device, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal device, detailed description is omitted here. In the embodiment of the present invention, the terminal device may include an acceleration sensor, a depth sensor, or a distance sensor.
The audio circuitry 606, speaker 6061, and microphone 6062 may provide an audio interface between the user and the terminal device. The audio circuit 606 may transmit the electrical signal converted from the received audio data to the speaker 6061, and convert the electrical signal into a sound signal for output by the speaker 6061; on the other hand, the microphone 6062 converts a collected sound signal into an electric signal, receives the electric signal by the audio circuit 606, converts the electric signal into audio data, processes the audio data by the audio data output processor 608, and sends the audio data to, for example, another terminal device via the RF circuit 601 or outputs the audio data to the memory 602 for further processing.
WiFi belongs to short distance wireless transmission technology, and the terminal device can help the user send and receive e-mail, browse web page and access streaming media etc. through WiFi module 607, it provides wireless broadband internet access for the user. Although fig. 6 shows the WiFi module 607, it is understood that it does not belong to the essential constitution of the terminal device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 608 is a control center of the terminal device, connects various parts of the entire terminal device by various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the terminal device. Alternatively, processor 608 may include one or more processing units; preferably, the processor 608 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The terminal device also includes a power supply 609 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 608 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption. Although not shown, the terminal device may further include a bluetooth module, etc., which will not be described herein.
In the embodiment of the present invention, the processor 608 is configured to obtain reading values of M sensors to obtain M first temperature values, where the M sensors are disposed inside the terminal device, and distances between different sensors and a surface of the terminal device are different, where M is an integer greater than or equal to 3;
judging whether a direct proportion relation or an inverse proportion relation exists between the M first temperature values and distances between different sensors and the surface of the terminal equipment;
if a direct proportion relation or an inverse proportion relation exists, fitting by adopting a least square method according to the M first temperature values to obtain a temperature parabolic curve;
determining a vertex temperature value of the temperature parabolic curve as an environment temperature value;
and outputting the ambient temperature value.
Optionally, the processor 608 may also be configured to implement other processes implemented by the terminal device in the foregoing method embodiments.
Embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute some or all of the steps of the method as in the above method embodiments.
Embodiments of the present invention also provide a computer program product, wherein when the computer program product runs on a computer, the computer is caused to execute part or all of the steps of the method as in the above method embodiments.
Embodiments of the present invention further provide an application publishing platform, where the application publishing platform is configured to publish a computer program product, where the computer program product, when running on a computer, causes the computer to perform some or all of the steps of the method in the above method embodiments.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are exemplary and alternative embodiments, and that the acts and modules illustrated are not required in order to practice the invention.
The terminal device provided by the embodiment of the present invention can implement each process shown in the above method embodiments, and is not described herein again to avoid repetition.
In various embodiments of the present invention, it should be understood that the sequence numbers of the above-mentioned processes do not imply an inevitable order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present invention, which essentially or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product, which is stored in a memory and includes several requests for causing a computer device (which may be a personal computer, a server, or a network device, etc., and may specifically be a processor in the computer device) to execute part or all of the steps of the above methods of the embodiments of the present invention.
It will be understood by those skilled in the art that all or part of the steps of the methods of the embodiments described above may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, including Read-Only Memory (ROM), random Access Memory (RAM), programmable Read-Only Memory (PROM), erasable Programmable Read-Only Memory (EPROM), one-time Programmable Read-Only Memory (OTPROM), electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM) or other Memory capable of storing data, a magnetic tape, or any other computer-readable medium capable of storing data.

Claims (12)

1. A method of detecting temperature, comprising:
acquiring reading values of M sensors to obtain M first temperature values, wherein the M sensors are arranged in the terminal equipment, and the distances between different sensors and the surface of the terminal equipment are different, wherein M is an integer greater than or equal to 3;
judging whether the M first temperature values and the distances between the different sensors and the surface of the terminal equipment have a direct proportion relation or an inverse proportion relation or not;
if a direct proportion relation or an inverse proportion relation exists, fitting by adopting a least square method according to the M first temperature values and the distances between the M sensors and the surface of the terminal equipment to obtain a temperature parabolic curve;
determining a vertex temperature value of the temperature parabolic curve as an environment temperature value;
and outputting the environment temperature value.
2. The method according to claim 1, wherein after determining whether the M first temperature values and the distances between the different sensors and the surface of the terminal device have a direct proportional relationship or an inverse proportional relationship, the method further comprises:
if the inverse proportion relation exists, determining that the temperature of the environment where the terminal equipment is located is increased;
and if the direct proportional relation exists, determining that the temperature of the environment where the terminal equipment is located is reduced.
3. The method of claim 2, wherein after determining that the temperature of the environment in which the terminal device is located is increased, the method further comprises:
outputting a first prompt message, wherein the first prompt message is used for prompting the temperature rise of the environment where the terminal equipment is located;
after determining that the temperature of the environment where the terminal device is located is reduced, the method further includes:
and outputting a second prompt message, wherein the second prompt message is used for prompting the temperature reduction of the environment where the terminal equipment is located.
4. The method of claim 1, wherein before obtaining the readings of the M sensors to obtain the M first temperature values, further comprising:
in a constant temperature environment, obtaining the reading values of the M sensors to obtain M second temperature values;
according to the M second temperature values, calculating the temperature difference value of two adjacent sensors to obtain M-1 first difference values;
the acquiring the reading values of the M sensors to obtain M first temperature values includes:
if the M-1 first difference values are all smaller than a first preset value, reading values of the M sensors are obtained to obtain M first temperature values;
alternatively, the first and second liquid crystal display panels may be,
if a second difference value of the M-1 first difference values is larger than or equal to a first preset value, calibrating the temperature values of all the sensors according to any second temperature value corresponding to a third difference value, wherein the third difference value is any difference value of the M-1 first difference values except the second difference value.
5. The method of claim 1, wherein obtaining the readings of the M sensors to obtain the M first temperature values further comprises:
calculating a fourth difference value between a first target temperature value and a second target temperature value according to the M first temperature values, wherein the first target temperature value is a first temperature value detected by a sensor with the largest distance to the surface of the terminal equipment, and the second target temperature value is a first temperature value detected by a sensor with the smallest distance to the surface of the terminal equipment;
and if the absolute value of the fourth difference is greater than the second preset value, outputting third prompt information, wherein the third prompt information is used for prompting a user to increase or decrease clothes.
6. A terminal device, comprising:
the acquisition module is used for acquiring the reading values of M sensors to obtain M first temperature values, the M sensors are arranged in the terminal equipment, the distances between different sensors and the surface of the terminal equipment are different, and M is an integer greater than or equal to 3;
the processing module is used for judging whether a direct proportion relation or an inverse proportion relation exists between the M first temperature values and the distances between the different sensors and the surface of the terminal equipment, and for obtaining a temperature parabolic curve by adopting least square fitting according to the M first temperature values and the distances between the M sensors and the surface of the terminal equipment if the direct proportion relation or the inverse proportion relation exists;
the determining module is used for determining the vertex temperature value of the temperature parabolic curve as an environment temperature value;
and the output module is used for outputting the environment temperature value.
7. The terminal device of claim 6,
the determining module is further configured to determine that the temperature of the environment where the terminal device is located is increased if the inverse proportional relationship exists, and determine that the temperature of the environment where the terminal device is located is decreased if the direct proportional relationship exists.
8. The terminal device of claim 7,
the output module is further configured to output a first prompt message after determining that the temperature of the environment where the terminal device is located is increased, where the first prompt message is used to prompt the temperature increase of the environment where the terminal device is located;
the output module is further configured to output a second prompt message after determining that the temperature of the environment where the terminal device is located is reduced, where the second prompt message is used to prompt the temperature of the environment where the terminal device is located to be reduced.
9. The terminal device of claim 6,
the acquisition module is further used for acquiring the reading values of the M sensors in a constant temperature environment to obtain M second temperature values;
the processing module is further configured to calculate a temperature difference value between two adjacent sensors according to the M second temperature values to obtain M-1 first difference values;
the acquisition module is further configured to acquire the reading values of the M sensors to obtain M first temperature values if the M-1 first difference values are all smaller than a first preset value;
the processing module is further configured to calibrate the temperature values of all the sensors according to any one of second temperature values corresponding to a third difference value if a second difference value of the M-1 first difference values is greater than or equal to a first preset value, where the third difference value is any one of the M-1 first difference values except the second difference value.
10. The terminal device of claim 6,
the processing module is further configured to calculate a fourth difference between a first target temperature value and a second target temperature value according to the M first temperature values, where the first target temperature value is a first temperature value detected by a sensor with a largest distance from the surface of the terminal device, and the second target temperature value is a first temperature value detected by a sensor with a smallest distance from the surface of the terminal device;
the output module is further configured to output third prompt information if the absolute value of the fourth difference is greater than a second preset value, where the third prompt information is used to prompt a user to increase or decrease clothes.
11. A computer-readable storage medium, comprising: the computer readable storage medium has stored thereon computer instructions which, when executed by a processor, implement the temperature detection method of any one of claims 1 to 5.
12. A computer program product, comprising: the computer program product comprising computer instructions which, when run on a processor, cause the processor to execute the computer instructions to implement the temperature detection method of any one of claims 1 to 5.
CN202011046068.5A 2020-09-28 2020-09-28 Temperature detection method and terminal equipment Active CN112414587B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011046068.5A CN112414587B (en) 2020-09-28 2020-09-28 Temperature detection method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011046068.5A CN112414587B (en) 2020-09-28 2020-09-28 Temperature detection method and terminal equipment

Publications (2)

Publication Number Publication Date
CN112414587A CN112414587A (en) 2021-02-26
CN112414587B true CN112414587B (en) 2023-01-24

Family

ID=74855326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011046068.5A Active CN112414587B (en) 2020-09-28 2020-09-28 Temperature detection method and terminal equipment

Country Status (1)

Country Link
CN (1) CN112414587B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113866536A (en) * 2021-09-07 2021-12-31 深圳Tcl数字技术有限公司 Temperature rise detection method and device and temperature rise detection system
CN113867460B (en) * 2021-11-10 2022-05-17 成都捷豹恒昌电气有限公司 Temperature and humidity monitoring and treatment method and system for transformer substation
CN117249921B (en) * 2023-11-15 2024-04-05 宁德时代新能源科技股份有限公司 Abnormality identification method for temperature sampling, related device, vehicle and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ITMI20050772A1 (en) * 2005-04-29 2006-10-30 Tecnimed Srl EQUIPMENT FOR TEMPERATURE MEASUREMENT IN PARTICULAR OF A PATIENT
US7556423B2 (en) * 2007-01-08 2009-07-07 Microchip Technology Incorporated Temperature sensor bow compensation
DE102009030206A1 (en) * 2009-06-22 2010-12-30 Beru Ag Method for determining the exhaust gas temperature of a vehicle engine
CN108155592A (en) * 2018-02-05 2018-06-12 杭州小橙工业设计有限公司 A kind of substation of remote monitoring
CN110501094A (en) * 2019-09-05 2019-11-26 珠海格力电器股份有限公司 Fault detection calibration method, air conditioner and the computer readable storage medium of electric appliance temperature sensor
CN111562023B (en) * 2020-05-22 2021-10-08 上海红檀智能科技有限公司 Device and method for comprehensively monitoring and early warning equipment temperature in wind power plant box transformer substation cabin

Also Published As

Publication number Publication date
CN112414587A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN112414587B (en) Temperature detection method and terminal equipment
CN108834068B (en) Positioning method based on wearable device and wearable device
KR102280610B1 (en) Method and apparatus for location estimation of electronic device
JP7303900B2 (en) Parameter acquisition method and terminal equipment
CN108174044B (en) Alarm clock setting method and mobile terminal
US20170097816A1 (en) Context-based applications for mobile devices
CN112312308B (en) Indoor positioning method and terminal equipment
CN110764644B (en) Electronic device and pressure compensation method
CN109343693B (en) Brightness adjusting method and terminal equipment
KR20170105827A (en) Location determining method and device
CN107608855A (en) Based reminding method and mobile terminal
CN112415554A (en) Positioning method and device, electronic equipment and computer readable storage medium
CN109141355B (en) Relative height measuring method based on multiple sensors and wearable equipment
CN107613139B (en) Schedule reminding method and mobile terminal
CN112414370B (en) Building floor positioning method, electronic device and computer storage medium
CN109813300B (en) Positioning method and terminal equipment
CN111221602A (en) Interface display method and electronic equipment
WO2019061276A1 (en) Signal quality alert method, terminal and server
CN108429856A (en) A kind of location information acquisition methods and mobile terminal
KR102498362B1 (en) Method for calculating location information and an electronic device thereof
CN111366170B (en) State determination method and electronic equipment
CN112128925B (en) Method for intelligently remotely controlling air conditioner, intelligent terminal and storage medium
CN112286286A (en) Standby control method, wearable device and computer-readable storage medium
CN109041212B (en) Positioning method and wearable device
CN111309392A (en) Equipment control method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant