Programmable temperature measuring device and method based on micro-control unit

The measurement values ​​of the temperature sensor are calibrated through the neural network model, which solves the problems of low temperature measurement efficiency and high cost in the existing technology, achieves fast and accurate temperature measurement and temperature control, and is suitable for a variety of application scenarios.

CN118654779APending Publication Date: 2024-09-17PIPECHINA SOUTH CHINA CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410739185.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

The existing temperature measurement technology based on micro-control units has low efficiency and high cost when faced with noise interference, making it difficult to achieve fast and accurate temperature measurement.

Method used

A programmable temperature measurement device based on a neural network model is used. The measured temperature value of the temperature sensor is calibrated through the trained neural network model to eliminate noise interference, achieve fast and accurate temperature measurement, and reduce the cost of the temperature measurement device.

Benefits of technology

It achieves fast and accurate temperature measurement, reduces the cost of temperature measurement devices, improves measurement accuracy and stability, and has high integration and flexible programming interfaces, making it suitable for various industrial and home appliance control systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118654779A
    Figure CN118654779A
Patent Text Reader

Abstract

The invention provides a programmable temperature measurement device and method based on a micro-control unit, and relates to the technical field of temperature measurement. According to the invention, a first analog signal measured by a temperature sensor is converted into a measured temperature value; then, a neural network model arranged in the programmable temperature measurement device outputs a calibration temperature value for eliminating noise interference according to the input measurement temperature value, converts the calibration temperature value into a second analog signal or a communication interface signal, and finally sends the second analog signal or the communication interface signal to the first equipment, so that the first equipment can accurately and quickly obtain the calibration temperature value, and the accuracy of the temperature measurement is improved. According to the programmable temperature measuring device provided by the invention, the temperature value can be rapidly and accurately measured, and the programmable temperature measuring device does not need to be provided with various electronic devices for eliminating the noise interference influence on the measured temperature value obtained by the temperature sensor, so that the cost of the programmable temperature measuring device can be reduced; and the use requirements of users in different use scenes are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of temperature measurement, and in particular to a programmable temperature measurement device and method based on a microcontroller unit. Background Art

[0002] In recent years, the application of microcontroller units (MCU) has become more and more extensive, from home appliances, automobiles, consumer electronics, to medical equipment, industrial control and other fields, all of which cannot be separated from the control of MCU. In the field of temperature control, the performance and stability of MCU determine the performance of the temperature control system.

[0003] However, in the actual use environment of the temperature sensor, it may be affected by various noises. If the noise interference cannot be effectively eliminated, the accuracy and stability of the temperature measurement may be reduced. The existing technical solution of using MCU for temperature measurement usually requires processing the analog signal obtained by the temperature sensor to eliminate the noise interference in the analog signal. However, this processing method often takes a lot of time, and the processing process requires the configuration of multiple electronic devices to work together, resulting in low efficiency of temperature measurement and high cost of temperature measurement device.

[0004] Therefore, there is an urgent need for a programmable temperature measurement device and method based on a microcontroller unit to achieve fast and accurate temperature measurement and reduce the cost of the temperature measurement device. Summary of the invention

[0005] The embodiment of the present invention provides a programmable temperature measurement device and method based on a microcontroller unit, which can quickly and accurately complete the measurement of temperature values ​​and effectively reduce the cost of the temperature measurement device.

[0006] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:

[0007] In a first aspect, a programmable temperature measurement device based on a microcontroller unit is provided, the device comprising an input interface unit, a control unit, a signal conversion unit, a programming control unit and an output interface unit, the input interface unit communicates with the control unit, the control unit communicates with the signal conversion unit and the programming control unit respectively, the programming control unit communicates with the output interface unit, and the output interface unit communicates with a first device; the input interface unit is used to receive an input first analog signal, and is used to convert the first analog signal into a digital signal, and is also used to send the digital signal to the control unit, the first analog signal is obtained by a temperature sensor arranged inside a second device; the control unit is used to control the signal conversion unit to convert the digital signal into a measured temperature value of the temperature sensor, and is used to send the measured temperature value to the programming control unit; the programming control unit is used to obtain a calibration temperature value corresponding to the measured temperature value through a trained neural network model according to the measured temperature value, the calibration temperature value is a temperature value after eliminating the measurement error of the measured temperature value; and is used to send the calibration temperature value to the output interface unit; the output interface unit is used to convert the calibration temperature value into a second analog signal or a communication interface signal, and is used to send the second analog signal or the communication interface signal to the first device.

[0008] In a possible implementation of the first aspect, the programming control unit is also used to: obtain multiple measured temperature values ​​measured by the temperature sensor; determine the calibration temperature value corresponding to each of the multiple measured temperature values; train the neural network model based on the multiple measured temperature values ​​and the calibration temperature value corresponding to each measured temperature value to obtain a trained neural network model.

[0009] In a possible implementation of the first aspect, the trained neural network model includes an encoder and a decoder; the encoder is used to determine the true distribution q(z|x) of the hidden variable z corresponding to the measured temperature value according to the measured temperature value; and is used to sample the hidden variable z from the true distribution q(z|x); the decoder is used to reconstruct the hidden variable z to obtain the true distribution p(x|z) of the calibration temperature value, and is used to sample the calibration temperature value corresponding to the measured temperature value from the true distribution p(x|z);

[0010] In a possible implementation of the first aspect, when training the neural network model, the loss function L used is:

[0011] L=E[log p(x|z)]-KL(q(z|x))||p(z);

[0012] Where E[log p(x|z)] is the reconstruction error, KL(q(z|x))||p(z) is the KL divergence between the true distribution q(z|x) of the latent variable z and the prior distribution p(z);

[0013] In a possible implementation of the first aspect, the programming control unit is also used to train the trained neural network according to the measured temperature value and the calibration temperature value corresponding to the measured temperature value obtained by the programming control unit through the trained neural network model to update the trained neural network.

[0014] In a possible implementation of the first aspect, the control unit communicates with the second device; the control unit is also used to receive a temperature control instruction input by a user, the temperature control instruction carries multiple control parameters; in response to the temperature control instruction, the temperature of the second device is controlled according to the multiple control parameters.

[0015] In a possible implementation of the first aspect, the temperature control instruction further carries identification information corresponding to a plurality of control parameters;

[0016] The control unit is also used to store multiple control parameters and identification information corresponding to the multiple control parameters;

[0017] The control unit is also used to control the temperature of the second device according to a plurality of control parameters corresponding to the identification information in response to the identification information input by the user.

[0018] In a possible implementation manner of the first aspect, the control unit is a micro control unit MCU.

[0019] In a possible implementation manner of the first aspect, the temperature sensor is a thermal resistance temperature sensor or a thermocouple temperature sensor.

[0020] The beneficial effects of the present invention are as follows: the programmable temperature measuring device provided by the present invention is based on a trained neural network model, and can output a calibrated temperature value that eliminates the influence of noise interference according to the measured temperature value obtained by the input temperature sensor, thereby realizing fast and accurate measurement of temperature, and the programmable temperature measuring device provided by the present invention does not need to set up a variety of electronic devices to eliminate the influence of noise interference on the measured temperature value obtained by the temperature sensor, which can reduce the cost of the programmable temperature measuring device and meet the user's use requirements in different use scenarios. On the other hand, the programmable temperature measuring device has a high degree of integration and is easy to install and use. Finally, the programmable temperature measuring device also has a highly flexible programming interface, which can receive instructions input by the user to complete the temperature control of the device, which can not only meet the user's various use requirements, but also optimize the operating experience. In general, the present invention provides an intelligent, accurate and efficient programmable temperature measuring device for temperature measurement and temperature control, which can be widely used in various industries and relay control systems, and has high practical value and broad market prospects.

[0021] In a second aspect, a programmable temperature measurement method based on a microcontroller unit is provided, which is applied to a programmable temperature measurement device; the programmable temperature measurement device includes an input interface unit, a control unit, a signal conversion unit, a programmable control unit and an output interface unit, the input interface unit communicates with the control unit, the control unit communicates with the signal conversion unit and the programmable control unit respectively, the programmable control unit communicates with the output interface unit, and the output interface unit communicates with a first device; the above method includes: the input interface unit receives an input first analog signal, converts the first analog signal into a digital signal, and sends the digital signal to the control unit, the first analog signal is obtained by a temperature sensor set inside the second device; the control unit controls the signal conversion unit to convert the digital signal into a measured temperature value of the temperature sensor, and sends the measured temperature value to the programmable control unit; the programmable control unit obtains a calibration temperature value corresponding to the measured temperature value through a trained neural network model according to the measured temperature value, the calibration temperature value is the temperature value after eliminating the measurement error of the measured temperature value; the calibration temperature value is sent to the output interface unit; the output interface unit converts the calibration temperature value into a second analog signal or a communication interface signal, and sends the second analog signal or the communication interface signal to the first device.

[0022] It can be understood that the beneficial effects that can be achieved by the programmable temperature measurement method based on a microcontroller unit described in the second aspect provided above can refer to the beneficial effects in the first aspect and any possible design thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A hardware structure diagram of a programmable temperature measurement device according to an embodiment of the present invention;

[0024] Figure 2 The present invention is a flowchart of a programmable temperature measurement method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The technical solution in the embodiment of the present invention will be described below in conjunction with the accompanying drawings in the embodiment of the present invention. Among them, in the description of the present invention, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present invention is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present invention, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0026] In addition, in order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the difference.

[0027] Meanwhile, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present invention 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 for easy understanding.

[0028] In recent years, the application of microcontroller units (MCU) has become more and more extensive, from home appliances, automobiles, consumer electronics, to medical equipment, industrial control and other fields, all of which cannot be separated from the control of MCU. In the field of temperature control, the performance and stability of MCU determine the performance of the temperature control system.

[0029] However, in the actual use environment of the temperature sensor, it may be affected by various noises. If the noise interference cannot be effectively eliminated, the accuracy and stability of the temperature measurement may be reduced. The existing technical solution of using MCU for temperature measurement usually requires processing the analog signal obtained by the temperature sensor to eliminate the noise interference in the analog signal. However, this processing method often takes a lot of time, and the processing process requires the configuration of multiple electronic devices to work together, resulting in low efficiency of temperature measurement and high cost of temperature measurement device.

[0030] Therefore, there is an urgent need for a programmable temperature measurement device and method based on a microcontroller unit to achieve fast and accurate temperature measurement and reduce the cost of the temperature measurement device.

[0031] In view of this, an embodiment of the present invention provides a programmable temperature measurement device based on a microcontroller unit, the device includes an input interface unit, a control unit, a signal conversion unit, a programming control unit and an output interface unit, the input interface unit communicates with the control unit, the control unit communicates with the signal conversion unit and the programming control unit respectively, the programming control unit communicates with the output interface unit, and the output interface unit communicates with a first device; the input interface unit is used to receive an input first analog signal, and is used to convert the first analog signal into a digital signal, and is also used to send the digital signal to the control unit, the first analog signal is obtained by a temperature sensor set inside a second device; the control unit is used to control the signal conversion unit to convert the digital signal into a measured temperature value of the temperature sensor, and is used to send the measured temperature value to the programming control unit; the programming control unit is used to obtain a calibration temperature value corresponding to the measured temperature value through a trained neural network model according to the measured temperature value, the calibration temperature value is a temperature value after eliminating the measurement error of the measured temperature value; and is used to send the calibration temperature value to the output interface unit; the output interface unit is used to convert the calibration temperature value into a second analog signal or a communication interface signal, and is used to send the second analog signal or the communication interface signal to the first device.

[0032] The programmable temperature measuring device provided by the embodiment of the present invention is based on a trained neural network model, and can output a calibrated temperature value that eliminates the influence of noise interference according to the measured temperature value obtained by the input temperature sensor, so as to achieve fast and accurate measurement of temperature. In addition, the programmable temperature measuring device provided by the present invention does not need to set up a variety of electronic devices to eliminate the influence of noise interference on the measured temperature value obtained by the temperature sensor, which can reduce the cost of the programmable temperature measuring device and meet the user's use requirements in different use scenarios. On the other hand, the programmable temperature measuring device provided by the embodiment of the present invention has high integration and is easy to install and use. Finally, the programmable temperature measuring device also has a highly flexible programming interface, which can receive instructions input by the user to complete the temperature control of the device, which can not only meet the user's various use requirements, but also optimize the operating experience. In general, the present invention provides an intelligent, accurate and efficient programmable temperature measuring device for temperature measurement and temperature control, which can be widely used in various industrial and household appliance control systems, and has high practical value and broad market prospects.

[0033] The following describes a programmable temperature measurement device based on a microcontroller unit provided in an embodiment of the present invention in conjunction with the accompanying drawings.

[0034] See also Figure 1, Figure 1 The schematic diagram of the structure of a programmable temperature measurement device shown in an embodiment of the present invention. The programmable temperature measurement device 100 includes: an input interface unit 110, a control unit 120, a signal conversion unit 130, a programming control unit 140 and an output interface unit 150, the input interface unit 110 communicates with the control unit 120, the control unit 120 communicates with the signal conversion unit 130 and the programming control unit 140 respectively, the programming control unit 140 communicates with the output interface unit 150, and the output interface unit 150 communicates with the first device. As an example, the first device can be any electronic device with data processing capabilities, such as a general-purpose computer, a personal computer, a laptop computer, a switch or a tablet computer, etc., and the specific implementation method of the first device is not limited here.

[0035] In a possible implementation, the temperature sensor is a thermal resistor temperature sensor or a thermocouple temperature sensor. Among them, the thermal resistor temperature sensor is a temperature measurement sensor. It measures temperature by using the property that the resistance of a material changes with temperature. Thermocouple temperature sensor is a commonly used temperature measurement element. It converts the temperature of the object being measured into a thermoelectric potential electrical signal based on the thermoelectric effect, and then converts it into a temperature value.

[0036] In some embodiments, the input interface unit 110 is used to receive an input first analog signal, and to convert the first analog signal into a digital signal, and to send the digital signal to the control unit 120, wherein the first analog signal is obtained by a temperature sensor disposed inside the second device. The input interface unit 110 communicates with the temperature sensor, receives the first analog signal obtained by the temperature sensor, and then converts the first analog signal into a digital signal.

[0037] In one example, the input interface unit 110 converts the first analog signal by using an analog to digital converter (ADC), and the ADC converts the first analog signal obtained by the temperature sensor into a digital signal for processing by the control unit 120.

[0038] The control unit 120 is used to control the signal conversion unit 130 to convert the digital signal into a measured temperature value of the temperature sensor, and to send the measured temperature value to the programming control unit 140;

[0039] In a possible implementation, the control unit 120 is a microcontroller unit (MCU). Specifically, when the control unit 120 receives the digital signal sent by the input interface unit 110, the control unit 120 sends the digital signal and the signal processing instruction to the signal conversion unit 130, and the signal processing instruction is used to control the signal conversion unit 130 to convert the digital signal into a measured temperature value of the temperature sensor, and then the control unit 120 receives the measured temperature value of the temperature sensor sent by the signal processing unit 130, and sends the measured temperature value of the temperature sensor to the programming control unit 140.

[0040] In one example, the signal conversion unit 130 implements the conversion of the digital signal by means of a preset algorithm or a lookup table. It should be understood that the embodiment of the present invention does not particularly limit the specific implementation of the preset algorithm or the lookup table.

[0041] The programming control unit 140 is used to obtain a calibration temperature value corresponding to the measured temperature value through a trained neural network model according to the measured temperature value, where the calibration temperature value is the temperature value after eliminating the measurement error of the measured temperature value; and is used to send the calibration temperature value to the output interface unit 150.

[0042] Specifically, in the actual use environment of the temperature sensor, it may be affected by various noises. If the noise interference cannot be effectively eliminated, the accuracy and stability of the temperature measurement may be reduced, resulting in a measurement error in the measured temperature value obtained by the temperature sensor. In other words, the measurement error of the measured temperature value is the error between the measured temperature value measured by the temperature sensor and the true temperature value due to the interference of factors such as noise on the temperature sensor.

[0043] In one possible implementation, the trained neural network model includes an encoder and a decoder; the encoder is used to determine the true distribution q(z|x) of the latent variable z corresponding to the measured temperature value based on the measured temperature value; and is used to sample the latent variable z from the true distribution q(z|x); the decoder is used to reconstruct the latent variable z to obtain the true distribution p(x|z) of the calibration temperature value, and is used to sample the calibration temperature value corresponding to the measured temperature value from the true distribution p(x|z).

[0044] In some embodiments, the programming control unit 140 is also used to: obtain multiple measured temperature values ​​measured by the temperature sensor; determine the calibration temperature value corresponding to each of the multiple measured temperature values; train the neural network model based on the multiple measured temperature values ​​and the calibration temperature value corresponding to each measured temperature value to obtain a trained neural network model.

[0045] Optionally, when training the neural network model, the loss function L used is:

[0046] L=E[log p(x|z)]-KL(q(z|x))||p(z);

[0047] Where E[log p(x|z)] is the reconstruction error and KL(q(z|x))||p(z) is the KL divergence between the true distribution q(z|x) of the latent variable z and the prior distribution p(z).

[0048] Furthermore, the programming control unit 140 is also used to train the trained neural network according to the measured temperature value and the calibration temperature value corresponding to the measured temperature value obtained through the trained neural network model to update the trained neural network.

[0049] To facilitate understanding of the present solution, the following is an explanatory description of the programming control unit 140 provided in the embodiment of the present invention.

[0050] The programming control unit 140 trains the trained neural network through the variational autoencoder (VAE) algorithm. Among them, VAE is a generation model, and VAE uses deep learning technology to probabilistically encode data to generate new data. Using VAE in the programming control unit 140 allows the programming control unit 140 to obtain the calibration temperature value corresponding to the measured temperature value by learning and understanding the complex distribution of the measured temperature value. At the same time, VAE has good robustness, so that the programming control unit 140 can still obtain the calibration temperature value corresponding to the measured temperature value when the measured temperature value is interfered by various factors. The VAE algorithm extracts features from multiple measured temperature values ​​input and generates rich and diverse encodings, so that the programming control unit 140 can learn and extract useful features from multiple measured temperature values, so as to more accurately understand the temperature change pattern and the influence of related environmental factors, and complete the training of the neural network model, so that the trained neural network model can obtain the calibration temperature value corresponding to the measured temperature value according to the input measured temperature value.

[0051] It should be noted that the basic idea of ​​the VAE algorithm is: encode the input data x through the encoder to obtain the true distribution q(z|x) of the latent variable z, then sample from this true distribution q(z|x) to obtain the latent variable z, and then decode the latent variable z through the decoder to obtain the prior distribution p(x|z).

[0052] Specifically, suppose there is a data set X = {x1, x2, ..., x n}, we hope to learn the generative model of this data set, that is, we hope to find the probability distribution p(x) that can generate this data set.

[0053] The main idea of ​​VAE is to introduce a hidden variable z, and assume a probability distribution p(z), as well as a generative model p(x|z). The goal of VAE is to find such a generative model and the distribution of hidden variables so that the distribution p(x) of the generated data is as close as possible to the distribution of the real data.

[0054] For each input x (measured temperature value), the encoder is used to obtain the true distribution q(z|x) of the corresponding latent variable z, and then the latent variable z is sampled from this true distribution q(z|x), which is then decoded by the decoder to obtain the generative model p(x|z) of x, and then the calibration temperature value corresponding to the measured temperature value is obtained.

[0055] The mathematical form of the encoder is:

[0056] q(z|x)=N(z;μ(x),∑(x));

[0057] This means that for a given input x, the true distribution of the latent variable z is assumed to be a normal distribution N, with a mean and covariance of μ(x) and ∑(x), respectively, where μ(x) and ∑(x) are parameterized by the neural network. The covariance is set to a constant σ 2 Multiply by the identity matrix I.

[0058] The mathematical form of the decoder is:

[0059] p(x|z)=N(x;g(z),σ 2 I);

[0060] When the latent variable z is given, the distribution of the input x is assumed to be a normal distribution N, and its mean is represented by g(z). g(z) is obtained by parameterizing the neural network.

[0061] Specifically, for μ(x) and ∑(x), the neural network receives input x and then calculates the output μ(x) and ∑(x) through a series of computational layers (including linear transformations, activation functions).

[0062] For g(z), the process is similar, the neural network receives the input z, and then calculates the output g(z) through the computational layer. The parameters of these neural networks are learned through the gradient descent optimization algorithm, so that μ(x), ∑(x), and g(z) calculated by the neural network are as close as possible to the true value.

[0063] The following is an exemplary description of the working process of the programming control unit 140. Two modules, an encoder and a decoder, are established. The measured temperature value obtained by the temperature sensor is input into the encoder to obtain the true distribution q(z|x) of the hidden variable z of the measured temperature value. The hidden variable z is sampled from this true distribution, and then the prior distribution p(x|z) of the generated data is obtained through the decoder; the calibration temperature value corresponding to the measured temperature value is obtained through the trained encoder and decoder. After obtaining the calibration temperature value corresponding to the measured temperature value, the measured temperature value and the calibration temperature value corresponding to the measured temperature value are used as new training data to train the neural network model to obtain an updated neural network model.

[0064] The temperature measurement device provided in the embodiment of the present invention forms a closed-loop control system, and through the neural network learning algorithm of the programming control unit 140, the temperature measurement device can adapt to various environmental requirements and achieve more intelligent and efficient temperature measurement and control. The temperature measurement module can be connected to the network wirelessly or wired, so that it has the functions of remote control and monitoring, and improves the convenience of user operation.

[0065] The output interface unit 150 is used to convert the calibration temperature value into a second analog signal or a communication interface signal, and to send the second analog signal or the communication interface signal to the first device.

[0066] The output interface unit 150 converts the calibration temperature value into a second analog signal through a digital-analog converter, and converts the calibration temperature value into a communication interface signal through a communication interface.

[0067] In one example, the communication interface includes an RS232 interface, an RS485 interface, and a USB interface. The above interfaces are only exemplary descriptions, and the embodiment of the present invention does not particularly limit the specific implementation method of the communication interface.

[0068] Optionally, the control unit 120 communicates with the second device; the control unit 120 is also used to receive a temperature control instruction input by a user, the temperature control instruction carrying multiple control parameters; in response to the temperature control instruction, the temperature of the second device is controlled according to the multiple control parameters.

[0069] In a possible implementation of the first aspect, the temperature control instruction also carries identification information corresponding to multiple control parameters; the control unit 120 is also used to store multiple control parameters and identification information corresponding to the multiple control parameters; the control unit 120 is also used to respond to the identification information input by the user, and control the temperature of the second device according to the multiple control parameters corresponding to the identification information.

[0070] Specifically, the identification information may be information used to describe different temperature control schemes. For example, the identification information corresponding to the multiple control parameters is a first temperature control scheme; the control unit 120 is also used to store the multiple control parameters and the first temperature control scheme corresponding to the multiple control parameters; the control unit 120 is also used to respond to the first temperature control scheme input by the user and control the temperature of the second device according to the multiple control parameters corresponding to the first temperature control scheme.

[0071] In this way, users can quickly input the temperature control scheme entered in historical operations based on the identification information. Users do not need to repeatedly enter multiple control parameters each time they perform temperature control, which can improve user processing efficiency, reduce user operations, and thus improve user experience.

[0072] In order to facilitate understanding of this solution, the programmable temperature measuring device provided by the embodiment of the present invention is described below by an example. The second device is a baking oven. The temperature value of the baking oven starts from room temperature and needs to be raised to 180 degrees Fahrenheit, and this temperature is maintained for 30 minutes. The specific operation process of the programmable temperature measuring device provided by the embodiment of the present invention is as follows: the input interface unit 110 receives the first analog signal obtained by the temperature sensor, and the first analog signal is obtained by the temperature sensor from the inside of the baking oven. The input interface unit 110 converts the first analog signal into a digital signal, and then sends the digital signal to the control unit 120. The control unit 120 sends the digital signal to the signal conversion unit 130, and the signal conversion unit converts the digital signal into a measured temperature value, wherein the measured temperature value is 30 degrees Celsius. Then, the control unit 120 inputs the measured temperature value into the neural network model of the programming control unit 140, and obtains the calibration temperature value corresponding to the measured temperature value as 32.5 degrees Celsius. Then, the output interface unit 150 converts the calibration temperature value into a second analog signal and sends it to the first device, wherein the first device is an electronic device with a display, and the first device is used to display the calibration temperature value of the baking oven. The control unit 120 receives a temperature control instruction input by a user, wherein the temperature control instruction carries a plurality of control parameters; in response to the temperature control instruction, the control unit 120 controls the temperature of the second device according to the plurality of control parameters.

[0073] The programmable temperature measuring device provided by the embodiment of the present invention is based on a trained neural network model, and can output a calibrated temperature value that eliminates the influence of noise interference according to the measured temperature value obtained by the input temperature sensor, so as to achieve fast and accurate measurement of temperature. In addition, the programmable temperature measuring device provided by the present invention does not need to set up a variety of electronic devices to eliminate the influence of noise interference on the measured temperature value obtained by the temperature sensor, which can reduce the cost of the programmable temperature measuring device and meet the user's use requirements in different use scenarios. On the other hand, the programmable temperature measuring device has a high degree of integration and is easy to install and use. Finally, the programmable temperature measuring device also has a highly flexible programming interface, which can receive instructions input by the user to complete the temperature control of the device, which can not only meet the user's various use requirements, but also optimize the operating experience. In general, the present invention provides an intelligent, accurate and efficient programmable temperature measuring device for temperature measurement and temperature control, which can be widely used in various industrial and household appliance control systems, and has high practical value and broad market prospects.

[0074] The above mainly introduces the scheme of the embodiment of the present invention from the perspective of the device. It is understandable that in order to realize the above functions, the programmable temperature measurement device 100 includes at least one of the hardware structure and software modules corresponding to each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed in this article, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present invention.

[0075] In some embodiments, the present invention also provides a programmable temperature measurement method based on a microcontroller unit, which is applied to Figure 1 A programmable temperature measurement device 100 is shown.

[0076] For details, see Figure 2 , the above method comprises the following steps:

[0077] S1. The input interface unit receives an input first analog signal, converts the first analog signal into a digital signal, and is also used to send the digital signal to the control unit.

[0078] Wherein, the first analog signal is obtained by a temperature sensor disposed inside the second device;

[0079] S2. The control unit controls the signal conversion unit to convert the digital signal into a measured temperature value of the temperature sensor, and sends the measured temperature value to the programming control unit.

[0080] S3. The programming control unit obtains a calibration temperature value corresponding to the measured temperature value through a trained neural network model according to the measured temperature value.

[0081] The calibration temperature value is a temperature value after eliminating the measurement error of the measured temperature value; the calibration temperature value is sent to the output interface unit.

[0082] S4. The output interface unit converts the calibration temperature value into a second analog signal or a communication interface signal, and sends the second analog signal or the communication interface signal to the first device.

[0083] It should be understood that the specific description of the above optional methods can refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any programmable temperature measurement method provided above and the description of the beneficial effects can refer to the above corresponding device embodiments, which will not be repeated here.

[0084] The embodiment of the present invention further provides a computer-readable storage medium, in which at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor to implement the methods of the above embodiments. For the explanation of the relevant contents and the description of the beneficial effects in any of the above-mentioned computer-readable storage media, reference can be made to the above-mentioned corresponding embodiments, which will not be repeated here.

[0085] The embodiment of the present invention further provides a chip. The chip integrates a control circuit and one or more ports for realizing the functions of the above-mentioned purchase list programmable temperature measurement device 100. Optionally, the functions supported by the chip can be referred to above and will not be described in detail here.

[0086] Those skilled in the art will appreciate that all or part of the steps of the above embodiments can be implemented by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, a specific circuit structure (application specific integrated circuit, ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.

[0087] The embodiment of the present invention also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. 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, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.

[0088] It should be noted that the above-mentioned device for storing computer instructions or computer programs provided by the embodiment of the present invention, such as but not limited to the above-mentioned memory, computer-readable storage medium and communication chip, etc., all have non-transitory. Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiment of the present invention can be implemented with hardware, software, firmware or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication medium includes any medium that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present invention. Those of ordinary skill in the art can change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A programmable temperature measuring device based on a microcontroller unit, characterized in that: The apparatus comprises an input interface unit, a control unit, a signal conversion unit, a programming control unit and an output interface unit, wherein the input interface unit communicates with the control unit, the control unit communicates with the signal conversion unit and the programming control unit respectively, the programming control unit communicates with the output interface unit, and the output interface unit communicates with the first device; The input interface unit is used to receive an input first analog signal, and is used to convert the first analog signal into a digital signal, and is also used to send the digital signal to the control unit, wherein the first analog signal is obtained by a temperature sensor disposed inside the second device; The control unit is used to control the signal conversion unit to convert the digital signal into a measured temperature value of the temperature sensor, and to send the measured temperature value to the programming control unit; The programming control unit is used to obtain a calibration temperature value corresponding to the measured temperature value through a trained neural network model according to the measured temperature value, and the calibration temperature value is a temperature value after eliminating the measurement error of the measured temperature value; and for sending the calibrated temperature value to the output interface unit; The output interface unit is used to convert the calibration temperature value into a second analog signal or a communication interface signal, and to send the second analog signal or the communication interface signal to the first device.

2. The device according to claim 1, characterized in that The programming control unit is also used for: Obtain multiple measured temperature values ​​measured by the temperature sensor; Determining a calibration temperature value corresponding to each of the plurality of measured temperature values; The neural network model is trained based on the multiple measured temperature values ​​and the calibration temperature value corresponding to each measured temperature value to obtain a trained neural network model.

3. The device according to claim 2, characterized in that The trained neural network model includes an encoder and a decoder; The encoder is used to determine the true distribution q(z|x) of the latent variable z corresponding to the measured temperature value according to the measured temperature value; And used to sample the hidden variable z from the true distribution q(z|x); The decoder is used to reconstruct the latent variable z to obtain the true distribution p(x|z) of the calibration temperature value, and to sample from the true distribution p(x|z) to obtain the calibration temperature value corresponding to the measured temperature value.

4. The device according to claim 3, characterized in that When training the neural network model, the loss function L used is: L=E[log p(x|z)]-KL(q(z|x))||p(z); Where E[log p(x|z)] is the reconstruction error and KL(q(z|x))||p(z) is the KL divergence between the true distribution q(z|x) of the latent variable z and the prior distribution p(z).

5. The device according to claim 4, characterized in that The programmed control unit is also used to train the trained neural network according to the measured temperature value and the calibration temperature value corresponding to the measured temperature value obtained by the programmed control unit through the trained neural network model to update the trained neural network.

6. The device according to claim 5, characterized in that The control unit communicates with the second device; the control unit is also used to receive a temperature control instruction input by a user, the temperature control instruction carries a plurality of control parameters; in response to the temperature control instruction, the temperature of the second device is controlled according to the plurality of control parameters.

7. The device according to claim 6, characterized in that The temperature control instruction also carries identification information corresponding to the multiple control parameters; The control unit is further used to store the multiple control parameters and identification information corresponding to the multiple control parameters; The control unit is further configured to control the temperature of the second device according to a plurality of control parameters corresponding to the identification information in response to identification information input by a user.

8. The device according to claim 7, characterized in that The control unit is a micro control unit MCU.

9. The device according to claim 8, characterized in that The temperature sensor is a thermal resistance temperature sensor or a thermocouple temperature sensor.

10. A programmable temperature measurement method based on a microcontroller unit, characterized in that: Applied in programmable temperature measurement devices; The programmable temperature measuring device comprises an input interface unit, a control unit, a signal conversion unit, a programming control unit and an output interface unit, wherein the input interface unit communicates with the control unit, the control unit communicates with the signal conversion unit and the programming control unit respectively, the programming control unit communicates with the output interface unit, and the output interface unit communicates with the first device; The method comprises: The input interface unit receives an input first analog signal, converts the first analog signal into a digital signal, and sends the digital signal to the control unit, wherein the first analog signal is obtained by a temperature sensor disposed inside the second device; The control unit controls the signal conversion unit to convert the digital signal into a measured temperature value of the temperature sensor, and sends the measured temperature value to the programming control unit; The programming control unit obtains a calibration temperature value corresponding to the measured temperature value through a trained neural network model according to the measured temperature value, wherein the calibration temperature value is a temperature value after eliminating the measurement error of the measured temperature value; and sends the calibration temperature value to the output interface unit; The output interface unit converts the calibration temperature value into a second analog signal or a communication interface signal, and sends the second analog signal or the communication interface signal to the first device.