US-20260129399-A1 - METHODS FOR DETECTING WEARING POSITIONS OF EARPHONES, EARPHONES, AND ELECTRONIC DEVICES
Abstract
A method for detecting a wearing position of an earphone is provided. The earphone is provided with a detection module and stores a wearing position indication. For each of at least one detection cycle, a pre-judgment result indicating the wearing position of the earphone at the detection cycle is obtain ed via the detection module. The pre-judgment result indicates whether the earphone is worn on a left ear or a right ear. Real-time updating on the wearing position indication is performed based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone, wherein the wearing position indication indicates whether the earphone is worn on a left ear or a right ear.
Inventors
- Libin Zhou
- Liang Wang
Assignees
- Shenzhen Shokz Co., Ltd.
Dates
- Publication Date
- 20260507
- Application Date
- 20251229
Claims (20)
- 1 . A method for detecting a wearing position of an earphone, wherein the earphone is provided with a detection module and stores a wearing position indication, and the method comprises: for each of at least one detection cycle, obtaining, via the detection module, a pre-judgment result indicating the wearing position of the earphone at the detection cycle, wherein the pre-judgment result indicates whether the earphone is worn on a left ear or a right ear; and performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone, wherein the wearing position indication indicates whether the earphone is worn on a left ear or a right ear.
- 2 . The method according to claim 1 , wherein the detection module comprises an accelerometer, and the obtaining, via the detection module, a pre-judgment result indicating the wearing position of the earphone at the detection cycle comprises: obtaining the pre-judgment result at the detection cycle based on at least one set of acceleration values detected by the accelerometer.
- 3 . The method according to claim 2 , wherein the earphone includes an ear hook having a symmetry plane arranged along a length direction of the ear hook, and each set of the at least one set of acceleration values includes an acceleration component in a Z-axis direction, the Z-axis direction being perpendicular to the symmetry plane.
- 4 . The method according to claim 3 , wherein each set of the at least one set of acceleration values further includes an acceleration component in an X-axis direction and an acceleration component in a Y-axis direction, the X-axis and the Y-axis being parallel to the symmetry plane.
- 5 . The method according to claim 2 , wherein the detection module further comprises a gyroscope; the obtaining, via the detection module, a pre-judgment result indicating the wearing position of the earphone at the detection cycle further comprises: determining whether the pre-judgment result is in a valid state, wherein the pre-judgment result in the valid state indicates that the earphone is worn on one of the left ear and the right ear; and in response to determining that the pre-judgment result is not in the valid state, resetting the pre-judgment result according to an angular velocity value detected by the gyroscope when a user performs a preset head action.
- 6 . The method according to claim 1 , wherein the obtaining, via the detection module, a pre-judgment result indicating the wearing position of the earphone at the detection cycle further comprises: obtaining, via the detection module, the pre-judgment result indicating the wearing position of the earphone at the detection cycle by detecting ultrasonic waves received by a microphone of the earphone.
- 7 . The method according to claim 1 , wherein the method is started upon detection that the earphone is in a wearing state, the method is executed at a first detection frequency during a period between a point when the method is started and a preset time threshold, and the method is executed at a second detection frequency after the preset time threshold, the first detection frequency being higher than the second detection frequency.
- 8 . The method according to claim 1 , wherein the performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone comprises: determining, among a preset count of consecutive detection cycles, detection cycles whose the pre-judgment results are valid and different from the wearing position indication; in response to determining that the count of the determined detection cycles is greater than or equal to a preset count threshold, updating the wearing position indication to the pre-judgment results of the determined detection cycles, wherein the preset count of the consecutive detection cycles is greater than or equal to the preset count threshold.
- 9 . The method according to claim 1 , wherein the performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone comprises: for each of the at least one detection cycle, determining a count of consecutive detection cycles whose the pre-judgment results are valid and different from the wearing position indication; in response to determining that the count is equal to a preset count threshold, updating the wearing position indication to the pre-judgment result of the detection cycle and resetting the count of consecutive detection cycles.
- 10 . The method according to claim 9 , wherein the performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone further comprises: for each of the at least one detection cycle, in response to determining that the pre-judgment result of the detection cycle is valid and the same as the wearing position indication, or the pre-judgment result of the detection cycle is invalid, maintaining the wearing position indication and resetting the count of consecutive detection cycles.
- 11 . The method according to claim 2 , wherein the obtaining the pre-judgment result at the detection cycle based on at least one set of acceleration values detected by the accelerometer comprises: obtaining the pre-judgment result by inputting the at least one set of acceleration values obtained within the detection cycle into a trained neural network model.
- 12 . The method according to claim 1 , wherein the method further comprises: in response to determining that the earphone is placed into an earphone compartment of an earphone case, resetting, by the earphone case, the wearing position indication.
- 13 . The method according to claim 12 , wherein the earphone case includes a left earphone compartment and a right earphone compartment, and the in response to determining that the earphone is placed into an earphone compartment of an earphone case, resetting, by the earphone case, the wearing position indication includes: resetting the wearing position indication of the earphone to the left ear when it is placed into the left earphone compartment; or resetting the wearing position indication of the earphone to the right ear when it is placed into the right earphone compartment.
- 14 . The method according to claim 1 , wherein there is a pair of earphones, and the method further comprises: in response to determining that the current wearing position indications of the pair of earphones indicate that the pair of earphones are worn on the same ear for a predetermined time, generating a reset reminder.
- 15 . The method according to claim 1 , wherein there is a pair of earphones, and the method further comprises: in response to determining that the current wearing position indications of the pair of earphones indicate that the pair of earphones are worn on the same ear, and a generation time of the current wearing position indication of one of the pair of earphones is earlier than a generation time of the current wearing position indication of the other of the pair of earphones, maintaining the wearing position indication of the one of the pair of earphones unchanged and resetting the wearing position indication of the other of the pair of earphones.
- 16 . The method according to claim 1 , wherein duration of each detection cycle is in a range of 50 ms-10 s.
- 17 . The method according to claim 1 , wherein the method further comprises: generating an audio signal matching a corresponding audio channel of the earphone according to the wearing position indication; and/or setting a button function of the earphone according to the wearing position indication.
- 18 . The method according to claim 1 , wherein the method further comprises: issuing a reminder message for reminding a user of the wearing position indicated by the wearing position indication; determining whether to adapt an audio signal matching a corresponding audio channel of the earphone according to the wearing position indication based on a received preset trigger action of a user; and/or determining whether to set a button function of the earphone according to the wearing position indication based on the received preset trigger action of the user.
- 19 . An earphone, wherein the earphone comprises a processor and a storage device, the storage device stores a computer program, and the processor is configured to execute the computer program to implement the method according to claim 1 .
- 20 . An electronic device, wherein the electronic device is configured to communicate with an earphone and comprises a processor and a storage device, the storage device stores a computer program, and the processor is configured to execute the computer program to implement the method according to claim 1 .
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a Continuation of International Patent Application No. PCT/CN2024/102591, filed on Jun. 28, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD The present disclosure generally relates to the field of consumer electronics, and in particular to a method for detecting a wearing position of an earphone, an earphone, and an electronic device. BACKGROUND An earphone typically stores a wearing position indication. The wearing position indication is used to indicate whether the earphone is worn on the left ear or the right ear. In related technologies, the wearing position indication stored in the earphone is updated only once when the earphone is just taken out of an earphone case or just worn on the ear. This easily causes a situation where the wearing position indication does not match the actual wearing position, affecting the user experience. SUMMARY One or more embodiments of the present disclosure provide a method for detecting a wearing position of an earphone. The earphone is provided with a detection module and stores a wearing position indication. The method includes: for each of at least one detection cycle, obtaining, via the detection module, a pre-judgment result indicating the wearing position of the earphone at the detection cycle, the pre-judgment result indicates whether the earphone is worn on a left ear or a right ear; performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone, the wearing position indication indicates whether the earphone is worn on a left ear or a right ear. In some embodiments, the detection module includes an accelerometer. The obtaining, via the detection module, a pre-judgment result indicating the wearing position of the earphone at the detection cycle comprises: obtaining the pre-judgment result at the detection cycle based on at least one set of acceleration values detected by the accelerometer. In some embodiments, the detection module further includes a gyroscope. The obtaining, via the detection module, a pre-judgment result indicating the wearing position of the earphone at the detection cycle further includes: determining whether the pre-judgment result is in a valid state, wherein the pre-judgment result in the valid state indicates that the earphone is worn on one of the left ear and the right ear; and in response to determining that the pre-judgment result is not in the valid state, resetting the pre-judgment result according to an angular velocity value detected by the gyroscope when a user performs a preset head action. In some embodiments, the method is started upon detection that the earphone is in a wearing state. The method is executed at a first detection frequency during a period between a point when the method is started and a preset time threshold. The method is executed at a second detection frequency after the preset time threshold, the first detection frequency being higher than the second detection frequency. In some embodiments, the performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone includes: determining, among a preset count of consecutive detection cycles, detection cycles whose the pre-judgment results are valid and different from the wearing position indication; in response to determining that the count of the determined detection cycles is greater than or equal to a preset count threshold, updating the wearing position indication to the pre-judgment results of the determined detection cycles, wherein the preset count of the consecutive detection cycles is greater than or equal to the preset count threshold. In some embodiments, the performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone includes: for each of the at least one detection cycle, determining a count of consecutive detection cycles whose the pre-judgment results are valid and different from the wearing position indication; in response to determining that the count is equal to a preset count threshold, updating the wearing position indication to the pre-judgment result of the detection cycle and resetting the count of consecutive detection cycles. In some embodiments, the performing real-time updating on the wearing position indication based on a comparison result between each of the at least one pre-judgment result and a current wearing position indication of the earphone further includes: for each of the at least one detection cycle, in response to determining that the pre-judgment result of the detection cycle is valid and the same as the wea