A wearing state recognition method and device of an electronic device and a storage medium
Patent Information
- Application Number
- CN202310201435.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-03-03
AI Technical Summary
由于现有的基线跟踪算法中,当人体长时间接近或者佩戴电子设备时,基线不会进行更新,处于不变的状态,此时通过判断电容传感器的测量值与基线的差值,与预设阈值的大小关系,则无法准确判断电子设备的佩戴状态
Smart Images

Figure CN116204081B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sensor technology, and in particular to a method, apparatus and storage medium for identifying the wearing status of electronic devices. Background Technology
[0002] Existing electronic devices, such as smartwatches, can detect their wearing status using built-in capacitive sensors to determine whether to activate functions like heart rate measurement while worn. Some solutions identify the wearing status by comparing the difference between the capacitive sensor's measurement and a baseline to a preset threshold. For example, if the difference is greater than the preset threshold, it indicates a person is near or wearing the electronic device. The capacitive sensor's measurement can include values influenced by touch and environmental factors. Conversely, if the difference is less than or equal to the preset threshold, it indicates no person is near or wearing the electronic device. In this case, the capacitive sensor's measurement may only include values influenced by environmental factors, such as humidity and temperature. The baseline is set to compensate for these environmental influences.
[0003] When the environment in which an electronic device is located changes, such as temperature or humidity, the measurement value of the capacitive sensor will drift. For example, if the temperature or humidity increases, the measurement value of the capacitive sensor will increase accordingly, while if the temperature or humidity decreases, the measurement value will decrease accordingly. Because existing baseline tracking algorithms do not update the baseline when a person is near or wearing the electronic device for an extended period, remaining unchanged, it is impossible to accurately determine the wearing status of the electronic device by comparing the difference between the capacitive sensor measurement value and the baseline with a preset threshold. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for identifying the wearing status of an electronic device. The technical solution of this application identifies the wearing status of the device through an updated baseline. The updated baseline can better compensate for capacitance changes caused by the external environment, thereby more accurately identifying the current unworn state of the electronic device and improving user satisfaction.
[0005] In a first aspect, embodiments of this application provide a method for identifying the wearing state of an electronic device, comprising: determining that the current wearing state of the electronic device is a stable state after the unwearing state; determining a first baseline that matches the capacitance of the external environment of the electronic device; and determining the wearing state of the electronic device based on the first baseline and the current capacitance measurement value of the electronic device.
[0006] In one possible implementation, the method for determining the current wearing state of the electronic device as a stable state after the unwearing state includes: calculating the average value of the measured values of the capacitive sensor within a first preset time period; calculating the standard deviation of the measured values within the first preset time period; determining whether the current state is a stable state based on the standard deviation; if the current state is determined to be a stable state, determining whether the previous state was the first state; if the previous state is determined to be the first state, determining the current state as the unwearing state after the wearing state.
[0007] In one possible implementation, the method to determine whether the current state is a stable state is: if the absolute value of the standard deviation is less than a first threshold, then the current state is a stable state.
[0008] In one possible implementation, the first state is when the electronic device is in a detached state.
[0009] In one possible implementation, the first state is the state where the absolute value of the standard deviation is less than a first threshold.
[0010] In one possible implementation, the method for determining the first baseline that matches the capacitance of the external environment of the electronic device is as follows: the internal capacitance of the electronic device is set according to the capacitance level of the touch chip using a binary search method; if all the capacitance levels of the touch chip are used up, or the ADC data of the touch chip is greater than 0, then the current capacitance level is taken as the final capacitance level of the internal capacitance.
[0011] In one possible implementation, the method for determining the wearing state of the electronic device based on the first baseline and the current capacitance measurement value of the electronic device is as follows: if the difference between the current capacitance measurement value of the electronic device and the first baseline is less than or equal to a first threshold, then the wearing state of the electronic device is determined to be an unworn state; if the difference between the current capacitance measurement value of the electronic device and the first baseline is greater than the first threshold, then the wearing state of the electronic device is determined to be a worn state.
[0012] In one possible implementation, if the current capacitance measurement value of the electronic device is less than a first preset threshold, the method for determining the first baseline that matches the capacitance of the external environment of the electronic device is as follows: calculate the minimum value of the capacitance sensor measurement value within a third preset time period; calculate the average value of the capacitance sensor measurement value within a fourth preset time period after power-on calibration; calculate the difference between the minimum value and the average value; perform low-pass filtering on the difference to obtain the correction amount; and update the baseline using the correction amount.
[0013] In one possible implementation, the method for obtaining the correction value by low-pass filtering the difference is as follows:
[0014] The correction amount is obtained using a low-pass filter formula, which is as follows:
[0015] Raw_offset(n)=(1-coef)*Raw_offset(n-1)+coef*delta;
[0016] Where Raw_offset(n) is the nth correction amount, n is a natural number greater than or equal to 1, and Raw_offset(0) is equal to 0, coef is an adjustment coefficient greater than or equal to 0 and less than or equal to 1, and delta is the difference.
[0017] Secondly, embodiments of this application provide a device for identifying the wearing status of an electronic device, including a first determining module for determining that the current wearing status of the electronic device is a stable state after being unworn; a second determining module for determining a first baseline that matches the capacitance of the external environment of the electronic device; and a third determining module for determining the wearing status of the electronic device based on the first baseline and the current capacitance measurement value of the electronic device.
[0018] Thirdly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform any of the above-described first aspect and various possible implementations of the first aspect, the electronic device wearing status recognition method.
[0019] Fourthly, embodiments of this application provide a computer program product, which includes instructions for implementing the first aspect and any of the various possible implementations of the first aspect of the wearing state recognition method.
[0020] Fifthly, embodiments of this application provide a chip device, the chip device comprising:
[0021] A communication interface used for inputting and / or outputting information;
[0022] A processor for executing a computer-executable program, causing a device with a chip device to perform any of the above-described first aspect and various possible implementations of the first aspect, the method for identifying the wearing status of an electronic device.
[0023] Sixthly, embodiments of this application provide an electronic device, including:
[0024] Memory, used to store instructions executed by one or more processors of an electronic device, and
[0025] The processor, when the instructions are executed by one or more processors, is used to perform any of the above-described first aspect and various possible implementations of the first aspect, the method for identifying the wearing status of an electronic device. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 According to some embodiments of this application, a schematic diagram showing the relationship between the measured value of a capacitive sensor and time is shown;
[0028] Figure 2 According to some embodiments of this application, a flowchart of a method for recognizing the wearing status of an electronic device is shown;
[0029] Figure 3 According to some embodiments of this application, a schematic diagram is shown showing the relationship between the measured value of a capacitive sensor, the steady state of the measured value, and time.
[0030] Figure 4 According to some embodiments of this application, a schematic flowchart of a baseline forced tracking method is shown;
[0031] Figure 5 According to some embodiments of this application, a flowchart illustrating another method for identifying the wearing status of an electronic device is shown;
[0032] Figure 6 According to some embodiments of this application, a schematic flowchart of a baseline correction method is shown;
[0033] Figure 7 According to some embodiments of this application, a schematic diagram of the hardware structure of an electronic device is shown. Detailed Implementation
[0034] The illustrative embodiments will now be described using terms commonly used by those skilled in the art.
[0035] It is understood that the illustrative embodiments of this application include, but are not limited to, a method, apparatus and storage medium for identifying the wearing status of an electronic device.
[0036] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0037] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the embodiments of this application, “one or more” means one, two, or more; “and / or” describes the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.
[0038] To facilitate understanding, some of the terms used in this article are explained below.
[0039] (1) Drift of the measured value of the capacitive sensor: refers to the phenomenon that the measured value of the capacitive sensor changes due to changes in environmental factors such as temperature and humidity.
[0040] To facilitate understanding, the following will be combined with... Figure 1 This paper explains the relationship between the measured values of the built-in capacitive sensors in electronic devices and time.
[0041] like Figure 1 As shown, unworn states 0, 1, 2, 3, and 4 represent stable states where the electronic device is not approached or worn by a human body. Worn states 0, 1, 2, 3, and 4 represent stable states where the electronic device is approached or worn by a human body. In unworn state 0, the measured value of the built-in capacitance sensor is close to 0. In unworn states 1, 2, 3, and 4, the measured values of the built-in capacitance sensor drift due to residual environmental influences from the previous state, such as residual humidity, and are all greater than 50,000.
[0042] As described in the background art, existing baseline tracking algorithms do not update the baseline in wearing state 0, wearing state 1, wearing state 2, and wearing state 3. However, if the wearer is removed from wearing state 0, wearing state 1, wearing state 2, or wearing state 3, the measured value of the capacitive sensor at the initial moment of not wearing state 1, not wearing state 2, not wearing state 3, and not wearing state 4 will increase due to drift. At this time, the difference between the measured value of the capacitive sensor and the baseline is very likely to be greater than a preset threshold, and the electronic device will misjudge the above states as wearing states.
[0043] Therefore, existing methods for identifying wearing status may not be able to detect when the electronic device is not being worn.
[0044] In view of this, this application proposes a method for identifying the wearing status of an electronic device. When the electronic device transitions from a wearing state to an unwearing state, a baseline forced tracking method is used to adjust the current baseline to obtain an updated baseline. Based on the difference between the average value of the current capacitance sensor measurements and the updated baseline, and the relationship with a preset threshold, the current wearing status of the electronic device is identified. Specifically, the method for adjusting the current baseline using the baseline forced tracking method can be as follows:
[0045] The capacitance setting within the touch chip of the electronic device is adjusted until it approaches or equals the capacitance change caused by the external environment, or until all capacitance settings are used up. Adjustment is then stopped, and the final capacitance setting at which adjustment ceases is used as the updated baseline. This method of updating the sensor baseline allows the updated baseline to better compensate for capacitance changes caused by the external environment, thus more accurately identifying the current unworn state of the electronic device and improving user satisfaction.
[0046] Furthermore, when determining the next unworn state after the electronic device is in a wearing state, this application can also employ a baseline correction method to update the baseline in cases where the measured value of the capacitance sensor is low. Specifically, this baseline correction method uses a low-pass filtering approach. The difference between the minimum measured value of the capacitance sensor within a preset time period and the average measured value of the capacitance sensor after power-on calibration is filtered to obtain a correction amount. This correction amount is then added to the existing baseline to obtain the new baseline. This method of updating the sensor baseline also allows the updated baseline to better compensate for capacitance changes caused by the external environment, thus more accurately identifying the current unworn state of the electronic device and improving user satisfaction.
[0047] The following will provide a detailed description of a method for identifying the wearing status of an electronic device provided in the embodiments of this application, in conjunction with specific technical solutions.
[0048] It is understood that the technical solutions provided by the various embodiments disclosed in this application can be applied to various electronic devices, including but not limited to smart headphones. For example, electronic devices can include, but are not limited to, user equipment (UE) and terminals. Examples include mobile phones (including foldable and candybar phones), tablets, desktop computers, handheld computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), portable Android tablets (PADs), personal digital assistants (PDAs), smartwatches, handheld devices with wireless communication capabilities, computing devices, in-vehicle devices or wearable devices, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, and wireless terminals in smart homes. The electronic devices in this application include mobile terminals such as wireless terminals or fixed terminals, and electronic devices such as power banks. The form of the electronic devices is not specifically limited in this embodiment.
[0049] The following is combined Figure 2 , Figure 3 and Figure 4 This application describes a method for identifying the wearing status of an electronic device according to an embodiment of the present application.
[0050] like Figure 2 As shown, a method for recognizing the wearing status of an electronic device may include the following steps:
[0051] S210, calculate the average value of the measured values of the capacitive sensor within a first preset time period.
[0052] In one possible implementation, the capacitive sensor of the electronic device can be set to detect the signal every first time interval, such as 1ms, and then calculate the average value of the capacitive sensor's measurement within a first preset time period, such as from 0ms to 10ms, from 1ms to 11ms, ... from (i)ms to (i+10)ms, where i is a natural number greater than or equal to 0.
[0053] For example, assuming data[n] is the detection value of the capacitive sensor obtained in the nth detection within the first preset time period, and n is a natural number greater than 0, the average value data[avg] of the measured value of the capacitive sensor within the first preset time period can be calculated using formula (1):
[0054] data[avg]=(data[1]+ data[2]+ …+data[n]) / n (1).
[0055] It is understood that the first time interval and the first preset time can be adjusted as needed, and the first time interval and the first preset time are not specifically limited in this embodiment.
[0056] S220, calculate the standard deviation of the measured values within the first preset time period.
[0057] It is understandable that the standard deviation of the measured values within the first preset time period, data[std], can be calculated using formula (2):
[0058] (2).
[0059] S230, determine whether the current state is a stable state. If yes, proceed to step S240; otherwise, proceed to step S210.
[0060] It is understandable that if the absolute value of the current standard deviation is less than the first threshold, it indicates that the current state is a stable state, meaning the electronic device has not been approached or worn by the human body for a long time. Figure 3 The displayed states are: 0 (not worn), 1 (not worn), 2 (not worn), 3 (not worn), and 4 (not worn); or the current state is when the electronic device has been near or worn by a person for an extended period of time, such as... Figure 3 The wearing states shown are 0, 1, 2, and 3.
[0061] It is understood that the specific value of the first threshold can be adjusted as needed. For example, it can be assumed that the value of the first threshold is between 10,000 and 30,000. In this embodiment of the application, the specific value of the first threshold is not specifically limited.
[0062] S240, determine if the previous state was the first state. If yes, proceed to step S250; otherwise, proceed to step S210.
[0063] In one possible implementation, the first state is when the absolute value of the standard deviation is less than a first threshold. This can be understood as follows: during the process of wearing the electronic device, the signal strength increases and the standard deviation is greater than 0; during the process of removing the electronic device, the signal strength decreases. Therefore, the first state is when the electronic device is in the removed state.
[0064] S250 adjusts the baseline using a baseline forced tracking method to obtain an updated baseline.
[0065] It's understandable that if the electronic device was in a detached state in the previous state, for example... Figure 3 The diagram shows the states during the transition from wearing state 0 to not wearing state 1. The current state is not wearing state 1. At this point, using the existing baseline tracking algorithm, since the baseline is no longer updated, the measurement value of the capacitive sensor increases due to drift, which may make it difficult to accurately identify that the current state is not wearing.
[0066] S260 identifies the wearing status based on the updated baseline.
[0067] It is understandable that the wearing status of an electronic device can be identified based on the relationship between the average value of the capacitive sensor measurements within a first preset time period, the difference between the average value and the updated baseline, and a preset threshold. The preset threshold can be a value close to 0. If the difference between the average value of the capacitive sensor measurements within the first preset time period and the updated baseline is less than or equal to the preset threshold, it indicates that the electronic device is not being approached or worn by a person. Conversely, if the difference between the average value of the capacitive sensor measurements within the first preset time period and the updated baseline is greater than the preset threshold, it indicates that the electronic device is being approached or worn by a person.
[0068] In one possible implementation, the baseline can be adjusted using the baseline forced tracking method described in the embodiments of this application. Taking a touch chip in an electronic device used to identify wearing status, including capacitance levels of 1pF, 2pF, 4pF, 8pF, 16pF, 32pF, and 64pF, as an example, this touch chip includes a capacitance sensor. The specific baseline forced tracking method can be as follows: Figure 4 As shown, a method using a binary search approach to gradient-determine the internal capacitance of the touch chip, in order to maximally offset capacitance changes caused by the external environment, may include the following specific steps:
[0069] S251 sets the internal capacitor to one capacitance level of the touch detection chip.
[0070] It is understood that the capacitor level can be one of seven levels, such as 1pF, 2pF, 4pF, 8pF, 16pF, 32pF, and 64pF. For example, the highest capacitor level, 64pF, can be selected as the initial value of the internal capacitor.
[0071] S252, determine if all capacitor ranges have been used. If yes, proceed to step S253; otherwise, proceed to step S254.
[0072] S253 sets the current capacitance level as the final capacitance level for the internal capacitor.
[0073] It is understandable that if all capacitance settings are used, it means that the capacitance value of the internal capacitor is closest to the capacitance change caused by the external environment. In this case, the setting of the internal capacitor can be stopped, and the current capacitance setting can be used as the final capacitance setting of the internal capacitor, that is, the new baseline.
[0074] S254, determine if the chip's ADC data is greater than 0. If yes, proceed to step S255; otherwise, proceed to step S256.
[0075] It can be understood that ADC data is data obtained by scanning the pins of the touch chip. If the ADC data is greater than 0, it means that the capacitance change caused by the external environment is greater than the capacitance value of the internal capacitor. Conversely, it means that the capacitance change caused by the external environment is less than the capacitance value of the internal capacitor. If the ADC data is equal to 0, it means that the capacitance change caused by the external environment is equal to the capacitance value of the internal capacitor.
[0076] In step S255, the internal capacitance is set to the sum of the current capacitance level of the touch chip and the capacitance level one step lower. After step S255 is completed, proceed to step S252.
[0077] It is understandable that if the capacitance change caused by the external environment is greater than the capacitance value of the internal capacitor, the current capacitance level can be used as the sum of the current capacitance level and the next lower capacitance level to update the internal capacitor, and then it can be determined whether all capacitance levels have been used up.
[0078] S256, determine if the chip's ADC data is equal to 0. If yes, proceed to step S257; otherwise, proceed to step S258.
[0079] It is understandable that if the ADC data is equal to 0, it means that the capacitance change caused by the external environment is equal to the internal capacitance. Therefore, the current capacitance can be used as a new baseline to offset the capacitance change caused by the external environment.
[0080] S257 sets the current capacitance level as the final capacitance level for the internal capacitor.
[0081] It is understandable that if the capacitance change caused by the external environment is equal to the internal capacitance, it means that the current capacitance setting is sufficient to offset the capacitance change caused by the external environment. Therefore, the setting of the internal capacitance can be stopped, and the current capacitance setting can be used as the final capacitance setting, that is, the new baseline.
[0082] S258, determine whether the internal capacitor has more than one capacitance setting. If yes, proceed to step S259; otherwise, proceed to step S260.
[0083] S259: Replace the lowest capacitance level in the current capacitance range of the internal capacitors with a capacitance level one level higher. After completing step S259, proceed to step S242.
[0084] It is understandable that if the change in capacitance caused by the external environment is less than that of the internal capacitance, and the internal capacitance has more than one capacitance level, then the internal capacitance can be set to a smaller level. That is, the lowest capacitance level in the current capacitance level of the internal capacitance can be replaced with a capacitance level one level higher than the lowest capacitance level, and then it can be determined whether all capacitance levels have been used up.
[0085] S260, set the internal capacitor to a lower capacitance level than the current capacitance level of the touch chip. After completing step S260, proceed to step S252.
[0086] It is understandable that if the capacitance change caused by the external environment is less than that of the internal capacitance, and the internal capacitance has only one capacitance level, then the internal capacitance can be set to a smaller level, that is, the internal capacitance can be set to a lower capacitance level than the current capacitance level of the touch chip, and then it can be determined whether all capacitance levels have been used up.
[0087] It is understandable that when the ADC data of the touch chip is equal to 0, or when all the capacitance levels of the internal capacitor are used up, the forced tracking of the baseline of the capacitive sensor will terminate. At this time, the internal capacitor can offset the capacitance changes caused by the external environment to the greatest extent.
[0088] In the aforementioned sensor baseline update method, by determining the unworn state of the electronic device after it has been unworn, a baseline forced tracking method is adopted. This allows the updated baseline to better offset capacitance changes caused by the external environment to the greatest extent possible, thereby more accurately identifying the current unworn state of the electronic device and improving user satisfaction.
[0089] In one possible implementation, if the measured value of the capacitive sensor is less than a first preset threshold, for example, less than 50,000, another method for identifying the wearing status of the electronic device can be used to identify the wearing status of the electronic device. In this method, a baseline correction method can be used to update the baseline. The specific steps of this alternative method for identifying the wearing status of the electronic device can be as follows: Figure 5 As shown:
[0090] S510, calculate the average value of the measured values of the capacitive sensor within a second preset time period.
[0091] As in step S210 above, the capacitive sensor of the electronic device can be set to detect the signal once every second time interval, and then the average value of the measured value of the capacitive sensor within the second preset time period can be calculated according to formula (1).
[0092] Similarly, it can be understood that the second time interval and the second preset time can be adjusted as needed. In this embodiment of the application, the second time interval and the second preset time are not specifically limited.
[0093] S520, determine whether the average value is less than the first preset threshold. If yes, proceed to step S530; otherwise, proceed to step S510.
[0094] It is understood that when the average value of the measured value of the capacitive sensor is less than the first preset threshold, the calibration accuracy may be low when the baseline is adjusted by the conventional calibration method. The first preset threshold can be adjusted as needed, and no specific limitation is made to the first preset threshold in this embodiment.
[0095] S530, calculate the standard deviation of the measured values within the second preset time period.
[0096] As in step S220 above, the standard deviation of the measured values within the second preset time period can be calculated using formula (2).
[0097] S540, determine whether the current state is a stable state. If yes, proceed to step S550; otherwise, proceed to step S530.
[0098] As can be understood from step S230 above, if the absolute value of the current standard deviation is less than the second threshold, it indicates that the current state is a stable state, that is, the current state is that the electronic device has not been approached or worn by the human body for a long time.
[0099] It is understood that the specific value of the second threshold can be adjusted as needed. For example, it can be assumed that the value of the second threshold is between 10,000 and 20,000. In this embodiment of the application, the specific value of the second threshold is not specifically limited.
[0100] S550, determine if the previous state was the first state. If yes, proceed to step S560; otherwise, proceed to step S530.
[0101] As explained in step S240 above, the first state is when the absolute value of the standard deviation is less than the first threshold. During the process of the electronic device being worn, the signal strength increases and the standard deviation is greater than 0. During the process of the electronic device being unworn, the signal strength decreases; that is, the first state is when the electronic device is in the unworn state.
[0102] S560 uses a baseline correction method to adjust the baseline and obtain a new baseline.
[0103] The specific baseline correction methods are described in detail below.
[0104] S570 identifies wearing status based on a new baseline.
[0105] It is understandable that the current wearing status of an electronic device can be identified based on the relationship between the average value of the capacitive sensor measurements within a second preset time period, the difference between this difference and the new baseline, and a preset threshold. The preset threshold can be a value close to 0. If the difference between the average value of the capacitive sensor measurements within the second preset time period and the updated baseline is less than or equal to the preset threshold, it indicates that the electronic device is not being approached or worn by a person. Conversely, if the difference between the average value of the capacitive sensor measurements within the second preset time period and the updated baseline is greater than the preset threshold, it indicates that the electronic device is being approached or worn by a person.
[0106] Specific baseline correction methods can be as follows: Figure 6 As shown, the specific steps are as follows:
[0107] S610, calculate the minimum value of the measured value of the capacitive sensor within a third preset time period.
[0108] It is understood that the specific value of the third preset time can be adjusted as needed, and the specific value of the third preset time is not specifically limited in this embodiment.
[0109] S620 calculates the average value of the capacitance sensor measurements within the fourth preset time period after power-on calibration.
[0110] It is understood that baseline calibration will be automatically performed after the electronic device is powered on. The specific value of the third preset time can be adjusted as needed, and the specific value of the third preset time is not specifically limited in this embodiment.
[0111] S630 calculates the difference between the minimum and the average value.
[0112] S640 performs low-pass filtering on the difference to obtain the correction amount.
[0113] It is understandable that the correction amount can be obtained using formula (3), which is:
[0114] Raw_offset(n)=(1-coef)*Raw_offset(n-1)+coef*delta (3).
[0115] Where Raw_offset(n) is the nth correction amount, n is a natural number greater than or equal to 1, and Raw_offset(0) is equal to 0, coef is an adjustment coefficient greater than or equal to 0 and less than or equal to 1, and delta is the difference.
[0116] S640 updates the baseline using correction values.
[0117] It is understandable that the new baseline is the value of the current baseline plus the correction amount.
[0118] In the above-mentioned method for identifying the wearing status of a device, if the measured value of the capacitive sensor is small, a baseline correction method is used to update the existing baseline after determining that the electronic device is in the unworn state following the unworn state, so as to more accurately identify the current unworn state of the electronic device and improve user satisfaction.
[0119] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0120] Figure 7 According to some embodiments of this application, taking a smart headset as an example of an electronic device, a structural diagram of a smart headset 100 is shown. Figure 7 As shown, the smart earphone 100 may include a processor 110, a wireless communication module 120, an interface module 130, a power module 140, a microphone 150, a speaker 160, and a sensor module 170.
[0121] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. Processor 110 may also include memory. The memory may be used to store computer executable program code, including instructions.
[0122] The wireless communication module 120 can provide wireless communication solutions for use on the smart earphone 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0123] The interface module 130 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the smart earphone 100. The external storage card communicates with the processor 110 through the interface module 130 to achieve data storage functionality.
[0124] The power module 140 receives input from the battery and supplies power to the processor 110, memory 120, etc.
[0125] Microphone 150, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 150, inputting the sound signal into microphone 150. Multiple microphones 150 can be installed on the smart headset 100.
[0126] The loudspeaker 160, also known as a "speaker", is used to convert audio electrical signals into sound signals.
[0127] The sensor module 170 includes at least a touch / in-ear sensor 171, used to collect measurement values and determine whether the smart earphone 100 is being worn in the ear by a user based on the change in the measurement values, or to collect measurement values and send them to the processor 110, whereby the processor 110 determines the change and whether the smart earphone 100 is being worn in the ear by a user. The touch / in-ear sensor 171 will be referred to as a touch sensor for illustrative purposes.
[0128] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the smart earphone 100. In other embodiments of this application, the smart earphone 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0129] It will be apparent to those skilled in the art that some of the specific details presented above regarding the smart headset 100 may not be necessary for practicing the particular embodiments described herein or their equivalents. Similarly, other smart headsets 100 may include a greater number of subsystems, modules, components, etc. Where appropriate, some submodules may be implemented as software or hardware. Therefore, it should be understood that the foregoing description is not intended to be exhaustive or to limit this disclosure to the precise forms set forth herein. Rather, it will be apparent to those skilled in the art that many modifications and variations are possible in light of the foregoing teachings.
[0130] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0131] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0132] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0133] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0134] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0135] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.
[0136] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0137] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.
Claims
1. A method for recognizing the wearing status of an electronic device, characterized in that, include: The current electronic device is determined to be in a stable state after being unworn; Determine a first baseline that matches the capacitance of the external environment of the electronic device; Based on the first baseline and the current capacitance measurement of the electronic device, the wearing status of the electronic device is determined; The determination of a first baseline that matches the capacitance of the external environment of the electronic device includes: If the current capacitance measurement value of the electronic device is less than the first preset threshold, calculate the minimum value of the capacitance sensor measurement value within the third preset time period; Calculate the average value of the measured values of the capacitive sensor within the fourth preset time period after power-on calibration; Calculate the difference between the minimum value and the average value; The difference is subjected to a first-order low-pass filter to obtain the correction amount; The updated baseline is determined based on the sum of the correction amount and the original baseline.
2. The method according to claim 1, characterized in that, The method for determining the current wearing state of the electronic device as a stable state after being unworn includes: Calculate the average value of the measured values of the capacitive sensor within a first preset time period; Calculate the standard deviation of the measured values within a first preset time period; Based on the standard deviation, determine whether the current state is a stable state; If the current state is determined to be a stable state, then determine whether the previous state was the first state; If the previous state is determined to be the first state, then the current state is determined to be the unworn state after the unworn state.
3. The method according to claim 2, characterized in that, The method for determining whether the current state is a stable state is as follows: If the absolute value of the standard deviation is less than the first threshold, it indicates that the current state is a stable state.
4. The method according to claim 2, characterized in that, The first state is when the electronic device is in a state of being unworn.
5. The method according to claim 1, characterized in that, The method for determining the first baseline that matches the capacitance of the external environment of the electronic device is as follows: The internal capacitance of the electronic device is set according to the capacitance level of the touch chip using a binary search method. If all the capacitance levels of the touch chip are used up, the current capacitance level will be used as the final capacitance level of the internal capacitor. or If the ADC data of the touch chip is equal to 0, then the capacitance change caused by the external environment is equal to the capacitance value of the internal capacitor, and the current capacitance level is taken as the final capacitance level of the internal capacitor.
6. The method according to claim 1, characterized in that, The method for determining the wearing status of the electronic device based on the first baseline and the current capacitance measurement value of the electronic device is as follows: If the difference between the current capacitance measurement of the electronic device and the first baseline is less than or equal to the first threshold, then the wearing state of the electronic device is determined to be an unworn state. If the difference between the current capacitance measurement of the electronic device and the first baseline is greater than the first threshold, then the electronic device is determined to be in a wearing state.
7. The method according to claim 1, characterized in that, The method for obtaining the correction amount by performing low-pass filtering on the difference is as follows: The correction amount is obtained using a low-pass filter formula; The low-pass filter formula is as follows: Raw_offset(n)=(1-coef)*Raw_offset(n-1)+coef*delta; Where Raw_offset(n) is the nth correction amount, n is a natural number greater than or equal to 1, and Raw_offset(0) is equal to 0, coef is an adjustment coefficient greater than or equal to 0 and less than or equal to 1, and delta is the difference.
8. A device for recognizing the wearing status of an electronic device, applied to an electronic device, characterized in that, include: The first determining module is used to determine that the current wearing state of the electronic device is a stable state after being unworn. The second determining module is used to determine a first baseline that matches the capacitance of the external environment of the electronic device. The third determining module is used to determine the wearing status of the electronic device based on the first baseline and the current capacitance measurement value of the electronic device; The determination of a first baseline that matches the capacitance of the external environment of the electronic device includes: If the current capacitance measurement value of the electronic device is less than the first preset threshold, calculate the minimum value of the capacitance sensor measurement value within the third preset time period; Calculate the average value of the measured values of the capacitive sensor within the fourth preset time period after power-on calibration; Calculate the difference between the minimum value and the average value; The difference is subjected to a first-order low-pass filter to obtain the correction amount; The updated baseline is determined based on the sum of the correction amount and the original baseline.
9. A readable storage medium, characterized in that, The readable storage medium includes instructions that, when executed by an electronic device, cause the electronic device to perform the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Capacitive touch screen and self-adaptation correction method and system of capacitive touch screen
CN103488364A
Touch detection device and touch detection method
CN107104672A
Equipment wearing detection method and device, equipment and readable storage medium
CN110737026A