Method for detecting state of earphone, earphone, device, and computer-readable storage medium
By employing a gyroscopic sensor to determine the earphone's position and state, the need for additional sensors is eliminated, reducing size and cost, and improving user experience with extended battery life.
Patent Information
- Application Number
- CN202110181602.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-09
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-02-09
AI Technical Summary
The in-ear detection method of existing wireless earphones requires a variety of sensor components, which occupies a large size and high cost, affecting user experience and battery life.
The position sensor (such as a gyroscope) is used to detect the position of the headphones, and determine the in-ear state of the headphones through angle calibration. There is no need for additional sensors, and the in-ear detection is directly used to realize the position sensor of the headphones.
It reduces the size and manufacturing cost of the headphones, enhances the user experience, and saves power and extends battery life by timely detecting the wearing status of the headphones.
Smart Images

Figure CN114915887B_ABST
Abstract
Description
Background Art
[0002] With the rapid development of wireless communication, the application of wireless earphones is becoming more and more extensive. Detecting whether the wireless earphones are in a worn state, that is, the in-ear state, can facilitate controlling whether the earphones play the audio data transmitted by the terminal, and thus can improve the battery life of the wireless earphones.
[0003] However, in the prior art, to achieve different detection functions, the earphones may require multiple sensor devices, which will occupy the volume of the earphones and result in a relatively high manufacturing cost.
[0004] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0005] The purpose of the present disclosure is to provide a method for detecting the state of earphones, a device for detecting the state of earphones, earphones, and a computer-readable medium, so as to at least to a certain extent reduce the manufacturing cost of the earphones while being able to detect the state of the earphones.
[0006] According to the first aspect of the present disclosure, there is provided a method for detecting the state of earphones. The earphones include a pose sensor, and the method includes:
[0007] Determining the pose of the earphones through the pose sensor;
[0008] Determining the in-ear and out-ear state of the earphones according to the pose, where the in-ear and out-ear state includes the in-ear state and the out-ear state.
[0009] According to the second aspect of the present disclosure, there is provided an earphone, characterized by including a pose sensor and a processor;
[0010] Wherein, the processor is used to execute the following steps:
[0011] Determining the pose of the earphones through the pose sensor;
[0012] Determining the in-ear and out-ear state of the earphones according to the pose, where the in-ear and out-ear state includes the in-ear state and the out-ear state.
[0013] According to the fourth aspect of the present disclosure, there is provided a device for detecting the state of earphones, including:
[0014] A pose determination module for determining the pose of the earphones through the pose sensor;
[0015] A state determination module for determining the in-ear and out-ear state of the earphones according to the pose, where the in-ear and out-ear state includes the in-ear state and the out-ear state.
[0016] According to a fifth aspect of the present disclosure, there is provided a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned method is implemented.
[0017] The method for detecting the state of an earphone provided by an embodiment of the present disclosure detects the pose of the earphone through a pose sensor provided on the earphone, and can determine the in-ear and out-ear states of the earphone according to the pose. Compared with the prior art, at least two detection functions can be realized by using the pose sensor of the earphone, the volume of the earphone can be reduced, the user experience can be enhanced, and at the same time, the manufacturing cost is reduced.
[0018] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:
[0020] Figure 1 Schematically showing a flowchart of a method for detecting the state of an earphone in an exemplary embodiment of the present disclosure;
[0021] Figure 2 Schematically showing a flowchart of how to determine the state according to the pose in an exemplary embodiment of the present disclosure;
[0022] Figure 3 Schematically showing a structural diagram of an earphone in an exemplary embodiment of the present disclosure;
[0023] Figure 4 Schematically showing a schematic diagram of an earphone in an in-ear state in an exemplary embodiment of the present disclosure;
[0024] Figure 5 Schematically showing a structural diagram of an earphone with an acceleration sensor added in an exemplary embodiment of the present disclosure;
[0025] Figure 6 Schematically showing a composition diagram of a state detection device of an earphone in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments.
[0027] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0028] In the related art, there are two ways of in-ear detection for existing wireless earphones on the market, namely the infrared detection method and the capacitance sensing method.
[0029] Among them, the infrared detection method utilizes the principle of infrared detection and internally installs an infrared transmitter and a receiver in the front shell of the earphone. When the user wears the earphone, the transmitter emits infrared rays, which pass through the IR (infrared) transparent lens on the front shell of the earphone, reach the surface skin of the human ear and are reflected, and then the reflected infrared rays are received by the receiver, thereby judging the wearing state. The capacitance sensing type is to paste an FPC (Flexible Printed Circuit) sensor on the inner wall of the front shell of the speaker. When the earphone is worn on the side, the front shell of the earphone adheres to the ear skin, and the FPC (Flexible Printed Circuit) sensor on the inner wall of the ear shell detects the capacitance change, thereby sending a signal to the chip to judge that the in-ear detection is successful.
[0030] However, for the infrared detection method, an IR (infrared) transparent lens must be added to the front shell of the earphone, which destroys the ID consistency. Making the IR lens together with the front shell plastic results in complex mold processing and high cost. The IR lens is prone to surface scratches during subsequent user use, resulting in insensitive or ineffective in-ear detection. The infrared detection device must be placed inside the front shell, occupying the volume of the earphone head. The FPC sensor in the capacitance sensing type has a large area, occupying the volume of the earphone head, and is curved, making it difficult to ensure the paste consistency in the pasting process. The FPC sensor generally spans the front and rear cavities of the speaker, and the sealing of the speaker is prone to failure during the process, requiring a higher sealing process for the speaker.
[0031] The state detection method and earphone of the exemplary embodiment of the present disclosure will be specifically described below.
[0032] Figure 1 The flowchart of a state detection method for an earphone in this exemplary embodiment is shown. Among them, the earphone includes an attitude sensor, and the method can be performed by a processor disposed in the earphone, including the following steps:
[0033] Step S110, determining the attitude of the earphone through the attitude sensor;
[0034] Step S120, determining the in-ear and out-ear state of the earphone according to the attitude, where the in-ear and out-ear state includes an in-ear state and an out-ear state.
[0035] In this solution, the attitude of the earphone is detected by the attitude sensor disposed on the earphone, and the state of the earphone is directly determined according to the attitude. Compared with the prior art, at least two detection functions can be realized by using the attitude sensor of the earphone, without additionally setting a sensor for in-ear and out-ear detection, which can reduce the volume of the earphone, enhance the user experience, and at the same time, reduce the manufacturing cost.
[0036] In step S110, the attitude of the earphone is determined through the attitude sensor.
[0037] In an exemplary embodiment of the present disclosure, with reference to Figure 2 As shown, the attitude sensor may include a gyroscope 210. The processor 220 can calibrate the angle of the gyroscope 210, and can define the angle of the gyroscope 210 when the earphone is in a preset attitude as the initial angle, where the initial angle may be 0 degrees. Among them, the gyroscope 210 may be a two-axis gyroscope 210, and the two axes of the gyroscope 210 are on the same straight line and may be parallel to the direction of gravity. The initial angle may be other degrees, such as 90 degrees, 70 degrees, etc. The direction of the axis of the gyroscope 210 can also be changed, that is, the initial angle is closely related to the direction of the axis of the gyroscope 210 and can be customized by the user, and no specific limitation is made in this exemplary embodiment.
[0038] In this exemplary embodiment, the earphone may include an earphone stem, where the preset attitude may be the state of the earphone when the straight line where the earphone stem is located is parallel to the direction of gravity, or the state of the earphone when the user wears the earphone in a sitting or standing state, and can also be customized according to the user's needs. No specific limitation is made to the preset attitude in this exemplary embodiment.
[0039] In this exemplary embodiment, the gyroscope 210 may also be a three-axis gyroscope 210, a nine-axis gyroscope 210, etc., and no specific limitation is made in this exemplary embodiment.
[0040] Determine the pose of the earphone, that is, the tilt angle of the earphone, according to the target angle detected by the gyroscope 210 and the initial angle. Specifically, the absolute value of the difference between the target angle and the initial angle can be used as the tilt angle of the earphone.
[0041] In another exemplary embodiment of the present disclosure, the earphone may include a first earphone and a second earphone. The first earphone can be worn on the user's left ear, for example, the left earphone, and the second earphone can be worn on the user's right ear, for example, the right earphone. Of course, in some cases, the first earphone can also be the right earphone, the second earphone can also be the left earphone, or it can be an earphone that does not distinguish between left and right ears, and no specific limitation is made in this exemplary embodiment.
[0042] Define the angle detected by the first gyroscope when the first earphone is in the first preset pose as the first initial angle, and define the angle detected by the second gyroscope when the second earphone is in the second preset pose as the second initial angle. Wherein, the first preset pose and the second preset pose may be the same or different, and the first initial angle and the second initial angle may be the same or different, and no specific limitation is made in this exemplary embodiment.
[0043] It should be noted that the initial angle, the first initial angle, and the second initial angle in this application are for distinction in different embodiments. Without special instructions, the initial angle, the first initial angle, and the second initial angle may be the same or different, and may also be described as the third, fourth initial angles, etc., and no limitation is made thereto.
[0044] The processor 220 can respectively detect the first target angle of the first earphone and the second target angle of the second earphone through the gyroscope 210. Specifically, use the first gyroscope provided on the first earphone to detect the first target angle of the first earphone, and use the second gyroscope provided on the second earphone to detect the second target angle of the second earphone. And use the difference between the first target angle and the first initial angle to determine the tilt angle of the first earphone, and use the difference between the second target angle and the second initial angle to determine the tilt angle of the second earphone, that is, determine the poses of the first earphone and the second earphone respectively. Determine the target pose of the first earphone according to the first initial angle and the first target angle of the first earphone detected by the first gyroscope; determine the target pose of the second earphone according to the second initial angle and the second target angle of the second earphone detected by the second gyroscope.
[0045] In step S120, determine the in-ear and out-ear state of the earphone according to the pose, and the in-ear and out-ear state includes the in-ear state and the out-ear state.
[0046] In an exemplary embodiment of the present disclosure, refer to Figure 3As shown, determining the state of the earphone according to the pose may include step S310 and step S320.
[0047] In step S310, obtain the pose information of the user;
[0048] In the present exemplary embodiment, the pose information of the user may be detected by the user terminal and transmitted to the earphone. When the earphone leaves the charging case, the processor 220 may establish a connection with the user terminal according to the historical connection record, or establish a connection with the user terminal in response to the user's connection operation, which is not specifically limited in the present exemplary embodiment.
[0049] After establishing a connection with the user terminal, the processor 220 may receive the pose information sent by the user terminal, and may collect the image information of the user through the camera provided on the user terminal, and collect the pose information of the user through the image information.
[0050] During use, after the user terminal is connected to the Bluetooth earphone, the user usually operates the user terminal. At this time, the user terminal may collect the pose information of the user. For example, after the user takes out the wireless earphone, the wireless earphone establishes a data connection with the user terminal, and the user uses the user terminal to find the music to be played. At this time, the user terminal collects the pose information of the user through the camera. Assuming that the pose information of the user collected is the upright walking state, at this time, it may be determined whether the earphone is in the in-ear state according to the target angle.
[0051] In another exemplary embodiment, the user terminal may collect the pressure data on the user terminal and the acceleration data of the user terminal, and infer the pose information of the user by using the pressure data and the acceleration data. At this time, a trained neural network model may be used to determine the pose information of the user. For example, the pressure data of the user terminal and the acceleration data of the user terminal are input into the above neural network model to obtain the pose information of the user and sent to the processor 220, so that the processor 220 determines whether the earphone is in the in-ear state by using the target angle and the pose information.
[0052] In step S320, determine the in-ear and out-ear state of the earphone according to the pose information and the pose of the earphone.
[0053] In one exemplary embodiment, the processor 220 may determine the state of the earphone according to the target angle in the above pose and the above pose information. Specifically, when the above target angle satisfies the first preset condition, the state of the above earphone is determined to be the in-ear state
[0054] Wherein, referring to Figure 4As shown, the above first preset condition is related to the posture information of the above user, the initial angle, and the direction of the axis of the gyroscope 210. For example, when it is determined that the posture information of the above user is in a walking state and the above initial angle is 0 degrees, and the axis of the gyroscope 210 is in the vertical direction, the above first preset condition may be that the target angle A is less than or equal to 30 degrees, or less than or equal to 25 degrees, which is not specifically limited in this exemplary embodiment.
[0055] In another exemplary embodiment of the present disclosure, after the processor 220 respectively determines the corresponding first target angle and second target angle of the above first earphone and the second earphone, the processor 220 may directly determine the relative pose between the first earphone and the second earphone from the above first target angle and the second target angle without judging the user's posture information. When the above relative pose meets the second preset condition, it is determined that the above earphones are in the in-ear state.
[0056] Specifically, in an exemplary embodiment, the above second preset condition is used to characterize the relative pose when both the first earphone and the second earphone are in the in-ear state of the same user. That is, meeting the second preset condition indicates that the relative pose of the first earphone and the second earphone is consistent with the pose maintained by the two earphones when the user wears the first earphone and the second earphone at the same time. The setting of the second preset condition can be determined by detecting during user wearing. For example, after the user wears the earphones, the detection mode is started, and the earphones automatically collect the relative pose of the two earphones. When it is the same as or within a certain range of the relative pose, it can be considered that the second preset condition is met. It is also possible to collect the wearing information of a large number of users to determine a preset pose range. When the relative pose of the two earphones is within this preset pose range, it is considered that the second preset condition is met. In this way, it does not require the user to collect, and it can meet the use of more users.
[0057] In another exemplary embodiment, the above second preset condition may be the standard relative pose of the first earphone and the second earphone when the first earphone and the second earphone are worn by the same user at the same time obtained through experiments and an error range set according to the experiment, which is not specifically limited in this exemplary embodiment. The above standard relative pose and the above error range can both be mapped to the angle information detected by the above gyroscope, and it is determined whether the relative pose of the above first earphone and the second earphone meets the above second preset condition according to the above first target angle and the second target angle. The above error range can be customized according to user needs, which is not specifically limited in this exemplary embodiment.
[0058] In an exemplary embodiment of the present disclosure, after determining that the above-mentioned earphone is in the in-ear state, the processor 220 may control the above-mentioned earphone to play the audio data transmitted by the user terminal. When it is determined that the earphone is not in the in-ear state, the above-mentioned audio data may be stopped, which can prevent the problem that the battery life of the earphone is reduced due to continuous playback after the user removes the earphone.
[0059] In an exemplary embodiment of the present disclosure, when it is detected that the above-mentioned relative pose does not meet the above-mentioned second preset condition, it is determined that at least one earphone is not in the in-ear state. At this time, the audio playback may be paused, or other operations may be performed, such as turning down the volume, etc., to facilitate the user's use.
[0060] In an exemplary embodiment of the present disclosure, as shown in Figure 5 the above-mentioned earphone further includes an acceleration sensor 230. When it is detected that the above-mentioned relative pose does not meet the above-mentioned second preset condition, the acceleration data of the first earphone and the second earphone are respectively detected by the above-mentioned acceleration sensor 230, and then the states of the first earphone and the second earphone may be updated according to the above-mentioned acceleration data.
[0061] Specifically, in an exemplary embodiment, when the acceleration of the first earphone is greater than the acceleration of the second earphone, and the number of times the acceleration direction of the first earphone changes within a certain time exceeds the preset number of times, it is confirmed that the first earphone is removed; if the acceleration of the first earphone is less than the acceleration of the second earphone, and the number of times the acceleration direction of the second earphone changes within a certain time exceeds the preset number of times, it is confirmed that the second earphone is removed. If the above-mentioned acceleration and the number of times the acceleration direction changes within a certain time exceed the preset number of times, for example, the number of direction changes within one second is greater than 3 times, and the number of changes within 2 seconds is greater than 4 times, etc., at this time, it can be determined that the earphone is removed, and the above-mentioned earphone may be controlled to stop playing the above-mentioned audio data. The above-mentioned certain time may be 2 seconds, 3 seconds, etc., and the preset number of times may be 3 times, 4 times, etc. It can also be customized according to user needs and is not specifically limited in this exemplary embodiment.
[0062] Since when the earphone is removed, the relative pose of the first earphone and the second earphone does not meet the above-mentioned second preset condition, and after the user removes the earphone, the acceleration direction of the earphone will change suddenly multiple times within a certain time, and both the magnitude and direction of the acceleration of the earphone will change. In this exemplary embodiment, the judgment can be mainly made for the direction change. Therefore, the above-mentioned steps can clearly judge whether the earphone is in the wearing state, and can notify to stop playing music in time after the earphone is removed by the user, so as to save the power of the earphone and extend the battery life of the earphone.
[0063] In summary, in the present exemplary embodiment, the position of the earphone is detected by the pose sensor provided on the earphone, and the state of the earphone is directly determined according to the pose. Compared with the prior art, there is no need to provide additional hardware devices on the earphone, which can reduce the volume of the sound output part of the earphone, enhance the user experience, and at the same time reduce the manufacturing cost. Further, when it is detected that the earphone is taken out of the charging case but not in the wearing state, the audio data playback function of the earphone is not turned on, which improves the battery life of the earphone.
[0064] It should be noted that the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously in, for example, multiple modules.
[0065] The present application also provides an earphone. Referring to Figure 2 as shown, it includes a pose sensor and a processor 220;
[0066] Wherein, the processor 220 is used to perform the following steps: determine the pose of the earphone through the pose sensor; determine the state of the earphone according to the pose.
[0067] When the above-mentioned processor 220 determines the pose of the earphone through the pose sensor, it can first receive the pose information of the user transmitted by the user terminal; then, when the pose information and the pose meet the preset conditions, it is determined that the earphone is in the in-ear state.
[0068] The above-mentioned pose sensor may include a gyroscope 210. The processor 220 can calibrate the angle of the above-mentioned gyroscope 210, and can define the angle of the gyroscope 210 when the earphone is in the preset pose as the initial angle. The above-mentioned initial angle may be 0 degrees. Among them, the gyroscope 210 may be a two-axis gyroscope 210, and the two axes of the above-mentioned gyroscope 210 are on the same straight line and may be parallel to the direction of gravity. The initial angle may be other degrees, such as 90 degrees, 70 degrees, etc. The direction of the axis of the gyroscope 210 can also be changed, that is, the initial angle is closely related to the direction of the axis of the gyroscope 210 and can be customized by the user. In the present exemplary embodiment, no specific limitation is made.
[0069] In the present exemplary embodiment, the above-mentioned earphone may include an earphone stem. The above-mentioned preset pose may be the state of the earphone when the straight line where the earphone stem is located is parallel to the direction of gravity, or the state of the earphone when the user wears the earphone in the left standing state or the standing state, or can be customized according to the user's needs. In the present exemplary embodiment, no specific limitation is made on the above-mentioned preset pose.
[0070] In the present exemplary embodiment, the gyroscope 210 described above may also be a three-axis gyroscope 210, a nine-axis gyroscope 210, etc., and no specific limitation is made in the present exemplary embodiment.
[0071] Determine the pose of the earphone, that is, the tilt angle of the earphone, according to the target angle detected by the gyroscope 210 and the initial angle described above. Specifically, the absolute value of the difference between the target angle and the initial angle may be used as the tilt angle of the earphone.
[0072] In another exemplary embodiment of the present disclosure,
[0073] The earphone may include a first earphone and a second earphone. The first earphone may be worn on the left ear of the user, for example, the left earphone, and the second earphone may be worn on the right ear of the user, for example, the right earphone. Of course, in some cases, the first earphone may also be the right earphone, and the second earphone may also be the left earphone, and no specific limitation is made in the present exemplary embodiment.
[0074] Define the angle detected by the first gyroscope when the first earphone is in the first preset pose as the first initial angle, and define the angle detected by the second gyroscope when the second earphone is in the second preset pose as the second initial angle. Among them, the first preset pose and the second preset pose may be the same or different, and the first initial angle and the second initial angle may be the same or different, and no specific limitation is made in the present exemplary embodiment.
[0075] It should be noted that the initial angle, the first initial angle, and the second initial angle in the present application are for distinction in different embodiments. Without special instructions, the initial angle, the first initial angle, and the second initial angle may be the same or different, and may also be described as the third, fourth initial angles, etc., and no limitation is made thereto.
[0076] The processor 220 may respectively detect the first target angle of the first earphone and the second target angle of the second earphone through the gyroscope 210. Specifically, the first gyroscope provided on the first earphone is used to detect the first target angle of the first earphone, and the second gyroscope provided on the second earphone is used to detect the second target angle of the second earphone. And the difference between the first target angle and the first initial angle is used to determine the tilt angle of the first earphone, and the difference between the second target angle and the second initial angle is used to determine the tilt angle of the second earphone, that is, the poses of the first earphone and the second earphone are respectively determined. The target pose of the first earphone is determined according to the first initial angle and the first target angle of the first earphone detected by the first gyroscope; the target position of the second earphone is determined according to the second initial angle and the second target angle of the second earphone detected by the second gyroscope.
[0077] In the present exemplary embodiment, the posture information of the user can be detected by the user terminal and transmitted to the earphone. When the earphone leaves the charging case, the processor 220 can establish a connection with the user terminal according to the historical connection record, or establish a connection with the user terminal in response to the user's connection operation, which is not specifically limited in the present exemplary embodiment.
[0078] After establishing a connection with the user terminal, the processor 220 can receive the posture information sent by the user terminal, and can collect the image information of the user through the camera set on the user terminal, and collect the posture information of the user through the image information.
[0079] During use, after the user terminal is connected to the Bluetooth earphone, the user usually operates the user terminal, and at this time, the user terminal can collect the posture information of the user. For example, when the user takes out the wireless earphone, the wireless earphone establishes a data connection with the user terminal, and the user uses the user terminal to find the music to be played. At this time, the user terminal collects the posture information of the user through the camera. Assuming that the collected posture information of the user is an upright walking state, at this time, it can be determined whether the earphone is in the in-ear state according to the target angle.
[0080] In another exemplary embodiment, the user terminal can collect the pressure data on the user terminal and the acceleration data of the user terminal, and infer the posture information of the user by using the pressure data and the acceleration data. At this time, a trained neural network model can be used to determine the posture information of the user. For example, the pressure data of the user terminal and the acceleration data of the user terminal are input into the above neural network model to obtain the posture information of the user and sent to the processor 220, so that the processor 220 can determine whether the earphone is in the in-ear state by using the target angle and the posture information.
[0081] In one exemplary embodiment, the processor 220 can determine the state of the earphone according to the target angle in the above pose and the above posture information. Specifically, when the above target angle meets the preset conditions, the state of the above earphone is determined to be the in-ear state
[0082] Among them, with reference to Figure 4 As shown, the above preset conditions are all related to the above posture information of the user, the initial angle, and the direction of the axis of the gyroscope 210. For example, when it is determined that the above posture information of the user is a walking state and the above initial angle is 0 degrees, and the axis of the gyroscope 210 is in the vertical direction, the above preset condition can be that the target angle is less than or equal to 30 degrees, or less than or equal to 25 degrees, which is not specifically limited in the present exemplary embodiment.
[0083] In another exemplary embodiment of the present disclosure, after the processor 220 respectively determines the corresponding first target angle and the second target angle of the first earphone and the second earphone, the processor 220 may directly determine the relative pose between the first earphone and the second earphone based on the magnitudes of the first target angle and the second target angle without determining the user's pose information. When the relative pose satisfies the second preset condition, it is determined that the earphones are in the in-ear state.
[0084] Specifically, in one exemplary embodiment, the second preset condition is used to characterize the relative pose of the first earphone and the second earphone when both are in the in-ear state of the same user. That is, satisfying the second preset condition indicates that the relative pose of the first earphone and the second earphone conforms to the pose maintained by the two earphones when the user wears the first earphone and the second earphone at the same time. The second preset condition can be determined by detecting during user wearing. For example, after the user wears the earphones, the detection mode is started, and the earphones automatically collect the relative pose of the two earphones. When it is the same as or within a certain range of the relative pose, it can be considered that the second preset condition is satisfied. It is also possible to collect the wearing information of a large number of users to determine a preset pose range. When the relative pose of the two earphones is within this preset pose range, it is considered that the second preset condition is satisfied. In this way, there is no need for the user to collect, and it can meet the use of more users.
[0085] In another exemplary embodiment, the second preset condition may be the standard relative pose of the first earphone and the second earphone when they are worn by the same user at the same time obtained through experiments and an error range set according to the experiment, which is not specifically limited in this exemplary embodiment. The standard relative pose and the error range can both be mapped to the angle information detected by the gyroscope. Based on the first target angle and the second target angle, it is determined whether the relative pose of the first earphone and the second earphone satisfies the second preset condition. The error range can be customized according to user needs and is not specifically limited in this exemplary embodiment.
[0086] In one exemplary embodiment of the present disclosure, after determining that the earphones are in the in-ear state, the processor 220 may control the earphones to play the audio data transmitted by the user terminal. When it is determined that the earphones are not in the in-ear state, the audio data is stopped, which can prevent the problem that the battery life of the earphones is reduced due to continuous playback after the user removes the earphones.
[0087] In one exemplary embodiment of the present disclosure, when it is detected that the relative pose does not satisfy the second preset condition, it is determined that at least one earphone is not in the in-ear state. At this time, the audio playback can be paused, or other operations can be performed, such as turning down the volume, etc., to facilitate user use.
[0088] In an exemplary embodiment of the present disclosure, referring to as shown in Figure 5 The above-mentioned earphone further includes an acceleration sensor 230. When it is detected that the relative pose does not meet the second preset condition, the acceleration data of the first earphone and the second earphone are respectively detected by the above-mentioned acceleration sensor 230, and then the states of the first earphone and the second earphone can be updated according to the acceleration data.
[0089] Specifically, in an exemplary embodiment, when the acceleration of the first earphone is greater than that of the second earphone, and the number of times the acceleration direction of the first earphone changes within a certain time exceeds the preset number of times, it is confirmed that the first earphone is taken off; if the acceleration of the first earphone is less than that of the second earphone, and the number of times the acceleration direction of the second earphone changes within a certain time exceeds the preset number of times, it is confirmed that the second earphone is taken off. If the above acceleration and the number of times the acceleration direction changes within a certain time exceed the preset number of times, for example, the number of direction changes is greater than 3 times within one second, and greater than 4 times within 2 seconds, etc., at this time, it can be determined that the above earphone is taken off, and the above earphone can be controlled to stop playing the above audio data. Wherein the above certain time can be 2 seconds, 3 seconds, etc., and the preset number of times can be 3 times, 4 times, etc. It can also be customized according to user needs and is not specifically limited in this exemplary embodiment.
[0090] Since when the earphone is taken off, the relative pose of the first earphone and the second earphone does not meet the second preset condition, and after the user takes off the earphone, the acceleration of the earphone will mutate multiple times within a certain time. Therefore, using the above steps can clearly determine whether the earphone is in a worn state, and can notify to stop playing music in time after the earphone is taken off by the user, so as to save the power of the earphone and extend the battery life of the earphone.
[0091] The embodiments, implementation manners and their technical features in the above method can be combined with each other without conflict. For example, the method of determining the in-ear state through user pose information and the pose of the earphone and the method of using the relative pose of the second earphone to determine the in-ear state of the earphone can be integrated and applied in the same earphone. When it is determined that the earphone is in the single-user mode, the method of using the relative pose of the left second earphone to determine the in-ear state of the earphone can be adopted. When the earphone is in the dual-user mode, the method of determining the in-ear state through user pose information and the pose of the earphone can be adopted. Of course, it can also be comprehensively judged in multiple ways to increase the accuracy of judgment, and this is not limited. The above single-user mode and dual-user mode can be controlled and selected by the user, or automatically detected by the earphone, and this is not limited.
[0092] The specific details of each module in the above earphone have been described in detail in the implementation manner of the method part. The details not disclosed can be referred to the implementation manner content of the method part, and thus will not be elaborated.
[0093] Those skilled in the art of the present disclosure can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "system" here.
[0094] Further, referring to Figure 6 As shown, in the embodiment of this example, a state detection device 600 for an earphone is further provided, including a pose determination module 610 and a state determination module 620. Among them:
[0095] The pose determination module 610 can be used to determine the pose of the earphone through a pose sensor; the state determination module 620 can be used to determine the in-ear and out-ear states of the earphone according to the pose, and the in-ear and out-ear states include the in-ear state and the out-ear state.
[0096] In an exemplary embodiment, the pose sensor includes a gyroscope. The angle detected by the gyroscope when the earphone is in a preset pose is defined as the initial angle. The pose determination module 610 can be used to determine the pose of the earphone according to the initial angle and the target angle detected by the gyroscope.
[0097] In an exemplary embodiment, the earphone includes a first earphone and a second earphone. The pose sensor includes a first gyroscope located in the first earphone and a second gyroscope located in the second earphone. The angle detected by the first gyroscope when the first earphone is in a first preset pose is defined as the first initial angle, and the angle detected by the second gyroscope when the second earphone is in a second preset pose is defined as the second initial angle. The pose determination module 610 can be used to determine the target pose of the first earphone according to the first initial angle and the first target angle of the first earphone detected by the first gyroscope; and determine the target pose of the second earphone according to the second initial angle and the second target angle of the second earphone detected by the second gyroscope.
[0098] In an exemplary embodiment, the state determination module 620 can also be used to determine the relative pose between the first earphone and the second earphone according to the target pose of the first earphone and the target pose of the second earphone. When the relative pose meets the second preset condition, it is determined that the earphone is in the in-ear state; and / or when the relative pose does not meet the second preset condition, it is determined that at least one of the earphones is in the out-ear state.
[0099] In an exemplary implementation manner of the present disclosure, referring to as Figure 5As shown, the above-mentioned earphone further includes an acceleration sensor 230. When it is detected that the relative pose does not meet the above second preset condition, the acceleration data of the first earphone and the second earphone are respectively detected by the above acceleration sensor 230, and then the states of the first earphone and the second earphone can be updated according to the above acceleration data.
[0100] Specifically, in an exemplary embodiment, when the acceleration of the first earphone is greater than that of the second earphone, and the number of times the acceleration direction of the first earphone changes within a certain time exceeds a preset number of times, it is confirmed that the first earphone is taken off; if the acceleration of the first earphone is less than that of the second earphone, and the number of times the acceleration direction of the second earphone changes within a certain time exceeds a preset number of times, it is confirmed that the second earphone is taken off. If the above acceleration and the number of times the acceleration direction changes within a certain time exceed the preset number of times, for example, when the number of direction changes within one second is greater than 3 times, and the number of changes within 2 seconds is greater than 4 times, etc., it is determined that the earphone is taken off. At this time, the above earphone can be controlled to stop playing the above audio data. The above certain time can be 2 seconds, 3 seconds, etc., and the preset number of times can be 3 times, 4 times, etc. It can also be customized according to user needs and is not specifically limited in this exemplary embodiment.
[0101] Since when the earphone is taken off, the relative pose of the first earphone and the second earphone does not meet the above second preset condition, and after the user takes off the earphone, the acceleration direction of the earphone will change suddenly multiple times within a certain time, where both the magnitude and direction of the acceleration of the earphone will change. In this exemplary embodiment, the judgment can be mainly made for the direction change. Therefore, using the above steps can clearly judge whether the earphone is in a worn state, and can notify to stop playing music in time after the earphone is taken off by the user, so as to save the power of the earphone and extend the battery life of the earphone.
[0102] The specific details of each module in the above device have been described in detail in the method part of the embodiment. The details not disclosed can be seen in the content of the method part of the embodiment, and thus will not be repeated.
[0103] The exemplary embodiment of the present disclosure also provides a computer-readable storage medium, on which there is a program product capable of implementing the above method of this specification. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" part of this specification, for example, it can execute Figures 1 to 3 any one or more of the steps.
[0104] It should be noted that the computer-readable medium shown in this disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0105] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in this disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.
[0106] In addition, the program code for performing the operations of this disclosure can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, by using an Internet service provider to connect through the Internet).
[0107] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known or customary technical means in the art not disclosed herein. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
[0108] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A method for detecting the state of an earphone, characterized in that, The earphone includes a pose sensor, and the method includes: Determining the pose of the earphone through the pose sensor; Obtaining the posture information of the user, and determining the in-ear and out-ear state of the earphone according to the posture information and the pose of the earphone, where the in-ear and out-ear state includes the in-ear state and the out-ear state; Wherein, the pose sensor includes a gyroscope, and the angle detected by the gyroscope when the earphone is in a preset pose is defined as the initial angle. The determining the pose of the earphone through the pose sensor includes: determining the pose of the earphone according to the initial angle and the target angle detected by the gyroscope; The determining the in-ear and out-ear state of the earphone according to the posture information and the pose of the earphone includes: determining the angle range of the earphone in the in-ear state according to the posture information and the initial angle; receiving the target angle detected by the gyroscope, and determining the in-ear and out-ear state of the earphone according to the target angle and the angle range.
2. The method according to claim 1, wherein Obtaining the posture information of the user includes: Receiving the posture information of the user transmitted by the user terminal.
3. The method according to claim 1, wherein The earphone includes an earphone stem, and the preset pose includes the pose of the earphone when the straight line where the earphone stem is located is parallel to the gravity direction.
4. The method according to claim 1, wherein The determining the in-ear and out-ear state of the earphone according to the target angle and the angle range includes: When the target angle is within the angle range, determining that the earphone is in the in-ear state; When the target angle is not within the angle range, determining that the earphone is in the out-ear state.
5. A headset, characterized in that, Includes a pose sensor and a processor; Wherein, the processor is configured to perform the following steps: Determining the pose of the earphone through the pose sensor; Obtaining the posture information of the user, and the in-ear and out-ear state includes the in-ear state and the out-ear state; Wherein, the pose sensor includes a gyroscope, and the angle detected by the gyroscope when the earphone is in a preset pose is defined as the initial angle. The determining the pose of the earphone through the pose sensor includes: determining the pose of the earphone according to the initial angle and the target angle detected by the gyroscope; The determining the in-ear and out-ear state of the earphone according to the posture information and the pose of the earphone includes: determining the angle range of the earphone in the in-ear state according to the posture information and the initial angle; Receiving the target angle detected by the gyroscope, and determining the in-ear and out-ear state of the earphone according to the target angle and the angle range.
6. The earphone according to claim 5, characterized in that, The determining manner of the posture information includes: Receiving the posture information of the user transmitted by the user terminal.
7. The earphone according to claim 5, characterized in that, The determining the in-ear and out-ear state of the earphone according to the target angle and the angle range includes: When the target angle is within the angle range, determining that the earphone is in the in-ear state; When the target angle is not within the angle range, determining that the earphone is in the out-ear state.
8. A state detection device for an earphone, characterized in that, The earphone includes a pose sensor, and the device includes: A pose determination module, configured to determine the pose of the earphone through the pose sensor; A state determination module, configured to determine the in-ear and out-ear state of the earphone according to the pose, where the in-ear and out-ear state includes the in-ear state and the out-ear state; Among them, the pose sensor includes a gyroscope. The angle detected by the gyroscope when the earphone is in a preset pose is defined as the initial angle. Determining the pose of the earphone by the pose sensor includes: determining the pose of the earphone according to the initial angle and the target angle detected by the gyroscope; Determining the in-ear and out-ear state of the earphone according to the pose includes: obtaining the posture information of the user, and determining the in-ear and out-ear state of the earphone according to the posture information and the pose of the earphone; Determining the in-ear and out-ear state of the earphone according to the posture information and the pose of the earphone includes: determining the angular range of the earphone in the in-ear state according to the posture information and the initial angle; receiving the target angle detected by the gyroscope, and determining the in-ear and out-ear state of the earphone according to the target angle and the angular range.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the in-ear detection method of the earphone as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Wearing condition detection method and apparatus of wireless earphone, and wireless earphone
CN108966087A
Earphone control method, earphone and storage medium
CN109714664A
Method of checking earphone wearing state
US20140093088A1