Sedentariness detection method and device, earphone, storage medium and program product
By comprehensively utilizing the sensors in the headphones to detect changes in the user's posture angle and height, and combining this with physiological characteristic data, the system accurately determines whether the user is in a sedentary state, solving the problem of low detection accuracy in existing technologies and enabling timely sedentary reminders and health prevention.
Patent Information
- Application Number
- CN202511596792.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-03-03
AI Technical Summary
Existing methods for detecting sedentary behavior have low accuracy and cannot effectively identify a user's sedentary state.
By acquiring the amplitude of the user's head posture angle change and the height change of the headphones, and combining multiple sensors (such as inertial measurement unit, barometer, microphone, heart rate sensor, body temperature sensor) for comprehensive detection, it is determined whether the user is in a sitting state, and whether it is a prolonged sitting state is determined by the duration.
It improves the accuracy of sedentary detection, avoids false detections of seated states, ensures accurate judgment of sedentary status, and can promptly remind users to get up and move around to prevent health problems.
Smart Images

Figure CN121587709A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wearable device technology, and in particular to a sedentary detection method, device, earphone, storage medium, and program product. Background Technology
[0002] Currently, users may engage in prolonged sitting while working, studying, or playing due to their focused attention. However, prolonged sitting can lead to a state of low metabolism and low activity, potentially causing health problems. Therefore, it is necessary to monitor users' sedentary behavior and remind them to get up and move around in a timely manner.
[0003] However, current methods for detecting sedentary behavior may have issues with low accuracy. Summary of the Invention
[0004] Therefore, it is necessary to provide a sedentary detection method, device, earphone, storage medium, and program product that can improve the accuracy of sedentary detection in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for detecting sedentary behavior, the method being applied to headphones, the method comprising:
[0006] The amplitude of the change in the user's head posture angle and the change in the height of the headphones are obtained;
[0007] If the change in posture angle and the change in height meet the first preset condition, it is determined that the user is in a seated state.
[0008] Based on the first duration of the user's sitting state, it is determined whether the user is in a prolonged sitting state.
[0009] In one embodiment, the method further includes:
[0010] If the attitude angle change amplitude is less than a first amplitude threshold and the second duration of the value is less than a preset amplitude threshold is greater than a first preset duration, and the altitude change value is less than a preset altitude threshold and the third duration of the value is less than a preset altitude threshold is greater than a second preset duration, then the attitude angle change amplitude and the altitude change value satisfy the first preset condition.
[0011] In one embodiment, determining that the attitude angle change amplitude value and the height change value satisfy the first preset condition when the second duration of the attitude angle change amplitude value is less than a first amplitude threshold and less than a preset amplitude threshold is greater than a first preset duration, and the height change value is less than a preset height threshold and less than a third duration of the preset height threshold is greater than a second preset duration, includes:
[0012] If the attitude angle change amplitude is less than a first amplitude threshold and the second duration of the value is less than a preset amplitude threshold is greater than the first preset duration, and the height change value is less than a preset height threshold and the third duration of the value is less than a preset height threshold is greater than the second preset duration, then if the attitude angle change amplitude is less than the second amplitude threshold and the user is in a silent state, it is determined that the attitude angle change amplitude and the height change value satisfy the first preset condition; the first amplitude threshold is greater than the second amplitude threshold.
[0013] In one embodiment, the method further includes:
[0014] Acquire voice data;
[0015] Based on the voice data and noise threshold, the user's voice is determined;
[0016] If the audio energy of the user's voice is less than the fourth duration of the preset energy threshold but greater than the third preset duration, then it is determined that the user is in a non-speaking state.
[0017] In one embodiment, the method further includes:
[0018] If the pitch angle variance, roll angle variance, and yaw angle variance of the user's head are all less than the first preset angle value, then it is determined that the attitude angle change amplitude value is less than the first amplitude threshold.
[0019] In one embodiment, determining whether the user is in a prolonged sitting state based on a first duration of the user being in a seated state includes:
[0020] If the first duration is longer than the fourth preset duration, then it is determined that the user is in a sedentary state.
[0021] In one embodiment, determining whether the user is in a prolonged sitting state based on a first duration of the user being in a seated state includes:
[0022] Acquire the user's physiological characteristic data; the physiological characteristic data includes heart rate data and / or body temperature data;
[0023] If the first duration and the physiological characteristic data meet the second preset condition, it is determined that the user is in a sedentary state.
[0024] In one embodiment, the second preset condition includes any one of the following:
[0025] The first duration is greater than the fourth preset duration and the heart rate data is less than the preset heart rate value;
[0026] The first duration is greater than the fourth preset duration and the body temperature data is less than the preset temperature value;
[0027] The first duration is greater than the fourth preset duration, the heart rate data is less than the preset heart rate value, and the body temperature data is less than the preset temperature value.
[0028] In one embodiment, obtaining the magnitude of the change in the user's head posture angle and the change in the height of the headphones includes:
[0029] The capacitive sensor of the earphone is used to determine whether the earphone is in a stable wearing state;
[0030] Once it is determined that the headphones are in a stable wearing state, the amplitude of the attitude angle change and the height change value are obtained.
[0031] In one embodiment, determining whether the headphones are in a stable wearing state using the capacitive sensor of the headphones includes:
[0032] Using the capacitance sensor, the first capacitance value of the inner electrode of the earphone and the second capacitance value of the outer electrode of the earphone are detected.
[0033] Calculate the mean and variance of the first capacitance value;
[0034] If the mean is greater than a first preset threshold, the variance is less than a second preset threshold, and the second capacitance value is less than a third preset threshold, then the headphones are determined to be in a stable wearing state.
[0035] In one embodiment, the method further includes:
[0036] Once it is determined that the earphone is in a stable wearing state, a control command is sent to the multi-fusion sensor in the earphone; the control command is used to instruct the multi-fusion sensor to switch to a working mode; the multi-fusion sensor includes at least one of a heart rate sensor, a body temperature sensor, a microphone, an inertial measurement unit, and a barometer.
[0037] In one embodiment, the method further includes:
[0038] If it is determined that the user is in a sedentary state, a reminder message is output according to a preset prompting method.
[0039] Secondly, this application also provides a sedentary detection device, which is applied to headphones, and the device includes:
[0040] The acquisition module is used to acquire the amplitude value of the user's head posture angle change and the height change value of the earphone;
[0041] The first determining module is used to determine that the user is in a sitting state when the change in posture angle and the change in height meet a first preset condition.
[0042] The second determining module is used to determine whether the user is in a prolonged sitting state based on a first duration of the user being in a sitting state.
[0043] Thirdly, this application also provides an earphone, including multiple fusion sensors, a memory, and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0044] The amplitude of the change in the user's head posture angle and the change in the height of the headphones are obtained;
[0045] If the change in posture angle and the change in height meet the first preset condition, it is determined that the user is in a seated state.
[0046] Based on the first duration of the user's sitting state, it is determined whether the user is in a prolonged sitting state.
[0047] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0048] The amplitude of the change in the user's head posture angle and the change in the height of the headphones are obtained;
[0049] If the change in posture angle and the change in height meet the first preset condition, it is determined that the user is in a seated state.
[0050] Based on the first duration of the user's sitting state, it is determined whether the user is in a prolonged sitting state.
[0051] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0052] The amplitude of the change in the user's head posture angle and the change in the height of the headphones are obtained;
[0053] If the change in posture angle and the change in height meet the first preset condition, it is determined that the user is in a seated state.
[0054] Based on the first duration of the user's sitting state, it is determined whether the user is in a prolonged sitting state.
[0055] The aforementioned sedentary detection method, device, earphone, storage medium, and program product, by acquiring the amplitude value of the user's head posture angle change and the earphone height change value, can determine whether the user is in a static posture using the amplitude value of the user's head posture angle change and whether the earphone height is relatively stable using the earphone height change value. Thus, when the amplitude value of the user's head posture angle change and the earphone height change value meet a first preset condition, it is determined that the user is in a sedentary state, avoiding false detection of the user being in a sedentary state and ensuring the accuracy of determining whether the user is in a sedentary state. Furthermore, based on a first duration of the user being in a sedentary state, it can accurately determine whether the user is in a prolonged sedentary state, ensuring the accuracy of the determined user's prolonged sedentary state. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a schematic diagram of the headphones in one embodiment;
[0058] Figure 2 This is a flowchart illustrating a sedentary detection method in one embodiment;
[0059] Figure 3 This is a flowchart illustrating a sedentary detection method in another embodiment;
[0060] Figure 4 This is a flowchart illustrating a sedentary detection method in another embodiment;
[0061] Figure 5 This is a flowchart illustrating a sedentary detection method in another embodiment;
[0062] Figure 6 This is a flowchart illustrating a sedentary detection method in another embodiment;
[0063] Figure 7 This is a structural block diagram of a sedentary detection device in one embodiment;
[0064] Figure 8 This is a diagram of the internal structure of the headphones in one embodiment. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0067] The sedentary detection method provided in this application embodiment can be applied to, for example... Figure 1 The example headphones may include sensors such as a capacitive sensor, an inertial measurement unit, a barometer, a microphone, a heart rate sensor, and a body temperature sensor. It should be noted that... Figure 1 The example shown is a true wireless stereo headset. The sedentary detection method of this application embodiment can also be applied to other types of headsets, such as over-ear headphones, open wearable stereo (OWS) headsets, neckband headphones, etc. This application does not limit the type of headset to which the sedentary detection method is applied. Headsets with the above-mentioned multi-fusion sensors can all be used to implement the sedentary detection method proposed in this application.
[0068] In one exemplary embodiment, such as Figure 2 As shown, a method for detecting sedentary behavior is provided, which can be applied to... Figure 1 Taking the headphones as an example, the explanation includes the following steps:
[0069] S201, obtain the amplitude value of the user's head posture angle change and the height change value of the headphones.
[0070] The user's head attitude angle can include at least one of the user's head pitch angle, roll angle, and yaw angle. For example, in this embodiment, the user's head attitude angle can be obtained using an inertial measurement unit (IMU) integrated with a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer in the headset. It is understood that the magnitude of the change in the user's head attitude angle can be the vector difference between the user's current head attitude angle and the attitude angle at the previous moment.
[0071] Additionally, it should be noted that the IMU, as the core of the seated state detection, has a data acquisition and processing flow that includes: 1) Data acquisition: The accelerometer and gyroscope sample synchronously at a frequency of 100Hz, and the magnetometer samples at a frequency of 20Hz. All data is transmitted to the headphone's microcontroller unit (MCU) via the I²C interface. 2) Data filtering: A third-order Butterworth low-pass filter is used to process the acceleration and angular velocity signals, with a cutoff frequency set to 15Hz to effectively remove high-frequency noise. A third-order median filter is used to remove glitches and noise from the signal while preserving edge information and detail features. 3) Gravity separation: The acceleration signal is low-pass filtered with a cutoff frequency of 0.1Hz to separate the gravitational acceleration components (Ga_x, Ga_y, Ga_z). The gravitational components are then subtracted from the original acceleration to obtain the linear acceleration components (Ba_x, Ba_y, Ba_z), resulting in pure motion acceleration. 4) Temperature compensation: A temperature compensation algorithm based on PID control is adopted. The temperature sensor monitors the temperature change of the IMU in real time and corrects the zero bias and proportional factor in real time to reduce the impact of temperature drift.
[0072] For example, in this embodiment, the barometer in the earphone can be used to measure the air pressure value of the earphone at the current moment and the air pressure value of the earphone at the previous moment, calculate the air pressure difference between the two air pressure values, and then convert the air pressure difference data between the two moments into an altitude change value to obtain the altitude change value of the earphone.
[0073] In this embodiment, a barometer can be used to detect changes in the height of the headphones to distinguish between a user's sitting and standing posture. For example, the barometer can sample air pressure data at a frequency of 10Hz and smooth it using a 64-point moving average filter to reduce the impact of instantaneous fluctuations. Additionally, a support vector regression (SVR) model can be used to compensate for temperature variations in other values collected by the barometer. For example, the compensation model can be based on the formula shown below. In the formula The compensated air pressure value. This is the original air pressure value. The current temperature. For reference temperature (e.g., ), and The barometer is used as a parameter. In this embodiment, the barometer can be used to calculate the relative altitude of the headphones using an international standard atmospheric model.
[0074] As an optional implementation, the sampling rates of the IMU and barometer can be dynamically adjusted according to the user's activity intensity. For example, when the user is at a low activity intensity, the sampling rate of the IMU can be reduced to 25Hz and the sampling rate of the barometer can be reduced to 1Hz; when the user is at a high activity intensity, the sampling rate of the IMU can be increased to 100Hz and the sampling rate of the barometer can be increased to 10Hz.
[0075] S202, if the change in attitude angle and the change in height meet the first preset condition, determine that the user is in a seated state.
[0076] For example, in this embodiment, if the amplitude of the change in posture angle is less than a first amplitude threshold and the duration of the change in posture angle being less than the first amplitude threshold is greater than a first preset duration, and the change in the height of the headphones is less than a preset height threshold and the duration of the change in the height of the headphones being less than the preset height threshold is greater than a second preset duration, it can be determined that the amplitude of the change in posture angle of the user's head and the change in the height of the headphones satisfy the first preset condition. At this time, it can be determined that the user is in a sitting state.
[0077] As an optional implementation, the headphones can record the user's initial height when standing as a reference, and determine a preset height threshold based on the user's initial height when standing. For example, when the headphones detect a drop in height of more than 0.3 meters and remain stable (fluctuation range less than ±0.1 meters, lasting for 10 seconds), it can be determined that the user is in a sitting position.
[0078] It is understandable that when determining whether a user is in a seated state, the simultaneous satisfaction of static posture and height stability is an important condition for determining whether a user is in a seated state. In this embodiment, as an optional implementation method, the IMU and barometer in the earphone can simultaneously enter the working state and collect the corresponding data. Then, when determining whether the change in posture angle and the change in height meet the first preset condition, the first preset duration and the second preset duration can be the same preset duration.
[0079] As an example, when the user's head attitude angles include pitch, roll, and yaw, the attitude angle change amplitude can be determined to be less than a first amplitude threshold if the variances of the pitch, roll, and yaw angles are all less than a first preset angle value. For example, the preset angle value in this embodiment can be... , , This embodiment does not impose any limitations. It is understood that the smaller the preset angle value, the more accurate the result of the determined attitude angle change amplitude value being less than the first amplitude threshold.
[0080] Furthermore, to avoid misjudging a user sitting down but speaking or exhibiting slight head movements (such as nodding or shaking) as a seated state, high-frequency data analysis from the IMU can be used to detect regular, subtle movements (such as slight head movements while typing). The microphone can then be used to determine if the user is speaking. If slight head movements or speaking are detected, the user is not seated. As an optional implementation, in this embodiment, if the amplitude of the user's head posture angle change is less than a first amplitude threshold, and the duration of this value is greater than a first preset duration, and the earphone height change is less than a preset height threshold, and the duration of this value is greater than a second preset duration, then if the amplitude of the user's head posture angle change is less than the second amplitude threshold, and the user is not speaking, then the amplitude of the user's head posture angle change and the earphone height change satisfy the aforementioned first preset condition. Wherein, the first amplitude threshold is greater than the second amplitude threshold. Correspondingly, when the user's head attitude angle includes pitch, roll, and yaw angles, the attitude angle change amplitude can be determined to be less than the second amplitude threshold if the variances of the pitch, roll, and yaw angles are all less than the second preset angle value. It is understood that if the first amplitude threshold is greater than the second amplitude threshold, then the first preset angle value can also be greater than the second preset angle value. For example, in this embodiment, the preset angle value can be... , , Alternatively, it could be any other angle value less than the first preset angle value; this embodiment does not impose any restrictions on this.
[0081] S203, based on the first duration of the user's sitting state, determine whether the user is in a prolonged sitting state.
[0082] In this embodiment, the headphones can determine whether the user is in a sedentary state based on a first duration of stillness. Alternatively, the headphones can combine other sensors to collect the user's physiological characteristic data and combine the first duration of stillness with the physiological characteristic data to determine whether the user is in a sedentary state. The following will explain two specific implementation methods for determining whether a user is in a sedentary state.
[0083] Method 1, S203 above, includes:
[0084] Step A: If the first duration is longer than the fourth preset duration, then it is determined that the user is in a sedentary state.
[0085] The fourth preset duration can be a pre-set duration, determined based on the user's lifestyle and work habits. For example, the fourth preset duration could be 30 minutes, 40 minutes, etc. In this embodiment, if the headphones determine that the first duration of the user's seated state is longer than the preset fourth preset duration, then the user can be determined to be in a prolonged seated state.
[0086] Method 2, such as Figure 3 As shown, the above S203 includes:
[0087] S301, acquire the user's physiological characteristic data; the physiological characteristic data includes heart rate data and / or body temperature data.
[0088] It is understandable that prolonged sitting may cause a slowing of the heart rate and a slight drop in body temperature. To ensure the accuracy of sedentary detection, data monitored by heart rate and / or body temperature sensors can be used to assist in the judgment.
[0089] In this embodiment, the heart rate sensor in the earphone can be used to collect the user's heart rate data, and the body temperature sensor in the earphone can be used to collect the user's body temperature data. As an example, the heart rate sensor in this embodiment can be an optical heart rate sensor, which can use a green LED (537nm) and an infrared LED (850nm), and support ambient light suppression function, for monitoring heart rate and blood oxygen saturation.
[0090] S302, if the first duration and physiological characteristic data meet the second preset conditions, determine that the user is in a sedentary state.
[0091] The user's physiological characteristic data includes heart rate data and / or body temperature data. As an optional implementation, in this embodiment, the user's first duration of sitting still, heart rate data, and / or body temperature data can be combined to determine whether the user is in a prolonged sitting state. For example, the second preset condition in this embodiment may include any of the following:
[0092] 1) The first duration is longer than the fourth preset duration and the heart rate data is less than the preset heart rate value.
[0093] It is understandable that prolonged sitting may lead to a slowed heart rate. In this embodiment, as an optional implementation method, the first duration of the user's sitting state can be combined with the user's heart rate data to determine the state of prolonged sitting. If the first duration of the user's sitting state is greater than a fourth preset duration and the heart rate data is less than a preset heart rate value, then it is determined that the user is in a state of prolonged sitting.
[0094] 2) The first duration is longer than the fourth preset duration and the body temperature data is less than the preset temperature value.
[0095] In addition, prolonged sitting may cause a slight decrease in body temperature. In this embodiment, as another optional implementation, the first duration of the user's sitting state can be combined with the user's body temperature data to determine the prolonged sitting state. If the first duration of the user's sitting state is greater than a fourth preset duration and the body temperature data is less than a preset temperature value, then it is determined that the user is in a prolonged sitting state.
[0096] 3) The first duration is longer than the third preset duration, the heart rate data is less than the preset heart rate value, and the body temperature data is less than the preset temperature value.
[0097] In some scenarios, to more accurately determine whether a user is in a sedentary state, the initial duration of the user's sedentary state can be combined with the user's body temperature and heart rate data to determine the sedentary state. If the initial duration of the user's sedentary state is greater than a fourth preset duration, the heart rate data is less than a preset heart rate value, and the body temperature data is less than a preset temperature value, then the user is determined to be in a sedentary state.
[0098] In addition, in this embodiment, it should be noted that the preset heart rate value and preset temperature value can be determined by combining the heart rate value and temperature value collected by the user in a sedentary state during a historical period. For example, the heart rate value collected by the user in a sedentary state during a historical period can be determined as the preset heart rate value, and the temperature value collected by the user in a sedentary state during a historical period can be determined as the preset temperature value; or, the difference between the collected heart rate value and the heart rate threshold can be determined as the preset heart rate value, and the difference between the collected temperature value and the temperature threshold can be determined as the preset temperature value.
[0099] In the aforementioned sedentary detection method, by acquiring the amplitude value of the user's head posture angle change and the height change value of the headphones, it is possible to determine whether the user is in a static posture using the amplitude value of the user's head posture angle change and whether the height of the headphones is relatively stable using the height change value. Thus, if the amplitude value of the user's head posture angle change and the height change value of the headphones meet the first preset condition, it is determined that the user is in a sedentary state, avoiding false detection of the user being in a sedentary state and ensuring the accuracy of determining whether the user is in a sedentary state. Furthermore, based on the first duration of the user being in a sedentary state, it is possible to accurately determine whether the user is in a sedentary state, ensuring the accuracy of the determined user's sedentary state.
[0100] This embodiment will explain in detail the method for determining whether a user is speaking. In an exemplary embodiment, such as... Figure 4 As shown, the above method also includes:
[0101] S401, acquire voice data.
[0102] S402 determines the user's voice based on voice data and noise thresholds.
[0103] S403, if the audio energy of the user's voice is less than the fourth duration of the preset energy threshold but greater than the third preset duration, then it is determined that the user is in a non-speaking state.
[0104] In this embodiment, a microphone in the headset can be used to collect voice data. Then, using a Voice Activity Detection (VAD) algorithm, based on the collected voice data and a noise threshold, the user's voice is determined, along with its audio energy and zero-crossing rate. For example, when the audio energy continuously exceeds a preset energy threshold (e.g., 200ms) and the zero-crossing rate is below the threshold, voice activity is determined to have started; when the audio energy is below the preset energy threshold for 1 second, voice activity is determined to have ended. Therefore, if the fourth duration of the user's voice audio energy being less than the preset energy threshold is greater than the third preset duration, it can be determined that the user is not speaking.
[0105] Furthermore, in this embodiment, it should be noted that the noise threshold can be automatically adjusted according to the ambient noise level using a dynamic threshold update algorithm. For example, the calculation formula for the dynamic threshold update algorithm can be: In the formula, The current noise threshold, The mean of the background noise. It is a forgetting factor.
[0106] In this embodiment, voice data can be collected by reusing the microphone in the headset without adding other additional acquisition devices, thus reducing the cost of the headset. Based on the voice data and noise threshold, the user's voice can be accurately determined. Therefore, based on the user's voice with high accuracy, if the audio energy of the user's voice is less than the fourth duration of the preset energy threshold is greater than the third preset duration, it can be determined that the user is not speaking, thus ensuring the accuracy of determining whether the user is speaking.
[0107] In some scenarios, user sedentary behavior can be detected when the headphones are in a stable wearing state, preventing other sensors from accidentally activating sedentary detection when the headphones are not in use or are held in hand, thus saving the headphones' power consumption. In an exemplary embodiment, such as Figure 5 As shown, the above S201 includes:
[0108] The S501 uses the headphone's capacitive sensor to determine whether the headphone is in a stable wearing state.
[0109] For example, in this embodiment, the inner electrode of the earphone's capacitance sensor detects contact with the ear canal skin, while the outer electrode detects contact with external objects (such as a hand). The capacitance value detected by the inner electrode is determined as the first capacitance value, and the capacitance value detected by the outer electrode is determined as the second capacitance value. Then, a smoothing filtering algorithm (exponential weighted moving average method) is used to process the detected capacitance values. Afterward, the mean and variance of the first capacitance value are calculated. If the mean of the first capacitance value is greater than a first preset threshold, the variance of the first capacitance value is less than a second preset threshold, and the second capacitance value is less than a third preset threshold, the earphone is determined to be in a stable wearing state. In other words, when the inner side of the earphone is in stable contact with the ear canal, and there is no continuous abnormal contact on the outer side, the earphone is determined to be in a stable wearing state.
[0110] S502, under the condition that the headphones are in a stable wearing state, obtains the value of the change in posture angle and the value of the change in height.
[0111] In this embodiment, when it is determined that the earphone is in a stable wearing state, control commands can be sent to the earphone's IMU and barometer to instruct the earphone's IMU and barometer to switch to working mode. The IMU is used to detect the user's head posture angle to determine the magnitude of the change in the user's head posture angle, and the barometer is used to detect the change in the earphone's height to determine the change in the earphone's height.
[0112] In this embodiment, as an optional implementation, when it is determined that the headphones are in a stable wearing state, in order to obtain the data required for sedentary detection, a control command can be sent to at least one of the heart rate sensor, body temperature sensor, and microphone in the headphones to instruct at least one of the sensors to switch to working mode. Additionally, it should be noted that in the sedentary detection scenario, the heart rate sensor operates in intermittent mode, and the microphone operates in VAD mode.
[0113] Understandably, in this embodiment, when the headphones are determined to be in a stable wearing state, a control command is sent to at least one of the IMU, barometer, heart rate sensor, body temperature sensor, and microphone in the headphones, instructing at least one of the sensors to switch to working mode. This avoids the headphones accidentally activating other sensors to collect data when not in use or when held in hand, saving the headphones' power consumption. Simultaneously, it ensures that when the headphones are determined to be in a stable wearing state, data for sedentary detection can be collected promptly using the sensors in working mode, ensuring the timeliness of sedentary detection. Table 1 shows a comparison of the sensor modes in the headphones under different states. As can be seen from the examples in Table 1, during wear detection, the headphones' IMU is in low-power mode, and the barometer, heart rate sensor, and microphone are off. In posture monitoring mode, the IMU is in normal mode, the barometer is in low-power mode, and the heart rate sensor and microphone are off. In sedentary monitoring mode, the heart rate sensor and microphone also switch to working mode. When the headphones are in different states, the collaboration between sensors can be utilized to wake up high-power sensors using low-power sensors. For example, when a capacitive sensor detects a wearing event, it can wake up the IMU and barometer, controlling the multiple fused sensors in the headphones to be in different states. This can greatly save the power consumption of the headphones and improve their battery life.
[0114] Table 1
[0115] Headphone status IMU barometer Heart rate sensor microphone Total power consumption hibernation closure closure closure closure 5μA Wearing detection Low power mode closure closure closure 50μA Attitude monitoring Normal mode Low power mode closure closure 900μA Sedentary monitoring Normal mode Normal mode Intermittent mode VAD mode 1.5mA Full-feature mode Normal mode Normal mode Continuous mode Normal mode 8.5mA
[0116] In this embodiment, the capacitive sensor of the earphone can accurately detect whether the earphone is in a stable wearing state. Thus, when it is determined that the earphone is in a stable wearing state, the earphone's IMU and barometer can be switched to working mode. The IMU is used to collect the user's head posture angle information, and the earphone's barometer is used to collect the earphone's height value. This yields the amplitude of the change in the user's head posture angle and the change in the earphone's height. This avoids the earphone from accidentally activating other sensors to collect data when it is not in use or when it is held in hand, thus saving the earphone's power consumption.
[0117] In some scenarios, after determining that a user is in a sedentary state, the user can be promptly reminded. In an exemplary embodiment, the above method further includes:
[0118] Step B: If it is determined that the user is in a sedentary state, output a reminder message according to the preset prompt method.
[0119] In this embodiment, when it is determined that the user is in a sedentary state, the user can be reminded by the headphones themselves, or by other electronic devices connected to the headphones. That is to say, the preset reminder methods in this embodiment can include reminders by the headphones themselves and / or reminders by other electronic devices connected to the headphones. The different reminder methods will be explained below:
[0120] Method 1: Reminding the user through the headphones themselves. For example, when reminding the user through the headphones, if it is determined that the user is in a sedentary state, the headphones can be controlled to vibrate slightly or output a soft prompting tone, along with a notification message. If, after outputting the notification message, the IMU determines that the user does not get up and does not respond to the notification message, the headphone vibration can be increased or a stronger notification tone can be output to remind the user. As an example, the notification content can be generated based on the user's physiological data; for example, the notification tone could be, "You have been sitting for 1 hour, your heart rate has dropped, we suggest you get up and move around."
[0121] Method 2: Notify the user via other electronic devices connected to the headphones. As an optional implementation, the headphones can connect to other electronic devices via Bluetooth. When the headphones detect that the user is in a sedentary state, they can send this information to the other electronic devices via Bluetooth. These other electronic devices can then output a reminder message to the user, such as displaying the message on their screens, suggesting the user get up and move around. Furthermore, as an optional implementation, the wireless communication between the headphones and other electronic devices can be optimized using any of the following methods: 1) Employ connection interval extension technology to extend the Bluetooth connection interval to 500ms when there is no data transmission, reducing communication power consumption. 2) Store data collected by multiple sensors in the headphones locally first, then transmit it to other electronic devices in batches, reducing the number of Bluetooth activations. 3) Dynamically adjust the Bluetooth transmission power based on the distance between the headphones and other electronic devices, reducing power consumption while maintaining connectivity.
[0122] In this embodiment, when it is determined that the user is in a sedentary state, a reminder message is output according to a preset prompting method. This can promptly remind the user of their sedentary state and prompt them to get up and move around, thus avoiding health problems caused by prolonged sitting.
[0123] The following will combine Figure 6 The sedentary detection method provided in the embodiments of this application will be explained and described, such as... Figure 6As shown, when the headphones are in sleep mode, if a change in the capacitance sensor signal is detected, the capacitance value detected by the capacitance sensor is used to detect the wearing status of the headphones. If the headphones are determined to be worn stably, the amplitude of the change in the user's head posture angle and the change in the height of the headphones are detected to determine whether the user is in a sitting state. If the user is determined to be in a sitting state, the duration of the sitting state is timed to determine whether the duration of the sitting state has reached the required sitting time. If the required sitting time has been reached, a reminder message is output to the user.
[0124] In addition, such as Figure 6 As shown, when using a capacitive sensor to detect the earphone wearing status, if the capacitance signal disappears or the earphone is removed, the earphone will enter sleep mode. When detecting a sedentary state, if a significant movement / standing motion is detected, the earphone will return to the wearing status detection step. When detecting prolonged sitting, if a standing motion is detected, it returns to the sedentary state detection. After outputting a reminder message, if a standing motion is detected, it returns to the sedentary state detection. Throughout this process, if the earphone is removed, the earphone will enter sleep mode. Figure 6 The process shown demonstrates that when using headphones for sedentary detection, a layered decision logic is employed to determine the sedentary state. By verifying wearing, determining static state, determining height, excluding voice input, and comprehensively determining sedentary state, the false judgment rate is greatly reduced. If the judgment logic at a certain layer is not satisfied, the system returns to the judgment logic at the upper layer, continuously and accurately detecting the sedentary state. When the headphones are detected to be removed, the system enters a sleep state to save power consumption and improve battery life.
[0125] It should be noted that the sedentary detection method proposed in this application can also be applied to the following scenarios:
[0126] 1) Health data analysis: Utilize headphones to monitor users' sitting posture habits, daily sedentary time, and activity patterns over a long period of time, generating health reports and suggestions.
[0127] 2) Work efficiency optimization: Provide work efficiency insights by analyzing user focus status (based on head posture and voice activity).
[0128] 3) Remote work assistance: Monitors posture in real time during video conferences and reminds users to maintain good posture.
[0129] 4) Smart home integration: It integrates with smart lighting and air conditioning systems to automatically adjust environmental parameters based on the user's posture.
[0130] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0131] Based on the same inventive concept, this application also provides a sedentary detection device for implementing the sedentary detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more sedentary detection device embodiments provided below can be found in the limitations of the sedentary detection method described above, and will not be repeated here.
[0132] In one exemplary embodiment, such as Figure 7 As shown, a sedentary detection device is provided, comprising: an acquisition module, a first determination module, and a second determination module, wherein:
[0133] The acquisition module is used to acquire the magnitude of the change in the user's head posture angle and the change in the height of the headphones.
[0134] The first determining module is used to determine that the user is in a seated state when the change in posture angle and the change in height meet a first preset condition.
[0135] The second determining module is used to determine whether the user is in a prolonged sitting state based on a first duration of the user being in a sitting state.
[0136] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0137] Based on the above embodiments, optionally, the above apparatus further includes: a third determining module, wherein:
[0138] The third determining module is used to determine that the attitude angle change amplitude value and the height change value satisfy the first preset condition when the attitude angle change amplitude value is less than the first amplitude threshold and the second duration of the value less than the preset amplitude threshold is greater than the first preset duration, and the height change value is less than the preset height threshold and the third duration of the value less than the preset height threshold is greater than the second preset duration.
[0139] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0140] Based on the above embodiments, optionally, the third determining module includes: a first determining unit, wherein:
[0141] The first determining unit is configured to, when the attitude angle change amplitude value is less than a first amplitude threshold and the second duration of the value is less than a preset amplitude threshold is greater than the first preset duration, and the height change value is less than a preset height threshold and the third duration of the value is less than a preset height threshold is greater than the second preset duration, if the attitude angle change amplitude value is less than the second amplitude threshold and the user is in a silent state, determine that the attitude angle change amplitude value and the height change value satisfy the first preset condition; the first amplitude threshold is greater than the second amplitude threshold.
[0142] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0143] Based on the above embodiments, optionally, the above apparatus further includes: an acquisition module, a fourth determination module, and a fifth determination module, wherein:
[0144] The acquisition module is used to acquire voice data.
[0145] The fourth determining module is used to determine the user's voice based on the voice data and noise threshold.
[0146] The fifth determining module is used to determine that the user is in a non-speaking state if the audio energy of the user's voice is less than a preset energy threshold and the fourth duration is greater than a third preset duration.
[0147] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0148] Based on the above embodiments, optionally, the above apparatus further includes: a sixth determining module, wherein:
[0149] The sixth determining module is used to determine that the attitude angle change amplitude is less than the first amplitude threshold if the pitch angle variance, roll angle variance and yaw angle variance of the user's head are all less than the first preset angle value.
[0150] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0151] Based on the above embodiments, optionally, the second determining module includes: a second determining unit, wherein:
[0152] The second determining unit is used to determine that the user is in a sedentary state if the first duration is greater than the fourth preset duration.
[0153] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0154] Based on the above embodiments, optionally, the second determining module includes: a first acquiring unit and a third determining unit, wherein:
[0155] The first acquisition unit is used to acquire the user's physiological characteristic data; the physiological characteristic data includes heart rate data and / or body temperature data.
[0156] The third determining unit is used to determine that the user is in a sedentary state when the first duration and the physiological characteristic data meet the second preset conditions.
[0157] Optionally, the second preset condition mentioned above includes any one of the following:
[0158] The first duration is greater than the fourth preset duration and the heart rate data is less than the preset heart rate value;
[0159] The first duration is greater than the fourth preset duration and the body temperature data is less than the preset temperature value;
[0160] The first duration is greater than the fourth preset duration, the heart rate data is less than the preset heart rate value, and the body temperature data is less than the preset temperature value.
[0161] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0162] Based on the above embodiments, optionally, the acquisition module includes: a fourth determining unit and a second acquisition unit, wherein:
[0163] The fourth determining unit is used to determine whether the earphone is in a stable wearing state using the capacitive sensor of the earphone.
[0164] The second acquisition unit is used to acquire the amplitude value of the attitude angle change and the height change value when it is determined that the headphones are in a stable wearing state.
[0165] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0166] Based on the above embodiments, optionally, the fourth determining unit is used to detect the first capacitance value of the inner electrode of the earphone and the second capacitance value of the outer electrode of the earphone using the capacitance sensor; calculate the mean and variance of the first capacitance value; and determine that the earphone is in a stable wearing state when the mean is greater than a first preset threshold, the variance is less than a second preset threshold, and the second capacitance value is less than a third preset threshold.
[0167] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0168] Optionally, based on the above embodiments, the apparatus further includes a transmitting module, wherein:
[0169] The transmitting module is used to send control commands to the multi-fusion sensors in the earphone when it is determined that the earphone is in a stable wearing state; the control commands are used to instruct the multi-fusion sensors to switch to a working mode; the multi-fusion sensors include at least one of a heart rate sensor, a body temperature sensor, a microphone, an inertial measurement unit, and a barometer.
[0170] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0171] Based on the above embodiments, optionally, the above device further includes: an output module, wherein:
[0172] The output module is used to output reminder information according to a preset prompting method when it is determined that the user is in a sedentary state.
[0173] The sedentary detection device provided in this embodiment can perform the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0174] Each module in the aforementioned sedentary detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0175] In one exemplary embodiment, an earphone is provided, the internal structure of which can be shown in the diagram below. Figure 8 As shown, the system includes a processor, memory, input / output interfaces, a communication interface, and input devices. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface and input devices are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a sedentary detection method.
[0176] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0177] In one exemplary embodiment, an earphone is provided, including a memory and a processor, the memory storing a computer program that the processor executes to implement the method described above.
[0178] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0179] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described above.
[0180] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0181] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0182] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0183] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting sedentary behavior, characterized in that, The method is applied to headphones, and the method includes: The amplitude of the change in the user's head posture angle and the change in the height of the headphones are obtained; If the change in posture angle and the change in height meet the first preset condition, it is determined that the user is in a seated state. Based on the first duration of the user's sitting state, it is determined whether the user is in a prolonged sitting state.
2. The method according to claim 1, characterized in that, The method further includes: If the attitude angle change amplitude is less than a first amplitude threshold and the second duration of the value is less than a preset amplitude threshold is greater than a first preset duration, and the altitude change value is less than a preset altitude threshold and the third duration of the value is less than a preset altitude threshold is greater than a second preset duration, then the attitude angle change amplitude and the altitude change value satisfy the first preset condition.
3. The method according to claim 2, characterized in that, The step of determining that the attitude angle change amplitude value and the height change value satisfy the first preset condition when the second duration of the attitude angle change amplitude value is less than a first amplitude threshold and less than a preset amplitude threshold is greater than a first preset duration, and the third duration of the height change value is less than a preset height threshold and less than a preset height threshold is greater than a second preset duration, includes: If the attitude angle change amplitude is less than a first amplitude threshold and the second duration of the value is less than a preset amplitude threshold is greater than the first preset duration, and the height change value is less than a preset height threshold and the third duration of the value is less than a preset height threshold is greater than the second preset duration, then if the attitude angle change amplitude is less than the second amplitude threshold and the user is in a silent state, it is determined that the attitude angle change amplitude and the height change value satisfy the first preset condition; the first amplitude threshold is greater than the second amplitude threshold.
4. The method according to claim 3, characterized in that, The method further includes: Acquire voice data; Based on the voice data and noise threshold, the user's voice is determined; If the audio energy of the user's voice is less than the fourth duration of the preset energy threshold but greater than the third preset duration, then it is determined that the user is in a non-speaking state.
5. The method according to claim 2, characterized in that, The method further includes: If the pitch angle variance, roll angle variance, and yaw angle variance of the user's head are all less than the first preset angle value, then it is determined that the attitude angle change amplitude value is less than the first amplitude threshold.
6. The method according to any one of claims 1 to 5, characterized in that, The step of determining whether the user is in a prolonged sitting state based on a first duration of the user being in a seated state includes: If the first duration is longer than the fourth preset duration, then it is determined that the user is in a sedentary state.
7. The method according to any one of claims 1 to 5, characterized in that, The step of determining whether the user is in a prolonged sitting state based on a first duration of the user being in a seated state includes: Acquire the user's physiological characteristic data; the physiological characteristic data includes heart rate data and / or body temperature data; If the first duration and the physiological characteristic data meet the second preset condition, it is determined that the user is in a sedentary state.
8. The method according to claim 7, characterized in that, The second preset condition includes any one of the following: The first duration is greater than the fourth preset duration and the heart rate data is less than the preset heart rate value; The first duration is greater than the fourth preset duration and the body temperature data is less than the preset temperature value; The first duration is greater than the fourth preset duration, the heart rate data is less than the preset heart rate value, and the body temperature data is less than the preset temperature value.
9. The method according to claim 1, characterized in that, The acquisition of the amplitude of the user's head posture angle change and the height change of the headphones includes: The capacitive sensor of the earphone is used to determine whether the earphone is in a stable wearing state; Once it is determined that the headphones are in a stable wearing state, the amplitude of the attitude angle change and the height change value are obtained.
10. The method according to claim 9, characterized in that, The step of using the capacitive sensor of the earphone to determine whether the earphone is in a stable wearing state includes: Using the capacitance sensor, the first capacitance value of the inner electrode of the earphone and the second capacitance value of the outer electrode of the earphone are detected. Calculate the mean and variance of the first capacitance value; If the mean is greater than a first preset threshold, the variance is less than a second preset threshold, and the second capacitance value is less than a third preset threshold, then the headphones are determined to be in a stable wearing state.
11. The method according to claim 9, characterized in that, The method further includes: Once it is determined that the earphone is in a stable wearing state, a control command is sent to the multi-fusion sensor in the earphone; the control command is used to instruct the multi-fusion sensor to switch to a working mode; the multi-fusion sensor includes at least one of a heart rate sensor, a body temperature sensor, a microphone, an inertial measurement unit, and a barometer.
12. The method according to claim 1, characterized in that, The method further includes: If it is determined that the user is in a sedentary state, a reminder message is output according to a preset prompting method.
13. A sedentary detection device, characterized in that, The device is used in headphones, and the device includes: The acquisition module is used to acquire the amplitude value of the user's head posture angle change and the height change value of the earphone; The first determining module is used to determine that the user is in a sitting state when the change in posture angle and the change in height meet a first preset condition. The second determining module is used to determine whether the user is in a prolonged sitting state based on a first duration of the user being in a sitting state.
14. A headset comprising multiple fusion sensors, a memory, and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.