A temperature data processing method and device, an intelligent door lock, and a storage medium

By acquiring and processing continuous temperature data within a unit time period, eliminating interference effects, and calculating reliable temperature values, the problem of inaccurate measurement of electronic temperature-sensitive components is solved, thereby improving the accuracy of temperature data and operational accuracy.

CN114461984BActive Publication Date: 2026-01-27SHENZHEN ORBBEC CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210125351.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-10
Publication Date
2026-01-27
Estimated Expiration
2042-02-10

AI Technical Summary

Technical Problem

In the existing technology, electronic temperature-sensitive components are easily interfered with when measuring temperature, resulting in a large difference between the measured value and the actual temperature value, which affects the accuracy of temperature data.

Method used

Multiple consecutive temperature data to be processed are acquired within the current unit time period. A set of consecutive target temperature data is obtained through software processing. The difference is within a preset threshold range, and the interference effect is eliminated. The average value is calculated as a reliable temperature value.

Benefits of technology

It improves the accuracy of temperature measurement, enhances the accuracy and user experience of subsequent operations such as face recognition and face control, and achieves fast and reliable temperature acquisition and filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461984B_ABST
    Figure CN114461984B_ABST
Patent Text Reader

Abstract

The application discloses a temperature data processing method and device, an intelligent door lock and a storage medium, and relates to the technical field of temperature data processing. The temperature data processing method comprises the following steps: acquiring a plurality of continuous temperature data to be processed in a current unit period; acquiring a group of continuous target temperature data from all the temperature data to be processed, wherein all the target temperature data correspond to a same preset threshold range, and the difference is determined according to the value of the temperature data to be processed and a reliable temperature value of a previous unit period; and acquiring a reliable temperature value of the current unit period based on the target temperature data. Compared with the prior art, the target temperature data screened in the application is not the temperature data that suddenly changes when it is disturbed, so that the reliable temperature value obtained by calculation is closer to the actual temperature value, and the accuracy of the reliable temperature value obtained by measurement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of temperature acquisition and processing technology, and in particular to a temperature data processing method, device, smart door lock, and storage medium. Background Technology

[0002] With the development of science and technology, temperature data is increasingly needed in various applications. For example, temperature data can be applied to facial recognition, facial control, and gesture control to assist in recognition and control.

[0003] In existing technologies, electronic temperature-sensitive components such as thermistors are typically used to measure temperature, and the temperature values ​​measured by these components are directly used as the actual temperature value. The problem with this technology is that these electronic temperature-sensitive components are easily affected by interference during use, causing sudden changes in resistance. This results in a significant difference between the measured temperature value and the actual temperature value, hindering the improvement of the accuracy of the obtained temperature value. Summary of the Invention

[0004] The main objective of this invention is to provide a temperature data processing method, device, smart door lock, and storage medium, aiming to solve the problem in the prior art where the temperature value obtained by measuring electronic temperature-sensitive components is directly used as the actual temperature value, and the components are easily interfered with, which is not conducive to improving the accuracy of the obtained temperature value.

[0005] To achieve the above objectives, a first aspect of the present invention provides a temperature data processing method, wherein the temperature data processing method includes:

[0006] Acquire multiple consecutive temperature data points to be processed within the current time period;

[0007] From all the above-mentioned temperature data to be processed, a set of continuous target temperature data is obtained, wherein the difference between all the above-mentioned target temperature data belongs to the same preset threshold range, and the difference is determined based on the value of the above-mentioned temperature data to be processed and the reliable temperature value of the previous unit time period.

[0008] Based on the target temperature data mentioned above, obtain the reliable temperature value for the current time period.

[0009] Optionally, the preset threshold range is either a first preset threshold range or a second preset threshold range, wherein the first preset threshold range is a range greater than a preset difference threshold, and the second preset threshold range is a range not greater than the preset difference threshold.

[0010] Optionally, the above-mentioned continuous target temperature data is obtained from all the above-mentioned temperature data to be processed, including:

[0011] The difference between each of the above temperature data to be processed and the reliable temperature value of the previous unit time period is calculated sequentially.

[0012] Based on the above difference, a set of continuous target temperature data is obtained from all the above temperature data to be processed. The difference between the above temperature data to be processed corresponding to the target temperature data belongs to the first preset threshold range, or the difference between the above temperature data to be processed corresponding to the target temperature data belongs to the second preset threshold range.

[0013] The number of target temperature data points is greater than a preset threshold, and the target temperature data is acquired continuously.

[0014] Optionally, obtaining a set of continuous target temperature data from all the aforementioned temperature data to be processed further includes:

[0015] Initialize the first queue, the second queue, the first number, and the second number, wherein the first number corresponds to the first queue, and the second number corresponds to the second queue;

[0016] Each of the above differences is compared with the above difference threshold in turn;

[0017] When the current difference is greater than the above difference threshold, the temperature data to be processed corresponding to the current difference is put into the first queue, the first number is incremented by 1, the second queue is cleared and the second number is cleared to zero.

[0018] When the current difference is not greater than the difference threshold, the temperature data to be processed corresponding to the current difference is put into the second queue, the second number is incremented by 1, the first queue is cleared and the first number is zeroed.

[0019] When the first number is greater than the number threshold, the set of continuous target temperature data is formed based on all the temperature data to be processed in the first queue; or, when the second number is greater than the number threshold, the set of continuous target temperature data is formed based on all the temperature data to be processed in the second queue.

[0020] Optionally, obtaining the reliable temperature value for the current unit time period based on the aforementioned target temperature data includes:

[0021] Calculate the average value of the target temperature data mentioned above, and use it as the reliable temperature value for the current time period.

[0022] Optionally, the calculation of the average value of the target temperature data as the reliable temperature value for the current unit time period includes:

[0023] Perform bubble sort on all the target temperature data and obtain the sorted queue;

[0024] Delete the head and tail data of the sorted queue to obtain the target queue;

[0025] Calculate the average value of all target temperature data in the target queue and use it as the reliable temperature value for the current time period.

[0026] A second aspect of the present invention provides a temperature data processing apparatus, wherein the temperature data processing apparatus comprises:

[0027] The unprocessed temperature data acquisition module is used to acquire multiple consecutive unprocessed temperature data within the current unit time period;

[0028] The target temperature data acquisition module is used to acquire a set of continuous target temperature data from all the above-mentioned temperature data to be processed, wherein the difference between all the above-mentioned target temperature data belongs to the same preset threshold range, and the difference is determined based on the value of the above-mentioned temperature data to be processed and the reliable temperature value of the previous unit time period.

[0029] The reliable temperature value acquisition module is used to acquire the reliable temperature value for the current unit time period based on the target temperature data mentioned above.

[0030] A third aspect of the present invention provides a smart door lock, the smart door lock comprising a chip and a thermistor, the smart door lock performing temperature data processing based on any of the above-mentioned temperature data processing methods.

[0031] Optionally, the above-mentioned acquisition of multiple consecutive temperature data to be processed within the current unit time period includes:

[0032] Within the current time period, the analog-to-digital converter pin of the chip continuously acquires sampling data, wherein the analog-to-digital converter pin is connected to the thermistor.

[0033] Based on the above sampling data, continuous temperature data to be processed is obtained.

[0034] A fourth aspect of the present invention provides a computer-readable storage medium storing a temperature data processing program, wherein the temperature data processing program, when executed by a processor, implements the steps of any one of the above-described temperature data processing methods.

[0035] As can be seen from the above, in this invention, multiple continuous temperature data to be processed are acquired within the current unit time period; from all the above-mentioned temperature data to be processed, a set of continuous target temperature data is acquired, wherein the differences corresponding to all the above-mentioned target temperature data belong to the same preset threshold range, and the above-mentioned differences are determined based on the value of the above-mentioned temperature data to be processed and the reliable temperature value of the previous unit time period; and the reliable temperature value of the current unit time period is acquired based on the above-mentioned target temperature data. Compared with the prior art, which directly uses the temperature value measured by the electronic temperature-sensitive component as the actual temperature value, in this invention, multiple continuous temperature data to be processed are acquired within the current unit time period, and a set of continuous target temperature data is obtained from them, thereby acquiring a reliable temperature value based on the target temperature data. When the component is subjected to electronic interference and causes a sudden change in resistance, the corresponding measured temperature value also changes abruptly, and this change is not sustained. The target temperature data obtained in this invention is continuous, and the difference between the target temperature data and the reliable temperature value of the previous unit time period falls within the same threshold range (i.e., the differences between the differences corresponding to each target temperature data point are not significant). The most recently confirmed value is the reliable temperature value of the previous unit time period, meaning the selected target temperature data is not temperature data that has abruptly changed due to interference. This makes the calculated reliable temperature value of the current unit time period closer to the actual temperature value, improving the accuracy of the measured reliable temperature value. This, in turn, improves the accuracy of subsequent operations such as face recognition, face control, and gesture control, enhancing the user experience. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a schematic flowchart of a temperature data processing method provided in an embodiment of the present invention;

[0038] Figure 2 This is an embodiment of the present invention. Figure 1 A detailed flowchart of step S100 is shown below;

[0039] Figure 3 This is an embodiment of the present invention. Figure 1 A detailed flowchart of step S200 is shown below;

[0040] Figure 4 This is a schematic diagram of the structure of a temperature data processing device provided in an embodiment of the present invention;

[0041] Figure 5 This is a block diagram illustrating the internal structure principle of a smart door lock provided in an embodiment of the present invention. Detailed Implementation

[0042] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0043] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0044] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0045] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0046] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0049] With the development of computer vision technology, depth data is increasingly being applied in scenarios such as facial recognition, gesture control, and AR / VR for assisted recognition and control. For example, in 3D facial recognition, depth chips are needed to acquire corresponding liveness depth data. It should be understood that temperature changes significantly impact the accuracy of depth data calculation; therefore, the chip needs to acquire temperature values ​​for assistance, which are then used in subsequent depth calculations. Generally, electronic temperature-sensitive components, such as thermistors, are placed within the depth calculation system, and the temperature values ​​measured by these components are directly used as the actual temperature values. However, the problem is that these electronic temperature-sensitive components are easily interfered with during use, causing sudden changes in resistance. This results in a significant difference between the measured temperature value and the actual temperature value, thus negatively impacting the accuracy of depth data calculations.

[0050] If complex software computation methods are used, the computation process may preempt resources from core business operations (such as facial recognition), affecting the implementation of these operations and thus impacting user experience. Hardware improvements, on the other hand, would increase hardware size, hinder integration, and incur higher costs. Furthermore, the chip's analog-to-digital sampling technology has limited speed, resulting in slow acquisition of accurate external temperature values ​​per unit time, which cannot meet real-time requirements.

[0051] Optionally, in some application scenarios, temperature data can be processed through filtering. Currently, filtering techniques can be divided into two main categories: classical filtering methods, which mainly include low-pass, high-pass, band-pass, median, amplitude-limiting filtering, arithmetic mean filtering, moving average, and Kalman filtering; and modern filtering methods, which mainly include chaotic filtering, component filtering, adaptive filtering, wavelet filtering, and other composite techniques. However, complex filtering techniques can affect software processing efficiency, and the aforementioned techniques are also difficult to eliminate the impact of hardware defects.

[0052] To address at least one problem in the existing technology, this invention provides a temperature data processing method that can overcome the performance defects of the hardware itself without changing the hardware, obtain reliable temperature values ​​more accurately and quickly, achieve fast and reliable temperature acquisition and filtering, and in terms of software application, does not create resource competition with the main business.

[0053] Exemplary methods

[0054] like Figure 1 As shown, this embodiment of the invention provides a temperature data processing method. Specifically, the temperature data processing method includes the following steps:

[0055] Step S100: Acquire multiple consecutive temperature data to be processed within the current unit time period.

[0056] The aforementioned multiple consecutive data to be processed are temperature values ​​continuously collected within a preset unit time period (i.e., unit time). The length of the unit time period and the frequency of data collection can be set according to actual needs and are not specifically limited here. In this embodiment, the frequency of data collection is relatively high; for example, the unit time period is 1 second, and 100 data collections are performed continuously within 1 second.

[0057] It should be noted that in this embodiment, the temperature data to be processed is obtained based on existing hardware, including a chip (e.g., a Deepin chip) and a low-cost thermistor. As the temperature changes, the resistance of the thermistor also changes. The corresponding temperature data to be processed can be obtained by sampling the voltage (or current, resistance value) of the thermistor. While a thermistor is used in this embodiment, other heat-sensitive electronic components can be selected in actual use, and this is not a specific limitation.

[0058] Specifically, in this embodiment, as Figure 2 As shown, step S100 specifically includes the following steps:

[0059] Step S101: Within the current time period, sampling data is continuously acquired based on the analog-to-digital conversion pin of the chip, wherein the analog-to-digital conversion pin is connected to a thermistor.

[0060] Step S102: Obtain continuous temperature data to be processed based on the above sampling data.

[0061] Specifically, in this embodiment, the aforementioned chip is a depth chip required for face recognition unlocking, but this is not a specific limitation. The thermistor voltage divider connected to the analog-to-digital converter pin of the chip has a simple and convenient hardware configuration that does not affect integration performance. In terms of software, the ADC function of this pin (analog-to-digital converter pin) is enabled to acquire the corresponding sampled value (ADC value, i.e., the aforementioned sampled data) in real time.

[0062] It should be noted that the sampling data was collected continuously within the corresponding time period. Therefore, the multiple sampling data obtained are consecutive in time order. Here, "consecutive" means that although the sampling data is discrete, it is arranged in a sequential order in time. The same applies to "consecutive" in the following text. It does not mean that it is an analog signal, and will not be elaborated further below.

[0063] Furthermore, based on the correspondence between thermistors and temperatures, multiple consecutive temperature values ​​to be processed can be obtained from the acquired sampling data. In this embodiment, a pre-defined correspondence table between ADC values ​​and temperature values ​​is used. After obtaining the sampling data, the corresponding temperature value can be obtained by looking up the table, thus eliminating the need for additional calculations and allowing for faster acquisition of the required temperature data to be processed. In practical applications, other methods can also be used, such as obtaining each temperature value to be processed through the calculation formula corresponding to the thermistor; these are not specifically limited here.

[0064] Step S200: Obtain a set of continuous target temperature data from all the above-mentioned temperature data to be processed, wherein the difference between all the above-mentioned target temperature data belongs to the same preset threshold range, and the difference is determined based on the value of the above-mentioned temperature data to be processed and the reliable temperature value of the previous unit time period.

[0065] Specifically, the temperature data to be processed is acquired through a thermistor. However, at some point, the thermistor may be affected by electronic interference, causing a sudden change in resistance, which in turn leads to abrupt changes in the acquired temperature data. In this case, based on the temperature data processing method provided in this embodiment, software processing can be used to perform composite multivariate filtering on the digital values ​​(i.e., the values ​​of the temperature data to be processed) acquired within a certain time period (i.e., the current range of time period) to eliminate the influence of abrupt changes and ultimately obtain a reliable temperature value.

[0066] Specifically, in this embodiment, a set of continuous target temperature data is obtained from all the temperature data to be processed. It should be noted that sudden changes in resistance do not last long; they typically occur at a single moment and generally do not repeat multiple times within a certain period. In this embodiment, all target temperature data are continuous, and the differences between all target temperature data belong to the same preset threshold range. That is, selecting all target temperature data that exhibits relatively small numerical changes within the same time period can eliminate the influence of the temperature data to be processed corresponding to sudden changes in resistance.

[0067] In this embodiment, the reliable temperature value of the previous unit time period is a reliable temperature value determined after measurement and calculation within the previous unit time period. If the current unit time period is the first unit time period and there is no corresponding previous unit time period, a preset value can be used as the reliable temperature value of the previous unit time period. In one application scenario, the difference can also be determined based on the value of the temperature data to be processed and a preset reliable temperature value. For example, the preset reliable temperature value can be the average temperature of the target object (i.e., the object whose temperature is being measured) obtained through accurate measurement. It can also be set and adjusted according to actual needs, without specific limitations here.

[0068] In this embodiment, the difference between the target temperature data in the current time period is determined based on the reliable temperature value of the previous time period to improve the accuracy of temperature measurement. It should be noted that in the first time period, there is no reliable temperature value determined by the measurement in the previous time period. The difference between the target temperature data in the first time period can be determined based on the first temperature value collected in the first time period, without specific limitations.

[0069] It should be noted that in actual use, multiple threshold ranges can be pre-defined. The specific number of threshold ranges and the method of dividing the threshold ranges can be set and adjusted according to actual needs, and no specific limitation is made here.

[0070] In this embodiment, two threshold ranges are defined, namely, the preset threshold range is either a first preset threshold range or a second preset threshold range. The first preset threshold range is a range greater than a preset difference threshold, and the second preset threshold range is a range not greater than a preset difference threshold.

[0071] The aforementioned difference threshold is a pre-set value used to divide the threshold range. It can be set and adjusted according to actual needs, and no specific limitation is made here.

[0072] Specifically, in this embodiment, as Figure 3 As shown, step S200 specifically includes the following steps:

[0073] Step S201: Calculate the difference between the value of each of the above-mentioned temperature data to be processed and the reliable temperature value of the previous unit time period in sequence.

[0074] Step S202: Based on the above difference, obtain a set of continuous target temperature data from all the above temperature data to be processed, wherein the difference between the above temperature data to be processed corresponding to the target temperature data all belong to the first preset threshold range, or the difference between the above temperature data to be processed corresponding to the target temperature data all belong to the second preset threshold range.

[0075] The number of target temperature data points is greater than a preset threshold, and the target temperature data is acquired continuously.

[0076] Specifically, the aforementioned threshold number is a preset value used to limit the minimum number of consecutive differences that must fall within the same preset threshold range to obtain a set of continuous target temperature data. A larger threshold number requires more differences to fall within the same preset threshold range to obtain a set of continuous target temperature data, resulting in a more accurate calculated reliable temperature value, but also increasing the computational load. Therefore, the threshold number can be set and adjusted according to actual needs; in this embodiment, it is set to 20, but this is not a specific limitation.

[0077] It should be noted that when a set of temperature data to be processed is obtained, multiple sets of data may be suitable as target temperature data. For example, if 80 sets of temperature data to be processed are obtained, the 2nd to 32nd sets can form a set of target temperature data that meets the requirements, and the 36th to 56th sets can also form a set of target temperature data that meets the requirements. In one embodiment, multiple sets of target temperature data can be obtained, and corresponding candidate temperature values ​​can be calculated based on each set of target temperature data. The average of the candidate temperature values ​​is then used as the reliable temperature value for the current unit of time. However, this requires calculating a large amount of data, which will affect the real-time performance of temperature calculation and consume software resources.

[0078] In this embodiment, only one set of target temperature data is acquired. The specific method for selecting the target temperature data can also be determined according to actual needs. For example, when multiple sets of data meet the requirements, the set with more consecutive sets of data that meet the requirements is selected as the target temperature data set.

[0079] Furthermore, in order to reduce the amount of computation and the occupation of software resources, in this embodiment, the first set of target temperature data that meets the corresponding conditions is selected, that is, the selection is based on the order of time. Once a set of target temperature data that meets the requirements is found, there is no need to calculate the subsequent data, which helps to improve computational efficiency and real-time performance and reduce the occupation of software resources.

[0080] Specifically, in this embodiment, obtaining a set of continuous target temperature data from all the above-mentioned temperature data to be processed further includes: initializing a first queue, a second queue, a first number, and a second number, wherein the first number corresponds to the first queue, and the second number corresponds to the second queue; sequentially comparing each of the above-mentioned differences with the above-mentioned difference threshold; when the current difference is greater than the above-mentioned difference threshold, placing the temperature data to be processed corresponding to the current difference into the first queue, incrementing the first number by 1, clearing the second queue, and resetting the second number to zero; when the current difference is not greater than the above-mentioned difference threshold, placing the temperature data to be processed corresponding to the current difference into the second queue, incrementing the second number by 1, clearing the first queue, and resetting the first number to zero; when the first number is greater than the above-mentioned number threshold, forming the above-mentioned set of continuous target temperature data based on all the temperature data to be processed in the first queue, or when the second number is greater than the above-mentioned number threshold, forming the above-mentioned set of continuous target temperature data based on all the temperature data to be processed in the second queue.

[0081] The first and second queues are used to temporarily store candidate target temperature data. The first and second counters are used to count the number of data points in the first and second queues, respectively. Initially, both queues are empty, and the first and second counters are initially 0. Thus, when either the first or second counter accumulates to more than 20, it is known that the corresponding queue meets the requirements, and the data in that queue can be used as the target temperature data without further calculation.

[0082] Specifically, in this embodiment, continuous temperature data to be processed is obtained by multiple samplings within the current unit time period. Simultaneously, the value of each temperature data to be processed is subtracted from the reliable temperature value of the previous unit time period in real time to obtain various differences. If a difference is greater than a difference threshold, the temperature data to be processed corresponding to the current difference is stored in the first queue (e.g., queue J), ​​and the first count (e.g., F) is incremented by 1. The second queue (e.g., queue I) is cleared, and the second count (e.g., K) is reset to zero. This is because continuous data can no longer be obtained from the second queue, so it needs to be cleared and the count restarted. Conversely, if a difference is not greater than the second difference threshold, the temperature data to be processed corresponding to the current difference is stored in the second queue (i.e., queue I), and the second count (i.e., K) is incremented by 1. At this time, the first queue can no longer obtain continuous data, so the first queue (i.e., queue J) is cleared, and the first count (i.e., F) is reset to zero. After the current temperature data to be processed is completed, the next temperature data to be processed is processed until a certain queue has 21 data points, that is, F is greater than 20 or K is greater than 20, then the queue of the corresponding target temperature data is obtained.

[0083] Step S300: Obtain the reliable temperature value for the current unit time period based on the above target temperature data.

[0084] It should be noted that in this embodiment, multiple (21) target temperature data points were obtained. These target temperature data points are temperature data that have excluded the influence of sudden changes in resistance. Therefore, the average value of these target temperature data points can be calculated as a reliable temperature value.

[0085] Furthermore, to further improve accuracy, the maximum and minimum values ​​in all target temperature data can be removed before calculating the average value to obtain a more accurate and reliable temperature value.

[0086] In one embodiment, a scheme is provided to facilitate software calculation, thereby reducing the occupation of software resources and improving processing efficiency. Specifically, bubble sort is performed on all the above-mentioned target temperature data to obtain a sorted queue; the head and tail data of the sorted queue are deleted to obtain the target queue; the average value of all target temperature data in the target queue is calculated and used as the reliable temperature value for the current unit time period.

[0087] In this embodiment, bubble sort is performed on the last obtained queue I (or queue J). After sorting, the head and tail of the queue are deleted. Finally, the average value of the queue is calculated, and the average value is the reliable temperature value of this round of filtering (i.e., the reliable temperature value of the current unit time period).

[0088] It should be noted that the reliable temperature value obtained in this round of filtering (i.e., the reliable temperature value in the current time period) can be used to calculate the difference corresponding to the temperature value to be processed in the next round (i.e. the next time period) so as to further filter the temperature data in the next unit time period.

[0089] Furthermore, after obtaining the aforementioned reliable temperature value, it can be forwarded (for example, via an I2C interface) to the corresponding depth chip, thereby enabling temperature coefficient calculation and temperature compensation of the live depth video stream, obtaining accurate and reliable live depth data, and improving the accuracy of services such as 3D face recognition and 3D face unlocking.

[0090] As can be seen from the above, this embodiment utilizes simple hardware and circuit design, combined with highly stable software processing methods (software filters), to achieve a low-cost, highly reliable solution for temperature acquisition, temperature processing (filtering), and temperature supplementation. It enables the acquisition and processing of temperature data, thereby quickly and efficiently obtaining reliable temperature values ​​that meet the requirements of real-time performance and accuracy. It should be noted that the above temperature data processing method can be applied to 3D facial recognition door locks, and also to other devices that require temperature measurement; no specific limitations are made here.

[0091] Exemplary device

[0092] like Figure 4 As shown, corresponding to the above-described temperature data processing method, this embodiment of the invention also provides a temperature data processing apparatus, which includes:

[0093] The temperature data acquisition module 410 is used to acquire multiple consecutive temperature data to be processed within the current unit time period.

[0094] The aforementioned multiple consecutive data to be processed are temperature values ​​continuously collected within a preset unit time period (i.e., unit time). The length of the unit time period and the frequency of data collection can be set according to actual needs and are not specifically limited here. In this embodiment, the frequency of data collection is relatively high; for example, the unit time period is 1 second, and 100 data collections are performed continuously within 1 second.

[0095] It should be noted that in this embodiment, the temperature data to be processed is obtained based on existing hardware, including a chip (e.g., a Deepin chip) and a low-cost thermistor. As the temperature changes, the resistance of the thermistor also changes. The corresponding temperature data to be processed can be obtained by sampling the voltage (or current, resistance value) of the thermistor. While a thermistor is used in this embodiment, other heat-sensitive electronic components can be selected in actual use, and this is not a specific limitation.

[0096] The target temperature data acquisition module 420 is used to acquire a set of continuous target temperature data from all the above-mentioned temperature data to be processed, wherein the difference between all the above-mentioned target temperature data belongs to the same preset threshold range, and the difference is determined based on the value of the above-mentioned temperature data to be processed and the reliable temperature value of the previous unit time period.

[0097] Specifically, in this embodiment, a set of continuous target temperature data is obtained from all the temperature data to be processed. It should be noted that sudden changes in resistance do not last long; they typically occur at a single moment and generally do not repeat multiple times within a certain period. In this embodiment, all target temperature data are continuous, and the differences between all target temperature data belong to the same preset threshold range. That is, selecting all target temperature data that exhibits relatively small numerical changes within the same time period can eliminate the influence of the temperature data to be processed corresponding to sudden changes in resistance.

[0098] In this embodiment, the reliable temperature value of the previous unit time period is a reliable temperature value determined after measurement and calculation within the previous unit time period. If the current unit time period is the first unit time period and there is no corresponding previous unit time period, a preset value can be used as the reliable temperature value of the previous unit time period. In one application scenario, the difference can also be determined based on the value of the temperature data to be processed and a preset reliable temperature value. For example, the preset reliable temperature value can be the average temperature of the target object (i.e., the object whose temperature is being measured) obtained through accurate measurement. It can also be set and adjusted according to actual needs, without specific limitations here.

[0099] In this embodiment, the difference between the target temperature data in the current time period is determined based on the reliable temperature value of the previous time period to improve the accuracy of temperature measurement. It should be noted that in the first time period, there is no reliable temperature value determined by the measurement in the previous time period. The difference between the target temperature data in the first time period can be determined based on the first temperature value collected in the first time period, without specific limitations.

[0100] It should be noted that in actual use, multiple threshold ranges can be pre-defined. The specific number of threshold ranges and the method of dividing the threshold ranges can be set and adjusted according to actual needs, and no specific limitation is made here.

[0101] The reliable temperature value acquisition module 430 is used to acquire the reliable temperature value of the current unit time period based on the target temperature data.

[0102] It should be noted that in this embodiment, multiple target temperature data were obtained, and these target temperature data were temperature data that excluded the influence of sudden changes in resistance. Therefore, the average value of the above target temperature data can be calculated as a reliable temperature value.

[0103] Furthermore, to further improve accuracy, the maximum and minimum values ​​in all target temperature data can be removed before calculating the average value to obtain a more accurate and reliable temperature value.

[0104] Specifically, in this embodiment, the specific functions of the temperature data processing device and its various modules can be referred to the corresponding descriptions in the temperature data processing method described above, and will not be repeated here.

[0105] Based on the above embodiments, the present invention also provides a smart door lock, the principle block diagram of which is as follows: Figure 5As shown. Specifically, the aforementioned smart lock includes a chip and a thermistor, and performs temperature data processing based on any of the temperature data processing methods described above. It should be noted that the aforementioned smart lock may also include other modules or units for implementing other functions, such as a camera module for acquiring facial images, etc., which are not specifically limited here.

[0106] It should be noted that when the smart door lock performs the processing steps of a temperature data processing method, the corresponding acquisition of multiple continuous temperature data to be processed within the current unit time period includes: continuously acquiring sampling data based on the analog-to-digital conversion pin of the chip within the current unit time period, wherein the analog-to-digital conversion pin is connected to the thermistor; and acquiring continuous temperature data to be processed based on the sampling data.

[0107] In one embodiment, the chip of the smart lock can store a temperature data processing program, and the smart lock executes the temperature data processing method based on the temperature data processing program during use.

[0108] Those skilled in the art will understand that Figure 5 The block diagram shown is only a partial structural diagram related to the present invention and does not constitute a limitation on the smart lock on which the present invention is applied. Specifically, the smart lock may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0109] In one embodiment, when the temperature data processing program is executed by the processor, the following operation instructions are performed:

[0110] Acquire multiple consecutive temperature data points to be processed within the current time period;

[0111] From all the above-mentioned temperature data to be processed, a set of continuous target temperature data is obtained, wherein the difference between all the above-mentioned target temperature data belongs to the same preset threshold range, and the difference is determined based on the value of the above-mentioned temperature data to be processed and the reliable temperature value of the previous unit time period.

[0112] Based on the target temperature data mentioned above, obtain the reliable temperature value for the current unit of time period.

[0113] This invention also provides a computer-readable storage medium storing a temperature data processing program, which, when executed by a processor, implements the steps of any temperature data processing method provided in this invention.

[0114] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the above device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this invention. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0116] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0117] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0118] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of the above modules or units is merely a logical functional division, and in actual implementation, it can be divided in other ways. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0119] If the integrated modules / units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0120] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not mean that the essence of the corresponding technical solutions deviates from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A temperature data processing method, characterized in that, The method includes: Within the current time period, sampling data is continuously acquired based on the analog-to-digital conversion pin of the chip, wherein the analog-to-digital conversion pin is connected to a thermistor; and continuous temperature data to be processed is acquired based on the sampling data. From all the temperature data to be processed, a set of continuous target temperature data is obtained, wherein the difference between all the target temperature data belongs to the same preset threshold range. The difference is determined based on the value of the temperature data to be processed and the reliable temperature value of the previous unit time period. The target temperature data is the set of data that first satisfies the condition that the corresponding difference belongs to the same preset threshold range among all the temperature data to be processed. The number of target temperature data is greater than a preset number threshold, and the target temperature data is obtained continuously. Based on the target temperature data, obtain the reliable temperature value for the current unit time period; The preset threshold range is either a first preset threshold range or a second preset threshold range. The first preset threshold range is a range greater than a preset difference threshold, and the second preset threshold range is a range not greater than the preset difference threshold. The step of obtaining a set of continuous target temperature data from all the temperature data to be processed includes: Initialize a first queue, a second queue, a first number, and a second number, wherein the first number corresponds to the first queue, and the second number corresponds to the second queue; Each of the aforementioned differences is compared sequentially with the difference threshold; When the current difference is greater than the difference threshold, the temperature data to be processed corresponding to the current difference is put into the first queue, the first number is incremented by 1, the second queue is cleared and the second number is cleared to zero. When the current difference is not greater than the difference threshold, the temperature data to be processed corresponding to the current difference is put into the second queue, the second number is incremented by 1, the first queue is cleared and the first number is cleared to zero. When the first number is greater than the number threshold, the set of continuous target temperature data is formed based on all the temperature data to be processed in the first queue; or, when the second number is greater than the number threshold, the set of continuous target temperature data is formed based on all the temperature data to be processed in the second queue.

2. The temperature data processing method according to claim 1, characterized in that, The step of obtaining a set of continuous target temperature data from all the temperature data to be processed further includes: The difference between the value of each temperature data to be processed and the reliable temperature value of the previous unit time period is calculated sequentially. Based on the difference, a set of continuous target temperature data is obtained from all the temperature data to be processed, wherein the difference between the target temperature data and the temperature data to be processed is within the first preset threshold range, or the difference between the target temperature data and the temperature data to be processed is within the second preset threshold range.

3. The temperature data processing method according to claim 1, characterized in that, The step of obtaining a reliable temperature value for the current unit time period based on the target temperature data includes: Calculate the average value of the target temperature data as the reliable temperature value for the current unit time period.

4. The temperature data processing method according to claim 3, characterized in that, The calculation of the average value of the target temperature data as the reliable temperature value for the current unit time period includes: Perform bubble sort on all the target temperature data and obtain the sorted queue; Delete the head and tail data of the sorted queue to obtain the target queue; Calculate the average value of all target temperature data in the target queue and use it as the reliable temperature value for the current unit time period.

5. A temperature data processing device, characterized in that, The device includes: The temperature data acquisition module is used to continuously acquire sampling data based on the analog-to-digital conversion pin of the chip within the current unit time period, wherein the analog-to-digital conversion pin is connected to a thermistor; and to acquire continuous temperature data to be processed based on the sampling data. The target temperature data acquisition module is used to acquire a set of continuous target temperature data from all the temperature data to be processed, wherein the differences corresponding to all the target temperature data belong to the same preset threshold range, the differences are determined based on the value of the temperature data to be processed and the reliable temperature value of the previous unit time period, and the target temperature data is the set of data that first satisfies the condition that the corresponding differences belong to the same preset threshold range among all the temperature data to be processed; the number of target temperature data is greater than a preset number threshold, and the target temperature data is acquired continuously; A reliable temperature value acquisition module is used to acquire a reliable temperature value for the current unit time period based on the target temperature data; The preset threshold range is either a first preset threshold range or a second preset threshold range. The first preset threshold range is a range greater than a preset difference threshold, and the second preset threshold range is a range not greater than the preset difference threshold. The target temperature data acquisition module is specifically used for: initializing a first queue, a second queue, a first number, and a second number, wherein the first number corresponds to the first queue, and the second number corresponds to the second queue; sequentially comparing each difference with the difference threshold; when the current difference is greater than the difference threshold, placing the temperature data to be processed corresponding to the current difference into the first queue, incrementing the first number by 1, clearing the second queue, and resetting the second number to zero; when the current difference is not greater than the difference threshold, placing the temperature data to be processed corresponding to the current difference into the second queue, incrementing the second number by 1, clearing the first queue, and resetting the first number to zero; when the first number is greater than the number threshold, constructing a set of continuous target temperature data based on all the temperature data to be processed in the first queue, or, when the second number is greater than the number threshold, constructing a set of continuous target temperature data based on all the temperature data to be processed in the second queue.

6. A smart door lock, the smart door lock comprising a chip and a thermistor, the smart door lock performing temperature data processing based on the temperature data processing method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a temperature data processing program, which, when executed by a processor, implements the steps of the temperature data processing method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Health detection method and device based on intelligent wearable equipment and computer equipment

    CN113066581A