Temperature determination method and device, electronic equipment, storage medium and program product
By establishing a temperature determination model of the temperature sensor, the problem of inaccurate temperature detection in the prior art is solved, and higher temperature detection accuracy and real-time performance are achieved.
Patent Information
- Application Number
- CN202510259006.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-05-27
AI Technical Summary
When detecting the internal temperature of the device, the temperature sensor is susceptible to environmental factors and errors in the MCU hardware, resulting in a change in the relationship between the resistor AD sampling value and the temperature value, and it is impossible to accurately detect the internal temperature of the device.
By pre-establishing the temperature determination model of the temperature sensor, the temperature value of the target device is determined based on the resistance sampling AD value and the temperature determination relationship. This model determines the coefficient values of the to-determined coefficients through multiple sample resistance values and temperature values, combined with the preset relationship model, thereby generating a more accurate temperature determination relationship.
It realizes more accurate detection of the internal temperature of the equipment, reduces the time consumption of model calculation, and improves the real-time and accuracy of temperature detection.
Smart Images

Figure CN120043651A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of device detection, and particularly to a method, apparatus, electronic device, storage medium, and program product for determining temperature. Background Art
[0002] Currently, when detecting the internal temperature of a device (such as a refrigerator), the temperature sensor used is usually an NTC (Negative Temperature Coefficient) thermistor. Its working principle is to achieve temperature detection by corresponding each specific resistance value to a temperature value. However, due to the fact that the temperature sensor itself is susceptible to environmental factors, and there are certain errors in the MCU (Microcontroller Unit) hardware itself, the relationship between the resistance AD sampling value and the temperature value will change, resulting in the relationship table between resistance and temperature obtained from experiments no longer being applicable to different temperature sensors. If the relationship table between resistance and temperature is directly referred to, it will lead to large errors and cannot accurately detect the internal temperature of the device. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a method, apparatus, electronic device, storage medium, and program product for determining temperature.
[0004] According to the first aspect of the embodiments of the present disclosure, a method for determining temperature is provided, including: Obtaining the resistance sampling AD value of the temperature sensor of the target device; Determining the target temperature value corresponding to the resistance sampling AD value according to the resistance sampling AD value and the temperature determination relationship; the temperature determination relationship includes the corresponding relationship between the resistance AD value and the temperature value, and the temperature determination relationship is generated according to a temperature determination model, and the temperature determination model is used to characterize the corresponding relationship between the resistance value and the temperature value of the temperature sensor.
[0005] Optionally, the temperature determination model is determined by the following method: Determining the temperature determination model according to a plurality of sample resistance values, the sample temperature value corresponding to each sample resistance value, and a preset relationship model; the preset relationship model is used to characterize the corresponding relationship between resistance and temperature, and the preset relationship model includes at least one undetermined coefficient.
[0006] Optionally, the determining the temperature determination model according to the plurality of sample resistance values, the sample temperature value corresponding to each sample resistance value, and the preset relationship model includes: Determining the coefficient value of the undetermined coefficient according to the plurality of sample resistance values and the sample temperature value corresponding to each sample resistance value; Substitute the coefficient values into the preset relationship model to obtain the temperature determination model.
[0007] Optionally, the temperature determination relationship is determined by the following method: Determine a first correspondence according to the temperature determination model; Compensate the first correspondence according to a second correspondence to obtain the temperature determination relationship, where the second correspondence includes the correspondence between the actually detected temperature value and the resistance AD value.
[0008] Optionally, the determining the first correspondence according to the temperature determination model includes: According to the temperature determination model, obtain a plurality of first resistance values and the first temperature values corresponding to each of the first resistance values; Determine the first resistance AD value corresponding to each of the first resistance values; Take the correspondence between the first resistance AD value and the first temperature value as the first correspondence.
[0009] Optionally, the second correspondence includes: at least one second resistance AD value and the second temperature values corresponding to each of the second resistance AD values; the compensating the first correspondence according to the second correspondence to obtain the temperature determination relationship includes: Determine a third resistance AD value matching the second resistance AD value from the first resistance AD values in the first correspondence; Compensate the third temperature value corresponding to the third resistance AD value according to the second temperature value to obtain the temperature determination relationship.
[0010] According to the second aspect of the embodiments of the present disclosure, there is provided a temperature determination device, including: An acquisition module, configured to acquire the resistance sampling AD value of the temperature sensor of the target device; A determination module, configured to determine the target temperature value corresponding to the resistance sampling AD value according to the resistance sampling AD value and the temperature determination relationship; the temperature determination relationship includes the correspondence between the resistance AD value and the temperature value, and the temperature determination relationship is generated according to a temperature determination model, and the temperature determination model is used to characterize the correspondence between the resistance value and the temperature value of the temperature sensor.
[0011] Optionally, the temperature determination model is determined by the following method: Determine the temperature determination model according to a plurality of sample resistance values corresponding to the temperature sensor, sample temperature values corresponding to each of the sample resistance values, and a preset relationship model; the preset relationship model is used to characterize the corresponding relationship between resistance and temperature, and the preset relationship model includes at least one undetermined coefficient.
[0012] Optionally, the determining the temperature determination model according to a plurality of sample resistance values corresponding to the temperature sensor, sample temperature values corresponding to each of the sample resistance values, and a preset relationship model includes: Determine the coefficient values of the undetermined coefficients according to the plurality of sample resistance values and the sample temperature values corresponding to each of the sample resistance values; Substitute the coefficient values into the preset relationship model to obtain the temperature determination model.
[0013] Optionally, the temperature determination relationship is determined by the following method: Determine a first correspondence according to the temperature determination model; Compensate the first correspondence according to a second correspondence to obtain the temperature determination relationship, where the second correspondence includes the corresponding relationship between the actually detected temperature value and the resistance AD value.
[0014] Optionally, the determining a first correspondence according to the temperature determination model includes: Obtain a plurality of first resistance values and first temperature values corresponding to each of the first resistance values according to the temperature determination model; Determine the resistance AD value corresponding to each of the first resistance values; Use the corresponding relationship between the resistance AD value and the first temperature value as the first correspondence.
[0015] Optionally, the second correspondence includes: at least one second resistance AD value and a second temperature value corresponding to each of the second resistance AD values; the compensating the first correspondence according to the second correspondence to obtain the temperature determination relationship includes: Determine a third resistance AD value that matches the second resistance AD value from the first resistance AD values in the first correspondence; Compensate the third temperature value corresponding to the third resistance AD value according to the second temperature value to obtain the temperature determination relationship.
[0016] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including: A processor; A memory for storing processor-executable instructions; Wherein, the processor is configured to: Obtain the resistance sampling AD value of the temperature sensor of the target device; Determine the target temperature value corresponding to the resistance sampling AD value according to the relationship between the resistance sampling AD value and temperature; the temperature determination relationship includes the corresponding relationship between the resistance AD value and the temperature value, and the temperature determination relationship is generated according to the temperature determination model, and the temperature determination model is used to characterize the corresponding relationship between the resistance value and the temperature value of the temperature sensor.
[0017] According to the fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect of the embodiments of the present disclosure are implemented.
[0018] According to the fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect of the embodiments of the present disclosure are implemented.
[0019] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: The present disclosure pre-establishes a temperature determination model for the temperature sensor, generates a temperature determination relationship according to the temperature determination model, and then determines the temperature value of the target device according to the resistance sampling AD value and the temperature determination relationship. Since the temperature determination model can more accurately characterize the corresponding relationship between the resistance value and the temperature value, the temperature determination relationship generated according to the temperature determination model can also more accurately characterize the corresponding relationship between the resistance value and the temperature value. In this way, the temperature of the device can be detected more accurately through the temperature determination relationship. And, determining the temperature value through the temperature determination relationship can reduce the time consumption of model calculation, and improve the real-time performance of temperature detection while ensuring accuracy.
[0020] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Description of the Drawings
[0021] The drawings here are incorporated into the specification and constitute a part of the specification, showing the embodiments in line with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0022] Figure 1 It is a flowchart of a method for determining a temperature shown according to an exemplary embodiment.
[0023] Figure 2 It is a flowchart of another method for determining a temperature shown according to an exemplary embodiment.
[0024] Figure 3 It is a block diagram of a device for determining a temperature shown according to an exemplary embodiment.
[0025] Figure 4 It is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners
[0026] Here, the exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0027] Before introducing a method, apparatus, electronic device, storage medium, and program product for determining a temperature shown in the embodiments of the present disclosure, the application scenarios of the embodiments of the present disclosure will be introduced first.
[0028] In the related art, for the solution of detecting the internal temperature of a thermistor detection device, the technical solution of directly referring to the relationship table between resistance and temperature to determine the internal temperature of the device will cause a large error and cannot accurately detect the internal temperature of the device. To solve the error problem of such sensors, a segmented processing method has been adopted in the research. The specific approach is to divide the temperature range into three temperature segments: high, medium, and low, and different processing methods are used for different temperature segments. For the high and low temperature segments, since these two temperature segments have a greater impact on the reading of the temperature sensor, they are further divided into multiple small segments to ensure that the temperature sampling accuracy reaches 0.1 degree. For the medium ambient temperature segment, the original value read by the sensor is maintained.
[0029] Although this method can control the temperature accuracy within 0.1 degree, it has a significant problem. That is, the relationship table between the AD (Analog – Digital Conversion) sampling value and the temperature T is obtained through experiments, so it does not have universality. For different devices, due to possible errors in the hardware, the relationship between the AD sampling value and the temperature T will change, resulting in the original relationship table no longer being applicable to other devices. This means that although the segmented processing method improves the temperature sampling accuracy to a certain extent, it is still limited by hardware differences and cannot ensure accurate results on all devices.
[0030] The present disclosure pre - establishes a temperature determination model for a temperature sensor, generates a temperature determination relationship according to the temperature determination model, and determines the temperature value of the target device based on the resistance sampling AD value and the temperature determination relationship. Since the temperature determination model can more accurately characterize the corresponding relationship between the resistance value and the temperature value, the temperature determination relationship generated according to the temperature determination model can also more accurately characterize the corresponding relationship between the resistance value and the temperature value. In this way, the temperature of the device can be more accurately detected through the temperature determination relationship. Moreover, determining the temperature value through the temperature determination relationship can reduce the time consumption of model calculation, improving the real - time performance of temperature detection while ensuring accuracy.
[0031] The target device in the embodiments of the present disclosure can be a smart home device, such as a refrigerator, an oven, an air conditioner, or can also be a terminal device such as a smart phone, a tablet computer, a smart TV, a smart watch, a PDA (Personal Digital Assistant), a portable computer, etc. The present disclosure does not make specific limitations on the category of the target device.
[0032] Figure 1 It is a flowchart of a method for determining temperature shown according to an exemplary embodiment. As Figure 1 shown, the method may include the following steps.
[0033] In step S101, obtain the resistance sampling AD value of the temperature sensor of the target device.
[0034] In some embodiments, the sampling AD value of the temperature sensor obtained in real - time can be used as the resistance sampling AD value.
[0035] In other embodiments, multiple sampling AD values of the temperature sensor can be obtained, and the average value of the multiple sampling AD values can be used as the resistance sampling AD value.
[0036] In other embodiments, multiple sampling AD values of the temperature sensor can be obtained, and the average value of the sampling AD values except the maximum value and the minimum value among the multiple sampling AD values can be used as the resistance sampling AD value.
[0037] In step S102, determine the target temperature value corresponding to the resistance sampling AD value according to the resistance sampling AD value and the temperature determination relationship.
[0038] Among them, the temperature determination relationship includes the corresponding relationship between the resistance AD value and the temperature value. For example, it can be a corresponding relationship table between the resistance AD value and the temperature value, or a corresponding relationship curve between the resistance AD value and the temperature value, etc. The temperature determination relationship is generated according to the temperature determination model, and the temperature determination model is used to characterize the corresponding relationship between the resistance value and the temperature value.
[0039] In some other embodiments, the temperature determination model can be determined in the following manner: Based on a plurality of sample resistance values corresponding to the temperature sensor and the sample temperature values corresponding to each sample resistance value, and a preset relationship model, the temperature determination model is determined. Among them, the preset relationship model can be used to represent the corresponding relationship between resistance and temperature, and the preset relationship model can include at least one undetermined coefficient, and the undetermined coefficient can be related to the type, model and temperature range of the thermistor of the temperature sensor.
[0040] Exemplarily, the preset relationship model can be the Steinhart-Hart equation shown in Formula 1, where A, B, and C are the undetermined coefficients of the preset relationship model.
[0041] (Formula 1) Among them, T is the temperature (unit: Kelvin), and R is the resistance at temperature T (unit: Ohm).
[0042] The preset relationship model can also be an exponential model as shown in Formula 2.
[0043] (Formula 2) Among them, R(T) is the resistance value at temperature T, and R 0 is the resistance value at the reference temperature T 0 (unit: Kelvin), and D is the undetermined coefficient.
[0044] In some other embodiments, a plurality of sample resistance values of the temperature sensor and the sample temperature values corresponding to each sample resistance value can be measured through experiments, and then, based on the plurality of sample resistance values and the sample temperature values corresponding to each sample resistance value, the coefficient values of the undetermined coefficients are determined, and the coefficient values are substituted into the preset relationship model to obtain the temperature determination model.
[0045] Taking the preset relationship model as the Steinhart-Hart equation as an example, the resistance-temperature relationship of the temperature sensor can be modeled through Matlab and the Steinhart-Hart equation, the values of the undetermined coefficients A, B, and C are solved, and the values of the undetermined coefficients A, B, and C are substituted into the Steinhart-Hart equation to obtain the temperature determination model.
[0046] It should be noted that for each type of temperature sensor, multiple sample resistance values corresponding to the temperature sensor and the sample temperature values corresponding to each sample resistance value can be measured through experiments respectively, and based on the multiple sample resistance values, the multiple sample temperature values, and a preset relationship model, the temperature determination model corresponding to the temperature sensor can be determined. Since the types, models, and temperature ranges of the thermistors of each type of temperature sensor are different, the temperature determination models corresponding to each type of temperature sensor may be different.
[0047] In some other embodiments, the temperature determination relationship can be determined in the following manner: According to the temperature determination model, obtain multiple first resistance values and the first temperature values corresponding to each first resistance value.
[0048] Determine the first resistance AD value corresponding to each first resistance value.
[0049] Take the correspondence between the first resistance AD value and the first temperature value as the temperature determination relationship.
[0050] Exemplarily, multiple first resistance values and the first temperature values corresponding to each first resistance value can be obtained from the temperature determination model at a preset temperature sampling interval, and the correspondence between the first resistance AD value corresponding to the first resistance value and the first temperature value is taken as the temperature determination relationship. Among them, the preset temperature sampling interval can be as small as possible to make the sampling data of resistance - temperature more dense, so that the temperature determination relationship is more accurate.
[0051] In some other embodiments, the temperature determination relationship is determined through the following steps: Step 1: Determine the first correspondence according to the temperature determination model.
[0052] Exemplarily, multiple first resistance values and the first temperature values corresponding to each first resistance value can be obtained from the temperature determination model at a preset temperature sampling interval, and the correspondence between the first resistance AD value corresponding to the first resistance value and the first temperature value is taken as the first correspondence.
[0053] Step 2: Compensate the first correspondence according to the second correspondence to obtain the temperature determination relationship, where the second correspondence includes the correspondence between the actually detected temperature value and the resistance AD value.
[0054] Exemplarily, some specific temperature values and their corresponding resistance AD values can be actually detected through experiments in advance to compensate the first correspondence obtained according to the temperature determination model and obtain a more accurate temperature determination relationship.
[0055] In some other embodiments, the second corresponding relationship may include at least one second resistance AD value and a second temperature value corresponding to each of the second resistance AD values. From the first resistance AD values in the first corresponding relationship, a third resistance AD value that matches the second resistance AD value is determined, and the third temperature value corresponding to the third resistance AD value is compensated according to the second temperature value to obtain a temperature determination relationship.
[0056] For example, the second corresponding relationship may be as shown in Table 1, and the first corresponding relationship may be as shown in Table 2.
[0057]
[0058] Table 1
[0059] Table 2 The first resistance AD values in the first corresponding relationship include 205, 164, 102, 61, 41, and the first temperature values include: 10.5, 15.2, 20.1, 25.3, 29.8. The second resistance AD values in the second corresponding relationship include 205, 102, 41, and the second temperature values include: 10, 20, 30. Among them, the third resistance AD values that match the second resistance AD values in the first resistance AD values may be 205, 102, 41. Correspondingly, the third temperature values corresponding to the third resistance AD values may be 10.5, 20.1, 29.8. The second temperature values 10, 20, 30 can be used to compensate the third temperature values 10.5, 20.1, 29.8. For example, -0.5 can be compensated for 10.5 to obtain 10, -0.1 can be compensated for 20.1 to obtain 20, and 0.2 can be compensated for 29.8 to obtain 30, so as to obtain the temperature determination relationship as shown in Table 3.
[0060]
[0061] Table 3 In some other embodiments, the second corresponding relationship may include at least one second resistance AD value and a second temperature value corresponding to each of the second resistance AD values. The second corresponding relationship can obtain a temperature determination relationship by compensating the specified temperature value in the first corresponding relationship according to the second temperature value. Among them, the specified temperature value may be at least one temperature value in the second corresponding relationship. For example, the specified temperature value may be all the second temperature values, such as 10.5, 15.2, 20.1, 25.3, 30.8 in Table 2. The specified temperature value may also be some of the third temperature values and the fourth temperature values corresponding to the fourth resistance AD values other than the third resistance AD values, such as 10.5, 15.2, 25.3, 30.8 in Table 2. The present disclosure does not specifically limit the range of the specified temperature value.
[0062] In some other embodiments, for the fourth temperature value in the first corresponding relationship, the fourth temperature value can be compensated according to the second temperature value by using the linear interpolation method.
[0063] In this way, compensating the first corresponding relationship according to the second corresponding relationship obtained through experiments to obtain the temperature determination relationship can further improve the accuracy of the temperature determination relationship, thereby improving the temperature detection accuracy.
[0064] Figure 2 is a flowchart of another method for determining temperature shown according to an exemplary embodiment, as Figure 2 shown, step S101 can be implemented through the following steps: Step S1011, obtain multiple sampled AD values of the temperature sensor.
[0065] Exemplarily, the temperature sensor can be sampled multiple times through the AD port of a controller such as the MCU or SOC (System on Chip) of the target device to obtain multiple sampled AD values of the temperature sensor.
[0066] Step S1012, use the sampled AD values other than the maximum AD value and the minimum AD value among the multiple sampled AD values as candidate sampled AD values.
[0067] Step S1013, use the average value of the candidate sampled AD values as the resistance sampled AD value.
[0068] Exemplarily, the multiple sampled AD values can be summed to obtain the total sampled AD value, then subtract the maximum value and the minimum value among the multiple sampled AD values from the total sampled AD value to obtain the candidate sampled AD values, and use the average value of the candidate sampled AD values as the resistance sampled AD value. In this way, the influence of the sampled AD values with large errors among the multiple sampled AD values on the resistance sampled AD value can be avoided, and the accuracy of the resistance sampled AD value is improved.
[0069] Taking the number of multiple sampled AD values as N as an example, the resistance sampled AD value ADvalue can be calculated through formula 3.
[0070] (Formula 3) In summary, the present disclosure pre - establishes a temperature determination model for a temperature sensor, generates a temperature determination relationship according to the temperature determination model, and then determines the temperature value of the target device based on the resistance sampling AD value and the temperature determination relationship. Since the temperature determination model can more accurately represent the corresponding relationship between the resistance value and the temperature value, the temperature determination relationship generated according to the temperature determination model can also more accurately represent the corresponding relationship between the resistance value and the temperature value. In this way, the temperature of the device can be detected more accurately through the temperature determination relationship. Moreover, determining the temperature value through the temperature determination relationship can reduce the time consumption of model calculation and improve the real - time performance of temperature detection while ensuring accuracy.
[0071] Figure 3 is a block diagram of a temperature determination device shown according to an exemplary embodiment, as Figure 3 shown. The device 200 includes: An acquisition module 201, configured to acquire the resistance sampling AD value of the temperature sensor of the target device.
[0072] A determination module 202, configured to determine the target temperature value corresponding to the resistance sampling AD value according to the resistance sampling AD value and the temperature determination relationship. Wherein, the temperature determination relationship includes the corresponding relationship between the resistance AD value and the temperature value, and the temperature determination relationship is generated according to the temperature determination model, and the temperature determination model is used to represent the corresponding relationship between the resistance value and the temperature value.
[0073] In some embodiments, the temperature determination model is determined in the following manner: According to a plurality of sample resistance values corresponding to the temperature sensor, the sample temperature value corresponding to each sample resistance value, and a preset relationship model, determine the temperature determination model. The preset relationship model is used to represent the corresponding relationship between the resistance and the temperature, and the preset relationship model includes at least one undetermined coefficient.
[0074] In other embodiments, determining the temperature determination model according to a plurality of sample resistance values corresponding to the temperature sensor, the sample temperature value corresponding to each sample resistance value, and a preset relationship model includes: Determine the coefficient values of the undetermined coefficients according to the plurality of sample resistance values and the sample temperature value corresponding to each sample resistance value.
[0075] Substitute the coefficient values into the preset relationship model to obtain the temperature determination model.
[0076] In other embodiments, the temperature determination relationship is determined in the following manner: Determine the first corresponding relationship according to the temperature determination model.
[0077] Compensate the first correspondence according to the second correspondence to obtain a temperature determination relationship, where the second correspondence includes the correspondence between the actually detected temperature value and the resistance AD value.
[0078] In some other embodiments, determining the first correspondence according to the temperature determination model includes: According to the temperature determination model, obtain a plurality of first resistance values and the first temperature value corresponding to each first resistance value.
[0079] Determine the first resistance AD value corresponding to each first resistance value.
[0080] Take the correspondence between the first resistance AD value and the first temperature value as the first correspondence.
[0081] In some other embodiments, the second correspondence includes: at least one second resistance AD value and the second temperature value corresponding to each second resistance AD value. Compensating the first correspondence according to the second correspondence to obtain the temperature determination relationship includes: From the first resistance AD values in the first correspondence, determine a third resistance AD value that matches the second resistance AD value; Compensate the third temperature value corresponding to the third resistance AD value according to the second temperature value to obtain the temperature determination relationship.
[0082] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0083] In summary, the present disclosure pre - establishes a temperature determination model for a temperature sensor, generates a temperature determination relationship according to the temperature determination model, and then determines the temperature value of the target device according to the resistance sampling AD value and the temperature determination relationship. Since the temperature determination model can more accurately represent the correspondence between the resistance value and the temperature value, the temperature determination relationship generated according to the temperature determination model can also more accurately represent the correspondence between the resistance value and the temperature value. In this way, the temperature of the device can be detected more accurately through the temperature determination relationship. And, determining the temperature value through the temperature determination relationship can reduce the time consumption of model calculation, improving the real - time performance of temperature detection while ensuring accuracy.
[0084] The present disclosure also provides a computer - readable storage medium, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the temperature determination method provided by the present disclosure are implemented.
[0085] Figure 4It is a block diagram of an electronic device shown according to an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0086] Referring to Figure 4 , the electronic device 300 may include one or more of the following components: a processing component 302, a memory 304, a power component 306, a multimedia component 308, an audio component 310, an input / output interface 312, a sensor component 314, and a communication component 316.
[0087] The processing component 302 generally controls the overall operation of the electronic device 300, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-described temperature determination method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0088] The memory 304 is configured to store various types of data to support the operation of the electronic device 300. Examples of such data include instructions for any application or method operating on the electronic device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0089] The power component 306 provides power to various components of the electronic device 300. The power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 300.
[0090] The multimedia component 308 includes a screen that provides an output interface between the electronic device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the electronic device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0091] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 300 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 304 or transmitted via the communication component 316. In some embodiments, the audio component 310 further includes a speaker for outputting audio signals.
[0092] The input / output interface 312 provides an interface between the processing component 302 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.
[0093] The sensor component 314 includes one or more sensors for providing a status assessment of various aspects of the electronic device 300. For example, the sensor component 314 can detect the on / off state of the electronic device 300, the relative positioning of components, such as the display and the keypad of the electronic device 300. The sensor component 314 can also detect a change in the position of the electronic device 300 or a component of the electronic device 300, the presence or absence of user contact with the electronic device 300, the orientation or acceleration / deceleration of the electronic device 300, and the temperature change of the electronic device 300. The sensor component 314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 314 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 314 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0094] The communication component 316 is configured to facilitate communication between the electronic device 300 and other devices in a wired or wireless manner. The electronic device 300 can access a communication standard-based wireless network, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0095] In an exemplary embodiment, the electronic device 300 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described temperature determination method.
[0096] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the above instructions can be executed by a processor 320 of the electronic device 300 to complete the above-described temperature determination method. For example, the non-transitory computer-readable storage medium can be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0097] In another exemplary embodiment, a computer program product is also provided, and the computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for performing the above-described temperature determination method when executed by the programmable device.
[0098] Those skilled in the art can also understand that the various illustrative logical blocks and steps listed in the embodiments of the present application can be implemented by electronic hardware, computer software, or a combination of both. Whether such a function is implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art can use various methods to implement the described function for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of the present application.
[0099] It should be understood that, unless otherwise specifically stated, the features of some embodiments of the present disclosure described herein can be combined with each other. As used herein, the term "and / or" includes any one of the related listed items and any combination of any two or more of them; similarly, "at least one of..." includes any one of the related listed items and any combination of any two or more of them.
[0100] Although terms such as "first", "second", and "third" may be used herein to describe various components, parts, regions, layers, or sections, these components, parts, regions, layers, or sections are not limited to these terms. Instead, these terms are only used to distinguish one component, part, region, layer, or section from another. Thus, the first component, part, region, layer, or section mentioned in the examples described herein may also be referred to as the second component, part, region, layer, or section without departing from the teachings of the various examples. Additionally, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description herein, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.
[0101] Furthermore, the word "exemplary" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "exemplary" is not necessarily to be understood as being advantageous compared to other aspects or designs. Instead, the use of the word exemplary is intended to present concepts in a concrete manner. As used herein, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X applies A or B" is intended to mean any one of the natural inclusive arrangements. That is, if X applies A; X applies B; or X applies both A and B, then "X applies A or B" is satisfied in any one of the foregoing instances. Additionally, unless otherwise specified or clear from the context indicating a singular form, the articles "a" and "an" as used in this application and the appended claims are generally understood to mean "one or more".
[0102] Similarly, although the present disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding the specification and the drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the claims. Specifically with respect to the various functions performed by the components described above (e.g., elements, resources, etc.), unless otherwise indicated, the terms used to describe such components are intended to correspond to any component (functionally equivalent) that performs the specific function of the described component, even if not structurally equivalent to the disclosed structure. Additionally, although a particular feature of the present disclosure may have been disclosed with respect to only one of several implementations, such a feature may, as may be desired and advantageous for any given or particular application, be combined with one or more other features of other implementations. Further, to the extent that the terms "comprises," "has," "includes," "contains," or any variation thereof are used in the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term "comprising."
[0103] Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
[0104] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes may be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for determining temperature, characterized in that: include: Get the resistance sampling AD value of the temperature sensor of the target device; Determine the target temperature value corresponding to the resistance sampling AD value according to the relationship between the resistance sampling AD value and the temperature; The temperature determination relationship includes a corresponding relationship between a resistance AD value and a temperature value. The temperature determination relationship is generated according to a temperature determination model. The temperature determination model is used to characterize the corresponding relationship between the resistance value and the temperature value of the temperature sensor.
2. The method according to claim 1, characterized in that The temperature determination model is determined in the following manner: Determining the temperature determination model according to a plurality of sample resistance values corresponding to the temperature sensor and a sample temperature value corresponding to each of the sample resistance values, and a preset relationship model; The preset relationship model is used to characterize the corresponding relationship between resistance and temperature, and the preset relationship model includes at least one undetermined coefficient.
3. The method according to claim 2, characterized in that Determining the temperature determination model according to the plurality of sample resistance values and the sample temperature value corresponding to each of the sample resistance values, and a preset relationship model includes: Determining a coefficient value of the undetermined coefficient according to the multiple sample resistance values and a sample temperature value corresponding to each of the sample resistance values; Substituting the coefficient value into the preset relationship model, the temperature determination model is obtained.
4. The method according to claim 1, characterized in that The temperature determination relationship is determined in the following manner: Determine a first corresponding relationship according to the temperature determination model; The first corresponding relationship is compensated according to a second corresponding relationship to obtain the temperature determination relationship, wherein the second corresponding relationship includes a corresponding relationship between an actually detected temperature value and a resistance AD value.
5. The method according to claim 4, characterized in that Determining the first corresponding relationship according to the temperature determination model includes: According to the temperature determination model, acquiring a plurality of first resistance values and a first temperature value corresponding to each of the first resistance values; Determine a first resistance AD value corresponding to each of the first resistance values; The corresponding relationship between the first resistance AD value and the first temperature value is used as the first corresponding relationship.
6. The method according to claim 4, characterized in that The second corresponding relationship includes: at least one second resistance AD value and a second temperature value corresponding to each second resistance AD value; and compensating the first corresponding relationship according to the second corresponding relationship to obtain the temperature determination relationship includes: Determine, from the first resistance AD value in the first corresponding relationship, a third resistance AD value that matches the second resistance AD value; The third temperature value corresponding to the third resistance AD value is compensated according to the second temperature value to obtain the temperature determination relationship.
7. A device for determining temperature, characterized in that: include: An acquisition module is configured to acquire a resistance sampling AD value of a temperature sensor of a target device; A determination module, configured to determine a target temperature value corresponding to the resistance sampling AD value according to a relationship between the resistance sampling AD value and the temperature; The temperature determination relationship includes a corresponding relationship between a resistance AD value and a temperature value. The temperature determination relationship is generated according to a temperature determination model. The temperature determination model is used to characterize the corresponding relationship between the resistance value and the temperature value of the temperature sensor.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Get the resistance sampling AD value of the temperature sensor of the target device; Determine the target temperature value corresponding to the resistance sampling AD value according to the relationship between the resistance sampling AD value and the temperature; The temperature determination relationship includes a corresponding relationship between a resistance AD value and a temperature value. The temperature determination relationship is generated according to a temperature determination model. The temperature determination model is used to characterize the corresponding relationship between the resistance value and the temperature value of the temperature sensor.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.