Headphone status detection method, device, equipment and storage medium
Patent Information
- Application Number
- CN202110817158.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-19
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-07-19
Smart Images

Figure CN113596656B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of earphone technology, and in particular to an earphone state detection method, device, equipment and storage medium. Background Art
[0002] In recent years, with the development of the True Wireless Stereo (TWS) headset market, the technology has been continuously improved, the number of users has been increasing, and individual users have higher and higher requirements for the experience of TWS headsets. At present, TWS headsets are mostly in-ear or semi-in-ear. For in-ear detection, optical detection or capacitive detection solutions are currently used on the market. The optical detection solution requires drilling holes on the surface of the headset to let light through, which is not conducive to the waterproof design of the headset. In addition, a large number of headset products use a single optical path detection solution, which will cause the headset to be easily triggered when encountering materials that block the optical path when not worn, resulting in unnecessary power consumption. The capacitive detection solution is easily affected by temperature, especially in high-latitude areas. Since it only detects the change in capacitance, it may be much larger than the change in headset capacitance, and it is very easy to make a misjudgment, resulting in the failure of wearing detection.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present invention is to provide a headphone status detection method, device, equipment and storage medium, aiming to solve the technical problem of how to improve the accuracy of headphone status detection in the prior art.
[0005] To achieve the above object, the present invention provides a method for detecting a headphone state, the method comprising the following steps:
[0006] Get the distance information between the headset and the target detection point;
[0007] If the distance information is less than a preset distance threshold, obtaining the position information of the headset;
[0008] The usage status of the headset is determined according to the position information of the headset.
[0009] Optionally, if the distance information is less than a preset distance threshold, obtaining the position information of the headset includes:
[0010] If the distance information is less than a preset distance threshold, obtaining motion data of the earphone;
[0011] If the motion data meets the static state condition, the orientation information of the earphone is determined according to the acceleration sensor, wherein the static state condition is a state in which a change value of the motion data within a preset time period is within a preset interval.
[0012] Optionally, if the distance information is less than a preset distance threshold, after obtaining the motion data of the earphone, the method further includes:
[0013] If the motion data meets the motion state condition, the step of obtaining the distance information between the earphone and the target detection point is re-executed, wherein the motion state condition is a state in which the change value of the motion data within a preset time period is outside a preset interval.
[0014] Optionally, if the motion data satisfies a stationary state condition, determining the orientation information of the earphone according to an acceleration sensor includes:
[0015] If the motion data meets the stationary state condition, the position information of the earphone is determined according to a preset coordinate system.
[0016] Optionally, determining the usage status of the headset according to the orientation information of the headset includes:
[0017] Acquire the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information;
[0018] If the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determining the use state of the headset according to the vertical axis coordinate orientation information and the vertical axis coordinate orientation information, wherein the first coordinate orientation information is greater than the second coordinate orientation information;
[0019] If the longitudinal coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, the use status of the headset is determined according to the horizontal axis coordinate orientation information and the vertical axis coordinate orientation information.
[0020] Optionally, if the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determining the use state of the headset according to the vertical axis coordinate orientation information and the vertical axis coordinate orientation information includes:
[0021] If the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determine whether the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, wherein the third coordinate orientation information is greater than the fourth coordinate orientation information;
[0022] If the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, determine whether the longitudinal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information, wherein the fifth coordinate orientation information is greater than the sixth coordinate orientation information;
[0023] If the vertical axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information, the usage status of the headset is determined.
[0024] Optionally, if the longitudinal coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determining the use state of the headset according to the horizontal axis coordinate orientation information and the vertical axis coordinate orientation information includes:
[0025] If the longitudinal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determine whether the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information;
[0026] If the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, determine whether the horizontal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information;
[0027] If the horizontal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information, the usage status of the headset is determined.
[0028] In addition, to achieve the above object, the present invention further provides an earphone status detection device, the earphone status detection device comprising:
[0029] An acquisition module is used to obtain the distance information between the headset and the target detection point;
[0030] A position confirmation module, configured to obtain the position information of the headset if the distance information is less than a preset distance threshold;
[0031] The status confirmation module is used to determine the usage status of the headset according to the orientation information of the headset.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also proposes a headphone status detection device, which includes: a memory, a processor, and a headphone status detection program stored in the memory and executable on the processor, and the headphone status detection program is configured to implement the steps of the headphone status detection method described above.
[0033] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a headphone status detection program is stored, and when the headphone status detection program is executed by a processor, the steps of the headphone status detection method described above are implemented.
[0034] The headphone status detection method proposed in the present invention obtains the distance information between the headphone and the target detection point; if the distance information is less than a preset distance threshold, obtains the orientation information of the headphone; and determines the usage status of the headphone according to the orientation information of the headphone. By judging that the distance between the headphone and the target detection object is beyond the preset distance threshold, the orientation information of the headphone is determined, and finally a comprehensive judgment of the in-ear and out-ear status is made through the directional detection method of the orientation information, thereby improving the accuracy of the headphone status detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a structural diagram of a headset status detection device in a hardware operating environment involved in an embodiment of the present invention;
[0036] Figure 2 This is a flow chart of a first embodiment of a method for detecting a headphone status according to the present invention;
[0037] Figure 3 This is a flow chart of a second embodiment of a method for detecting a headphone state according to the present invention;
[0038] Figure 4 It is a flowchart of a third embodiment of a method for detecting a headphone state according to the present invention;
[0039] Figure 5 FIG. 4 is a structural block diagram of a first embodiment of a headphone status detection device according to the present invention.
[0040] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0041] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0042] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the structure of a headset status detection device in a hardware operating environment involved in an embodiment of the present invention.
[0043] like Figure 1As shown, the headset status detection device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0044] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the headphone status detection device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0045] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a headset status detection program.
[0046] exist Figure 1 In the headphone status detection device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the headphone status detection device of the present invention can be set in the headphone status detection device, and the headphone status detection device calls the headphone status detection program stored in the memory 1005 through the processor 1001, and executes the headphone status detection method provided by an embodiment of the present invention.
[0047] Based on the above hardware structure, an embodiment of a method for detecting earphone status of the present invention is proposed.
[0048] The embodiment of the present invention provides a method for detecting the state of an earphone. Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of a method for detecting earphone status according to the present invention.
[0049] In a first embodiment, the earphone status detection method comprises the following steps:
[0050] Step S10: Obtaining distance information between the earphone and the target detection point.
[0051] It should be noted that the executor of this embodiment may be a headset status detection device, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment, the headset status detection device is taken as an example for description.
[0052] It should be understood that the distance information between the earphone and the target detection point can be collected by a distance sensor, wherein the distance sensor can be set in the earphone, the earphone can be a TWS earphone, and the target detection point can be a body part of the earphone wearer, such as an ear, which is not limited in this embodiment. The distance sensor can be an infrared distance sensor, an optical distance sensor, and an ultrasonic distance sensor, etc., which is not limited in this embodiment. In the specific implementation process, the infrared distance sensor can be used as an example for explanation. Therefore, the distance sensor emits an infrared light source and determines whether it is close to or far from the target detection point by receiving the reflection intensity, thereby sensing the distance information between the earphone and the target detection point.
[0053] Step S20: If the distance information is less than a preset distance threshold, obtain the position information of the headset.
[0054] It can be understood that the preset distance threshold can be set by those skilled in the art, and this embodiment does not limit this. By judging whether the distance information between the earphone and the wearer of the earphone is less than the preset distance threshold, if the distance information between the earphone and the wearer of the earphone is less than the preset distance threshold, the acceleration sensor is turned on. In the specific implementation process, the acceleration sensor can be a three-axis acceleration sensor, and the motion data of the earphone is detected by the acceleration sensor. The state of the earphone movement can be determined according to the motion data, wherein the state of the earphone movement includes a static state and a moving state. If the motion data meets the static state condition, the orientation information of the earphone is determined by a preset coordinate system. If the motion data meets the moving state condition, it means that the earphone may be in a state of being worn, and the distance needs to be re-judged, so the step of obtaining the distance information between the earphone and the target detection point can be re-executed.
[0055] It should be noted that the acceleration sensor can be set in the headset, and this embodiment does not limit this. Therefore, when the headset is out of the box, the acceleration sensor and the distance sensor can be directly initialized. The orientation information can be the coordinate orientation information of the headset wearer in the coordinate system established with the acceleration sensor as the center.
[0056] Furthermore, if the distance information between the earphone and the wearer of the earphone is greater than or equal to the preset distance information, it means that the earphone is not in the ear at this time, so the operation of obtaining the distance information between the earphone and the target detection point can be re-executed.
[0057] Step S30: determining the usage status of the headset according to the orientation information of the headset.
[0058] It should be understood that the usage status of the earphone includes an in-ear state and a not-in-ear state. In the specific implementation process, the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information can be obtained. Based on the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information, the usage status of the earphone can be confirmed by detecting whether the coordinate orientation information is within the pre-debugging judgment range.
[0059] It should be noted that, since the wearer may be in an upright or lying position when the earphones are inserted into the ears, it is necessary to consider that the wearer of the earphones has an upright position and a lying position when the earphones are inserted into the ears, and different judgment conditions are included for the upright position and the lying position. Therefore, it is possible to judge whether the upright position-based and the lying position-based are within the corresponding pre-adjustment judgment range, so that it can be more accurately confirmed whether the earphone wearer is in the upright position and the lying position.
[0060] This embodiment acquires the distance information between the earphone and the target detection point by acquiring the distance sensor; when the distance information is less than the preset distance threshold, the acceleration sensor is turned on, and the motion data of the earphone is detected by the acceleration sensor. If the earphone is in a stationary state, the orientation information of the earphone is acquired; and whether it is within the pre-debugging judgment range is determined according to the orientation information of the earphone. If it is within the pre-debugging judgment range, the use status of the earphone can be determined. By determining that the distance between the earphone and the target detection object is beyond the preset distance threshold, the orientation information of the earphone is determined, and finally a comprehensive judgment of the in-ear and out-ear status is performed by the orientation information directional detection method, thereby improving the accuracy of the earphone status detection.
[0061] In one embodiment, reference Figure 3 , Figure 3 The figure is a flow chart of a second embodiment of a method for detecting earphone status according to the present invention.
[0062] Based on the first embodiment, the headphone status detection method of this embodiment includes, in step S20:
[0063] Step S201: if the distance information is less than a preset distance threshold, obtain motion data of the earphone.
[0064] It should be noted that the motion data may be the acceleration data of the earphones collected by the acceleration sensor within a preset time period, wherein the preset time period may be set according to the collection requirements, and may be 0.5s in the specific implementation process. When the distance information is less than the preset distance threshold, it indicates that the earphones are close to the wearer. Therefore, the acceleration sensor may be turned on, and the changes in the acceleration data collected by the acceleration sensor may be used to determine whether the earphones are in motion or at rest.
[0065] Furthermore, after implementing step S201, the method further includes:
[0066] If the motion data meets the motion state condition, step S10 is executed again, wherein the motion state condition is a state in which the change value of the motion data within a preset time period is outside a preset interval.
[0067] It should be understood that if the change value of the added motion data within a preset time period collected by the acceleration sensor is outside the preset interval, it means that the earphone is in motion, wherein the change value of the added motion data can be the difference between the maximum acceleration value and the minimum acceleration value in the added motion data. The preset interval can be set by a technician in this field, and this embodiment does not limit this. The current usage status of the earphone is not in the ear, so it is necessary to re-execute the step of obtaining the distance information between the earphone and the target detection point.
[0068] Step S202: If the motion data meets a stationary state condition, determine the orientation information of the earphone, wherein the motion state condition is that the motion data is in a changing state within a preset time period.
[0069] It can be understood that if the change value of the acceleration data collected by the acceleration sensor within a preset time period is outside the preset range, it means that the earphone is in a stationary state, so the orientation information of the earphone can be determined by the preset coordinate system.
[0070] Further, step S202 includes:
[0071] If the motion data meets the stationary state condition, the position information of the earphone is determined according to a preset coordinate system.
[0072] It should be noted that the preset coordinate system can be a spatial coordinate system established with the position of the accelerometer as the center. This embodiment does not limit this. If the motion data meets the condition that the earphone is in a stationary state, the accelerometer coordinate axis is calibrated and debugged in advance according to the position and assembly direction of the accelerometer in the earphone, and the three coordinate axes X, Y and Z are pre-set to determine the coordinate system direction of the accelerometer, where the direction of the Z axis is the direction of the rod body of the earphone, the direction of the X axis is the perpendicular direction of the plane where the sound port of the earphone is located, and the direction of the Y axis is perpendicular to both the X axis and the Z axis.
[0073] It can be understood that the orientation information is determined by 6D direction identification based on the coordinate system direction and motion data, and this embodiment does not limit this. The orientation information includes horizontal axis coordinate orientation information, vertical axis coordinate orientation information, and vertical axis coordinate orientation information.
[0074] This embodiment acquires the distance information between the earphone and the target detection point by acquiring the distance sensor; if the distance information is less than the preset distance threshold, the motion data of the earphone is acquired, and the motion data meets the motion state condition, and the step of acquiring the distance information between the earphone and the target detection point is re-executed; if the motion data meets the static state condition, the orientation information of the earphone is determined according to the preset coordinate system; thereby determining whether it is within the pre-debugging judgment range based on the coordinate orientation information of the orientation information, and if it is within the pre-debugging judgment range, the usage status of the earphone can be determined. By determining that the distance between the earphone and the target detection object is beyond the preset distance threshold, the orientation information of the earphone is determined, and finally a comprehensive judgment of the in-ear and out-ear status is made through the orientation information, thereby further improving the efficiency of the accuracy of the earphone status detection.
[0075] In one embodiment, reference Figure 4 , Figure 4 FIG. 4 is a flow chart of a third embodiment of a method for detecting a headphone status according to the present invention.
[0076] Based on the above earphone status detection embodiment, step S30 includes:
[0077] Step S301: Acquire the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information.
[0078] It can be understood that the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information can be the coordinate values of the three axes of X, Y and Z of the headset collected by the acceleration sensor through 6D direction recognition. In the specific implementation process, G(X) can be used to represent the horizontal axis coordinate orientation information, G(Y) can be used to represent the vertical axis coordinate orientation information, and G(Z) can be used to represent the vertical axis coordinate orientation information. This embodiment does not limit this.
[0079] Step S302: If the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determine the usage status of the headset according to the vertical axis coordinate orientation information and the vertical axis coordinate orientation information, wherein the first coordinate orientation information is greater than the second coordinate orientation information.
[0080] Furthermore, the step S302 includes:
[0081] If the horizontal axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, determine whether the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information, where the third coordinate azimuth information is greater than the fourth coordinate azimuth information.
[0082] It can be understood that the first coordinate azimuth information, the second coordinate azimuth information, the third coordinate azimuth information, and the fourth coordinate azimuth information can be judgment range information pre-adjusted by those skilled in the art. This embodiment does not limit this. For the convenience of understanding, the first coordinate azimuth information can be represented by a, the second coordinate azimuth information can be represented by b, the third coordinate azimuth information can be represented by c, and the fourth coordinate azimuth information can be represented by d, where a > b and c > d.
[0083] It should be understood that when first determining whether the horizontal axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, by judging that if the horizontal axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, that is, G(X) > a or G(X) < b, then further determine whether the vertical axis coordinate azimuth information G(Z) is greater than the third coordinate azimuth information c or less than the fourth coordinate azimuth information d.
[0084] If the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information, determine whether the longitudinal axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information, where the fifth coordinate azimuth information is greater than the sixth coordinate azimuth information.
[0085] It can be understood that the fifth coordinate azimuth information and the sixth coordinate azimuth information can be judgment range information pre-adjusted by those skilled in the art. This embodiment does not limit this. For the convenience of understanding, the fifth coordinate azimuth information can be represented by e, and the sixth coordinate azimuth information can be represented by f, where f > e.
[0086] It should be understood that by judging that if the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information, that is, G(Z) > c or G(Z) < d, then further determine whether the longitudinal axis coordinate azimuth information G(Y) is greater than the fifth coordinate azimuth information e and less than the sixth coordinate azimuth information f.
[0087] If the longitudinal axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information, determine the usage state of the earphone.
[0088] It should be understood that by judging that if the vertical axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information, that is, e < G(Y) < f, it can be determined that the earphone is in the use state, and its use state is the in-ear state. And considering that the wearer has an upright posture state and a lying posture state, so through the above judgment, it can be further determined that the earphone is in the in-ear state of the upright posture state. If the above judgment conditions are not met, it means that the earphone is in the non-in-ear state. Therefore, it is necessary to reset and execute the step of obtaining the distance information between the earphone and the target detection point.
[0089] Step S303: If the vertical axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, determine the use state of the earphone according to the horizontal axis coordinate azimuth information and the vertical axis coordinate azimuth information.
[0090] Further, the step S303 includes:
[0091] If the vertical axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, judge whether the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information.
[0092] It should be understood that first judge whether the vertical axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information. If the vertical axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, that is, G(Y) > a or G(Y) < b, then further judge whether the vertical axis coordinate azimuth information G(Z) is greater than the third coordinate azimuth information c or less than the fourth coordinate azimuth information d.
[0093] If the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information, judge whether the horizontal axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information.
[0094] It can be understood that by judging that if the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information, that is, G(Z) > c or G(Z) < d, then further judge whether the horizontal axis coordinate azimuth information G(X) is greater than the fifth coordinate azimuth information e and less than the sixth coordinate azimuth information f.
[0095] If the horizontal axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information, determine the use state of the earphone.
[0096] It should be understood that by determining that if the horizontal axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information, that is, e < G(X) < f, it can be determined that the earphone is in a use state, and its use state is the in-ear state. Considering that the wearer has an upright posture state and a lying posture state, therefore, through the above judgment, it can be further determined that the earphone is in the in-ear state in the lying posture state. If the above judgment conditions are not met, it means that the use state of the earphone is in the non-in-ear state. Therefore, it is necessary to reset and execute the step of obtaining the distance information between the earphone and the target detection point.
[0097] In this embodiment, the horizontal axis coordinate azimuth information, the vertical axis coordinate azimuth information, and the vertical axis coordinate azimuth information of the azimuth information are obtained; by judging that if the horizontal axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, it is judged whether the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information; if the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information, it is judged whether the vertical axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information; if the vertical axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information, it is determined that the use state of the earphone is the in-ear state in the upright posture state. By judging that if the vertical axis coordinate azimuth information is greater than the first coordinate azimuth information or less than the second coordinate azimuth information, it is judged whether the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information; when the vertical axis coordinate azimuth information is greater than the third coordinate azimuth information or less than the fourth coordinate azimuth information, it is judged whether the horizontal axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information; if the horizontal axis coordinate azimuth information is greater than the fifth coordinate azimuth information and less than the sixth coordinate azimuth information, it is determined that the use state of the earphone is the ear state in the lying posture state, thereby further improving the accuracy of earphone state detection.
[0098] In addition, an embodiment of the present invention also proposes a storage medium, on which an earphone state detection program is stored. When the earphone state detection program is executed by a processor, the steps of the earphone state detection method described above are implemented.
[0099] Since this storage medium adopts all the technical solutions of the above-mentioned all embodiments, it at least has all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, and will not be elaborated here one by one.
[0100] Refer to Figure 5 , Figure 5 which is the structural block diagram of the first embodiment of the earphone state detection device of the present invention.
[0101] As Figure 5 shown, the earphone state detection device proposed by the embodiment of the present invention includes:
[0102] The acquisition module 10 is used to acquire the distance information between the earphone and the target detection point.
[0103] It should be understood that the distance information between the earphone and the target detection point can be collected by a distance sensor, wherein the distance sensor can be set in the earphone, the earphone can be a TWS earphone, and the target detection point can be a body part of the earphone wearer, such as an ear, which is not limited in this embodiment. The distance sensor can be an infrared distance sensor, an optical distance sensor, and an ultrasonic distance sensor, etc., which is not limited in this embodiment. In the specific implementation process, the infrared distance sensor can be used as an example for explanation. Therefore, the distance sensor emits an infrared light source and determines whether it is close to or far from the target detection point by receiving the reflection intensity, thereby sensing the distance information between the earphone and the target detection point.
[0104] It should be noted that the preset distance threshold can be set by a person skilled in the art, and this embodiment does not limit this. By judging whether the distance information between the earphone and the wearer of the earphone is within the preset distance threshold, if the distance information between the earphone and the wearer of the earphone is greater than or equal to the preset distance information, it means that the earphone is not in the ear at this time, so the operation of obtaining the distance information between the earphone and the target detection point can be re-executed.
[0105] The position confirmation module 20 is used to obtain the position information of the headset if the distance information is less than a preset distance threshold.
[0106] It can be understood that the preset distance threshold can be set by those skilled in the art, and this embodiment does not limit this. By judging whether the distance information between the earphone and the wearer of the earphone is less than the preset distance threshold, if the distance information between the earphone and the wearer of the earphone is less than the preset distance threshold, the acceleration sensor is turned on. In the specific implementation process, the acceleration sensor can be a three-axis acceleration sensor, and the motion data of the earphone is detected by the acceleration sensor. The state of the earphone movement can be determined according to the motion data, wherein the state of the earphone movement includes a static state and a moving state. If the motion data meets the static state condition, the orientation information of the earphone can be determined by the preset coordinate system. If the motion data meets the moving state condition, it means that the earphone may be in a state of being worn, and the distance needs to be re-judged, so the step of obtaining the distance information between the earphone and the target detection point can be re-executed.
[0107] It should be noted that the acceleration sensor can be set in the headset, and this embodiment does not limit this. Therefore, when the headset is out of the box, the acceleration sensor and the distance sensor can be directly initialized. The orientation information can be the coordinate orientation information of the headset wearer in the coordinate system established with the acceleration sensor as the center.
[0108] Furthermore, if the distance information between the earphone and the wearer of the earphone is greater than or equal to the preset distance information, it means that the earphone is not in the ear at this time, so the operation of obtaining the distance information between the earphone and the target detection point can be re-executed.
[0109] The status confirmation module 30 is used to determine the usage status of the headset according to the orientation information of the headset.
[0110] It should be understood that the usage status of the earphone includes an in-ear state and a not-in-ear state. In the specific implementation process, the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information can be obtained. Based on the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information, the usage status of the earphone can be confirmed by detecting whether the coordinate orientation information is within the pre-debugging judgment range.
[0111] It should be noted that, since the wearer may be in an upright or lying position when the earphones are inserted into the ears, it is necessary to consider that the wearer of the earphones has an upright position and a lying position when the earphones are inserted into the ears, and different judgment conditions are included for the upright position and the lying position. Therefore, it is possible to judge whether the upright position-based and the lying position-based are within the corresponding pre-adjustment judgment range, so that it can be more accurately confirmed whether the earphone wearer is in the upright position and the lying position.
[0112] This embodiment acquires the distance information between the earphone and the target detection point by acquiring the distance sensor; if the distance information is less than the preset distance threshold, the motion data of the earphone is acquired, and the motion data meets the motion state condition, and the step of acquiring the distance information between the earphone and the target detection point is re-executed; if the motion data meets the static state condition, a coordinate system is established with the position of the acceleration sensor as the center, and the orientation information of the earphone is determined by direction recognition according to the coordinate system; thereby determining whether it is within the pre-debugging judgment range according to the coordinate orientation information of the orientation information, and if it is within the pre-debugging judgment range, the usage status of the earphone can be determined. By determining that the distance between the earphone and the target detection object is beyond the preset distance threshold, the orientation information of the earphone is determined, and finally a comprehensive judgment of the in-ear and out-ear status is made through the orientation information, thereby further improving the efficiency of the accuracy of the earphone status detection.
[0113] In one embodiment, the position confirmation module 20 is further used to obtain motion data of the headset if the distance information is less than a preset distance threshold; if the motion data meets the static state condition, determine the position information of the headset according to the acceleration sensor.
[0114] In one embodiment, the position confirmation module 20 is further configured to re-execute the step of obtaining the distance information between the earphone and the target detection point if the motion data meets the motion state condition.
[0115] In one embodiment, the position confirmation module 20 is further used to determine the position information of the headset through direction recognition based on a coordinate system established with the position of the acceleration sensor as the center if the motion data meets the static state condition.
[0116] In one embodiment, the status confirmation module 30 is also used to obtain the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information; if the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, the usage status of the headset is determined according to the vertical axis coordinate orientation information and the vertical axis coordinate orientation information, wherein the first coordinate orientation information is greater than the second coordinate orientation information; if the vertical axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, the usage status of the headset is determined according to the horizontal axis coordinate orientation information and the vertical axis coordinate orientation information.
[0117] In one embodiment, the status confirmation module 30 is also used to determine whether the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information if the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, wherein the third coordinate orientation information is greater than the fourth coordinate orientation information; if the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, determine whether the longitudinal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information, wherein the fifth coordinate orientation information is greater than the sixth coordinate orientation information; if the longitudinal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information.
[0118] In one embodiment, the status confirmation module 30 is also used to determine whether the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information if the longitudinal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information; if the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, determine whether the horizontal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information; if the horizontal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information, determine the usage status of the headset.
[0119] For other embodiments or specific implementation methods of the headphone status detection device of the present invention, reference may be made to the above-mentioned method embodiments, which will not be described in detail here.
[0120] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0121] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0122] In addition, for technical details not fully described in this embodiment, reference may be made to the earphone status detection method provided in any embodiment of the present invention, and will not be repeated here.
[0123] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0124] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0126] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting earphone status, characterized in that: The earphone status detection method comprises: Get the distance information between the headset and the target detection point; If the distance information is less than a preset distance threshold, obtaining the orientation information of the headset; Determining a usage status of the headset according to the orientation information of the headset; If the distance information is less than a preset distance threshold, obtaining the position information of the headset includes: If the distance information is less than a preset distance threshold, obtaining motion data of the earphone; If the motion data meets the static state condition, the orientation information of the earphone is determined, wherein the static state condition is a state in which a change value of the motion data within a preset time period is within a preset interval.
2. The earphone status detection method according to claim 1, characterized in that: If the distance information is less than the preset distance threshold, after obtaining the motion data of the headset, the method further includes: If the motion data meets the motion state condition, the step of obtaining the distance information between the earphone and the target detection point is re-executed, wherein the motion state condition is a state in which the change value of the motion data within a preset time period is outside a preset interval.
3. The earphone status detection method according to claim 1, characterized in that: If the motion data satisfies a stationary state condition, determining the position information of the earphone includes: If the motion data meets the stationary state condition, the position information of the earphone is determined according to a preset coordinate system.
4. The earphone status detection method according to any one of claims 1 to 3, characterized in that: The determining the usage status of the headset according to the orientation information of the headset includes: Acquire the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information in the orientation information; If the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determining the use state of the headset according to the vertical axis coordinate orientation information and the vertical axis coordinate orientation information, wherein the first coordinate orientation information is greater than the second coordinate orientation information; If the longitudinal coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, the use status of the headset is determined according to the horizontal axis coordinate orientation information and the vertical axis coordinate orientation information.
5. The earphone status detection method according to claim 4, characterized in that: If the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determining the use state of the headset according to the vertical axis coordinate orientation information and the vertical axis coordinate orientation information includes: If the horizontal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determine whether the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, wherein the third coordinate orientation information is greater than the fourth coordinate orientation information; If the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, determine whether the longitudinal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information, wherein the fifth coordinate orientation information is less than the sixth coordinate orientation information; If the vertical axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information, the usage status of the headset is determined.
6. The earphone status detection method according to claim 4, characterized in that: If the longitudinal coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determining the use state of the headset according to the horizontal coordinate orientation information and the vertical coordinate orientation information includes: If the longitudinal axis coordinate orientation information is greater than the first coordinate orientation information or less than the second coordinate orientation information, determine whether the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information; If the vertical axis coordinate orientation information is greater than the third coordinate orientation information or less than the fourth coordinate orientation information, determine whether the horizontal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information; If the horizontal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information, the usage status of the headset is determined.
7. A headphone status detection device, characterized in that: The earphone status detection device comprises: An acquisition module is used to obtain the distance information between the headset and the target detection point; A position confirmation module, configured to obtain the position information of the headset if the distance information is less than a preset distance threshold; A status confirmation module, used to determine the usage status of the headset according to the orientation information of the headset; The position confirmation module is further configured to obtain motion data of the headset if the distance information is less than a preset distance threshold; The position confirmation module is further used to determine the position information of the earphone if the motion data meets a static state condition, wherein the static state condition is a state in which a change value of the motion data within a preset time period is within a preset interval.
8. A headset status detection device, characterized in that: The headset state detection device comprises: a memory, a processor, and a headset state detection program stored in the memory and executable on the processor, wherein the headset state detection program is configured to implement the headset state detection method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores an earphone status detection program, and when the earphone status detection program is executed by the processor, the earphone status detection method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Wireless earphone, wearing detection method thereof and storage medium
CN111372157A