Earphone wearing state determination method and device, equipment and storage medium

By symmetrically installing dual IMU inertial sensors in the headphones, the correlation coefficient of angular velocity and the acceleration tilt angle are calculated, which solves the problem of high misjudgment rate in the existing technology of wearing status detection, and realizes more accurate wearing status judgment and intelligent control of headphones.

CN122248345APending Publication Date: 2026-06-19XIAN TCL SOFTWARE DEV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN TCL SOFTWARE DEV
Filing Date
2026-03-09
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing headphone wearing status detection technologies suffer from problems such as high false alarm rate, weak anti-interference ability, and reliance on skin contact, making it difficult to accurately determine the wearing status.

Method used

Dual IMU inertial sensors are symmetrically installed in the earphone module. The wearing status is determined by calculating the angular velocity correlation coefficient and acceleration tilt angle between the first and second earphone modules and combining them with preset conditions.

Benefits of technology

It improves the accuracy and stability of wearing status detection, reduces the false judgment rate, realizes intelligent wake-up control of the headphones, and enhances user experience and battery life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122248345A_ABST
    Figure CN122248345A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and storage medium for determining the wearing state of headphones, relating to the field of headphone technology. The method includes: determining a correlation coefficient between a first headphone module and a second headphone module based on a first angular velocity and a second angular velocity; determining a candidate wearing state of the headphones based on the correlation coefficient; determining a target tilt angle of the headphones based on a first acceleration of the first headphone module and a second acceleration of the second headphone module; and determining the candidate wearing state as the target wearing state of the headphones if the target tilt angle satisfies a preset condition corresponding to the candidate wearing state. Thus, by accurately capturing the coordinated motion characteristics of the two headphone modules during wearing through the correlation coefficient, the candidate wearing state is locked. Subsequently, based on the posture constraints of the headphones, the target wearing state of the headphones is further verified to determine whether it is a candidate wearing state, thereby more accurately determining the headphone wearing state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of headphone technology, and in particular to methods, apparatus, devices and storage media for determining the wearing status of headphones. Background Technology

[0002] With the development of consumer electronics and audio technology, headphones have been widely used in entertainment, office, and sports scenarios. To improve user experience and device energy efficiency, wear detection has become a core requirement. Wear detection enables intelligent control such as automatic start-up when headphones are worn, automatic device wake-up, automatic pause when headphones are removed, and sleep mode. Therefore, how to accurately detect the wearing status of headphones has become a key research direction. Summary of the Invention

[0003] The main objective of this application is to provide a method, apparatus, device, and storage medium for determining the wearing status of headphones, aiming to solve the technical problem of how to accurately detect the wearing status of headphones.

[0004] To achieve the above objectives, this application proposes a method for determining the wearing state of headphones, applied to headphones, wherein the headphones include a first headphone module and a second headphone module, the first headphone module is provided with a first inertial sensor, and the second headphone module is provided with a second inertial sensor, the method comprising: Based on the first angular velocity and the second angular velocity, the correlation coefficient between the first earphone module and the second earphone module is determined, wherein the first angular velocity is collected by the first inertial sensor and the second angular velocity is collected by the second inertial sensor; Based on the correlation coefficient, the candidate wearing state corresponding to the headphones is determined; The target tilt angle of the headphones is determined based on the first acceleration and the second acceleration, wherein the first acceleration is the acceleration in a preset direction collected by the first inertial sensor, and the second acceleration is the acceleration in a preset direction collected by the second inertial sensor. If the target tilt angle satisfies the preset conditions corresponding to the candidate wearing state, the candidate wearing state is determined as the target wearing state of the headphones.

[0005] In addition, to achieve the above objectives, this application also proposes an earphone, wherein a first earphone module and a second earphone module are provided in the earphone, the first earphone module is provided with a first inertial sensor, and the second earphone module is provided with a second inertial sensor.

[0006] Furthermore, to achieve the above objectives, this application also proposes a device for determining the wearing state of headphones, deployed in headphones, wherein a first headphone module and a second headphone module are provided in the headphones, the first headphone module is provided with a first inertial sensor, and the second headphone module is provided with a second inertial sensor, the device for determining the wearing state of headphones comprising: The first determining module is used to determine the correlation coefficient between the first earphone module and the second earphone module based on the first angular velocity and the second angular velocity, wherein the first angular velocity is collected by the first inertial sensor and the second angular velocity is collected by the second inertial sensor; The second determining module is used to determine the candidate wearing state corresponding to the earphone based on the correlation coefficient; The third determining module is used to determine the target tilt angle of the earphone based on the first acceleration and the second acceleration, wherein the first acceleration is the acceleration in a preset direction collected by the first inertial sensor, and the second acceleration is the acceleration in a preset direction collected by the second inertial sensor. The fourth determining module is used to determine the candidate wearing state as the target wearing state of the headphones when the target tilt angle satisfies the preset conditions corresponding to the candidate wearing state.

[0007] In addition, to achieve the above objectives, this application also proposes a device for determining the wearing state of headphones, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for determining the wearing state of headphones as described above.

[0008] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the headphone wearing state determination method described above.

[0009] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the method for determining the wearing state of headphones as described above. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic diagram of the structure of the earphone in this application; Figure 2 A flowchart illustrating the method for determining the wearing status of headphones according to Embodiment 1 of this application; Figure 3 A flowchart illustrating Embodiment 2 of the method for determining the wearing status of headphones in this application; Figure 4 A flowchart illustrating Embodiment 3 of the method for determining the wearing status of headphones in this application; Figure 5 This is a schematic diagram of the module structure of the headphone wearing state determination device according to an embodiment of this application; Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the method for determining the wearing state of headphones in the embodiments of this application.

[0013] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0014] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0015] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0016] Currently, mainstream headphone wear detection technologies can be mainly divided into the following four categories, and each type of technology has significant differences in principle, advantages and limitations: 1. Optical sensor detection technology Technical principle: By installing infrared emitters and receivers or distance sensors inside the earcups, the system utilizes the properties of human skin reflecting infrared light and air or objects not reflecting light to determine whether the earcups are in contact with the head. This solution offers fast response and is a non-contact detection method, requiring no direct contact with the skin and causing no skin irritation. However, it is relatively expensive and has weak resistance to environmental interference. Strong light or dirt inside the earcups can cause abnormal reflected signals, leading to false judgments. The sensors need to be fixed inside the earcups close to the skin, requiring holes in the headphones, which limits the installation angle and space, and is easily constrained by the headphone's structural design.

[0017] 2. Capacitive sensor detection technology Technical Principle: Based on the human body's conductivity and variable capacitance, capacitive sensing electrodes are placed inside the earcups. When the headphones are worn, the skin and electrodes form a capacitive circuit. The device determines the wearing status by detecting sudden changes in capacitance. This solution offers high sensitivity, capable of detecting even slight contact. It also features a simple structure, small sensor size, and easy integration into the earcup foam, minimizing impact on the headphones' appearance. However, it suffers from poor environmental adaptability. Changes in sweat and humidity alter skin conductivity, causing capacitance drift and leading to false detections of removal or wearing when not in use. Furthermore, it relies on direct skin contact; if the headphones become loose, such as during exercise when the earcups shift, the electrodes may detach from the skin, resulting in false detections.

[0018] 3. Single IMU Inertial Measurement Unit Detection Technology Technical Principle: An IMU (Integrated Device Unit) combining an accelerometer and gyroscope is installed on the headband or a single earcup. By detecting the device's motion posture, such as "picking it up from a table," "minor displacement near the head," or changes in the direction of gravity, it indirectly determines whether the headphones are being worn. This solution does not rely on "skin contact with the earcups," avoiding the influence of skin conditions such as sweat or dryness; it is also low-cost, requiring no additional dedicated sensors and can reuse the existing motion detection IMU in the headphones. However, it has a high false alarm rate, unable to distinguish between head movements when wearing the headphones and accidental touches when not wearing them, such as collisions with a table or hand movements; it can only detect overall movement trends and cannot capture the details of the earcups' contact with the head. If the headphones are hung around the neck or placed in a pocket, changes in posture can easily trigger false wear detection.

[0019] 4. Pressure sensor detection technology Technical Principle: A miniature pressure sensor is embedded between the earcup foam and the shell. When the headphones are worn, the pressure exerted by the head on the earcups causes pressure on the sensor. The device determines the wearing status by detecting whether the pressure value reaches a threshold. This solution directly detects the "pressure action during wearing," which is logically intuitive and has better anti-interference performance than optical and capacitive sensors in sports scenarios such as running and jumping. However, it relies on a fixed pressure threshold. If the user wears the headphones with varying tightness, it can easily lead to false judgments such as threshold overflow when worn tightly and failure to reach the threshold when worn loosely. The sensor is prone to aging due to long-term pressure, and its accuracy decreases over time. The hard material of the sensor can affect the softness of the earcup foam, potentially reducing wearing comfort.

[0020] In conclusion, accurately detecting the wearing status of headphones has become an urgent problem to be solved.

[0021] Therefore, this application provides a solution that determines a correlation coefficient between the first earphone module and the second earphone module based on a first angular velocity corresponding to the first earphone module and a second angular velocity corresponding to the second earphone module; determines a candidate wearing state corresponding to the earphone based on the correlation coefficient; determines a target tilt angle of the earphone based on a first acceleration and a second acceleration, wherein the first acceleration is the acceleration in a preset direction collected by the first inertial sensor, and the second acceleration is the acceleration in a preset direction collected by the second inertial sensor; and determines the candidate wearing state as the target wearing state of the earphone when the target tilt angle satisfies the preset conditions corresponding to the candidate wearing state.

[0022] As can be seen from the above embodiments, by using the correlation coefficient between the first angular velocity collected by the first inertial sensor in the first earphone module and the second angular velocity collected by the second inertial sensor in the second earphone module, the coordinated motion characteristics of the two earphone modules during wearing can be accurately captured, and the candidate wearing state can be locked. Then, by combining the first acceleration of the first earphone module in the preset direction and the second acceleration of the second earphone module in the preset direction, the target tilt angle corresponding to the earphone can be determined. If the target tilt angle meets the preset conditions corresponding to the candidate wearing state, the candidate wearing state is determined as the target wearing state of the over-ear headphones. Thus, the target wearing state of the over-ear headphones can be further verified by the posture constraints of the headphones, and the wearing state of the headphones can be determined more accurately.

[0023] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, personal computer, mobile phone, headphones, etc., or an electronic device that can realize the above functions, a device for determining the wearing status of headphones, etc.

[0024] Figure 1 This is a schematic diagram of the structure of the earphone in this application, as shown below. Figure 1 As shown, the earphone 100 includes a first earphone module 101 and a second earphone module 102. The first earphone module 101 is equipped with a first inertial sensor 1011, and the second earphone module 102 is equipped with a second inertial sensor 1021.

[0025] Among them, headphone 100 can be a type of over-ear headphone.

[0026] Among them, the first earphone module 101 and the second earphone module 102 are symmetrical functional modules of the earphone 100, corresponding to the left and right earcups of the headphones (including earcup shells, foam pads, audio playback units and other basic components), and are the core parts that directly fit against the sides of the user's head.

[0027] In one possible implementation, the first earphone module 101 and the second earphone module 102 are designed with strict symmetry in structure, including that the size, shape and internal component layout of the earcups are completely consistent, and the connection position with the headband of the earphone is symmetrical, so as to ensure that the earcups on both sides fit the head in a consistent state when worn, providing a physical basis for the symmetry analysis of dual sensor data.

[0028] Among them, the inertial sensor, also known as the inertial measurement unit (IMU), is a miniature sensor component that integrates a three-axis accelerometer and a three-axis gyroscope, which can collect the motion attitude data of the device in real time.

[0029] In one possible implementation, the first inertial sensor 1011 and the second inertial sensor 1021 are symmetrically mounted on the first headphone module 101 and the second headphone module 102. This application does not specify the mounting position of the inertial sensors within the headphone modules.

[0030] Based on this, embodiments of this application provide a method for determining the wearing state of headphones, applicable to, for example... Figure 1 The earphones shown have a first earphone module and a second earphone module. The first earphone module has a first inertial sensor, and the second earphone module has a second inertial sensor. (Refer to...) Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the method for determining the wearing state of headphones according to this application. Figure 2 As shown, the method for determining the wearing status of headphones includes steps S10 to S40: Step S10: Determine the correlation coefficient between the first earphone module and the second earphone module based on the first angular velocity and the second angular velocity, wherein the first angular velocity is collected by the first inertial sensor and the second angular velocity is collected by the second inertial sensor.

[0031] The first angular velocity is the angular velocity data of the first earphone module rotating around three axes, collected by the first inertial sensor based on a preset sampling frequency, which reflects the dynamic parameters of the rotational motion state of the first earcup.

[0032] The second angular velocity is the angular velocity data of the second earphone module rotating around three axes, collected by the second inertial sensor based on a preset sampling frequency, reflecting the dynamic parameters of the rotational motion state of the second earcup.

[0033] The preset sampling frequency can be the number of sampling frames per unit time. For example, the preset sampling frequency can be 100 Hz, which means that one frame of data is collected every 10 ms.

[0034] The correlation coefficient is used as an indicator to quantify the motion synchronization of the first angular velocity data and the second angular velocity data.

[0035] In some embodiments, the correlation coefficient between the first angular velocity and the second angular velocity can be calculated using the Spearman correlation coefficient calculation method or the Euclidean distance calculation formula.

[0036] If the Spearman correlation coefficient calculation method is used, the correlation coefficient can be in the range of [-1, 1]. The closer the value is to 1, the more coordinated the rotational movements of the first and second earphone modules are. The closer the value is to -1, the more completely opposite the movements are. 0 represents no correlation.

[0037] In a specific implementation, a first correlation coefficient, a second correlation coefficient, and a third correlation coefficient can be calculated between the x-axis data of the first angular velocity and the x-axis data of the second angular velocity, respectively. The first, second, and third correlation coefficients are then used as the correlation coefficients between the first and second earphone modules. Alternatively, the average of the first, second, and third correlation coefficients can be used as the correlation coefficient between the first and second earphone modules.

[0038] In one possible implementation, the correlation coefficient between the first angular velocity and the second angular velocity over a first preset duration can be calculated in real time. The first preset duration can be 1 second or 2 seconds.

[0039] Step S20: Determine the candidate wearing state corresponding to the headphones based on the correlation coefficient.

[0040] Among them, the candidate wearing status is the wearing or not wearing status initially determined based on the dynamic synchronization of the angular velocity data of the two earphone modules.

[0041] In one possible implementation, a correlation threshold (such as 0.8, 0.85, etc.) can be set. If the correlation coefficient is greater than or equal to the correlation threshold, the candidate's wearing status is directly determined to be "wearing"; if it is less than the correlation threshold, the candidate's wearing status is determined to be "not wearing". It should be noted that if the correlation coefficient includes a first correlation coefficient, a second correlation coefficient, and a third correlation coefficient, then if all three correlation coefficients are greater than or equal to the correlation threshold, the candidate's wearing status is determined to be "wearing"; if any one of the three correlation coefficients is less than the correlation threshold, the candidate's wearing status is determined to be "not wearing".

[0042] In another possible implementation, a correlation threshold range of [0.6, 0.8] can be set. If the correlation coefficient is greater than 0.8, it is determined to be worn; if it is less than 0.6, it is determined to be not worn. When the correlation coefficient is between 0.6 and 0.8, the candidate wearing state from the previous moment is maintained to avoid state jumps caused by instantaneous noise. It should be noted that if the correlation coefficient includes a first correlation coefficient, a second correlation coefficient, and a third correlation coefficient, then if the first correlation coefficient, the second correlation coefficient, and the third correlation coefficient are all greater than or equal to 0.8, the candidate wearing state is determined to be worn; if the first correlation coefficient, the second correlation coefficient, and the third correlation coefficient are all less than the correlation threshold, the candidate wearing state is determined to be not worn.

[0043] It should be noted that by using dual IMUs to symmetrically acquire angular velocity data of the first and second earphone modules and calculating the correlation coefficient, the motion coordination characteristics of both earcups can be accurately captured. The correlation coefficient is significantly higher when the earcups are worn than when they are not worn. Therefore, the wearing status can be initially determined based on the correlation coefficient, which can then narrow down the subsequent determination range.

[0044] Step S30: Determine the target tilt angle of the headphones based on the first acceleration and the second acceleration, wherein the first acceleration is the acceleration in a preset direction collected by the first inertial sensor, and the second acceleration is the acceleration in a preset direction collected by the second inertial sensor.

[0045] The first acceleration can be acquired by the first inertial sensor based on a preset sampling frequency.

[0046] The second acceleration can be acquired by the second inertial sensor based on a preset sampling frequency.

[0047] It should be noted that when the headphones are worn correctly, the axis of the preset direction in the first inertial sensor is the same as the direction of gravitational acceleration. The axis of the preset direction in the second inertial sensor is also the same as the direction of gravitational acceleration.

[0048] The target tilt angle is used to quantify the overall spatial posture of the left and right earcups of the headphones. It is calculated from the first acceleration and the second acceleration. The smaller the angle, the more stable the wearing posture of the headphones is in relation to the head.

[0049] In one possible implementation, a first ratio of the first acceleration to the gravitational acceleration at each sampling moment can be calculated, and then the first ratio can be converted into a first tilt angle corresponding to the first earphone module. A second ratio of the second acceleration to the gravitational acceleration at each sampling moment can be calculated, and then the second ratio can be converted into a second tilt angle corresponding to the second earphone module. The average value of the first tilt angle and the second tilt angle can then be determined as the target tilt angle corresponding to each sampling moment.

[0050] In another possible implementation, the average value of the target tilt angle corresponding to each sampling moment within the second preset duration can be determined as the target tilt angle for the second preset duration. The second preset duration can be 1 second or 1.5 seconds. It should be noted that the first preset duration and the second preset duration can be the same or different. This application does not impose any limitations on this.

[0051] Step S40: If the target tilt angle satisfies the preset conditions corresponding to the candidate wearing state, the candidate wearing state is determined as the target wearing state of the headphones.

[0052] The preset condition is a target tilt angle threshold rule set for the candidate wearing state.

[0053] If the candidate wearing state is "wearing," for the target tilt angle at each sampling moment, the preset condition can be that the target tilt angle at each sampling moment within a second preset time period is less than a first angle threshold (e.g., 15°, 10°, etc.). This can be understood as the target tilt angle at each sampling moment within the second preset time period being less than the first angle threshold, thus determining the target wearing state of the headphones as "wearing." For the target tilt angle within the second preset time period, the preset condition can be that the target tilt angle is less than the first angle threshold, thus determining the target wearing state of the headphones as "wearing."

[0054] If the candidate wearing state is "not worn," for the target tilt angle at each sampling time, the preset condition can be that the target tilt angle at each sampling time within a second preset time period is greater than a second angle threshold (e.g., 45°, 40°, etc.). This can be understood as determining the target wearing state of the headphones as "not worn" if the target tilt angle at each sampling time within the second preset time period is greater than the second angle threshold. Similarly, for the target tilt angle within the second preset time period, the preset condition can be that the target tilt angle is greater than the second angle threshold.

[0055] In this application, the correlation coefficient between the first angular velocity collected by the first inertial sensor in the first earphone module and the second angular velocity collected by the second inertial sensor in the second earphone module is used to accurately capture the coordinated motion characteristics of the two earphone modules during wearing, and lock the candidate wearing state. Then, by combining the first acceleration of the first earphone module in the preset direction and the second acceleration of the second earphone module in the preset direction, the target tilt angle corresponding to the earphone is determined. If the target tilt angle meets the preset conditions corresponding to the candidate wearing state, the candidate wearing state is determined as the target wearing state of the over-ear headphones. Thus, the posture constraints of the earphones can be used to further verify whether the target wearing state of the over-ear headphones is the candidate wearing state, and the wearing state of the headphones can be determined more accurately.

[0056] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 . Figure 3 This is a flowchart illustrating the second embodiment of the method for determining the wearing state of headphones according to this application, as shown below. Figure 3 As shown, step S10 further includes steps S11 to S12: Step S11: Based on the length of the first time window and the first overlap rate between two adjacent first time windows, process the first angular velocity and the second angular velocity to determine the first angular velocity sequence and the second angular velocity sequence corresponding to each first time window.

[0057] The first time window length, which is the time span for sliding window processing of angular velocity data, is a core parameter for determining the number of observations within a single window. For example, the first time window length can be 100 ms, 200 ms, etc.

[0058] In one possible implementation, the length of the first-time window can be dynamically adjusted based on the headphone's usage scenario. For example, in a sports scenario, the window length could be set to 100ms to improve real-time performance, while in an office scenario, it could be set to 400ms to improve stability.

[0059] The first overlap rate is the proportion of data frames shared between two adjacent first time windows. For example, a first overlap rate of 50% can be understood as two adjacent time windows sharing 50% of the data frames.

[0060] The first angular velocity sequence is a set of first angular velocity data frames arranged in chronological order within a single first time window. The first angular velocity sequence may include angular velocity sequences corresponding to the three angular velocity axes of the first inertial sensor, namely, the first sequence corresponding to the first angular velocity axis, the second sequence corresponding to the second angular velocity axis, and the third sequence corresponding to the third angular velocity axis.

[0061] The second angular velocity sequence is a set of second angular velocity data frames arranged in chronological order within a single first time window. The second angular velocity sequence may include angular velocity sequences corresponding to the three angular velocity axes of the second inertial sensor: the fourth sequence corresponding to the first angular velocity axis, the fifth sequence corresponding to the second angular velocity axis, and the sixth sequence corresponding to the third angular velocity axis.

[0062] For example, if the first time window length is set to 200ms, the sampling frequency to 100Hz, and the first overlap rate to 50%, then a single window contains 20 frames of first angular velocity data. Each time, 10 new frames of data are collected, covering the earliest 10 frames of data in the window, forming a new first angular velocity sequence.

[0063] It should be noted that using a time window to process angular velocity data can divide continuous dynamic data into datasets of fixed length, avoiding the impact of instantaneous noise in single-frame data on correlation coefficient calculation, ensuring the smoothness of data in synchronization analysis, and solving the problem of judgment error caused by sudden fluctuations in motion data.

[0064] Step S12: Based on the similarity between the first angular velocity sequence and the second angular velocity sequence corresponding to each first time window, determine the correlation coefficient between the first headphone module and the second headphone module under each first time window.

[0065] Similarity is used to quantify the consistency of data trends between two angular velocity sequences, namely the first angular velocity sequence and the second angular velocity sequence. In some embodiments, Spearman correlation coefficient, cosine similarity, Euclidean distance, etc., can be used to determine the similarity between the first angular velocity sequence and the second angular velocity sequence.

[0066] In a specific implementation, the similarity between the first and fourth sequences corresponding to the first angular velocity axis, the similarity between the second and fifth sequences corresponding to the second angular velocity axis, and the similarity between the third and sixth sequences corresponding to the third angular velocity axis are calculated respectively. These three similarities are then used as the correlation coefficient between the first and second earphone modules. Alternatively, the average of the three similarities can be used as the correlation coefficient between the first and second earphone modules.

[0067] It should be noted that sequence similarity is used as the correlation coefficient, rather than the similarity of a single frame, because wearing motion is a continuous dynamic process. Single frame data cannot reflect the overall motion synchronization, while sequence data within the time window can capture continuous motion trends, thus improving the accuracy of synchronization verification.

[0068] like Figure 3 As shown, step S20 includes either step A21 or step B21: Step A21: If the correlation coefficients corresponding to a first number of consecutive first time windows are all greater than the first correlation threshold, the candidate wearing state is determined to be wearing.

[0069] The first quantity is the number of first time windows that continuously meet the correlation coefficient threshold condition. It is the continuous frame verification threshold for dynamic synchronization verification (such as 10 frames) to avoid misjudgment caused by single-window data anomalies.

[0070] The first correlation threshold is the critical value (e.g., 0.8) of the correlation coefficient used to determine whether the two earphone modules have wear-level motion synchronization. This first correlation threshold can be calibrated based on experimental data from a large number of wearing scenarios.

[0071] In one possible implementation, the correlation coefficient corresponding to a first time window includes three similarities. If the three similarities for a consecutive first number of first time windows are all greater than a first correlation threshold, the candidate wearing state is determined to be wearing. In another possible implementation, the correlation coefficient corresponding to a first time window is the average of the three similarities. If the correlation coefficient for a consecutive first number of first time windows is greater than the first correlation threshold, the candidate wearing state is determined to be wearing.

[0072] Step B21: If the correlation coefficients corresponding to a second number of consecutive first time windows are all less than the second correlation threshold, the candidate wearing state is determined to be not worn.

[0073] The second quantity refers to the number of consecutive time windows that meet the correlation coefficient threshold condition. It is the verification threshold for consecutive frames in the unworn state (e.g., 10 frames) used to avoid misjudgments caused by abnormal data in a single window. The first and second quantities can be the same or different. This application does not impose any restrictions on this.

[0074] The second correlation threshold is a critical value (e.g., 0.6, 0.8, etc.) for the correlation coefficient used to determine the synchronization of motion between the two earphone modules without wearing. This second correlation threshold can be calibrated based on experimental data from a large number of wearing scenarios. The first and second correlation thresholds can be the same or different. This application does not impose any restrictions on this.

[0075] In one possible implementation, the correlation coefficient corresponding to a first time window includes three similarities. If the three similarities corresponding to a second consecutive number of first time windows are all less than a second correlation threshold, the candidate wearing status is determined to be not wearing. In another possible implementation, the correlation coefficient corresponding to a first time window is the average of the three similarities. If the correlation coefficient corresponding to a second consecutive number of first time windows is less than the second correlation threshold, the candidate wearing status is determined to be not wearing.

[0076] In this embodiment, the first angular velocity and the second angular velocity are standardized based on the length of the first time window and the first overlap rate between two adjacent first time windows to generate an angular velocity sequence and calculate the sequence similarity. Then, the candidate wearing status is determined by the continuous frame verification rule, further optimizing the entire process of dynamic synchronization screening. This effectively filters out instantaneous noise in single-frame angular velocity data, avoids misjudgments caused by accidental motion, improves the accuracy and stability of motion synchronization verification, further reduces the misjudgment rate of the initial wearing status determination, and lays a more accurate foundation for subsequent static attitude constraint confirmation.

[0077] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 . Figure 4 This is a flowchart illustrating the third embodiment of the method for determining the wearing state of headphones according to this application. Figure 4 As shown, step S30 also includes steps S31 to S34: Step S31: Based on the length of the second time window and the second overlap rate between two adjacent time windows, process the first acceleration and the second acceleration to determine the first acceleration sequence and the second acceleration sequence corresponding to each second time window.

[0078] The second time window length, which is the time span for sliding window processing of the acceleration data, is a core parameter for determining the number of observations within a single window. For example, the second time window length can be 100 ms, 200 ms, etc. The second time window length can be the same as or different from the first time window length. This application does not impose any restrictions on this.

[0079] In one possible implementation, the length of the second time window can be dynamically adjusted based on the headphone's usage scenario. For example, in a sports scenario, the window length could be set to 100ms to improve real-time performance, while in an office scenario, it could be set to 400ms to improve stability.

[0080] The second overlap rate is the proportion of data frames shared between two adjacent second time windows. For example, a second overlap rate of 50% can be understood as two adjacent second time windows sharing 50% of the data frames. The second overlap rate can be the same as or different from the first overlap rate. This application does not impose any restrictions on this.

[0081] The first acceleration sequence is a set of first acceleration data frames arranged in chronological order within a single second time window.

[0082] The second acceleration sequence is a set of second acceleration data frames arranged in chronological order within a single second time window.

[0083] For example, if the second time window length is set to 200ms, the sampling frequency to 100Hz, and the second overlap rate to 50%, then a single window contains 20 frames of first acceleration data. Each time, 10 new frames of data are collected, covering the earliest 10 frames of data in the window, forming a new first acceleration sequence.

[0084] It should be noted that using a time window to process acceleration data can divide continuous dynamic data into fixed-length datasets, avoiding the impact of instantaneous noise in single-frame data on tilt angle calculation, ensuring the smoothness of data in synchronous analysis, and solving the problem of judgment error caused by sudden fluctuations in motion data.

[0085] Step S32: Based on the average value of all data in the first acceleration sequence corresponding to each second time window and the gravitational acceleration, determine the first tilt angle of the first earphone module under each second time window.

[0086] The first tilt angle is an indicator for quantifying the spatial attitude of the first headphone module.

[0087] The formula for calculating the tilt angle is as follows:

[0088] in, Let a be the tilt angle, and g be the acceleration due to gravity. When az is the average of all data in the first acceleration sequence, then... This is the first tilt angle.

[0089] Step S33: Based on the average value of all data in the second acceleration sequence corresponding to each second time window and the gravitational acceleration, determine the second tilt angle of the second earphone module under each second time window.

[0090] When the value of az in the formula for calculating the tilt angle is the average of all data in the second acceleration sequence, then... This is the second tilt angle.

[0091] Step S34: The average value of the first tilt angle and the second tilt angle corresponding to each second time window is determined as the target tilt angle of the earphone in each second time window.

[0092] like Figure 4 As shown, step S40 further includes either step A41 or step B41: A41, when the candidate wearing state is wearing, if the target tilt angle corresponding to the third consecutive number of second time windows is less than the first angle threshold, it is determined that the target tilt angle satisfies the preset condition corresponding to the candidate wearing state.

[0093] The third quantity is the number of second time windows that continuously meet the wearing posture threshold condition (such as 12 or 10), which is the continuous frame verification threshold for posture verification and is used to avoid misjudgment caused by instantaneous posture fluctuations.

[0094] The first angle threshold is the critical tilt angle (e.g., 15°) for determining that the headphone module is in a stable posture that fits the head. The first angle threshold can be calibrated based on experimental data from a large number of wearing scenarios.

[0095] For example, if the third quantity is 12 and the first angle threshold is 15°, if the candidate wearing state is wearing and the target tilt angle of 12 consecutive second time windows is less than 15°, then the preset condition is met. If one window fails to meet the condition, the continuous count is reset and the process returns to step S10 for re-verification.

[0096] B41, when the candidate wearing state is not worn, if the target tilt angle corresponding to the fourth consecutive number of second time windows is greater than the second angle threshold, it is determined that the target tilt angle satisfies the preset condition corresponding to the candidate wearing state.

[0097] The fourth quantity is the number of second time windows that continuously meet the non-wearing posture threshold condition (e.g., 15, 12), which is the continuous frame verification threshold for non-wearing posture verification.

[0098] The second angle threshold is a critical tilt angle (e.g., 45°) used to determine if the earcups are not in a head-fitting position. The second angle threshold is calibrated based on a large amount of experimental data from unworn scenarios; values ​​greater than this threshold indicate that the headphone module is not in a head-fitting position.

[0099] For example, if the fourth quantity is 12 and the second angle threshold is 45°, if the candidate wearing state is not wearing, and the target tilt angle of 12 consecutive second time windows is greater than 45°, then the preset condition is met. If one window fails to meet the condition, the continuous count is reset and the process returns to step S10 for re-verification.

[0100] In this embodiment, by performing a second time window combined with overlap rate processing on the acceleration data collected by the dual IMUs, a corresponding acceleration sequence is generated. The tilt angle of the two earphone modules is calculated by combining the sequence average value with the gravitational acceleration. The average value is then taken to obtain the target tilt angle reflecting the overall spatial posture of the earphones. At the same time, different continuous frame number and angle threshold judgment rules are set for different candidate states of wearing and not wearing. This not only utilizes the hardware characteristics of symmetrical installation of dual IMUs to accurately capture the posture details of the earphones and the head, effectively eliminating the interference of non-fully worn scenarios such as neckband, half-wear, and instantaneous posture fluctuations, but also further reduces the misjudgment caused by instantaneous noise through continuous frame verification rules, making the results of static posture constraint confirmation more stable and accurate. This forms a complementary multi-dimensional judgment system with the previous dynamic synchronization screening, which greatly improves the robustness and accuracy of the overall judgment of the earphone wearing status.

[0101] In one possible implementation, if the current wearing state is "wearing", it can be determined in real time whether the candidate wearing state is "not wearing"; if the current wearing state is "not wearing", it can be determined in real time whether the candidate wearing state is "wearing", thereby reducing the amount of computation and improving efficiency.

[0102] In one possible implementation, after step S40, the earphones can be woken up again if the target wearing state is "wearing". Thus, based on the accurate determination of the target wearing state, intelligent wake-up control of the earphones is achieved, automatically waking up when worn without manual user operation, improving the user experience; at the same time, it avoids accidental wake-ups when not worn, reducing power consumption and improving battery life.

[0103] In another possible implementation, after step S30, if the target wearing state is wearing and there is a playback task to be performed, the headphones are woken up and the playback task is executed. Thus, based on intelligent wake-up, automatic execution of playback tasks is further achieved, adapting to user habits (such as automatic playback after opening a music app and wearing headphones), improving the product's intelligence level, and significantly enhancing the user experience.

[0104] In another possible implementation, after step S30, when the target wearing state is not wearing the headphones, the headphones are controlled to enter a sleep state. This achieves intelligent sleep control of the headphones, automatically putting them to sleep after removal, avoiding power waste caused by continuous operation when the headphones are not worn, and significantly improving battery life; it also prevents accidental sleep (such as brief loosening during wearing), ensuring stable use.

[0105] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method for determining the wearing state of the headphones in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0106] This application also provides a device for determining the wearing state of headphones, deployed in headphones. The headphones include a first headphone module and a second headphone module. The first headphone module contains a first inertial sensor, and the second headphone module contains a second inertial sensor. Please refer to [reference needed]. Figure 5 The device for determining the wearing status of the headphones includes: The first determining module 501 is used to determine the correlation coefficient between the first headphone module and the second headphone module based on the first angular velocity and the second angular velocity, wherein the first angular velocity is collected by the first inertial sensor and the second angular velocity is collected by the second inertial sensor; The second determining module 502 is used to determine the candidate wearing state corresponding to the earphone based on the correlation coefficient; The third determining module 503 is used to determine the target tilt angle of the earphone based on the first acceleration and the second acceleration, wherein the first acceleration is the acceleration in a preset direction collected by the first inertial sensor, and the second acceleration is the acceleration in a preset direction collected by the second inertial sensor. The fourth determining module 504 is used to determine the candidate wearing state as the target wearing state of the headphones when the target tilt angle satisfies the preset conditions corresponding to the candidate wearing state.

[0107] In one possible implementation, the first determining module 501 is used for: Based on the length of the first time window and the first overlap rate between two adjacent first time windows, the first angular velocity and the second angular velocity are processed to determine the first angular velocity sequence and the second angular velocity sequence corresponding to each first time window; Based on the similarity between the first angular velocity sequence and the second angular velocity sequence corresponding to each first time window, the correlation coefficient between the first headphone module and the second headphone module under each first time window is determined.

[0108] In one possible implementation, the second determining module 502 is used for: If the correlation coefficients corresponding to a first number of consecutive first time windows are all greater than a first correlation threshold, the candidate wearing state is determined to be wearing; or... If the correlation coefficients corresponding to a second number of consecutive first time windows are all less than the second correlation threshold, the candidate wearing state is determined to be not worn.

[0109] In one possible implementation, the third determining module 503 is used for: Based on the length of the second time window and the second overlap rate between two adjacent time windows, the first acceleration and the second acceleration are processed to determine the first acceleration sequence and the second acceleration sequence corresponding to each second time window; Based on the average value of all data in the first acceleration sequence corresponding to each second time window and the gravitational acceleration, the first tilt angle of the first earphone module under each second time window is determined; Based on the average value of all data in the second acceleration sequence corresponding to each second time window and the gravitational acceleration, the second tilt angle of the second earphone module under each second time window is determined; The average of the first tilt angle and the second tilt angle corresponding to each second time window is determined as the target tilt angle of the earphone in each second time window.

[0110] In one possible implementation, the fourth determining module 504 is used for: If, when the candidate wearing state is "wearing," the target tilt angle corresponding to a third consecutive number of second time windows is less than a first angle threshold, then the target tilt angle is determined to satisfy a preset condition corresponding to the candidate wearing state; or... If, when the candidate wearing state is not worn, the target tilt angle corresponding to the fourth consecutive number of second time windows is greater than the second angle threshold, it is determined that the target tilt angle satisfies the preset condition corresponding to the candidate wearing state.

[0111] In one possible implementation, a processing module is also included, for: When the target is in the wearing state, the earphone is woken up; If the target is in a wearing state and has a task to be played, wake up the headphones and execute the task to be played. When the target is not wearing the headphones, the headphones are controlled to enter a sleep state.

[0112] The headphone wearing status determination device provided in this application, employing the headphone wearing status determination method in the above embodiments, can solve the technical problem of how to accurately detect the wearing status of headphones. Compared with the prior art, the beneficial effects of the headphone wearing status determination device provided in this application are the same as those of the headphone wearing status determination method provided in the above embodiments, and other technical features in the headphone wearing status determination device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0113] This application provides a device for determining the wearing state of headphones. The device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the headphone wearing state determination method in the first embodiment described above.

[0114] The following is for reference. Figure 6 The diagram illustrates a structural schematic of a device suitable for determining the headphone wearing state in the embodiments of this application. The device for determining the headphone wearing state in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The device shown for determining the wearing status of headphones is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0115] like Figure 6As shown, the device for determining the headphone wearing status may include a processing unit 601 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 603 into a random access memory (RAM) 604. The RAM 604 also stores various programs and data required for the operation of the device for determining the headphone wearing status. The processing unit 601, ROM 602, and RAM 604 are interconnected via a bus 605. An input / output (I / O) interface 606 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 606: input devices 607 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 608 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 603 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows the device determining the wearing status of headphones to communicate wirelessly or wiredly with other devices to exchange data. While the figures show devices determining the wearing status of headphones with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0116] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 603, or installed from ROM 602. When the computer program is executed by processing device 601, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0117] The headphone wearing status determination device provided in this application, employing the headphone wearing status determination method in the above embodiments, can solve the technical problem of how to accurately detect the wearing status of headphones. Compared with the prior art, the beneficial effects of the headphone wearing status determination device provided in this application are the same as those of the headphone wearing status determination method provided in the above embodiments, and other technical features in this headphone wearing status determination device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0118] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0119] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0120] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the headphone wearing state determination method in the above embodiments.

[0121] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0122] The aforementioned computer-readable storage medium may be included in the device for determining the wearing state of the headphones; or it may exist independently and not assembled into the device for determining the wearing state of the headphones.

[0123] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by a device for determining the wearing state of headphones, enable the device for determining the wearing state of headphones to implement a method for determining the wearing state of headphones.

[0124] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0125] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0126] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0127] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described method for determining the wearing state of headphones, thereby solving the technical problem of how to accurately detect the wearing state of headphones. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the headphone wearing state determination method provided in the above embodiments, and will not be repeated here.

[0128] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method for determining the wearing state of headphones as described above.

[0129] The computer program product provided in this application solves the technical problem of how to accurately detect the wearing status of headphones. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the headphone wearing status determination method provided in the above embodiments, and will not be repeated here.

[0130] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

[0131] It should be noted that the data collection, tag management, rule setting, and push decision-making processes involved in this application are designed to work with other technical features to solve technical problems. They do not involve or support any illegal activities. Any data processing that may violate laws and regulations (such as unauthorized collection of privacy data, generation of discriminatory tags, setting unfair rules, or pushing illegal information) is not within the scope of protection of this application's technical solution. Of course, the user data in this application will be encrypted, anonymized, or de-identified before storage to ensure user data security.

Claims

1. A method for determining the wearing state of headphones, characterized in that, An application to headphones, wherein the headphones include a first headphone module and a second headphone module, the first headphone module includes a first inertial sensor, and the second headphone module includes a second inertial sensor, the method comprising: Based on the first angular velocity and the second angular velocity, the correlation coefficient between the first earphone module and the second earphone module is determined, wherein the first angular velocity is collected by the first inertial sensor and the second angular velocity is collected by the second inertial sensor; Based on the correlation coefficient, the candidate wearing state corresponding to the headphones is determined; The target tilt angle of the headphones is determined based on the first acceleration and the second acceleration, wherein the first acceleration is the acceleration in a preset direction collected by the first inertial sensor, and the second acceleration is the acceleration in a preset direction collected by the second inertial sensor. If the target tilt angle satisfies the preset conditions corresponding to the candidate wearing state, the candidate wearing state is determined as the target wearing state of the headphones.

2. The method as described in claim 1, characterized in that, The step of determining the correlation coefficient between the first earphone module and the second earphone module based on the first angular velocity and the second angular velocity includes: Based on the length of the first time window and the first overlap rate between two adjacent first time windows, the first angular velocity and the second angular velocity are processed to determine the first angular velocity sequence and the second angular velocity sequence corresponding to each first time window; Based on the similarity between the first angular velocity sequence and the second angular velocity sequence corresponding to each first time window, the correlation coefficient between the first headphone module and the second headphone module under each first time window is determined.

3. The method according to claim 2, characterized in that, The step of determining the candidate wearing state of the headphones based on the correlation coefficient includes: If the correlation coefficients corresponding to a first number of consecutive first time windows are all greater than a first correlation threshold, the candidate wearing state is determined to be wearing; or... If the correlation coefficients corresponding to a second number of consecutive first time windows are all less than the second correlation threshold, the candidate wearing state is determined to be not worn.

4. The method according to claim 1, characterized in that, Determining the target tilt angle of the headphones based on the first acceleration and the second acceleration includes: Based on the length of the second time window and the second overlap rate between two adjacent time windows, the first acceleration and the second acceleration are processed to determine the first acceleration sequence and the second acceleration sequence corresponding to each second time window; Based on the average value of all data in the first acceleration sequence corresponding to each second time window and the gravitational acceleration, the first tilt angle of the first earphone module under each second time window is determined; Based on the average value of all data in the second acceleration sequence corresponding to each second time window and the gravitational acceleration, the second tilt angle of the second earphone module under each second time window is determined; The average of the first tilt angle and the second tilt angle corresponding to each second time window is determined as the target tilt angle of the earphone in each second time window.

5. The method according to claim 4, characterized in that, Determining that the target tilt angle satisfies the preset condition corresponding to the candidate wearing state includes: If, when the candidate wearing state is "wearing," the target tilt angle corresponding to a third consecutive number of second time windows is less than a first angle threshold, then the target tilt angle is determined to satisfy a preset condition corresponding to the candidate wearing state; or... If, when the candidate wearing state is not worn, the target tilt angle corresponding to the fourth consecutive number of second time windows is greater than the second angle threshold, it is determined that the target tilt angle satisfies the preset condition corresponding to the candidate wearing state.

6. The method according to any one of claims 1-5, characterized in that, After determining the candidate wearing state as the target wearing state of the headphones, the method further includes any one of the following: When the target is in the wearing state, the earphone is woken up; If the target is in a wearing state and has a task to be played, wake up the headphones and execute the task to be played. When the target is not wearing the headphones, the headphones are controlled to enter a sleep state.

7. An earphone, characterized in that, The earphone is provided with a first earphone module and a second earphone module. The first earphone module is provided with a first inertial sensor, and the second earphone module is provided with a second inertial sensor.

8. A device for determining the wearing state of headphones, characterized in that, Deployed in an earphone, the earphone includes a first earphone module and a second earphone module. The first earphone module includes a first inertial sensor, and the second earphone module includes a second inertial sensor. The device for determining the earphone wearing state includes: The first determining module is used to determine the correlation coefficient between the first earphone module and the second earphone module based on the first angular velocity and the second angular velocity, wherein the first angular velocity is collected by the first inertial sensor and the second angular velocity is collected by the second inertial sensor; The second determining module is used to determine the candidate wearing state corresponding to the earphone based on the correlation coefficient; The third determining module is used to determine the target tilt angle of the earphone based on the first acceleration and the second acceleration, wherein the first acceleration is the acceleration in a preset direction collected by the first inertial sensor, and the second acceleration is the acceleration in a preset direction collected by the second inertial sensor. The fourth determining module is used to determine the candidate wearing state as the target wearing state of the headphones when the target tilt angle satisfies the preset conditions corresponding to the candidate wearing state.

9. A device for determining the wearing status of headphones, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for determining the wearing state of headphones as claimed in any one of claims 1 to 6.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the method for determining the wearing state of headphones as described in any one of claims 1 to 6.