CN113596656A - Earphone state detection method, device, equipment and storage medium - Google Patents

Earphone state detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN113596656A
CN113596656A CN202110817158.8A CN202110817158A CN113596656A CN 113596656 A CN113596656 A CN 113596656A CN 202110817158 A CN202110817158 A CN 202110817158A CN 113596656 A CN113596656 A CN 113596656A
Authority
CN
China
Prior art keywords
coordinate position
information
position information
earphone
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110817158.8A
Other languages
Chinese (zh)
Inventor
赵于成
陈智威
隋昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Technology Electronics Huizhou Co Ltd
Original Assignee
TCL Technology Electronics Huizhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Technology Electronics Huizhou Co Ltd filed Critical TCL Technology Electronics Huizhou Co Ltd
Priority to CN202110817158.8A priority Critical patent/CN113596656A/en
Publication of CN113596656A publication Critical patent/CN113596656A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1016Earpieces of the intra-aural type
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P15/00Measuring acceleration; Measuring deceleration; Measuring shock, i.e. sudden change of acceleration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • H04R29/004Monitoring arrangements; Testing arrangements for microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2460/00Details of hearing devices, i.e. of ear- or headphones covered by H04R1/10 or H04R5/033 but not provided for in any of their subgroups, or of hearing aids covered by H04R25/00 but not provided for in any of its subgroups
    • H04R2460/07Use of position data from wide-area or local-area positioning systems in hearing devices, e.g. program or information selection

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Telephone Function (AREA)

Abstract

The invention relates to the technical field of earphones, and discloses an earphone state detection method, an earphone state detection device, earphone state detection equipment and a storage medium, wherein the method comprises the following steps: acquiring distance information between the earphone and a target detection point; if the distance information is smaller than a preset distance threshold, acquiring the azimuth information of the earphone; and determining the use state of the earphone according to the direction information of the earphone. After the distance between the earphone and the target detection object is judged to be within the preset distance threshold value, the direction information of the earphone is determined, and finally the comprehensive judgment of the in-and-out-of-ear state is carried out through the direction information, so that the accuracy of earphone state detection can be improved.

Description

Earphone state detection method, device, equipment and storage medium
Technical Field
The present invention relates to the field of earphone technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting an earphone status.
Background
In recent years, with the non-development of the True Wireless Stereo (TWS) headset market, the technology is continuously improved, the number of users is continuously increased, and the experience requirement of an individual user for the TWS headset is higher and higher. Currently, the TWS headset is mainly in-ear type or semi-in-ear type. To going into ear and detecting, mostly use on the market at present optical detection or electric capacity detection scheme, optical detection scheme need punch on the earphone surface and lead to light, be unfavorable for the earphone to do waterproof design like this, in addition, a large amount of earphone products adopt the detection scheme of a single light path, this will lead to when the earphone is not worn, run into the material that blocks the light path and just trigger the detection easily, cause unnecessary consumption, and electric capacity detection scheme, receive the influence of temperature easily, especially in the area of high latitude, because only detect electric capacity change amount, probably be greater than the earphone electric capacity change far away, misjudgment appears very easily, thereby lead to wearing the inefficacy that detects.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for detecting the state of an earphone, and aims to solve the technical problem of how to improve the accuracy of earphone state detection in the prior art.
In order to achieve the above object, the present invention provides a method for detecting a state of an earphone, the method comprising the steps of:
acquiring distance information between the earphone and a target detection point;
if the distance information is smaller than a preset distance threshold, acquiring the azimuth information of the earphone;
and determining the use state of the earphone according to the direction information of the earphone.
Optionally, if the distance information is smaller than a preset distance threshold, acquiring the orientation information of the headset includes:
if the distance information is smaller than a preset distance threshold value, acquiring the motion data of the earphone;
and if the motion data meet a static state condition, determining the azimuth information of the earphone according to the acceleration sensor, wherein the static state condition is the state of the change value of the motion data in a preset interval within a preset time period.
Optionally, after obtaining the motion data of the headset if the distance information is smaller than a preset distance threshold, the method further includes:
and if the motion data meet a motion state condition, re-executing the step of acquiring the distance information between the earphone and the target detection point, wherein the motion state condition is a state that the change value of the motion data in a preset time period is outside a preset interval.
Optionally, if the motion data satisfies a stationary condition, determining the orientation information of the headset according to an acceleration sensor includes:
and if the motion data meet the static state condition, determining the azimuth information of the earphone according to a preset coordinate system.
Optionally, the determining the usage state of the headset according to the orientation information of the headset includes:
acquiring 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 position information is larger than first coordinate position information or smaller than second coordinate position information, determining the use state of the earphone according to the vertical axis coordinate position information and the vertical axis coordinate position information, wherein the first coordinate position information is larger than the second coordinate position information;
and if the longitudinal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information, determining the use state of the earphone according to the transverse axis coordinate position information and the vertical axis coordinate position information.
Optionally, if the horizontal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information, determining the use state of the headset according to the vertical axis coordinate position information and the vertical axis coordinate position information, including:
if the horizontal axis coordinate position information is larger than the first coordinate position information or smaller than the second coordinate position information, judging whether the vertical axis coordinate position information is larger than third coordinate position information or smaller than fourth coordinate position information, wherein the third coordinate position information is larger than the fourth coordinate position information;
if the vertical axis coordinate position information is larger than third coordinate position information or smaller than fourth coordinate position information, judging whether the longitudinal axis coordinate position information is larger than fifth coordinate position information and smaller than sixth coordinate position information, wherein the fifth coordinate position information is larger than the sixth coordinate position information;
and if the longitudinal axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information, determining the use state of the earphone.
Optionally, if the information on the coordinate position of the longitudinal axis is greater than the information on the coordinate position of the first axis or less than the information on the coordinate position of the second axis, determining the use state of the headset according to the information on the coordinate position of the transverse axis and the information on the coordinate position of the vertical axis, including:
if the longitudinal axis coordinate position information is larger than the first coordinate position information or smaller than the second coordinate position information, judging whether the vertical axis coordinate position information is larger than the third coordinate position information or smaller than the fourth coordinate position information;
if the vertical axis coordinate position information is larger than the third coordinate position information or smaller than the fourth coordinate position information, judging whether the horizontal axis coordinate position information is larger than the fifth coordinate position information and smaller than the sixth coordinate position information;
and if the information of the coordinate position of the transverse axis is greater than the information of the fifth coordinate position and less than the information of the sixth coordinate position, determining the use state of the earphone.
In addition, in order to achieve the above object, the present invention further provides an earphone state detection device, including:
the acquisition module is used for acquiring distance information between the earphone and the target detection point;
the direction confirmation module is used for acquiring the direction information of the earphone if the distance information is smaller than a preset distance threshold;
and the state confirmation module is used for determining the use state of the earphone according to the direction information of the earphone.
In addition, to achieve the above object, the present invention also provides an earphone status detection apparatus, including: a memory, a processor and a headphone state detection program stored on the memory and executable on the processor, the headphone state detection program being configured to implement the steps of the headphone state detection method as described above.
Furthermore, to achieve the above object, the present invention further provides a storage medium having a headphone state detection program stored thereon, which when executed by a processor implements the steps of the headphone state detection method as described above.
The earphone state detection method provided by the invention comprises the steps of acquiring distance information between an earphone and a target detection point; if the distance information is smaller than a preset distance threshold, acquiring the azimuth information of the earphone; and determining the use state of the earphone according to the direction information of the earphone. After the distance between the earphone and the target detection object is judged to be within the preset distance threshold value, the direction information of the earphone is determined, and finally the comprehensive judgment of the in-and-out-of-ear state is carried out in a direction information detection mode, so that the accuracy of earphone state detection can be improved.
Drawings
Fig. 1 is a schematic structural diagram of a headset state detection device in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of a method for detecting states of earphones according to the present invention;
fig. 3 is a flowchart illustrating a second embodiment of a method for detecting states of earphones according to the present invention;
fig. 4 is a flowchart illustrating a method for detecting states of earphones according to a third embodiment of the present invention;
fig. 5 is a block diagram of a first embodiment of the earphone status detection apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a headset state detection device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the earphone state detection apparatus 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. Wherein a communication bus 1002 is used to enable connective 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, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the headphone state detection device, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a headset state detection program.
In the headphone state detection apparatus shown in fig. 1, 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 of the earphone state detection device of the present invention may be provided in the earphone state detection device, and the earphone state detection device calls the earphone state detection program stored in the memory 1005 through the processor 1001 and executes the earphone state detection method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the earphone state detection method is provided.
An embodiment of the present invention provides a method for detecting an earphone status, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of a method for detecting an earphone status according to the present invention.
In a first embodiment, the headphone state detection method includes the steps of:
step S10: and acquiring distance information between the earphone and the target detection point.
It should be noted that the execution main body of this embodiment may be an earphone status detection device, and may also be other devices that can achieve the same or similar functions.
It should be understood that the distance information between the earphone and the target detection point may be acquired by a distance sensor, where the distance sensor may be disposed in the earphone, the earphone may be a TWS earphone, and the target detection point may be a body part of a wearer of the earphone, such as an ear, which is not limited in this embodiment. The distance sensor may be an infrared distance sensor, an optical distance sensor, an ultrasonic distance sensor, or the like, which is not limited in this embodiment, and the infrared distance sensor may be used as an example in a specific implementation process, so that the distance sensor emits an infrared light source, and determines whether to be close to the target detection point or far from the target detection point by receiving the reflection intensity, so as to sense the distance information between the earphone and the target detection point.
Step S20: and if the distance information is smaller than a preset distance threshold value, acquiring the direction information of the earphone.
It is understood that the preset distance threshold can be set by those skilled in the art, and the present embodiment is not limited thereto, by judging whether the distance information between the earphone and the earphone wearer is smaller than a preset distance threshold value or not, if the distance information between the earphone and the earphone wearer is smaller than the preset distance threshold value, the acceleration sensor is started, in the specific implementation process, the acceleration sensor can be a three-axis acceleration sensor, the acceleration sensor is used for detecting the movement data of the earphone, the movement state of the earphone can be determined according to the movement data, wherein the motion state of the earphone comprises a static state and a motion state, if the motion data meets the static state condition, the position information of the earphone is determined through a preset coordinate system, if the motion data meets the motion state condition, the earphone is probably in a wearing state, the distance needs to be determined again, so the step of obtaining the distance information between the earphone and the target detection point can be executed again.
It should be noted that the acceleration sensor may be disposed in the earphone, which is not limited in this embodiment, so that the acceleration sensor and the distance sensor may be directly initialized when the earphone is taken out of the box. The orientation information may be coordinate orientation information of the headset wearer in a coordinate system established centered on the acceleration sensor.
Furthermore, if the distance information between the earphone and the earphone wearer is greater than or equal to the preset distance information, it indicates that the earphone is not in the in-ear state, and therefore the operation of acquiring the distance information between the earphone and the target detection point can be executed again.
Step S30: and determining the use state of the earphone according to the direction information of the earphone.
It should be understood that the usage state of the headset includes an in-ear state and an out-of-ear state, 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 acquired in the specific implementation process, and the usage state of the headset can be confirmed by detecting whether the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information are within a judgment range debugged in advance.
It should be noted that, since the wearer may be in an upright or lying position when the earphone is inserted into the ear, it is necessary to consider that the earphone wearer has an upright position and a lying position in the in-ear state, and different determination conditions are included for the in-ear state in the upright position and the in-ear state in the lying position, and therefore it is possible to determine whether the in-ear state based on the upright position and the in-ear state based on the lying position are within the corresponding pre-set determination range, and it is possible to more accurately confirm that the earphone wearer is in the in-ear state in the upright position and the in-ear state in the lying position.
The embodiment acquires the distance information between the earphone and the target detection point by the distance sensor; when the distance information is smaller than a preset distance threshold value, starting an acceleration sensor, detecting motion data of the earphone through the acceleration sensor, and if the earphone is in a static state, acquiring azimuth information of the earphone; and determining whether the position information of the earphone is in a preset judgment range or not according to the position information of the earphone, and if the position information of the earphone is in the preset judgment range, determining the use state of the earphone. After the distance between the earphone and the target detection object is judged to be within the preset distance threshold value, the direction information of the earphone is determined, and finally the comprehensive judgment of the in-and-out-of-ear state is carried out in a direction information detection mode, so that the accuracy of earphone state detection can be improved.
In an embodiment, referring to fig. 3, fig. 3 is a flowchart illustrating a method for detecting a state of an earphone according to a second embodiment of the present invention.
Based on the first embodiment, in step S20, the method for detecting the earphone status in this embodiment includes:
step S201, if the distance information is smaller than a preset distance threshold, obtaining motion data of the earphone.
It should be noted that the motion data may be acceleration data of the headset acquired by the acceleration sensor within a preset time period, where the preset time period may be set according to an acquisition requirement, and may be 0.5s in a specific implementation process, and when the distance information is smaller than a preset distance threshold, it is stated that the headset is closer to a headset wearer, and therefore, the acceleration sensor may be turned on, and the headset is determined to be in a motion state or a stationary state through a change condition of the acceleration data acquired by the acceleration sensor.
Further, after step S201 is implemented, the method further includes:
if the motion data meets the motion state condition, the step S10 is executed again, where the motion state condition is a state where the change value of the motion data is outside the preset interval within the preset time period.
It should be understood that, if a state in which a change value of the jerk data within a preset time period collected by the acceleration sensor is outside a preset interval indicates that the headset is in a motion state, where the change value of the jerk data may be a difference value between a maximum acceleration value and a minimum acceleration value in the jerk data, and the preset interval may be set by a person skilled in the art.
Step S202, if the motion data meets a static state condition, determining the direction information of the earphone, wherein the motion state condition is that the motion data is in a changing state within a preset time period.
It can be understood that, if the variation value of the motion data acquired by the acceleration sensor within the preset time period is outside the preset interval, it indicates that the headset is in a static state, and therefore the position information of the headset can be determined through the preset coordinate system.
Further, step S202 includes:
and if the motion data meet the static state condition, determining the azimuth information of the earphone according to a preset coordinate system.
It should be noted that the preset coordinate system may be a spatial coordinate system established by taking the position of the acceleration sensor as a center, which is not limited in this embodiment, if the motion data satisfies the condition that the earphone is in a stationary state, calibration and debugging of coordinate axes of the acceleration sensor are performed in advance according to the position and the assembling direction of the acceleration sensor in the earphone, and X, Y and three coordinate axes Z are preset, so as to determine the direction of the coordinate system of the acceleration sensor, 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 direction perpendicular to the plane where the sound opening is located at the earphone, and the direction of the Y axis is the direction perpendicular to both the X axis and the Z axis.
It is understood that the orientation information is determined by 6D direction identification according to the coordinate system direction and the motion data, and this embodiment does not limit this, wherein the orientation information includes horizontal axis coordinate orientation information, vertical axis coordinate orientation information, and vertical axis coordinate orientation information.
The embodiment acquires the distance information between the earphone and the target detection point by the distance sensor; if the distance information is smaller than a preset distance threshold value, acquiring the motion data of the earphone, wherein the motion data meets a motion state condition, re-executing the step of acquiring the distance information between the earphone and a target detection point, and if the motion data meets a static state condition, determining the azimuth information of the earphone according to a preset coordinate system; therefore, whether the coordinate and the azimuth information of the azimuth information are in the preset judgment range or not is determined according to the coordinate and the azimuth information of the azimuth information, and if the coordinate and the azimuth information are in the preset judgment range, the use state of the earphone can be determined. After the distance between the earphone and the target detection object is judged to be within the preset distance threshold value, the direction information of the earphone is determined, and finally the comprehensive judgment of the in-and-out-of-ear state is carried out through the direction information, so that the efficiency of earphone state detection accuracy is further improved.
In an embodiment, referring to fig. 4, fig. 4 is a flowchart illustrating a method for detecting a state of an earphone according to a third embodiment of the present invention.
Based on the above embodiment of detecting the earphone status, the step S30 includes:
step S301: and acquiring the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information.
It can be understood that the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information, and the vertical axis coordinate orientation information may be coordinate values of X, Y and Z axes of the acquisition headset recognized by the acceleration sensor through the 6D direction, and in a specific implementation process, g (x) may be used to represent the horizontal axis coordinate orientation information, g (y) may be used to represent the vertical axis coordinate orientation information, and g (Z) may be used to represent the vertical axis coordinate orientation information, which is not limited in this embodiment.
Step S302: and if the horizontal axis coordinate position information is larger than first coordinate position information or smaller than second coordinate position information, determining the use state of the earphone according to the vertical axis coordinate position information and the vertical axis coordinate position information, wherein the first coordinate position information is larger than the second coordinate position information.
Further, the step S302 includes:
if the horizontal axis coordinate position information is larger than the first coordinate position information or smaller than the second coordinate position information, judging whether the vertical axis coordinate position information is larger than third coordinate position information or smaller than fourth coordinate position information, wherein the third coordinate position information is larger than the fourth coordinate position information.
It is to be understood that the first coordinate position information, the second coordinate position information, the third coordinate position information, and the fourth coordinate position information may be judgment range information that is debugged in advance by those skilled in the art, and this embodiment is not limited thereto, and for convenience of understanding, the first coordinate position information may be represented by a, the second coordinate position information may be represented by b, the third coordinate position information may be represented by c, and the fourth coordinate position information may be represented by d, where a > b, and c > d.
It is to be understood that, when it is first determined whether the abscissa orientation information is larger than the first coordinate orientation information or smaller than the second coordinate orientation information, it is further determined whether the ordinate orientation information is g (z) larger than the third coordinate orientation information c or smaller than the fourth coordinate orientation information d by determining whether the abscissa orientation information is larger than the first coordinate orientation information or smaller than the second coordinate orientation information, i.e., g (x) > a or g (x) < b.
If the vertical axis coordinate position information is larger than the third coordinate position information or smaller than the fourth coordinate position information, judging whether the vertical axis coordinate position information is larger than the fifth coordinate position information and smaller than the sixth coordinate position information, wherein the fifth coordinate position information is larger than the sixth coordinate position information.
It is to be understood that the fifth coordinate azimuth information and the sixth coordinate azimuth information may be judgment range information debugged in advance by those skilled in the art, which is not limited in this embodiment, and for convenience of understanding, the fifth coordinate azimuth information may be represented by e, and the sixth coordinate azimuth information may be represented by f, where f > e.
It is to be understood that by determining whether the vertical axis coordinate orientation information is larger than the third coordinate orientation information or smaller than the fourth coordinate orientation information, i.e., g (z) > c or g (z) < d, it is further determined whether the vertical axis coordinate orientation information g (y) is larger than the fifth coordinate orientation information e and smaller than the sixth coordinate orientation information f.
And if the longitudinal axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information, determining the use state of the earphone.
It should be understood that by judging that if the vertical axis coordinate orientation information is larger than the fifth coordinate orientation information and smaller than the sixth coordinate orientation information, i.e., e < g (y) < f, it is possible to determine that the earphone is in the use state and that the use state is in the in-ear state, and considering that the wearer has the upright posture state and the lying posture state, it is possible to further determine that the earphone is in the in-ear state in the upright posture state by the above judgment, and if the above judgment condition is not satisfied, it is indicated that the earphone is in the not-in-ear state, and therefore, it is necessary to perform the step of acquiring the distance information between the earphone and the target detection point in a reset manner.
Step S303: and if the longitudinal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information, determining the use state of the earphone according to the transverse axis coordinate position information and the vertical axis coordinate position information.
Further, the step S303 includes:
and if the longitudinal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information, judging whether the vertical axis coordinate position information is greater than the third coordinate position information or less than the fourth coordinate position information.
It should be understood that it is first determined whether the vertical axis coordinate orientation information is larger than the first coordinate orientation information or smaller than the second coordinate orientation information, and if the vertical axis coordinate orientation information is larger than the first coordinate orientation information or smaller than the second coordinate orientation information, i.e., g (y) > a or g (y) < b, it is further determined whether the vertical axis coordinate orientation information g (z) is larger than the third coordinate orientation information c or smaller than the fourth coordinate orientation information d.
And if the vertical axis coordinate position information is greater than the third coordinate position information or less than the fourth coordinate position information, judging whether the horizontal axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information.
It is understood that by determining whether the vertical axis coordinate orientation information is larger than the third coordinate orientation information or smaller than the fourth coordinate orientation information, i.e., g (z) > c or g (z) < d, it is further determined whether the horizontal axis coordinate orientation information g (x) is larger than the fifth coordinate orientation information e and smaller than the sixth coordinate orientation information f.
And if the information of the coordinate position of the transverse axis is greater than the information of the fifth coordinate position and less than the information of the sixth coordinate position, determining the use state of the earphone.
It should be understood that by judging that if the horizontal axis coordinate orientation information is greater than the fifth coordinate orientation information and less than the sixth coordinate orientation information, i.e., e < g (x) < f, the earphone can be determined to be in the use state and the use state is in the in-ear state, and considering that the wearer has the upright posture state and the lying posture state, the in-ear state of the earphone in the lying posture state can be further determined by the above judgment, and if the above judgment condition is not satisfied, the use state of the earphone is in the not-in-ear state, and therefore, the step of acquiring the distance information between the earphone and the target detection point needs to be reset and executed.
In the 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; judging whether the vertical axis coordinate position information is larger than the third coordinate position information or smaller than the fourth coordinate position information by judging whether the horizontal axis coordinate position information is larger than the first coordinate position information or smaller than the second coordinate position information; if the vertical axis coordinate position information is greater than the third coordinate position information or less than the fourth coordinate position information, judging whether the vertical axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information; if the longitudinal axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information, determining that the use state of the earphone is the in-ear state of the upright posture state, and judging whether the vertical axis coordinate position information is greater than the third coordinate position information or less than the fourth coordinate position information by judging if the longitudinal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information; if the vertical axis coordinate position information is greater than the third coordinate position information or less than the fourth coordinate position information, judging whether the horizontal axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information; if the azimuth information of the horizontal axis coordinate is larger than the azimuth information of the fifth coordinate and smaller than the azimuth information of the sixth coordinate, the use state of the earphone is determined to be the ear state of the lying posture state, and therefore the earphone state detection accuracy is further improved.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium stores an earphone status detection program, and the earphone status detection program, when executed by a processor, implements the steps of the earphone status detection method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
Referring to fig. 5, fig. 5 is a block diagram illustrating a first embodiment of the earphone status detecting device according to the present invention.
As shown in fig. 5, the earphone state detection apparatus according to the embodiment of the present invention includes:
and the obtaining module 10 is configured to obtain distance information between the earphone and the target detection point.
It should be understood that the distance information between the earphone and the target detection point may be acquired by a distance sensor, where the distance sensor may be disposed in the earphone, the earphone may be a TWS earphone, and the target detection point may be a body part of a wearer of the earphone, such as an ear, which is not limited in this embodiment. The distance sensor may be an infrared distance sensor, an optical distance sensor, an ultrasonic distance sensor, or the like, which is not limited in this embodiment, and the infrared distance sensor may be used as an example in a specific implementation process, so that the distance sensor emits an infrared light source, and determines whether to be close to the target detection point or far from the target detection point by receiving the reflection intensity, so as to sense the distance information between the earphone and the target detection point.
It should be noted that the preset distance threshold may be set by a person skilled in the art, which is not limited in this embodiment, by determining whether the distance information between the earphone and the earphone wearer is within the preset distance threshold, if the distance information between the earphone and the earphone wearer is greater than or equal to the preset distance information, it is indicated that the earphone is in a non-in-ear state at this time, and therefore, the operation of obtaining the distance information between the earphone and the target detection point may be performed again.
And the direction confirmation module 20 is configured to acquire the direction information of the headset if the distance information is smaller than a preset distance threshold.
It can be understood that the preset distance threshold may be set by a person skilled in the art, which is not limited in this embodiment, by determining whether the distance information between the earphone and the earphone wearer is smaller than the preset distance threshold, and if the distance information between the earphone and the earphone wearer is smaller than the preset distance threshold, turning on the acceleration sensor, in a specific implementation process, the acceleration sensor may be a three-axis acceleration sensor, detecting the motion data of the earphone through the acceleration sensor, and determining the motion state of the earphone according to the motion data, where the motion state of the earphone includes a static state and a motion state, if the motion data satisfies the static state condition, the orientation information of the earphone may be determined through a preset coordinate system, and if the motion data satisfies the motion state condition, it is indicated that the earphone is probably in a wearing state, the distance needs to be determined again, the step of obtaining distance information of the headset from the target detection point can be re-performed.
It should be noted that the acceleration sensor may be disposed in the earphone, which is not limited in this embodiment, so that the acceleration sensor and the distance sensor may be directly initialized when the earphone is taken out of the box. The orientation information may be coordinate orientation information of the headset wearer in a coordinate system established centered on the acceleration sensor.
Furthermore, if the distance information between the earphone and the earphone wearer is greater than or equal to the preset distance information, it indicates that the earphone is not in the in-ear state, and therefore the operation of acquiring the distance information between the earphone and the target detection point can be executed again.
And the state confirmation module 30 is used for determining the use state of the earphone according to the direction information of the earphone.
It should be understood that the usage state of the headset includes an in-ear state and an out-of-ear state, 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 acquired in the specific implementation process, and the usage state of the headset can be confirmed by detecting whether the horizontal axis coordinate orientation information, the vertical axis coordinate orientation information and the vertical axis coordinate orientation information of the orientation information are within a judgment range debugged in advance.
It should be noted that, since the wearer may be in an upright or lying position when the earphone is inserted into the ear, it is necessary to consider that the earphone wearer has an upright position and a lying position in the in-ear state, and different determination conditions are included for the in-ear state in the upright position and the in-ear state in the lying position, and therefore it is possible to determine whether the in-ear state based on the upright position and the in-ear state based on the lying position are within the corresponding pre-set determination range, and it is possible to more accurately confirm that the earphone wearer is in the in-ear state in the upright position and the in-ear state in the lying position.
The embodiment acquires the distance information between the earphone and the target detection point by the distance sensor; if the distance information is smaller than a preset distance threshold value, acquiring the motion data of the earphone, wherein the motion data meets a motion state condition, re-executing the step of acquiring the distance information between the earphone and a target detection point, and if the motion data meets a static state condition, determining the orientation information of the earphone by direction identification according to a coordinate system established by taking the position of an acceleration sensor as a center; therefore, whether the coordinate and the azimuth information of the azimuth information are in the preset judgment range or not is determined according to the coordinate and the azimuth information of the azimuth information, and if the coordinate and the azimuth information are in the preset judgment range, the use state of the earphone can be determined. After the distance between the earphone and the target detection object is judged to be within the preset distance threshold value, the direction information of the earphone is determined, and finally the comprehensive judgment of the in-and-out-of-ear state is carried out through the direction information, so that the efficiency of earphone state detection accuracy is further improved.
In an embodiment, the direction confirmation module 20 is further configured to obtain motion data of the headset if the distance information is smaller than a preset distance threshold; and if the motion data meet the static state condition, determining the direction information of the earphone according to the acceleration sensor.
In an embodiment, the direction 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 satisfies the motion state condition.
In an embodiment, the orientation determining module 20 is further configured to determine, if the motion data satisfies a stationary condition, orientation information of the headset according to a coordinate system established by taking a position of the acceleration sensor as a center through direction identification according to the coordinate system.
In an embodiment, the state confirmation module 30 is further configured to obtain horizontal axis coordinate position information, vertical axis coordinate position information, and vertical axis coordinate position information of the position information; if the horizontal axis coordinate position information is larger than first coordinate position information or smaller than second coordinate position information, determining the use state of the earphone according to the vertical axis coordinate position information and the vertical axis coordinate position information, wherein the first coordinate position information is larger than the second coordinate position information; and if the longitudinal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information, determining the use state of the earphone according to the transverse axis coordinate position information and the vertical axis coordinate position information.
In an embodiment, the state confirmation module 30 is further configured to determine whether the vertical axis coordinate position information is greater than third coordinate position information or less than fourth coordinate position information if the horizontal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information, where the third coordinate position information is greater than the fourth coordinate position information; if the vertical axis coordinate position information is larger than third coordinate position information or smaller than fourth coordinate position information, judging whether the longitudinal axis coordinate position information is larger than fifth coordinate position information and smaller than sixth coordinate position information, wherein the fifth coordinate position information is larger than the sixth coordinate position information; and if the longitudinal axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information, determining the use state of the earphone.
In an embodiment, the state confirmation module 30 is further configured to determine whether the vertical axis coordinate position information is greater than the third coordinate position information or less than the fourth coordinate position information if the vertical axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information; if the vertical axis coordinate position information is larger than the third coordinate position information or smaller than the fourth coordinate position information, judging whether the horizontal axis coordinate position information is larger than the fifth coordinate position information and smaller than the sixth coordinate position information; and if the information of the coordinate position of the transverse axis is greater than the information of the fifth coordinate position and less than the information of the sixth coordinate position, determining the use state of the earphone.
Other embodiments or specific implementation methods of the earphone state detection apparatus according to the present invention may refer to the above embodiments, and are not described in detail herein.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the method for detecting the state of the earphone provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for detecting a state of a headset, the method comprising:
acquiring distance information between the earphone and a target detection point;
if the distance information is smaller than a preset distance threshold, acquiring the azimuth information of the earphone;
and determining the use state of the earphone according to the direction information of the earphone.
2. The method for detecting the state of the headset according to claim 1, wherein the obtaining the orientation information of the headset if the distance information is smaller than a preset distance threshold comprises:
if the distance information is smaller than a preset distance threshold value, acquiring the motion data of the earphone;
and if the motion data meet a static state condition, determining the azimuth information of the earphone, wherein the static state condition is the state of the change value of the motion data in a preset interval within a preset time period.
3. The method for detecting the state of the headset according to claim 2, wherein after obtaining the motion data of the headset if the distance information is smaller than a preset distance threshold, the method further comprises:
and if the motion data meet a motion state condition, re-executing the step of acquiring the distance information between the earphone and the target detection point, wherein the motion state condition is a state that the change value of the motion data in a preset time period is outside a preset interval.
4. The method for detecting the state of a headset of claim 2, wherein the determining the orientation information of the headset if the motion data satisfies a stationary state condition comprises:
and if the motion data meet the static state condition, determining the azimuth information of the earphone according to a preset coordinate system.
5. A headset state detecting method according to any of claims 1-4, wherein the determining the usage state of the headset based on the orientation information of the headset comprises:
acquiring horizontal axis coordinate orientation information, vertical axis coordinate orientation information and vertical axis coordinate orientation information in the orientation information;
if the horizontal axis coordinate position information is larger than first coordinate position information or smaller than second coordinate position information, determining the use state of the earphone according to the vertical axis coordinate position information and the vertical axis coordinate position information, wherein the first coordinate position information is larger than the second coordinate position information;
and if the longitudinal axis coordinate position information is greater than the first coordinate position information or less than the second coordinate position information, determining the use state of the earphone according to the transverse axis coordinate position information and the vertical axis coordinate position information.
6. The method for detecting the status of a headphone according to claim 5, wherein determining the usage status of the headphone according to the ordinate orientation information of the vertical axis and the ordinate orientation information if the abscissa orientation information is greater than the first ordinate orientation information or less than the second ordinate orientation information comprises:
if the horizontal axis coordinate position information is larger than the first coordinate position information or smaller than the second coordinate position information, judging whether the vertical axis coordinate position information is larger than third coordinate position information or smaller than fourth coordinate position information, wherein the third coordinate position information is larger than the fourth coordinate position information;
if the vertical axis coordinate position information is larger than third coordinate position information or smaller than fourth coordinate position information, judging whether the longitudinal axis coordinate position information is larger than fifth coordinate position information and smaller than sixth coordinate position information, wherein the fifth coordinate position information is larger than the sixth coordinate position information;
and if the longitudinal axis coordinate position information is greater than the fifth coordinate position information and less than the sixth coordinate position information, determining the use state of the earphone.
7. The method for detecting the status of a headphone according to claim 5, wherein if the information on the coordinate position of the vertical axis is greater than the information on the coordinate position of the first axis or less than the information on the coordinate position of the second axis, determining the usage status of the headphone according to the information on the coordinate position of the horizontal axis and the information on the coordinate position of the vertical axis comprises:
if the longitudinal axis coordinate position information is larger than the first coordinate position information or smaller than the second coordinate position information, judging whether the vertical axis coordinate position information is larger than the third coordinate position information or smaller than the fourth coordinate position information;
if the vertical axis coordinate position information is larger than the third coordinate position information or smaller than the fourth coordinate position information, judging whether the horizontal axis coordinate position information is larger than the fifth coordinate position information and smaller than the sixth coordinate position information;
and if the information of the coordinate position of the transverse axis is greater than the information of the fifth coordinate position and less than the information of the sixth coordinate position, determining the use state of the earphone.
8. An earphone state detection apparatus, characterized by comprising:
the acquisition module is used for acquiring distance information between the earphone and the target detection point;
the direction confirmation module is used for acquiring the direction information of the earphone if the distance information is smaller than a preset distance threshold;
and the state confirmation module is used for determining the use state of the earphone according to the direction information of the earphone.
9. An earphone state detection device characterized by comprising: a memory, a processor, and a headset state detection program stored on the memory and executable on the processor, the headset state detection program configured to implement the headset state detection method of any one of claims 1 to 7.
10. A storage medium having a headphone state detection program stored thereon, the headphone state detection program implementing the headphone state detection method according to any one of claims 1 to 7 when executed by a processor.
CN202110817158.8A 2021-07-19 2021-07-19 Earphone state detection method, device, equipment and storage medium Pending CN113596656A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110817158.8A CN113596656A (en) 2021-07-19 2021-07-19 Earphone state detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110817158.8A CN113596656A (en) 2021-07-19 2021-07-19 Earphone state detection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113596656A true CN113596656A (en) 2021-11-02

Family

ID=78248222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110817158.8A Pending CN113596656A (en) 2021-07-19 2021-07-19 Earphone state detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113596656A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114698564A (en) * 2022-04-26 2022-07-05 深圳市中融数字科技有限公司 Method and device for detecting ear tag state, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114698564A (en) * 2022-04-26 2022-07-05 深圳市中融数字科技有限公司 Method and device for detecting ear tag state, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US10814220B2 (en) Method for controlling display of electronic device using multiple controllers and device for the same
KR102371212B1 (en) Electronic device and method for managing geofence thereof
CN111092748B (en) Alarm rule setting method, device, equipment and storage medium for Internet of things equipment
CN111314813B (en) Wireless earphone, method for detecting entrance and exit of wireless earphone, and storage medium
KR102266712B1 (en) Mobile terminal and method for controlling the same
CN107025002B (en) Terminal application control method and device and terminal
CN105930072A (en) Electronic Device And Control Method Thereof
KR101618783B1 (en) A mobile device, a method for controlling the mobile device, and a control system having the mobile device
CN108592947B (en) Gyroscope calibration method and device, storage medium and terminal equipment
KR20200028771A (en) Electronic device and method for recognizing user gestures based on user intention
KR101228336B1 (en) Personalization Service Providing Method by Using Mobile Terminal User&#39;s Activity Pattern and Mobile Terminal therefor
KR20200094396A (en) Electronic device and method of determining task comprising a plurality of actions
CN111698632A (en) Headset state detection method and device, TWS headset and computer storage medium
CN104536567A (en) Direction detection method
CN111256676A (en) Mobile robot positioning method, device and computer readable storage medium
CN106667450B (en) Temperature measuring method and device
CN113596656A (en) Earphone state detection method, device, equipment and storage medium
CN106527672A (en) Non-contact type character input method
CN108614263A (en) Mobile terminal, method for detecting position and Related product
CN104596510A (en) Terminal
KR102130801B1 (en) Apparatus for detecting wrist step and method thereof
CN112347568B (en) Simulation test method, related device, equipment and storage medium
CN114372395A (en) CAE (computer aided engineering) automatic modeling method, system, terminal and storage medium for kinematic pairs
KR20150106535A (en) Mobile terminal and controlling method thereof
CN114720932A (en) Battery management system signal sampling precision testing method and device, upper computer and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination