Wearing position identification method and electronic device

EP4664919A4Pending Publication Date: 2026-05-27HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-01-17
Publication Date
2026-05-27

AI Technical Summary

Technical Problem

Headsets with undistinguished left and right earbuds face challenges in determining the correct ear for channel matching and control logic, leading to potential errors in 3D scenarios and user confusion.

Method used

Implementing direction sensors in earbuds to sense posture and determine wearing position, enabling processors to configure sound channels and control logic based on ear orientation.

Benefits of technology

Efficiently distinguishes earbud positions, ensuring correct channel matching and control logic, reducing operation errors and enhancing user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IMGAF001_ABST
    Figure IMGAF001_ABST
Patent Text Reader

Abstract

Embodiments of this application provide a wearing position identification method and an electronic device. The wearing position identification method in embodiments of this application includes: when it is detected that a user wears an electronic device, obtaining a first direction of the electronic device through a direction sensor disposed on the electronic device; and determining a wearing position of the electronic device based on the first direction. In embodiments of this application, a posture of the electronic device may be sensed with cooperation of the direction sensor, to determine the wearing position of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of this application relate to the field of headset technologies, and in particular, to a wearing position identification method and an electronic device.BACKGROUND

[0002] Most headsets are designed with distinguishing between left and right earbuds. For example, a wireless headset is designed with two appearances, which are respectively used for a left-ear earbud and a right-ear earbud. Alternatively, headphones are marked with L (indicating a left-ear earpiece) and R (indicating a right-ear earpiece) respectively near two earpieces. In this way, a user can properly wear the headset by observing the appearances or marks.

[0003] Currently, a new type of headset emerges, and left and right earbuds are no longer explicitly distinguished. The left and right earbuds share a same appearance, and L (left) or R (right) is not marked on the headset. This type of headset is more convenient in production and use. However, although the left and right earbuds are not explicitly distinguished, the headset still needs to determine whether an earbud is worn by the user on a left ear or a right ear, to match a corresponding channel (for example, a channel for music, a channel for movies, or a channel for games), and avoid an error in a 3D scenario. In addition, if the left and right earbuds are not clear, some control logic of the headset, for example, sliding control and tapping control, may cause confusion, thereby causing an operation error.

[0004] Therefore, for headsets whose left and right earbuds are not explicitly distinguished, it is expected that technical means can be used to distinguish between the earbuds efficiently and quickly.SUMMARY

[0005] Embodiments of this application provide a wearing position identification method and an electronic device, to sense a posture of the electronic device with cooperation of a direction sensor, so as to determine a wearing position of the electronic device.

[0006] According to a first aspect, an embodiment of this application provides a headset, including a first earbud, the first earbud, and a second earbud.

[0007] In a possible implementation, the first earbud may include a first direction sensor and a first processor, and the first direction sensor is configured to sense a posture of the first earbud: (1) when the first earbud is worn on a left ear of a user, the first earbud is in a first posture, and the first processor configures the first earbud to play a sound of a left channel; and (2) when the first earbud is worn on a right ear of the user, the first earbud is in a second posture, and the first processor configures the first earbud to play a sound of a right channel.

[0008] In the first posture, a first position of the first earbud faces the ground; in the second posture, a second position of the first earbud faces the ground; and the first position is different from the second position. It can be learned that when the first earbud is worn on different ears of the user, a posture of the first earbud changes.

[0009] Optionally, the first position and the second position are two opposite positions on the first earbud. In the first posture, the first position faces the ground, and the second position is away from the ground. In the second posture, the second position faces the ground, and the first position is away from the ground. It can be learned that the first position and the second position are two opposite positions on the first earbud. In this case, when the first earbud is separately worn on the left ear of the user and the right ear of the user, orientations of the first position and the second position are opposite, and this indicates that the posture of the first earbud is reversed. It should be understood that, in this embodiment of this application, facing the ground or being away from the ground may be an approximate orientation of the first position or the second position, and is not a vertical direction of directly facing the ground or being away from the ground.

[0010] Optionally, when the first earbud is worn on the left ear of the user, the first processor further configures the first earbud to interact with the user by using left-ear touch logic; or when the first earbud is worn on the right ear of the user, the first processor further configures the first earbud to interact with the user by using right-ear touch logic. It can be learned that when the first earbud is separately worn on the left ear of the user and the right ear of the user, touch logic implemented by the first earbud changes. For example, the left-ear touch logic includes answering / hanging up a call, and the right-ear touch logic includes adjusting a volume. Therefore, when the first earbud is worn on the left ear of the user, the first processor of the first earbud implements the left-ear touch logic for answering / hanging up a call. When the first earbud is worn on the right ear of the user, the first processor of the first earbud implements the right-ear touch logic for adjusting a volume.

[0011] Optionally, the first direction sensor may send a direction signal to the first processor.

[0012] In a possible implementation, the second earbud may include a second direction sensor and a second processor, and the second direction sensor is configured to sense a posture of the second earbud: (1) when the second earbud is worn on the left ear of the user, the second earbud is in the first posture, and the second processor configures the second earbud to play the sound of the left channel; and (2) when the second earbud is worn on the right ear of the user, the second earbud is in the second posture, and the second processor configures the second earbud to play the sound of the right channel.

[0013] In the first posture, a first position of the second earbud faces the ground; in the second posture, a second position of the second earbud faces the ground; and the first position is different from the second position. It can be learned that when the second earbud is worn on different ears of the user, the posture of the second earbud also changes, which is similar to a status of the first earbud.

[0014] Optionally, when the first earbud is worn on a left ear of a first user, and the second earbud is worn on a left ear of a second user, both the first earbud and the second earbud play the sound of the left channel; or when the first earbud is worn on a right ear of the first user, and the second earbud is worn on a right ear of the second user, both the first earbud and the second earbud play the sound of the right channel. It can be learned that channels that are played by the first earbud and the second earbud are related to wearing positions of the first earbud and the second earbud. If both the first earbud and the second earbud are worn on the left ear, the sound of the left channel is played. If both the first earbud and the second earbud are worn on the right ear, the sound of the right channel is played. If the first earbud is worn on the left ear, the sound of the left channel is played; and if the second earbud is worn on the right ear, the sound of the right channel is played. If the first earbud is worn on the right ear, the sound of the right channel is played; and if the second earbud is worn on the left ear, the sound of the left channel is played.

[0015] In a possible implementation, the second earbud may include a second processor (for example, the foregoing processor 110). A difference from the foregoing descriptions lies in that the second earbud does not include a second direction sensor. Therefore, the second earbud cannot sense a posture of the second earbud. In this case, the second earbud may be communicatively connected to the first earbud (a communication connection may include a Bluetooth connection, near field communication, or the like, which is not specifically limited). When the first earbud is worn on the left ear of the user, and the second earbud is worn on the right ear of the user, the first earbud sends a first signal to the second earbud; and the second earbud receives the first signal, and the second earbud plays a sound of a right ear canal. It can be learned that the first earbud may sense the posture of the first earbud through the direction sensor, to determine a wearing position of the first earbud based on the posture of the first earbud. Then, the first earbud sends the posture of the first earbud to the second earbud by using the first signal, and the second earbud may use a reverse posture of the posture of the first earbud as the posture of the second earbud, to determine a wearing position of the second earbud based on the posture of the second earbud.

[0016] Optionally, the first direction sensor sends a direction signal to the first processor.

[0017] Optionally, the earbud includes a first end portion, a second end portion, and a connection portion. The first end portion includes a speaker, and the speaker is configured to play a sound to an ear canal of the user.

[0018] Optionally, the first direction sensor includes one or more of a gravity sensor, a magnetic sensor, a magnet, a Hall sensor, a magneto sensor, a gaussmeter, and a magnetometer.

[0019] According to a second aspect, an embodiment of this application provides a wearing position identification method, including: when it is detected that a user wears an electronic device, obtaining a first direction of the electronic device through a direction sensor disposed on the electronic device; and determining a wearing position of the electronic device based on the first direction.

[0020] In this embodiment of this application, a first direction of a headset after the headset is worn by the user can be measured based on a magnetic sensor on the headset, and left and right positions of the headset can be quickly determined based on the first direction without cooperation of another sensor. In this way, a structure of the headset can be simplified. In addition, two headsets are independent of each other, and left and right positions thereof may be independently determined by using the foregoing method.

[0021] The earbud usually has a wearing detection function, to determine whether the user wears or removes the earbud, so as to trigger a mobile phone to automatically play or pause music. If the user removes the earbud for a long time and does not place the earbud back in a charging case, the earbud may automatically sleep or power off to save power. To improve experience of using earbuds in one or two ears, when one earbud is removed, the other earbud continues playing, making the switching more seamless. A wearing detection method may include: (1) performing determining according to a human body induction capacitance principle, and / or (2) performing determining based on light emitting, reflection, and receiving. The two methods may be implemented by using a sensor, a control chip, or the like.

[0022] In some embodiments, when the user wears the earbud on an ear, the earbud may detect a wearing status in real time, and accordingly trigger the earbud to identify left and right positions. In some embodiments, the earbud may periodically trigger left and right position identification, or perform left and right position identification based on another trigger condition. This is not specifically limited in embodiments of this application.

[0023] In this embodiment of this application, both an ear-clip wireless headset and a semi-in-ear wireless headset have an appearance feature that left and right are not explicitly distinguished, but left and right positions need to be distinguished in terms of a use function. To be specific, two earbuds in a headset need to separately determine whether the earbud is worn by the user on a left ear or a right ear. In this way, when processing an audio, the two earbuds may respectively match corresponding channels (wearing on the left ear to match a left channel of the audio, and wearing on the right ear to match a right channel of the audio), to avoid an error in a 3D scenario (for example, a channel for music, a channel for a movie, or a channel for a game). In addition, it is convenient to implement some control logic of the earbud when the earbud is at a specific position. For example, when the earbud is worn on the left ear, a call is answered / hung up through sliding control, tapping control, or the like; and when the earbud is worn on the right ear, a volume is adjusted through sliding control, tapping control, or the like, to avoid a user operation error.

[0024] As described above, the direction sensor (also referred to as a magnetic sensor) is disposed on the electronic device, and the first direction may be measured. Then, the wearing position of the electronic device may be determined by using the first direction.

[0025] For example, the user is in a standing posture or a sitting posture. When the first direction measured by the magnetic sensor is downward, an included angle between the first direction and a geomagnetic direction is 0°, and the first direction may be denoted as 0°; or when the first direction measured by the force measurement sensor is upward, an included angle between the first direction and the geomagnetic direction is 180°, and the first direction may be denoted as 180°. When the user is in a lying-upright state, and the first direction measured by the force measurement sensor is obliquely downward, an included angle between the first direction and the geomagnetic direction is 40°, and the first direction may be denoted as 40°. It should be noted that an angle value of the included angle may be recorded by using a clockwise direction as an example. In addition, the angle value of the included angle between the first direction and the geomagnetic direction may alternatively be recorded by using a counterclockwise direction as an example. This is not specifically limited herein.

[0026] In a possible implementation, when the first direction is downward, the earbud is worn at the first position, and when the first direction is upward, the earbud is worn at the second position; or when the first direction is upward, the earbud is worn at the first position, and when the first direction is downward, the earbud is worn at the second position.

[0027] As described above, based on a presetting of the earbud, when the first direction of the earbud is measured, a wearing position of the earbud may be directly determined based on an angle of the first direction. For example, when the first direction is downward, the earbud is worn on the left ear, and when the first direction is upward, the earbud is worn on the right ear. Similarly, when the first direction is upward, the earbud is worn on the left ear, and when the first direction is downward, the earbud is worn on the right ear.

[0028] In a possible implementation, the earbud may first obtain a second direction as a reference and a third position corresponding to the second direction; and then determine the wearing position of the electronic device based on the first direction, the second direction, and the third position.

[0029] The earbud may obtain the second direction and a position (namely, the third position) of the earbud in the direction state in advance by using some methods.

[0030] For example, when two earbuds of a wireless headset are placed in a headset case, slot information from the headset case may be received. When slot information received by one of the earbuds indicates that a slot in which the earbud is located is a left slot, the earbud may set a position (namely, a first position) of the earbud to left. When slot information received by an earbud indicates that a slot in which the earbud is located is a right slot, the earbud may set a position (namely, a first position) of the earbud to right.

[0031] Then, the earbud measures the second direction through the magnetic sensor, and makes the second direction correspond to the left or right position of the earbud. For example, if the second direction is downward and denoted as 0°, and the earbud sets a position of the earbud as left, the earbud may associate 0° with a left-side position; or if the second direction is upward and denoted as 180°, and the earbud sets a position of the earbud as right, the earbud may associate 180° with a right-side position. For another example, if the second direction is downward and denoted as 0°, and the earbud sets a position of the earbud as right, the earbud may associate 0° with a right-side position; or if the second direction is upward and denoted as 180°, and the earbud sets a position of the earbud as left, the earbud may associate 180° with a left-side position.

[0032] It should be noted that the earbud may alternatively obtain the second direction and the third position by using another method. For example, a direction corresponding to a fixed angle is set as the second direction in advance, and a fixed position is set as the third position. This is not specifically limited in embodiments of this application.

[0033] In this embodiment of this application, a first threshold and a second threshold may be preset. When an included angle between the first direction and the second direction is less than the first threshold, it may be considered that a displacement between the first direction and the second direction is small. In this case, it may be considered that the headset does not have a left-right position change in the first direction and the second direction. In this case, a left or right position corresponding to the second direction may be assigned to the first direction, and the position is a current position of the headset. When an included angle between the first direction and the second direction is greater than the second threshold, it may be considered that a displacement between the first direction and the second direction is large, and even flipping may occur. In this case, it may be considered that the headset has a left-right position change in the first direction and the second direction. In this case, a reverse position of a left or right position corresponding to the second direction may be assigned to the first direction, and the position is a current position of the headset. It should be noted that the first threshold and the second threshold may be a same angle value, or may be different angle values. When the first threshold and the second threshold are different, the first threshold is less than the second threshold. In addition, the first threshold and the second threshold are not specifically limited in embodiments of this application.

[0034] The first direction of the earbud after the earbud is worn by the user may be measured based on the magnetic sensor on the earbud, and the left or right position of the earbud may be quickly determined based on the included angle between the first direction and the second direction without cooperation of another sensor. In this way, a structure of the earbud can be simplified. In addition, the two earbuds are independent of each other, and left and right positions thereof may be independently determined by using the foregoing method.

[0035] In a possible implementation, a posture of a small person is lying flat or lying prone. When the included angle between the first direction and the second direction measured by the magnetic sensor on the earbud is 90° (equal to the first threshold or equal to the second threshold), it is equivalent to that the user wears the two earbuds in the posture of lying flat. In this case, the earbuds cannot distinguish between left and right positions.

[0036] In view of this, an enabling interval of the first direction may be preset. For example, T1 ≤ θ ≤ 90° or 90° ≤ θ ≤ T2, where θ may be a measured angle corresponding to the first direction, and T1 and T2 may be preset. If a range of θ is out of the foregoing intervals, it may be considered that a posture of the user is equivalent to lying flat. In this case, the earbuds cannot distinguish between left and right positions.

[0037] In a possible implementation, when an earbud is in a left-ear wearing state, the magnetic sensor senses that the first direction is consistent with the second direction, and the magnetic sensor sends a first signal to a processor of the earbud, so that the processor learns that the earbud is worn on the left ear; or when an earbud is in a right-ear wearing state, the magnetic sensor senses that the first direction is opposite to the second direction, and the magnetic sensor sends a second signal to the processor, so that the processor learns that the earbud is worn on the right ear.

[0038] Correspondingly, the processor may adjust a use function of the earbud based on left or right ear wearing. For example, an earbud worn on the left ear processes the left channel, and is responsible for implementing logic of answering / hanging up a call, and an earbud worn on the right ear processes the right channel, and is responsible for implementing logic of adjusting a volume.

[0039] According to a third aspect, an embodiment of this application provides a wearing position identification apparatus, including: a detection module, configured to: when it is detected that a user wears an electronic device, obtain a first direction of the electronic device through a direction sensor disposed on the electronic device; and a determining module, configured to determine a wearing position of the electronic device based on the first direction.

[0040] In a possible implementation, when the first direction is downward, the electronic device is worn at a first position, and when the first direction is upward, the electronic device is worn at a second position; or when the first direction is upward, the electronic device is worn at a first position, and when the first direction is downward, the electronic device is worn at a second position.

[0041] In a possible implementation, an obtaining module is further included, and configured to obtain a second direction as a reference and a third position corresponding to the second direction; and the determining module is specifically configured to determine the wearing position of the electronic device based on the first direction, the second direction, and the third position.

[0042] In a possible implementation, the determining module is specifically configured to: obtain an included angle between the first direction and the second direction; and when the included angle is less than a first threshold, determine the third position as the wearing position of the electronic device; or when the included angle is greater than a second threshold, determine a fourth position as the wearing position of the electronic device, where the fourth position is a reverse position of the third position.

[0043] In a possible implementation, the first threshold is less than the second threshold, or the first threshold is equal to the second threshold.

[0044] In a possible implementation, the obtaining module is specifically configured to: when the electronic device is placed in an accommodation apparatus, receive slot information from the accommodation apparatus; obtain, based on the slot information, the third position of the electronic device in the accommodation apparatus; and obtain the second direction of the electronic device through the direction sensor.

[0045] In a possible implementation, the obtaining module is specifically configured to: determine a direction corresponding to a preset angle as the second direction; and determine a preset position as the third position.

[0046] In a possible implementation, when the second direction is a gravity direction and the first position is a left-side position, if the first direction is the gravity direction, the wearing position is the left-side position; or if the first direction is an anti-gravity direction, the wearing position is a right-side position.

[0047] In a possible implementation, when the second direction is an anti-gravity direction and the first position is a left-side position, if the first direction is the anti-gravity direction, the wearing position is the left-side position; or if the first direction is a gravity direction, the wearing position is a right-side position.

[0048] In a possible implementation, when the angle of the first direction is in a first interval or a second interval, the first direction is an effective enabling direction, where the first interval is [T1, 90°], the second interval is [90°, T2], and T1 and T2 are preset positive integers.

[0049] According to a fourth aspect, an embodiment of this application provides an electronic device, including a direction sensor, one or more processors, and a memory, configured to store one or more programs, where the direction sensor is configured to detect a first direction of the electronic device, and when the one or more programs are executed by the one or more processors, the one or more processors determine a wearing position based on the first direction.

[0050] In a possible implementation, when the first direction is downward, the electronic device is worn at a first position, and when the first direction is upward, the electronic device is worn at a second position; or when the first direction is upward, the electronic device is worn at a first position, and when the first direction is downward, the electronic device is worn at a second position.

[0051] In a possible implementation, the electronic device is a headset, the headset includes two earbuds, and the two earbuds have a same shape. The earbuds include a first end portion, a second end portion, and a connection portion; and the first end portion includes a speaker.

[0052] In a possible implementation, the first end portion and the second end portion are clamped on auricles of a user when being worn.

[0053] In a possible implementation, the two earbuds are respectively worn on a left ear or a right ear of a user.

[0054] In a possible implementation, the electronic device is a wearable watch, and a watch crown is disposed on a side of a watch face of the wearable watch.

[0055] In a possible implementation, the wearable watch is worn on a left wrist or a right wrist of a user.

[0056] According to a fifth aspect, an embodiment of this application provides an electronic device, including one or more processors and a memory configured to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors are enabled to perform the method according to any one of the implementations of the second aspect.

[0057] According to a sixth aspect, an embodiment of this application provides a computer-readable storage medium, including a computer program. When the computer program is run on an electronic device, the electronic device is enabled to perform the method according to any one of the implementations of the second aspect.

[0058] According to a seventh aspect, an embodiment of this application provides a computer program product. The computer program product includes computer program code, and when the computer program code is run on an electronic device, the electronic device is enabled to perform the method according to any one of the implementations of the second aspect.

[0059] According to an eighth aspect, an embodiment of this application provides a chip, including one or more interface circuits and one or more processors. The interface circuit is configured to: receive a signal from a memory of an electronic device, and send the signal to the processor, where the signal includes computer instructions stored in the memory; and when the processor executes the computer instructions, the electronic device is enabled to perform the method according to any one of the implementations of the second aspect.BRIEF DESCRIPTION OF DRAWINGS

[0060] FIG. 1 is a diagram of a structure of an electronic device 100 according to an embodiment of this application; FIG. 2aand FIG. 2b are diagrams of an application scenario according to an embodiment of this application; FIG. 3a and FIG. 3b are diagrams of an application scenario according to an embodiment of this application; FIG. 4a and FIG. 4b are diagrams of a symmetrical wireless headset; FIG. 5a to FIG. 5c are diagrams of an application scenario according to an embodiment of this application; FIG. 6 is a flowchart of a process 600 of a wearing position identification method according to an embodiment of this application; FIG. 7 is a diagram of a first direction and a second direction; FIG. 8 is a diagram of initial states of earbuds; FIG. 9 is a diagram of placing states of earbuds; FIG. 10 is a diagram of in-case states of earbuds; FIG. 11a and FIG. 11b are diagrams of wearing earbuds by a user; and FIG. 12 is a block diagram of an apparatus 1200 according to an embodiment of this application. DESCRIPTION OF EMBODIMENTS

[0061] The following clearly and completely describes the technical solutions in embodiments of this application with reference to the accompanying drawings in embodiments of this application. It is clear that the described embodiments are some but not all of embodiments of this application. All other embodiments obtained by a person of ordinary skill in the art based on embodiments of this application without creative efforts shall fall within the protection scope of this application.

[0062] The term "and / or" in this specification describes only an association relationship for describing associated objects and represents that three relationships may exist. For example, A and / or B may represent the following three cases: Only A exists, both A and B exist, and only B exists.

[0063] In the specification and claims in embodiments of this application, the terms "first", "second", and the like are intended to distinguish between different objects but do not indicate a particular order of the objects. For example, a first target object, a second target object, and the like are used to distinguish between different target objects, but are not used to describe a particular order of the target objects.

[0064] In embodiments of this application, words such as "example" or "for example" are used to represent giving an example, an illustration, or a description. Any embodiment or design scheme described as "example" or "for example" in embodiments of this application should not be explained as being more preferred or having more advantages than another embodiment or design scheme. Exactly, use of the word "example" or "for example" is intended to present a relative concept in a specific manner.

[0065] In the descriptions of embodiments of this application, unless otherwise stated, "a plurality of" means two or more than two. For example, a plurality of processing units refer to two or more processing units, and a plurality of systems refer to two or more systems.

[0066] Before the technical solutions in embodiments of this application are described, an application scenario in embodiments of this application is first described with reference to the accompanying drawings.

[0067] FIG. 1 is a diagram of a structure of an electronic device 100 according to an embodiment of this application. It should be understood that the electronic device 100 shown in FIG. 1 is merely an example, and the electronic device 100 may have more or fewer components than those shown in the figure, or may combine two or more components, or may have different component configurations. Various components shown in FIG. 1 may be implemented in hardware including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.

[0068] The electronic device 100 may include a processor 110, an internal memory 120, a power management module 130, an antenna 1, a wireless communication module 140, an audio module 150, a speaker 150A, a microphone 150B, a button 160, a direction sensor 170, and the like.

[0069] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a controller, a memory, an audio codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU). Different processing units may be independent devices, or may be integrated into one or more processors.

[0070] The controller may be a nerve center and a command center of the electronic device 100. The controller may generate an operation control signal based on an instruction operation code and a time sequence signal, to complete control of instruction reading and instruction execution.

[0071] A memory may be further disposed in the processor 110, and is configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data just used or cyclically used by the processor 110. If the processor 110 needs to use the instructions or the data again, the processor may directly invoke the instructions or the data from the memory. This avoids repeated access, reduces waiting time of the processor 110, and improves system efficiency.

[0072] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit sound (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver / transmitter (universal asynchronous receiver / transmitter, UART) interface, a general-purpose input / output (general-purpose input / output, GPIO) interface, and / or the like.

[0073] The I2S interface may be used for audio communication. In some embodiments, the processor 110 may include a plurality of groups of I2S buses. The processor 110 may be coupled to the audio module 150 through the I2S bus, to implement communication between the processor 110 and the audio module 150. In some embodiments, the audio module 150 may transfer an audio signal to the wireless communication module 140 through the I2S interface, to implement a function of listening to a sound through Bluetooth.

[0074] The PCM interface may also be used for audio communication, and sample, quantize, and code an analog signal. In some embodiments, the audio module 150 may be coupled to the wireless communication module 140 through a PCM bus interface. In some embodiments, the audio module 150 may also transfer an audio signal to the wireless communication module 140 through the PCM interface, to implement a function of playing audio through a Bluetooth headset or a Bluetooth sound box. Both the I2S interface and the PCM interface may be used for audio communication.

[0075] The UART interface is a universal serial data bus, and is used for asynchronous communication. The bus may be a two-way communications bus. The bus converts to-be-transmitted data between serial communication and parallel communication. In some embodiments, the UART interface is usually configured to connect the processor 110 to the wireless communication module 140. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 140 through the UART interface, to implement a Bluetooth function. In some embodiments, the audio module 150 may transfer an audio signal to the wireless communication module 140 through the UART interface, to implement a function of playing audio through a Bluetooth headset or a Bluetooth sound box.

[0076] The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or a data signal. In some embodiments, the GPIO interface may be configured to connect the processor 110 to the wireless communication module 140, the audio module 150, and the like. The GPIO interface may alternatively be configured as an I2S interface, a UART interface, or the like.

[0077] It may be understood that an interface connection relationship between the modules illustrated in embodiments of this application is merely an example for description, and does not constitute a limitation on the structure of the electronic device 100. In some other embodiments of this application, the electronic device 100 may alternatively use an interface connection manner different from that in the foregoing embodiment, or use a combination of a plurality of interface connection manners.

[0078] The power management module 130 is configured to connect to the processor 110. The power management module 130 supplies power to the processor 110, the internal memory 120, the audio module 150, the wireless communication module 140, and the like. In some other embodiments, the power management module 130 may alternatively be disposed in the processor 110.

[0079] A wireless communication function of the electronic device 100 may be implemented through the antenna 1, the wireless communication module 140, the modem processor, the baseband processor, and the like.

[0080] The antenna 1 is configured to: transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 may be configured to cover one or more communications frequency bands. Different antennas may be further multiplexed, to improve antenna utilization. In some other embodiments, the antenna may be used in combination with a tuning switch.

[0081] The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a to-be-sent low-frequency baseband signal into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. Then, the demodulator transmits the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 150A). In some embodiments, the modem processor may be an independent component. In some other embodiments, the modem processor may be independent of the processor 110.

[0082] The wireless communication module 140 may provide a wireless communication solution that includes a wireless local area network (wireless local area network, WLAN) (for example, a wireless fidelity (wireless fidelity, Wi-Fi) network), Bluetooth (Bluetooth, BT), and the like and that is applied to the electronic device 100. The wireless communication module 140 may be one or more components integrating at least one communication processing module. The wireless communication module 140 receives an electromagnetic wave through the antenna 1, performs frequency modulation and filtering on an electromagnetic wave signal, and sends a processed signal to the processor 110. The wireless communication module 140 may further receive a to-be-sent signal from the processor 110, perform frequency modulation and amplification on the signal, and convert a processed signal into an electromagnetic wave for radiation through the antenna 1.

[0083] In some embodiments, the antenna 1 is coupled to the wireless communication module 140 of the electronic device 100, so that the electronic device 100 can communicate with a network and another device by using a wireless communication technology. The wireless communication technology may include a BT technology, a WLAN technology, and / or the like.

[0084] The audio codec is configured to compress or decompress a digital audio. The electronic device 100 may support one or more audio codecs. In this way, the electronic device 100 may play or record audios in a plurality of coding formats, for example, a moving picture experts group audio layer 3 (Moving Picture Experts Group Audio Layer III, MP3).

[0085] The NPU is a neural-network (neural-network, NN) computing processor. The NPU quickly processes input information by referring to a structure of a biological neural network, for example, a transmission mode between human brain neurons, and may further continuously perform self-learning. Applications such as intelligent recognition of the electronic device 100 may be implemented through the NPU, for example, voice identification.

[0086] The internal memory 120 may be configured to store computer-executable program code, where the executable-program code includes instructions. The processor 110 runs the instructions stored in the internal memory 120, to perform various function applications of the electronic device 100 and data processing. The internal memory 120 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required by at least one function (for example, a sound playing function), and the like. The data storage area may store data (for example, audio data) created when the electronic device 100 is used, and the like. In addition, the internal memory 120 may include a high-speed random access memory.

[0087] The electronic device 100 may implement an audio function, for example, music playing, video sound playing, or voice playing through the audio module 150, the speaker 150A, the microphone 150B, the application processor, and the like.

[0088] The audio module 150 is configured to convert digital audio information into an analog audio signal for output, and is also configured to convert an analog audio input into a digital audio signal. The audio module 150 may be further configured to encode and decode an audio signal. In some embodiments, the audio module 150 may be disposed in the processor 110, or some function modules of the audio module 150 are disposed in the processor 110.

[0089] The speaker 150A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 may play an audio through the speaker 150A, for example, music, a movie sound, or a voice. In this embodiment of this application, a plurality of speakers may be disposed in the electronic device 100.

[0090] The microphone 150B, also referred to as a "mike" or a "mic", is configured to convert a sound signal into an electrical signal. When a video call or a voice call is performed by using the electronic device 100, a user may make a sound by moving a human mouth close to the microphone 150B, and input a sound signal to the microphone 150B. One microphone 150B may be disposed in the electronic device 100. In some other embodiments, two microphones 150B may be disposed in the electronic device 100, to collect a sound signal and implement a noise reduction function.

[0091] The button 160 includes a power button, a volume button, and the like. The button 160 may be a mechanical button or a touch button. The electronic device 100 may receive a key input, and generate a key signal input related to a user setting and function control of the electronic device 100.

[0092] The direction sensor 170 includes one or more of a gravity sensor and / or a magnetic sensor, a magnet, a Hall sensor, a magnetometer (Magnetic, M-Sensor) which is also referred to as a geomagnetic sensor, a magneto sensor, a gaussmeter, and the like. The gravity sensor is also referred to as a gravity sensor. A cantilever-type displacement device made of an elastic sensitive element and an energy storage spring made of an elastic sensitive element drive an electrical contact, to complete conversion from gravity to an electrical signal. On one hand, a gravity direction may be measured. On the other hand, when a direction change (for example, horizontal / vertical flipping) occurs on the electronic device, screen rotation, an application control change, and the like of the electronic device may be triggered based on the gravity direction. The magnetic sensor, the magnet, the Hall sensor, the magnetometer, and the like may be configured to test a direction of the electronic device, and locate an orientation of the electronic device. In some embodiments, the direction sensor 170 may sense an orientation of a position (the position may be preset) on the electronic device. For example, the direction sensor 170 senses that the position faces the ground or is away from the ground. In this embodiment of this application, an orientation of a position on the electronic device may be represented as a first direction. Optionally, the first direction may be represented by a clockwise included angle between the gravity direction and the first direction. In addition, the first direction may alternatively be represented in another manner. This is not specifically limited herein.

[0093] Embodiments of this application may be applied to the electronic device 100. The electronic device 100 does not explicitly distinguish between left and right. To be specific, the electronic device may not explicitly distinguish between left and right in terms of an appearance or a structure. For example, wearing the electronic device at a left-side position of a user or at a right-side position of the user may have same comfort and / or experience. For example, two earbuds of a headset may have a same or roughly same appearance or structure design. Regardless of whether either of the two earbuds is worn on a left ear or a right ear, same or similar comfort can be provided for the user, and same or similar user experience can be provided. However, the electronic device 100 needs to distinguish between left and right positions in terms of a function. In other words, a function provided by the electronic device at the left-side position is different from a function provided by the electronic device at the right-side position. For example, for the two earbuds of the headset, an earbud worn on the left ear and an earbud worn on the right ear correspond to different left and right channels, the earbud worn on the left ear and the earbud worn on the right ear have different sound pickup directions, and the earbud worn on the left ear and the earbud worn on the right ear have different touch control logic. For example, the earbud worn on the left ear needs to have touch control logic for answering / hanging up a call, and the earbud worn on the right ear needs to have touch control logic for adjusting a volume.

[0094] In a possible application scenario, for example, FIG. 2a and FIG. 2b are diagrams of an application scenario according to an embodiment of this application. As shown in FIG. 2a, in this application scenario, the electronic device 100 is an ear-clip wireless headset. The headset includes two earbuds that have a same appearance: an earbud 201 and an earbud 202. A structure of the earbud 201 is used as an example for description. The earbud includes a first end portion, a second end portion, and a connection portion that connects the first end portion and the second end portion. The first end portion may include a speaker to play a sound to an ear canal of the user. The second end portion may include a microphone (the microphone is hidden and therefore is not shown in the figure) to pick up a sound. In some embodiments, the microphone may be further located in the first end portion and / or the connection portion. As shown in FIG. 2b, the user may clamp the two earbuds 201 and 202 respectively on auricles of the left ear and the right ear in a manner of wearing an ear clip. For the earbud 201 worn on the right ear of the user, the first end portion is on an outer side of the auricle, and the second end portion is on an inner side of the auricle. For the earbud 202 worn on the left ear of the user, a first end portion is on an outer side of the auricle, and a second end portion is on an inner side of the auricle. Optionally, the earbud 201 may alternatively be worn on the left ear of the user, and the earbud 202 may alternatively be worn on the right ear of the user.

[0095] In a possible application scenario, for example, FIG. 3aand FIG. 3b are diagrams of an application scenario according to an embodiment of this application. As shown inFIG. 3a, in this application scenario, the electronic device 100 may be a semi-in-ear wireless headset. The headset includes two earbuds that have a same appearance: an earbud 301 and an earbud 302. A structure of the earbud 301 is used as an example for description. The earbud includes a plurality of speakers and microphones (the microphones are hidden and therefore are not shown in the figure). As shown in FIG. 3b, the user may insert the earbud 301 into an ear hole of the left ear of the user, and insert the earbud 302 into an ear hole of the right ear of the user. Optionally, the earbud 301 may alternatively be worn on the left ear of the user, and the earbud 302 may alternatively be worn on the right ear of the user. The earbuds shown inFIG. 3aand FIG. 3b may be understood as bean-shaped earbuds.

[0096] Refer to the embodiments shown in FIG. 2a to FIG. 3b. The headset may include a first earbud (for example, the earbud 201 or the earbud 301) and a second earbud (for example, the earbud 202 or the earbud 302).

[0097] In a possible implementation, the first earbud may include a first direction sensor (for example, the foregoing direction sensor 170) and a first processor (for example, the foregoing processor 110), and the first direction sensor is configured to sense a posture of the first earbud: (1) when the first earbud is worn on the left ear of the user, the first earbud is in a first posture, and the first processor configures the first earbud to play a sound of a left channel; and (2) when the first earbud is worn on the right ear of the user, the first earbud is in a second posture, and the first processor configures the first earbud to play a sound of a right channel.

[0098] In the first posture, a first position of the first earbud faces the ground; in the second posture, a second position of the first earbud faces the ground; and the first position is different from the second position. It can be learned that when the first earbud is worn on different ears of the user, a posture of the first earbud changes.

[0099] Optionally, the first position and the second position are two opposite positions on the first earbud. In the first posture, the first position faces the ground, and the second position is away from the ground. In the second posture, the second position faces the ground, and the first position is away from the ground. It can be learned that the first position and the second position are two opposite positions on the first earbud. In this case, when the first earbud is separately worn on the left ear of the user and the right ear of the user, orientations of the first position and the second position are opposite, and this indicates that the posture of the first earbud is reversed. It should be understood that, in this embodiment of this application, facing the ground or being away from the ground may be an approximate orientation of the first position or the second position, and is not a vertical direction of directly facing the ground or being away from the ground.

[0100] Optionally, when the first earbud is worn on the left ear of the user, the first processor further configures the first earbud to interact with the user by using left-ear touch logic; or when the first earbud is worn on the right ear of the user, the first processor further configures the first earbud to interact with the user by using right-ear touch logic. It can be learned that when the first earbud is separately worn on the left ear of the user and the right ear of the user, touch logic implemented by the first earbud changes. For example, the left-ear touch logic includes answering / hanging up a call, and the right-ear touch logic includes adjusting a volume. Therefore, when the first earbud is worn on the left ear of the user, the first processor of the first earbud implements the left-ear touch logic for answering / hanging up a call. When the first earbud is worn on the right ear of the user, the first processor of the first earbud implements the right-ear touch logic for adjusting a volume.

[0101] Optionally, the first direction sensor may send a direction signal to the first processor.

[0102] In a possible implementation, the second earbud may include a second direction sensor (for example, the foregoing direction sensor 170) and a second processor (for example, the foregoing processor 110), and the second direction sensor is configured to sense a posture of the second earbud: (1) when the second earbud is worn on the left ear of the user, the second earbud is in the first posture, and the second processor configures the second earbud to play the sound of the left channel; and (2) when the second earbud is worn on the right ear of the user, the second earbud is in the second posture, and the second processor configures the second earbud to play the sound of the right channel.

[0103] In the first posture, a first position of the second earbud faces the ground; in the second posture, a second position of the second earbud faces the ground; and the first position is different from the second position. It can be learned that when the second earbud is worn on different ears of the user, the posture of the second earbud also changes, which is similar to a status of the first earbud.

[0104] Optionally, when the first earbud is worn on a left ear of a first user, and the second earbud is worn on a left ear of a second user, both the first earbud and the second earbud play the sound of the left channel; or when the first earbud is worn on a right ear of the first user, and the second earbud is worn on a right ear of the second user, both the first earbud and the second earbud play the sound of the right channel. It can be learned that channels that are played by the first earbud and the second earbud are related to wearing positions of the first earbud and the second earbud. If both the first earbud and the second earbud are worn on the left ear, the sound of the left channel is played. If both the first earbud and the second earbud are worn on the right ear, the sound of the right channel is played. If the first earbud is worn on the left ear, the sound of the left channel is played; and if the second earbud is worn on the right ear, the sound of the right channel is played. If the first earbud is worn on the right ear, the sound of the right channel is played; and if the second earbud is worn on the left ear, the sound of the left channel is played.

[0105] In a possible implementation, the second earbud may include a second processor (for example, the foregoing processor 110). A difference from the foregoing descriptions lies in that the second earbud does not include a second direction sensor. Therefore, the second earbud cannot sense a posture of the second earbud. In this case, the second earbud may be communicatively connected to the first earbud (a communication connection may include a Bluetooth connection, near field communication, or the like, which is not specifically limited). When the first earbud is worn on the left ear of the user, and the second earbud is worn on the right ear of the user, the first earbud sends a first signal to the second earbud; and the second earbud receives the first signal, and the second earbud plays a sound of a right ear canal. It can be learned that the first earbud may sense the posture of the first earbud through the direction sensor, to determine a wearing position of the first earbud based on the posture of the first earbud. Then, the first earbud sends the posture of the first earbud to the second earbud by using the first signal, and the second earbud may use a reverse posture of the posture of the first earbud as the posture of the second earbud, to determine a wearing position of the second earbud based on the posture of the second earbud.

[0106] FIG. 4a and FIG. 4b are diagrams of a symmetrical wireless headset. As shown in FIG. 4a, symmetry may mean that an object obtained by performing plane symmetry on the object is still the object itself, and the object may be referred to as a self-symmetric object with respect to the plane. For example, any earbud (for example, the earbud 201 in FIG. 2a) in the headset is symmetrical with respect to a vertical plane, but is asymmetric in a horizontal direction.

[0107] FIG. 4b shows a process of flipping an earbud (for example, the earbud 301 in FIG. 3a) from a left-ear wearing state to an intermediate state and then to a right-ear wearing state. The earbud includes a speaker and a direction sensor (a magnetic sensor is used as an example for description), and a first direction may be an orientation of a position of the magnetic sensor on the earbud.

[0108] Left-ear wearing state: In this state, a posture of the earbud includes that the speaker faces rightward, and the magnetic sensor is located at a bottom of the earbud. The first direction may be an orientation of the bottom of the earbud. The magnetic sensor senses that the first direction is downward, which is consistent with the gravity direction, and an included angle between the first direction and the gravity direction is 0°.

[0109] Intermediate state: In this state, a posture of the earbud includes that the speaker faces a lower right side, and the magnetic sensor is located on a lower left side of the earbud. The first direction may be an orientation of a bottom of the earbud. The magnetic sensor senses that the first direction faces the lower left side, and an included angle between the first direction and the gravity direction is 40°.

[0110] Right-ear wearing state: In this state, a posture of the earbud includes that the speaker faces leftward, and the magnetic sensor is located at a top of the earbud. The first direction may be an orientation of a bottom of the earbud. The magnetic sensor senses that the first direction is upward, which is opposite to the gravity direction, and an included angle between the first direction and the gravity direction is 180°.

[0111] It can be learned that the earbud having the symmetry feature in this embodiment may be worn on the left ear or the right ear, and wearing on the left ear or the right ear is not limited in appearance or structure. In this way, when manufacturing such a wireless headset, a manufacturer does not need to physically and explicitly distinguish between left and right earbuds, to reduce design costs and improve production efficiency. In addition, the user may wear the two earbuds at will without being limited to an appearance of the earbud.

[0112] Optionally, the magnetic sensor may be disposed on a side in the vertical direction of the earbud. For example, when the earbud is in the left-ear wearing state, the magnetic sensor is located at the bottom of the earbud; or when the wireless headset is in the right-ear wearing state, the magnetic sensor is located at the top of the earbud. Alternatively, the magnetic sensor may be disposed on a side in the horizontal direction. For example, the magnetic sensor is located on a side that is of the earbud and that is without the speaker. In addition, the magnetic sensor may alternatively be disposed at another position of the earbud. This is not specifically limited in embodiments of this application. In a possible implementation, the magnetic sensor may be disposed inside the earbud. Therefore, the magnetic sensor is invisible from the appearance.

[0113] In a possible application scenario, FIG. 5a to FIG. 5c are diagrams of an application scenario according to an embodiment of this application. As shown in FIG. 5a, in this application scenario, the electronic device 100 is a wearable watch, a watch crown is disposed on a right side of a watch face of the wearable watch, and a magnetic sensor is disposed near the watch crown. It should be understood that the magnetic sensor may be disposed on an outer surface of the wearable watch, or may be disposed inside the wearable watch. This is not specifically limited herein. As shown in FIG. 5b, the user is accustomed to wearing the watch on a left wrist. When a left arm of the user naturally hangs, the watch crown of the watch is downward. As shown in FIG. 5c, the user is accustomed to wearing the watch on a right wrist. When a right arm of the user naturally hangs, the watch crown of the watch is upward. Generally, the user may wear only one wearable watch. Based on a habit of the user, the wearable watch may be worn on the left wrist, or may be worn on the right wrist. However, regardless of which wrist the wearable watch is worn, when the user raises the wrist to view the watch, content on the watch face is oriented correctly. For example, the number 12 on the watch face is oriented correctly. Optionally, the magnetic sensor may be disposed on the watch crown of the wearable watch, so that a direction measured by the magnetic sensor is consistent with that of the watch crown.

[0114] Based on the foregoing embodiments, an embodiment of this application provides a wearing position identification method. FIG. 6 is a flowchart of a process 600 of the wearing position identification method according to an embodiment of this application. As shown in FIG. 6, the process 600 may be performed by the electronic device 100, for example, an ear-clip wireless headset, a semi-in-ear wireless headset, or a wearable watch. For ease of description, this embodiment is described by using an example in which the electronic device 100 is an earbud (for example, the earbud 201 in FIG. 2a or the earbud 301 in FIG. 3a) of a semi-in-ear wireless headset (which may be referred to as a headset for short). A left or right position of the other earbud (for example, the earbud 202 in FIG. 2a or the earbud 302 in FIG. 3a) in the headset may also be determined by using the method in this application. In addition, the two earbuds are independent of each other, and can determine respective left and right positions. It should be understood that the technical solutions in embodiments of this application are applicable to any one of the foregoing electronic devices.

[0115] The process 600 includes a series of steps or operations. It should be understood that the process 600 may be performed in various sequences and / or simultaneously, and is not limited to an execution sequence shown in FIG. 6. The process 600 includes the following steps.

[0116] Step 601: When it is detected that a user wears the earbud, obtain a first direction of the earbud.

[0117] The earbud usually has a wearing detection function, to determine whether the user wears or removes the earbud, so as to trigger a mobile phone to automatically play or pause music. If the user removes the earbud for a long time and does not place the earbud back in a charging case, the earbud may automatically sleep or power off to save power. To improve experience of using earbuds in one or two ears, when one earbud is removed, the other earbud continues playing, making the switching more seamless. A wearing detection method may include: (1) performing determining according to a human body induction capacitance principle, and / or (2) performing determining based on light emitting, reflection, and receiving. The two methods may be implemented by using a sensor, a control chip, or the like.

[0118] In some embodiments, when the user wears the earbud on an ear, the earbud may detect a wearing status in real time, and accordingly trigger the earbud to identify left and right positions. In some embodiments, the earbud may periodically trigger left and right position identification, or perform left and right position identification based on another trigger condition. This is not specifically limited in embodiments of this application.

[0119] In this embodiment of this application, with reference to the embodiments shown in FIG. 2aand FIG. 2b, both an ear-clip wireless headset and a semi-in-ear wireless headset have an appearance feature that left and right are not explicitly distinguished, but left and right positions need to be distinguished in terms of a use function. To be specific, two earbuds in a headset need to separately determine whether the earbud is worn by the user on a left ear or a right ear. In this way, when processing an audio, the two earbuds may respectively match corresponding channels (wearing on the left ear to match a left channel of the audio, and wearing on the right ear to match a right channel of the audio), to avoid an error in a 3D scenario (for example, a channel for music, a channel for a movie, or a channel for a game). In addition, it is convenient to implement some control logic of the earbud when the earbud is at a specific position. For example, when the earbud is worn on the left ear, a call is answered / hung up through sliding control, tapping control, or the like; and when the earbud is worn on the right ear, a volume is adjusted through sliding control, tapping control, or the like, to avoid a user operation error.

[0120] As described above, a magnetic sensor is disposed on the electronic device 100, and the first direction may be measured. Then, the wearing position of the electronic device 100 may be determined by using the first direction.

[0121] For example, when the user is in a standing posture or a sitting posture, and the first direction measured by the magnetic sensor is vertically downward (with reference to the left-ear wearing state in FIG. 4b), an included angle between the first direction and a geomagnetic direction is 0°, and the first direction may be denoted as 0°; or when the first direction measured by the force measurement sensor is vertically upward (with reference to the right-ear wearing state in FIG. 4b), an included angle between the first direction and the geomagnetic direction is 180°, and the first direction may be denoted as 180°. When the user is in a lying-upright state, and the first direction measured by the force measurement sensor is obliquely downward (with reference to the intermediate state in FIG. 4b), an included angle between the first direction and the geomagnetic direction is 40°, and the first direction may be denoted as 40°. It should be noted that an angle value of the included angle may be recorded by using a clockwise direction as an example. In addition, the angle value of the included angle between the first direction and the geomagnetic direction may alternatively be recorded by using a counterclockwise direction as an example. This is not specifically limited herein.

[0122] Step 602: Determine a wearing position of the earbud based on the first direction.

[0123] In a possible implementation, when the first direction is vertically downward, the earbud is worn at the first position, and when the first direction is vertically upward, the earbud is worn at the second position; or when the first direction is vertically upward, the earbud is worn at the first position, and when the first direction is vertically downward, the earbud is worn at the second position.

[0124] As described above, based on a presetting of the earbud, when the first direction of the earbud is measured, the wearing position of the earbud may be directly determined based on the angle of the first direction. For example, as shown in FIG. 4b, when the first direction is vertically downward, the earbud is worn on the left ear, and when the first direction is vertically upward, the earbud is worn on the right ear. Similarly, when the first direction is vertically upward, the earbud is worn on the left ear, and when the first direction is vertically downward, the earbud is worn on the right ear.

[0125] In a possible implementation, the earbud may first obtain a second direction as a reference and a third position corresponding to the second direction; and then determine the wearing position of the electronic device based on the first direction, the second direction, and the third position.

[0126] The earbud may obtain the second direction and a position (namely, the third position) of the earbud in the direction state in advance by using some methods.

[0127] For example, when the two earbuds of the wireless headset are placed in a headset case, slot information from the headset case may be received. When slot information received by one of the earbuds indicates that a slot in which the earbud is located is a left slot, the earbud may set a position (namely, a first position) of the earbud to left. When slot information received by an earbud indicates that a slot in which the earbud is located is a right slot, the earbud may set a position (namely, a first position) of the earbud to right.

[0128] Then, the earbud measures the second direction through the magnetic sensor, and makes the second direction correspond to the left or right position of the earbud. For example, if the second direction is vertically downward and denoted as 0°, and the earbud sets a position of the earbud as left, the earbud may associate 0° with a left-side position; or if the second direction is vertically upward and denoted as 180°, and the earbud sets a position of the earbud as right, the earbud may associate 180° with a right-side position. For another example, if the second direction is vertically downward and denoted as 0°, and the earbud sets a position of the earbud as right, the earbud may associate 0° with a right-side position; or if the second direction is vertically upward and denoted as 180°, and the earbud sets a position of the earbud as left, the earbud may associate 180° with a left-side position.

[0129] It should be noted that the earbud may alternatively obtain the second direction and the third position by using another method. For example, a direction corresponding to a fixed angle is set as the second direction in advance, and a fixed position is set as the third position. This is not specifically limited in embodiments of this application.

[0130] In this embodiment of this application, a first threshold and a second threshold may be preset. When an included angle between the first direction and the second direction is less than the first threshold, it may be considered that a displacement between the first direction and the second direction is small. In this case, it may be considered that the headset does not have a left-right position change in the first direction and the second direction. In this case, a left or right position corresponding to the second direction may be assigned to the first direction, and the position is a current position of the headset. When an included angle between the first direction and the second direction is greater than the second threshold, it may be considered that a displacement between the first direction and the second direction is large, and even flipping may occur. In this case, it may be considered that the headset has a left-right position change in the first direction and the second direction. In this case, a reverse position of a left or right position corresponding to the second direction may be assigned to the first direction, and the position is a current position of the headset. It should be noted that the first threshold and the second threshold may be a same angle value, or may be different angle values. When the first threshold and the second threshold are different, the first threshold is less than the second threshold. In addition, the first threshold and the second threshold are not specifically limited in embodiments of this application.

[0131] For example, FIG. 7 is a diagram of the first direction and the second direction. A small person in the figure presents different postures, including standing upright, lying upright, lying downright, lying flat, lying prone, and the like. It is assumed that the second direction is vertically downward (an included angle between the second direction and the geomagnetic direction is 0°), and a wearing position associated with the second direction is the left-side position. The first direction is measured by the magnetic sensor on the earbud, and the angle value of the included angle between the first direction and the second direction is recorded in the clockwise direction. The first threshold and the second threshold may be 0° to 90°, and 90° is used as an example in this example.

[0132] As shown in (a) in FIG. 7, a posture of the small person is standing upright. When the first direction measured by the magnetic sensor on the earbud is 0°, it may be determined that an included angle between the first direction and the second direction is 0° (less than the first threshold). Therefore, the first direction is the same as the second direction and also corresponds to the left-side position. In this case, it may be determined that the earbud is worn on the left ear of the user. When the first direction measured by the magnetic sensor on the earbud is 180°, it may be determined that an included angle between the first direction and the second direction is 180° (greater than the second threshold). Therefore, the first direction is different from the second direction and corresponds to the right-side position. In this case, it may be determined that the earbud is worn on the right ear of the user.

[0133] As shown in (b) in FIG. 7, a posture of the small person is lying upright. When the first direction measured by the magnetic sensor on the earbud is 300°, it may be determined that an included angle between the first direction and the second direction is 60° (less than the first threshold). Therefore, the first direction is the same as the second direction and also corresponds to the left-side position. In this case, it may be determined that the earbud is worn on the left ear of the user. When the first direction measured by the magnetic sensor on the earbud is 120°, it may be determined that an included angle between the first direction and the second direction is 120° (greater than the second threshold). Therefore, the first direction is different from the second direction and corresponds to the right-side position. In this case, it may be determined that the earbud is worn on the right ear of the user.

[0134] As shown in (c) in FIG. 7, a posture of the small person is lying downright. When the first direction measured by the magnetic sensor on the earbud is 60°, it may be determined that an included angle between the first direction and the second direction is 60° (less than the first threshold). Therefore, the first direction is the same as the second direction and also corresponds to the left-side position. In this case, it may be determined that the earbud is worn on the left ear of the user. When the first direction measured by the magnetic sensor on the earbud is 240°, it may be determined that an included angle between the first direction and the second direction is 120° (greater than the second threshold). Therefore, the first direction is different from the second direction and corresponds to the right-side position. In this case, it may be determined that the earbud is worn on the right ear of the user.

[0135] It can be learned that the first direction of the earbud after the earbud is worn by the user may be measured based on the magnetic sensor on the earbud, and the left or right position of the earbud may be quickly determined based on the included angle between the first direction and the second direction without cooperation of another sensor. In this way, a structure of the earbud can be simplified. In addition, the two earbuds are independent of each other, and left and right positions thereof may be independently determined by using the foregoing method.

[0136] In a possible implementation, as shown in (d) and (e) in FIG. 7, a posture of the small person is lying flat or lying prone. When the included angle between the first direction and the second direction measured by the magnetic sensor on the earbud is 90° (equal to the first threshold or equal to the second threshold), it is equivalent to that the user wears the two earbuds in the posture of lying flat. In this case, the earbuds cannot distinguish between left and right positions.

[0137] In view of this, an enabling interval of the first direction may be preset. For example, T1 ≤ θ ≤ 90° or 90° ≤ θ ≤ T2, where θ may be a measured angle corresponding to the first direction, and T1 and T2 may be preset. If a range of θ is out of the foregoing intervals, it may be considered that a posture of the user is equivalent to lying flat. In this case, the earbuds cannot distinguish between left and right positions.

[0138] In a possible implementation, when an earbud (for example, the earbud 201 or 202 in FIG. 2a, or the earbud 301 or 302 in FIG. 3a) is in a left-ear wearing state, the magnetic sensor senses that the first direction is consistent with the second direction, and the magnetic sensor sends a first signal to a processor of the earbud, so that the processor learns that the earbud is worn on the left ear; or when an earbud (for example, the earbud 201 or 202 in FIG. 2a, or the earbud 301 or 302 in FIG. 3a) is in a right-ear wearing state, the magnetic sensor senses that the first direction is opposite to the second direction, and the magnetic sensor sends a second signal to the processor, so that the processor learns that the earbud is worn on the right ear.

[0139] Correspondingly, the processor may adjust a use function of the earbud based on left or right ear wearing. For example, an earbud worn on the left ear processes the left channel, and is responsible for implementing logic of answering / hanging up a call, and an earbud worn on the right ear processes the right channel, and is responsible for implementing logic of adjusting a volume.

[0140] In this embodiment of this application, the first direction of the headset after the headset is worn by the user can be measured based on the magnetic sensor on the headset, and left and right positions of the headset can be quickly determined based on the included angle between the first direction and the second direction without cooperation of another sensor. In this way, a structure of the headset can be simplified. In addition, two headsets are independent of each other, and left and right positions thereof may be independently determined by using the foregoing method.

[0141] In a possible implementation, when the electronic device 100 is a wearable watch, because the watch does not have an in-case state, a direction may be preset as the second direction. For example, a vertically upward direction of a watch crown of the wearable watch is used as an angle corresponding to the second direction. To ensure that a word on a watch face is displayed in a correct orientation, the user needs to ensure that the word on the watch face remains in the correct orientation when the arm is lifted during wearing. Therefore, the second direction is corresponding to the right-side position.

[0142] Based on this, as shown in FIG. 5b and FIG. 5c, a sensor on the wearable watch may detect that the arm of the user hangs. In this case, the first direction may be detected through the magnetic sensor on the wearable watch. When the measured first direction is vertically downward, and is denoted as 0°, an included angle between the first direction and the second direction is 180°, indicating that the watch crown of the watch is vertically downward. Therefore, a reverse position of a left or right position corresponding to the second direction may be assigned to the first direction, indicating that the wearable watch is worn by the user on the left wrist. When the measured first direction is vertically upward, and is denoted as 180°, an included angle between the first direction and the second direction is 0°, indicating that the watch crown of the watch is vertically upward. Therefore, a left or right position corresponding to the second direction may be assigned to the first direction, indicating that the wearable watch is worn by the user on the right wrist.

[0143] Based on the foregoing embodiments, the following describes the technical solutions of this application by using specific embodiments.

[0144] FIG. 8 is a diagram of initial states of earbuds. As shown in FIG. 8, when producing the earbuds, a manufacturer may design and produce an appearance of only one earbud, and a magnetic sensor is disposed at same positions of the earbuds. In this way, any earbud can measure a first direction by using a same method, and further determine a left or right position of the earbud. The three headsets shown in FIG. 8 are completely the same in appearance. The earbud may be the earbud 201 or 202 in FIG. 2a, or the earbud may be the earbud 301 or 302 in FIG. 3a.

[0145] Optionally, when the earbud is in the initial state, a second direction may be preset. For example, a direction consistent with a geomagnetic direction is set as the second direction.

[0146] FIG. 9 is a diagram of placing states of earbuds. As shown in FIG. 9, when a user places the two earbuds in a headset case, the two earbuds simulate a wearing state, and respective speakers are placed opposite to each other. In this case, a first earbud may be placed in the headset case in an initial state, and a magnetic sensor of the first earbud is located at a bottom; and a second earbud needs to be flipped and then placed in the headset case, and a magnetic sensor of the second earbud is located at a top. However, this is still an operation phase of the user, and the earbud does not know a left or right position of the earbud.

[0147] FIG. 10 is a diagram of in-case states of the earbuds. As shown in FIG. 10, after the earbuds are placed in the headset case, the user closes a cover. The earbuds receive slot information from the headset case. Slot information received by the first earbud indicates that a slot in which the first earbud is located is a left slot (L). In this case, the first earbud may set a position of the first earbud to left. Slot information received by the second earbud indicates that a slot in which the second earbud is located is a right slot (R). In this case, the second earbud may set a position of the second earbud to right.

[0148] A second direction measured by the first earbud through a magnetic sensor is vertically downward, and is denoted as 0°. Based on this, the first earbud associates 0° with a left-side position. A second direction measured by the second earbud through a magnetic sensor is vertically upward, and is denoted as 180°. Based on this, the second earbud associates 180° with a right-side position.

[0149] FIG. 11a and FIG. 11b are diagrams of wearing earbuds by a user. As shown in FIG. 11a, after taking out the two earbuds from a headset case, the user wears a first earbud on a left ear, and wears a second earbud on a right ear. In this case, after the first earbud detects a wearing status, the first direction measured through the magnetic sensor is 0°, and an included angle between the first direction and the second direction (0°) of the first earbud is 0°. Therefore, the first earbud may determine that the first earbud does not flip, and assign the left-side position in the second direction to the first direction, that is, the first earbud determines that the user wears the first earbud on the left ear. After the second earbud detects a wearing status, the first direction measured through the magnetic sensor is 180°, and an included angle between the first direction and the second direction (180°) of the second earbud is 0°. Therefore, the second earbud may determine that the second earbud does not flip, and assign the right-side position in the second direction to the first direction, that is, the second earbud determines that the user wears the second earbud on the right ear.

[0150] As shown in FIG. 11b, after taking out the two earbuds from the headset case, the user wears the first earbud on the right ear, and wears the second earbud on the left ear. In this case, after the first earbud detects a wearing status, the first direction measured through the magnetic sensor is 180°, and an included angle between the first direction and the second direction (0°) of the first earbud is 180°. Therefore, the first earbud may determine that the first earbud flips, and assign a reverse position of the left-side position in the second direction to the first direction, that is, the first earbud determines that the user wears the first earbud on the right ear. After the second earbud detects a wearing status, the first direction measured through the magnetic sensor is 0°, and an included angle between the first direction and the second direction (180°) of the second earbud is 180°. Therefore, the second earbud may determine that the second earbud flips, and assign the left-side position in the second direction to the first direction, that is, the second earbud determines that the user wears the second earbud on the left ear.

[0151] It may be understood that, to implement the foregoing functions, a large screen includes corresponding hardware and / or software modules for performing the functions. With reference to algorithm steps of examples described in embodiments disclosed in this specification, this application can be implemented in a form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or hardware driven by computer software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application with reference to the embodiments, but it should not be considered that the implementation goes beyond the scope of this application.

[0152] In an example, FIG. 12 is a block diagram of an apparatus 1200 according to an embodiment of this application. The apparatus 1200 may include a processor 1201 and a transceiver / transceiver pin 1202, and optionally further includes a memory 1203.

[0153] Components of the apparatus 1200 are coupled together through a bus 1204. In addition to a data bus, the bus 1204 further includes a power bus, a control bus, and a status signal bus. However, for clear description, various types of buses in the figure are referred to as the bus 1204.

[0154] Optionally, the memory 1203 may be configured to store instructions in the foregoing method embodiments. The processor 1201 may be configured to: execute the instructions in the memory 1203, control a receiving pin to receive a signal, and control a sending pin to send a signal.

[0155] The apparatus 1200 may be the electronic device or a chip of the electronic device in the foregoing method embodiments.

[0156] All related content of the steps in the foregoing method embodiments may be cited in function descriptions of the corresponding functional modules. Details are not described herein again.

[0157] This embodiment further provides a computer storage medium. The computer storage medium stores computer instructions, and when the computer instructions are run on an electronic device, the electronic device is enabled to perform the related method steps, to implement the wearing position identification method in the foregoing embodiments.

[0158] This embodiment further provides a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to perform the related steps, to implement the wearing position identification method in the foregoing embodiments.

[0159] In addition, an embodiment of this application further provides an apparatus. The apparatus may be specifically a chip, a component, or a module. The apparatus may include a processor and a memory that are connected to each other. The memory is configured to store computer-executable instructions. When the apparatus runs, the processor may execute the computer-executable instructions stored in the memory, so that the chip performs the wearing position identification method in the foregoing method embodiments.

[0160] The electronic device, the computer storage medium, the computer program product, or the chip provided in embodiments is configured to perform the corresponding method provided above. Therefore, for beneficial effect that can be achieved, refer to beneficial effect of the corresponding method provided above. Details are not described herein again.

[0161] Based on the descriptions of the implementations, a person skilled in the art may understand that for the purpose of convenient and brief description, division into the functional modules is merely used as an example for description. In actual application, the functions may be allocated to different functional modules for completion based on a requirement. In other words, an inner structure of an apparatus is divided into different functional modules, to implement all or some of the functions described above.

[0162] In the several embodiments provided in this application, it should be understood that the disclosed apparatuses and methods may be implemented in another manner. For example, the described apparatus embodiment is merely an example. For example, the module or division into the units is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented by using some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.

[0163] The units described as separate parts may or may not be physically separate, and parts displayed as units may be one or more physical units, may be located in one place, or may be distributed on different places. Some or all of the units may be selected based on an actual requirement to achieve objectives of the solutions of embodiments.

[0164] In addition, functional units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units may be integrated into one unit. The integrated unit may be implemented in a form of hardware, or may be implemented in a form of a software functional unit.

[0165] Any content of embodiments of this application and any content of a same embodiment may be freely combined. Any combination of the foregoing content shall fall within the scope of this application.

[0166] When the integrated unit is implemented in the form of the software functional unit and sold or used as an independent product, the integrated unit may be stored in a readable storage medium. Based on such an understanding, the technical solutions of embodiments of this application essentially, or the part contributing to the conventional technology, or all or some of the technical solutions may be implemented in a form of a software product. The software product is stored in a storage medium and includes several instructions for instructing a device (which may be a single-chip microcomputer, a chip, or the like) or a processor (processor) to perform all or some of the steps of the method described in embodiments of this application. The storage medium includes various media that can store program code, such as a USB flash drive, a portable hard disk drive, a read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), a magnetic disk, and an optical disc.

[0167] The foregoing describes embodiments of this application with reference to the accompanying drawings. However, this application is not limited to the foregoing specific implementations. The foregoing specific implementations are merely examples, but are not limited. Inspired by this application, a person of ordinary skill in the art may further make many modifications without departing from the purposes of this application and the protection scope of the claims, and all the modifications shall fall within the protection scope of this application.

[0168] Methods or algorithm steps described in combination with the content disclosed in embodiments of this application may be implemented by hardware, or may be implemented by a processor by executing software instructions. The software instruction may include a corresponding software module. The software module may be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read-Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a removable hard disk, a compact disc read-only memory (CD-ROM), or any other form of storage medium well-known in the art. For example, a storage medium is coupled to a processor, so that the processor can read information from the storage medium and write information into the storage medium. Certainly, the storage medium may be a component of the processor. The processor and the storage medium may be disposed in an ASIC.

[0169] A person skilled in the art should be aware that in the foregoing one or more examples, functions described in embodiments of this application may be implemented by hardware, software, firmware, or any combination thereof. When the functions are implemented by software, the foregoing functions may be stored in a computer-readable medium or transmitted as one or more instructions or code in a computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that enables a computer program to be transmitted from one place to another. The storage medium may be any available medium accessible to a general-purpose or a dedicated computer.

[0170] The foregoing describes embodiments of this application with reference to the accompanying drawings. However, this application is not limited to the foregoing specific implementations. The foregoing specific implementations are merely examples, but are not limited. Inspired by this application, a person of ordinary skill in the art may further make many modifications without departing from the purposes of this application and the protection scope of the claims, and all the modifications shall fall within the protection scope of this application.

Claims

1. A headset, comprising a first earbud, wherein the first earbud comprises a first direction sensor and a first processor, and the first direction sensor is configured to sense a posture of the first earbud; when the first earbud is worn on a left ear of a user, the first earbud is in a first posture, and the first processor configures the first earbud to play a sound of a left channel; when the first earbud is worn on a right ear of the user, the first earbud is in a second posture, and the first processor configures the first earbud to play a sound of a right channel; and in the first posture, a first position of the first earbud faces the ground; in the second posture, a second position of the first earbud faces the ground; and the first position is different from the second position.

2. The headset according to claim 1, wherein the first position and the second position are two opposite positions on the first earbud; and in the first posture, the first position faces the ground, and the second position is away from the ground; and in the second posture, the second position faces the ground, and the first position is away from the ground.

3. The headset according to claim 1, wherein when the first earbud is worn on the left ear of the user, the first processor further configures the first earbud to interact with the user by using left-ear touch logic; and when the first earbud is worn on the right ear of the user, the first processor further configures the first earbud to interact with the user by using right-ear touch logic.

4. The headset according to claim 1, wherein the first direction sensor sends a direction signal to the first processor.

5. The headset according to claim 1, wherein the earbud comprises a first end portion, a second end portion, and a connection portion; and the first end portion comprises a speaker, and the speaker is configured to play a sound to an ear canal of the user.

6. The headset according to claim 1, wherein the first direction sensor comprises one or more of a gravity sensor, a magnetic sensor, a magnet, a Hall sensor, a magneto sensor, a gaussmeter, and a magnetometer.

7. The headset according to any one of claims 1 to 6, further comprising a second earbud, wherein the second earbud comprises a second direction sensor and a second processor, and the second direction sensor is configured to sense a posture of the second earbud; when the second earbud is worn on the left ear of the user, the second earbud is in the first posture, and the second processor configures the second earbud to play the sound of the left channel; when the second earbud is worn on the right ear of the user, the second earbud is in the second posture, and the second processor configures the second earbud to play the sound of the right channel; and in the first posture, a first position of the second earbud faces the ground; in the second posture, a second position of the second earbud faces the ground; and the first position is different from the second position.

8. The headset according to claim 7, wherein when the first earbud is worn on a left ear of a first user, and the second earbud is worn on a left ear of a second user, both the first earbud and the second earbud play the sound of the left channel; and when the first earbud is worn on a right ear of the first user, and the second earbud is worn on a right ear of the second user, both the first earbud and the second earbud play the sound of the right channel.

9. The headset according to any one of claims 1 to 6, further comprising a second earbud, wherein the second earbud comprises a second processor, and the first earbud is communicatively connected to the second earbud; when the first earbud is worn on the left ear of the user, and the second earbud is worn on the right ear of the user, the first earbud sends a first signal to the second earbud; and the second earbud receives the first signal, and the second earbud plays a sound of a right ear canal.

10. A wearing position identification method, comprising: when detecting that a user wears an electronic device, obtaining a first direction of the electronic device through a direction sensor disposed on the electronic device; and determining a wearing position of the electronic device based on the first direction.

11. The method according to claim 10, wherein when the first direction is downward, the electronic device is worn at a first position, and when the first direction is upward, the electronic device is worn at a second position; or when the first direction is upward, the electronic device is worn at a first position, and when the first direction is downward, the electronic device is worn at a second position.

12. The method according to claim 10, wherein before the determining the wearing position of the electronic device based on the first direction, the method further comprises: obtaining a second direction as a reference and a third position corresponding to the second direction; and the determining the wearing position of the electronic device based on the first direction comprises: determining the wearing position of the electronic device based on the first direction, the second direction, and the third position.

13. The method according to claim 12, wherein the determining the wearing position of the electronic device based on the first direction, the second direction, and the third position comprises: obtaining an included angle between the first direction and the second direction; and when the included angle is less than a first threshold, determining the third position as the wearing position of the electronic device; or when the included angle is greater than a second threshold, determining a fourth position as the wearing position of the electronic device, wherein the fourth position is a reverse position of the third position.

14. The method according to claim 13, wherein the first threshold is less than the second threshold, or the first threshold is equal to the second threshold.

15. The method according to any one of claims 12 to 14, wherein the obtaining the second direction as the reference and the third position corresponding to the second direction comprises: when the electronic device is placed in an accommodation apparatus, receiving slot information from the accommodation apparatus; obtaining, based on the slot information, the third position of the electronic device in the accommodation apparatus; and obtaining the second direction of the electronic device through the direction sensor.

16. The method according to any one of claims 12 to 14, wherein the obtaining the second direction as the reference and the third position corresponding to the second direction comprises: determining a direction corresponding to a preset angle as the second direction; and determining a preset position as the third position.

17. The method according to any one of claims 12 to 16, wherein when the second direction is a gravity direction, and the first position is a left-side position, if the first direction is the gravity direction, the wearing position is the left-side position; or if the first direction is an anti-gravity direction, the wearing position is a right-side position.

18. The method according to any one of claims 12 to 16, wherein when the second direction is an anti-gravity direction, and the first position is a left-side position, if the first direction is the anti-gravity direction, the wearing position is the left-side position; or if the first direction is a gravity direction, the wearing position is a right-side position.

19. The method according to any one of claims 10 to 18, wherein when the angle of the first direction is in a first interval or a second interval, the first direction is an effective enabling direction, wherein the first interval is [T1, 90°], the second interval is [90°, T2], and T1 and T2 are preset positive integers.

20. An electronic device, comprising: a direction sensor; one or more processors; and a memory, configured to store one or more programs, wherein the direction sensor is configured to detect a first direction of the electronic device; and when the one or more programs are executed by the one or more processors, the one or more processors determine a wearing position based on the first direction.

21. The electronic device according to claim 20, wherein when the first direction is downward, the electronic device is worn at a first position, and when the first direction is upward, the electronic device is worn at a second position; or when the first direction is upward, the electronic device is worn at a first position, and when the first direction is downward, the electronic device is worn at a second position.

22. The electronic device according to claim 20 or 21, wherein the electronic device is a headset, the headset comprises two earbuds, and the two earbuds are of a same shape; the earbud comprises a first end portion, a second end portion, and a connection portion; and the first end portion comprises a speaker.

23. The electronic device according to claim 22, wherein the first end portion and the second end portion are clamped on auricles of a user when being worn.

24. The electronic device according to claim 22 or 23, wherein the two earbuds are respectively worn on a left ear or a right ear of the user.

25. The electronic device according to claim 20 or 21, wherein the electronic device is a wearable watch, and a watch crown is disposed on a side of a watch face of the wearable watch.

26. The electronic device according to claim 25, wherein the wearable watch is worn on a left wrist or a right wrist of a user.

27. A computer-readable storage medium, comprising a computer program, wherein when the computer program is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 10 to 19.

28. A computer program product, wherein the computer program product comprises computer program code, and when the computer program code is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 10 to 19.

29. A chip, comprising one or more interface circuits and one or more processors, wherein the interface circuit is configured to: receive a signal from a memory of an electronic device, and send the signal to the processor, wherein the signal comprises computer instructions stored in the memory; and when the processor executes the computer instructions, the electronic device is enabled to perform the method according to any one of claims 10 to 19.