A temperature detection method, device, equipment and storage medium

Through the main control chip, the temperature data is integrated and averaged, which solves the problem of poor battery life in long-term human temperature monitoring, and achieves lower power consumption and longer time temperature detection.

CN119212056BActive Publication Date: 2025-05-06SHANGHAI NIOLO INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411687961.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-05-06
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

Traditional thermometers have poor battery life in long-term human temperature monitoring, which is difficult to meet the needs of health monitoring or early warning.

Method used

The temperature data is integrated through the main control chip, the average value of the temperature data is calculated as the target temperature, and shortened to one byte to send it to the terminal, reducing information interaction and power consumption.

Benefits of technology

It reduces the power consumption of the temperature detection system, improves battery life, and realizes long-term temperature detection and health management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119212056B_ABST
    Figure CN119212056B_ABST
Patent Text Reader

Abstract

The present application discloses a temperature detection method, device, equipment and storage medium, and relates to the field of temperature detection technology. The method comprises: in normal mode, the main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data and the second byte of the fourth temperature data from the temperature sensor; the first byte of the first temperature data is used as the decimal part of the first data, the second byte of the second temperature data is used as the integer part of the first data, the first byte of the third temperature data is used as the decimal part of the second data, the second byte of the fourth temperature data is used as the integer part of the second data, the second data is obtained, and then the average value of the first data and the second data is calculated, and the average value is used as the target temperature; the main control chip shortens the target temperature to one byte and sends it to the terminal. The method can reduce power consumption and extend the use time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of temperature detection technology, and in particular to a temperature detection method, device, equipment and storage medium. Background Art

[0002] In the field of temperature detection technology, temperature detection plays an important role in body temperature monitoring. When measuring temperature, traditional thermometers need to measure for a period of time to obtain data, and this measurement method has many limitations, such as being difficult to use outdoors, and only being able to measure temperature for a short period of time, making it difficult to track changes in human body temperature. These problems make it difficult for traditional thermometers to achieve long-term human body temperature monitoring to meet health monitoring or early warning needs.

[0003] Therefore, the temperature detection system based on Bluetooth is widely used because of its advantages of wireless transmission and can be used without restrictions on locations. However, when conducting long-term human body temperature monitoring, due to the portability and miniaturization of the temperature detection system, such Bluetooth devices are limited by power consumption and battery, and have poor endurance. Summary of the invention

[0004] The present application provides a temperature detection method, device, equipment and storage medium, which can reduce power consumption and extend the use time.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, the present application provides a temperature detection method, the method comprising:

[0007] The main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data and the second byte of the fourth temperature data from the temperature sensor, wherein the first byte is the decimal part of the temperature data and the second byte is the integer part of the temperature data;

[0008] The main control chip integrates the first byte of the first temperature data and the second byte of the second temperature data to obtain first data, and integrates the first byte of the third temperature data and the second byte of the fourth temperature data to obtain second data, wherein the integer part of the first data is the second byte of the second temperature data, the decimal part of the first data is the first byte of the first temperature data, the integer part of the second data is the second byte of the fourth temperature data, and the decimal part of the second data is the first byte of the third temperature data;

[0009] The main control chip calculates an average value of the first data and the second data, and uses the average value as the target temperature;

[0010] The main control chip sends the target temperature to the terminal.

[0011] In some possible implementations, the main control chip sends the target temperature to the terminal, including:

[0012] If the integer part data of the target temperature is equal to the integer part data of the standard temperature, the 7th bit position of the first transmitted data is filled with 0, and the data from the 7th bit position to the 1st bit position of the first byte of the target temperature is filled into the 6th bit position to the 0th bit position of the first transmitted data, so as to obtain the first transmitted data with a data length of 1 byte;

[0013] The main control chip sends the first transmission data to the terminal.

[0014] In some possible implementations, the main control chip sends the target temperature to the terminal, including:

[0015] If the integer part data of the target temperature is less than the integer part data of the standard temperature, fill the 7th bit position of the first transmitted data with 1, and fill the data from the 7th bit position to the 1st bit position of the first byte of the target temperature to the 6th bit position to the 0th bit position of the first transmitted data, to obtain the first transmitted data with a data length of 1 byte;

[0016] The main control chip sends the first transmission data to the terminal.

[0017] In some possible implementations, the calculation formula for the first sent data is as follows:

[0018]

[0019] Among them, W is the temperature value received by the terminal, bit7 is the first bit value of the first transmitted data, Wst is the integer value of the standard temperature, and Wtmp is the decimal part value of the first transmitted data, and the decimal part value is the value discarded at the 0th bit position.

[0020] In some possible implementations, the method further includes:

[0021] The main control chip calculates the absolute value of the difference between the target temperature and the standard temperature, which is recorded as a first difference. When the human body temperature is in a first temperature range, if the first difference is greater than or equal to the temperature threshold for two consecutive times during the measurement process, the data collection from the temperature sensor is switched from once every 2 seconds to once every 500 milliseconds.

[0022] When the human body temperature is not in the first temperature range, if the first difference is less than the temperature threshold for 10 consecutive times during the measurement process, the data collection from the temperature sensor once every 500 milliseconds is switched to collecting data from the temperature sensor once every 2 seconds; the temperature threshold is 1°C.

[0023] In some possible implementations, the method further includes:

[0024] The main control chip calculates the variance between the target temperature and the average value of three consecutive target temperatures, which is recorded as the second variance. When the human body temperature is in the first temperature interval, if the second variance is greater than the fluctuation threshold during the measurement process, the fluctuation count is increased by 1, if the second variance is less than or equal to the fluctuation threshold during the measurement process, the fluctuation count is increased by 0, and if the fluctuation count is greater than or equal to 3, the data is collected from the temperature sensor once every 2 seconds and switched to collecting data from the temperature sensor once every 500 milliseconds; when the human body temperature is not in the first temperature interval, if the second variance is less than or equal to the fluctuation threshold during the measurement process, the fluctuation count is increased by 1, if the second variance is greater than the fluctuation threshold during the measurement process, the fluctuation count is increased by 0, and if the fluctuation count is less than or equal to 10, the data is collected from the temperature sensor once every 500 milliseconds and switched to collecting data from the temperature sensor once every 2 seconds.

[0025] In a second aspect, the present application provides a temperature detection device, the device comprising:

[0026] an acquisition module, used to acquire a first byte of first temperature data, a second byte of second temperature data, a first byte of third temperature data, and a second byte of fourth temperature data from a temperature sensor, wherein the first byte is a decimal part of the temperature data, and the second byte is an integer part of the temperature data;

[0027] an integration module, configured to integrate the first byte of the first temperature data and the second byte of the second temperature data to obtain first data, and integrate the first byte of the third temperature data and the second byte of the fourth temperature data to obtain second data, wherein the integer part of the first data is the second byte of the second temperature data, the decimal part of the first data is the first byte of the first temperature data, the integer part of the second data is the second byte of the fourth temperature data, and the decimal part of the second data is the first byte of the third temperature data;

[0028] a calculation module, configured to calculate an average value of the first data and the second data, and use the average value as a target temperature;

[0029] The sending module is used to send the target temperature to the terminal.

[0030] In a third aspect, the present application provides a computing device, including a memory and a processor;

[0031] One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first aspects.

[0032] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method as described in any one of the first aspects.

[0033] It can be seen from the above technical solution that the present application has at least the following beneficial effects:

[0034] In the present application, in normal mode, the main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data and the second byte of the fourth temperature data from the temperature sensor; the first byte of the first temperature data is used as the decimal part of the first data, the second byte of the second temperature data is used as the integer part of the first data, the first data is obtained, the first byte of the third temperature data is used as the decimal part of the second data, the second byte of the fourth temperature data is used as the integer part of the second data, the second data is obtained, and then the average value of the first data and the second data is calculated, and the average value is used as the target temperature; the main control chip shortens the target temperature to one byte and sends it to the terminal. In the prior art, when measuring the human body temperature normally, the main control chip obtains the temperature data from the temperature sensor and transmits all the temperature data to the terminal, but due to the portability and miniaturization constraints of the temperature detection system, the temperature detection system cannot perform temperature detection for a long time, and the battery life is poor. It can be seen that in the present application, the temperature data is integrated by the main control chip, the information interaction between the temperature sensor, the main control chip and the terminal is reduced, the power consumption is reduced, and the battery life is improved.

[0035] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of a temperature detection system provided in an embodiment of the present application;

[0037] Figure 2 A flow chart of a temperature detection method provided in an embodiment of the present application;

[0038] Figure 3 A schematic diagram of data integration provided in an embodiment of the present application;

[0039] Figure 4 A schematic diagram of generating first transmission data provided by an embodiment of the present application;

[0040] Figure 5 A schematic diagram of a temperature detection device provided in an embodiment of the present application;

[0041] Figure 6 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The terms "first", "second", "third", etc. in the specification of this application and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.

[0043] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0044] Currently, when measuring human body temperature normally, the main control chip obtains temperature data from the temperature sensor and transmits all the temperature data to the terminal. However, due to the portability and miniaturization constraints of the temperature detection system, the temperature detection system cannot perform temperature detection for a long time and has poor battery life.

[0045] In view of this, an embodiment of the present application provides a temperature detection method, in which, in normal mode, the main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data, and the second byte of the fourth temperature data from the temperature sensor; the first byte of the first temperature data is used as the decimal part of the first data, and the second byte of the second temperature data is used as the integer part of the first data to obtain the first data, the first byte of the third temperature data is used as the decimal part of the second data, and the second byte of the fourth temperature data is used as the integer part of the second data to obtain the second data, and then the average value of the first data and the second data is calculated, and the average value is used as the target temperature; the main control chip shortens the target temperature to one byte and sends it to the terminal. It can be seen that in this application, the temperature data is integrated by the main control chip, the information interaction between the temperature sensor, the main control chip and the terminal is reduced, the power consumption is reduced, and the battery life is improved.

[0046] In the embodiment of the present application, the temperature detection method is implemented based on a temperature detection system. Figure 1 As shown, the figure is a schematic diagram of a temperature detection system provided in an embodiment of the present application, wherein the temperature detection system includes a hardware system 101 and a terminal 102, the hardware system 101 includes a temperature sensor 103, a power management module 104 and a main control chip 105, and the terminal 102 includes but is not limited to a smart phone, a tablet computer, a laptop computer, a personal digital assistant or a smart wearable device, etc. In the embodiment of the present application, the terminal 102 is an APP in the smart wearable device.

[0047] As can be seen in the figure, the power management module 104 supplies power to the temperature sensor 103 and the main control chip 105, the main control chip 105 sends instructions to the temperature sensor 103, the temperature sensor 103 transmits the temperature data to the main control chip 105, the hardware system 101 and the terminal 102 are connected via Bluetooth, the hardware system 101 sends the temperature data to the terminal 102 via Bluetooth, the terminal 102 has a temperature display module 106, a scene setting module 107, a health monitoring module 108 and a standard temperature calibration module 109, the temperature display module 106 is used to display the temperature data obtained from the hardware system, which is convenient for users to observe; the user uses the scene setting module 107 to set the temperature according to the actual situation The scene working mode includes normal mode, exercise mode and rest mode. In normal mode, the human body temperature is lower than 37.0°C; the health monitoring module 108 is used to observe the user's body temperature in real time. If an abnormal situation occurs, the health monitoring module 108 will switch the current mode from the current scene working mode to the early warning mode. In the early warning mode, the human body temperature is higher than 37.0°C. If it returns to normal, it will switch from the early warning mode to the scene working mode; the standard temperature calibration module 109 is used to calculate the normal temperature of the user when the user uses the temperature detection system for the first time, and set the normal temperature as the standard temperature for subsequent detection of the user's body temperature.

[0048] In order to make the technical solution of the present application clearer and easier to understand, a temperature detection method provided by an embodiment of the present application is introduced below in conjunction with a flow chart. Figure 2 As shown, this figure is a flow chart of a temperature detection method provided in an embodiment of the present application.

[0049] In the embodiment of the present application, the temperature detection method in S205 to S208 is performed in the scene working mode, and the temperature detection method includes:

[0050] S201. In the initial state, the main control chip is in normal mode.

[0051] S202: The main control chip determines whether the terminal is set in a standard temperature calibration mode.

[0052] The standard temperature of each user under normal conditions is different. Therefore, when the user uses the temperature detection system, after the hardware system is powered on, the main control chip is in normal mode in the initial state, the hardware system is connected to the terminal, and the hardware system determines whether the terminal is set in the standard temperature calibration mode.

[0053] If the terminal is set in the standard temperature calibration mode, execute S203;

[0054] If the terminal is not set in the standard temperature calibration mode, execute S204.

[0055] S203, the main control chip reads the temperature data on the temperature sensor at intervals of 500 milliseconds, and calculates the standard temperature.

[0056] When the standard temperature calibration function is used, the power management module in the hardware system supplies power to the main control chip and the temperature sensor, and the main control chip enters the normal working mode. The main control chip reads the temperature data of the temperature sensor at intervals of 500 milliseconds. After measuring for 10 seconds, the main control chip will take the average value of the 20 sampling data and then send it to the terminal. The terminal uses the average value as the standard temperature and then ends the standard temperature calibration function. After the above operation is completed, S204 is executed.

[0057] S204: The terminal selects a scene working mode, stores the standard temperature value, temperature threshold and fluctuation threshold, and sends them to the main control chip.

[0058] The embodiments of the present application can be applied to multiple scenarios. The human body may be in a variety of scenarios, such as indoor scenarios, outdoor scenarios, sports scenarios, and rest scenarios. In different scenarios, the temperature threshold range of the human body is also different. For example, during strenuous exercise, the temperature of the human body may be higher than the temperature of the general scenario. At this time, it is necessary to appropriately enlarge the temperature threshold range. In the sleeping state, the temperature needs to be more strictly controlled to prevent the risk of catching a cold or overheating. At this time, it is necessary to appropriately narrow the temperature threshold range. In addition, depending on the measurement location, the standard temperature will also be different, and even the standard body temperature of different individuals will be different. Therefore, the present application uses the terminal to set the scene. According to different scenarios and measurement locations, the terminal will set the corresponding standard temperature and temperature threshold for the main control chip, and the health monitoring module of the terminal will monitor according to the set standard temperature and temperature threshold.

[0059] In an embodiment of the present application, the terminal can select a scene working mode from normal mode, sports mode and rest mode according to the current working state, and load the standard temperature value calculated above, and set the temperature threshold value to 1°C in any scene working mode, the fluctuation threshold value to 0.5 in normal mode, 1 in sports mode, and 0.25 in rest mode; the terminal sends the standard temperature value, temperature threshold and fluctuation threshold value to the main control chip.

[0060] S205. The main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data, and the second byte of the fourth temperature data from the temperature sensor.

[0061] Generally, temperature data consists of 2 bytes. When the temperature sensor transmits a temperature data to the main control chip, the decimal part of the temperature data, i.e., the first byte, is transmitted for the first time, and the integer part of the temperature data, i.e., the second byte, is transmitted for the second time. The temperature data is transmitted to the main control chip by transmitting twice. In normal mode, the human body temperature is lower than 37.0°C, and the time interval between each transmission is 2 seconds. If it is switched to the early warning mode, the human body temperature is higher than 37.0°C, and the data transmission method in S205~S208 is no longer executed.

[0062] In an embodiment of the present application, the main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data, and the second byte of the fourth temperature data from the temperature sensor at intervals of 2 seconds, where the first byte is the decimal part of the temperature data and the second byte is the integer part of the temperature data.

[0063] The temperature sensor only needs to transmit 1 byte of temperature data to the main control chip. This can reduce the information interaction between the temperature sensor and the main control chip, reduce transmission time, reduce the power consumption of the hardware system, and improve battery life.

[0064] S206. The main control chip integrates the first byte of the first temperature data and the second byte of the second temperature data to obtain first data, and integrates the first byte of the third temperature data and the second byte of the fourth temperature data to obtain second data.

[0065] The main control chip reads temperature data from the temperature sensor four times, integrates the first byte of the first temperature data and the second byte of the second temperature data to obtain the first data, and integrates the first byte of the third temperature data and the second byte of the fourth temperature data to obtain the second data. The integration method is to interpolate by using the adjacent frame replacement method, such as Figure 3 As shown, this figure is a schematic diagram of data integration provided in an embodiment of the present application.

[0066] As can be seen in the figure, the main control chip fills the second byte 1 of the second temperature data at the position of the second byte of the first temperature data, fills the first byte 1 of the first temperature data at the position of the first byte of the second temperature data, fills the second byte 2 of the fourth temperature data at the position of the second byte of the third temperature data, and fills the first byte 2 of the third temperature data at the position of the first byte of the fourth temperature data, to obtain the first data and the second data.

[0067] Among them, the integer part of the first data is the second byte 1 of the second temperature data, and the decimal part of the first data is the first byte 1 of the first temperature data; the integer part of the second data is the second byte 2 of the fourth temperature data, and the decimal part of the second data is the first byte 2 of the third temperature data.

[0068] S207: The main control chip calculates an average value of the first data and the second data, and uses the average value as the target temperature.

[0069] Because under normal circumstances, the temperature fluctuation range of the human body tends to normal temperature for the most part, therefore calculating the average value of the first data and the second data as the target temperature can reduce the number of times the main control chip sends data to the terminal and reduce power consumption.

[0070] S208. The main control chip sends the target temperature to the terminal.

[0071] In the embodiment of the present application, the main control chip converts the target temperature, shortens the original 2 bytes to 1 byte, and then sends it to the terminal. This can reduce the information interaction between the main control chip and the terminal, reduce the transmission time, reduce the power consumption of the terminal, and improve the battery life.

[0072] The method for converting the target temperature in the embodiment of the present application is as follows:

[0073] like Figure 4 As shown, the figure is a schematic diagram of generating the first transmission data provided by an embodiment of the present application. In the figure, it can be seen that if the integer part data of the target temperature 401 is equal to the integer part data of the standard temperature, the 7th bit position of the first transmission data 402 is filled with 0, and the data from the 7th bit position to the 1st bit position of the first byte of the target temperature 401 is filled into the 6th bit position to the 0th bit position of the first transmission data 402, and the first transmission data 402 with a data length of 1 byte is obtained; the main control chip sends the obtained first transmission data 402 to the terminal.

[0074] The terminal obtains the value of the first sent data 402 by the following calculation formula:

[0075]

[0076] Among them, W is the temperature value received by the terminal, bit7 is the first bit value of the first transmitted data, Wst is the integer value of the standard temperature, and Wtmp is the decimal part value of the first transmitted data, and the decimal part value is the value discarded at the 0th bit position.

[0077] If the integer part data of the target temperature 401 is smaller than the integer part data of the standard temperature, the 7th bit position of the first transmitted data 402 is filled with 1, and the data from the 7th bit position to the 1st bit position of the first byte of the target temperature 401 is filled into the 6th bit position to the 0th bit position of the first transmitted data 402, and the first transmitted data 402 with a data length of 1 byte is obtained; the main control chip sends the obtained first transmitted data 402 to the terminal.

[0078] S209. The main control chip calculates the variance of the temperature data and sets the requirements for switching between the normal mode and the warning mode.

[0079] The main control chip calculates the absolute value of the difference between the target temperature and the standard temperature, which is recorded as the first difference. The calculation formula is as follows:

[0080]

[0081] in, is the first difference, is the target temperature value, is the value of standard temperature.

[0082] In normal mode, if there are two consecutive first differences during the measurement process If the temperature is greater than or equal to the temperature threshold, the normal mode is switched to the warning mode.

[0083] In the early warning mode, if there are 10 consecutive first difference values ​​during the measurement process If the temperature is lower than the threshold, the warning mode switches to the normal mode. The temperature threshold is 1°C in both the normal mode and the warning mode.

[0084] The main control chip calculates the variance between the target temperature and the average of three consecutive target temperatures, which is recorded as the second variance. The calculation formula is as follows:

[0085]

[0086] in, is the second variance, is the value of the i-th target temperature, It is the average value of N target temperatures during continuous measurement, where N is the number of target temperature measurements.

[0087] In normal mode, if there is a second variance during the measurement If the fluctuation count is greater than the fluctuation threshold, then the fluctuation count is increased by 1. If there is a second variance during the measurement process If the fluctuation count is less than or equal to the fluctuation threshold, the fluctuation count is increased by 0. If the fluctuation count is greater than or equal to 3, the normal mode is switched to the warning mode.

[0088] In the early warning mode, if there is a second variance during the measurement If the fluctuation count is less than or equal to the fluctuation threshold, the fluctuation count is increased by 1. If there is a second variance during the measurement process If the fluctuation count is greater than the fluctuation threshold, the fluctuation count is increased by 0. If the fluctuation count is less than or equal to 10, the warning mode is switched to the normal mode. The fluctuation threshold is 0.5°C in the normal mode and the warning mode, 1°C in the exercise mode, and 0.25°C in the rest mode.

[0089] The normal mode is when the human body temperature is in the first temperature range, and the warning mode is when the human body temperature is not in the first temperature range. In the embodiment of the present application, the standard temperature is set to 36.5°C and the temperature threshold is 1°C. Because the first difference is an absolute value, the first temperature range is the range of plus or minus 1 of the integer part of the standard temperature. Therefore, the first temperature range is [35.0°C, 37.0°C).

[0090] Normal mode means that the human body temperature is at a relatively normal level in the current scenario, and early warning mode means that the human body temperature may be at an abnormal level in the current scenario. In practical applications, in most cases, the human body temperature is relatively normal, because the lower power consumption of the normal mode can significantly reduce power consumption. When an abnormal temperature is detected, in order to prevent misjudgment, it is necessary to enter the early warning mode. Although it will increase power consumption, it will perform more detailed temperature detection. If the early warning mode is entered for a period of time, the APP will issue a warning in the health detection module. Therefore, through the method of dynamic power consumption adjustment, the system can achieve lower power consumption while meeting the temperature detection requirements, and long-term temperature detection and health management can also be achieved in miniaturized devices.

[0091] Based on the above content, in normal mode, the main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data, and the second byte of the fourth temperature data from the temperature sensor; the first byte of the first temperature data is used as the decimal part of the first data, and the second byte of the second temperature data is used as the integer part of the first data to obtain the first data, and the first byte of the third temperature data is used as the decimal part of the second data, and the second byte of the fourth temperature data is used as the integer part of the second data to obtain the second data, and then the average value of the first data and the second data is calculated, and the average value is used as the target temperature; the main control chip shortens the target temperature to one byte and sends it to the terminal. It can be seen that in this application, the temperature data is integrated by the main control chip, the information interaction between the temperature sensor, the main control chip and the terminal is reduced, the power consumption is reduced, and the battery life is improved.

[0092] The present application also provides a temperature detection device. Figure 5 As shown, this figure is a schematic diagram of a temperature detection device provided in an embodiment of the present application. As can be seen in the figure, the device includes an acquisition module 501, an integration module 502, a calculation module 503 and a sending module 504;

[0093] An acquisition module 501 is used to acquire a first byte of first temperature data, a second byte of second temperature data, a first byte of third temperature data, and a second byte of fourth temperature data from a temperature sensor, wherein the first byte is a decimal part of the temperature data, and the second byte is an integer part of the temperature data;

[0094] An integration module 502 is used to integrate the first byte of the first temperature data and the second byte of the second temperature data to obtain first data, and integrate the first byte of the third temperature data and the second byte of the fourth temperature data to obtain second data, wherein the integer part of the first data is the second byte of the second temperature data, the decimal part of the first data is the first byte of the first temperature data, the integer part of the second data is the second byte of the fourth temperature data, and the decimal part of the second data is the first byte of the third temperature data;

[0095] A calculation module 503, configured to calculate an average value of the first data and the second data, and use the average value as a target temperature;

[0096] The sending module 504 is used to send the target temperature to the terminal.

[0097] In some possible implementations, the sending module 504 is specifically used for the main control chip to send the target temperature to the terminal, including:

[0098] If the integer part data of the target temperature is equal to the integer part data of the standard temperature, the 7th bit position of the first transmitted data is filled with 0, and the data from the 7th bit position to the 1st bit position of the first byte of the target temperature is filled into the 6th bit position to the 0th bit position of the first transmitted data, so as to obtain the first transmitted data with a data length of 1 byte;

[0099] The first transmission data is transmitted to the terminal.

[0100] In some possible implementations, the sending module 504 is specifically used for the main control chip to send the target temperature to the terminal, including:

[0101] If the integer part data of the target temperature is less than the integer part data of the standard temperature, fill the 7th bit position of the first transmitted data with 1, and fill the data from the 7th bit position to the 1st bit position of the first byte of the target temperature to the 6th bit position to the 0th bit position of the first transmitted data, to obtain the first transmitted data with a data length of 1 byte;

[0102] The first transmission data is transmitted to the terminal.

[0103] In some possible implementations, the calculation formula for the first sent data is as follows:

[0104]

[0105] Among them, W is the temperature value received by the terminal, bit7 is the first bit value of the first transmitted data, Wst is the integer value of the standard temperature, and Wtmp is the decimal part value of the first transmitted data, and the decimal part value is the value discarded at the 0th bit position.

[0106] In some possible implementations, the calculation module 503 is specifically used for the main control chip to calculate the absolute value of the difference between the target temperature and the standard temperature, which is recorded as a first difference. When the human body temperature is in the first temperature range, if there are two consecutive times during the measurement process that the first difference is greater than or equal to the temperature threshold, the data is collected from the temperature sensor once every 2 seconds, and then the data is collected from the temperature sensor once every 500 milliseconds.

[0107] When the human body temperature is not in the first temperature range, if the first difference is less than the temperature threshold for 10 consecutive times during the measurement process, the data collection from the temperature sensor once every 500 milliseconds is switched to collecting data from the temperature sensor once every 2 seconds; the temperature threshold is 1°C.

[0108] In some possible implementations, the calculation module 503 is specifically used for the main control chip to calculate the variance between the target temperature and the average of three consecutive target temperatures, which is recorded as the second variance. When the human body temperature is in the first temperature interval, if the second variance is greater than the fluctuation threshold during the measurement process, the fluctuation count is increased by 1, if the second variance is less than or equal to the fluctuation threshold during the measurement process, the fluctuation count is increased by 0, and if the fluctuation count is greater than or equal to 3, the data is collected from the temperature sensor once every 2 seconds and switched to collecting data from the temperature sensor once every 500 milliseconds; when the human body temperature is not in the first temperature interval, if the second variance is less than or equal to the fluctuation threshold during the measurement process, the fluctuation count is increased by 1, if the second variance is greater than the fluctuation threshold during the measurement process, the fluctuation count is increased by 0, and if the fluctuation count is less than or equal to 10, the data is collected from the temperature sensor once every 500 milliseconds and switched to collecting data from the temperature sensor once every 2 seconds.

[0109] The present application also provides a computing device. Figure 6 As shown, this figure is a schematic diagram of a computing device provided in an embodiment of the present application, and the computing device 600 includes a bus 601, a processor 602, a communication interface 603 and a memory 604. The processor 602, the memory 604 and the communication interface 603 communicate with each other through the bus 601.

[0110] The bus 601 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0111] The processor 602 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0112] The communication interface 603 is used for external communication. For example, when the computing device is a first switch, the communication interface 603 can be used for the first switch to communicate with the first user terminal, or for the first switch to communicate with the second switch.

[0113] The memory 604 may include a volatile memory, such as a random access memory (RAM). The memory 604 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0114] The memory 604 stores executable codes, and the processor 602 executes the executable codes to perform the aforementioned temperature detection method.

[0115] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned temperature detection method.

[0116] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.

[0117] The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0118] When the computer program product is executed by a computer, the computer executes any of the aforementioned temperature detection methods. The computer program product may be a software installation package, and when any of the aforementioned temperature detection methods is required, the computer program product may be downloaded and executed on a computer.

[0119] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0120] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. A temperature detection method, characterized in that: The method comprises: The main control chip obtains the first byte of the first temperature data, the second byte of the second temperature data, the first byte of the third temperature data, and the second byte of the fourth temperature data from the temperature sensor according to the transmission time interval, wherein the first byte is the decimal part of the temperature data, and the second byte is the integer part of the temperature data; The main control chip integrates the first byte of the first temperature data and the second byte of the second temperature data to obtain first data, and integrates the first byte of the third temperature data and the second byte of the fourth temperature data to obtain second data, wherein the integer part of the first data is the second byte of the second temperature data, the decimal part of the first data is the first byte of the first temperature data, the integer part of the second data is the second byte of the fourth temperature data, and the decimal part of the second data is the first byte of the third temperature data; The main control chip calculates an average value of the first data and the second data, and uses the average value as the target temperature; The main control chip sends the target temperature to the terminal, and the main control chip sends the target temperature to the terminal, including: If the integer part data of the target temperature is equal to the integer part data of the standard temperature, the 7th bit position of the first transmitted data is filled with 0, and the data from the 7th bit position to the 1st bit position of the first byte of the target temperature is filled into the 6th bit position to the 0th bit position of the first transmitted data, so as to obtain the first transmitted data with a data length of 1 byte; The main control chip calculates the absolute value of the difference between the target temperature and the standard temperature, which is recorded as a first difference. When the target temperature is in a first temperature range, if the first difference is greater than or equal to the temperature threshold for two consecutive times during the measurement process, the data collection from the temperature sensor is switched from once every 2 seconds to once every 500 milliseconds. When the target temperature is not in the first temperature interval, if the first difference is less than the temperature threshold for 10 consecutive times during the measurement process, the data collection from the temperature sensor is switched from once every 500 milliseconds to once every 2 seconds; the temperature threshold is 1°C; The main control chip sends the first transmission data to the terminal.

2. The method according to claim 1, characterized in that The main control chip sends the target temperature to the terminal, including: If the integer part data of the target temperature is less than the integer part data of the standard temperature, fill the 7th bit position of the first transmitted data with 1, and fill the data from the 7th bit position to the 1st bit position of the first byte of the target temperature to the 6th bit position to the 0th bit position of the first transmitted data, to obtain the first transmitted data with a data length of 1 byte; The main control chip sends the first transmission data to the terminal.

3. The method according to claim 1, characterized in that The calculation formula of the first sent data is as follows: Among them, W is the temperature value received by the terminal, bit7 is the first bit value of the first transmitted data, Wst is the integer value of the standard temperature, and Wtmp is the decimal part value of the first transmitted data, and the decimal part value is the value discarded at the 0th bit position.

4. The method according to claim 1, characterized in that: The method further comprises: The main control chip calculates the variance between the target temperature and the average value of three consecutive target temperatures, which is recorded as the second variance. When the target temperature is in the first temperature interval, if the second variance is greater than the fluctuation threshold during the measurement process, the fluctuation count is increased by 1, if the second variance is less than or equal to the fluctuation threshold during the measurement process, the fluctuation count is increased by 0, and if the fluctuation count is greater than or equal to 3, the data is collected from the temperature sensor once every 2 seconds and switched to collecting data from the temperature sensor once every 500 milliseconds; when the target temperature is not in the first temperature interval, if the second variance is less than or equal to the fluctuation threshold during the measurement process, the fluctuation count is increased by 1, if the second variance is greater than the fluctuation threshold during the measurement process, the fluctuation count is increased by 0, and if the fluctuation count is less than or equal to 10, the data is collected from the temperature sensor once every 500 milliseconds and switched to collecting data from the temperature sensor once every 2 seconds.

5. A temperature detection device, characterized in that: The device comprises: an acquisition module, configured to acquire a first byte of first temperature data, a second byte of second temperature data, a first byte of third temperature data, and a second byte of fourth temperature data from the temperature sensor according to a transmission time interval, wherein the first byte is a decimal part of the temperature data, and the second byte is an integer part of the temperature data; an integration module, configured to integrate the first byte of the first temperature data and the second byte of the second temperature data to obtain first data, and integrate the first byte of the third temperature data and the second byte of the fourth temperature data to obtain second data, wherein the integer part of the first data is the second byte of the second temperature data, the decimal part of the first data is the first byte of the first temperature data, the integer part of the second data is the second byte of the fourth temperature data, and the decimal part of the second data is the first byte of the third temperature data; a calculation module, configured to calculate an average value of the first data and the second data, and use the average value as a target temperature; A sending module, used to send the target temperature to the terminal, includes: If the integer part data of the target temperature is equal to the integer part data of the standard temperature, fill the 7th bit position of the first transmitted data with 0, and fill the data from the 7th bit position to the 1st bit position of the first byte of the target temperature to the 6th bit position to the 0th bit position of the first transmitted data, so as to obtain the first transmitted data with a data length of 1 byte; calculate the absolute value of the difference between the target temperature and the standard temperature, and record it as the first difference; when the target temperature is in the first temperature interval, if there are two consecutive times in the measurement process that the first difference is greater than or equal to the temperature threshold, then switch from collecting data from the temperature sensor once every 2 seconds to collecting data from the temperature sensor once every 500 milliseconds; When the target temperature is not in the first temperature interval, if the first difference is less than the temperature threshold for 10 consecutive times during the measurement process, the data collection from the temperature sensor is switched from once every 500 milliseconds to once every 2 seconds; the temperature threshold is 1°C; The first transmission data is transmitted to the terminal.

6. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as claimed in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used for a processor to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for calibrating chip temperature sensor

    CN107328492A

  • Temperature measuring method and related device

    CN118548999A