Disclosure of Invention
The embodiment of the invention provides an earphone sound channel switching method and device, which can automatically match left and right sound channels with left and right ears after a user wears an earphone, so that the user can obtain better hearing experience when listening to stereo content by using the earphone.
The first aspect of the embodiments of the present invention discloses a method for switching a sound channel of an earphone, where the earphone includes a first earphone and a second earphone, the first earphone includes at least two infrared sensors, and the method includes:
the terminal equipment receives a sensor signal acquired by the infrared sensor;
determining a wearing position of the first earphone according to the sensor signal;
acquiring a first sound channel preset by the first earphone and a second sound channel preset by the second earphone;
judging whether the wearing positions of the first sound channel and the first earphone are matched or not;
if not, setting the sound channel corresponding to the first earphone as the second sound channel, and setting the sound channel corresponding to the second earphone as the first sound channel.
As an optional implementation manner, before the terminal device receives the sensor signal acquired by the infrared sensor, the method further includes:
monitoring whether the terminal equipment is connected with the earphone or not;
the terminal equipment receives the sensor signal obtained by the infrared sensor, and the method comprises the following steps:
and if the connection between the terminal equipment and the earphone is established, the terminal equipment receives a sensor signal acquired by the infrared sensor.
As an optional embodiment, the determining the wearing position of the first earphone according to the sensor signal includes:
and analyzing contour information of a user body adjacent to the first earphone according to the sensor signal so as to determine whether the first earphone is worn on the left ear or the right ear of the user.
As an alternative embodiment, the first channel is a left channel and the second channel is a right channel; alternatively, the first channel is the right channel and the second channel is the left channel.
As an optional implementation manner, the determining whether the wearing positions of the first channel and the first headphone match includes:
if the first earphone is worn on the left ear of the user and the first sound channel is a right sound channel, judging that the wearing position of the first sound channel is not matched with that of the first earphone; or,
if the first earphone is worn on the right ear of the user and the first sound channel is a left sound channel, it is determined that the wearing position of the first sound channel is not matched with that of the first earphone.
The second aspect of the embodiments of the present invention discloses a device for switching a sound channel of an earphone, where the earphone includes a first earphone and a second earphone, the first earphone includes at least two infrared sensors, and the device includes:
the receiving unit is used for receiving the sensor signal acquired by the infrared sensor;
a determination unit for determining a wearing position of the first headphone according to the sensor signal;
an obtaining unit, configured to obtain a first channel preset by the first earphone and a second channel preset by the second earphone;
the judging unit is used for judging whether the wearing positions of the first sound channel and the first earphone are matched or not;
and the switching unit is used for setting the sound channel corresponding to the first earphone as the second sound channel and setting the sound channel corresponding to the second earphone as the first sound channel when the wearing position of the first sound channel is not matched with that of the first earphone.
As an optional implementation, the apparatus further comprises:
the monitoring unit is used for monitoring whether the terminal equipment is connected with the earphone or not;
the receiving unit is specifically configured to receive a sensor signal acquired by the infrared sensor when the terminal device and the earphone have been connected.
As an optional implementation manner, the determining unit is specifically configured to analyze contour information of a body of the user in proximity to the first earphone according to the sensor signal to determine whether the first earphone is worn on a left ear or a right ear of the user.
As an alternative embodiment, the first channel is a left channel and the second channel is a right channel; alternatively, the first channel is the right channel and the second channel is the left channel.
As an optional implementation manner, the determining unit is specifically configured to determine that the wearing position of the first earphone is not matched with that of the first sound channel when the first earphone is worn on the left ear of the user and the first sound channel is a right sound channel; or, specifically, the first headphone is configured to determine that the wearing position of the first channel is not matched with the wearing position of the first headphone when the first headphone is worn on the right ear of the user and the first channel is a left channel.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, terminal equipment receives a sensor signal acquired by the infrared sensor; judging the wearing position of the first earphone according to the sensor signal; acquiring a first sound channel preset by the first earphone and a second sound channel preset by the second earphone; judging whether the wearing positions of the first sound channel and the first earphone are matched or not; if not, setting the sound channel corresponding to the first earphone as the second sound channel, and setting the sound channel corresponding to the second earphone as the first sound channel. Therefore, by implementing the embodiment of the invention, the left and right sound channels and the left and right ears can be automatically matched after the user wears the earphones, so that better hearing experience can be obtained when the user listens to the stereo content by using the earphones.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, or apparatus.
The embodiment of the invention provides an earphone sound channel switching method and device, which can automatically match left and right sound channels with left and right ears after a user wears an earphone, so that the user can obtain better hearing experience when listening to stereo content by using the earphone. The following are detailed below.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for switching a headphone channel according to an embodiment of the present invention. The method for switching the earphone channels shown in fig. 1 may include the following steps:
101. and the terminal equipment receives the sensor signal acquired by the infrared sensor.
In the embodiment of the present invention, the terminal device may be a smart phone, a smart watch, a palm computer, a tablet computer, a Personal Digital Assistant (PDA), a Point of Sales (POS), or the like, and the following description of the embodiment of the present invention will not be repeated.
In an embodiment of the present invention, the infrared sensor is an infrared sensor configured on an earphone, and the earphone includes a first earphone and a second earphone, where the first earphone is configured with at least two infrared sensors, and is used to obtain body contour information of a user through the infrared sensors after the user wears the first earphone, and further determine whether the user wears the first earphone on the left ear or the right ear.
Meanwhile, the terminal equipment can be connected with the earphones in various ways and receives sensor signals acquired by the infrared sensor configured on the first earphone through the established connection; for example, if the earphone is a wired earphone, the earphone interface is connected to the audio output interface of the terminal device, and the connection can be established; or, if the earphone is a bluetooth earphone, a bluetooth wireless link may be established between the earphone and the terminal device to implement transmission of the sensor signal. The embodiment of the present invention is not limited to the specific method for establishing the connection between the terminal device and the earphone.
102. And determining the wearing position of the first earphone according to the sensor signal.
As an alternative embodiment, the infrared sensor may monitor the thermal radiation information of the user's body and convert it into a sensor signal; and then the terminal equipment performs mode recognition according to the sensor signal, fits the obtained heat radiation information of the body of the user to the contour information of the body of the user close to the first earphone, and then determines whether the first earphone is worn on the left ear or the right ear of the user by analyzing the contour information of the body of the user.
103. And acquiring a first sound channel preset by the first earphone and a second sound channel preset by the second earphone.
In the embodiment of the present invention, when the earphones are connected to the terminal device, the sound channel corresponding to the first earphone may be preset as the first sound channel, and the sound channel corresponding to the second earphone may be preset as the second sound channel according to the sound channel layout mode before the last disconnection. When the first sound channel is a left sound channel, the second sound channel is a right sound channel; or, conversely, when the first channel is the right channel, the second channel is the left channel.
104. And judging whether the wearing positions of the first sound channel and the first earphone are matched.
As an optional implementation manner, if the first headphone is worn on the left ear of the user and the first sound channel is the right sound channel, it is determined that the wearing position of the first sound channel does not match the wearing position of the first headphone; or, if the first earphone is worn on the right ear of the user and the first sound channel is the left sound channel, it is determined that the wearing position of the first sound channel is not matched with that of the first earphone.
105. If not, setting the sound channel corresponding to the first earphone as a second sound channel, and setting the sound channel corresponding to the second earphone as the first sound channel.
In the embodiment of the invention, when the wearing position of the first earphone is judged not to be matched with the first sound channel, the sound channels corresponding to the first earphone and the second earphone need to be exchanged so that a user can listen to a correct sound field.
Therefore, by using the method described in fig. 1, the left and right channels and the left and right ears can be automatically matched after the user wears the earphones, so that the user can obtain better hearing experience when listening to stereo content by using the earphones.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another method for switching channels of headphones according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
201. and monitoring whether the terminal equipment is connected with the earphone or not.
In the embodiment of the invention, the terminal equipment can be connected with the earphones in various ways and receives the sensor signal acquired by the infrared sensor configured on the first earphone through the established connection; for example, if the earphone is a wired earphone, the earphone interface is connected to the audio output interface of the terminal device, and the connection can be established; or, if the earphone is a bluetooth earphone, a bluetooth wireless link may be established between the earphone and the terminal device to implement transmission of the sensor signal. The embodiment of the present invention is not limited to the specific method for establishing the connection between the terminal device and the earphone.
202. And if so, the terminal equipment receives the sensor signal acquired by the infrared sensor.
In an embodiment of the present invention, the infrared sensor is an infrared sensor configured on an earphone, and the earphone includes a first earphone and a second earphone, where the first earphone is configured with at least two infrared sensors, and is used to obtain body contour information of a user through the infrared sensors after the user wears the first earphone, and further determine whether the user wears the first earphone on the left ear or the right ear.
203. And determining the wearing position of the first earphone according to the sensor signal.
As an alternative embodiment, the infrared sensor may monitor the thermal radiation information of the user's body and convert it into a sensor signal; and then the terminal equipment performs mode recognition according to the sensor signal, fits the obtained heat radiation information of the body of the user to the contour information of the body of the user close to the first earphone, and then determines whether the first earphone is worn on the left ear or the right ear of the user by analyzing the contour information of the body of the user.
204. And acquiring a first sound channel preset by the first earphone and a second sound channel preset by the second earphone.
In the embodiment of the present invention, when the earphones are connected to the terminal device, the sound channel corresponding to the first earphone may be preset as the first sound channel, and the sound channel corresponding to the second earphone may be preset as the second sound channel according to the sound channel layout mode before the last disconnection. When the first sound channel is a left sound channel, the second sound channel is a right sound channel; or, conversely, when the first channel is the right channel, the second channel is the left channel.
205. And judging whether the wearing positions of the first sound channel and the first earphone are matched.
As an optional implementation manner, if the first headphone is worn on the left ear of the user and the first sound channel is the right sound channel, it is determined that the wearing position of the first sound channel does not match the wearing position of the first headphone; or, if the first earphone is worn on the right ear of the user and the first sound channel is the left sound channel, it is determined that the wearing position of the first sound channel is not matched with that of the first earphone.
206. If not, setting the sound channel corresponding to the first earphone as a second sound channel, and setting the sound channel corresponding to the second earphone as the first sound channel.
In the embodiment of the invention, when the wearing position of the first earphone is judged not to be matched with the first sound channel, the sound channels corresponding to the first earphone and the second earphone need to be exchanged so that a user can listen to a correct sound field.
Therefore, by using the method described in fig. 2, the left and right channels and the left and right ears can be automatically matched after the user wears the earphones, so that the user can obtain better hearing experience when listening to the stereo content by using the earphones.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an earphone channel switching device according to an embodiment of the present invention. As shown in fig. 3, the apparatus may include:
a receiving unit 301, configured to receive a sensor signal acquired by the infrared sensor.
In an embodiment of the present invention, the infrared sensor is an infrared sensor configured on an earphone, and the earphone includes a first earphone and a second earphone, where the first earphone is configured with at least two infrared sensors, and is used to obtain body contour information of a user through the infrared sensors after the user wears the first earphone, and further determine whether the user wears the first earphone on the left ear or the right ear.
A determining unit 302, configured to determine a wearing position of the first earphone according to the sensor signal.
As an alternative embodiment, the infrared sensor may monitor the thermal radiation information of the user's body and convert it into a sensor signal; and then the terminal equipment performs mode recognition according to the sensor signal, fits the obtained heat radiation information of the body of the user to the contour information of the body of the user close to the first earphone, and then determines whether the first earphone is worn on the left ear or the right ear of the user by analyzing the contour information of the body of the user.
An obtaining unit 303, configured to obtain a first channel preset by the first earphone and a second channel preset by the second earphone.
In the embodiment of the present invention, when the earphones are connected to the terminal device, the sound channel corresponding to the first earphone may be preset as the first sound channel, and the sound channel corresponding to the second earphone may be preset as the second sound channel according to the sound channel layout mode before the last disconnection. When the first sound channel is a left sound channel, the second sound channel is a right sound channel; or, conversely, when the first channel is the right channel, the second channel is the left channel.
A judging unit 304, configured to judge whether the first channel matches with the wearing position of the first headphone.
As an optional implementation manner, if the first headphone is worn on the left ear of the user and the first sound channel is the right sound channel, it is determined that the wearing position of the first sound channel does not match the wearing position of the first headphone; or, if the first earphone is worn on the right ear of the user and the first sound channel is the left sound channel, it is determined that the wearing position of the first sound channel is not matched with that of the first earphone.
A switching unit 305, configured to set a channel corresponding to the first headphone as the second channel and set a channel corresponding to the second headphone as the first channel when the first channel does not match the wearing position of the first headphone.
In the embodiment of the invention, when the wearing position of the first earphone is judged not to be matched with the first sound channel, the sound channels corresponding to the first earphone and the second earphone need to be exchanged so that a user can listen to a correct sound field.
Therefore, with the device described in fig. 3, the left and right channels and the left and right ears can be automatically matched after the user wears the earphones, so that the user can obtain better hearing experience when listening to stereo content with the earphones.
Referring to fig. 4, fig. 4 is a schematic structural diagram of another earphone channel switching device disclosed in the embodiment of the present invention. Wherein, the apparatus shown in fig. 4 is optimized by the apparatus shown in fig. 3, and compared with the apparatus shown in fig. 3, the apparatus shown in fig. 4 further includes:
and a monitoring unit 306, configured to monitor whether the terminal device is connected to the headset.
In the embodiment of the invention, the terminal equipment can be connected with the earphones in various ways and receives the sensor signal acquired by the infrared sensor configured on the first earphone through the established connection; for example, if the earphone is a wired earphone, the earphone interface is connected to the audio output interface of the terminal device, and the connection can be established; or, if the earphone is a bluetooth earphone, a bluetooth wireless link may be established between the earphone and the terminal device to implement transmission of the sensor signal. The embodiment of the present invention is not limited to the specific method for establishing the connection between the terminal device and the earphone.
Therefore, with the device described in fig. 4, the left and right channels and the left and right ears can be automatically matched after the user wears the earphones, so that the user can obtain better hearing experience when listening to stereo content with the earphones.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device includes: a processor 501 and a memory 502; wherein the memory 502 can be used for the cache required by the processor 501 to execute data processing, and can also be used for providing a storage space for data called by the processor 501 to execute data processing and obtained result data.
In the embodiment of the present invention, the processor 501 calls the program code stored in the memory 502 to perform the following operations:
the terminal equipment receives a sensor signal acquired by the infrared sensor;
determining the wearing position of the first earphone according to the sensor signal;
acquiring a first sound channel preset by a first earphone and a second sound channel preset by a second earphone;
judging whether the wearing positions of the first sound channel and the first earphone are matched or not;
if not, setting the sound channel corresponding to the first earphone as a second sound channel, and setting the sound channel corresponding to the second earphone as the first sound channel.
Therefore, in the terminal device described in fig. 5, the left and right channels and the left and right ears can be automatically matched after the user wears the earphones, so that the user can obtain a better hearing experience when listening to the stereo content by using the earphones.
Referring to fig. 6, fig. 6 is a schematic structural diagram of another terminal device according to an embodiment of the present invention. As shown in fig. 6, for convenience of illustration, only the portion related to the embodiment of the present invention is shown, and details of the technique are not disclosed, please refer to the method portion of the embodiment of the present invention. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal digital assistant), a POS (Point of Sales), a vehicle-mounted computer, etc., taking the terminal as the mobile phone as an example:
fig. 6 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present invention. Referring to fig. 6, the handset includes: a Radio Frequency (RF) circuit 601, a memory 602, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a wireless fidelity (WiFi) module 607, a processor 608, and a power supply 609. Those skilled in the art will appreciate that the handset configuration shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 6:
the RF circuit 601 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 608; in addition, the data for designing uplink is transmitted to the base station. In general, the RF circuit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 601 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to global system for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 602 may be used to store software programs and modules, and the processor 608 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 603 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 603 may include a touch panel 6031 and other input devices 6032. The touch panel 6031, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 6031 (e.g., operations of a user on or near the touch panel 6031 using any suitable object or accessory such as a finger, a stylus, etc.) and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 6031 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 608, and can receive and execute commands sent by the processor 608. In addition, the touch panel 6031 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 603 may include other input devices 6032 in addition to the touch panel 6031. In particular, other input devices 6032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 604 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The display unit 604 may include a display panel 6041, and the display panel 6041 may be configured by using a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 6031 can cover the display panel 6041, and when the touch panel 6031 detects a touch operation on or near the touch panel 6031, the touch operation can be transmitted to the processor 608 to determine the type of the touch event, and then the processor 608 can provide a corresponding visual output on the display panel 6041 according to the type of the touch event. Although in fig. 6, the touch panel 6031 and the display panel 6041 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 6031 and the display panel 6041 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 6041 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 6041 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 606, speaker 6061, and microphone 6062 may provide an audio interface between the user and the handset. The audio circuit 606 may transmit the electrical signal converted from the received audio data to the speaker 6061, and convert the electrical signal into a sound signal by the speaker 6061 and output the sound signal; on the other hand, the microphone 6062 converts a collected sound signal into an electric signal, receives the electric signal by the audio circuit 606, converts the electric signal into audio data, and outputs the audio data to the processor 608 for processing, and then transmits the audio data to, for example, another cellular phone via the RF circuit 601, or outputs the audio data to the memory 602 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 607, and provides wireless broadband internet access for the user. Although fig. 6 shows the WiFi module 607, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 608 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the mobile phone. Alternatively, processor 608 may include one or more processing units; preferably, the processor 608 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The handset also includes a power supply 609 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 608 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In the foregoing embodiment, the method flows of the steps may be implemented based on the structure of the terminal device. Where both the application layer and the operating system kernel can be viewed as components of the abstract structure of processor 608.
In an embodiment of the present invention, the processor 608 calls the program code stored in the memory 602 to perform the following operations:
the terminal equipment receives a sensor signal acquired by the infrared sensor;
determining the wearing position of the first earphone according to the sensor signal;
acquiring a first sound channel preset by a first earphone and a second sound channel preset by a second earphone;
judging whether the wearing positions of the first sound channel and the first earphone are matched or not;
if not, setting the sound channel corresponding to the first earphone as a second sound channel, and setting the sound channel corresponding to the second earphone as the first sound channel.
As an alternative embodiment, the processor 608, by calling the program code stored in the memory 602, is further configured to:
monitoring whether the terminal equipment is connected with the earphone or not;
the terminal equipment receives the sensor signal that above-mentioned infrared sensor obtained, includes:
and if the terminal equipment is connected with the earphone, the terminal equipment receives the sensor signal acquired by the infrared sensor.
Therefore, in the terminal device described in fig. 6, the left and right channels and the left and right ears can be automatically matched after the user wears the earphones, so that the user can obtain a better hearing experience when listening to the stereo content by using the earphones.
It should be noted that, in the embodiment of the earphone channel switching device and the terminal device, the included units are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In addition, it is understood by those skilled in the art that all or part of the steps in the above method embodiments may be implemented by related hardware, and the corresponding program may be stored in a computer readable storage medium, where the above mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the embodiment of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.