[go: up one dir, main page]

CN106130607B - A kind of control method and electronic equipment - Google Patents

A kind of control method and electronic equipment Download PDF

Info

Publication number
CN106130607B
CN106130607B CN201610482596.2A CN201610482596A CN106130607B CN 106130607 B CN106130607 B CN 106130607B CN 201610482596 A CN201610482596 A CN 201610482596A CN 106130607 B CN106130607 B CN 106130607B
Authority
CN
China
Prior art keywords
electronic equipment
electronic device
audio data
electronic
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610482596.2A
Other languages
Chinese (zh)
Other versions
CN106130607A (en
Inventor
杨宇光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201610482596.2A priority Critical patent/CN106130607B/en
Publication of CN106130607A publication Critical patent/CN106130607A/en
Application granted granted Critical
Publication of CN106130607B publication Critical patent/CN106130607B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a kind of control method and electronic equipments.Wherein, method includes: that the first electronic equipment detects the second electronic equipment;Second electronic equipment is the electronic equipment that Bluetooth pairing is carried out with first electronic equipment;Whether judgement detects second electronic equipment within a preset time;According to judging result, the master-slave relationship of first electronic equipment and the second electronic equipment is determined, so that first electronic device works are under first mode or second mode.

Description

Control method and electronic equipment
Technical Field
The present invention relates to control technologies, and in particular, to a control method and an electronic device.
Background
The Bluetooth earphone applies the Bluetooth technology to the hands-free earphone, so that users can avoid annoying wiring stumbling and can easily talk in various ways. Since the advent of bluetooth headsets, it has been a good tool for the mobile commerce industry to increase efficiency.
To meet other usage requirements of the user, such as: music is enjoyed, producing a stereo bluetooth headset. The use of the double-ear wireless Bluetooth earphone leads the user to completely remove the stumbling of the electric wire and meets the requirement of the user on listening to music,
however, in the current binaural wireless bluetooth headset, the master-slave relationship between the two headsets is preset, the corresponding working modes are also fixed, and the user cannot use the two headsets at will, which is very troublesome to use, and thus, inconvenience is brought to the user.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide a control method and an electronic device.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides a control method, which is applied to first electronic equipment and comprises the following steps:
detecting a second electronic device; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the first electronic equipment;
judging whether the second electronic equipment is detected within preset time;
and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode.
In the foregoing solution, the determining, according to the determination result, a master-slave relationship between the first electronic device and the second electronic device includes:
and when the judgment result represents that the second electronic equipment is detected within the preset time, determining the master-slave relationship between the first electronic equipment and the second electronic equipment based on the master-slave relationship strategy.
In the foregoing solution, the determining a master-slave relationship between the first electronic device and the second electronic device based on the master-slave relationship policy includes:
and judging whether the first electronic equipment is preset default main equipment or not, and when the first electronic equipment is preset default main equipment, determining that the first electronic equipment is the main equipment and the second electronic equipment is the slave equipment so as to enable the first electronic equipment to work in a first mode.
In the above scheme, when the first electronic device is not a preset default master device, it is determined that the first electronic device is a slave device, and the second electronic device is a master device, so that the first electronic device operates in the second mode.
In the foregoing solution, the determining, according to the determination result, a master-slave relationship between the first electronic device and the second electronic device includes:
and when the judgment result represents that the second electronic equipment is not detected within the preset time, determining that the first electronic equipment is the master equipment and the second electronic equipment is the slave equipment, so that the first electronic equipment works in a first mode.
In the foregoing solution, when the first electronic device operates in the first mode and has completed bluetooth pairing with the second electronic device, the method further includes:
establishing communication connection with third electronic equipment based on the communication system of the third electronic equipment;
acquiring audio data from the third electronic device based on the established communication connection; the obtained audio data is stereo audio data;
performing play preprocessing on the acquired audio data to play the acquired audio data; transmitting the acquired audio data to the second electronic device, so that the second electronic device performs playing preprocessing on the received audio data to play the received audio data; wherein,
the first electronic equipment plays first channel audio data in stereo audio data; and the second electronic equipment plays the audio data of the second channel in the stereo audio data.
An embodiment of the present invention further provides an electronic device, including:
the communication chip is used for detecting second electronic equipment; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the electronic equipment;
the controller is used for judging whether the second electronic equipment is detected within preset time; and determining the master-slave relationship between the electronic equipment and the second electronic equipment according to the judgment result so as to enable the electronic equipment to work in the first mode or the second mode.
In the foregoing solution, the controller is specifically configured to:
and when the judgment result represents that the second electronic equipment is detected within the preset time, determining the master-slave relationship between the electronic equipment and the second electronic equipment based on the master-slave relationship strategy.
In the foregoing solution, the controller is specifically configured to:
and judging whether the electronic equipment is preset default main equipment or not, and when the electronic equipment is the preset default main equipment, determining that the electronic equipment is the main equipment and the second electronic equipment is the slave equipment so as to enable the electronic equipment to work in a first mode.
In the foregoing solution, the controller is further configured to determine that the electronic device is a slave device and the second electronic device is a master device when the electronic device is not a preset default master device, so that the electronic device operates in a second mode.
In the foregoing solution, the controller is specifically configured to:
and when the judgment result represents that the second electronic equipment is not detected within the preset time, determining that the electronic equipment is the master equipment and the second electronic equipment is the slave equipment, so that the electronic equipment works in the first mode.
In the above solution, the electronic device further includes:
the communication chip is further used for establishing communication connection with a third electronic device based on a communication system of the communication chip when the electronic device works in a first mode and the Bluetooth pairing is completed with the second electronic device; and based on the established communication connection, obtaining audio data from the third electronic device; the obtained audio data is stereo audio data;
the controller is further used for performing playing preprocessing on the acquired audio data so as to play the acquired audio data; transmitting the acquired audio data to the second electronic device, so that the second electronic device performs playing preprocessing on the received audio data to play the received audio data; wherein,
the electronic equipment plays first channel audio data in stereo audio data; and the second electronic equipment plays the audio data of the second channel in the stereo audio data.
According to the control method and the electronic device provided by the embodiment of the invention, the first electronic device detects the second electronic device; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the first electronic equipment; judging whether the second electronic equipment is detected within preset time; and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode, and automatically determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to whether the second electronic equipment is detected, so that a user can easily use any one electronic equipment to meet the use requirement of the user in the corresponding working mode.
Drawings
In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views. Like reference numerals having different letter suffixes may represent different examples of similar components. The drawings illustrate generally, by way of example, but not by way of limitation, various embodiments discussed herein.
FIG. 1 is a flowchart illustrating a control method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a processing method in an application scenario according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method of controlling according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a third electronic device according to an embodiment of the present invention.
Detailed Description
So that the manner in which the features and aspects of the embodiments of the present invention can be understood in detail, a more particular description of the embodiments of the invention, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings.
In various embodiments of the invention: the first electronic device detects a second electronic device; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the first electronic equipment; judging whether the second electronic equipment is detected within preset time; and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode.
Example one
The embodiment of the invention provides a control method, which is applied to first electronic equipment.
Fig. 1 is a schematic flow chart of an implementation of a control method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step 101: detecting a second electronic device;
the second electronic device is an electronic device which is paired with the first electronic device in a Bluetooth mode.
Here, the detecting the second electronic device means: and after the first electronic equipment is started, automatically starting a Bluetooth function, and searching equipment so as to be conveniently paired with the second electronic equipment through Bluetooth.
Step 102: judging whether the second electronic equipment is detected within preset time;
in other words, whether the second electronic device is searched within the preset time.
In practical application, after the second electronic device is started, device searching can be automatically performed, and the Bluetooth function is automatically started, so that Bluetooth pairing can be performed with the first electronic device.
The steps 101-102 are executed for the purpose of: and judging whether the user needs to use the first electronic equipment and the second electronic equipment at the same time. For example, assume that the first electronic device and the second electronic device are two headsets of a wireless bluetooth headset. When two earphones are needed to be used simultaneously (music is enjoyed), a user can open one earphone and wear the earphone on the ear, and then open the other earphone and wear the earphone on the other ear. In this case, after both the earphones are turned on, both devices search for each other.
In practical application, the preset time may be set as required, for example: when the first electronic device and the second electronic device are two earphones of the wireless Bluetooth earphone, the preset time can be set according to the time required for a user to open one earphone to wear the earphone on the ear and then open the second earphone. In other words, the preset time is set from the time required for the user to take out and put on the two earphones. Assuming that the time required for the user to take out the two earphones and wear the two earphones is 8 seconds, the preset time can be set to 8 seconds, and as long as the earphones are turned on and the other side is searched within 8 seconds, it indicates that the user needs to use the two earphones at the same time.
Step 103: and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode.
Specifically, when the judgment result represents that the second electronic device is detected within the preset time, the master-slave relationship between the first electronic device and the second electronic device is determined based on the master-slave relationship policy.
More specifically, whether the first electronic device is a preset default master device is judged, and when the first electronic device is the preset default master device, the first electronic device is determined to be the master device, and the second electronic device is determined to be a slave device, so that the first electronic device operates in a first mode.
When the first electronic device is not a preset default master device, determining that the first electronic device is a slave device and the second electronic device is a master device, so that the first electronic device works in a second mode.
Wherein, the master-slave relation strategy can be determined according to the use habit of the user. For example, when the first electronic device and the second electronic device are two earphones of a wireless bluetooth earphone, the earphone worn by the left ear is set as a default master device and the earphone worn by the right ear is set as a slave device in consideration of the general use habits of users. Then, a master-slave relationship policy is determined according to such usage habits of the user. Specifically, assuming that the first electronic device is a left-ear headset and the second electronic device is a right-ear headset, when the left-ear headset detects the right-ear headset within a preset time, the first electronic device works in a host mode, that is, performs bluetooth pairing with a smart device such as a mobile phone, so as to obtain played stereo audio data from the smart device such as the mobile phone, since the first electronic device is a default host device.
Of course, the master-slave relationship policy may also be determined according to other ways, such as: factory settings, etc.
In practical application, when the judgment result indicates that the second electronic device is not detected within the preset time, it is determined that the first electronic device is the master device and the second electronic device is the slave device, so that the first electronic device operates in the first mode, and at this time, it is indicated that the user only wants to use one electronic device and does not want to use the second electronic device.
The scheme of the embodiment of the invention can be applied to the following scenes:
the first electronic equipment is a left ear earphone of the wireless Bluetooth earphone, and the second electronic equipment is a right ear earphone of the wireless Bluetooth earphone.
In this scenario, as shown in fig. 2, when a user uses (does not pair with a mobile phone) (201) for the first time, the taking-out sequence of the left ear earphone and the right ear earphone within 8 seconds is determined (202), that is, whether both earphones are turned on within 8 seconds is determined to determine whether the other earphone is detected within a preset time; when the earphones are taken out (203) at the same time, the two earphones automatically perform Bluetooth pairing (204), the left ear is used as a host to perform Bluetooth pairing (205) with the mobile phone, and the left ear is used as a stereo earphone; when only the left ear earphone is started (206), the left ear earphone is used as a host to perform Bluetooth pairing with the mobile phone (207), when single ear use is determined, the left ear earphone is used as a single-channel earphone (208), when the single ear use is not performed, a user gives an operation instruction to the right ear earphone, and after the right ear earphone receives the instruction, the right ear earphone performs Bluetooth pairing with the left ear earphone to be used as a stereo earphone (209); when only the right ear earphone is started (210), the right ear earphone is used as a host to perform Bluetooth pairing with the mobile phone (211), when single ear use is determined, the right ear earphone is used as a single-channel earphone (212), when single ear use is not performed, a user gives an operation instruction to the left ear earphone (for example, long pressing of a key for 5 seconds and the like), and after the left ear earphone receives the instruction, the left ear earphone performs Bluetooth pairing with the right ear earphone to be used as a stereo earphone (213), so that automatic determination of master-slave relation of the two earphones is realized.
According to the control method provided by the embodiment of the invention, the first electronic equipment detects the second electronic equipment; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the first electronic equipment; judging whether the second electronic equipment is detected within preset time; and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode, and automatically determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to whether the second electronic equipment is detected, so that a user can easily use any one electronic equipment to meet the use requirement of the user in the corresponding working mode.
Example two
The embodiment of the invention provides a control method, which is applied to first electronic equipment.
Fig. 3 is a schematic flow chart of an implementation of a control method according to an embodiment of the present invention, as shown in fig. 3, the method includes the following steps:
step 301: detecting a second electronic device;
the second electronic device is an electronic device which is paired with the first electronic device in a Bluetooth mode.
Here, the detecting the second electronic device means: and after the first electronic equipment is started, automatically starting a Bluetooth function, and searching equipment so as to be conveniently paired with the second electronic equipment through Bluetooth.
Step 302: judging whether the second electronic equipment is detected within preset time;
in other words, whether the second electronic device is searched within the preset time.
In practical application, after the second electronic device is started, device searching can be automatically performed, and the Bluetooth function is automatically started, so that Bluetooth pairing can be performed with the first electronic device.
The purpose of executing steps 301-302 is: and judging whether the user needs to use the first electronic equipment and the second electronic equipment at the same time. For example, assume that the first electronic device and the second electronic device are two headsets of a wireless bluetooth headset. When two earphones are needed to be used simultaneously (music is enjoyed), a user can open one earphone and wear the earphone on the ear, and then open the other earphone and wear the earphone on the other ear. In this case, after both the earphones are turned on, both devices search for each other.
In practical application, the preset time may be set as required, for example: when the first electronic device and the second electronic device are two earphones of the wireless Bluetooth earphone, the preset time can be set according to the time required for a user to open one earphone to wear the earphone on the ear and then open the second earphone. In other words, the preset time is set from the time required for the user to take out and put on the two earphones. Assuming that the time required for the user to take out the two earphones and wear the two earphones is 8 seconds, the preset time can be set to 8 seconds, and as long as the earphones are turned on and the other side is searched within 8 seconds, it indicates that the user needs to use the two earphones at the same time.
Step 303: and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode.
Specifically, when the judgment result represents that the second electronic device is detected within the preset time, the master-slave relationship between the first electronic device and the second electronic device is determined based on the master-slave relationship policy.
More specifically, whether the first electronic device is a preset default master device is judged, and when the first electronic device is the preset default master device, the first electronic device is determined to be the master device, and the second electronic device is determined to be a slave device, so that the first electronic device operates in a first mode.
When the first electronic device is not a preset default master device, determining that the first electronic device is a slave device and the second electronic device is a master device, so that the first electronic device works in a second mode.
Wherein, the master-slave relation strategy can be determined according to the use habit of the user. For example, when the first electronic device and the second electronic device are two earphones of a wireless bluetooth earphone, the earphone worn by the left ear is set as a default master device and the earphone worn by the right ear is set as a slave device in consideration of the general use habits of users. Then, a master-slave relationship policy is determined according to such usage habits of the user. Specifically, assuming that the first electronic device is a left-ear headset and the second electronic device is a right-ear headset, when the left-ear headset detects the right-ear headset within a preset time, the first electronic device works in a host mode, that is, performs bluetooth pairing with a smart device such as a mobile phone, so as to obtain played stereo audio data from the smart device such as the mobile phone, since the first electronic device is a default host device.
Of course, the master-slave relationship policy may also be determined according to other ways, such as: factory settings, etc.
In practical application, when the judgment result indicates that the second electronic device is not detected within the preset time, it is determined that the first electronic device is the master device and the second electronic device is the slave device, so that the first electronic device operates in the first mode, and at this time, it is indicated that the user only wants to use one electronic device and does not want to use the second electronic device.
Step 304: when the first electronic equipment works in a first mode and finishes Bluetooth pairing with the second electronic equipment, establishing communication connection with third electronic equipment based on a communication system of the first electronic equipment;
step 305: acquiring audio data from the third electronic device based on the established communication connection;
here, the acquired audio data is stereo audio data.
Step 306: performing play preprocessing on the acquired audio data to play the acquired audio data; and transmitting the acquired audio data to the second electronic device, so that the second electronic device performs playing preprocessing on the received audio data to play the received audio data.
The first electronic equipment plays first channel audio data in stereo audio data; and the second electronic equipment plays the audio data of the second channel in the stereo audio data.
In other words, if the first electronic device plays left channel audio data of stereo audio data, the second electronic device plays right channel audio data of stereo audio data. And if the first electronic equipment plays the audio data of the right channel in the stereo audio data, the second electronic equipment plays the audio data of the left channel in the stereo audio data.
In practical application, when the first electronic device and the second electronic device are two earphones of a binaural wireless bluetooth earphone, the two earphones and the third electronic device both need to support a bluetooth audio transmission model agreement (A2 DP). That is, the third electronic device transmits stereo audio data to the first electronic device based on A2 DP; correspondingly, the first electronic equipment processes the received audio data based on A2DP and plays the audio data; and the second electronic equipment processes the received audio data based on the 2DP and plays the audio data.
The scheme of the embodiment of the invention can be applied to the following scenes:
the first electronic equipment is a left ear earphone of the wireless Bluetooth earphone, and the second electronic equipment is a right ear earphone of the wireless Bluetooth earphone.
In this scenario, as shown in fig. 2, when a user uses (does not pair with a mobile phone) (201) for the first time, the taking-out sequence of the left ear earphone and the right ear earphone within 8 seconds is determined (202), that is, whether both earphones are turned on within 8 seconds is determined to determine whether the other earphone is detected within a preset time; when the earphones are taken out (203) at the same time, the two earphones automatically perform Bluetooth pairing (204), the left ear is used as a host to perform Bluetooth pairing (205) with the mobile phone, and the left ear is used as a stereo earphone; when only the left ear earphone is started (206), the left ear earphone is used as a host to perform Bluetooth pairing with the mobile phone (207), when single ear use is determined, the left ear earphone is used as a single-channel earphone (208), when the single ear use is not performed, a user gives an operation instruction to the right ear earphone, and after the right ear earphone receives the instruction, the right ear earphone performs Bluetooth pairing with the left ear earphone to be used as a stereo earphone (209); when only the right ear earphone is started (210), the right ear earphone is used as a host to perform Bluetooth pairing with the mobile phone (211), when single ear use is determined, the right ear earphone is used as a single-channel earphone (212), when single ear use is not performed, a user gives an operation instruction to the left ear earphone (for example, long pressing of a key for 5 seconds and the like), and after the left ear earphone receives the instruction, the left ear earphone performs Bluetooth pairing with the right ear earphone to be used as a stereo earphone (213), so that automatic determination of master-slave relation of the two earphones is realized.
According to the control method provided by the embodiment of the invention, the first electronic equipment detects the second electronic equipment; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the first electronic equipment; judging whether the second electronic equipment is detected within preset time; and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode, and automatically determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to whether the second electronic equipment is detected, so that a user can easily use any one electronic equipment to meet the use requirement of the user in the corresponding working mode.
EXAMPLE III
To implement the method according to the embodiment of the present invention, the embodiment provides an electronic device 40, as shown in fig. 4, where the electronic device 40 includes:
a communication chip 41 for detecting a second electronic device; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the electronic equipment;
a controller 42 for determining whether the second electronic device is detected within a preset time; and determining the master-slave relationship between the electronic equipment and the second electronic equipment according to the judgment result so as to enable the electronic equipment to work in the first mode or the second mode.
Here, the detecting the second electronic device means: after the electronic device 40 is powered on, the bluetooth function is automatically started to perform device search, so as to perform bluetooth pairing with the second electronic device.
The determination is made as to whether the second electronic device is detected within a preset time, in other words, whether the second electronic device is searched within the preset time.
In practical application, after the second electronic device is powered on, device search is automatically performed, and a bluetooth function is automatically started, so that bluetooth pairing is performed with the electronic device 40.
The communication chip 41 detects a second electronic device and the controller 42 determines whether the second electronic device is detected within a preset time period to: and judging whether the user needs to use the first electronic equipment and the second electronic equipment at the same time. For example, assume that the first electronic device and the second electronic device are two headsets of a wireless bluetooth headset. When two earphones are needed to be used simultaneously (music is enjoyed), a user can open one earphone and wear the earphone on the ear, and then open the other earphone and wear the earphone on the other ear. In this case, after both the earphones are turned on, both devices search for each other.
In practical application, the preset time may be set as required, for example: when the first electronic device and the second electronic device are two earphones of the wireless Bluetooth earphone, the preset time can be set according to the time required for a user to open one earphone to wear the earphone on the ear and then open the second earphone. In other words, the preset time is set from the time required for the user to take out and put on the two earphones. Assuming that the time required for the user to take out the two earphones and wear the two earphones is 8 seconds, the preset time can be set to 8 seconds, and as long as the earphones are turned on and the other side is searched within 8 seconds, it indicates that the user needs to use the two earphones at the same time.
The controller 42 is specifically configured to:
and when the judgment result represents that the second electronic equipment is detected within the preset time, determining the master-slave relationship between the electronic equipment and the second electronic equipment based on the master-slave relationship strategy.
More specifically, the controller 42 determines whether the first electronic device is a preset default master device, and determines that the first electronic device is a master device and the second electronic device is a slave device when the first electronic device is the preset default master device, so that the first electronic device operates in the first mode.
When the first electronic device is not a preset default master device, the controller 42 determines that the first electronic device is a slave device and the second electronic device is a master device, so that the first electronic device operates in the second mode.
Wherein, the master-slave relation strategy can be determined according to the use habit of the user. For example, when the electronic device 10 and the second electronic device are two earphones of a wireless bluetooth earphone, the earphone worn by the left ear is set as the default master device and the earphone worn by the right ear is set as the slave device in consideration of the general usage habit of the user. Then, a master-slave relationship policy is determined according to such usage habits of the user. Specifically, assuming that the electronic device 40 is a left-ear headset and the second electronic device is a right-ear headset, when the left-ear headset detects the right-ear headset within a preset time, the electronic device works in a host mode, that is, performs bluetooth pairing with a smart device such as a mobile phone, so as to obtain stereo audio data played from the smart device such as the mobile phone.
Of course, the master-slave relationship policy may also be determined according to other ways, such as: factory settings, etc.
In practical application, when the determination result indicates that the second electronic device is not detected within the preset time, the controller 42 determines that the electronic device 40 is a master device and the second electronic device is a slave device, so that the electronic device 40 operates in the first mode, where this indicates that the user only wants to use one electronic device and does not want to use the second electronic device.
In an embodiment, the communication chip 41 is configured to establish a communication connection with a third electronic device based on a communication system of the communication chip based on the electronic device 40 when the electronic device 40 operates in the first mode and the bluetooth pairing is completed with the second electronic device; and based on the established communication connection, obtaining audio data from the third electronic device; the obtained audio data is stereo audio data;
the controller 42 is further configured to perform play preprocessing on the acquired audio data to play the acquired audio data; transmitting the acquired audio data to the second electronic device, so that the second electronic device performs playing preprocessing on the received audio data to play the received audio data; wherein,
the electronic equipment plays first channel audio data in stereo audio data; and the second electronic equipment plays the audio data of the second channel in the stereo audio data.
In other words, if the electronic device 40 plays the left channel audio data of the stereo audio data, the second electronic device plays the right channel audio data of the stereo audio data. If the electronic device 40 plays the right channel audio data of the stereo audio data, the second electronic device plays the left channel audio data of the stereo audio data.
In practical applications, when the electronic device 40 and the second electronic device are two earphones of a binaural wireless bluetooth earphone, the two earphones and the third electronic device both need to support A2 DP. That is, the third electronic device transmits stereo audio data to the electronic device 40 based on A2 DP; accordingly, the electronic device 40 processes the received audio data based on A2DP and plays the audio data; and the second electronic equipment processes the received audio data based on the 2DP and plays the audio data.
The scheme of the embodiment of the invention can be applied to the following scenes:
the electronic device 40 is a left ear headphone of a wireless bluetooth headset, and the second electronic device is a right ear headphone of a wireless bluetooth headset.
In this scenario, as shown in fig. 2, when a user uses (does not pair with a mobile phone) (201) for the first time, the taking-out sequence of the left ear earphone and the right ear earphone within 8 seconds is determined (202), that is, whether both earphones are turned on within 8 seconds is determined to determine whether the other earphone is detected within a preset time; when the earphones are taken out (203) at the same time, the two earphones automatically perform Bluetooth pairing (204), the left ear is used as a host to perform Bluetooth pairing with the mobile phone, and the left ear is used as a stereo earphone (205); when only the left ear earphone is started (206), the left ear earphone is used as a host to perform Bluetooth pairing with the mobile phone (207), when single ear use is determined, the left ear earphone is used as a single-channel earphone (208), when the single ear use is not performed, a user gives an operation instruction to the right ear earphone, and after the right ear earphone receives the instruction, the right ear earphone performs Bluetooth pairing with the left ear earphone to be used as a stereo earphone (209); when only the right ear earphone is started (210), the right ear earphone is used as a host to perform Bluetooth pairing with the mobile phone (211), when single ear use is determined, the right ear earphone is used as a single-channel earphone (212), when single ear use is not performed, a user gives an operation instruction to the left ear earphone (for example, long pressing of a key for 5 seconds and the like), and after the left ear earphone receives the instruction, the left ear earphone performs Bluetooth pairing with the right ear earphone to be used as a stereo earphone (213), so that automatic determination of master-slave relation of the two earphones is realized.
According to the control method provided by the embodiment of the invention, the first electronic equipment detects the second electronic equipment; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the first electronic equipment; judging whether the second electronic equipment is detected within preset time; and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode, and automatically determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to whether the second electronic equipment is detected, so that a user can easily use any one electronic equipment to meet the use requirement of the user in the corresponding working mode.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code. The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (12)

1. A control method is applied to a first electronic device, and the method comprises the following steps:
detecting a second electronic device; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the first electronic equipment;
judging whether the second electronic equipment is detected within preset time;
and determining the master-slave relationship between the first electronic equipment and the second electronic equipment according to the judgment result so as to enable the first electronic equipment to work in a first mode or a second mode.
2. The method according to claim 1, wherein the determining the master-slave relationship between the first electronic device and the second electronic device according to the determination result comprises:
and when the judgment result represents that the second electronic equipment is detected within the preset time, determining the master-slave relationship between the first electronic equipment and the second electronic equipment based on the master-slave relationship strategy.
3. The method of claim 2, wherein determining the master-slave relationship between the first electronic device and the second electronic device based on the master-slave relationship policy comprises:
and judging whether the first electronic equipment is preset default main equipment or not, and when the first electronic equipment is preset default main equipment, determining that the first electronic equipment is the main equipment and the second electronic equipment is the slave equipment so as to enable the first electronic equipment to work in a first mode.
4. The method according to claim 3, wherein when the first electronic device is not a preset default master device, the first electronic device is determined to be a slave device, and the second electronic device is a master device, so that the first electronic device operates in the second mode.
5. The method according to claim 1, wherein the determining the master-slave relationship between the first electronic device and the second electronic device according to the determination result comprises:
and when the judgment result represents that the second electronic equipment is not detected within the preset time, determining the first electronic equipment as the main equipment so as to enable the first electronic equipment to work in a first mode.
6. The method of claim 1, wherein when the first electronic device is operating in a first mode and Bluetooth pairing has been completed with the second electronic device, the method further comprises:
establishing communication connection with third electronic equipment based on the communication system of the third electronic equipment;
acquiring audio data from the third electronic device based on the established communication connection; the obtained audio data is stereo audio data;
performing play preprocessing on the acquired audio data to play the acquired audio data; transmitting the acquired audio data to the second electronic device, so that the second electronic device performs playing preprocessing on the received audio data to play the received audio data; wherein,
the first electronic equipment plays first channel audio data in stereo audio data; and the second electronic equipment plays the audio data of the second channel in the stereo audio data.
7. An electronic device, characterized in that the electronic device comprises:
the communication chip is used for detecting second electronic equipment; the second electronic equipment is electronic equipment which is in Bluetooth pairing with the electronic equipment;
the controller is used for judging whether the second electronic equipment is detected within preset time; and determining the master-slave relationship between the electronic equipment and the second electronic equipment according to the judgment result so as to enable the electronic equipment to work in the first mode or the second mode.
8. The electronic device of claim 7, wherein the controller is specifically configured to:
and when the judgment result represents that the second electronic equipment is detected within the preset time, determining the master-slave relationship between the electronic equipment and the second electronic equipment based on the master-slave relationship strategy.
9. The electronic device of claim 8, wherein the controller is specifically configured to:
and judging whether the electronic equipment is preset default main equipment or not, and when the electronic equipment is the preset default main equipment, determining that the electronic equipment is the main equipment and the second electronic equipment is the slave equipment so as to enable the electronic equipment to work in a first mode.
10. The electronic device of claim 9, wherein the controller is further configured to determine that the electronic device is a slave device and the second electronic device is a master device when the electronic device is not a preset default master device, so that the electronic device operates in the second mode.
11. The electronic device of claim 7, wherein the controller is specifically configured to:
and when the judgment result represents that the second electronic equipment is not detected within the preset time, determining the electronic equipment as the main equipment so as to enable the electronic equipment to work in the first mode.
12. The electronic device of claim 7,
the communication chip is used for establishing communication connection with a third electronic device based on a communication system of the communication chip when the electronic device works in a first mode and the Bluetooth pairing is completed with the second electronic device; and based on the established communication connection, obtaining audio data from the third electronic device; the obtained audio data is stereo audio data;
the controller is further used for performing playing preprocessing on the acquired audio data so as to play the acquired audio data; transmitting the acquired audio data to the second electronic device, so that the second electronic device performs playing preprocessing on the received audio data to play the received audio data; wherein,
the electronic equipment plays first channel audio data in stereo audio data; and the second electronic equipment plays the audio data of the second channel in the stereo audio data.
CN201610482596.2A 2016-06-27 2016-06-27 A kind of control method and electronic equipment Active CN106130607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610482596.2A CN106130607B (en) 2016-06-27 2016-06-27 A kind of control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610482596.2A CN106130607B (en) 2016-06-27 2016-06-27 A kind of control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106130607A CN106130607A (en) 2016-11-16
CN106130607B true CN106130607B (en) 2019-04-26

Family

ID=57266662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610482596.2A Active CN106130607B (en) 2016-06-27 2016-06-27 A kind of control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106130607B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107318175A (en) * 2017-08-23 2017-11-03 上海摩软通讯技术有限公司 ANTENNAUDIO transcriber and its matching method
CN112913321B (en) * 2018-12-07 2022-12-27 华为技术有限公司 Method, equipment and system for carrying out call by using Bluetooth headset
WO2020118641A1 (en) * 2018-12-13 2020-06-18 华为技术有限公司 Microphone (mic) switching method and device
CN109842873A (en) * 2019-01-29 2019-06-04 深圳市海派通讯科技有限公司 Played in stereo method based on bluetooth connection between mobile device
CN113616469B (en) * 2020-05-08 2024-02-27 未来穿戴技术有限公司 Control method and device of massage equipment, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588531A (en) * 2008-05-23 2009-11-25 林碧芬 Wireless earphone device capable of outputting stereo sound and method for outputting stereo sound
CN203243510U (en) * 2013-05-03 2013-10-16 北京爱德发科技有限公司 Stereo Bluetooth earphone
WO2014184395A2 (en) * 2014-09-15 2014-11-20 Phonak Ag Hearing assistance system and method
CN104883644A (en) * 2015-03-31 2015-09-02 联想(北京)有限公司 Information processing method and an electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8433243B2 (en) * 2007-03-28 2013-04-30 Agere Systems Llc Wireless earphone for use in bluetooth piconets

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588531A (en) * 2008-05-23 2009-11-25 林碧芬 Wireless earphone device capable of outputting stereo sound and method for outputting stereo sound
CN203243510U (en) * 2013-05-03 2013-10-16 北京爱德发科技有限公司 Stereo Bluetooth earphone
WO2014184395A2 (en) * 2014-09-15 2014-11-20 Phonak Ag Hearing assistance system and method
CN104883644A (en) * 2015-03-31 2015-09-02 联想(北京)有限公司 Information processing method and an electronic device

Also Published As

Publication number Publication date
CN106130607A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
JP7274527B2 (en) Change companion communication device behavior based on wearable device state
US11812485B2 (en) Bluetooth communication method and terminal
CN106130607B (en) A kind of control method and electronic equipment
CN110413134B (en) Wearing state detection method and related equipment
EP3920507B1 (en) Wireless audio output devices
CN110493678B (en) Earphone control method and device, earphone and storage medium
EP2283633B1 (en) Personal wireless network power-based task distribution
CN111447600B (en) Audio sharing method of wireless earphone, terminal equipment and storage medium
CN109104684B (en) Microphone plugging detection method and related products
CN105630586B (en) Information processing method and electronic equipment
CN109348334B (en) Wireless earphone and environment monitoring method and device thereof
JP2020042799A (en) Earset control method and system
CN108814572A (en) Wearing state detection method and related equipment
JP5494578B2 (en) Vehicle communication system, vehicle communication device, portable terminal device, control program
CN104410937A (en) Intelligent earphone
CN104796177A (en) Bluetooth transceiver, line control earphone module and mobile device module
WO2009158056A1 (en) Personal wireless network capabilities-based task portion distribution
WO2014053023A1 (en) Automated program selection for listening devices
KR20210059389A (en) Electronic device and method for performing communication connection with external electronic device
CN111787452B (en) TWS earphone, TWS earphone control method, TWS earphone control device and computer readable storage medium
CN108513196B (en) Wireless earphone and pairing method thereof
CN104869211B (en) A kind of information processing method and electronic equipment
CN111294259B (en) Method and device for controlling household appliance
CN119497059A (en) Audio control method, electronic device and readable storage medium
CN104079702A (en) Information processing method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant