[go: up one dir, main page]

CN113542495B - A method for measuring temperature, electronic device, chip system and storage medium - Google Patents

A method for measuring temperature, electronic device, chip system and storage medium Download PDF

Info

Publication number
CN113542495B
CN113542495B CN202010247509.1A CN202010247509A CN113542495B CN 113542495 B CN113542495 B CN 113542495B CN 202010247509 A CN202010247509 A CN 202010247509A CN 113542495 B CN113542495 B CN 113542495B
Authority
CN
China
Prior art keywords
temperature
distance
temperature compensation
value
measured object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010247509.1A
Other languages
Chinese (zh)
Other versions
CN113542495A (en
Inventor
秦鉴
范继存
孔春胜
查婷民
李兰娣
李伟
楼鑫欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010247509.1A priority Critical patent/CN113542495B/en
Publication of CN113542495A publication Critical patent/CN113542495A/en
Application granted granted Critical
Publication of CN113542495B publication Critical patent/CN113542495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01KMEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
    • G01K3/00Thermometers giving results other than momentary value of temperature
    • G01K3/08Thermometers giving results other than momentary value of temperature giving differences of values; giving differentiated values
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radiation Pyrometers (AREA)

Abstract

A method for measuring temperature and electronic equipment relate to the technical field of temperature measurement and can improve the accuracy of temperature measurement of different measured objects by the electronic equipment. The electronic device stores one or more temperature compensation models having a function of performing temperature compensation on a temperature value acquired by a temperature sensor using a distance acquired by the distance sensor. The electronic device may receive a first operation, the first operation to trigger measuring a temperature; acquiring a first distance through a distance sensor, and acquiring a first temperature value of a measured object through a temperature sensor; taking the first temperature value and the first distance as input, and operating a temperature compensation model of the measured object to obtain a second temperature value after temperature compensation; displaying a first interface, wherein the first interface comprises a second temperature value; and updating the temperature compensation model of the measured object by adopting the first distance and the first temperature value. And the updated temperature compensation model is used for carrying out temperature compensation on the temperature value of the measured object acquired by the temperature sensor next time.

Description

一种测量温度的方法、电子设备、芯片系统及存储介质A method for measuring temperature, electronic device, chip system and storage medium

技术领域technical field

本申请实施例涉及测温技术领域,尤其涉及一种测量温度的方法及电子设备。The embodiments of the present application relate to the technical field of temperature measurement, and in particular, to a method and electronic device for measuring temperature.

背景技术Background technique

随着物质条件和健康意识的逐步提升,人们越来越关注生活场景中的温度信息,且与温度相关的生活场景随处可见。例如,人们可以通过测量人体体温来监测自身或者他人的身体健康情况。又例如,人们可以通过测量宠物体温来监测宠物的身体健康情况。又例如,人们可以测量牛奶等食物的温度来进行饮食健康管理。With the gradual improvement of material conditions and health awareness, people are paying more and more attention to temperature information in life scenes, and life scenes related to temperature can be seen everywhere. For example, people can monitor their own or others' physical health by measuring their body temperature. For another example, people can monitor the pet's physical health by measuring the pet's body temperature. For another example, people can measure the temperature of food such as milk for healthy diet management.

目前,无论专用的红外测温设备(如额温枪、耳温枪或红外温度筛选仪等),还是集成有测温功能的电子产品(如手机、智能手表或者耳机等),其测温结果的准确度都会受到测温距离的影响。其中,该测温距离是电子设备(如上述红外测温设备或者集成有测温功能的电子产品)与被测对象(如人、动物或者食物等)之间的距离。At present, regardless of dedicated infrared temperature measurement equipment (such as forehead thermometer, ear thermometer or infrared temperature screening instrument, etc.), or electronic products with integrated temperature measurement function (such as mobile phones, smart watches or headphones, etc.), the temperature measurement results The accuracy will be affected by the temperature measurement distance. Wherein, the temperature measurement distance is the distance between an electronic device (such as the above infrared temperature measurement device or an electronic product integrated with a temperature measurement function) and a measured object (such as a person, an animal, or food, etc.).

具体的,测温距离越大,该电子设备的测温误差越大,则测温结果的准确度越低。其中,该测温误差是电子设备测量得到的温度值与被测对象的真实温度值的差值。因此,如果测温距离较大,电子设备的测温误差则会很大,测温结果的准确度则会很低。如此,电子设备则无法满足用户对温度测量的准确度的需求。甚至,在用户生病的情况下,可能会因为测温误差较大,而影响诊断结果从而延误病情。Specifically, the larger the temperature measurement distance, the larger the temperature measurement error of the electronic device, and the lower the accuracy of the temperature measurement result. The temperature measurement error is the difference between the temperature value measured by the electronic device and the real temperature value of the measured object. Therefore, if the temperature measurement distance is large, the temperature measurement error of the electronic device will be large, and the accuracy of the temperature measurement result will be very low. In this way, the electronic device cannot meet the user's demand for the accuracy of temperature measurement. Even when the user is sick, the diagnosis result may be affected due to the large temperature measurement error, thereby delaying the disease.

发明内容SUMMARY OF THE INVENTION

本申请提供一种测量温度的方法及电子设备,可以减少测温距离对测温结果的影响,降低测温误差,提高电子设备对不同被测对象进行温度测量的准确度。The present application provides a method and electronic device for measuring temperature, which can reduce the influence of the temperature measurement distance on the temperature measurement result, reduce the temperature measurement error, and improve the accuracy of the temperature measurement of different objects to be measured by the electronic device.

第一方面,本申请提供一种测量温度的方法,其特征在于,应用于电子设备,该电子设备包括温度传感器和距离传感器。该电子设备中保存有一个或多个温度补偿模型,该温度补偿模型具备采用距离传感器采集的距离,对温度传感器采集的温度值进行温度补偿的功能。该温度补偿模型是人工智能(artificial intelligence,AI)模型。In a first aspect, the present application provides a method for measuring temperature, which is characterized in that it is applied to an electronic device, and the electronic device includes a temperature sensor and a distance sensor. One or more temperature compensation models are stored in the electronic device, and the temperature compensation model has the function of performing temperature compensation on the temperature value collected by the temperature sensor using the distance collected by the distance sensor. The temperature compensation model is an artificial intelligence (AI) model.

其中,该电子设备可接收第一操作,该第一操作用于触发电子设备测量温度。该电子设备可通过距离传感器采集第一距离,通过温度传感器采集被测对象的第一温度值(即测量温度值)。上述第一距离是被测对象与电子设备之间的距离。该电子设备将第一温度值和第一距离作为输入,运行被测对象的温度补偿模型,得到对第一温度值进行温度补偿后的第二温度值。其中,该被测对象的温度补偿模型是预设AI模型;或者,该被测对象的温度补偿模型是采用上一次测量被测对象的温度时,距离传感器采集的距离和温度传感器采集的温度值更新得到的。电子设备显示第一界面,该第一界面包括第二温度值。电子设备采用第一距离和第一温度值,更新被测对象的温度补偿模型。其中,更新后的温度补偿模型用于下一次对温度传感器采集的被测对象的温度值进行温度补偿。Wherein, the electronic device can receive a first operation, and the first operation is used to trigger the electronic device to measure the temperature. The electronic device can collect the first distance through the distance sensor, and collect the first temperature value (ie, the measured temperature value) of the measured object through the temperature sensor. The above-mentioned first distance is the distance between the measured object and the electronic device. The electronic device takes the first temperature value and the first distance as inputs, runs the temperature compensation model of the measured object, and obtains the second temperature value after temperature compensation is performed on the first temperature value. The temperature compensation model of the measured object is a preset AI model; or, the temperature compensation model of the measured object is the distance collected by the distance sensor and the temperature value collected by the temperature sensor when the temperature of the measured object was measured last time. updated. The electronic device displays a first interface, where the first interface includes a second temperature value. The electronic device uses the first distance and the first temperature value to update the temperature compensation model of the measured object. The updated temperature compensation model is used to perform temperature compensation on the temperature value of the measured object collected by the temperature sensor next time.

本申请中,电子设备可以测量被测对象的温度(即第一温度值,也称为测量温度值),并获得被测对象与电子设备之间的距离(即第一距离,也称为测温距离)。该电子设备中预先保存有温度补偿模型。该电子设备可以采用该温度补偿模型,根据上述测温距离对该第一温度值进行温度补偿,得到第二温度值(也称为补偿温度)。相比于第一温度值,经过温度补偿得到的第二温度值更接近于被测对象的真实温度值。通过本方案,可以减少测温距离对测温结果的影响,降低测温误差,提高测温结果的准确度。In this application, the electronic device can measure the temperature of the measured object (ie the first temperature value, also referred to as the measured temperature value), and obtain the distance between the measured object and the electronic device (ie the first distance, also called the measured temperature value) temperature distance). A temperature compensation model is pre-stored in the electronic device. The electronic device may use the temperature compensation model to perform temperature compensation on the first temperature value according to the temperature measurement distance to obtain a second temperature value (also referred to as a compensation temperature). Compared with the first temperature value, the second temperature value obtained through temperature compensation is closer to the real temperature value of the measured object. Through this solution, the influence of the temperature measurement distance on the temperature measurement result can be reduced, the temperature measurement error can be reduced, and the accuracy of the temperature measurement result can be improved.

其中,不同被测对象的温度特征(如真实温度值)可能不同。一方面,不同类型的被测对象的温度特征可能不同。例如,人和动物的温度特征不同。另一方面,同一类型的不同被测对象也可能不同。例如,不同的人的温度特征可能不同。Among them, the temperature characteristics (such as real temperature values) of different measured objects may be different. On the one hand, the temperature characteristics of different types of measured objects may be different. For example, humans and animals have different temperature profiles. On the other hand, different measurands of the same type may also be different. For example, different people may have different temperature profiles.

基于此,为了进一步提升电子设备进行温度测量的准确度;上述电子设备可以针对每个被测对象维护一个温度补偿模型。针对每个被测对象,电子设备可以保存每次测温的温度数据(如测温距离和测量温度值)。并且,电子设备可以基于保存的温度数据,更新该被测对象的温度补偿模型,实现该温度补偿模型的自适应学习,以提升该温度补偿模型进行温度补偿的准确度,从而可以提高测温结果的准确度。Based on this, in order to further improve the accuracy of temperature measurement performed by the electronic device, the electronic device may maintain a temperature compensation model for each measured object. For each measured object, the electronic device can save the temperature data of each temperature measurement (such as temperature measurement distance and measurement temperature value). In addition, the electronic device can update the temperature compensation model of the measured object based on the stored temperature data, so as to realize the adaptive learning of the temperature compensation model, so as to improve the accuracy of the temperature compensation performed by the temperature compensation model, thereby improving the temperature measurement result. accuracy.

可以理解,电子设备对一个被测对象进行多次测温的温度数据,可以反映出该被测对象的温度特征(如真实温度值等)。不同被测对象的温度特征可能不同。本申请实施例中,针对每个被测对象维护一个温度补偿模型;采用各个被测对象的温度数据,更新对应被测对象的温度补偿模型,可以得到符合该被测对象的温度特征的温度补偿模型。这样,可以提高温度补偿模型与被测对象的温度特征的契合度,从而可以提高电子设备对不同被测对象进行温度测量的准确度。It can be understood that the temperature data obtained by the electronic device performing multiple temperature measurements on a measured object can reflect the temperature characteristics of the measured object (such as the real temperature value, etc.). Different measured objects may have different temperature characteristics. In the embodiment of the present application, a temperature compensation model is maintained for each measured object; the temperature compensation model corresponding to the measured object is updated by using the temperature data of each measured object, and a temperature compensation corresponding to the temperature characteristics of the measured object can be obtained. Model. In this way, the degree of fit between the temperature compensation model and the temperature characteristics of the measured object can be improved, thereby improving the accuracy of temperature measurement of different measured objects by the electronic device.

在第一方面的一种可能的设计方式中,上述第一界面还包括第一距离。即电子设备不仅可以先用户展示温度补偿后的第二温度值,还可以显示被测对象与手机之间的距离。In a possible design manner of the first aspect, the above-mentioned first interface further includes a first distance. That is, the electronic device can not only display the second temperature value after temperature compensation to the user, but also display the distance between the measured object and the mobile phone.

在第一方面的另一种可能的设计方式中,上述被测对象的温度补偿模型包括温度补偿函数,该温度补偿函数表征测量距离与测温误差之间的函数关系。例如,温度补偿模型可以称为曲线函数模型。该温度补偿模型中存储有上述温度补偿函数。上述测温误差是温度传感器采集的温度值与被测对象的真实温度值的差值。In another possible design manner of the first aspect, the temperature compensation model of the measured object includes a temperature compensation function, and the temperature compensation function represents the functional relationship between the measurement distance and the temperature measurement error. For example, a temperature compensation model may be referred to as a curve function model. The temperature compensation function described above is stored in the temperature compensation model. The above temperature measurement error is the difference between the temperature value collected by the temperature sensor and the real temperature value of the measured object.

其中,电子设备将第一温度值和第一距离作为输入,运行被测对象的温度补偿模型,得到对第一温度值进行温度补偿后的第二温度值,包括:电子设备运行被测对象的温度补偿模型,根据温度补偿函数计算第一距离对应的测温误差,计算第一温度值与第一距离对应的测温误差的差值,得到第二温度值。该设计方式给出温度补偿模型的一种具体实现方式,如温度补偿函数。Wherein, the electronic device takes the first temperature value and the first distance as input, runs the temperature compensation model of the measured object, and obtains the second temperature value after temperature compensation is performed on the first temperature value, including: the electronic device operates the measured object's temperature compensation model. The temperature compensation model calculates the temperature measurement error corresponding to the first distance according to the temperature compensation function, calculates the difference between the first temperature value and the temperature measurement error corresponding to the first distance, and obtains the second temperature value. This design method provides a specific implementation of the temperature compensation model, such as a temperature compensation function.

在第一方面的另一种可能的设计方式中,上述被测对象的温度补偿模型包括温度补偿信息。该温度补偿信息包括多个测温距离,以及每个测温距离对应的测温误差。该测温误差是温度传感器采集的温度值与被测对象的真实温度值的差值。In another possible design manner of the first aspect, the temperature compensation model of the measured object includes temperature compensation information. The temperature compensation information includes a plurality of temperature measurement distances and a temperature measurement error corresponding to each temperature measurement distance. The temperature measurement error is the difference between the temperature value collected by the temperature sensor and the real temperature value of the measured object.

其中,电子设备将第一温度值和第一距离作为输入,运行被测对象的温度补偿模型,得到对第一温度值进行温度补偿后的第二温度值,包括:电子设备运行被测对象的温度补偿模型,从温度补偿信息中查找第一距离对应的测温误差,计算第一温度值与第一距离对应的测温误差的差值,得到第二温度值。该设计方式给出温度补偿模型的一种具体实现方式,如温度补偿信息。Wherein, the electronic device takes the first temperature value and the first distance as input, runs the temperature compensation model of the measured object, and obtains the second temperature value after temperature compensation is performed on the first temperature value, including: the electronic device operates the measured object's temperature compensation model. The temperature compensation model searches for the temperature measurement error corresponding to the first distance from the temperature compensation information, calculates the difference between the first temperature value and the temperature measurement error corresponding to the first distance, and obtains the second temperature value. This design method provides a specific implementation of the temperature compensation model, such as temperature compensation information.

在第一方面的另一种可能的设计方式中,上述温度补偿模型中还包括预设基准温度。其中,上述电子设备采用第一距离和第一温度值,更新被测对象的温度补偿模型,包括:电子设备计算第一温度值与预设基准温度的差值,并计算第一温度值与预设基准温度的差值与第一预设权重的乘积得到第一值,计算第一距离对应的测温误差与第二预设权重的乘积得到第二值;该第一预设权重和第二预设权重均大于0且小于1,第一预设权重与第二预设权重之和为1;电子设备采用第一值与第二值之和,更新温度补偿模型中与第一距离对应的测温误差。In another possible design manner of the first aspect, the above temperature compensation model further includes a preset reference temperature. Wherein, the above-mentioned electronic device adopts the first distance and the first temperature value to update the temperature compensation model of the measured object, including: the electronic device calculates the difference between the first temperature value and the preset reference temperature, and calculates the difference between the first temperature value and the preset reference temperature. Set the product of the difference between the reference temperature and the first preset weight to obtain the first value, and calculate the product of the temperature measurement error corresponding to the first distance and the second preset weight to obtain the second value; the first preset weight and the second The preset weights are all greater than 0 and less than 1, and the sum of the first preset weight and the second preset weight is 1; the electronic device uses the sum of the first value and the second value to update the temperature compensation model corresponding to the first distance. Temperature measurement error.

本申请中,电子设备每次对被测对象进行温度测量后,都可以采用本次的测量结果(包括测温距离和测量温度值)更新该被测对象的温度补偿模型。这样,可以实现该温度补偿模型的自适应学习,提升该温度补偿模型进行温度补偿的准确度。其中,在下一次测量该被测对象的温度时,可以使用本次更新后的温度补偿模型对温度传感器采集的测量温度值进行温度补偿。这样,可以提高测温结果的准确度。In the present application, after each time the electronic device measures the temperature of the measured object, it can update the temperature compensation model of the measured object with the current measurement results (including the temperature measurement distance and the measured temperature value). In this way, self-adaptive learning of the temperature compensation model can be realized, and the accuracy of temperature compensation performed by the temperature compensation model can be improved. Wherein, when the temperature of the measured object is measured next time, the temperature compensation model after this update can be used to perform temperature compensation on the measured temperature value collected by the temperature sensor. In this way, the accuracy of the temperature measurement result can be improved.

可以理解,上述温度传感器采集的测量温度值(如第一温度值)是温度传感器采集的被测对象的温度。虽然温度传感器采集的测量温度值可能会由于测温距离(如第一距离)的影响,与被测对象的真实温度存在一定的差异;但是,电子设备对该被测对象进行多次温度检测所采集的测量温度值还是可以体现出该被测对象的温度特征的。不同被测对象的温度特征 (如真实温度值)不同。因此,电子设备每次对被测对象进行温度测量后,采用本次的测量结果更新该被测对象的温度补偿模型,可以得到符合该被测对象的温度特征的温度补偿模型。这样,可以提高该温度补偿模型与被测对象的温度特征的契合度,有利于进一步提高电子设备对不同被测对象进行温度测量的准确度。It can be understood that the measured temperature value (eg, the first temperature value) collected by the above temperature sensor is the temperature of the measured object collected by the temperature sensor. Although the measured temperature value collected by the temperature sensor may be different from the actual temperature of the measured object due to the influence of the temperature measurement distance (such as the first distance); The collected measured temperature value can still reflect the temperature characteristics of the measured object. The temperature characteristics (such as real temperature values) of different measured objects are different. Therefore, after each time the electronic device measures the temperature of the measured object, the temperature compensation model of the measured object is updated with the current measurement result, and a temperature compensation model conforming to the temperature characteristics of the measured object can be obtained. In this way, the degree of fit between the temperature compensation model and the temperature characteristics of the measured object can be improved, which is beneficial to further improve the accuracy of temperature measurement of different measured objects by the electronic device.

在第一方面的另一种可能的设计方式中,上述第一操作是用户对电子设备上预设按键的点击操作(如单击操作、双击操作或长按操作等)。示例性的,上述预设按键可以是电子设备上的多个机械按键或者触摸式按键组成的组合按键。In another possible design manner of the first aspect, the above-mentioned first operation is a click operation (such as a single-click operation, a double-click operation, or a long-press operation, etc.) of the user on a preset button on the electronic device. Exemplarily, the above-mentioned preset keys may be a combination of multiple mechanical keys or touch keys on the electronic device.

在第一方面的另一种可能的设计方式中,上述第一操作可以是用户在第一应用输入的用于触发电子设备测量温度的操作。该第一应用可以是电子设备中、用于控制手机测量温度的应用。具体的,在电子设备接收第一操作之前,电子设备可以显示第二界面,该第二界面是第一应用的显示界面,该第二界面包括预设控件,该预设控件用于触发电子设备测量温度。上述第一操作是用户对预设控件的点击操作。In another possible design manner of the first aspect, the above-mentioned first operation may be an operation input by the user in the first application for triggering the electronic device to measure temperature. The first application may be an application in an electronic device for controlling a mobile phone to measure temperature. Specifically, before the electronic device receives the first operation, the electronic device may display a second interface, where the second interface is a display interface of the first application, and the second interface includes a preset control, and the preset control is used to trigger the electronic device measure temperature. The above-mentioned first operation is the user's click operation on the preset control.

在第一方面的另一种可能的设计方式中,在电子设备通过距离传感器采集第一距离之后,通过温度传感器采集被测对象的第一温度值之前,电子设备可判断所述第一距离是否在预设距离范围内。其中,若第一距离在预设距离范围内,电子设备则通过温度传感器采集第一温度值。In another possible design manner of the first aspect, after the electronic device collects the first distance through the distance sensor, and before the temperature sensor collects the first temperature value of the measured object, the electronic device may determine whether the first distance is not within a preset distance. Wherein, if the first distance is within the preset distance range, the electronic device collects the first temperature value through the temperature sensor.

可以理解,相比于第一距离不在预设距离范围内时电子设备所采集的第一温度值,运行温度补偿模型,采用第一距离在预设距离范围内时电子设备所采集的第一温度值进行温度补偿,所得到的第二温度值更接近于被测对象的真实温度值。因此,本申请中,电子设备在第一距离在预设距离范围内的情况下,测量被测对象的温度,可以提升温度测量结果的准确度。It can be understood that, compared with the first temperature value collected by the electronic device when the first distance is not within the preset distance range, the temperature compensation model is run, and the first temperature value collected by the electronic device when the first distance is within the preset distance range is used. Temperature compensation is performed on the value, and the obtained second temperature value is closer to the real temperature value of the measured object. Therefore, in the present application, when the electronic device measures the temperature of the measured object when the first distance is within the preset distance range, the accuracy of the temperature measurement result can be improved.

在第一方面的另一种可能的设计方式中,上述方法还包括:若第一距离不在预设距离范围内,电子设备显示引导信息(如第一引导信息或第二引导信息),该引导信息用于提示用户控制电子设备与被测对象的距离在预设距离范围内。In another possible design manner of the first aspect, the above method further includes: if the first distance is not within the preset distance range, the electronic device displays guide information (such as the first guide information or the second guide information), the guide The information is used to prompt the user to control the distance between the electronic device and the measured object within a preset distance range.

本申请中,若第一距离不在预设距离范围内,电子设备可引导用户控制电子设备与被测对象的距离在预设距离范围内。这样,当用户控制电子设备与被测对象的距离在预设距离范围内时,电子设备便可以测量被测对象的温度。这样,可以提升温度测量结果的准确度。In the present application, if the first distance is not within the preset distance range, the electronic device may guide the user to control the distance between the electronic device and the measured object to be within the preset distance range. In this way, when the user controls the distance between the electronic device and the measured object to be within the preset distance range, the electronic device can measure the temperature of the measured object. In this way, the accuracy of the temperature measurement results can be improved.

在第一方面的另一种可能的设计方式中,在电子设备采用第一距离和第一温度值,更新被测对象的温度补偿模型之前,上述方法还包括:电子设备判断第一温度值是否在预设温度范围内。其中,若第一温度值在预设温度范围内,电子设备采用第一距离和第一温度值,更新被测对象的温度补偿模型。In another possible design manner of the first aspect, before the electronic device uses the first distance and the first temperature value to update the temperature compensation model of the measured object, the above method further includes: the electronic device determines whether the first temperature value is within the preset temperature range. Wherein, if the first temperature value is within the preset temperature range, the electronic device uses the first distance and the first temperature value to update the temperature compensation model of the measured object.

可以理解,当用户(即被测对象)发烧时,电子设备测得的第一温度值属于用户的异常温度值。或者,当用户因为生病而体温过低(低于人体正常温度值)时,电子设备测得的第一温度值属于用户的异常温度值。其中,采用该异常温度值和第一距离更新上述温度补偿模型,可能会影响更新后的温度补偿模型在Bob体温正常情况下进行温度测量的准确度。It can be understood that when the user (ie, the measured object) has a fever, the first temperature value measured by the electronic device belongs to the abnormal temperature value of the user. Or, when the user's body temperature is too low (lower than the normal temperature value of the human body) due to illness, the first temperature value measured by the electronic device belongs to the abnormal temperature value of the user. Wherein, using the abnormal temperature value and the first distance to update the above-mentioned temperature compensation model may affect the accuracy of temperature measurement performed by the updated temperature compensation model under the condition that Bob's body temperature is normal.

本申请中,电子设备采用预设温度范围内的第一温度值,更新温度补偿模型。而不会采用预设温度范围之外的第一温度值(即异常的第一温度值),更新温度补偿模型。这样,可以保证温度补偿模型进行温度补偿的准确度。In this application, the electronic device uses the first temperature value within the preset temperature range to update the temperature compensation model. Instead of adopting a first temperature value outside the preset temperature range (ie, an abnormal first temperature value), the temperature compensation model is updated. In this way, the accuracy of temperature compensation performed by the temperature compensation model can be guaranteed.

在第一方面的另一种可能的设计方式中,上述电子设备保存有多个温度补偿模型。该电子设备还包括摄像头,所述摄像头、所述温度传感器和所述距离传感器设置在所述电子设备的同一面上。In another possible design manner of the first aspect, the above-mentioned electronic device stores a plurality of temperature compensation models. The electronic device further includes a camera, and the camera, the temperature sensor and the distance sensor are arranged on the same side of the electronic device.

其中,在电子设备将第一温度值和第一距离作为输入,运行被测对象的温度补偿模型,得到对第一温度值进行温度补偿后的第二温度值之前,上述方法还包括:电子设备通过摄像头采集被测对象的图像;电子设备根据被测对象的图像,从多个温度补偿模型中确定被测对象的温度补偿模型。该设计方式给出电子设备为被测对象选择温度补偿模型的一种具体实现方式。Wherein, before the electronic device uses the first temperature value and the first distance as inputs, runs the temperature compensation model of the measured object, and obtains a second temperature value after temperature compensation is performed on the first temperature value, the method further includes: the electronic device The image of the measured object is collected by the camera; the electronic device determines the temperature compensation model of the measured object from a plurality of temperature compensation models according to the image of the measured object. This design method provides a specific implementation method for electronic equipment to select a temperature compensation model for the measured object.

在第一方面的另一种可能的设计方式中,电子设备保存有多个温度补偿模型。在这种设计方式中,可以由用户为被测对象选择温度补偿模型。In another possible design manner of the first aspect, the electronic device stores a plurality of temperature compensation models. In this design, the user can select the temperature compensation model for the measured object.

上述方法还包括:响应于第一操作,电子设备显示第三界面。该第三界面包括多个模型选项,每个模型选项对应多个温度补偿模型中的一个温度补偿模型。其中,电子设备将第一温度值和第一距离作为输入,运行被测对象的温度补偿模型,得到对第一温度值进行温度补偿后的第二温度值,包括:响应于用户对第三界面中第一模型选项的选择操作,电子设备将第一温度值和第一距离作为输入,运行第一模型选项对应的温度补偿模型,得到第二温度值。该设计方式给出电子设备为被测对象选择温度补偿模型的一种具体实现方式。The above method further includes: in response to the first operation, the electronic device displaying a third interface. The third interface includes a plurality of model options, and each model option corresponds to one temperature compensation model among the plurality of temperature compensation models. Wherein, the electronic device takes the first temperature value and the first distance as input, runs the temperature compensation model of the measured object, and obtains the second temperature value after temperature compensation is performed on the first temperature value, including: responding to the user's response to the third interface In the selection operation of the first model option, the electronic device takes the first temperature value and the first distance as input, runs the temperature compensation model corresponding to the first model option, and obtains the second temperature value. This design method provides a specific implementation method for electronic equipment to select a temperature compensation model for the measured object.

在第一方面的另一种可能的设计方式中,上述第二界面还包括提示信息。该提示信息用于提示用户控制电子设备与被测对象的距离在预设距离范围内。在该设计方式中,电子设备可以在第二界面中便提示用户控制电子设备与被测对象的距离在预设距离范围内。这样,可以预先提醒用户控制电子设备与被测对象的距离,可以提供温度测量的效率。In another possible design manner of the first aspect, the above-mentioned second interface further includes prompt information. The prompt information is used to prompt the user to control the distance between the electronic device and the measured object to be within a preset distance range. In this design, the electronic device can prompt the user to control the distance between the electronic device and the measured object to be within the preset distance range in the second interface. In this way, the user can be reminded in advance to control the distance between the electronic device and the measured object, which can improve the efficiency of temperature measurement.

在第一方面的另一种可能的设计方式中,上述电子设备的壳体上设置有一个或多个盲孔,上述温度传感器和距离传感器设置在一个或多个盲孔中。例如,电子设备的壳体上设置有一个盲孔;上述温度传感器和距离传感器设置在该盲孔中。又例如,电子设备的壳体上设置有两个盲孔;上述温度传感器和距离传感器分别设置在这两个盲孔中。In another possible design of the first aspect, one or more blind holes are provided on the housing of the electronic device, and the temperature sensor and the distance sensor are provided in the one or more blind holes. For example, a blind hole is provided on the housing of the electronic device; the above-mentioned temperature sensor and distance sensor are arranged in the blind hole. For another example, two blind holes are provided on the housing of the electronic device; the above-mentioned temperature sensor and distance sensor are respectively provided in the two blind holes.

其中,盲孔对用户不可见,即温度传感器和距离传感器对用户不可见。因此,用户观察电子设备的外观不能发现该盲孔,也不能发现温度传感器和距离传感器。但是,该盲孔的设计,并不会影响温度传感器通过盲孔采集被测对象的温度;也不会影响距离传感器通过盲孔采集被测对象与电子设备之间的距离。The blind hole is invisible to the user, that is, the temperature sensor and the distance sensor are invisible to the user. Therefore, the user cannot find the blind hole by observing the appearance of the electronic device, nor can he find the temperature sensor and the distance sensor. However, the design of the blind hole does not affect the temperature sensor to collect the temperature of the measured object through the blind hole, nor does it affect the distance sensor to collect the distance between the measured object and the electronic device through the blind hole.

在第一方面的另一种可能的设计方式中,温度传感器和所述距离传感器之间的距离(即第一长度)在0~4厘米之间。In another possible design manner of the first aspect, the distance (ie, the first length) between the temperature sensor and the distance sensor is between 0 and 4 centimeters.

可以理解,距离传感器所采集的距离,是该距离传感器与被测对象之间的距离。但是,产生手机的测温误差的测温距离是温度传感器与被测对象之间的距离。因此,上述第一长度 T越小,即距离传感器和温度传感器之间的距离越小,则距离传感器所采集的距离则越接近温度传感器与被测对象之间的距离,距离传感器所采集的距离(即测温距离)则越准确。这样,可以提升电子设备进行温度补偿的准确度,进而提升测温结果的准确度。It can be understood that the distance collected by the distance sensor is the distance between the distance sensor and the measured object. However, the temperature measurement distance that produces the temperature measurement error of the mobile phone is the distance between the temperature sensor and the measured object. Therefore, the smaller the above-mentioned first length T is, that is, the smaller the distance between the distance sensor and the temperature sensor, the closer the distance collected by the distance sensor is to the distance between the temperature sensor and the measured object, and the distance collected by the distance sensor is closer. (ie temperature measurement distance) is more accurate. In this way, the accuracy of temperature compensation performed by the electronic device can be improved, thereby improving the accuracy of the temperature measurement result.

第二方面,本申请提供一种电子设备,该电子设备包括存储器、处理器和显示屏。该电子设备上还设置有温度传感器和距离传感器。该存储器中保存有一个或多个温度补偿模型,该温度补偿模型具备采用距离传感器采集的距离,对温度传感器采集的温度值进行温度补偿的功能,该温度补偿模型是AI模型。In a second aspect, the present application provides an electronic device including a memory, a processor and a display screen. The electronic device is also provided with a temperature sensor and a distance sensor. One or more temperature compensation models are stored in the memory. The temperature compensation model has the function of performing temperature compensation on the temperature value collected by the temperature sensor using the distance collected by the distance sensor. The temperature compensation model is an AI model.

上述处理器,用于接收第一操作,该第一操作用于触发电子设备测量温度。上述所述距离传感器,用于采集第一距离,该第一距离是被测对象与所述电子设备之间的距离。上述所述温度传感器,用于采集所述被测对象的第一温度值。上述所述处理器,还用于将所述第一温度值和所述第一距离作为输入,运行所述被测对象的温度补偿模型,得到对所述第一温度值进行温度补偿后的第二温度值。其中,所述被测对象的温度补偿模型是预设AI模型。或者,所述被测对象的温度补偿模型是采用上一次测量所述被测对象的温度时,所述距离传感器采集的距离和所述温度传感器采集的温度值更新得到的。上述所述显示屏,用于显示第一界面,所述第一界面包括所述第二温度值。所述处理器,还用于采用所述第一距离和所述第一温度值,更新所述被测对象的温度补偿模型,其中,更新后的温度补偿模型用于下一次对所述温度传感器采集的所述被测对象的温度值进行温度补偿。The above-mentioned processor is configured to receive a first operation, where the first operation is used to trigger the electronic device to measure temperature. The above-mentioned distance sensor is used to collect a first distance, where the first distance is the distance between the measured object and the electronic device. The above-mentioned temperature sensor is used to collect the first temperature value of the measured object. The above-mentioned processor is further configured to take the first temperature value and the first distance as input, run the temperature compensation model of the measured object, and obtain the first temperature compensation model after temperature compensation is performed on the first temperature value. Two temperature values. Wherein, the temperature compensation model of the measured object is a preset AI model. Alternatively, the temperature compensation model of the measured object is obtained by updating the distance collected by the distance sensor and the temperature value collected by the temperature sensor when the temperature of the measured object was measured last time. The above-mentioned display screen is used to display a first interface, and the first interface includes the second temperature value. The processor is further configured to use the first distance and the first temperature value to update the temperature compensation model of the measured object, wherein the updated temperature compensation model is used for the next time the temperature sensor is tested The collected temperature value of the measured object is subjected to temperature compensation.

在第二方面的一种可能的设计方式中,上述显示屏显示的第一界面还包括第一距离。In a possible design manner of the second aspect, the first interface displayed on the display screen further includes a first distance.

在第二方面的另一种可能的设计方式中,上述存储器保存的被测对象的温度补偿模型包括温度补偿函数,温度补偿函数表征测量距离与测温误差之间的函数关系。该测温误差是温度传感器采集的温度值与被测对象的真实温度值的差值。其中,上述处理器,用于将所述第一温度值和所述第一距离作为输入,运行所述被测对象的温度补偿模型,得到对所述第一温度值进行温度补偿后的第二温度值,可以包括:所述处理器,用于运行所述被测对象的温度补偿模型,根据所述温度补偿函数计算所述第一距离对应的测温误差,计算所述第一温度值与所述第一距离对应的测温误差的差值,得到所述第二温度值。In another possible design manner of the second aspect, the temperature compensation model of the measured object stored in the memory includes a temperature compensation function, and the temperature compensation function represents the functional relationship between the measurement distance and the temperature measurement error. The temperature measurement error is the difference between the temperature value collected by the temperature sensor and the real temperature value of the measured object. Wherein, the above-mentioned processor is configured to use the first temperature value and the first distance as inputs, run the temperature compensation model of the measured object, and obtain a second temperature compensation model after performing temperature compensation on the first temperature value. The temperature value may include: the processor, configured to run the temperature compensation model of the measured object, calculate the temperature measurement error corresponding to the first distance according to the temperature compensation function, and calculate the first temperature value and The second temperature value is obtained from the difference between the temperature measurement errors corresponding to the first distance.

在第二方面的另一种可能的设计方式中,上述存储器保存的被测对象的温度补偿模型包括温度补偿信息,温度补偿信息包括多个测温距离,以及每个测温距离对应的测温误差。该测温误差是温度传感器采集的温度值与被测对象的真实温度值的差值。其中,上述处理器,用于将所述第一温度值和所述第一距离作为输入,运行所述被测对象的温度补偿模型,得到对所述第一温度值进行温度补偿后的第二温度值,可以包括:所述处理器,用于运行所述被测对象的温度补偿模型,从所述温度补偿信息中查找所述第一距离对应的测温误差,计算所述第一温度值与所述第一距离对应的测温误差的差值,得到所述第二温度值。In another possible design manner of the second aspect, the temperature compensation model of the measured object stored in the memory includes temperature compensation information, and the temperature compensation information includes a plurality of temperature measurement distances, and a temperature measurement corresponding to each temperature measurement distance error. The temperature measurement error is the difference between the temperature value collected by the temperature sensor and the real temperature value of the measured object. Wherein, the above-mentioned processor is configured to use the first temperature value and the first distance as inputs, run the temperature compensation model of the measured object, and obtain a second temperature compensation model after performing temperature compensation on the first temperature value. The temperature value may include: the processor, configured to run the temperature compensation model of the measured object, find the temperature measurement error corresponding to the first distance from the temperature compensation information, and calculate the first temperature value The second temperature value is obtained from the difference between the temperature measurement errors corresponding to the first distance.

在第二方面的另一种可能的设计方式中,上述温度补偿模型中还包括预设基准温度。其中,上述处理器,用于采用所述第一距离和所述第一温度值,更新所述被测对象的温度补偿模型,包括:所述处理器,用于:计算所述第一温度值与所述预设基准温度的差值,并计算所述第一温度值与所述预设基准温度的差值与第一预设权重的乘积得到第一值,计算所述第一距离对应的测温误差与所述第二预设权重的乘积得到第二值;其中,所述第一预设权重和所述第二预设权重均大于0且小于1,所述第一预设权重与所述第二预设权重之和为1;采用所述第一值与所述第二值之和,更新所述温度补偿模型中与所述第一距离对应的测温误差。In another possible design manner of the second aspect, the above temperature compensation model further includes a preset reference temperature. Wherein, the above-mentioned processor is configured to update the temperature compensation model of the measured object by using the first distance and the first temperature value, including: the processor is configured to: calculate the first temperature value The difference value from the preset reference temperature, and the product of the difference between the first temperature value and the preset reference temperature and the first preset weight is calculated to obtain a first value, and the corresponding value of the first distance is calculated. The product of the temperature measurement error and the second preset weight obtains a second value; wherein, the first preset weight and the second preset weight are both greater than 0 and less than 1, and the first preset weight and The sum of the second preset weights is 1; the temperature measurement error corresponding to the first distance in the temperature compensation model is updated by using the sum of the first value and the second value.

在第二方面的另一种可能的设计方式中,上述显示屏,还用于在所述处理器接收所述第一操作之前,显示第二界面。该第二界面是第一应用的显示界面,该第二界面包括预设控件。该预设控件用于触发所述电子设备测量温度。上述所述第一操作是用户对所述预设控件的点击操作。In another possible design manner of the second aspect, the above-mentioned display screen is further configured to display a second interface before the processor receives the first operation. The second interface is a display interface of the first application, and the second interface includes preset controls. The preset control is used to trigger the electronic device to measure temperature. The above-mentioned first operation is a click operation of the user on the preset control.

在第二方面的另一种可能的设计方式中,上述处理器,还用于在所述距离传感器采集第一距离之后,判断所述第一距离是否在预设距离范围内。其中,上述温度传感器,用于采集所述第一温度值,可以包括:所述温度传感器,用于若所述第一距离在所述预设距离范围内,采集所述第一温度值。In another possible design of the second aspect, the processor is further configured to determine whether the first distance is within a preset distance range after the distance sensor collects the first distance. Wherein, the above-mentioned temperature sensor, for collecting the first temperature value, may include: the temperature sensor for collecting the first temperature value if the first distance is within the preset distance range.

在第二方面的另一种可能的设计方式中,上述所述显示屏,还用于若所述第一距离不在所述预设距离范围内,显示引导信息,所述引导信息用于提示用户控制所述电子设备与所述被测对象的距离在所述预设距离范围内。In another possible design of the second aspect, the above-mentioned display screen is further configured to display guide information if the first distance is not within the preset distance range, where the guide information is used to prompt the user The distance between the electronic device and the measured object is controlled to be within the preset distance range.

在第二方面的另一种可能的设计方式中,上述处理器,还用于判断所述第一温度值是否在预设温度范围内。其中,所述处理器,用于采用所述第一距离和所述第一温度值,更新所述被测对象的温度补偿模型,包括:所述处理器,用于若所述第一温度值在所述预设温度范围内,采用所述第一距离和所述第一温度值,更新所述被测对象的温度补偿模型。In another possible design manner of the second aspect, the above-mentioned processor is further configured to determine whether the first temperature value is within a preset temperature range. Wherein, the processor is configured to update the temperature compensation model of the measured object by using the first distance and the first temperature value, including: the processor is configured to update the temperature compensation model of the measured object if the first temperature value Within the preset temperature range, the temperature compensation model of the measured object is updated by using the first distance and the first temperature value.

在第二方面的另一种可能的设计方式中,上述存储器保存有多个温度补偿模型;电子设备还包括摄像头,摄像头、温度传感器和距离传感器设置在电子设备的同一面上。该摄像头,用于在所述处理器将所述第一温度值和所述第一距离作为输入,运行所述被测对象的温度补偿模型,得到对所述第一温度值进行温度补偿后的第二温度值之前,采集所述被测对象的图像。上述所述处理器,还用于根据所述被测对象的图像,从所述多个温度补偿模型中确定所述被测对象的温度补偿模型。In another possible design manner of the second aspect, the memory stores a plurality of temperature compensation models; the electronic device further includes a camera, and the camera, temperature sensor and distance sensor are arranged on the same surface of the electronic device. The camera is used for running the temperature compensation model of the measured object when the processor takes the first temperature value and the first distance as inputs, and obtains a temperature compensation model for the first temperature value. Before the second temperature value, an image of the measured object is acquired. The above-mentioned processor is further configured to determine a temperature compensation model of the measured object from the plurality of temperature compensation models according to the image of the measured object.

在第二方面的另一种可能的设计方式中,上述存储器保存有多个温度补偿模型。上述显示屏,还用于响应于所述第一操作,显示第三界面。该所述第三界面包括多个模型选项,每个模型选项对应所述多个温度补偿模型中的一个温度补偿模型。其中,所述处理器,用于将所述第一温度值和所述第一距离作为输入,运行所述被测对象的温度补偿模型,得到对所述第一温度值进行温度补偿后的第二温度值,可以包括:所述处理器,用于响应于用户对所述第三界面中第一模型选项的选择操作,将所述第一温度值和所述第一距离作为输入,运行所述第一模型选项对应的温度补偿模型,得到所述第二温度值。In another possible design manner of the second aspect, the memory stores a plurality of temperature compensation models. The above-mentioned display screen is further configured to display a third interface in response to the first operation. The third interface includes a plurality of model options, and each model option corresponds to a temperature compensation model in the plurality of temperature compensation models. Wherein, the processor is configured to use the first temperature value and the first distance as inputs, run the temperature compensation model of the measured object, and obtain the first temperature compensation after temperature compensation for the first temperature value. The second temperature value may include: the processor configured to, in response to the user's selection operation on the first model option in the third interface, take the first temperature value and the first distance as inputs, and run the The temperature compensation model corresponding to the first model option is used to obtain the second temperature value.

在第二方面的另一种可能的设计方式中,上述第二界面还包括提示信息,提示信息用于提示用户控制电子设备与被测对象的距离在预设距离范围内。In another possible design manner of the second aspect, the above-mentioned second interface further includes prompt information, where the prompt information is used to prompt the user to control the distance between the electronic device and the measured object to be within a preset distance range.

在第二方面的另一种可能的设计方式中,上述电子设备的壳体上设置有一个或多个盲孔,温度传感器和距离传感器设置在一个或多个盲孔中。In another possible design manner of the second aspect, one or more blind holes are provided on the housing of the electronic device, and the temperature sensor and the distance sensor are provided in the one or more blind holes.

在第二方面的另一种可能的设计方式中,上述温度传感器和距离传感器之间的距离在 0~4厘米之间。In another possible design manner of the second aspect, the distance between the temperature sensor and the distance sensor is between 0 and 4 cm.

第三方面,本申请实施例提供一种芯片系统,该芯片系统应用于设置有温度传感器、距离传感器、显示屏和存储器的电子设备。该芯片系统包括接口电路和处理器。该接口电路和所述处理器通过线路互联。该接口电路用于从所述存储器接收信号,并向所述处理器发送所述信号,所述信号包括所述存储器中存储的计算机指令。当处理器执行所述计算机指令时,电子设备执行如第一方面及其任一种可能的设计所述的方法。In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device provided with a temperature sensor, a distance sensor, a display screen, and a memory. The chip system includes an interface circuit and a processor. The interface circuit and the processor are interconnected by wires. The interface circuit is configured to receive signals from the memory and send the signals to the processor, the signals comprising computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method as described in the first aspect and any possible designs thereof.

第四方面,本申请实施例提供一种计算机存储介质,该计算机存储介质包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如第一方面及其任一种可能的设计所述的方法。In a fourth aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium includes computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to execute the first aspect and any one thereof. possible designs of the method described.

第五方面,本申请实施例提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如第一方面及其任一种可能的设计所述的方法。In a fifth aspect, embodiments of the present application provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the method described in the first aspect and any possible designs thereof.

可以理解地,上述提供的第二方面及其任一种可能的设计所述的电子设备,第三方面所述的芯片系统,第四方面所述的计算机存储介质,第五方面所述的计算机程序产品所能达到的有益效果,可参考如第一方面及其任一种可能的设计中的有益效果,此处不再赘述。It can be understood that the electronic device described in the second aspect and any possible design thereof provided above, the chip system described in the third aspect, the computer storage medium described in the fourth aspect, and the computer described in the fifth aspect For the beneficial effects that can be achieved by the program product, reference may be made to the beneficial effects in the first aspect and any possible design thereof, which will not be repeated here.

附图说明Description of drawings

图1为常规方案提供的一种电子设备的测温误差随测温距离变化的示意图;Fig. 1 is the schematic diagram that the temperature measurement error of a kind of electronic equipment provided by conventional scheme changes with temperature measurement distance;

图2为本申请实施例提供的一种电子设备的产品形态示意图;2 is a schematic diagram of a product form of an electronic device provided by an embodiment of the present application;

图3为本申请实施例提供的另一种电子设备的产品形态示意图;3 is a schematic diagram of a product form of another electronic device provided by an embodiment of the present application;

图4为本申请实施例提供的另一种电子设备的产品形态的局部示意图;4 is a partial schematic diagram of a product form of another electronic device provided by an embodiment of the present application;

图5为本申请实施例提供的一种电子设备的硬件结构示意图;FIG. 5 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;

图6为本申请实施例提供的一种测温场景示意图;6 is a schematic diagram of a temperature measurement scene provided by an embodiment of the present application;

图7A为本申请实施例提供的一种温度补偿函数的函数曲线示意图;7A is a schematic diagram of a function curve of a temperature compensation function provided by an embodiment of the present application;

图7B为本申请实施例提供的另一种温度补偿函数的函数曲线示意图;7B is a schematic diagram of a function curve of another temperature compensation function provided by an embodiment of the present application;

图8为本申请实施例提供的一种测量温度的方法流程图;8 is a flowchart of a method for measuring temperature provided by an embodiment of the present application;

图9为本申请实施例提供的一种测温界面示意图;9 is a schematic diagram of a temperature measurement interface provided by an embodiment of the present application;

图10为本申请实施例提供的另一种测温界面示意图;10 is a schematic diagram of another temperature measurement interface provided by the embodiment of the application;

图11A为本申请实施例提供的另一种温度补偿函数的函数曲线示意图;11A is a schematic diagram of a function curve of another temperature compensation function provided by an embodiment of the present application;

图11B为本申请实施例提供的另一种温度补偿函数的函数曲线示意图;11B is a schematic diagram of a function curve of another temperature compensation function provided by an embodiment of the present application;

图12为本申请实施例提供的一种测温界面示意图;12 is a schematic diagram of a temperature measurement interface provided by an embodiment of the present application;

图13为本申请实施例提供的另一种测温界面示意图;13 is a schematic diagram of another temperature measurement interface provided by the embodiment of the present application;

图14为本申请实施例提供的一种测温界面示意图;14 is a schematic diagram of a temperature measurement interface provided by an embodiment of the present application;

图15为本申请实施例提供的另一种测温界面示意图;15 is a schematic diagram of another temperature measurement interface provided by the embodiment of the application;

图16为本申请实施例提供的一种测温界面示意图;16 is a schematic diagram of a temperature measurement interface provided by an embodiment of the application;

图17为本申请实施例提供的另一种测温界面示意图;17 is a schematic diagram of another temperature measurement interface provided by the embodiment of the application;

图18为本申请实施例提供的一种电子设备的结构示意图;FIG. 18 is a schematic structural diagram of an electronic device provided by an embodiment of the application;

图19为本申请实施例提供的一种芯片系统的结构示意图。FIG. 19 is a schematic structural diagram of a chip system provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.

以下,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”等的特征可以明示或者隐含地包括一个或者更多个该特征。Hereinafter, the terms "first", "second", etc. are only used for descriptive purposes, and should not be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as "first", "second", etc., may expressly or implicitly include one or more of that feature.

在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“设置”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "arranged", "connected" and "connected" should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection Connection, or integral connection; for those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood in specific situations.

目前,电子设备(如专用的红外测温设备或者集成有测温功能的电子产品)的测温结果的准确度会受到测温距离的影响。具体的,测温距离越大,该电子设备的测温误差越大,则测温结果的准确度越低。其中,在本申请实施例中,上述测温距离是电子设备与被测对象之间的距离;测温误差是电子设备测量得到的温度值(称为测量温度值)与被测对象的真实温度值的差值。At present, the accuracy of temperature measurement results of electronic devices (such as dedicated infrared temperature measurement devices or electronic products integrated with temperature measurement functions) is affected by the temperature measurement distance. Specifically, the larger the temperature measurement distance, the larger the temperature measurement error of the electronic device, and the lower the accuracy of the temperature measurement result. Among them, in the embodiment of the present application, the above-mentioned temperature measurement distance is the distance between the electronic device and the measured object; the temperature measurement error is the temperature value (called the measured temperature value) measured by the electronic device and the true temperature of the measured object. difference in value.

示例性的,请参考图1,其示出常规方案提供的一种电子设备的测温误差随测温距离变化的示意图。图1示出电子设备测量真实温度值分别为30摄氏度(℃)、40℃和50℃的三个被测对象的温度时,测温误差随测温距离变化情况。由图1可知:随着测温距离的增大,电子设备的测温误差越来越大。并且,由图1还可以得出:被测对象的真实温度值越高,随着测温距离的增大,电子设备的测温误差的增大幅度越大。Exemplarily, please refer to FIG. 1 , which shows a schematic diagram of the temperature measurement error of an electronic device provided by the conventional solution changing with the temperature measurement distance. Figure 1 shows the variation of the temperature measurement error with the temperature measurement distance when the electronic device measures the temperature of three measured objects whose real temperature values are 30 degrees Celsius (°C), 40°C, and 50°C, respectively. It can be seen from Figure 1 that as the temperature measurement distance increases, the temperature measurement error of the electronic device becomes larger and larger. Moreover, it can also be concluded from FIG. 1 that the higher the true temperature value of the measured object, the greater the increase of the temperature measurement error of the electronic device as the temperature measurement distance increases.

本申请实施例提供一种测量温度的方法及电子设备。该电子设备可以测量被测对象的温度(即第一温度值,也称为测量温度值),并获得被测对象与电子设备之间的距离(即第一距离,也称为测温距离)。该电子设备中预先保存有温度补偿模型。该电子设备可以采用该温度补偿模型,根据上述测温距离对该第一温度值进行温度补偿,得到第二温度值(也称为补偿温度)。相比于第一温度值,经过温度补偿得到的第二温度值更接近于被测对象的真实温度值。通过本方案,可以减少测温距离对测温结果的影响,降低测温误差,提高测温结果的准确度。Embodiments of the present application provide a method and electronic device for measuring temperature. The electronic device can measure the temperature of the measured object (ie, the first temperature value, also called the measured temperature value), and obtain the distance between the measured object and the electronic device (ie, the first distance, also called the temperature measurement distance) . A temperature compensation model is pre-stored in the electronic device. The electronic device may use the temperature compensation model to perform temperature compensation on the first temperature value according to the temperature measurement distance to obtain a second temperature value (also referred to as a compensation temperature). Compared with the first temperature value, the second temperature value obtained through temperature compensation is closer to the real temperature value of the measured object. Through this solution, the influence of the temperature measurement distance on the temperature measurement result can be reduced, the temperature measurement error can be reduced, and the accuracy of the temperature measurement result can be improved.

示例性的,本申请实施例中所述的被测对象可以是人、动物、食物或者其他需要测量温度值的物体等。其中,不同被测对象的温度特征(如真实温度值)可能不同。一方面,不同类型的被测对象的温度特征可能不同。例如,人和动物的温度特征不同。另一方面,同一类型的不同被测对象也可能不同。例如,不同的人的温度特征可能不同。Exemplarily, the object to be measured in the embodiments of the present application may be a person, an animal, food, or other objects whose temperature value needs to be measured, and the like. Among them, the temperature characteristics (such as real temperature values) of different measured objects may be different. On the one hand, the temperature characteristics of different types of measured objects may be different. For example, humans and animals have different temperature profiles. On the other hand, different measurands of the same type may also be different. For example, different people may have different temperature profiles.

基于此,为了进一步提升电子设备进行温度测量的准确度;上述电子设备可以针对每个被测对象维护一个温度补偿模型。针对每个被测对象,电子设备可以保存每次测温的温度数据(如测温距离和测量温度值)。并且,电子设备可以基于保存的温度数据,更新该被测对象的温度补偿模型,实现该温度补偿模型的自适应学习,以提升该温度补偿模型进行温度补偿的准确度,从而可以提高测温结果的准确度。Based on this, in order to further improve the accuracy of temperature measurement performed by the electronic device, the electronic device may maintain a temperature compensation model for each measured object. For each measured object, the electronic device can save the temperature data of each temperature measurement (such as temperature measurement distance and measurement temperature value). In addition, the electronic device can update the temperature compensation model of the measured object based on the stored temperature data, so as to realize the adaptive learning of the temperature compensation model, so as to improve the accuracy of the temperature compensation performed by the temperature compensation model, thereby improving the temperature measurement result. accuracy.

可以理解,电子设备对一个被测对象进行多次测温的温度数据,可以反映出该被测对象的温度特征(如真实温度值等)。不同被测对象的温度特征可能不同。本申请实施例中,针对每个被测对象维护一个温度补偿模型;采用各个被测对象的温度数据,更新对应被测对象的温度补偿模型,可以得到符合该被测对象的温度特征的温度补偿模型。这样,可以提高温度补偿模型与被测对象的温度特征的契合度,从而可以提高电子设备对不同被测对象进行温度测量的准确度。It can be understood that the temperature data obtained by the electronic device performing multiple temperature measurements on a measured object can reflect the temperature characteristics of the measured object (such as the real temperature value, etc.). Different measured objects may have different temperature characteristics. In the embodiment of the present application, a temperature compensation model is maintained for each measured object; the temperature compensation model corresponding to the measured object is updated by using the temperature data of each measured object, and a temperature compensation corresponding to the temperature characteristics of the measured object can be obtained. Model. In this way, the degree of fit between the temperature compensation model and the temperature characteristics of the measured object can be improved, thereby improving the accuracy of temperature measurement of different measured objects by the electronic device.

需要说明的是,电子设备对被测对象进行温度测量的准确度不仅会受到上述测温距离的影响,还可能会受到外界环境温度等因素的影响。本申请实施例中,电子设备运行温度补偿模型对测量温度值进行温度补偿时,不仅会参考上述测温距离,还可以参考外界环境温度等因素。本申请实施例中,主要介绍采用测温距离进行温度补偿的原理。但是,并不表示本申请实施例中进行温度补偿时,不参考外界环境温度等因素对测温结果的影响。It should be noted that the accuracy of the temperature measurement of the object to be measured by the electronic device is not only affected by the above-mentioned temperature measurement distance, but may also be affected by factors such as the external ambient temperature. In the embodiment of the present application, when the electronic device operates the temperature compensation model to perform temperature compensation on the measured temperature value, not only the above-mentioned temperature measurement distance, but also factors such as the external ambient temperature may be referred to. In the embodiments of the present application, the principle of temperature compensation by using the temperature measurement distance is mainly introduced. However, it does not mean that when temperature compensation is performed in the embodiments of the present application, no reference is made to the influence of factors such as external ambient temperature on the temperature measurement result.

示例性的,本申请实施例提供的电子设备,可以是额温枪、耳温枪、测温仪或红外温度筛选仪等专门用于测量温度的装置。或者,上述电子设备可以是集成有测温功能的电子产品,如手机、智能手表、耳机或智能眼镜等。Exemplarily, the electronic device provided in the embodiment of the present application may be a device specially used for measuring temperature, such as a forehead thermometer, an ear thermometer, a thermometer, or an infrared temperature screening instrument. Alternatively, the above-mentioned electronic device may be an electronic product integrated with a temperature measurement function, such as a mobile phone, a smart watch, an earphone, or smart glasses.

例如,以上述电子设备是额温枪为例。请参考图2,其示出本申请实施例提供的一种额温枪的产品形态示意图。如图2所示,该额温枪200包括主体210和把手220。把手220的顶端与主体210固定连接。主体210和把手220组成额温枪200的壳体。For example, take the above-mentioned electronic device being a forehead thermometer as an example. Please refer to FIG. 2 , which shows a schematic diagram of a product form of a forehead temperature gun provided by an embodiment of the present application. As shown in FIG. 2 , the forehead thermometer 200 includes a main body 210 and a handle 220 . The top end of the handle 220 is fixedly connected with the main body 210 . The main body 210 and the handle 220 form a casing of the forehead thermometer 200 .

该主体210的一端设置有测温部件212。该测温部件212用于测量被测对象的第一温度值,以及额温枪200与被测对象之间的测温距离。例如,该测温部件212可以包括温度传感器(如红外温度传感)和距离传感器。温度传感器用于测量被测对象的第一温度值。距离传感器用于测量上述测温距离。其中,把手220上包括控制开关221。该控制开关221用于触发额温枪200启动上述红外温度传感器和距离传感器。One end of the main body 210 is provided with a temperature measuring member 212 . The temperature measuring component 212 is used to measure the first temperature value of the measured object and the temperature measuring distance between the forehead temperature gun 200 and the measured object. For example, the temperature measuring component 212 may include a temperature sensor (eg, an infrared temperature sensor) and a distance sensor. The temperature sensor is used to measure the first temperature value of the measured object. The distance sensor is used to measure the above temperature measurement distance. Wherein, the handle 220 includes a control switch 221 . The control switch 221 is used to trigger the forehead temperature gun 200 to activate the above-mentioned infrared temperature sensor and distance sensor.

其中,额温枪200(如额温枪200的处理器)可以采用温度补偿模型,根据距离传感器测量得到的测温距离,对红外温度传感器测量得到的第一温度值进行温度补偿,得到第二温度值。主体210的另一端设置有显示屏211。该显示屏211可以用于显示第二温度值,还可以用于显示上述测温距离。Among them, the forehead temperature gun 200 (such as the processor of the forehead temperature gun 200) can adopt a temperature compensation model, and according to the temperature measurement distance measured by the distance sensor, perform temperature compensation on the first temperature value measured by the infrared temperature sensor, and obtain the second temperature value. temperature value. The other end of the main body 210 is provided with a display screen 211 . The display screen 211 can be used to display the second temperature value, and can also be used to display the above temperature measurement distance.

可选的,上述测温部件212还可以包括摄像头。该摄像头用于采集被测对象的图像。处理器可以根据该摄像头采集的图像,识别被测对象,以选择该被测对象对应的温度补偿模型对第一温度值进行温度补偿得到第二温度值。Optionally, the above temperature measuring component 212 may further include a camera. The camera is used to capture the image of the measured object. The processor may identify the measured object according to the image collected by the camera, and select a temperature compensation model corresponding to the measured object to perform temperature compensation on the first temperature value to obtain the second temperature value.

需要说明的是,图2仅以举例方式给出电子设备的一种产品形态实例示意图,本申请实施例提供的电子设备包括但不限于图2所示的额温枪200。例如,本申请实施例提供的电子设备还可以是图3中的(a)和(b)或图3中的(a)和(c)所示的测温仪300。It should be noted that FIG. 2 only provides a schematic diagram of a product form example of an electronic device by way of example, and the electronic device provided by the embodiment of the present application includes but is not limited to the forehead temperature gun 200 shown in FIG. 2 . For example, the electronic device provided in the embodiment of the present application may also be the thermometer 300 shown in (a) and (b) in FIG. 3 or (a) and (c) in FIG. 3 .

图3中的(a)示出测温仪300的主视图。如图3中的(a)所示,测温仪300的正面设置有显示屏302和控制开关303,301是测温仪300的壳体。该控制开关303可以是机械按键,也可以是触摸式按键。(a) in FIG. 3 shows a front view of the thermometer 300 . As shown in (a) of FIG. 3 , a display screen 302 and a control switch 303 are provided on the front of the thermometer 300 , and 301 is the housing of the thermometer 300 . The control switch 303 may be a mechanical key or a touch key.

在一些实施例中,控制开关303还可以设置在测温仪300的侧边(如左侧边、右侧边、上侧边或者下侧边)。可选的,为了方便用户操作,该控制开关303可以设置在测温仪300上、用户握持测温仪300时方便用户手指操作的位置(如左侧边或右侧边)。在另一些实施例中,该控制开关303还可以设置在显示屏上,该控制开关303可以是显示屏显示的预设控件(如按钮)。In some embodiments, the control switch 303 may also be disposed on the side of the thermometer 300 (eg, the left side, the right side, the upper side or the lower side). Optionally, in order to facilitate user operation, the control switch 303 may be set on the thermometer 300 at a position (such as the left side or the right side) that is convenient for the user's fingers to operate when the user holds the thermometer 300 . In other embodiments, the control switch 303 may also be disposed on the display screen, and the control switch 303 may be a preset control (such as a button) displayed on the display screen.

图3中的(b)或图3中的(c)示出测温仪300的后视图。如图3中的(b)或图3中的 (c)所示,测温仪300还包括处理器307、温度传感器30a(如红外温度传感器)和距离传感器30b。如图3中的(c)所示,温度传感器30a和距离传感器30b之间的距离为第一长度 T。示例性的,该第一长度T的取值范围为0~4厘米(cm)。(b) in FIG. 3 or (c) in FIG. 3 shows a rear view of the thermometer 300 . As shown in (b) of FIG. 3 or (c) of FIG. 3 , the thermometer 300 further includes a processor 307, a temperature sensor 30a (eg, an infrared temperature sensor) and a distance sensor 30b. As shown in (c) of FIG. 3 , the distance between the temperature sensor 30a and the distance sensor 30b is the first length T. As shown in FIG. Exemplarily, the value of the first length T ranges from 0 to 4 centimeters (cm).

该处理器307设置在测温仪300的内部。如图3中的(b)或图3中的(c)所示,温度传感器30a和距离传感器30b可设置在测温仪300的背面的开孔处。例如,如图3中的(b) 所示,温度传感器30a和距离传感器30b可设置在测温仪300一个开孔304处。又例如,如图3中的(b)所示,温度传感器30a设置在测温仪300一个开孔305处,距离传感器30b设置在测温仪300另一个开孔306处。上述开孔304、开孔305和开孔306均为盲孔。盲孔是指连接内层之间而在成品板表层不可见的导通孔。因此开孔304、开孔305和开孔306对用户不可见。也就是说,用户观察测温仪300的外观不能发现上述开孔304、开孔305和开孔 306;但是,温度传感器30a可以通过上述开孔测量被测对象的温度,距离传感器30b可以通过上述开孔测量被测对象与测温仪300之间的距离。The processor 307 is arranged inside the thermometer 300 . As shown in (b) of FIG. 3 or (c) of FIG. 3 , the temperature sensor 30 a and the distance sensor 30 b may be provided at the opening on the back of the thermometer 300 . For example, as shown in (b) of FIG. 3 , the temperature sensor 30 a and the distance sensor 30 b may be provided at an opening 304 of the thermometer 300 . For another example, as shown in (b) of FIG. 3 , the temperature sensor 30 a is arranged at one opening 305 of the thermometer 300 , and the distance sensor 30 b is arranged at the other opening 306 of the thermometer 300 . The above-mentioned openings 304 , 305 and 306 are all blind holes. Blind vias refer to via holes that connect the inner layers and are not visible on the surface of the finished board. The apertures 304, 305 and 306 are therefore invisible to the user. That is to say, the user cannot find the above-mentioned openings 304, 305 and 306 by observing the appearance of the thermometer 300; however, the temperature sensor 30a can measure the temperature of the object to be measured through the above-mentioned openings, and the distance sensor 30b can The opening measures the distance between the object to be measured and the thermometer 300 .

可以理解,上述温度传感器30a和距离传感器30b设置在测温仪300的背面,可以方便用户为其他被测对象(如其他用户)测量温度。在另一些实施例中,上述温度传感器30a和距离传感器30b还可以设置在测温仪300的正面,可以方便用户为自己测量温度。在另一些实施例中,上述温度传感器30a和距离传感器30b还可以设置在测温仪300的侧边(如左侧边、右侧边、上侧边或者下侧边)。It can be understood that the above-mentioned temperature sensor 30a and distance sensor 30b are arranged on the back of the thermometer 300, which can facilitate the user to measure the temperature of other measured objects (eg, other users). In other embodiments, the above-mentioned temperature sensor 30a and distance sensor 30b can also be arranged on the front of the thermometer 300, which can facilitate the user to measure the temperature for himself. In other embodiments, the above-mentioned temperature sensor 30a and distance sensor 30b may also be disposed on the side of the thermometer 300 (eg, the left side, the right side, the upper side or the lower side).

在另一些实施例中,上述测温仪300还可以包括摄像头。该摄像头设置在靠近温度传感器30a和距离传感器30b的位置处,用于采集被测对象的图像。In other embodiments, the above-mentioned thermometer 300 may further include a camera. The camera is arranged at a position close to the temperature sensor 30a and the distance sensor 30b, and is used for collecting images of the measured object.

需要说明的是,上述控制开关303、处理器307、摄像头、温度传感器30a和距离传感器30b等器件的功能,可参考本实施例对图2所示的额温枪200中各个器件的功能介绍,本实施例这里不予赘述。It should be noted that, for the functions of the above-mentioned control switch 303, processor 307, camera, temperature sensor 30a, distance sensor 30b and other devices, the functions of each device in the forehead temperature gun 200 shown in FIG. 2 can be introduced with reference to this embodiment. This embodiment will not be repeated here.

以上述电子设备是手机为例。请参考图4,其示出本申请实施例提供的手机400的局部示意图。如图4所示,手机400可以包括温度传感器401(如红外温度传感器)、距离传感器 402和摄像头403。温度传感器401和距离传感器402之间的距离为第一长度T。距离传感器 402设置在盲孔404中,温度传感器401设置在盲孔405中。Take the above-mentioned electronic device being a mobile phone as an example. Please refer to FIG. 4 , which shows a partial schematic diagram of a mobile phone 400 provided by an embodiment of the present application. As shown in FIG. 4 , the mobile phone 400 may include a temperature sensor 401 (such as an infrared temperature sensor), a distance sensor 402 and a camera 403. The distance between the temperature sensor 401 and the distance sensor 402 is the first length T. The distance sensor 402 is arranged in the blind hole 404, and the temperature sensor 401 is arranged in the blind hole 405.

在一种情况下,上述图4示出手机400的正面的局部示意图。也就是说,温度传感器401 和距离传感器402可以设置在手机400的正面,如手机400的显示屏所在的平面上。在这种情况下,摄像头403是手机400的前置摄像头。In one case, the above-mentioned FIG. 4 shows a partial schematic view of the front side of the mobile phone 400 . That is to say, the temperature sensor 401 and the distance sensor 402 may be disposed on the front of the mobile phone 400 , such as on the plane where the display screen of the mobile phone 400 is located. In this case, the camera 403 is the front camera of the mobile phone 400 .

在另一种情况下,上述图4示出手机400的背面的局部示意图。也就是说,温度传感器 401和距离传感器402可以设置在手机400的背面,如与手机400的显示屏所在的平面相对的一面上。在这种情况下,摄像头403是手机400的后置摄像头。In another case, the above-mentioned FIG. 4 shows a partial schematic view of the back of the mobile phone 400 . That is to say, the temperature sensor 401 and the distance sensor 402 can be arranged on the back of the mobile phone 400, such as on the side opposite to the plane where the display screen of the mobile phone 400 is located. In this case, the camera 403 is the rear camera of the mobile phone 400 .

当然,上述温度传感器401和距离传感器402还可以设置在手机400的侧边(如左侧边、右侧边、上侧边或者下侧边)。本申请实施例对此不作限制。Of course, the above-mentioned temperature sensor 401 and distance sensor 402 may also be disposed on the side of the mobile phone 400 (eg, the left side, the right side, the upper side or the lower side). This embodiment of the present application does not limit this.

在一些实施例中,手机400的表面设置有一个或多个盲孔。上述温度传感器401和距离传感器402设置在上述一个或多个盲孔中。也就是说,用户观察手机400的外观不能发现上述盲孔;但是,温度传感器401可以通过上述开孔测量被测对象的温度,距离传感器402可以通过上述盲孔测量被测对象与手机400之间的距离。In some embodiments, the surface of the mobile phone 400 is provided with one or more blind holes. The above-mentioned temperature sensor 401 and the distance sensor 402 are arranged in the above-mentioned one or more blind holes. That is to say, the user cannot find the above-mentioned blind hole by observing the appearance of the mobile phone 400; however, the temperature sensor 401 can measure the temperature of the measured object through the above-mentioned opening, and the distance sensor 402 can measure the distance between the measured object and the mobile phone 400 through the above-mentioned blind hole the distance.

手机400还可以包括处理器和控制开关。该控制开关可以是手机400上专门设置的用于触发手机400测量温度的机械按键或触摸式按键。或者,该控制开关还可以是手机400上多个按键组成的组合按键,如“音量+”和“锁屏”键组成的组合按键。或者,该控制开关还可以是手机400的显示屏所显示预设控件,该预设控件用于触发手机400测量温度。Cell phone 400 may also include a processor and control switches. The control switch may be a mechanical key or a touch key specially set on the mobile phone 400 for triggering the temperature measurement of the mobile phone 400 . Alternatively, the control switch may also be a combination button composed of multiple buttons on the mobile phone 400, such as a combination button composed of a "volume +" and a "lock screen" button. Alternatively, the control switch may also be a preset control displayed on the display screen of the mobile phone 400, and the preset control is used to trigger the mobile phone 400 to measure the temperature.

需要说明的是,上述控制开关、处理器、温度传感器401、距离传感器402和摄像头403 等器件的功能,可参考本实施例对图2所示的额温枪200中各个器件的功能介绍,本实施例这里不予赘述。It should be noted that the functions of the above-mentioned control switch, processor, temperature sensor 401, distance sensor 402, camera 403 and other devices can refer to the function introduction of each device in the forehead temperature gun 200 shown in FIG. 2 with reference to this embodiment. The embodiments are not repeated here.

本申请实施例中,以上述电子设备是手机为例,示出电子设备的结构示意图。如图5所示,电子设备500(如手机)可以包括:处理器510,外部存储器接口520,内部存储器521,通用串行总线(universal serial bus,USB)接口530,充电管理模块540,电源管理模块541,电池542,天线1,天线2,移动通信模块550,无线通信模块560,音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,传感器模块580,按键590,马达591,指示器592,摄像头593,显示屏594,以及用户标识模块(subscriber identification module,SIM)卡接口595等。In the embodiments of the present application, the above-mentioned electronic device is a mobile phone as an example, and a schematic structural diagram of the electronic device is shown. As shown in FIG. 5 , an electronic device 500 (eg, a mobile phone) may include: a processor 510 , an external memory interface 520 , an internal memory 521 , a universal serial bus (USB) interface 530 , a charging management module 540 , and a power management Module 541, Battery 542, Antenna 1, Antenna 2, Mobile Communication Module 550, Wireless Communication Module 560, Audio Module 570, Speaker 570A, Receiver 570B, Microphone 570C, Headphone Interface 570D, Sensor Module 580, Key 590, Motor 591, Indication 592, camera 593, display screen 594, and subscriber identification module (subscriber identification module, SIM) card interface 595 and so on.

其中,上述传感器模块580可以包括温度传感器580J和距离传感器580F。该温度传感器580J用于测量被测对象的温度。例如,该温度传感器580J可以是红外温度传感器。该温度传感器580J可以基于热电堆技术、热电偶技术、热电阻技术、光电倍增管技术、光电倍增管技术或者光敏相变技术,测量被测对象的温度。The above sensor module 580 may include a temperature sensor 580J and a distance sensor 580F. The temperature sensor 580J is used to measure the temperature of the measured object. For example, the temperature sensor 580J may be an infrared temperature sensor. The temperature sensor 580J can measure the temperature of the measured object based on thermopile technology, thermocouple technology, thermal resistance technology, photomultiplier tube technology, photomultiplier tube technology or photosensitive phase change technology.

该距离传感器580F用于测量被测对象与电子设备500之间的距离(称为测温距离)。例如,距离传感器580F可以是雷达测距模块、激光测距模块、红外测距模块、超声波测距模块、飞行时间(Time of flight,ToF)测距模块、相机测距模块或者接近光测距模块等。也就是说,上述距离传感器580F可以基于雷达测距技术、激光测距技术、红外测距技术、超声波测距技术、ToF技术、相机测距技术或者接近光测距技术等,测量上述测温距离。需要说明的是,上述距离传感器580F测量距离的误差在(-1.5cm~1.5cm)以内。The distance sensor 580F is used to measure the distance between the measured object and the electronic device 500 (referred to as the temperature measurement distance). For example, the distance sensor 580F may be a radar ranging module, a laser ranging module, an infrared ranging module, an ultrasonic ranging module, a Time of flight (ToF) ranging module, a camera ranging module, or a proximity light ranging module Wait. That is to say, the above distance sensor 580F can measure the above temperature measurement distance based on radar ranging technology, laser ranging technology, infrared ranging technology, ultrasonic ranging technology, ToF technology, camera ranging technology or proximity light ranging technology, etc. . It should be noted that the error of the distance measured by the distance sensor 580F is within (-1.5 cm to 1.5 cm).

当然,传感器模块580还可以包括其他类型的传感器,如压力传感器580A,陀螺仪传感器580B,气压传感器580C,磁传感器580D,加速度传感器580E,接近光传感器580G,指纹传感器580H,触摸传感器580K,环境光传感器580L和骨传导传感器580M等传感器。Of course, the sensor module 580 may also include other types of sensors, such as pressure sensor 580A, gyro sensor 580B, air pressure sensor 580C, magnetic sensor 580D, acceleration sensor 580E, proximity light sensor 580G, fingerprint sensor 580H, touch sensor 580K, ambient light Sensors such as sensor 580L and bone conduction sensor 580M.

可以理解的是,本实施例示意的结构并不构成对电子设备500的具体限定。在另一些实施例中,电子设备500可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 500 . In other embodiments, the electronic device 500 may include more or fewer components than shown, or some components may be combined, or some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

处理器510可以包括一个或多个处理单元,例如:处理器510可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)、微控制单元(microcontroller unit;MCU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 510 may include one or more processing units, for example, the processor 510 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor ( image signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU), Microcontroller unit (microcontroller unit; MCU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

控制器可以是电子设备500的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。例如,本申请实施例中,处理器 510采用温度补偿模型,根据距离传感器580F测量得到的测温距离,对温度传感器580J测量得到的第一温度值进行温度补偿,得到第二温度值。处理器510还可以用于控制显示屏594 显示该第二温度值。The controller may be the nerve center and command center of the electronic device 500 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions. For example, in this embodiment of the present application, the processor 510 uses a temperature compensation model to perform temperature compensation on the first temperature value measured by the temperature sensor 580J according to the temperature measurement distance measured by the distance sensor 580F to obtain the second temperature value. The processor 510 may also be used to control the display screen 594 to display the second temperature value.

处理器510中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器510 中的存储器为高速缓冲存储器。该存储器可以保存处理器510刚用过或循环使用的指令或数据。如果处理器510需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器510的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 510 for storing instructions and data. In some embodiments, the memory in processor 510 is cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 510 . If the processor 510 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the waiting time of the processor 510 is reduced, thereby increasing the efficiency of the system.

在一些实施例中,处理器510可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S) 接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块 (subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 510 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and/or Universal serial bus (universal serial bus, USB) interface, etc.

可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备500的结构限定。在另一些实施例中,电子设备500也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that, the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration, and does not constitute a structural limitation of the electronic device 500 . In other embodiments, the electronic device 500 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.

充电管理模块540用于从充电器接收充电输入。充电管理模块540为电池542充电的同时,还可以通过电源管理模块541为电子设备500供电。电源管理模块541用于连接电池542,充电管理模块540与处理器510。电源管理模块541接收电池542和/或充电管理模块540的输入,为处理器510,内部存储器521,传感器模块580,显示屏594,摄像头593和无线通信模块560等供电。在一些实施例中,电源管理模块541也可以设置于处理器510中,也可以设置于同一个器件中。The charging management module 540 is used to receive charging input from the charger. While the charging management module 540 charges the battery 542 , the electronic device 500 can also be powered by the power management module 541 . The power management module 541 is used to connect the battery 542 , the charging management module 540 and the processor 510 . The power management module 541 receives input from the battery 542 and/or the charge management module 540, and supplies power to the processor 510, the internal memory 521, the sensor module 580, the display screen 594, the camera 593 and the wireless communication module 560. In some embodiments, the power management module 541 may also be provided in the processor 510, or may be provided in the same device.

电子设备500的无线通信功能可以通过天线1,天线2,移动通信模块550,无线通信模块560,调制解调处理器以及基带处理器等实现。例如,本申请实施例中,电子设备500可以通过移动通信模块550或无线通信模块560,向其他电子设备发送上述第二温度值。The wireless communication function of the electronic device 500 may be implemented by the antenna 1, the antenna 2, the mobile communication module 550, the wireless communication module 560, the modulation and demodulation processor, the baseband processor, and the like. For example, in this embodiment of the present application, the electronic device 500 may send the above-mentioned second temperature value to other electronic devices through the mobile communication module 550 or the wireless communication module 560 .

电子设备500通过GPU,显示屏594,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏594和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器510可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。例如,本申请实施例中,处理器510可以执行程序指令,生成包括上述第二温度值的GPU。The electronic device 500 implements a display function through a GPU, a display screen 594, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 594 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 510 may include one or more GPUs that execute program instructions to generate or alter display information. For example, in this embodiment of the present application, the processor 510 may execute a program instruction to generate a GPU including the above-mentioned second temperature value.

显示屏594用于显示图像,视频等。例如,显示屏594可以显示上述第二温度值(即进行温度补偿后的温度)。显示屏594还可以显示上述测温距离等信息。Display screen 594 is used to display images, videos, and the like. For example, the display screen 594 may display the above-mentioned second temperature value (ie, the temperature after temperature compensation). The display screen 594 can also display the above-mentioned temperature measurement distance and other information.

该显示屏594包括显示面板。显示面板可以采用液晶显示屏(liquid crystaldisplay,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。The display screen 594 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (quantum dot light emitting diodes, QLED) and so on.

电子设备500可以通过ISP,摄像头593,视频编解码器,GPU,显示屏594以及应用处理器等实现拍摄功能。The electronic device 500 may implement a shooting function through an ISP, a camera 593, a video codec, a GPU, a display screen 594, an application processor, and the like.

摄像头593用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体 (complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备500可以包括1个或N个摄像头593,N为大于1的正整数。Camera 593 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 500 may include 1 or N cameras 593 , where N is a positive integer greater than 1.

示例性的,本申请实施例中,摄像头593可用于采集被测对象的图像。该摄像头593采集的被测对象的图像,可用于识别不同的被测对象。Exemplarily, in this embodiment of the present application, the camera 593 may be used to collect an image of the object to be measured. The images of the measured objects collected by the camera 593 can be used to identify different measured objects.

NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备500的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。示例性的,本申请实施例中,电子设备500可以通过NPU进行温度补偿,并实现温度补偿模型的自学习,以提升该温度补偿模型进行温度补偿的准确度,从而可以提高测温结果的准确度。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 500 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like. Exemplarily, in this embodiment of the present application, the electronic device 500 may perform temperature compensation through the NPU, and implement self-learning of the temperature compensation model, so as to improve the accuracy of temperature compensation performed by the temperature compensation model, thereby improving the accuracy of the temperature measurement result. Spend.

外部存储器接口520可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备 500的存储能力。外部存储卡通过外部存储器接口520与处理器510通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 520 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 500. The external memory card communicates with the processor 510 through the external memory interface 520 to realize the data storage function. For example to save files like music, video etc in external memory card.

内部存储器521可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器510通过运行存储在内部存储器521的指令,从而执行电子设备500的各种功能应用以及数据处理。例如,在本申请实施例中,处理器510可以通过执行存储在内部存储器521 中的指令,内部存储器521可以包括存储程序区和存储数据区。Internal memory 521 may be used to store computer executable program code, which includes instructions. The processor 510 executes various functional applications and data processing of the electronic device 500 by executing the instructions stored in the internal memory 521 . For example, in this embodiment of the present application, the processor 510 may execute instructions stored in the internal memory 521, and the internal memory 521 may include a program storage area and a storage data area.

电子设备500可以通过音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,以及应用处理器等实现音频功能。例如音乐播放,录音等。例如,本申请实施例中,电子设备500可以通过音频模块570播报上述第二温度值。The electronic device 500 may implement audio functions through an audio module 570, a speaker 570A, a receiver 570B, a microphone 570C, an earphone interface 570D, and an application processor. Such as music playback, recording, etc. For example, in this embodiment of the present application, the electronic device 500 may broadcast the above-mentioned second temperature value through the audio module 570 .

按键590包括开机键,音量键等。按键590可以是机械按键。也可以是触摸式按键。电子设备500可以接收按键输入,产生与电子设备500的用户设置以及功能控制有关的键信号输入。例如,按键590可以是上述实施例中所述的控制开关。该控制开关用于触发电子设备 500启动温度传感器580J和距离传感器580F,以实现本申请实施例的方法。The keys 590 include a power-on key, a volume key, and the like. Keys 590 may be mechanical keys. It can also be a touch key. The electronic device 500 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 500 . For example, the key 590 may be the control switch described in the above embodiments. The control switch is used to trigger the electronic device 500 to activate the temperature sensor 580J and the distance sensor 580F, so as to implement the method of the embodiment of the present application.

马达591可以产生振动提示。马达591可以用于来电振动提示,也可以用于触摸振动反馈。例如,本申请实施例中,马达591可以产生振动提示,以提示上述第二温度值正常或者异常。马达591可以产生振动提示,还可以用于提示用户电子设备500与被测对象距离过近 (如测温距离小于距离阈值1)或者过远(如测温距离大于距离阈值2)。Motor 591 can generate vibrating cues. The motor 591 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, in this embodiment of the present application, the motor 591 may generate a vibration prompt to prompt that the above-mentioned second temperature value is normal or abnormal. The motor 591 can generate a vibration prompt, and can also be used to prompt the user that the distance between the electronic device 500 and the measured object is too close (eg, the temperature measurement distance is less than the distance threshold 1) or too far (eg, the temperature measurement distance is greater than the distance threshold 2).

指示器592可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。例如,本申请实施例中,指示器592可以用于指示电子设备500已测量得到被测对象的温度。SIM卡接口595用于连接SIM卡。SIM卡可以通过插入SIM卡接口 595,或从SIM卡接口595拔出,实现和电子设备500的接触和分离。电子设备500可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口595可以支持Nano SIM卡, Micro SIM卡,SIM卡等。The indicator 592 can be an indicator light, which can be used to indicate the charging status, the change of power, and can also be used to indicate messages, missed calls, notifications, and the like. For example, in this embodiment of the present application, the indicator 592 may be used to indicate that the electronic device 500 has measured the temperature of the measured object. The SIM card interface 595 is used to connect a SIM card. The SIM card can be inserted into the SIM card interface 595 or pulled out from the SIM card interface 595 to achieve contact and separation with the electronic device 500. The electronic device 500 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 595 can support Nano SIM card, Micro SIM card, SIM card and so on.

以下实施例中的方法均可以在具有上述硬件结构的电子设备500中实现。以下实施例中以上述电子设备500是手机(如图6所示的手机600)为例,对本申请实施例提供的技术方案进行具体阐述。The methods in the following embodiments can all be implemented in the electronic device 500 having the above-mentioned hardware structure. In the following embodiments, the above-mentioned electronic device 500 is a mobile phone (the mobile phone 600 shown in FIG. 6 ) as an example, and the technical solutions provided by the embodiments of the present application are described in detail.

本申请实施例提供一种测量温度的方法,该方法可以应用于手机,该手机中设置有温度传感器和距离传感器。该温度传感器用于采集被测对象(如图6所示的鲍勃(Bob))的温度,即第一温度值,也称为测量温度值。该距离传感器用于采集手机与被测对象之间的距离,即第一距离,也称为测温距离。例如,如图6所示的手机600与Bob之间的第一距离为L。The embodiment of the present application provides a method for measuring temperature, and the method can be applied to a mobile phone, and the mobile phone is provided with a temperature sensor and a distance sensor. The temperature sensor is used to collect the temperature of the measured object (Bob as shown in FIG. 6 ), that is, the first temperature value, which is also referred to as the measured temperature value. The distance sensor is used to collect the distance between the mobile phone and the measured object, that is, the first distance, also known as the temperature measurement distance. For example, the first distance between the mobile phone 600 and Bob as shown in FIG. 6 is L.

手机的壳体上可以包括一个或两个开孔。该开孔可以是盲孔。该盲孔中设置有温度传感器和距离传感器。其中,盲孔是指连接内层之间而在成品板表层不可见的导通孔。也就是说,盲孔对用户不可见。The casing of the mobile phone may include one or two openings. The openings may be blind holes. A temperature sensor and a distance sensor are arranged in the blind hole. Among them, the blind hole refers to the via hole that connects the inner layers and is not visible on the surface layer of the finished board. That is, blind holes are invisible to the user.

在一种实现方式中,手机的壳体上设置有两个盲孔,温度传感器和距离传感器分别设置在不同的盲孔中。例如,如图4所示,手机400的外壳上设置有两个盲孔404和405。距离传感器402设置在盲孔404中,温度传感器401设置在盲孔405中。In an implementation manner, two blind holes are provided on the casing of the mobile phone, and the temperature sensor and the distance sensor are respectively provided in different blind holes. For example, as shown in FIG. 4 , two blind holes 404 and 405 are provided on the casing of the mobile phone 400 . The distance sensor 402 is arranged in the blind hole 404 , and the temperature sensor 401 is arranged in the blind hole 405 .

示例性的,在该实现方式中,上述盲孔404和盲孔405之间的距离(即盲孔404的中心点和盲孔405的中心点之间的距离)为第一长度T。也就是说,距离传感器402和温度传感器401之间的距离为第一长度T。例如,该第一长度T的取值范围为0~4cm。Exemplarily, in this implementation manner, the distance between the blind hole 404 and the blind hole 405 (ie, the distance between the center point of the blind hole 404 and the center point of the blind hole 405 ) is the first length T. That is, the distance between the distance sensor 402 and the temperature sensor 401 is the first length T. For example, the value range of the first length T is 0-4 cm.

可以理解,距离传感器402所采集的距离,是该距离传感器402与被测对象之间的距离。但是,产生手机的测温误差的测温距离是温度传感器401与被测对象之间的距离。因此,上述第一长度T越小,即距离传感器402和温度传感器401之间的距离越小,则距离传感器402 所采集的距离则越接近温度传感器401与被测对象之间的距离,距离传感器402所采集的距离(即测温距离)则越准确。这样,可以提升手机进行温度补偿的准确度,进而提升测温结果的准确度。It can be understood that the distance collected by the distance sensor 402 is the distance between the distance sensor 402 and the measured object. However, the temperature measurement distance that generates the temperature measurement error of the mobile phone is the distance between the temperature sensor 401 and the measured object. Therefore, the smaller the above-mentioned first length T is, that is, the smaller the distance between the distance sensor 402 and the temperature sensor 401, the closer the distance collected by the distance sensor 402 is to the distance between the temperature sensor 401 and the measured object, the distance sensor The distance collected by 402 (ie, the temperature measurement distance) is more accurate. In this way, the accuracy of the temperature compensation performed by the mobile phone can be improved, thereby improving the accuracy of the temperature measurement result.

在另一种实现方式中,手机的壳体上设置有一个盲孔,温度传感器和距离传感器均设置在该盲孔中(附图未示出)。In another implementation manner, a blind hole is arranged on the casing of the mobile phone, and both the temperature sensor and the distance sensor are arranged in the blind hole (not shown in the drawings).

其中,盲孔对用户不可见,即温度传感器和距离传感器对用户不可见。因此,用户观察手机的外观不能发现该盲孔,也不能发现温度传感器和距离传感器。但是,该盲孔的设计,并不会影响温度传感器通过盲孔采集被测对象的温度;也不会影响距离传感器通过盲孔采集被测对象与手机之间的距离。The blind hole is invisible to the user, that is, the temperature sensor and the distance sensor are invisible to the user. Therefore, the user cannot find the blind hole by observing the appearance of the mobile phone, nor can he find the temperature sensor and the distance sensor. However, the design of the blind hole does not affect the temperature sensor to collect the temperature of the measured object through the blind hole, nor does it affect the distance sensor to collect the distance between the measured object and the mobile phone through the blind hole.

在另一些实施例中,上述一个或两个开孔可以不是盲孔。在该实施例中,上述温度传感器和距离传感器对用户可见。即用户观察手机的外观可以发现温度传感器和距离传感器。本申请实施例对此不作限制。In other embodiments, one or both of the above-mentioned openings may not be blind holes. In this embodiment, the above-mentioned temperature sensor and distance sensor are visible to the user. That is, the user can find the temperature sensor and the distance sensor by observing the appearance of the mobile phone. This embodiment of the present application does not limit this.

上述温度传感器和距离传感器在手机上的位置可以包括以下三种设计方式:设计方式(1) -设计方式(3)。The positions of the above-mentioned temperature sensor and distance sensor on the mobile phone may include the following three design methods: design method (1) - design method (3).

设计方式(1):温度传感器和距离传感器可以设置在手机的正面(即手机的显示屏所在的一面)。即上述一个或多个开孔设置在手机的正面。例如,该温度传感器和距离传感器可以设置在手机600的正面,靠近手机600的前置摄像头的位置。这样,可以方便用户为自己测量温度。Design method (1): The temperature sensor and the distance sensor can be arranged on the front side of the mobile phone (that is, the side where the display screen of the mobile phone is located). That is, the above-mentioned one or more openings are arranged on the front side of the mobile phone. For example, the temperature sensor and the distance sensor may be arranged on the front of the mobile phone 600 , close to the position of the front camera of the mobile phone 600 . In this way, it is convenient for the user to measure the temperature for himself.

设计方式(2):温度传感器和距离传感器可以设置在手机的背面。即上述一个或多个开孔设置在手机的背面。例如,该温度传感器和距离传感器可以设置在手机的背面,靠近手机的后置摄像头的位置。这样,可以方便用户使用手机测量其他被测对象的温度。Design method (2): The temperature sensor and the distance sensor can be arranged on the back of the mobile phone. That is, the above-mentioned one or more openings are arranged on the back of the mobile phone. For example, the temperature sensor and the distance sensor can be placed on the back of the phone, close to the location of the phone's rear camera. In this way, it is convenient for the user to use the mobile phone to measure the temperature of other measured objects.

设计方式(3),温度传感器和距离传感器还可以设置在手机的侧边(如左侧边、右侧边、上侧边或者下侧边)。即上述一个或多个开孔设置在手机的侧边。本申请实施例对温度传感器和距离传感器在手机上的位置不做限制。In the design method (3), the temperature sensor and the distance sensor can also be arranged on the side of the mobile phone (such as the left side, the right side, the upper side or the lower side). That is, the above-mentioned one or more openings are arranged on the side of the mobile phone. The embodiments of the present application do not limit the positions of the temperature sensor and the distance sensor on the mobile phone.

需要说明的是,手机中的温度传感器和距离传感器的各种可能的实现方式,可以参考上述实施例对温度传感器和距离传感器的详细介绍,这里不予赘述。It should be noted that, for various possible implementation manners of the temperature sensor and the distance sensor in the mobile phone, reference may be made to the detailed introduction of the temperature sensor and the distance sensor in the above-mentioned embodiments, which will not be repeated here.

本申请实施例的方法可以包括阶段(1)和阶段(2)这两个阶段。阶段(1):温度补偿模型的初步建立阶段,用于建立初始的温度补偿模型。阶段(2):模型的使用和自学习阶段,用于使用温度补偿模型对测量温度值(即第一温度值)进行温度补偿,并对温度补偿模型进行模型训练。The method of this embodiment of the present application may include two stages: stage (1) and stage (2). Stage (1): the preliminary establishment stage of the temperature compensation model, which is used to establish the initial temperature compensation model. Stage (2): the use and self-learning stage of the model, which is used to perform temperature compensation on the measured temperature value (ie, the first temperature value) by using the temperature compensation model, and perform model training on the temperature compensation model.

首先,本申请实施例这里介绍上述阶段(1),即温度补偿模型的初步建立阶段。First, the embodiments of the present application introduce the above-mentioned stage (1), that is, the preliminary establishment stage of the temperature compensation model.

其中,手机中预先配置有一个或多个温度补偿模型。该温度补偿模型可以是预设的AI 模型。该温度补偿模型具备采用上述距离传感器采集的第一距离,对温度传感器采集的第一温度值进行温度补偿,得到更接近于被测对象的真实温度值的第二温度值的能力。Among them, one or more temperature compensation models are preconfigured in the mobile phone. The temperature compensation model may be a preset AI model. The temperature compensation model has the ability to use the first distance collected by the distance sensor to perform temperature compensation on the first temperature value collected by the temperature sensor to obtain a second temperature value that is closer to the true temperature value of the measured object.

示例性的,上述被测对象可以人、动物、食物或者其他需要测量温度的物体等。上述一个或多个温度补偿模型可以是一个或多个类型的被测对象的温度补偿模型。例如,按照被测对象的类型,可以将被测对象分为:人、动物、食物或者其他需要测量温度的物体。Exemplarily, the above-mentioned measured object may be a person, an animal, food, or other objects whose temperature needs to be measured. The one or more temperature compensation models described above may be temperature compensation models for one or more types of objects under test. For example, according to the type of the measured object, the measured object can be divided into: people, animals, food or other objects whose temperature needs to be measured.

可以理解,不同类型的被测对象的温度特征(如温度值)可能不同。例如,人体的正常体温为36.5℃~37.2℃;而大多数猫的正常体温为38℃以上。并且,针对不同类型的被测对象而言,测温距离对测温误差的影响程度可能不同。例如,如图1所示,在测温距离相同的情况下,测温距离对被测对象c的测温误差的影响程度大于测温距离对被测对象a的测温误差的影响程度。并且,同一类型的被测对象的温度特征(如温度值)也可能不同。例如,不同人的正常体温(即人体健康时的体温)可能不同。It can be understood that the temperature characteristics (eg, temperature values) of different types of measured objects may be different. For example, the normal body temperature of the human body is 36.5°C to 37.2°C; while the normal body temperature of most cats is above 38°C. Moreover, for different types of measured objects, the temperature measurement distance may have different degrees of influence on the temperature measurement error. For example, as shown in Fig. 1, when the temperature measurement distance is the same, the influence degree of the temperature measurement distance on the temperature measurement error of the measured object c is greater than the influence degree of the temperature measurement distance on the temperature measurement error of the measured object a. Moreover, the temperature characteristics (such as temperature values) of the same type of measured objects may also be different. For example, the normal body temperature (that is, the body temperature of a healthy human body) may vary from person to person.

其中,手机中可以针对每种类型的被测对象保存至少一个温度补偿模型。例如,手机出厂时,该手机中可以保存表1所示的多个温度补偿模型。Wherein, at least one temperature compensation model can be stored in the mobile phone for each type of measured object. For example, when a mobile phone leaves the factory, the plurality of temperature compensation models shown in Table 1 can be stored in the mobile phone.

表1Table 1

Figure GDA0003488174020000141
Figure GDA0003488174020000141

其中,表2所示的温度补偿模型a、温度补偿模型b和温度补偿模型c是未经过更新的预设AI模型。The temperature compensation model a, temperature compensation model b, and temperature compensation model c shown in Table 2 are preset AI models that have not been updated.

示例性的,本申请实施例这里以被测对象是人为例,介绍本申请实施例中得到具备上述温度补偿功能的温度补偿模型的方法。Exemplarily, in the embodiments of the present application, a method for obtaining a temperature compensation model with the above temperature compensation function in the embodiments of the present application is introduced by taking the object to be measured as a human as an example.

本申请实施例中,可以针对大量用户执行以下步骤1和步骤2,以得到用于训练上述温度补偿模型的多个训练样本。步骤1:距离传感器采集用户与手机之间的测温距离,温度传感器采集用户的测量温度值。步骤2,获取该用户的真实温度值。并且,针对大量用户获取上述训练样本的过程中,可以在预设距离范围内调整用户与手机之间的距离。例如,可以获取测温距离为10mm、15mm、20mm、25mm、30mm、35mm、40mm或者45mm等任一距离时,用于训练上述温度补偿模型的训练样本。In this embodiment of the present application, the following steps 1 and 2 may be performed for a large number of users to obtain multiple training samples for training the above temperature compensation model. Step 1: The distance sensor collects the temperature measurement distance between the user and the mobile phone, and the temperature sensor collects the user's measured temperature value. Step 2, obtain the real temperature value of the user. Moreover, in the process of acquiring the above training samples for a large number of users, the distance between the user and the mobile phone can be adjusted within a preset distance range. For example, when the temperature measurement distance is 10mm, 15mm, 20mm, 25mm, 30mm, 35mm, 40mm or 45mm, the training samples for training the above temperature compensation model can be obtained.

其中,一个训练样本中可以包括一个测温距离、一个测量温度值和一个真实温度值。本申请实施例中,可以采用预设AI算法,将每个训练样本中的测量距离和测量温度值作为温度补偿模型的输入样本,将真实温度值作为温度补偿模型的输出样本,训练温度补偿模型,使该温度补偿模型具备采用测温距离对测量温度值进行温度补偿的功能。Among them, a training sample may include a temperature measurement distance, a measured temperature value and a real temperature value. In the embodiment of the present application, a preset AI algorithm can be used, the measured distance and the measured temperature value in each training sample are used as the input sample of the temperature compensation model, and the real temperature value is used as the output sample of the temperature compensation model, and the temperature compensation model is trained. , so that the temperature compensation model has the function of using the temperature measurement distance to perform temperature compensation on the measured temperature value.

可以理解,阶段(1)中是采用上述测温距离、测量温度值和真实温度值作为训练样本,训练温度补偿模型的。因此,经过多次样本训练后的温度补偿模型,则可以具备采用测温距离对测量温度值进行温度补偿的功能。并且,采用经过多次样本训练的温度补偿模型,对测量温度值进行温度补偿所得到的第二温度值可以接近于用户的真实温度值。其中,样本训练的次数越多,温度补偿模型进行温度补偿的准确度越高,手机进行温度测量的准确度则越高。因此,本申请实施例中,手机中预先配置的温度补偿模型可以是经过大量样本训练的AI模型。It can be understood that, in stage (1), the above-mentioned temperature measurement distance, measured temperature value and real temperature value are used as training samples to train the temperature compensation model. Therefore, the temperature compensation model trained by multiple samples can have the function of performing temperature compensation on the measured temperature value by using the temperature measurement distance. Moreover, using a temperature compensation model trained with multiple samples, the second temperature value obtained by performing temperature compensation on the measured temperature value can be close to the user's real temperature value. Among them, the more times the sample is trained, the higher the accuracy of temperature compensation by the temperature compensation model, and the higher the accuracy of temperature measurement by the mobile phone. Therefore, in this embodiment of the present application, the temperature compensation model preconfigured in the mobile phone may be an AI model trained with a large number of samples.

示例性的,上述预设AI算法可以为最小二乘法或者决策树算法等任一AI算法,本申请实施例对此不作限制。Exemplarily, the above-mentioned preset AI algorithm may be any AI algorithm such as a least squares method or a decision tree algorithm, which is not limited in this embodiment of the present application.

可以理解,上述温度补偿模型可以抽象为一个黑盒,向该温度补偿模型输入第一距离(即测温距离)和第一温度值(即测量温度),该温度补偿模型便可以输出进行温度补偿后的第二温度值。简单来说,不同的测温距离可以对应不同的测温误差,该温度补偿模型中可以存储测温误差与测温距离之间的对应关系;温度补偿模型可以采用输入的第一距离对应的测温误差对第一温度值进行温度补偿,得到并输出温度补偿后的第二温度值。It can be understood that the above temperature compensation model can be abstracted as a black box, and the first distance (that is, the temperature measurement distance) and the first temperature value (that is, the measured temperature) are input into the temperature compensation model, and the temperature compensation model can be output for temperature compensation. after the second temperature value. To put it simply, different temperature measurement distances can correspond to different temperature measurement errors. The temperature compensation model can store the corresponding relationship between the temperature measurement error and the temperature measurement distance; the temperature compensation model can use the measurement corresponding to the input first distance. The temperature error performs temperature compensation on the first temperature value, and obtains and outputs a temperature-compensated second temperature value.

例如,以被测对象是人体为例。一般而言,人体的正常体温为36.5℃~37.2℃。本申请实施例中,假设人体的温度为37.0℃,即以37.0℃作为被测对象(即人体)的预设基准温度。手机中可以预先配置以下实现方式(1)或实现方式(2)所述的温度补偿模型。For example, take the object to be measured as a human body as an example. Generally speaking, the normal body temperature of the human body is 36.5℃~37.2℃. In the embodiment of the present application, it is assumed that the temperature of the human body is 37.0° C., that is, 37.0° C. is used as the preset reference temperature of the measured object (ie, the human body). The temperature compensation model described in the following implementation (1) or (2) may be preconfigured in the mobile phone.

在实现方式(1)的情况(1)中,上述温度补偿模型中可以保存表2所示的温度补偿信息。表2所示的温度补偿信息中包括:预设基准温度37.0℃、多个测量距离,以及每个测量距离对应的测温误差。In the case (1) of the implementation manner (1), the temperature compensation information shown in Table 2 may be stored in the above temperature compensation model. The temperature compensation information shown in Table 2 includes: a preset reference temperature of 37.0° C., multiple measurement distances, and a temperature measurement error corresponding to each measurement distance.

表2Table 2

Figure GDA0003488174020000151
Figure GDA0003488174020000151

如表2所示,当测温距离为10mm时,测温误差为-0.1℃;当测温距离为15mm时,测温误差为0℃;当测温距离为20mm时,测温误差为-0.1℃;当测温距离为25mm时,测温误差为-0.2℃;当测温距离为30mm时,测温误差为-0.3℃;当测温距离为35mm时,测温误差为-0.4℃;当测温距离为40mm时,测温误差为-0.5℃;当测温距离为45mm时,测温误差为 -0.6℃。As shown in Table 2, when the temperature measurement distance is 10mm, the temperature measurement error is -0.1°C; when the temperature measurement distance is 15mm, the temperature measurement error is 0°C; when the temperature measurement distance is 20mm, the temperature measurement error is - 0.1°C; when the temperature measurement distance is 25mm, the temperature measurement error is -0.2°C; when the temperature measurement distance is 30mm, the temperature measurement error is -0.3°C; when the temperature measurement distance is 35mm, the temperature measurement error is -0.4°C ; When the temperature measurement distance is 40mm, the temperature measurement error is -0.5°C; when the temperature measurement distance is 45mm, the temperature measurement error is -0.6°C.

在实现方式(1)的情况(2)中,上述温度补偿模型中可以保存表3所示的温度补偿信息。表3所示的温度补偿信息中包括:预设基准温度37.0℃、多个测量距离,以及每个测量距离对应的测量温度值。其中,表2中每个测量距离对应的测温误差为:该测量距离在表3中对应的测量温度值与上述预设基准温度的差值。In the case (2) of the implementation manner (1), the temperature compensation information shown in Table 3 may be stored in the above temperature compensation model. The temperature compensation information shown in Table 3 includes: a preset reference temperature of 37.0° C., multiple measurement distances, and a measurement temperature value corresponding to each measurement distance. Wherein, the temperature measurement error corresponding to each measurement distance in Table 2 is: the difference between the measurement temperature value corresponding to the measurement distance in Table 3 and the above-mentioned preset reference temperature.

表3table 3

Figure GDA0003488174020000161
Figure GDA0003488174020000161

在另一些实施例中,可以统计上述训练样本,分析上述训练样本,得到表2和表3所示的温度补偿信息。然后,可以通过查表的方式,创建具备上述温度补偿功能的温度补偿模型。在该实施例中,上述温度补偿模型中可以包括表2和表3所示的温度补偿信息。该温度补偿模型中存储有上述温度补偿信息。并且,该温度补偿模型具备采用距离传感器采集的距离,按照保存温度补偿信息对温度传感器采集的温度值进行温度补偿的功能。In other embodiments, the above-mentioned training samples can be counted, and the above-mentioned training samples can be analyzed to obtain the temperature compensation information shown in Table 2 and Table 3. Then, a temperature compensation model with the above temperature compensation function can be created by looking up the table. In this embodiment, the above temperature compensation model may include the temperature compensation information shown in Table 2 and Table 3. The temperature compensation information described above is stored in the temperature compensation model. In addition, the temperature compensation model has the function of performing temperature compensation on the temperature value collected by the temperature sensor according to the stored temperature compensation information by using the distance collected by the distance sensor.

需要说明的是,上述温度补偿模型中的温度补偿信息包括但不限于表2或表3所示的温度补偿信息。示例性的,温度补偿模型包括的温度补偿信息可以是对测温距离进行更加细致的划分,统计得到的多个测温距离,以及每个测温距离对应的测温误差或测量温度值等。It should be noted that the temperature compensation information in the above temperature compensation model includes but is not limited to the temperature compensation information shown in Table 2 or Table 3. Exemplarily, the temperature compensation information included in the temperature compensation model may be more detailed division of temperature measurement distances, multiple temperature measurement distances obtained by statistics, and temperature measurement errors or measured temperature values corresponding to each temperature measurement distance.

在另一些实施例中,可以统计上述训练样本,分析上述训练样本,得到测温误差随测温距离变化的温度补偿函数。例如,结合表2,可以得出图7A所示的温度补偿函数701。该温度补偿函数701可以表征测温距离与测温误差的函数关系。结合表3,可以得出图7B所示的温度补偿函数702。该温度补偿函数702可以表征测量距离与测量温度值的函数关系。在该实施例中,上述温度补偿模型可以称为曲线函数模型。该温度补偿模型中存储有上述温度补偿函数。并且,该温度补偿模型具备采用距离传感器采集的距离,按照保存温度补偿函数对温度传感器采集的温度值进行温度补偿的功能。In other embodiments, the above-mentioned training samples can be counted, and the above-mentioned training samples can be analyzed to obtain a temperature compensation function in which the temperature measurement error changes with the temperature measurement distance. For example, in conjunction with Table 2, the temperature compensation function 701 shown in FIG. 7A can be obtained. The temperature compensation function 701 can represent the functional relationship between the temperature measurement distance and the temperature measurement error. Combining with Table 3, the temperature compensation function 702 shown in FIG. 7B can be obtained. The temperature compensation function 702 can characterize the functional relationship between the measured distance and the measured temperature value. In this embodiment, the above-mentioned temperature compensation model may be referred to as a curve function model. The temperature compensation function described above is stored in the temperature compensation model. In addition, the temperature compensation model has the function of performing temperature compensation on the temperature value collected by the temperature sensor according to the stored temperature compensation function by using the distance collected by the distance sensor.

其次,本申请实施例这里介绍上述阶段(2),即模型的使用和自学习阶段。该阶段(2) 可以包括S801-S805。如图8所示,本申请实施例提供的测量温度值的方法可以包括S801-S805。Next, the embodiments of the present application introduce the above-mentioned stage (2), that is, the stage of using and self-learning of the model. This stage (2) may include S801-S805. As shown in FIG. 8 , the method for measuring a temperature value provided by this embodiment of the present application may include S801-S805.

S801:手机接收第一操作。该第一操作用于触发手机测量温度值。S801: The mobile phone receives the first operation. The first operation is used to trigger the mobile phone to measure the temperature value.

其中,上述第一操作至少可以包括以下两种实现方式:实现方式(a)和实现方式(b)。Wherein, the above-mentioned first operation may include at least the following two implementation manners: implementation manner (a) and implementation manner (b).

实现方式(a):上述第一操作是用户对手机上预设按键的点击操作(如单击操作、双击操作或长按操作等)。Implementation (a): The above-mentioned first operation is a user's click operation (such as a single-click operation, a double-click operation, or a long-press operation, etc.) on a preset button on the mobile phone.

示例性的,上述预设按键可以是手机上的多个机械按键或者触摸式按键组成的组合按键。例如,该预设按键可以是手机的“音量+”键与“锁屏”键组成的组合按键。需要说明的是,该预设按键可以是上述实施例中所述的控制开关。Exemplarily, the above-mentioned preset keys may be a combination of multiple mechanical keys or touch keys on the mobile phone. For example, the preset key may be a combination key formed by the "volume +" key and the "lock screen" key of the mobile phone. It should be noted that, the preset button may be the control switch described in the above embodiment.

实现方式(b):上述第一操作可以是用户在第一应用输入的用于触发手机测量温度的操作。该第一应用可以是手机中用于控制手机测量温度的应用。Implementation (b): The above-mentioned first operation may be an operation input by the user in the first application to trigger the mobile phone to measure the temperature. The first application may be an application in the mobile phone for controlling the temperature measurement of the mobile phone.

在实现方式(b)的一种情况下,上述第一应用可以是如图9中的(a)所示的应用图标 901所对应的“测温”应用。手机可以接收用户对图9中的(a)所示的应用图标901的点击操作(如单击操作);响应于用户对应用图标901的点击操作,手机可显示图9中的(c)所示的第二界面902。该第二界面902中包括预设控件,如“开始测温”控件903,该“开始测温”控件903用于触发手机开始测量目标对象的温度。可以理解,上述第一操作可以是用户对该“测温”控件903的点击操作(如单击操作)。In one case of implementing the mode (b), the above-mentioned first application may be a "temperature measurement" application corresponding to the application icon 901 shown in (a) of FIG. 9 . The mobile phone can receive the user's click operation (such as a single-click operation) on the application icon 901 shown in (a) of FIG. 9; The second interface 902 shown. The second interface 902 includes preset controls, such as a "start temperature measurement" control 903, the "start temperature measurement" control 903 is used to trigger the mobile phone to start measuring the temperature of the target object. It can be understood that the above-mentioned first operation may be a click operation (such as a click operation) of the "temperature measurement" control 903 by the user.

在实现方式(b)的另一种情况下,上述第一应用可以是手机中的系统应用。例如,响应于用户对手机中“设置”应用的应用图标的点击操作,手机可显示图9中的(b)所示的设置界面904。该设置界面904中包括“测温”选项905。手机可以接收用户对该“测温”选项905的点击操作(如单击操作)。响应于用户对该“测温”选项905的点击操作,手机可显示图9中的(c) 所示的第二界面902。该第二界面902中包括预设控件,如“开始测温”控件903。上述第一操作可以是用户对该“开始测温”控件903的点击操作(如单击操作)。In another case of implementing mode (b), the above-mentioned first application may be a system application in a mobile phone. For example, in response to the user's click operation on the application icon of the "settings" application in the mobile phone, the mobile phone may display the setting interface 904 shown in (b) of FIG. 9 . The setting interface 904 includes a "temperature measurement" option 905 . The mobile phone can receive the user's click operation (eg, click operation) on the "temperature measurement" option 905 . In response to the user's click operation on the "temperature measurement" option 905, the mobile phone can display the second interface 902 shown in (c) of FIG. 9 . The second interface 902 includes preset controls, such as a "start temperature measurement" control 903 . The above-mentioned first operation may be a click operation (eg, a click operation) of the "start temperature measurement" control 903 by the user.

可选的,上述第二界面还可以包括第一提示信息。该第一提示信息用于提示控制被测对象与手机的距离在预设距离范围(如5mm~100mm)内。例如,手机可显示图10所示的第二界面1001。该第二界面1001中包括“开始测温”控件1002和第一提示信息1003。如图10所示,该第一提示信息1003可以为“请保持被测对象与温度传感器的距离在5mm~100mm内!”。可选的,图10所示的第二界面1001还可以包括第二提示信息1004。该第二提示信息1004 用于指示温度传感器在手机上的位置。例如,该第二提示信息1004可以为“温度传感器位于靠近后置摄像头的位置!”。Optionally, the above-mentioned second interface may further include first prompt information. The first prompt information is used to prompt and control the distance between the measured object and the mobile phone to be within a preset distance range (eg, 5 mm to 100 mm). For example, the mobile phone can display the second interface 1001 shown in FIG. 10 . The second interface 1001 includes a "start temperature measurement" control 1002 and first prompt information 1003 . As shown in FIG. 10 , the first prompt message 1003 may be “Please keep the distance between the measured object and the temperature sensor within 5mm˜100mm!”. Optionally, the second interface 1001 shown in FIG. 10 may further include second prompt information 1004 . The second prompt information 1004 is used to indicate the location of the temperature sensor on the mobile phone. For example, the second prompt information 1004 may be "The temperature sensor is located close to the rear camera!".

需要说明的是,实现方式(b)中所述的“测温”控件(如“测温”控件903)可以是上述实施例中所述的控制开关。It should be noted that, the "temperature measurement" control (eg, the "temperature measurement" control 903 ) described in the implementation mode (b) may be the control switch described in the foregoing embodiment.

S802、手机通过距离传感器测量第一距离。S802, the mobile phone measures the first distance through the distance sensor.

S803、手机通过温度传感器采集被测对象的第一温度值。S803, the mobile phone collects the first temperature value of the measured object through the temperature sensor.

其中,上述第一距离是被测对象与手机之间的距离。Wherein, the above-mentioned first distance is the distance between the measured object and the mobile phone.

S804、手机将第一温度值和第一距离作为输入,运行被测对象的温度补偿模型,得到对第一温度值进行温度补偿后的第二温度值;手机显示第一界面,该第一界面用于指示该第二温度值的。S804, the mobile phone uses the first temperature value and the first distance as inputs, runs the temperature compensation model of the measured object, and obtains a second temperature value after temperature compensation is performed on the first temperature value; the mobile phone displays a first interface, the first interface used to indicate the second temperature value.

其中,该温度补偿模型具备采用距离传感器采集的距离,对温度传感器采集的温度值进行温度补偿的功能。The temperature compensation model has the function of performing temperature compensation on the temperature value collected by the temperature sensor by using the distance collected by the distance sensor.

示例性的,温度补偿模型具备采用距离传感器采集的距离,对温度传感器采集的温度进行温度补偿的功能的原理参见如下实现方式(1)和实现方式(2)中的描述。Exemplarily, the temperature compensation model has the function of using the distance collected by the distance sensor, and the principle of the function of performing temperature compensation on the temperature collected by the temperature sensor refers to the descriptions in the following implementations (1) and (2).

在实现方式(1)的情况(1)中,温度补偿模型中包括上述温度补偿信息。该温度补偿信息包括:多个测温距离,以及每个测温距离对应的测温误差。例如,第一温度补偿信息可以为表2所示的温度补偿信息。In the case (1) of the implementation manner (1), the above temperature compensation information is included in the temperature compensation model. The temperature compensation information includes: a plurality of temperature measurement distances, and a temperature measurement error corresponding to each temperature measurement distance. For example, the first temperature compensation information may be the temperature compensation information shown in Table 2.

在情况(1)中,手机执行S804的方法具体可以包括:手机可运行温度补偿模型,从温度补偿模型的温度补偿信息中查找上述第一距离对应的测温误差,计算第一温度值与该测温误差的差值,得到第二温度值。该第二温度值是上述第一温度值减去上述测温误差,所得的差值。In case (1), the method for performing S804 on the mobile phone may specifically include: the mobile phone can run a temperature compensation model, searching for the temperature measurement error corresponding to the first distance from the temperature compensation information of the temperature compensation model, and calculating the first temperature value and the temperature compensation model. The difference of the temperature measurement errors is used to obtain the second temperature value. The second temperature value is the difference obtained by subtracting the temperature measurement error from the first temperature value.

例如,以上述被测对象是人(如Bob)为例。在手机为该Bob的第j次测温过程中,如表4所示,距离传感器测量得到的第一距离为10mm,温度传感器测量得到该Bob的第一温度值为37.3℃。其中,j为正整数。For example, take the above-mentioned test object being a person (eg, Bob) as an example. During the j-th temperature measurement process when the mobile phone is the Bob, as shown in Table 4, the first distance measured by the distance sensor is 10 mm, and the first temperature value of the Bob measured by the temperature sensor is 37.3°C. Among them, j is a positive integer.

表4Table 4

Figure GDA0003488174020000181
Figure GDA0003488174020000181

该示例中,手机执行S804,运行温度补偿模型,可以从表4所示的预设温度补偿信息中查找到该第一距离10mm对应的测温误差为-0.1℃,计算第一温度值36.8℃与该测温误差 -0.1℃之和,得到第二温度值36.9℃。In this example, the mobile phone executes S804 to run the temperature compensation model. It can be found from the preset temperature compensation information shown in Table 4 that the temperature measurement error corresponding to the first distance of 10 mm is -0.1°C, and the first temperature value is calculated to be 36.8°C With the sum of the temperature measurement error -0.1°C, a second temperature value of 36.9°C is obtained.

在实现方式(1)的情况(2)中,该温度补偿模型中包括上述温度补偿信息。该温度补偿信息包括:多个测温距离,以及每个测温距离对应的测量温度值。例如,第一温度补偿信息可以为表3所示的温度补偿信息。In the case (2) of the implementation manner (1), the temperature compensation model includes the above-mentioned temperature compensation information. The temperature compensation information includes: multiple temperature measurement distances, and a measured temperature value corresponding to each temperature measurement distance. For example, the first temperature compensation information may be the temperature compensation information shown in Table 3.

在情况(2)中,手机执行S804的方法具体可以包括:手机可运行温度补偿模型,从温度补偿模型的温度补偿信息中查找上述第一距离对应的测量温度值,并计算该测量温度值与预设基准温度的差值,得到该第一距离对应的测温误差,然后计算第一温度值与该测温误差的差值,得到第二温度值。该第二温度值是上述第一温度值减去上述测温误差,所得的差值。In the case (2), the method for performing S804 on the mobile phone may specifically include: the mobile phone can run a temperature compensation model, find the measured temperature value corresponding to the above-mentioned first distance from the temperature compensation information of the temperature compensation model, and calculate the difference between the measured temperature value and the temperature compensation model. The difference value of the preset reference temperature is obtained to obtain the temperature measurement error corresponding to the first distance, and then the difference value between the first temperature value and the temperature measurement error is calculated to obtain the second temperature value. The second temperature value is the difference obtained by subtracting the temperature measurement error from the first temperature value.

实现方式(2):温度补偿模型中包括温度补偿函数。在实现方式(2)的情况(i)中,该温度补偿函数表征测温距离与测温误差之间的函数关系。例如,该温度补偿函数可以为图 7A所示的温度补偿函数701。Implementation (2): The temperature compensation model includes a temperature compensation function. In the case (i) of the implementation manner (2), the temperature compensation function represents the functional relationship between the temperature measurement distance and the temperature measurement error. For example, the temperature compensation function may be the temperature compensation function 701 shown in FIG. 7A.

在实现方式(2)的情况(i)中,手机执行S804的方法具体可以包括:手机运行温度补偿模型,根据上述温度补偿函数,计算手机的距离传感器采集的第一距离对应的测温误差;然后,计算第一温度值与该测温误差的差值,得到第二温度值。该第二温度值是上述第一温度值减去上述测温误差,所得的差值。In the case (i) of the implementation mode (2), the method for executing S804 on the mobile phone may specifically include: running a temperature compensation model on the mobile phone, and calculating the temperature measurement error corresponding to the first distance collected by the distance sensor of the mobile phone according to the above-mentioned temperature compensation function; Then, the difference between the first temperature value and the temperature measurement error is calculated to obtain a second temperature value. The second temperature value is the difference obtained by subtracting the temperature measurement error from the first temperature value.

例如,以上述被测对象是人(如Bob)为例。在手机为该Bob的第j+1次测温过程中,如表5所示,假设距离传感器测量得到的测温距离为25mm,温度传感器测量得到该Bob的第一温度值为36.9℃。其中,j为正整数。For example, take the above-mentioned test object being a person (eg, Bob) as an example. During the j+1 temperature measurement process when the mobile phone is the Bob, as shown in Table 5, it is assumed that the temperature measurement distance measured by the distance sensor is 25mm, and the first temperature value of the Bob measured by the temperature sensor is 36.9°C. Among them, j is a positive integer.

表5table 5

Figure GDA0003488174020000182
Figure GDA0003488174020000182

该示例中,手机执行S804,运行温度补偿模型,可以根据表2所示的温度补偿函数计算得到第一距离25mm对应的测温误差-0.2℃,计算第一温度值36.9℃与该测温误差-0.2℃的差值,得到第二温度值37.1℃。In this example, the mobile phone executes S804 and runs the temperature compensation model. According to the temperature compensation function shown in Table 2, the temperature measurement error corresponding to the first distance of 25mm can be calculated to obtain -0.2°C, and the first temperature value of 36.9°C and the temperature measurement error can be calculated. A difference of -0.2°C yields a second temperature value of 37.1°C.

在实现方式(2)的情况(ii)中,该温度补偿函数表征测温距离与测量温度值之间的函数关系。例如,该温度补偿函数可以为图7B所示的温度补偿函数702。In the case (ii) of the implementation manner (2), the temperature compensation function represents the functional relationship between the temperature measurement distance and the measurement temperature value. For example, the temperature compensation function may be the temperature compensation function 702 shown in FIG. 7B.

在实现方式(2)的情况(ii)中,手机执行S804的方法具体可以包括:手机运行温度补偿模型,根据上述温度补偿函数,计算手机的距离传感器采集的第一距离对应的测量温度值;然后,计算该测量温度值与预设基准温度的差值,得到第一距离对应的测量误差;最后,计算第一温度值与该测温误差的差值,得到第二温度值。该第二温度值是上述第一温度值减去上述测温误差,所得的差值。In the case (ii) of the implementation mode (2), the method for executing S804 on the mobile phone may specifically include: running a temperature compensation model on the mobile phone, and calculating the measured temperature value corresponding to the first distance collected by the distance sensor of the mobile phone according to the above-mentioned temperature compensation function; Then, the difference between the measured temperature value and the preset reference temperature is calculated to obtain the measurement error corresponding to the first distance; finally, the difference between the first temperature value and the temperature measurement error is calculated to obtain the second temperature value. The second temperature value is the difference obtained by subtracting the temperature measurement error from the first temperature value.

示例性的,假设上述第二温度值为37.1℃。手机接收到上述第一操作后,执行S804可显示图12所示的第一界面1201。例如,响应于用户对图9中的(c)所示的“开始测温”控件903 或图10所示的“开始测温”控件1002的点击操作(如单击操作),手机可显示图12所示的第一界面1201。该第一界面1201可以包括提示信息1202,如“您的温度为37.1℃”。或者,该第一界面还可以包括提示信息“手机测得您的温度为37.1℃”或者“您的测量温度为37.1℃”等。Exemplarily, it is assumed that the above-mentioned second temperature value is 37.1°C. After the mobile phone receives the above-mentioned first operation, S804 is executed to display the first interface 1201 shown in FIG. 12 . For example, in response to a user's click operation (eg, a single-click operation) on the "start temperature measurement" control 903 shown in (c) of FIG. 9 or the "start temperature measurement" control 1002 shown in FIG. The first interface 1201 shown in 12. The first interface 1201 may include prompt information 1202, such as "Your temperature is 37.1°C". Alternatively, the first interface may further include prompt information "Your temperature measured by the mobile phone is 37.1°C" or "Your measured temperature is 37.1°C", and the like.

在另一些实施例中,上述第一界面中还可以用于指示上述第一距离。例如,图13所示的第一界面1301不仅包括提示信息1302,还包括提示信息1303。提示信息1302为“您的测量温度为37.1℃”。提示信息1303为“您的测温距离为25mm”。In other embodiments, the above-mentioned first interface may also be used to indicate the above-mentioned first distance. For example, the first interface 1301 shown in FIG. 13 includes not only prompt information 1302 but also prompt information 1303 . The prompt message 1302 is "Your measured temperature is 37.1°C". The prompt message 1303 is "Your temperature measurement distance is 25mm".

可选的,上述第一界面还可以包括“开始测温”控件。例如,图12所示的第一界面1201 还可以包括“开始测温”控件1203。图13所示的第一界面1301还可以包括“开始测温”控件 1304。该“开始测温”控件1203和“开始测温”控件1304用于触发手机测量被测对象的温度。手机可接收用户对该“开始测温”控件1203或“开始测温”控件1304的点击操作(即第一操作),然后执行上述S802-S805。Optionally, the above-mentioned first interface may further include a "start temperature measurement" control. For example, the first interface 1201 shown in FIG. 12 may further include a “start temperature measurement” control 1203 . The first interface 1301 shown in FIG. 13 may also include a "start temperature measurement" control 1304. The "start temperature measurement" control 1203 and the "start temperature measurement" control 1304 are used to trigger the mobile phone to measure the temperature of the measured object. The mobile phone may receive the user's click operation (ie, the first operation) on the "start temperature measurement" control 1203 or the "start temperature measurement" control 1304, and then execute the above-mentioned S802-S805.

S805、手机采用上述第一距离和第一温度值,更新上述温度补偿模型。其中,更新后的温度补偿模型用于下一次对温度传感器采集的温度进行温度补偿。S805. The mobile phone uses the first distance and the first temperature value to update the temperature compensation model. The updated temperature compensation model is used to perform temperature compensation on the temperature collected by the temperature sensor next time.

在上述实现方式(1)中,上述温度补偿模型还包括预设基准温度。手机可采用上述第一距离和第一温度值,更新温度补偿模型的温度补偿信息,以实现对温度补偿模型的更新。In the above implementation manner (1), the above temperature compensation model further includes a preset reference temperature. The mobile phone can update the temperature compensation information of the temperature compensation model by using the above-mentioned first distance and the first temperature value, so as to update the temperature compensation model.

以实现方式(1)的情况(1)为例,手机可执行步骤(a)和步骤(b),采用上述第一距离和第一温度值,更新上述温度补偿模型。Taking case (1) of implementation (1) as an example, the mobile phone can perform steps (a) and (b), and update the temperature compensation model by using the first distance and the first temperature value.

步骤(a):手机计算第一温度值与预设基准温度的差值。步骤(b):手机计算该差值与第一预设权重的乘积得到第一值,并计算上述温度补偿信息中第一距离对应的测温误差与第二预设权重的乘积得到第二值;然后,采用该第一值与第二值之和更新上述温度补偿信息中与第一距离对应的测温误差。Step (a): The mobile phone calculates the difference between the first temperature value and the preset reference temperature. Step (b): the mobile phone calculates the product of the difference and the first preset weight to obtain the first value, and calculates the product of the temperature measurement error corresponding to the first distance in the above temperature compensation information and the second preset weight to obtain the second value. ; Then, use the sum of the first value and the second value to update the temperature measurement error corresponding to the first distance in the above temperature compensation information.

本申请实施例中所述的第一预设权重和第二预设权重均大于0,且小于1。该第一预设权重与第二预设权重之和为1。例如,第一预设权重为50%,第二预设权重为50%。或者,第一预设权重为40%,第二预设权重为60%。或者,第一预设权重为65%,第二预设权重为35%。该第一预设权重与第二预设权重可以预先配置在手机中;或者,该第一预设权重与第二预设权重可以由用户在手机中设置。本申请实施例对第一预设权重与第二预设权重的具体取值不作限制。The first preset weight and the second preset weight described in the embodiments of the present application are both greater than 0 and less than 1. The sum of the first preset weight and the second preset weight is 1. For example, the first preset weight is 50%, and the second preset weight is 50%. Alternatively, the first preset weight is 40%, and the second preset weight is 60%. Alternatively, the first preset weight is 65%, and the second preset weight is 35%. The first preset weight and the second preset weight may be pre-configured in the mobile phone; or, the first preset weight and the second preset weight may be set by the user in the mobile phone. The embodiments of the present application do not limit the specific values of the first preset weight and the second preset weight.

例如,假设温度补偿模型的温度补偿信息是表2所示的温度补偿信息,上述第一预设权重为50%,第二预设权重为50%。Bob的第j次测温过程中,手机执行S802-S803,得到第一距离为表4所示的10mm,第一温度值为表4所示的36.8℃。其中,手机执行步骤(a),可计算得到第一温度值36.8℃与预设基准温度37.0℃的差值-0.2℃。手机执行步骤(b),可计算该差值-0.2℃与预设权重为50%的乘积,得到第一值-0.1℃;可计算第一距离10mm在表2 所示的温度补偿信息中所对应的测量误差-0.1℃与第二预设权重的50%乘积,得到第二值 -0.05℃;然后,可采用该第一值-0.1℃与第二值-0.05℃之和-0.15℃,更新第一距离10mm在表2所示的温度补偿信息中所对应的测量误差-0.1℃,得到表6所示的温度补偿信息。For example, assuming that the temperature compensation information of the temperature compensation model is the temperature compensation information shown in Table 2, the first preset weight is 50%, and the second preset weight is 50%. During Bob's jth temperature measurement, the mobile phone executes S802-S803, and the first distance is 10mm as shown in Table 4, and the first temperature value is 36.8°C as shown in Table 4. Wherein, the mobile phone performs step (a), and the difference between the first temperature value of 36.8°C and the preset reference temperature of 37.0°C can be calculated by -0.2°C. The mobile phone performs step (b), and can calculate the product of the difference value -0.2°C and the preset weight of 50% to obtain the first value -0.1°C; the first distance of 10mm can be calculated as shown in the temperature compensation information shown in Table 2. The product of the corresponding measurement error -0.1°C and the second preset weight of 50%, the second value -0.05°C is obtained; then, the sum of the first value -0.1°C and the second value -0.05°C can be used -0.15°C, Update the measurement error -0.1°C corresponding to the temperature compensation information shown in Table 2 for the first distance of 10 mm, and obtain the temperature compensation information shown in Table 6.

表6Table 6

Figure GDA0003488174020000191
Figure GDA0003488174020000191

Figure GDA0003488174020000201
Figure GDA0003488174020000201

需要说明的是,上述实现方式(1)的情况(2)中,手机采用上述第一距离和第一温度值更新温度补偿模型的原理,与实现方式(1)的情况(1)中,手机采用上述第一距离和第一温度值更新温度补偿模型的原理类似,本申请实施例这里不予赘述。It should be noted that, in the case (2) of the above implementation (1), the mobile phone adopts the principle of updating the temperature compensation model with the above-mentioned first distance and the first temperature value, and in the case (1) of the implementation (1), the mobile phone The principles of updating the temperature compensation model by using the above-mentioned first distance and the first temperature value are similar, and details are not described here in this embodiment of the present application.

上述被测对象的温度补偿模型是预设AI模型。或者,该被测对象的温度补偿模型是采用上一次测量所述被测对象的温度时,距离传感器采集的距离和温度传感器采集的温度值更新得到的。The temperature compensation model of the above-mentioned measured object is a preset AI model. Alternatively, the temperature compensation model of the measured object is updated by using the distance collected by the distance sensor and the temperature value collected by the temperature sensor when the temperature of the measured object was measured last time.

需要说明的是,当j=1时,S804中所述的温度补偿模型可以是手机中预先配置的预设AI 模型。该预先AI模型是手机出厂时便配置在手机中的。当j≥2时,S804中所述的温度补偿模型可以是:手机在Bob的第j-1次测温过程中,采用第j-1次测温过程采集的第一距离和第一温度值,更新后的AI模型(即更新后的温度补偿模型)。其中,手机在Bob的第j次测温过程中更新后的温度补偿模型,可用于Bob的第j+1次测温过程中对采集的第一温度进行温度补偿。It should be noted that, when j=1, the temperature compensation model described in S804 may be a preset AI model preconfigured in the mobile phone. The pre-AI model is configured in the phone when the phone leaves the factory. When j≥2, the temperature compensation model described in S804 may be: during the j-1 th temperature measurement process of Bob, the mobile phone adopts the first distance and the first temperature value collected during the j-1 th temperature measurement process , the updated AI model (that is, the updated temperature compensation model). The temperature compensation model updated by the mobile phone in Bob's jth temperature measurement process can be used to perform temperature compensation on the first temperature collected in Bob's j+1th temperature measurement process.

在上述实现方式(2)中,手机可采用上述第一距离和第一温度值,更新温度补偿模型的温度补偿函数,以实现对温度补偿模型的更新。In the above implementation mode (2), the mobile phone can use the above-mentioned first distance and the first temperature value to update the temperature compensation function of the temperature compensation model, so as to realize the update of the temperature compensation model.

以实现方式(2)的情况(i)为例,手机可执行步骤(A)和步骤(B),采用上述第一距离和第一温度值,更新上述温度补偿模型。Taking case (i) of implementation (2) as an example, the mobile phone can perform steps (A) and (B), and update the temperature compensation model by using the first distance and the first temperature value.

步骤(A):手机计算第一温度值与预设基准温度的差值。步骤(B):手机计算该差值计算该差值与第一预设权重的乘积得到第一值,并计算上述温度补偿函数中第一距离对应的测温误差与第二预设权重的乘积得到第二值;然后,采用该第一值与第二值之和更新上述温度补偿函数中与第一距离对应的测温误差。Step (A): The mobile phone calculates the difference between the first temperature value and the preset reference temperature. Step (B): the mobile phone calculates the difference, calculates the product of the difference and the first preset weight to obtain the first value, and calculates the product of the temperature measurement error corresponding to the first distance in the above-mentioned temperature compensation function and the second preset weight Obtain a second value; then, use the sum of the first value and the second value to update the temperature measurement error corresponding to the first distance in the above temperature compensation function.

以实现方式(2)的情况(i)为例。假设温度补偿模型的温度补偿函数是图7A所示的温度补偿函数701,上述第一预设权重为30%,第二预设权重为70%。Bob的第j+1次测温过程中,手机执行S802-S803,得到第一距离为表5所示的25mm,第一温度值为表5所示的 36.9℃,预设基准维度为37.0℃。其中,手机执行步骤(A),可计算得到第一温度值36.9℃与预设基准温度37.0℃的差值-0.1℃。手机执行步骤(B),可计算该差值计算该差值-0.1℃与第一预设权重30%的乘积得到第一值-0.03℃,并计算上述温度补偿函数701中第一距离 25mm对应的测温误差-0.2℃与第二预设权重70%的乘积得到第二值-0.14℃;然后,采用该第一值-0.03℃与第二值-0.14℃之和-0.17℃,更新上述温度补偿函数701中第一距离25mm对应的测温误差-0.2℃,可得到图11A所示的温度补偿函数1101。Take case (i) of implementation (2) as an example. Assuming that the temperature compensation function of the temperature compensation model is the temperature compensation function 701 shown in FIG. 7A , the first preset weight is 30%, and the second preset weight is 70%. During Bob's j+1 temperature measurement, the mobile phone executes S802-S803, the first distance is 25mm as shown in Table 5, the first temperature value is 36.9°C as shown in Table 5, and the preset reference dimension is 37.0°C . Wherein, the mobile phone performs step (A), and the difference between the first temperature value of 36.9°C and the preset reference temperature of 37.0°C can be calculated by -0.1°C. The mobile phone performs step (B), and can calculate the difference, calculate the product of the difference -0.1°C and the first preset weight of 30% to obtain the first value -0.03°C, and calculate the temperature compensation function 701 corresponding to the first distance of 25mm. The product of the temperature measurement error of -0.2°C and the second preset weight of 70% gets the second value -0.14°C; then, using the sum of the first value -0.03°C and the second value -0.14°C -0.17°C, update the above In the temperature compensation function 701, the temperature measurement error corresponding to the first distance of 25 mm is -0.2°C, and the temperature compensation function 1101 shown in FIG. 11A can be obtained.

本申请实施例中,手机每次对被测对象进行温度测量后,都可以采用本次的测量结果(包括测温距离和测量温度值)更新该被测对象的温度补偿模型。这样,可以实现该温度补偿模型的自适应学习,提升该温度补偿模型进行温度补偿的准确度。其中,在下一次测量该被测对象的温度时,可以使用本次更新后的温度补偿模型对温度传感器采集的测量温度值进行温度补偿。这样,可以提高测温结果的准确度。In the embodiment of the present application, after each time the mobile phone measures the temperature of the measured object, the current measurement result (including the temperature measurement distance and the measured temperature value) can be used to update the temperature compensation model of the measured object. In this way, self-adaptive learning of the temperature compensation model can be realized, and the accuracy of temperature compensation performed by the temperature compensation model can be improved. Wherein, when the temperature of the measured object is measured next time, the temperature compensation model after this update can be used to perform temperature compensation on the measured temperature value collected by the temperature sensor. In this way, the accuracy of the temperature measurement result can be improved.

可以理解,上述温度传感器采集的测量温度值(如第一温度值)是温度传感器采集的被测对象的温度。虽然温度传感器采集的测量温度值可能会由于测温距离(如第一距离)的影响,与被测对象的真实温度存在一定的差异;但是,手机对该被测对象进行多次温度检测所采集的测量温度值还是可以体现出该被测对象的温度特征的。不同被测对象的温度特征(如真实温度值)不同。因此,手机每次对被测对象进行温度测量后,采用本次的测量结果更新该被测对象的温度补偿模型,可以得到符合该被测对象的温度特征的温度补偿模型。这样,可以提高该温度补偿模型与被测对象的温度特征的契合度,有利于进一步提高手机对不同被测对象进行温度测量的准确度。It can be understood that the measured temperature value (eg, the first temperature value) collected by the above temperature sensor is the temperature of the measured object collected by the temperature sensor. Although the measured temperature value collected by the temperature sensor may be different from the actual temperature of the measured object due to the influence of the temperature measurement distance (such as the first distance); The measured temperature value can still reflect the temperature characteristics of the measured object. Different measured objects have different temperature characteristics (such as real temperature values). Therefore, after each time the mobile phone measures the temperature of the measured object, the temperature compensation model of the measured object is updated with the current measurement result, and a temperature compensation model conforming to the temperature characteristics of the measured object can be obtained. In this way, the degree of fit between the temperature compensation model and the temperature characteristics of the measured object can be improved, which is beneficial to further improve the accuracy of the temperature measurement of different measured objects by the mobile phone.

示例性的,本申请实施例中以手机多次测量两个用户(如用户a和用户b)的温度,并更新该用户a的温度补偿模型和用户b的温度补偿模型为例。通过对比多次测温后,用户a的温度补偿模型(如温度补偿函数)和用户b的温度补偿模型(如温度补偿函数),说明本申请实施例所达到的效果。Exemplarily, in the embodiment of the present application, the mobile phone measures the temperature of two users (eg, user a and user b) for multiple times, and updates the temperature compensation model of user a and the temperature compensation model of user b as an example. By comparing the temperature compensation model of user a (such as a temperature compensation function) and the temperature compensation model of user b (such as a temperature compensation function) after multiple temperature measurements, the effects achieved by the embodiments of the present application are described.

假设手机出厂时,该手机中预配置的用于测量人体温度的温度补偿模型包括图7所示的温度补偿函数701。手机执行S801-S805,P次测量用户a的温度后,图7所示的温度补偿函数701被更新为图11B所示的温度补偿函数1102。手机执行S801-S805,P次测量用户b的温度后,图7所示的温度补偿函数701被更新为图11B所示的温度补偿函数1103。其中,P 为大于8的正整数。Assuming that when the mobile phone leaves the factory, the temperature compensation model preconfigured in the mobile phone for measuring the temperature of the human body includes the temperature compensation function 701 shown in FIG. 7 . The mobile phone executes S801-S805, and after measuring the temperature of user a for P times, the temperature compensation function 701 shown in FIG. 7 is updated to the temperature compensation function 1102 shown in FIG. 11B . After the mobile phone executes S801-S805 and measures the temperature of user b for P times, the temperature compensation function 701 shown in FIG. 7 is updated to the temperature compensation function 1103 shown in FIG. 11B . Wherein, P is a positive integer greater than 8.

手机执行S801-S805,Q次测量用户a的温度后,图11B所示的温度补偿函数1102被更新为图11B所示的温度补偿函数1104。手机执行S801-S805,Q次测量用户b的温度后,图11B所示的温度补偿函数1103被更新为图11B所示的温度补偿函数1105。其中,Q>P+8,Q 为正整数。After the mobile phone executes S801-S805 and measures the temperature of user a for Q times, the temperature compensation function 1102 shown in FIG. 11B is updated to the temperature compensation function 1104 shown in FIG. 11B . After the mobile phone executes S801-S805 and measures the temperature of user b for Q times, the temperature compensation function 1103 shown in FIG. 11B is updated to the temperature compensation function 1105 shown in FIG. 11B . Among them, Q>P+8, Q is a positive integer.

可以理解,不同用户a的温度特征(如真实温度值)不同;因此,手机执行本申请实施例的方法多次测量不同用户的温度,针对各个用户更新得到的温度补偿模型则不同。因此,每次测量一个被测对象的温度后,根据本次的测量温度值和测温距离更新该被测对象的温度补偿模型,可以提高该温度补偿模型与被测对象的温度特征的契合度,有利于进一步提高手机对不同被测对象进行温度测量的准确度。It can be understood that different users a have different temperature characteristics (such as real temperature values); therefore, the mobile phone performs the method of the embodiments of the present application to measure the temperature of different users multiple times, and the temperature compensation models updated for each user are different. Therefore, after each measurement of the temperature of a measured object, the temperature compensation model of the measured object is updated according to the current measured temperature value and temperature measurement distance, which can improve the fit of the temperature compensation model and the temperature characteristics of the measured object. , which is conducive to further improving the accuracy of the temperature measurement of different measured objects by the mobile phone.

在一些实施例中,响应于上述第一操作,手机通过温度传感器采集被测对象的第一温度值(即S802)之后,手机可以先不执行S803-S805;而是判断该第一距离是否在预设距离范围[M1,M2]内。如果上述第一距离在预设范围内,手机则可以执行S803-S805。In some embodiments, in response to the above-mentioned first operation, after the mobile phone collects the first temperature value of the measured object through the temperature sensor (ie, S802), the mobile phone may not perform S803-S805; Within the preset distance range [M1, M2]. If the above-mentioned first distance is within the preset range, the mobile phone may execute S803-S805.

其中,上述预设距离范围[M1,M2]可以是上述阶段(1)中用于训练或创建被测对象的温度补偿模型的多个训练样本中测温距离的取值范围。或者,上述预设距离范围[M1,M2]可以是手机中预先配置的距离范围。或者,上述预设距离范围[M1,M2]也可以由用户在手机中设置。Wherein, the above-mentioned preset distance range [M1, M2] may be the value range of the temperature measurement distance in the plurality of training samples used for training or creating the temperature compensation model of the measured object in the above-mentioned stage (1). Alternatively, the above-mentioned preset distance range [M1, M2] may be a distance range preconfigured in the mobile phone. Alternatively, the above-mentioned preset distance ranges [M1, M2] can also be set by the user in the mobile phone.

例如,上述预设距离范围[M1,M2]可以为5mm~100mm。或者,该预设距离范围可以为 [M1,M2]5mm~50mm。或者,该预设距离范围可以为[M1,M2]6mm~60mm。需要说明的是,本申请实施例中,针对不同类型的被测对象,该预设距离范围的取值可以不同。并且,不同电子设备中,该预设距离范围的取值也可以不同。本申请实施例对预设距离范围的具体取值不作限制。以下实施例中,以预设距离范围[M1,M2]是5mm~100mm为例,介绍本申请实施例的方法。For example, the above-mentioned preset distance range [M1, M2] may be 5 mm˜100 mm. Alternatively, the preset distance range can be [M1, M2] 5mm~50mm. Alternatively, the preset distance range may be [M1, M2] 6 mm to 60 mm. It should be noted that, in this embodiment of the present application, for different types of measured objects, the preset distance range may have different values. Moreover, in different electronic devices, the value of the preset distance range may also be different. The specific value of the preset distance range is not limited in this embodiment of the present application. In the following embodiments, the methods of the embodiments of the present application are described by taking the preset distance range [M1, M2] as an example of 5 mm˜100 mm.

具体的,如果上述第一距离在预设距离范围[M1,M2]内,手机可以执行S803-S805。如果上述第一距离不在预设距离范围[M1,M2]内,手机则可以重新通过距离传感器测量第一距离。即手机可以重新执行S802。Specifically, if the above-mentioned first distance is within the preset distance range [M1, M2], the mobile phone may execute S803-S805. If the above-mentioned first distance is not within the preset distance range [M1, M2], the mobile phone can measure the first distance through the distance sensor again. That is, the mobile phone can re-execute S802.

在一些实施例中,如果上述第一距离在预设距离范围[M1,M2]内,手机可以执行S803-S804,所显示的第一界面还可以包括第三提示信息。该第三提示信息用于指示上述第一距离在预设距离范围[M1,M2]内,或者可以指示上述第一距离的大小适中。例如,图13所示的第一界面1301还可以包括第三提示信息1305,如“距离适中!”。In some embodiments, if the above-mentioned first distance is within the preset distance range [M1, M2], the mobile phone may execute S803-S804, and the displayed first interface may further include third prompt information. The third prompt information is used to indicate that the first distance is within the preset distance range [M1, M2], or may indicate that the size of the first distance is moderate. For example, the first interface 1301 shown in FIG. 13 may further include third prompt information 1305, such as "The distance is moderate!".

在一些实施例中,如果上述第一距离不在预设范围[M1,M2]内,手机可以显示引导信息。该引导信息用于指示上述第一距离不在预设范围[M1,M2]内。例如,手机可显示图14中的 (a)所示的提示信息1402,如“手机与被测对象的距离不在5mm~100mm内!”。In some embodiments, if the above-mentioned first distance is not within the preset range [M1, M2], the mobile phone may display guidance information. The guidance information is used to indicate that the above-mentioned first distance is not within the preset range [M1, M2]. For example, the mobile phone can display the prompt information 1402 shown in (a) of FIG. 14 , such as "The distance between the mobile phone and the measured object is not within 5mm to 100mm!".

可以理解,距离传感器采集的测温距离不在预设距离范围内可以会存在以下两种情况。情况(a):距离传感器采集的测温距离小于预设距离范围[M1,M2]的第一边界值M1(即上述距离阈值1)。情况(b):距离传感器采集的测温距离大于预设距离范围[M1,M2]的第二边界值M2(即上述距离阈值2)。其中,上述第一边界值M1是预设距离范围的最小值,上述第二边界值M2是预设距离范围的最大值。该第二边界值M2大于第一边界值M1。It can be understood that the following two situations may exist when the temperature measurement distance collected by the distance sensor is not within the preset distance range. Situation (a): The temperature measurement distance collected by the distance sensor is smaller than the first boundary value M1 of the preset distance range [M1, M2] (ie, the above-mentioned distance threshold 1). Situation (b): The temperature measurement distance collected by the distance sensor is greater than the second boundary value M2 of the preset distance range [M1, M2] (ie, the above-mentioned distance threshold 2). The first boundary value M1 is the minimum value of the preset distance range, and the second boundary value M2 is the maximum value of the preset distance range. The second boundary value M2 is greater than the first boundary value M1.

在上述情况(a)和情况(b)中,手机可以发出不同的引导信息。例如,在上述情况(a),即第一距离小于预设距离范围[M1,M2]的第一边界值M1的情况下,手机可以显示图14中的(c)所示的第一引导信息1402,如“手机与被测对象的距离过近,请保持距离在5mm~100mm 内!”。又例如,在上述情况(b),即第一距离大于预设距离范围[M1,M2]的第二边界值M2 的情况下,手机可以显示图14中的(b)所示的第二引导信息1404,如“手机与被测对象的距离过远,请保持距离在5mm~100mm内!”。In the above cases (a) and (b), the mobile phone can send out different guidance information. For example, in the above case (a), that is, in the case where the first distance is smaller than the first boundary value M1 of the preset distance range [M1, M2], the mobile phone can display the first guidance information shown in (c) in FIG. 14 . 1402, such as "The distance between the mobile phone and the measured object is too close, please keep the distance within 5mm~100mm!". For another example, in the above-mentioned situation (b), that is, the first distance is greater than the second boundary value M2 of the preset distance range [M1, M2], the mobile phone can display the second guide shown in (b) of FIG. 14 . Information 1404, such as "The distance between the mobile phone and the measured object is too far, please keep the distance within 5mm~100mm!".

需要说明的是,如果上述第一距离不在预设距离范围[M1,M2]内,手机可执行S802重新采集到第一距离。如果重新采集到的第一距离在预设距离范围[M1,M2]内,手机可自动执行S803-S805。It should be noted that, if the above-mentioned first distance is not within the preset distance range [M1, M2], the mobile phone can perform S802 to re-collect the first distance. If the re-collected first distance is within the preset distance range [M1, M2], the mobile phone can automatically execute S803-S805.

可以理解,相比于第一距离不在预设距离范围[M1,M2]内时手机所采集的第一温度值,运行温度补偿模型,采用第一距离在预设距离范围[M1,M2]内时手机所采集的第一温度值进行温度补偿,所得到的第二温度值更接近于被测对象的真实温度值。因此,本申请实施例中,手机在第一距离在预设距离范围[M1,M2]内的情况下,测量被测对象的温度,可以提升温度测量结果的准确度。It can be understood that, compared with the first temperature value collected by the mobile phone when the first distance is not within the preset distance range [M1, M2], the temperature compensation model is run, and the first distance is within the preset distance range [M1, M2]. When performing temperature compensation on the first temperature value collected by the mobile phone, the obtained second temperature value is closer to the real temperature value of the measured object. Therefore, in the embodiment of the present application, the mobile phone measures the temperature of the measured object when the first distance is within the preset distance range [M1, M2], which can improve the accuracy of the temperature measurement result.

以被测对象是用户Bob为例。当Bob发烧时,手机测得的Bob的第一温度值可能会高于人体正常温度值。例如,手机测得的Bob的第一温度值可能为38℃或39℃,甚至40℃。其中,Bob发烧的情况下,手机测得的第一温度值属于用户的异常温度值。或者,当Bob因为生病而体温过低(低于人体正常温度值)时,手机测得的第一温度值属于用户的异常温度值。其中,采用该异常温度值和第一距离更新上述温度补偿模型,可能会影响更新后的温度补偿模型在Bob体温正常情况下进行温度测量的准确度。Take the user Bob as an example. When Bob has a fever, the first temperature value of Bob measured by the mobile phone may be higher than the normal temperature value of the human body. For example, the first temperature value of Bob measured by the mobile phone may be 38°C or 39°C, or even 40°C. Among them, when Bob has a fever, the first temperature value measured by the mobile phone belongs to the abnormal temperature value of the user. Or, when Bob's body temperature is too low (lower than the normal temperature value of the human body) due to illness, the first temperature value measured by the mobile phone belongs to the abnormal temperature value of the user. Wherein, using the abnormal temperature value and the first distance to update the above-mentioned temperature compensation model may affect the accuracy of temperature measurement performed by the updated temperature compensation model under the condition that Bob's body temperature is normal.

例如,以实现方式(1)的情况(1)为例,采用该异常温度值和第一距离更新上述温度补偿模型,相比于更新前的温度补偿模型,更新后的温度补偿模型中该第一距离对应的测温误差的绝对值会存在较大幅度的增大。这样,即使Bob的体温正常;手机运行更新后的温度补偿模型,在测温距离为上述第一距离的情况下,测量Bob的温度,所得到的第一温度值和第二温度值也可能为异常温度值,即该第一温度值和第二温度值与人体正常温度值相差较大。For example, taking the case (1) of implementation (1) as an example, the abnormal temperature value and the first distance are used to update the above-mentioned temperature compensation model. The absolute value of the temperature measurement error corresponding to a distance will increase significantly. In this way, even if Bob's body temperature is normal; the mobile phone runs the updated temperature compensation model, and when the temperature measurement distance is the above-mentioned first distance, measuring Bob's temperature, the obtained first temperature value and second temperature value may also be The abnormal temperature value, that is, the first temperature value and the second temperature value are quite different from the normal temperature value of the human body.

基于此,手机在执行S805更新温度补偿模型之前,可以判断上述第一温度值是否在预设温度范围内。如果第一温度值在预设温度范围内,手机则可以执行S805。如果第一温度值在不在预设温度范围内,手机则可以不执行S805。需要注意的是,无论第一温度值是否在预设温度范围内,手机都执行S804。也就是说,即使手机测得被测对象的温度异常,手机也可以显示对第一温度值进行温度补偿得到的第二温度值。但是,手机不会使用该第一温度值更新温度补偿模型。Based on this, before executing S805 to update the temperature compensation model, the mobile phone can determine whether the above-mentioned first temperature value is within the preset temperature range. If the first temperature value is within the preset temperature range, the mobile phone may execute S805. If the first temperature value is not within the preset temperature range, the mobile phone may not execute S805. It should be noted that, regardless of whether the first temperature value is within the preset temperature range, the mobile phone performs S804. That is to say, even if the mobile phone detects that the temperature of the measured object is abnormal, the mobile phone can display the second temperature value obtained by performing temperature compensation on the first temperature value. However, the phone will not update the temperature compensation model with this first temperature value.

示例性的,上述预设温度范围可以是人体正常温度的取值范围。例如,该预设温度范围可以为36.3℃~37.2℃。其中,该预设温度范围可以是手机中预先配置的温度范围。或者,上述预设温度范围也可以由用户在手机中设置。需要说明的是,本申请实施例中,针对不同类型的被测对象,该预设温度范围的取值可以不同。本申请实施例对预设温度范围的具体取值不作限制。Exemplarily, the above-mentioned preset temperature range may be a value range of the normal temperature of the human body. For example, the preset temperature range may be 36.3°C˜37.2°C. The preset temperature range may be a pre-configured temperature range in the mobile phone. Alternatively, the above-mentioned preset temperature range may also be set by the user in the mobile phone. It should be noted that, in the embodiment of the present application, for different types of measured objects, the values of the preset temperature range may be different. The embodiment of the present application does not limit the specific value of the preset temperature range.

本申请实施例中,手机采用预设温度范围内的第一温度值,更新温度补偿模型。而不会采用预设温度范围之外的第一温度值(即异常的第一温度值),更新温度补偿模型。这样,可以保证温度补偿模型进行温度补偿的准确度。In the embodiment of the present application, the mobile phone uses the first temperature value within the preset temperature range to update the temperature compensation model. Instead of adopting a first temperature value outside the preset temperature range (ie, an abnormal first temperature value), the temperature compensation model is updated. In this way, the accuracy of temperature compensation performed by the temperature compensation model can be guaranteed.

在另一些实施例中,手机中可以保存多个温度补偿模型。因此,在上述S804之前,手机则可以从该多个温度补偿模型中为被测对象选择出一个温度补偿模型,用于进行温度补偿。In other embodiments, multiple temperature compensation models may be stored in the mobile phone. Therefore, before the above S804, the mobile phone can select a temperature compensation model for the measured object from the plurality of temperature compensation models for temperature compensation.

在一种实现方式中,响应于上述第一操作,手机可启动摄像头,通过摄像头采集被测对象的图像。然后,手机可以根据该被测对象的图像识别该被测对象,从该多个温度补偿模型中为该被测对象选择温度补偿模型。In an implementation manner, in response to the above-mentioned first operation, the mobile phone can activate the camera, and collect the image of the measured object through the camera. Then, the mobile phone can identify the measured object according to the image of the measured object, and select a temperature compensation model for the measured object from the plurality of temperature compensation models.

例如,假设手机中预先配置有人体的温度补偿模型a和猫的温度补偿模型b。手机第1 次为Bob测量温度的过程中,响应于上述第一操作,可通过摄像头采集Bob的图像。手机可识别出该Bob的类型为人体。然后,手机可选择温度补偿模型a执行S804。手机第1次为一个小猫测量温度的过程中,响应于上述第一操作,可通过摄像头采集小猫的图像。手机可识别出被测对象的类型为猫。然后,手机可选择温度补偿模型b执行S804。For example, suppose that the temperature compensation model a of the human body and the temperature compensation model b of the cat are pre-configured in the mobile phone. In the process of measuring the temperature for Bob for the first time by the mobile phone, in response to the above-mentioned first operation, the image of Bob can be collected through the camera. The mobile phone can recognize that the type of Bob is human. Then, the mobile phone can select the temperature compensation model a to execute S804. In the process of measuring the temperature of a kitten for the first time by the mobile phone, in response to the above-mentioned first operation, an image of the kitten can be collected through the camera. The mobile phone can identify the type of the tested object as a cat. Then, the mobile phone can select the temperature compensation model b to execute S804.

进一步的,手机还可以获取被测对象的对象特征(如人脸图像、猫脸图像或者虹膜信息等)。该对象特征可以是从摄像头采集的图像中提取的;或者,该对象特征是摄像头采集的图像。其中,手机执行S805后可得到被测对象的更新后的温度补偿模型,如更新后的温度补偿模型a或更新后的温度补偿模型b。手机可以保存上述对象特征,以及该对象特征所对应的被测对象的更新后的温度补偿模型。例如,手机可保存Bob的生物特征a,以及该生物特征a 对应的Bob的更新后的温度补偿模型a-1。Further, the mobile phone can also acquire object features of the measured object (such as a human face image, a cat face image, or iris information, etc.). The object feature may be extracted from an image captured by a camera; or, the object feature is an image captured by a camera. Wherein, after the mobile phone executes S805, an updated temperature compensation model of the measured object can be obtained, such as the updated temperature compensation model a or the updated temperature compensation model b. The mobile phone can save the above-mentioned object feature and the updated temperature compensation model of the measured object corresponding to the object feature. For example, the mobile phone can store Bob's biometric feature a, and Bob's updated temperature compensation model a-1 corresponding to the biometric feature a.

示例性的,在上述j=1的情况下,手机执行S805后,可以保存表7所示的温度补偿模型。Exemplarily, in the above-mentioned case of j=1, after the mobile phone executes S805, the temperature compensation model shown in Table 7 can be saved.

表7Table 7

Figure GDA0003488174020000231
Figure GDA0003488174020000231

在另一种实现方式中,可以由用户选择从上述多个温度补偿模型中,为被测对象选择一个温度补偿模型。例如,响应于上述第一操作,手机可显示第三界面。该第三界面包括多个模型选项,每个模型选项对应上述多个温度补偿模型中的一个温度补偿模型。In another implementation manner, the user may select one temperature compensation model for the measured object from the above-mentioned multiple temperature compensation models. For example, in response to the above-mentioned first operation, the mobile phone may display a third interface. The third interface includes a plurality of model options, and each model option corresponds to a temperature compensation model among the above-mentioned plurality of temperature compensation models.

示例性的,响应于上述第一操作,手机可显示图15所示的第三界面1501或者图17所示的第三界面1701。例如,手机出厂后,响应于上述第一操作,第1次测量温度时,可显示图 15所示的第三界面1501。该第三界面1501包括多种类型的被测对象的模型选项,如“人体”的模型选项1502、“猫”的模型选项1503和“狗”的模型选项1504等。Exemplarily, in response to the above-mentioned first operation, the mobile phone may display the third interface 1501 shown in FIG. 15 or the third interface 1701 shown in FIG. 17 . For example, after the mobile phone leaves the factory, in response to the above-mentioned first operation, the third interface 1501 shown in FIG. 15 can be displayed when the temperature is measured for the first time. The third interface 1501 includes model options for various types of measured objects, such as model options 1502 for "human body", model options 1503 for "cat", and model options 1504 for "dog".

在一些实施例中,响应于用户对该第三界面中第一模型选项的选择操作,手机可执行上述S802-S805。其中,S804和S805所述的温度补偿模型是该第一模型选项对应的温度补偿模型。例如,响应于用户对图15所示的第三界面1501中“人体”的模型选项1502的选择操作,上述S804和S805所述的温度补偿模型是该“人体”的模型选项1502对应的温度补偿模型,如表1或表7所示的温度补偿模型a。In some embodiments, in response to the user's selection operation on the first model option in the third interface, the mobile phone may perform the above S802-S805. The temperature compensation model described in S804 and S805 is the temperature compensation model corresponding to the first model option. For example, in response to the user's selection operation on the "human body" model option 1502 in the third interface 1501 shown in FIG. 15 , the temperature compensation model described in S804 and S805 above is the temperature compensation corresponding to the "human body" model option 1502 model, such as the temperature compensation model a shown in Table 1 or Table 7.

在另一些实施例中,响应于用户对该第三界面中第一模型选项的选择操作,手机还可以显示第四界面,该第四界面用于请求用户为该被测对象设置标识。接收用户在该第四界面输入的该被测对象的标识,并响应于用户在该第四界面的第二操作,可执行上述S802-S805,并按照该被测对象的标识保存更新后的温度补偿模型。In other embodiments, in response to the user's selection operation of the first model option in the third interface, the mobile phone may further display a fourth interface, where the fourth interface is used to request the user to set an identification for the measured object. Receive the identifier of the measured object input by the user on the fourth interface, and in response to the user's second operation on the fourth interface, perform the above S802-S805, and save the updated temperature according to the identifier of the measured object Compensation model.

示例性的,响应于用户对图15所示的第三界面1501中“人体”的模型选项1502的选择操作,手机可显示图16所示的第四界面1601。该第四界面1601包括标识输入框1602。该第四界面1601还包括“确定,并测温”按钮和“取消”按钮。上述第二操作用于触发手机使用上述第一模型选项对应的温度补偿模型,对所述第一温度进行温度补偿。例如,该第二操作可以是用户对该“确定,并测温”按钮的点击操作(如单击操作)。或者,该第二操作还可以是用户在第四界面输入的预设手势,如S形手势或L形手势等。或者,该第二操作还可以是手机显示上述第四界面时,接收到用户输入的语音命令,如“开始测温”。Exemplarily, in response to the user's selection operation on the model option 1502 of "human body" in the third interface 1501 shown in FIG. 15 , the mobile phone may display the fourth interface 1601 shown in FIG. 16 . The fourth interface 1601 includes an identification input box 1602 . The fourth interface 1601 further includes a "OK, and temperature measurement" button and a "Cancel" button. The above-mentioned second operation is used to trigger the mobile phone to use the temperature compensation model corresponding to the above-mentioned first model option to perform temperature compensation on the first temperature. For example, the second operation may be a click operation (such as a click operation) of the "OK, and measure temperature" button by the user. Alternatively, the second operation may also be a preset gesture input by the user on the fourth interface, such as an S-shaped gesture or an L-shaped gesture. Alternatively, the second operation may also be that when the mobile phone displays the above-mentioned fourth interface, a voice command input by the user, such as "start temperature measurement", is received.

手机可接收用户在该标识输入框1602输入的标识“Bob”,响应于用户对“确定,并测温”按钮的点击操作,可执行上述S802-S805,并按照该被测对象的标识(Bob)保存更新后的温度补偿模型。例如,手机执行S805后,手机所保存的温度补偿模型由表1所示的温度补偿模型,更新为表7所示的温度补偿模型。此后,手机下一次接收到上述第一操作时,响应于该第一操作,则可以显示图17所示的第三界面1701。该第三界面1701包括表7所示的温度补偿模型a-1的模型选项1702。The mobile phone can receive the identification "Bob" input by the user in the identification input box 1602, and in response to the user's click operation on the "OK, and measure temperature" button, the above-mentioned S802-S805 can be executed, and according to the identification (Bob) of the measured object. ) to save the updated temperature compensation model. For example, after the mobile phone executes S805, the temperature compensation model stored in the mobile phone is updated from the temperature compensation model shown in Table 1 to the temperature compensation model shown in Table 7. Thereafter, when the mobile phone receives the above-mentioned first operation next time, in response to the first operation, the third interface 1701 shown in FIG. 17 can be displayed. The third interface 1701 includes the model options 1702 of the temperature compensation model a-1 shown in Table 7.

本申请实施例中,可以由手机根据被测对象的生物特征为该被测对象选择温度补偿模型;或者,可以由用户手动为该被测对象选择温度补偿模型。这样,可以为不同的被测对象选择合适的温度补偿模型进行温度补偿,可以提升测温结果的准确度。In this embodiment of the present application, the mobile phone may select a temperature compensation model for the measured object according to the biological characteristics of the measured object; or, the user may manually select a temperature compensation model for the measured object. In this way, suitable temperature compensation models can be selected for different measured objects to perform temperature compensation, which can improve the accuracy of temperature measurement results.

可以理解的是,上述电子设备(如手机)为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。It can be understood that, in order to realize the above-mentioned functions, the above-mentioned electronic device (such as a mobile phone) includes corresponding hardware structures and/or software modules for executing each function. Those skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Experts may use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present application.

本申请实施例可以根据上述方法示例对上述电子设备(如手机)进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the electronic device (such as a mobile phone) may be divided into functional modules according to the above method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. middle. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.

在采用集成的单元的情况下,图18示出了上述实施例中所涉及的电子设备1800的一种可能的结构示意图。该电子设备1800可以包括:温度采集模块1801、距离采集模块1802、数据处理模块1803、温度补偿模块1804和显示模块1805。其中,上述数据处理模块1803、温度补偿模块1804的功能可以集成在处理模块中实现。In the case of using an integrated unit, FIG. 18 shows a possible schematic structural diagram of the electronic device 1800 involved in the above embodiment. The electronic device 1800 may include: a temperature acquisition module 1801 , a distance acquisition module 1802 , a data processing module 1803 , a temperature compensation module 1804 and a display module 1805 . The functions of the data processing module 1803 and the temperature compensation module 1804 can be integrated into the processing module.

具体的,上述温度采集模块1801可以用于支持电子设备1800执行上述方法实施例中的 S803,和/或用于本文所描述的技术的其它过程。上述距离采集模块1802可以用于支持电子设备1800执行上述方法实施例中的S802,和/或用于本文所描述的技术的其它过程。Specifically, the above-mentioned temperature collection module 1801 may be used to support the electronic device 1800 to perform S803 in the above-mentioned method embodiments, and/or to be used in other processes of the technology described herein. The foregoing distance collection module 1802 may be used to support the electronic device 1800 to perform S802 in the foregoing method embodiments, and/or other processes for the techniques described herein.

上述处理模块可以用于支持电子设备1800执行上述方法实施例中的S801,S804中“进行温度补偿”的操作,S805,“判断第一距离是否在预设距离范围”的操作,和/或用于本文所描述的技术的其它过程。The above-mentioned processing module may be used to support the electronic device 1800 to perform the operation of "performing temperature compensation" in S801 and S804 in the above-mentioned method embodiment, S805, the operation of "judging whether the first distance is within the preset distance range", and/or using Other procedures for the techniques described herein.

其中,上述数据处理模块1803包括但不限制于模数转换模块(或单元)和信号放大模块 (或单元)等。该数据处理模块1803可以用于对温度采集模块1801采集的温度值,以及温度采集模块1801采集的距离,进行数模转换和信号放大。上述温度补偿模块1804可以用于支持电子设备1800执行上述方法实施例中的温度补偿,如S804中“进行温度补偿”的操作和/ 或用于本文所描述的技术的其它过程。The above-mentioned data processing module 1803 includes, but is not limited to, an analog-to-digital conversion module (or unit), a signal amplification module (or unit), and the like. The data processing module 1803 can be used to perform digital-to-analog conversion and signal amplification on the temperature value collected by the temperature collection module 1801 and the distance collected by the temperature collection module 1801 . The above-mentioned temperature compensation module 1804 may be used to support the electronic device 1800 to perform temperature compensation in the above-mentioned method embodiments, such as the "perform temperature compensation" operation in S804 and/or other processes for the techniques described herein.

上述显示模块1805可以用于支持电子设备1800执行上述方法实施例中的S804中“显示第一界面”的操作,“显示上述第二界面、第三界面、第四界面以及各种提示信息和引导信息”的操作,和/或用于本文所描述的技术的其它过程。The above-mentioned display module 1805 may be used to support the electronic device 1800 to perform the operation of “displaying the first interface” in S804 in the above method embodiment, “displaying the above-mentioned second interface, third interface, fourth interface and various prompt information and guidance. information", and/or other processes for the techniques described herein.

上述电子设备1800还包括存储模块。该存储模块1806用于保存支持电子设备1800保存上述实施例中所述的温度补偿模型。The above electronic device 1800 further includes a storage module. The storage module 1806 is used to store the temperature compensation model described in the above-mentioned embodiment in the supporting electronic device 1800 .

其中,上述处理模块可以是处理器或控制器,例如可以是中央处理器(CentralProcessing Unit,CPU),数字信号处理器(Digital Signal Processor,DSP),专用集成电路 (Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(FieldProgrammable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。处理器可以包括应用处理器和基带处理器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。Wherein, the above-mentioned processing module may be a processor or a controller, for example, may be a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC) , Field Programmable Gate Array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The processors may include application processors and baseband processors. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

例如,上述处理模块为一个或多个处理器(如图5所示的处理器510),存储模块1806 可以为存储器(如图5所示的内部存储器521)。显示模块1805可以为显示屏(如图5所示的显示屏594)。上述距离采集模块1802可以是距离传感器(如图5所示的距离传感器580F),温度采集模块1801可以是温度传感器(如图5所示的温度传感器580J)。上述电子设备1800 还可以包括图像采集模型,该图像采集模块可以是摄像头(如图5所示的摄像头593)。For example, the above-mentioned processing modules are one or more processors (the processor 510 shown in FIG. 5 ), and the storage module 1806 may be a memory (the internal memory 521 shown in FIG. 5 ). The display module 1805 may be a display screen (such as the display screen 594 shown in FIG. 5 ). The above-mentioned distance collection module 1802 may be a distance sensor (such as the distance sensor 580F shown in FIG. 5 ), and the temperature collection module 1801 may be a temperature sensor (such as the temperature sensor 580J shown in FIG. 5 ). The above-mentioned electronic device 1800 may further include an image acquisition model, and the image acquisition module may be a camera (the camera 593 shown in FIG. 5 ).

本申请实施例所提供的电子设备1800可以为图5所示的电子设备500。其中,上述一个或多个处理器、存储器、距离传感器、温度传感器和显示屏等可以连接在一起,例如通过总线连接。The electronic device 1800 provided in this embodiment of the present application may be the electronic device 500 shown in FIG. 5 . Wherein, the above-mentioned one or more processors, memories, distance sensors, temperature sensors, display screens, etc. can be connected together, for example, through a bus.

本申请实施例还提供一种芯片系统,如图19所示,该芯片系统1900包括至少一个处理器1901和至少一个接口电路1902。处理器1901和接口电路1902可通过线路互联。例如,接口电路1902可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路1902可用于向其它装置(例如处理器1901)发送信号。示例性的,接口电路1902可读取存储器中存储的指令,并将该指令发送给处理器1901。当所述指令被处理器1901执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。An embodiment of the present application further provides a chip system. As shown in FIG. 19 , the chip system 1900 includes at least one processor 1901 and at least one interface circuit 1902 . The processor 1901 and the interface circuit 1902 may be interconnected by wires. For example, the interface circuit 1902 may be used to receive signals from other devices, such as the memory of an electronic device. As another example, the interface circuit 1902 may be used to send signals to other devices (eg, the processor 1901). Exemplarily, the interface circuit 1902 may read the instructions stored in the memory and send the instructions to the processor 1901 . When the instructions are executed by the processor 1901, the electronic device can be caused to perform the various steps in the above embodiments. Certainly, the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.

本申请实施例还提供一种计算机存储介质,该计算机存储介质包括计算机指令,当所述计算机指令在上述电子设备上运行时,使得该电子设备执行上述方法实施例中手机执行的各个功能或者步骤。Embodiments of the present application further provide a computer storage medium, where the computer storage medium includes computer instructions, when the computer instructions are executed on the above-mentioned electronic device, the electronic device is made to perform various functions or steps performed by the mobile phone in the above-mentioned method embodiments .

本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述方法实施例中手机执行的各个功能或者步骤。Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, enables the computer to perform various functions or steps performed by the mobile phone in the above method embodiments.

通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by Different functional modules are completed, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等) 或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a removable hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and other media that can store program codes.

以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above contents are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (30)

1. A method for measuring temperature, applied to an electronic device, the electronic device comprising: a temperature sensor and a distance sensor; one or more temperature compensation models are stored in the electronic equipment, the temperature compensation models have the function of performing temperature compensation on the temperature values acquired by the temperature sensors by adopting the distances acquired by the distance sensors, and the temperature compensation models are Artificial Intelligence (AI) models; the method comprises the following steps:
the electronic equipment receives a first operation, and the first operation is used for triggering the electronic equipment to measure the temperature;
the electronic equipment acquires a first distance through the distance sensor, wherein the first distance is the distance between a measured object and the electronic equipment;
the electronic equipment acquires a first temperature value of the measured object through the temperature sensor;
the electronic equipment takes the first temperature value and the first distance as input, runs a temperature compensation model of the measured object, and obtains a second temperature value after temperature compensation is carried out on the first temperature value; wherein, the temperature compensation model of the measured object is a preset AI model; or the temperature compensation model of the measured object is obtained by updating the distance acquired by the distance sensor and the temperature value acquired by the temperature sensor when the temperature of the measured object is measured last time;
the electronic equipment displays a first interface, wherein the first interface comprises the second temperature value;
and the electronic equipment updates a temperature compensation model of the measured object by adopting the first distance and the first temperature value, wherein the updated temperature compensation model is used for carrying out temperature compensation on the temperature value of the measured object acquired by the temperature sensor next time.
2. The method of claim 1, wherein the first interface further comprises the first distance.
3. The method of claim 1, wherein the temperature compensation model of the object under test comprises a temperature compensation function characterizing a functional relationship between a measurement distance and a temperature measurement error, the temperature measurement error being a difference between a temperature value acquired by the temperature sensor and a true temperature value of the object under test;
the electronic device uses the first temperature value and the first distance as input, operates the temperature compensation model of the measured object, and obtains a second temperature value obtained by performing temperature compensation on the first temperature value, and the method includes:
and the electronic equipment operates a temperature compensation model of the measured object, calculates a temperature measurement error corresponding to the first distance according to the temperature compensation function, and calculates a difference value between the first temperature value and the temperature measurement error corresponding to the first distance to obtain the second temperature value.
4. The method of claim 1, wherein the temperature compensation model of the measured object comprises temperature compensation information, the temperature compensation information comprises a plurality of temperature measurement distances, and a temperature measurement error corresponding to each temperature measurement distance, the temperature measurement error is a difference between a temperature value acquired by the temperature sensor and a real temperature value of the measured object;
the electronic device uses the first temperature value and the first distance as input, operates the temperature compensation model of the measured object, and obtains a second temperature value obtained by performing temperature compensation on the first temperature value, and the method includes:
and the electronic equipment operates a temperature compensation model of the measured object, searches for a temperature measurement error corresponding to the first distance from the temperature compensation information, and calculates a difference value between the first temperature value and the temperature measurement error corresponding to the first distance to obtain the second temperature value.
5. The method of claim 3, wherein the temperature compensation model further comprises a preset reference temperature;
wherein, the electronic device adopts the first distance and the first temperature value to update the temperature compensation model of the measured object, and the method comprises the following steps:
the electronic equipment calculates the difference value between the first temperature value and the preset reference temperature, calculates the product of the difference value between the first temperature value and the preset reference temperature and a first preset weight to obtain a first value, and calculates the product of a temperature measurement error corresponding to the first distance and a second preset weight to obtain a second value; the first preset weight and the second preset weight are more than 0 and less than 1, and the sum of the first preset weight and the second preset weight is 1;
and the electronic equipment updates the temperature measurement error corresponding to the first distance in the temperature compensation model by adopting the sum of the first value and the second value.
6. The method of claim 1, wherein prior to the electronic device receiving the first operation, the method further comprises:
the electronic equipment displays a second interface, the second interface is a display interface of the first application, the second interface comprises a preset control, the preset control is used for triggering the electronic equipment to measure the temperature, and the first operation is clicking operation of a user on the preset control.
7. The method of claim 1, wherein after the electronic device acquires the first distance via the distance sensor and before the electronic device acquires the first temperature value of the measurand via the temperature sensor, the method further comprises:
the electronic equipment judges whether the first distance is within a preset distance range;
wherein, the electronic equipment passes through temperature sensor gathers the first temperature value of measurand, includes:
and if the first distance is within the preset distance range, the electronic equipment acquires the first temperature value through the temperature sensor.
8. The method of claim 7, further comprising:
and if the first distance is not within the preset distance range, the electronic equipment displays guide information, and the guide information is used for prompting a user to control the distance between the electronic equipment and the measured object to be within the preset distance range.
9. The method of any of claims 1-8, wherein prior to the electronic device updating the temperature compensation model of the measurand with the first distance and the first temperature value, the method further comprises:
the electronic equipment judges whether the first temperature value is within a preset temperature range or not;
wherein, the electronic device adopts the first distance and the first temperature value to update the temperature compensation model of the measured object, and the method comprises the following steps:
and if the first temperature value is within the preset temperature range, the electronic equipment updates the temperature compensation model of the measured object by adopting the first distance and the first temperature value.
10. The method of any one of claims 1-8, wherein the electronic device maintains a plurality of temperature compensation models; the electronic equipment further comprises a camera, and the camera, the temperature sensor and the distance sensor are arranged on the same surface of the electronic equipment;
before the electronic device uses the first temperature value and the first distance as inputs, and runs a temperature compensation model of the measured object to obtain a second temperature value after performing temperature compensation on the first temperature value, the method further includes:
the electronic equipment acquires an image of the measured object through the camera;
the electronic device determines a temperature compensation model of the measured object from the plurality of temperature compensation models according to the image of the measured object.
11. The method of any one of claims 1-8, wherein the electronic device maintains a plurality of temperature compensation models; the method further comprises the following steps:
in response to the first operation, the electronic device displaying a third interface, the third interface including a plurality of model options, each model option corresponding to one of the plurality of temperature compensation models;
the electronic device uses the first temperature value and the first distance as input, operates the temperature compensation model of the measured object, and obtains a second temperature value obtained by performing temperature compensation on the first temperature value, and the method includes:
and responding to the selection operation of a user on a first model option in the third interface, taking the first temperature value and the first distance as input by the electronic equipment, and operating a temperature compensation model corresponding to the first model option to obtain the second temperature value.
12. The method of claim 6, wherein the second interface further comprises a prompt message for prompting a user to control the distance between the electronic device and the measured object to be within a preset distance range.
13. The method of any one of claims 1-8, wherein one or more blind holes are provided on a housing of the electronic device, and wherein the temperature sensor and the distance sensor are disposed in the one or more blind holes.
14. The method according to any one of claims 1 to 8, wherein the distance between the temperature sensor and the distance sensor is between 0 and 4 cm.
15. An electronic device, comprising a memory, a processor, and a display screen; the electronic equipment is also provided with a temperature sensor and a distance sensor; one or more temperature compensation models are stored in the memory, the temperature compensation models have the function of performing temperature compensation on the temperature values acquired by the temperature sensors by adopting the distances acquired by the distance sensors, and the temperature compensation models are Artificial Intelligence (AI) models;
the processor is used for receiving a first operation, and the first operation is used for triggering the electronic equipment to measure the temperature;
the distance sensor is used for acquiring a first distance, and the first distance is the distance between the measured object and the electronic equipment;
the temperature sensor is used for acquiring a first temperature value of the measured object;
the processor is further configured to operate a temperature compensation model of the measured object by using the first temperature value and the first distance as inputs to obtain a second temperature value obtained by performing temperature compensation on the first temperature value; wherein, the temperature compensation model of the measured object is a preset AI model; or the temperature compensation model of the measured object is obtained by updating the distance acquired by the distance sensor and the temperature value acquired by the temperature sensor when the temperature of the measured object is measured last time;
the display screen is used for displaying a first interface, and the first interface comprises the second temperature value;
the processor is further configured to update the temperature compensation model of the measured object by using the first distance and the first temperature value, where the updated temperature compensation model is used to perform temperature compensation on the temperature value of the measured object acquired by the temperature sensor next time.
16. The electronic device of claim 15, wherein the first interface displayed by the display screen further comprises the first distance.
17. The electronic device of claim 15, wherein the temperature compensation model of the measured object stored in the memory comprises a temperature compensation function, the temperature compensation function represents a functional relationship between a measurement distance and a temperature measurement error, and the temperature measurement error is a difference between a temperature value acquired by the temperature sensor and a real temperature value of the measured object;
the processor is configured to use the first temperature value and the first distance as inputs, operate a temperature compensation model of the measured object, and obtain a second temperature value obtained by performing temperature compensation on the first temperature value, and includes:
the processor is configured to run a temperature compensation model of the object to be measured, calculate a temperature measurement error corresponding to the first distance according to the temperature compensation function, and calculate a difference between the first temperature value and the temperature measurement error corresponding to the first distance to obtain the second temperature value.
18. The electronic device of claim 15, wherein the temperature compensation model of the measured object stored in the memory includes temperature compensation information, the temperature compensation information includes a plurality of temperature measurement distances and a temperature measurement error corresponding to each temperature measurement distance, and the temperature measurement error is a difference between a temperature value acquired by the temperature sensor and a true temperature value of the measured object;
the processor is configured to operate a temperature compensation model of the measured object with the first temperature value and the first distance as inputs, and obtain a second temperature value obtained by performing temperature compensation on the first temperature value, and includes:
the processor is configured to run a temperature compensation model of the object to be measured, search for a temperature measurement error corresponding to the first distance from the temperature compensation information, and calculate a difference between the first temperature value and the temperature measurement error corresponding to the first distance to obtain the second temperature value.
19. The electronic device of claim 17, wherein the temperature compensation model further comprises a preset reference temperature;
wherein the processor is configured to update the temperature compensation model of the measured object by using the first distance and the first temperature value, and includes:
the processor is configured to:
calculating a difference value between the first temperature value and the preset reference temperature, calculating a product of the difference value between the first temperature value and the preset reference temperature and a first preset weight to obtain a first value, and calculating a product of a temperature measurement error corresponding to the first distance and a second preset weight to obtain a second value; the first preset weight and the second preset weight are more than 0 and less than 1, and the sum of the first preset weight and the second preset weight is 1;
and updating the temperature measurement error corresponding to the first distance in the temperature compensation model by adopting the sum of the first value and the second value.
20. The electronic device of claim 15, wherein the display screen is further configured to display a second interface before the processor receives the first operation, the second interface is a display interface of a first application, the second interface includes a preset control, the preset control is used to trigger the electronic device to measure a temperature, and the first operation is a click operation of a user on the preset control.
21. The electronic device of claim 15, wherein the processor is further configured to determine whether the first distance is within a preset distance range after the distance sensor collects the first distance;
wherein, the temperature sensor is used for gathering the first temperature value, includes:
the temperature sensor is used for collecting the first temperature value if the first distance is within the preset distance range.
22. The electronic device of claim 21, wherein the display screen is further configured to display a guidance message if the first distance is not within the preset distance range, and the guidance message is used to prompt a user to control the distance between the electronic device and the measured object to be within the preset distance range.
23. The electronic device of any one of claims 15-22, wherein the processor is further configured to determine whether the first temperature value is within a preset temperature range;
wherein the processor is configured to update the temperature compensation model of the measured object by using the first distance and the first temperature value, and includes:
and the processor is used for updating the temperature compensation model of the measured object by adopting the first distance and the first temperature value if the first temperature value is within the preset temperature range.
24. The electronic device of any one of claims 15-22, wherein the memory holds a plurality of temperature compensation models; the electronic equipment further comprises a camera, and the camera, the temperature sensor and the distance sensor are arranged on the same surface of the electronic equipment;
the camera is used for collecting an image of the measured object before the processor takes the first temperature value and the first distance as input and runs a temperature compensation model of the measured object to obtain a second temperature value after the temperature compensation is carried out on the first temperature value;
the processor is further configured to determine a temperature compensation model of the measured object from the plurality of temperature compensation models according to the image of the measured object.
25. The electronic device of any one of claims 15-22, wherein the memory holds a plurality of temperature compensation models;
the display screen is further configured to display a third interface in response to the first operation, where the third interface includes a plurality of model options, and each model option corresponds to one of the plurality of temperature compensation models;
the processor is configured to use the first temperature value and the first distance as inputs, operate a temperature compensation model of the measured object, and obtain a second temperature value obtained by performing temperature compensation on the first temperature value, and includes:
the processor is configured to, in response to a selection operation of a user on a first model option in the third interface, take the first temperature value and the first distance as inputs, run a temperature compensation model corresponding to the first model option, and obtain the second temperature value.
26. The electronic device of claim 20, wherein the second interface further comprises a prompt message for prompting a user to control a distance between the electronic device and the measured object to be within a preset distance range.
27. The electronic device of any one of claims 15-22, wherein one or more blind holes are provided in a housing of the electronic device, and wherein the temperature sensor and the distance sensor are disposed in the one or more blind holes.
28. The electronic device of any of claims 15-22, wherein a distance between the temperature sensor and the distance sensor is between 0-4 centimeters.
29. A chip system is characterized in that the chip system is applied to an electronic device provided with a temperature sensor, a distance sensor, a display screen and a memory; the chip system comprises an interface circuit and a processor; the interface circuit and the processor are interconnected through a line; the interface circuit to receive signals from the memory and to send the signals to the processor, the signals including computer instructions stored in the memory; the electronic device performs the method of any of claims 1-14 when the processor executes the computer instructions.
30. A computer storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-14.
CN202010247509.1A 2020-03-31 2020-03-31 A method for measuring temperature, electronic device, chip system and storage medium Active CN113542495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247509.1A CN113542495B (en) 2020-03-31 2020-03-31 A method for measuring temperature, electronic device, chip system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247509.1A CN113542495B (en) 2020-03-31 2020-03-31 A method for measuring temperature, electronic device, chip system and storage medium

Publications (2)

Publication Number Publication Date
CN113542495A CN113542495A (en) 2021-10-22
CN113542495B true CN113542495B (en) 2022-05-10

Family

ID=78087723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247509.1A Active CN113542495B (en) 2020-03-31 2020-03-31 A method for measuring temperature, electronic device, chip system and storage medium

Country Status (1)

Country Link
CN (1) CN113542495B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116046207B (en) * 2022-07-18 2024-03-22 荣耀终端有限公司 A temperature measurement method and headphones
CN116069139B (en) * 2022-08-08 2023-10-31 荣耀终端有限公司 Temperature prediction methods, devices, electronic equipment and media
CN115096448B (en) * 2022-08-26 2022-12-06 深圳市景新浩科技有限公司 Infrared temperature measurement system based on internet

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103565422A (en) * 2013-11-06 2014-02-12 江苏大学 Medical infrared thermometer and measurement compensating method of medical infrared thermometer
CN204301867U (en) * 2014-10-28 2015-04-29 东莞市振海电子科技有限公司 New and improved infrared thermometer
US11067452B1 (en) * 2015-03-12 2021-07-20 Maxim Integrated Products, Inc. Device and method for temperature correction using a proximity sensor in a non-contact thermopile thermometer
CN105571722A (en) * 2015-12-23 2016-05-11 深圳市金立通信设备有限公司 Temperature measuring method and terminal
KR101779761B1 (en) * 2016-02-02 2017-09-19 주식회사 코아리버 Temperature compensation thermometer and method using a distance measuring seneor

Also Published As

Publication number Publication date
CN113542495A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN113542495B (en) A method for measuring temperature, electronic device, chip system and storage medium
WO2021018154A1 (en) Information representation method and apparatus
US9568895B2 (en) Adaptive sensor data selection and sampling based on current and future context
WO2021196411A1 (en) Method for measuring temperature, and electronic device
US20170296088A1 (en) Electronic device for measuring biometric information and device for charging the electronic device
WO2021013230A1 (en) Robot control method, robot, terminal, server, and control system
CN112289313A (en) Voice control method, electronic equipment and system
CN107658016B (en) Nounou intelligent monitoring system for elderly healthcare companion
CN110851067A (en) Screen display mode switching method, device and electronic device
CN111225603B (en) Electronic device and method for providing stress index corresponding to user activity
WO2022193973A1 (en) Image processing method and apparatus, electronic device, computer readable storage medium, and computer program product
CN112860169A (en) Interaction method and device, computer readable medium and electronic equipment
WO2020103001A1 (en) Method for estimating object parameters and electronic device
CN113395382A (en) Method for data interaction between devices and related devices
CN115086094B (en) Equipment selection method and related device
CN113569042A (en) Text information classification method and device, computer equipment and storage medium
US12201893B2 (en) Target user locking method and electronic device
WO2024051730A1 (en) Cross-modal retrieval method and apparatus, device, storage medium, and computer program
CN113742460A (en) Method and device for generating virtual role
WO2022151887A1 (en) Sleep monitoring method and related apparatus
CN113572798B (en) Device control method, system, device, and storage medium
WO2021233259A1 (en) Method for evaluating female emotion and related apparatus, and device
US20230335257A1 (en) Electronic apparatus for providing coaching and operating method thereof
CN114463762B (en) Data processing method and device
WO2023179490A1 (en) Application recommendation method and an electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant