Temperature sensor correction method and device, electronic equipment and storage medium

By constructing a temperature response model and fitting a relational function, the temperature sensor is dynamically calibrated, solving the problems of long calibration time and aging error in traditional calibration methods. This achieves intelligent and real-time calibration of the temperature sensor, improving measurement accuracy and adaptability.

CN120970853BActive Publication Date: 2026-07-03SHENZHEN INKBIRD TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN INKBIRD TECH CO LTD
Filing Date
2025-10-17
Publication Date
2026-07-03

Smart Images

  • Figure CN120970853B_ABST
    Figure CN120970853B_ABST
Patent Text Reader

Abstract

The application relates to the correction technical field of a temperature sensor, and discloses a temperature sensor correction method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: obtaining temperature difference values of different preset temperature ranges through a plurality of preset time periods, a comprehensive temperature response model is constructed, a nonlinear characteristic is extracted by using a change value of adjacent temperature difference values, a relational function is fitted, a target temperature difference value of a current time point is dynamically obtained, and the intelligentization and real-time of temperature correction are realized.The application has the beneficial technical effects that the inconvenience of a traditional temperature sensor depending on factory correction is avoided, errors caused by temperature floating in actual application are reduced, and calibration time and cost are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of temperature sensor calibration technology, and more particularly to a temperature sensor calibration method, apparatus, electronic device, and storage medium. Background Technology

[0002] In food processing monitoring, the accuracy of temperature sensors is crucial to product quality and safety. However, existing temperature sensor calibration methods face numerous technical challenges. First, traditional calibration processes require sending the sensor back to the manufacturer for calibration, which is not only time-consuming (usually several days) but also causes continuous equipment downtime, affecting production efficiency and operational safety. Second, the aging of temperature sensors leads to a gradual increase in their nonlinear errors; over time, linear analysis cannot guarantee measurement accuracy within a wide preset temperature range. Summary of the Invention

[0003] Therefore, it is necessary to address the existing temperature sensor calibration problem by proposing a temperature sensor calibration method, device, electronic equipment, and storage medium.

[0004] A calibration method for a temperature sensor, the method comprising:

[0005] The temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods are obtained to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value.

[0006] Calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set to obtain the temperature difference change set;

[0007] A relationship function is fitted for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes;

[0008] Obtain the current time point, and obtain the target temperature difference value for each preset temperature range according to the relationship function and the current time point;

[0009] The specified temperature sensor is initially calibrated based on the target temperature difference.

[0010] Further, the step of fitting a relationship function for each preset temperature range based on the set of temperature differences and the set of temperature difference changes includes:

[0011] Pre-set the initial relationship function for each preset temperature range. ,but ;in, This represents the s-th preset time period within the r-th preset temperature range. represents the predicted temperature difference corresponding to the sth preset time period in the rth preset temperature range, t, , ,..., are all parameters to be obtained, is the derivative of;

[0012] The minimum error calculation formula defines the minimum error between the curve to be fitted and the weighted sums in the same preset temperature range; where, n is the number of preset time periods, is the error value, is the derivative of the error value. When 1 < s < n, , represents the temperature difference corresponding to the sth preset time period in the rth preset temperature range, represents the temperature difference corresponding to the (s + 1)th preset time period in the rth preset temperature range, represents the temperature difference corresponding to the (s - 1)th preset time period in the rth preset temperature range, represents the (s + 1)th preset time period in the rth preset temperature range, represents the (s - 1)th preset time period in the rth preset temperature range. When s = ①, When s = n, , represents finding the minimum value;

[0013] Taking the partial derivatives of the two right - hand sides of the minimum error calculation formula, we get , which is transformed into a matrix and simplified to obtain the first matrix , and the second matrix ;

[0014] According to the first matrix and the second matrix, find the parameters t, , ,..., and substitute them into the initial relationship function respectively to obtain the relationship function for each preset temperature range.

[0015] Furthermore, after the step of preliminarily calibrating the specified temperature sensor based on the target temperature difference, it further includes:

[0016] Placing the preliminarily calibrated specified temperature sensor in the external environments of multiple preset temperatures in sequence to obtain the measured temperatures of the specified temperature sensor;

[0017] Obtaining the corresponding target preset temperature range based on the measured temperatures; It should be noted that in the original text, there is an unclear "①" in "When s = ①", which is maintained as it is in the translation. If this is an error in the original text, it may need to be corrected in the source for a more accurate translation.

[0018] The test temperatures are arranged in order, and the first test temperature to be processed is determined from the test temperatures based on the arrangement order.

[0019] Obtain the preset temperature range and preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain the correction result, and record the correction result within the preset temperature range;

[0020] Based on the order of arrangement, the second test temperature for the next process is determined from each test temperature;

[0021] The second test temperature is determined as the first test temperature, and the target step is repeated; the target step is to obtain the preset temperature range and preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain the correction result, and record the correction result within the preset temperature range.

[0022] Once all test temperatures have been calibrated, the calibration parameters for each preset temperature range are set based on the calibration results of each test temperature.

[0023] The specified temperature sensor is recalibrated based on the calibration parameters.

[0024] Further, the step of obtaining the temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods to obtain a set of temperature difference values ​​corresponding to each preset temperature range includes:

[0025] Obtain the first temperature value set after the last recalibration of the specified temperature sensor for each preset time period, and the second temperature value set actually measured by each specified temperature sensor; wherein, the first temperature value set includes the first temperature value for multiple preset time periods, and the second temperature value set includes the second temperature value for multiple preset time periods.

[0026] Subtract the corresponding second temperature value from the first temperature value to obtain the set of temperature differences corresponding to all preset temperature ranges.

[0027] Furthermore, before the step of sequentially placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor, the method further includes:

[0028] Retrieve the historical time point of the last recalibration;

[0029] Monitor whether the time interval between the historical time point and the current time point reaches a preset interval period;

[0030] If the monitoring interval reaches a preset interval period, it is determined that the conditions for performing the step of sequentially placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor are met.

[0031] Furthermore, the step of setting correction parameters for each preset temperature range based on the correction results of each test temperature after all test temperatures have been corrected includes:

[0032] Set an initial counting matrix; wherein the dimension of the initial counting matrix is ​​the same as the number of preset temperature ranges;

[0033] Based on the number of each test temperature within each preset temperature range, the numbers in the initial counting matrix are assigned values ​​to obtain the target counting matrix;

[0034] For the first coordinate in the target counting matrix that is not zero, calculate the average value of each temperature correction result, and use it as the correction parameter for the preset temperature range.

[0035] Further, after the step of calculating the average value of each temperature correction result for the first coordinate in the target counting matrix that is not zero, and using it as the correction parameter for the preset temperature range, the method further includes:

[0036] Mark the second coordinate of each target counting matrix that is 0;

[0037] Obtain the correction parameters of the adjacent preset temperature ranges corresponding to the second coordinate preset temperature range;

[0038] The correction parameters for the preset temperature range are set according to the correction parameters of the adjacent preset temperature range.

[0039] A calibration device for a temperature sensor, the device comprising:

[0040] The first acquisition module is used to acquire the temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods, so as to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value.

[0041] The calculation module is used to calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set, so as to obtain the temperature difference change set;

[0042] The fitting module is used to fit a relationship function for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes.

[0043] The second acquisition module is used to acquire the current time point and acquire the target temperature difference value of each preset temperature range according to the relationship function and the current time point;

[0044] The calibration module is used to perform preliminary calibration of the specified temperature sensor based on the target temperature difference.

[0045] An electronic device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps:

[0046] The temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods are obtained to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value.

[0047] Calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set to obtain the temperature difference change set;

[0048] A relationship function is fitted for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes;

[0049] Obtain the current time point, and obtain the target temperature difference value for each preset temperature range according to the relationship function and the current time point;

[0050] The specified temperature sensor is initially calibrated based on the target temperature difference.

[0051] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps:

[0052] The temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods are obtained to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value.

[0053] Calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set to obtain the temperature difference change set;

[0054] A relationship function is fitted for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes;

[0055] Obtain the current time point, and obtain the target temperature difference value for each preset temperature range according to the relationship function and the current time point;

[0056] The specified temperature sensor is initially calibrated based on the target temperature difference.

[0057] The beneficial effects of this invention are as follows: By acquiring temperature differences within different preset temperature ranges over multiple preset time periods, a comprehensive temperature response model is constructed. Utilizing the changes in adjacent temperature differences, nonlinear characteristics are extracted to fit a relational function, dynamically acquiring the target temperature difference at the current time point, thus achieving intelligent and real-time temperature correction. This avoids the inconvenience of traditional temperature sensors relying on factory calibration, reduces errors caused by temperature fluctuations in practical applications, and simultaneously reduces calibration time and costs. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, 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.

[0059] in:

[0060] Figure 1 This is an application environment diagram of a temperature sensor calibration method in one embodiment;

[0061] Figure 2 This is a flowchart of a temperature sensor calibration method in one embodiment;

[0062] Figure 3 This is a structural block diagram of a temperature sensor calibration device in one embodiment;

[0063] Figure 4 This is a structural block diagram of an electronic device in one embodiment. Detailed Implementation

[0064] 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 some embodiments of the present invention, and not all 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.

[0065] Figure 1 This is a diagram illustrating the calibration application environment of a temperature sensor in one embodiment. (Refer to...) Figure 1The temperature sensor calibration method is applied to a temperature sensor calibration system. This calibration system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; the mobile terminal can be at least one of a mobile phone, tablet, or laptop. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The terminal 110 is used to calibrate a specified temperature sensor, and the server 120 is used to calculate the calibration parameters.

[0066] like Figure 2 As shown, in one embodiment, a calibration method for a temperature sensor is provided. This method can be applied to both terminals and servers; this embodiment uses a terminal application as an example. The calibration method for the temperature sensor specifically includes the following steps:

[0067] S1: Obtain the temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value;

[0068] S2: Calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set to obtain the temperature difference change set;

[0069] S3: Fit a relationship function for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes;

[0070] S4: Obtain the current time point, and obtain the target temperature difference value for each preset temperature range according to the relationship function and the current time point;

[0071] S5: Perform preliminary calibration of the specified temperature sensor based on the target temperature difference.

[0072] As described in step S1 above, the temperature difference values ​​of the specified temperature sensor within multiple preset temperature ranges over multiple preset time periods are obtained. The temperature difference values ​​of the sensor in different preset temperature ranges and multiple time periods are collected and recorded. The temperature difference value refers to the difference between the temperature actually measured by the sensor and the temperature value measured by the specified temperature sensor. Specifically, these values ​​can be obtained by defining a series of fixed time periods, with each time period not spanning too long, for example, 3 days. Specifically, this could be the 1st to the 3rd of each month. Since the aging degree of the specified temperature sensor can be considered constant within a short period, the data measured during this time period can be considered as indicating that the aging degree of the specified temperature sensor is constant, i.e., the error of the specified temperature sensor is considered constant. Measurements are performed within a given preset range (e.g., -20℃ to 100℃). Specifically, this can be achieved by setting the external ambient temperature and then measuring it using the specified temperature sensor. The temperature needs to be within the aforementioned preset range, and values ​​need to be taken within each preset temperature range. Assuming there are five preset temperature ranges: -10℃ to 0℃, 0℃ to 10℃, 10℃ to 20℃, 20℃ to 30℃, and 30℃ to 40℃, different external ambient temperatures can be set as -5℃, 5℃, 15℃, 25℃, and 35℃. If the specified temperature sensor operates at an external ambient temperature of -5℃, and the temperatures measured on the 1st of each of May 2020 (January to May 1st) are -5.1℃, -5.0℃, -4.8℃, -4.3℃, and -4.1℃ respectively, then the temperature difference values ​​in the corresponding temperature difference set... The preset temperatures are 0.1℃, 0℃, -0.2℃, -0.7℃, and -0.9℃, with preset time periods of January 1st, February 1st, March 1st, April 1st, and May 1st, 2020. Temperature data will be collected at any time on the 1st of each month. Ideally, at least one ambient temperature should be measured within each preset temperature range to facilitate calibration for each range. If multiple ambient temperatures are measured within a single preset temperature range, the average value can be calculated. This average value, obtained from the specified temperature sensor, is then compared with the set ambient temperature to obtain the desired result. In some embodiments, the corresponding temperature difference value can be obtained from the external environment of the specified temperature sensor through other temperature sensors. Therefore, it can also be obtained based on the actual working environment temperature of the specified temperature sensor. In this way, the various measured values ​​will be concentrated in one or a few preset temperature ranges. However, in the subsequent calculation process, since there are more samples in the corresponding preset temperature range, the calibration accuracy will be better. What enterprises need more is to optimize the working environment temperature. Therefore, this can establish a corresponding temperature difference value set to better reflect the performance of the sensor under different temperature conditions.The preset temperature range can be set manually, such as -10℃ to 0℃, 0℃ to 10℃, 10℃ to 20℃, 20℃ to 30℃, and 30℃ to 40℃, as mentioned above. In a preferred embodiment, it can be preset according to the working environment of the specified temperature sensor. For example, if the working environment temperature of the specified temperature sensor is between -20℃ and 10℃, and mostly concentrated between -10℃ and 0℃, then the preset temperature range can be set to -20℃ to -10℃, -10℃ to -5℃, -5℃ to -0℃, and 0℃ to 10℃. That is, for areas with concentrated working environment temperatures, the temperature range is divided into smaller ranges. Specifically, measurement values ​​over a period of time can be acquired and then divided into a first temperature range with a density greater than a set density value and a second temperature range with a density less than or equal to the set density value. The first temperature range is then divided into a first range. The standard is used to obtain multiple preset temperature ranges corresponding to a first temperature range. A second temperature range is then divided according to a second range standard to obtain multiple preset temperature ranges corresponding to the second temperature range. The density value is set to a pre-defined density value, for example, 10 units per temperature range. The first and second range division standards are pre-defined standards, where the temperature range divided by the first standard is smaller than that divided by the second standard. Furthermore, the first and second range division standards can be correlated with corresponding density values; that is, a relationship table between the range division standards and density values ​​can be pre-defined. Subsequently, the range division standards can be obtained simply by referring to this table. During implementation, the device can automatically record these temperature values ​​through the acquisition system. The measurement results for each preset time period are stored in the system database. Through repeated testing and recording, fluctuations in temperature data with time and ambient temperature changes can be observed. In a specific embodiment, each designated temperature sensor triggers a fine adjustment at regular intervals, i.e., recalibration as described later. Therefore, the preset time period here is preferably a historical recalibration point.

[0073] In one embodiment, before step S1 of obtaining the temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods to obtain a set of temperature difference values ​​corresponding to each preset temperature range, the method further includes:

[0074] Obtain the ambient temperature gradient of the specified temperature sensor.

[0075] Multiple preset temperature ranges are set according to the working environment temperature gradient.

[0076] As described in the steps above, since the specified temperature sensor is generally used only for temperature detection of a single food item, its working environment temperature gradient is generally the working temperature of that food item. Therefore, the corresponding working environment temperature gradient can be obtained from the corresponding database or from the processing temperature of the food item. Based on the working environment temperature gradient, a suitable preset temperature range can be determined. These preset ranges should take into account the changing characteristics of the temperature gradient to ensure that possible temperature changes can be effectively covered. Multiple ranges can be set, such as low temperature range, medium temperature range, and high temperature range, to adapt to different application requirements.

[0077] As described in step S2 above, the change in temperature difference between two adjacent preset time periods in the temperature difference value set is calculated. The obtained temperature difference value set is analyzed, and the change in temperature difference between two adjacent time periods is calculated. By comparing the temperature difference values ​​between adjacent time periods, the change in temperature difference within each time period can be derived. This change value is one of the key data indicators, reflecting the stability and reliability of the sensor within a specific time period. The collected change values ​​are then used for relational function fitting in subsequent steps to help construct a mathematical model reflecting the relationship between temperature and temperature difference.

[0078] As described in step S3 above, a relationship function is fitted for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes. The relationship function is fitted using the set of temperature differences and their sets of changes. This process is crucial for establishing a mathematical model between temperature and sensor output. The fitted relationship function is typically achieved through regression analysis, with common models including linear regression and nonlinear regression models (such as multinomial regression). To successfully construct the relationship function, the performance of different types of fitting methods needs to be evaluated, and an appropriate model should be selected to ensure fitting accuracy. Furthermore, the dynamic characteristics and trends of the temperature difference should be considered to ensure that the model not only expresses current data but also predicts future temperature changes. After fitting, the resulting relationship function becomes the basis for actual calibration operations, effectively characterizing the working characteristics of the temperature sensor under different environmental and temporal conditions. Moreover, with the fitted relationship function, subsequent calculations of the target temperature difference become clearer, helping to improve the calibration accuracy of the temperature sensor, grasp temperature flow characteristics, and adapt to complex working environments.

[0079] As described in step S4 above, the current time point is obtained, and the target temperature difference value for each preset temperature range is obtained according to the relationship function and the current time point. The target temperature difference value for each preset temperature range corresponding to the current time point is obtained through the relationship function. First, the system needs to obtain the current real-time time information, which will become the basis for subsequent calculations. Then, using the relationship function fitted in the previous steps, the time period is used as input to generate the corresponding target temperature difference value for each preset temperature range. This target temperature difference value represents the error value of the sensor under the current environmental conditions and needs to be referenced and corrected during actual calibration. Through this dynamic calculation, errors caused by static models can be avoided, and the sensor's performance and environmental changes can be adapted in real time. In addition, obtaining this target value provides the necessary calibration basis for the preliminary sensor calibration in subsequent steps, making the calibration process more targeted and timely. It should be noted that the current time point needs to be mapped to the corresponding time value. In a specific embodiment, the time period from the start of use of the specified temperature sensor can be recorded as 0 point, and then 10 days can be used as a length unit, that is, every 10 days corresponds to a time unit. If the current time point is 22 days away from the start of use, the corresponding time value is 2.2. In some other embodiments, the 0 point and the unit can be determined by oneself for the purpose of calculation.

[0080] As described in step S5 above, the specified temperature sensor undergoes preliminary calibration based on the target temperature difference. Specifically, this preliminary calibration is a dynamic correction based on a relational function. The triggering condition for preliminary calibration is dynamically based on historical data, and specific triggering conditions can be set, such as: the temperature reading deviation exceeding a preset threshold (e.g., ±2°C); periodic time intervals (e.g., calibration after 100 hours of use); and when the device's performance changes significantly under specific environmental conditions (e.g., high temperature, low temperature, or high humidity). The target temperature difference is applied to the actual calibration of the temperature sensor. Based on the target temperature difference calculated in the previous steps, the calibration process will adjust the sensor's output to ensure that its measured value is close to the desired standard temperature. This preliminary calibration involves modifying parameters such as sensor output gain, offset, and sensitivity. Specifically, the calibration result can be achieved by adjusting internal sensor variables or updating its processing algorithm, such as collecting and calculating this data in the cloud, and then sending the calculation result to the terminal where the specified temperature sensor is located. After receiving the data from the specified temperature sensor, the terminal performs calibration using these correction parameters. In summary, through calibration based on the target temperature difference, the temperature sensor can better adapt to changing working environments and eliminate the risk of performance degradation due to sensor aging. This process will lay a solid foundation for the long-term effectiveness and reliability of temperature measurement, providing safer and more effective solutions for applications in related industries.

[0081] In one embodiment, step S3 of fitting the relationship function for each preset temperature range according to the set of temperature differences and the set of temperature difference changes includes:

[0082] S301: Preset the initial relationship function for each preset temperature range , then ; where represents the s-th preset time period in the r-th preset temperature range, represents the predicted temperature difference corresponding to the s-th preset time period in the r-th preset temperature range, t, , ,..., are all parameters to be obtained, is 's derivative;

[0083] S302: Limit the minimum error between the curve to be fitted and the weighted sums in the same preset temperature range through the error minimum calculation formula ; where n is the number of preset time periods, is the error value, is the derivative of the error value. When 1 < s < n, , represents the temperature difference corresponding to the s-th preset time period in the r-th preset temperature range, represents the temperature difference corresponding to the s + 1-th preset time period in the r-th preset temperature range, represents the temperature difference corresponding to the s - 1-th preset time period in the r-th preset temperature range, represents the s + 1-th preset time period in the r-th preset temperature range, represents the s - 1-th preset time period in the r-th preset temperature range. When s = 1, , when s = n, , represents finding the minimum value;

[0084] S303: Take the partial derivatives of the two right sides of the error minimum calculation formula to obtain , transform them into matrices and simplify to obtain the first matrix , and the second matrix ;

[0085] S'304: According to the first matrix and the second matrix, find the parameters t, , ,..., and substitute them into the initial relationship function respectively to obtain the relationship function for each preset temperature range.

[0086] As described in step S301 above, an initial relationship function is preset for each preset temperature range. An initial relationship function is defined for each preset temperature range; this function is a polynomial fitting function, with time as the independent variable and the temperature difference as the dependent variable.

[0087] As described in step S302 above, the minimum error between the curve to be fitted and each weighted sum within the same preset temperature range is limited by the minimum error calculation formula. The error between the fitted curve and the measured data is defined and calculated, treated as an objective function, and the optimal fitting parameters are determined by minimizing this function. It should be noted that, to improve the accuracy of the calculation, not only are the predicted temperature difference and the actual temperature difference predicted, but their corresponding derivatives are also predicted. As the parameters are optimized, the curve to be fitted will be continuously adjusted to strive for consistency with the actual measured data as much as possible.

[0088] As described in step S303 above, taking the partial derivatives of the two equations on the right-hand side of the formula for calculating the minimum error yields, which are then transformed into matrices and simplified to obtain the first and second matrices, respectively. The partial derivatives of the error minimum function defined in step S302 are calculated. By differentiating the error functions separately, a system of equations can be obtained, systematically expressing the relationship between the parameters. After organizing all the partial derivative results, a matrix equation can be constructed, commonly referred to as the Jacobian matrix. This system of equations, after simplification, forms two main matrices: the first matrix (related to the actual temperature difference change) and the second matrix (related to the derivatives of the parameters to be solved). Through these matrices, the parameter solving problem can be solved more efficiently, achieving multivariate function optimization. Precise mathematical implementation ensures that the results obtained during the fitting process reflect the fundamental relationship between temperature and sensor output.

[0089] As described in step S304 above, parameters are calculated based on the first and second matrices, and then substituted into the initial relational function to obtain the relational function for each preset temperature range. The main task using the first and second matrices obtained in the preceding steps is to solve for the parameters to be determined. Linear algebra matrix solving methods, such as Gaussian elimination or least squares, can efficiently solve this system of relational equations, thereby obtaining the optimal value for each parameter. Specifically, the least squares method is used to solve the matrix equations to obtain the parameters t, ... , ... The obtained parameters are then validated using metrics such as mean squared error (MSE) to assess the fitting ability. If the validation passes, the parameters are deemed to meet the requirements. These parameters represent key factors in the fitting relationship function, specifically describing the relationship between temperature and sensor output within different preset temperature ranges. After successfully solving for the parameters, the next step is to substitute these parameters into a pre-defined initial relationship function. Through this specific combination operation, a final relationship function for each preset temperature range can be obtained. These relationship functions accurately reflect the characteristics of the sensor under different operating conditions, providing a reliable basis for current temperature measurement and future calibration. The final generated relationship function not only significantly improves the calibration accuracy of the temperature sensor but also helps maintain stable temperature measurements under different operating conditions, ensuring reliable performance during use.

[0090] In one embodiment, after step S5 of performing preliminary calibration of the designated temperature sensor based on the target temperature difference, the method further includes:

[0091] S601: The pre-calibrated specified temperature sensor is placed in a series of external environments with multiple preset temperatures to obtain the test temperature of the specified temperature sensor;

[0092] S602: Obtain the corresponding target preset temperature range based on the test temperature;

[0093] S603: Arrange the various test temperatures and determine the first test temperature to be processed from the various test temperatures based on the arrangement order;

[0094] S604: Obtain the preset temperature range and preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain the correction result, and record the correction result within the preset temperature range;

[0095] S605: Based on the arrangement order, determine the second test temperature for the next process from each test temperature;

[0096] S606: Determine the second test temperature as the first test temperature, and repeat the target step; the target step is to obtain the preset temperature range and preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain the correction result, and record the correction result within the preset temperature range.

[0097] S607: After all test temperatures have been calibrated, set the calibration parameters for each preset temperature range based on the calibration results of each test temperature.

[0098] S608: Recalibrate the specified temperature sensor based on the calibration parameters.

[0099] As described in step S601 above, the pre-calibrated specified temperature sensor is sequentially placed in multiple external environments with preset temperatures to obtain the test temperature of the specified temperature sensor. The pre-calibrated temperature sensor is tested one by one in multiple external environments, which cover a range of representative temperatures, typically including multiple temperature values ​​(such as -20℃, 0℃, 25℃, 50℃, 75℃, and 100℃), ensuring broad coverage of the sensor's operating range. Specifically, the external ambient temperature can be controlled using a constant temperature chamber, and the sensor's test temperature at different preset temperatures can be recorded. It should be noted that the multiple temperature values ​​do not necessarily have to be exact integers; they can also be values ​​such as 36.5℃. The number of measurements should be sufficiently large, for example, 500 external environments. To ensure the temperature during operation, the ratio of the number of measurements taken by the specified temperature sensor for each preset temperature range can be statistically analyzed. Based on the corresponding ratio, the number of external environments for each preset temperature range is proportionally set, thereby increasing the number of measurements for the corresponding preset temperature range and improving the accuracy of the corresponding preset temperature range to meet the needs of actual operation. Specifically, during the test, the sensor will stabilize within each temperature zone for a period of time to reach an equilibrium state before recording its output temperature—that is, the actual test temperature. This data will include the sensor output corresponding to each preset temperature for subsequent analysis and comparison.

[0100] As described in step S602 above, the corresponding target preset temperature range is obtained based on the test temperature. The target preset temperature range is obtained based on the actual temperature measured by the sensor during the test process. This target preset temperature range is usually preset based on system standards or application requirements. Its purpose is to ensure a good match between the measured temperature value and system specifications. Each test temperature corresponds to only one unique target preset temperature range.

[0101] As described in step S603 above, the various test temperatures are arranged, and the first test temperature to be processed is determined from among them based on the arrangement order. The acquired test temperature input data is sorted by arranging the test temperature values ​​in a logical sequence to ensure that each temperature has a reasonable and clear order. This is usually done in ascending order, but random arrangement is also possible; here, it's simply to assign a sequence number to each test temperature for statistical and subsequent processing purposes. Determining the first test temperature to be processed involves selecting the first temperature value after sorting as the initial processing target.

[0102] As described in step S604 above, the preset temperature range and preset temperature corresponding to the first test temperature are obtained. The first test temperature is corrected based on the preset temperature to obtain a correction result, and the correction result is recorded within the preset temperature range. The preset temperature range corresponding to the current first test temperature is identified, and the target preset temperature of this temperature range is retrieved. Based on the target preset temperature and the measured temperature, the correction parameters are calculated. The correction parameters are recorded within the preset temperature range to establish a documented correction history. This record will become an important reference for future correction and optimization processes, helping to track changes and drift in sensor performance.

[0103] As described in step S605 above, the second test temperature for the next process is determined from each test temperature based on the sorting order. The second test temperature for the next process is determined according to the previously determined sorting order. By sequentially selecting the next target from each acquired test temperature, the system ensures that all measurements are covered, thereby performing comprehensive calibration.

[0104] As described in step S606 above, the second test temperature is determined as the first test temperature, and the target step is repeated. This repetitive step ensures that each temperature value in the system can be calibrated accordingly, thereby maximizing the measurement accuracy of the sensor. By continuously executing the target step, relevant calibration information and data will be recorded and used to support subsequent analysis. This mechanism not only ensures the accurate processing of each specific test temperature but also forms a cyclical calibration process. Through continuous feedback and calibration, a more focused effect is ultimately achieved. This repetition also significantly reduces the risk of errors, ensuring the performance of the temperature sensor under all potential environmental conditions, thereby ensuring its reliability and stability in long-term use. The entire process not only improves data traceability but also makes the calibration process more reasonable, ensuring that the calibration parameters for each preset temperature range are set more appropriately.

[0105] As described in step S607 above, after all test temperatures have been calibrated, calibration parameters for each preset temperature range are set based on the calibration results of each test temperature. After all test temperatures have been calibrated, the calibration results of each temperature are used to initialize and set the corresponding calibration parameters. The process of setting calibration parameters usually involves summarizing and analyzing the calibration results of each preset temperature range, and forming systematic parameters by calculating the average value or weighted average value of the valid data.

[0106] As described in step S608 above, the specified temperature sensor is recalibrated based on the calibration parameters. Recalibration refers to fine-tuning based on experimental data, triggered at preset time intervals. The sensor is recalibrated using previously set calibration parameters, which are directly applied to the temperature sensor's operating algorithm to ensure accurate measurement values ​​based on the latest environmental conditions and historical operating data. The recalibration process ensures high performance and reliability of the sensor over long-term use, effectively preventing the propagation of erroneous temperature information and providing a stable temperature monitoring solution for subsequent users. Recalibration can also be integrated with real-time system tracking data, laying the foundation for responding to dynamic environmental changes. Through this complete recalibration process, the sensor's performance is not only affected by the initial calibration but also continuously adapts to new calibration requirements based on historical data and the gradual evolution of parameters. This implementation step, through an effective feedback and correction mechanism, ensures the elimination of all potential errors, thereby achieving stable and continuous temperature measurement results.

[0107] Therefore, recalibration, utilizing the correction results obtained at each test temperature, allows for detailed adjustments across different temperature ranges. These correction parameters further refine the sensor's output signal to accurately reflect the actual ambient temperature, ensuring the sensor consistently provides accurate data under varying external conditions, free from the influence of previous potential deviations, thus significantly improving its measurement accuracy. Furthermore, by setting correction parameters for different temperature ranges during recalibration, the sensor can be more widely applied to various operating conditions. This allows the sensor to maintain reasonable output performance under different environments, such as high temperatures, low temperatures, or rapid temperature changes. This characteristic is particularly important in industrial applications, climate monitoring, and scientific experiments, where high accuracy and consistency are crucial. Temperature sensors are typically connected to automatic monitoring systems, providing real-time feedback on environmental changes. Through recalibration, the system can continuously and accurately record temperature change data and automatically adjust accordingly. This adaptive capability enables the system to respond more intelligently to constantly changing environmental conditions, improving the efficiency and effectiveness of the entire monitoring system. In conclusion, recalibration based on calibration parameters is of great significance for improving sensor performance, ensuring data accuracy, and enhancing user confidence. It can provide more reliable and efficient services in various applications. This process helps to establish better temperature monitoring systems and effectively support scientific research and industrial production in various fields.

[0108] In one embodiment, step S1, which involves obtaining the temperature difference values ​​of a specified temperature sensor over multiple preset temperature ranges within multiple preset time periods to obtain a set of temperature difference values ​​corresponding to each preset temperature range, includes:

[0109] S101: Obtain the first temperature value set after the last recalibration of the specified temperature sensor for each preset time period, and the second temperature value set actually measured by each specified temperature sensor; wherein, the first temperature value set includes the first temperature value for multiple preset time periods, and the second temperature value set includes the second temperature value for multiple preset time periods.

[0110] S102: Subtract the corresponding second temperature value from the first temperature value to obtain a set of temperature difference values ​​corresponding to all preset temperature ranges.

[0111] As described in step S101 above, obtain the first set of temperature values ​​after the last recalibration of the specified temperature sensor for each preset time period, and the second set of temperature values ​​actually measured by each specified temperature sensor. Collect temperature measurement data of the sensor after the last recalibration in different preset time periods to construct two data sets: a first temperature value set and a second temperature value set. The first temperature value set contains the theoretically predicted temperature values ​​of the recalibrated sensor within multiple preset temperature ranges under the preset time period. For example, temperature data can be acquired at multiple set time periods (such as every 15 days or every month). These temperature values ​​are ideal values ​​obtained after standardized calibration under actual environmental conditions. This set will provide ideal temperature reference points for subsequent analysis. The process of collecting these data needs to be clearly recorded in time to ensure that data collected in different time periods can be directly compared.

[0112] As described in step S102 above, the first temperature value is subtracted from the corresponding second temperature value to obtain a set of temperature difference values ​​corresponding to all preset temperature ranges. The sensor's deviation is determined through simple mathematical operations, i.e., the set of temperature difference values ​​is obtained. Specifically, to obtain the temperature difference values, each element in the first temperature value set (representing the calibrated predicted temperature) is subtracted from the corresponding element in the second temperature value set (the actual measured temperature value). In this way, the resulting set of temperature difference values ​​reflects the actual deviation of the sensor within each specific preset temperature range and time period. The calculation of these temperature difference values ​​provides crucial information for the calibration process, helping to identify the sensor's accuracy and stability during operation. In subsequent analysis, these differences will be used as the basis for building models and relational functions, making sensor calibration more systematic and reasonable.

[0113] In one embodiment, before step S601 of sequentially placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor, the method further includes:

[0114] S6001: Obtain the historical time point of the last recalibration;

[0115] S6002: Monitor whether the interval between the historical time point and the current time point reaches the preset interval period;

[0116] S6003: If the monitoring interval reaches a preset interval period, it is determined that the conditions for performing the step of sequentially placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor are met.

[0117] As described in step S6001 above, the historical time point of the last recalibration is obtained. Since each calibration can perform preliminary calibration and recalibration, the historical time point of the last recalibration can be obtained from the historical record. Recording and extracting the accurate historical time point of the last calibration of the temperature sensor can be achieved through the log stored internally by the sensor or the information registered in the software management system. The reason for obtaining the last calibration date is to identify the length of time the sensor has experienced since the last calibration, and then determine whether a new calibration operation is needed.

[0118] As described in step S6002 above, monitor whether the interval between the historical time point and the current time point reaches a preset interval period. Analyze the extracted historical time points to determine whether the time interval from the last calibration to the current time point reaches the preset interval period. This preset interval period is based on the equipment manufacturer's recommended maintenance cycle, industry standards, or actual user experience, and is set to, for example, 15 days or one month.

[0119] As described in step S6003 above, if the monitoring interval reaches a preset interval period, it is determined that the conditions for executing the step of sequentially placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor are met. When the historical duration is determined to be longer than the preset duration, the system will automatically trigger subsequent steps to arrange the temperature sensor calibration procedure. This ensures that the sensor maintains optimal performance during use, prevents deviations caused by prolonged lack of calibration, and maintains its ability to accurately measure and respond to external temperatures. Through these steps, the system can automatically trigger a recalibration step to improve the accuracy of the temperature sensor.

[0120] In one embodiment, step S607, which involves setting correction parameters for each preset temperature range based on the correction results of each test temperature after all test temperatures have been corrected, includes:

[0121] S6071: Set an initial counting matrix; wherein the dimension of the initial counting matrix is ​​the same as the number of preset temperature ranges;

[0122] S6072: Assign values ​​to the numbers in the initial counting matrix according to the number of each test temperature within each preset temperature range to obtain the target counting matrix;

[0123] S6073: For the first coordinate in the target counting matrix that is not zero, calculate the average value of each temperature correction result, and use it as the correction parameter for the preset temperature range.

[0124] As described in steps S6071-S6073 above, an initial counting matrix is ​​created, with dimensions matching the number of preset temperature ranges involved. This matrix is ​​used to track and count the number of valid calibration results measured within different preset temperature ranges. The initial counting matrix is ​​typically set to zero upon creation, meaning that no calibration data has been recorded for each preset temperature range initially. The counting matrix is ​​a two-dimensional array with dimensions matching the number of preset temperature ranges. When a corresponding dimension has a value for calculation, the corresponding dimension value is incremented by 1. Then, all test temperatures are iterated to obtain the number of test temperatures for each dimension, thus obtaining the target counting matrix. By assigning a unique matrix element to each preset temperature range, the system can classify and organize the measurement data within different preset temperature ranges in subsequent steps. This structured data organization lays the foundation for the subsequent temperature calibration process, not only improving the efficiency of system processing and analysis but also reducing errors that may result from data chaos. The previous measurement data is iterated, and the number of measurement results for each preset temperature range is counted, thus filling this value into the corresponding position in the target counting matrix. The system analyzes the non-zero coordinates in the target counting matrix to obtain the corresponding temperature correction results and calculates the average of these results as the correction parameter for the specific preset temperature range. The system identifies coordinates with valid data in the target counting matrix. Then, it extracts the corresponding temperature correction result from each non-zero first coordinate. These results are typically the actual values ​​recorded during previous calibration, reflecting the sensor's response under specific environmental conditions. Subsequently, the system statistically analyzes all extracted correction results, sums these values, and calculates their average. For example, in a specific embodiment, the preset temperature range of 20-30℃ corresponds to a target counting matrix with a dimension of 3. The three sets of test temperatures-preset temperatures are (23, 24), (24, 27), and (22, 21), respectively. The corresponding correction results are 1, 3, and -1, respectively. Therefore, the correction parameter for this preset temperature range is [1 + 3 + (-1)] / 3 = 1.

[0125] In one embodiment, after step S6073, which calculates the average value of each temperature correction result for the first coordinate in the target counting matrix that is not zero, and uses it as the correction parameter for the preset temperature range, the method further includes:

[0126] S60741: Mark the second coordinate that is 0 in each of the target counting matrices;

[0127] S60742: Obtain the correction parameters of the adjacent preset temperature ranges corresponding to the second coordinate preset temperature range;

[0128] S60743: Set the correction parameters for the preset temperature range according to the correction parameters of the adjacent preset temperature range.

[0129] As described in steps S60741-S60743 above, all coordinates with a value of zero in the target counting matrix are identified and marked. No valid measurement data is recorded within the preset temperature range corresponding to these coordinates, possibly due to reasons such as no measurements being performed within that preset temperature range, unavailable measurement data, or data being considered invalid. The marking process typically involves traversing the target counting matrix using an automated algorithm, checking the value of each element. If an element's value is 0, the system marks its coordinates as "unused" or another appropriate identifier. Based on the previously marked zero coordinates, the corresponding preset temperature range is located, and the correction parameters for adjacent preset temperature ranges are obtained. This is to fill in the missing valid correction data within the current preset temperature range, ensuring that the overall calibration process of the system remains rigorous and effective. The correction parameters for adjacent preset temperature ranges provide a basis for filling in missing data, facilitating reasonable estimation based on known adjacent parameters in the absence of valid data. Furthermore, the process of finding adjacent correction parameters can employ mathematical interpolation methods, especially when the correction parameters for adjacent preset temperature ranges change smoothly; linear interpolation or polynomial interpolation can be used to estimate the missing correction data. By using calibration parameters from adjacent preset temperature ranges to set parameters for currently unrecorded ranges, the flexibility and adaptability of temperature sensors are enhanced, creating a more robust foundation for temperature management under complex conditions. During implementation, the algorithm for acquiring these parameters needs continuous optimization based on actual operating data to continuously improve the performance of the entire temperature measurement system.

[0130] In one embodiment, after step S5 of performing preliminary calibration of the designated temperature sensor based on the target temperature difference, the method further includes:

[0131] S621: Obtain the detection difference values ​​of other sensors within multiple preset temperature ranges in the multiple preset time periods, so as to obtain the detection difference value set corresponding to each preset temperature range;

[0132] S622: According to the formula Calculate the conversion parameter between the detection difference set and the temperature difference set; wherein, This represents the k-th detection difference in the set of x-th detection differences. This represents the h-th detection difference in the x-th set of detection differences, where T is the transformation parameter. This represents the k-th temperature difference in the set of x-th temperature differences. This represents the h-th temperature difference in the set of x-th temperature differences. This is the preset error range;

[0133] S623: Obtain the target detection difference of the other sensors at the current time point;

[0134] S624: Calculate the reference temperature difference of the specified temperature sensor based on the target detection difference and the conversion parameters;

[0135] S625: Perform reference calibration on the specified temperature sensor based on the reference temperature difference.

[0136] As described in steps S621-S622 above, since the losses of various sensors are related under the same environment, the changes of a specified temperature sensor can be reflected by acquiring the changes of other sensors. Specifically, the detection differences of other sensors within multiple preset time periods and multiple preset temperature ranges are acquired to obtain a set of detection differences corresponding to each preset temperature range. This expands the data source and reduces the potential error of a single sensor. By introducing the measurement results of other sensors (such as humidity and pressure sensors), the performance of the specified temperature sensor can be compared and verified. First, appropriate other sensors should be selected. These sensors need to have good calibration and reliable measurement capabilities to ensure the authenticity and reliability of the data. For each preset temperature range, the detection results of other sensors are recorded within each time period and compared with the actual measured values ​​to calculate the set of detection differences for each sensor. The conversion parameter between the set of detection differences and the set of temperature differences is calculated according to the formula. This involves the relationship between multiple detection differences and temperature differences. To achieve this, the relationship between the data sets needs to be clarified first, and a corresponding mathematical model needs to be established. Specifically, a formula is set to define the conversion parameter T, thereby establishing the relationship between the detection differences and the temperature differences. This can be achieved through statistical analysis by comparing the differences within the same temperature range. By comparing the difference between the k-th and h-th values ​​in each set of detection differences with the difference between the k-th and h-th values ​​in the set of temperature differences, the transformation parameter T can be obtained. This parameter reflects the relationship between the two. The calculation process involves mathematical tools such as linear regression and least squares to ensure that an optimal transformation parameter is obtained.

[0137] As described in steps S623-S625 above, the temperature range corresponding to the current time point is queried using the previously defined time period. The target detection difference of other sensors at this time point can help understand the impact of temperature changes at this time. By applying the set formula, the reference temperature difference that the specified temperature sensor should adjust to under the current environmental conditions can be obtained. That is, the reference temperature difference of the specified temperature sensor is calculated based on the target detection difference and the conversion parameter. Specifically, the calculation method can be to directly calculate using the conversion parameter, or to obtain a specific historical detection difference and historical temperature difference, and then input them into the above formula. Since the conversion parameter and z are known, the only unknown parameter in the formula is the temperature difference, so the reference temperature difference can be directly obtained. The implementation of reference calibration usually involves adjusting the sensor output so that its measurement results are consistent with the reference temperature difference obtained through the steps, including recalibrating the sensor's zero point, gain, or other relevant parameters. In addition, after performing reference calibration, the calibration effect can be verified through experiments or further measurements to confirm whether the sensor can effectively reproduce the real temperature data under the new settings. The purpose of this step is not only to correct the current error, but also to provide a stable and consistent output, ensuring the accuracy and reliability of subsequent long-term monitoring and data.

[0138] In one embodiment, before step S1 of obtaining the temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods to obtain a set of temperature difference values ​​corresponding to each preset temperature range, the method further includes:

[0139] S001: Obtain the historical usage records of the specified temperature sensor;

[0140] S002: Set the target interval for preliminary calibration based on the historical usage records;

[0141] S003: Obtain the historical calibration time point of the last preliminary calibration, and determine whether the interval between the historical calibration time point and the current time point reaches the target interval time;

[0142] S004: If the time interval between the historical calibration time point and the current time point reaches the target interval time, then it is determined that the condition for performing the step of obtaining the temperature difference value of the specified temperature sensor in multiple preset temperature ranges within multiple preset time periods to obtain the set of temperature difference values ​​corresponding to each preset temperature range is met.

[0143] As described in steps S001-S004 above, because the probability of aging is low when the specified sensor is in different usage history, such as immediately after being updated, its detection error will be small for a long period of time. However, after being used for some time or under harsh environmental conditions, its detection error will increase significantly over time. Therefore, the target interval for preliminary calibration can be set based on the sensor's historical usage records. Usage records refer to all operational data and performance of the sensor over a past period, including but not limited to working hours, environmental conditions, usage frequency, fault records, and the date and results of periodic calibrations. This information can be extracted from the sensor's internal storage, external database, or relevant monitoring systems. The stability data regarding sensor performance in the historical usage records is analyzed. If the sensor maintains good performance for a long period, its preliminary calibration frequency can be set relatively long; conversely, if deviations or faults occur frequently during use, the interval can be shortened. The timestamp of the last calibration is extracted. This time point is the starting reference for the calibration cycle. The system then calculates the interval from this time point to the current time point. The measurement is usually performed in hours, days or other suitable time units. By comparing the calculated interval with the previously set target interval, the system can determine whether the current time is suitable for calibration. If the interval from the historical calibration time point to the current time point reaches the target interval, it is determined that the conditions are met to obtain the temperature difference values ​​of the specified temperature sensor in multiple preset time periods and multiple preset temperature ranges, so as to obtain the set of temperature difference values ​​corresponding to each preset temperature range.

[0144] Reference Figure 3 The present invention also provides a calibration device for a temperature sensor, the device comprising:

[0145] The first acquisition module 902 is used to acquire the temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods, so as to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value.

[0146] The calculation module 904 is used to calculate the change value of the temperature difference between two adjacent preset time periods in the temperature difference value set, so as to obtain the temperature difference value change set;

[0147] The fitting module 906 is used to fit a relationship function for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes.

[0148] The second acquisition module 908 is used to acquire the current time point and acquire the target temperature difference value of each preset temperature range according to the relationship function and the current time point;

[0149] A calibration module 910 for preliminarily calibrating the specified temperature sensor based on the target temperature difference.

[0150] In one embodiment, the fitting module 906 includes:

[0151] An initial relationship function setting sub-module for presetting the initial relationship function of each preset temperature range , then ; where represents the s-th preset time period in the r-th preset temperature range, represents the predicted temperature difference corresponding to the s-th preset time period in the r-th preset temperature range, t, , ,..., are all parameters to be obtained, is 's derivative;

[0152] An error minimum value setting sub-module for limiting the minimum error between the curve to be fitted and the weighted sums of each in the same preset temperature range through the error minimum value calculation formula ; where n is the number of preset time periods, is the error value, is the derivative of the error value. When 1 < s < n, , represents the temperature difference corresponding to the s-th preset time period in the r-th preset temperature range, represents the temperature difference corresponding to the s + 1-th preset time period in the r-th preset temperature range, represents the temperature difference corresponding to the s - 1-th preset time period in the r-th preset temperature range, represents the s + 1-th preset time period in the r-th preset temperature range, represents the s - 1-th preset time period in the r-th preset temperature range. When s = 1, , when s = n, , represents finding the minimum value;

[0153] A partial derivative calculation sub-module for taking the partial derivatives of the two right sides of the error minimum value calculation formula to obtain , transforming into matrices and simplifying to obtain the first matrix , and the second matrix ;

[0154] A parameter obtaining sub-module for obtaining the parameters t, , ,..., Substitute these values ​​into the initial relational function to obtain the relational function for each preset temperature range.

[0155] In one embodiment, the temperature sensor calibration device further includes:

[0156] A designated temperature sensor placement module is used to sequentially place the pre-calibrated designated temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the designated temperature sensor.

[0157] The target preset temperature range acquisition module is used to acquire the corresponding target preset temperature range based on the test temperature.

[0158] The test temperature arrangement module is used to arrange the various test temperatures and determine the first test temperature to be processed from the various test temperatures based on the arrangement order.

[0159] A preset temperature range acquisition module is used to acquire the preset temperature range and preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain the correction result, and record the correction result within the preset temperature range.

[0160] The second test temperature determination module is used to determine the second test temperature for the next process from each test temperature based on the arrangement order;

[0161] The repeat module is used to determine the second test temperature as the first test temperature and repeatedly execute the target step; the target step is to obtain a preset temperature range and a preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain a correction result, and record the correction result within the preset temperature range.

[0162] The calibration parameter setting module is used to set the calibration parameters for each preset temperature range based on the calibration results of each test temperature after all test temperatures have been calibrated.

[0163] The recalibration module is used to recalibrate the specified temperature sensor based on the calibration parameters.

[0164] In one embodiment, the first acquisition module 902 includes:

[0165] The first temperature value set acquisition submodule is used to acquire the first temperature value set after the last recalibration of the specified temperature sensor in each preset time period, and the second temperature value set actually measured by each specified temperature sensor; wherein, the first temperature value set includes the first temperature value in multiple preset time periods, and the second temperature value set includes the second temperature value in multiple preset time periods.

[0166] The temperature difference calculation submodule is used to subtract the corresponding second temperature value from the first temperature value to obtain a set of temperature differences corresponding to all preset temperature ranges.

[0167] In one embodiment, the temperature sensor calibration device further includes:

[0168] The historical time point acquisition module is used to acquire the historical time point of the last recalibration;

[0169] The historical time point judgment module is used to monitor whether the interval between the historical time point and the current time point reaches a preset interval period.

[0170] The determination module is used to monitor the interval duration and determine if the conditions for performing the step of placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor are met.

[0171] In one embodiment, the calibration parameter setting module includes:

[0172] An initial counting matrix setting submodule is used to set an initial counting matrix; wherein the dimension of the initial counting matrix is ​​the same as the number of preset temperature ranges;

[0173] The assignment submodule is used to assign values ​​to the numbers in the initial counting matrix according to the number of each test temperature within each preset temperature range, so as to obtain the target counting matrix;

[0174] The first correction parameter setting submodule is used to calculate the average value of each temperature correction result for the first coordinate in the target counting matrix that is not zero, so as to use it as the correction parameter for the preset temperature range.

[0175] In one embodiment, the calibration parameter setting module further includes:

[0176] The second coordinate marking submodule is used to mark the second coordinate that is 0 in each of the target counting matrices;

[0177] The adjacent preset temperature range correction parameter acquisition submodule is used to acquire the correction parameters of the adjacent preset temperature ranges of the preset temperature range corresponding to the second coordinate;

[0178] The second calibration parameter setting submodule is used to set the calibration parameters for the preset temperature range according to the calibration parameters of the adjacent preset temperature range.

[0179] Figure 4An internal structural diagram of an electronic device in one embodiment is shown. This electronic device can specifically be a terminal or a server, and more specifically, a temperature measuring device containing the specified sensor. Figure 4 As shown, the electronic device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a temperature sensor calibration method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement the temperature sensor calibration method. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0180] In one embodiment, an electronic device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps:

[0181] The temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods are obtained to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value.

[0182] Calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set to obtain the temperature difference change set;

[0183] A relationship function is fitted for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes;

[0184] Obtain the current time point, and obtain the target temperature difference value for each preset temperature range according to the relationship function and the current time point;

[0185] The specified temperature sensor is initially calibrated based on the target temperature difference. By acquiring temperature differences within different preset temperature ranges over multiple preset time periods, a comprehensive temperature response model is constructed. Nonlinear characteristics are extracted using the changes in adjacent temperature differences to fit a relationship function, dynamically acquiring the target temperature difference at the current time point. This achieves intelligent and real-time temperature correction. It avoids the inconvenience of traditional temperature sensors relying on factory calibration, reduces errors caused by temperature fluctuations in practical applications, and simultaneously reduces calibration time and cost.

[0186] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the following steps:

[0187] The temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods are obtained to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value.

[0188] Calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set to obtain the temperature difference change set;

[0189] A relationship function is fitted for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes;

[0190] Obtain the current time point, and obtain the target temperature difference value for each preset temperature range according to the relationship function and the current time point;

[0191] The specified temperature sensor is initially calibrated based on the target temperature difference. By acquiring temperature differences within different preset temperature ranges over multiple preset time periods, a comprehensive temperature response model is constructed. Nonlinear characteristics are extracted using the changes in adjacent temperature differences to fit a relationship function, dynamically acquiring the target temperature difference at the current time point. This achieves intelligent and real-time temperature correction. It avoids the inconvenience of traditional temperature sensors relying on factory calibration, reduces errors caused by temperature fluctuations in practical applications, and simultaneously reduces calibration time and cost.

[0192] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0193] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0194] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A calibration method for a temperature sensor, characterized in that, The method includes: The temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods are obtained to obtain a set of temperature difference values ​​corresponding to each preset temperature range; wherein, the temperature difference value is the difference between the temperature value measured by the specified temperature sensor and the actual temperature value. Calculate the change in temperature difference between two adjacent preset time periods in the temperature difference set to obtain the temperature difference change set; A relationship function is fitted for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes; Obtain the current time point, and obtain the target temperature difference value for each preset temperature range according to the relationship function and the current time point; The specified temperature sensor is initially calibrated based on the target temperature difference. After the step of performing preliminary calibration of the designated temperature sensor based on the target temperature difference, the method further includes: The pre-calibrated specified temperature sensor is placed in a series of external environments with preset temperatures to obtain the test temperature of the specified temperature sensor. Based on the test temperature, obtain the corresponding target preset temperature range; The test temperatures are arranged in order, and the first test temperature to be processed is determined from the test temperatures based on the arrangement order. Obtain the preset temperature range and preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain the correction result, and record the correction result within the preset temperature range; Based on the order of arrangement, the second test temperature for the next process is determined from each test temperature; The second test temperature is determined as the first test temperature, and the target step is repeated; the target step is to obtain the preset temperature range and preset temperature corresponding to the first test temperature, correct the first test temperature based on the preset temperature, obtain the correction result, and record the correction result within the preset temperature range. Once all test temperatures have been calibrated, the calibration parameters for each preset temperature range are set based on the calibration results of each test temperature. The specified temperature sensor is recalibrated based on the calibration parameters.

2. The calibration method for the temperature sensor according to claim 1, characterized in that, The step of fitting a relationship function for each preset temperature range based on the set of temperature difference values ​​and the set of temperature difference changes includes: Pre-set the initial relationship function for each preset temperature range. ,but ;in, This represents the s-th preset time period within the r-th preset temperature range. This represents the predicted temperature difference corresponding to the s-th preset time period within the r-th preset temperature range, where t, , ... These are all parameters to be obtained. for The derivative; By means of the error minimum value calculation formula Define the minimum error value between the curve to be fitted and each weighted sum within the same preset temperature range; where, n is the number of preset time periods, is the error value, is the derivative of the error value. When 1 < s < n, , represents the temperature difference corresponding to the s-th preset time period in the r-th preset temperature range, represents the temperature difference corresponding to the (s + 1)-th preset time period in the r-th preset temperature range, represents the temperature difference corresponding to the (s - 1)-th preset time period in the r-th preset temperature range, represents the (s + 1)-th preset time period in the r-th preset temperature range, represents the (s - 1)-th preset time period in the r-th preset temperature range. When s = 1, When s = n, , represents finding the minimum value; Taking the partial derivatives of the two right-hand sides of the formula for calculating the minimum error, we get The first matrix is ​​obtained by converting it into a matrix and simplifying it. and the second matrix ; Based on the first matrix and the second matrix, calculate the parameters t, , ... Substitute these values ​​into the initial relational function to obtain the relational function for each preset temperature range.

3. The calibration method for the temperature sensor according to claim 1, characterized in that, The step of obtaining the temperature difference values ​​of a specified temperature sensor within multiple preset temperature ranges over multiple preset time periods to obtain a set of temperature difference values ​​corresponding to each preset temperature range includes: Obtain the first temperature value set after the last recalibration of the specified temperature sensor for each preset time period, and the second temperature value set actually measured by each specified temperature sensor; wherein, the first temperature value set includes the first temperature value for multiple preset time periods, and the second temperature value set includes the second temperature value for multiple preset time periods. Subtract the corresponding second temperature value from the first temperature value to obtain the set of temperature differences corresponding to all preset temperature ranges.

4. The calibration method for the temperature sensor according to claim 1, characterized in that, Before the step of sequentially placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor, the method further includes: Retrieve the historical time point of the last recalibration; Monitor whether the time interval between the historical time point and the current time point reaches a preset interval period; If the monitoring interval reaches a preset interval period, it is determined that the conditions for performing the step of sequentially placing the pre-calibrated specified temperature sensor in an external environment with multiple preset temperatures to obtain the test temperature of the specified temperature sensor are met.

5. The calibration method for a temperature sensor according to claim 1, characterized in that, The step of setting correction parameters for each preset temperature range based on the correction results of each test temperature after all test temperatures have been corrected includes: Set an initial counting matrix; wherein the dimension of the initial counting matrix is ​​the same as the number of preset temperature ranges; Based on the number of each test temperature within each preset temperature range, the numbers in the initial counting matrix are assigned values ​​to obtain the target counting matrix; For the first coordinate in the target counting matrix that is not zero, calculate the average value of each temperature correction result, and use it as the correction parameter for the preset temperature range.

6. The calibration method for a temperature sensor according to claim 5, characterized in that, After the step of calculating the average value of each temperature correction result for the first coordinate in the target counting matrix that is not zero, and using it as the correction parameter for the preset temperature range, the method further includes: Mark the second coordinate of each target counting matrix that is 0; Obtain the correction parameters of the adjacent preset temperature ranges corresponding to the second coordinate preset temperature range; The correction parameters for the preset temperature range are set according to the correction parameters of the adjacent preset temperature range.

7. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, causes the processor to perform the steps of the calibration method for the temperature sensor as described in any one of claims 1 to 6.

8. An electronic device, characterized in that, The device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the calibration method for the temperature sensor as described in any one of claims 1 to 6.