WO2019136810A1 - Bluetooth headset master/salve switching method and apparatus - Google Patents

Bluetooth headset master/salve switching method and apparatus Download PDF

Info

Publication number
WO2019136810A1
WO2019136810A1 PCT/CN2018/077611 CN2018077611W WO2019136810A1 WO 2019136810 A1 WO2019136810 A1 WO 2019136810A1 CN 2018077611 W CN2018077611 W CN 2018077611W WO 2019136810 A1 WO2019136810 A1 WO 2019136810A1
Authority
WO
WIPO (PCT)
Prior art keywords
earphone
switching
master
slave
remaining power
Prior art date
Application number
PCT/CN2018/077611
Other languages
French (fr)
Chinese (zh)
Inventor
杜来柱
Original Assignee
深圳市沃特沃德股份有限公司
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 深圳市沃特沃德股份有限公司 filed Critical 深圳市沃特沃德股份有限公司
Publication of WO2019136810A1 publication Critical patent/WO2019136810A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements

Definitions

  • the invention relates to the field of Bluetooth earphones, in particular to a master-slave switching method and device for a Bluetooth earphone.
  • Wireless stereo Bluetooth headset because there is no line connection between the left and right headphones, you can use both together, and the function structure of the left and right headphones is also the same, so you can use it alone. Wear light and stylish.
  • This type of Bluetooth headset is sub-master, the main headset is connected to the audio player such as a mobile phone, and the main headset is connected to the slave. The audio from the headset is sent by the main headset. Since the main and slave headphones consume different power, the main earphone consumes a large amount of power, and the power consumption from the earphone is small.
  • the master-slave earphone can switch the power to be the main earphone under certain circumstances. The process of switching refers to disconnecting the main earphone from the mobile phone, and establishing a connection from the earphone to the mobile phone. This process takes about 3-5 seconds, and sometimes it takes 10 seconds to slow down.
  • the switch is to switch the master and slave headphones when the power of the main headphone is lower than a certain value, and the user is listening to the song or watching the video at this time, and it is necessary to pause for 3-5 seconds or even 10 seconds, which brings the user very much.
  • the feeling is not smooth, the experience is not very good.
  • the main object of the present invention is to provide a master/slave switching method for a Bluetooth headset that has a good user experience, so that the user does not have a sudden and unsmooth feeling when switching between master and slave when using the Bluetooth headset.
  • the invention provides a Bluetooth headset master-slave switching method, comprising the steps of:
  • step S3 determine whether the audio player is playing an audio file; if not, proceed to step S4; if yes, proceed to step S5;
  • the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
  • the method includes:
  • step S6 If the audio player does not receive the instruction to switch or pause, determine whether the first remaining power value is lower than the second threshold, where the second threshold is smaller than the first threshold; if yes, step S4 is performed.
  • the step of switching the second earphone from the earphone as the main earphone comprises:
  • the step of switching the second earphone from the earphone as the main earphone comprises:
  • S44 A voice signal that is switched between master and slave when switching.
  • the invention also provides a Bluetooth headset master-slave switching device, comprising:
  • An acquiring module configured to acquire a first remaining power value of the first earphone as the primary earphone
  • a first determining module configured to determine whether the first remaining power value is lower than a first threshold
  • a second determining module configured to determine whether the audio player is playing an audio file if the first remaining power value is lower than the first threshold; if not, calling the switching module; if yes, calling the third determining module;
  • a switching module configured to switch a second earphone as a headset to a primary earphone
  • the third determining module is configured to determine whether the audio player receives an instruction to switch or pause; if yes, invoke the switching module.
  • the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
  • the Bluetooth headset master-slave switching device further includes:
  • a fourth determining module configured to determine whether the first remaining power value is lower than a second threshold if the audio player does not receive an instruction to switch or pause; wherein, the second threshold is less than the first threshold; if yes, Then call the switch module.
  • the switching module includes:
  • a determining unit configured to determine whether the second remaining power value of the second earphone is higher than the first remaining power value
  • An instruction unit configured to generate a switching instruction if the second remaining power value is higher than the first remaining power value
  • the switching unit is configured to switch the second earphone as the slave earphone to the main earphone.
  • the switching module includes:
  • a signal unit for signaling a master-slave switching when switching is provided.
  • the invention has the beneficial effects that before the master-slave headset switches, the detection is not switched when listening to music. Or switch the master-slave headset when the user switches the audio file or pauses the audio file, or switch after the user listens to an audio file, and then plays the next audio file after the switch is successful. Making the master-slave switch of the headset does not disturb the user to listen to the audio file, giving the user a good experience.
  • FIG. 1 is a schematic diagram of steps of a method for master-slave switching of a Bluetooth headset according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of steps of a method for master-slave switching of a Bluetooth headset according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of steps of a method for master-slave switching of a Bluetooth headset according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a master/slave switching device for a Bluetooth headset according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a Bluetooth headset master-slave switching apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a master/slave switching device for a Bluetooth headset according to an embodiment of the present invention.
  • a method for master-slave switching of a Bluetooth headset including the steps of:
  • step S3 determine whether the audio player is playing an audio file; if the audio player does not play the audio file, perform step S4; if the audio player is playing the audio file, perform steps S5;
  • step S5. Determine whether the audio player receives the instruction of switching or suspending. If the audio player receives the instruction of switching or suspending, step S4 is performed.
  • the user downloads the Bluetooth headset APP on the mobile phone, and then uses the mobile phone to open the Bluetooth, and connects the Bluetooth headset to the mobile phone.
  • the default left earphone is the first earphone, the main earphone, and the right earphone is the second earphone, which is the slave earphone.
  • the Bluetooth headset APP of the mobile phone is connected to the main headset BLE through Bluetooth, so that the APP can obtain the working information of the main earphone or send control information to the main earphone;
  • the mobile phone is connected with the first earphone A2DP (Advanced Audio Distribution Profile), and the A2DP is the first earphone and
  • the audio connection protocol between the mobile phones enables the first earphone to play and output the audio file in the mobile phone;
  • the first earphone and the second earphone TWS Truste Wireless Stereo
  • the TWS is a connection protocol between the main earphone and the slave earphone for The first earphone transmits information to the second earphone.
  • the first earphone receives the audio file of the mobile phone, converts it into a broadcasted electronic signal, and sends an electronic signal that should be output by the second earphone to the second earphone, so that the second earphone outputs music according to the electronic signal.
  • the mobile phone APP obtains the power status of the first earphone in real time. Specifically, the percentage of the remaining power of the first earphone is obtained, and the first remaining power value is generated; and then it is determined whether it is greater than the first threshold, that is, whether the remaining power is It is sufficient.
  • the APP temporarily does not switch between the main earphone and the slave earphone, and obtains the playing state of the audio player of the mobile phone in real time, and determines whether a command to switch or pause is received, and the command of switching or suspending makes The currently playing audio file stops.
  • the pause command is an instruction that the user actively sends a pause to play the music generation pause, or an instruction that the user switches to another program when the mobile phone is operated, and the playback of the audio file is forced to be suspended to generate a pause.
  • the main steps of switching the main earphone and the slave earphone are to disconnect the A2DP connection between the first earphone and the mobile phone, disconnect the first earphone from the Bluetooth headset APP, establish an A2DP connection between the second earphone and the mobile phone, and establish a second earphone and Bluetooth. Headphones APP connection. Additionally, a specific embodiment of the first threshold may be 40%.
  • the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
  • the switching instruction refers to stopping playing the current audio file and playing another audio file.
  • the user is listening to a song. After listening to half of the song, I feel that it is not good to cut the song.
  • the audio player will choose to terminate the currently playing audio file and play the next audio file in the system. The user is not currently playing the music.
  • the next song is selected, that is, the switching instruction issued by the user.
  • the system generates the switching instruction to end the current audio file with the audio player and automatically play the next audio file in the system.
  • the step of determining whether the audio player receives an instruction to switch or pause includes:
  • step S6 If the audio player does not receive the instruction to switch or pause, determine whether the first remaining power value is lower than the second threshold, where the second threshold is smaller than the first threshold; if yes, step S4 is performed.
  • the power value of the first earphone is lower than the first threshold, and the audio player continues to play the audio file, and the instruction to pause the playback or switch the next audio file is not received, in the process,
  • the power of a headset is continuously consumed, and the APP continues to monitor the first remaining power value of the first earphone in real time. If the first remaining power value is lower than the second threshold, it indicates that the power value of the first earphone is not much, and is about to be exhausted.
  • the APP control starts the switching, switches the second earphone to the main earphone, switches the first earphone to the slave earphone, reduces the power consumption of the first earphone, and makes the Bluetooth earphone overall longer.
  • the second threshold is smaller than the first threshold. Specifically, the size of the second threshold is 20%.
  • the step of switching the second earphone from the earphone to the main earphone includes:
  • the first earphone is switched to the slave earphone, and the second earphone is switched to the master earphone.
  • the strategy followed is to extend the use time of the entire bluetooth earphone, and switch the earphone with more remaining power to the main earphone with fast power consumption. Switch the headphones with less remaining power to the slaves with slow power consumption. Therefore, when the second earphone is switched to the main earphone, it is first determined whether the second remaining power value of the second earphone is higher than the first remaining power value of the first earphone, and if the remaining power of the second earphone is large, it is necessary Switching is performed to generate a switching command to switch the second earphone to the main earphone.
  • the remaining power of the second earphone does not have more remaining power of the first earphone, the second earphone with less power will be consumed more quickly after the switchover, and the entire Bluetooth headset cannot work due to running out of power, which is contrary to the above strategy. Therefore, the remaining power of the second earphone is lower than the remaining power of the first earphone, and there is no need to switch. Further, at this time, the remaining power value of the first earphone is lower than the first threshold, and the remaining power value of the second earphone is lower than the power value of the first earphone, indicating that it is necessary to charge, and the APP sends a prompt signal to remind the user. Charge the Bluetooth headset in time.
  • the step of switching the second earphone from the earphone as the main earphone comprises:
  • S44 A voice signal that is switched between master and slave when switching.
  • the second earphone from the earphone is switched to the main earphone, and the voice signal of the master-slave switching is issued at the time of switching. Remind the user that the Bluetooth headset is doing the master-slave switch at this time, and it is temporarily unavailable.
  • the second earphone when the second earphone is switched to the main earphone, the second earphone sends a switched voice signal, and the first earphone is switched to the slave earphone, and the first earphone also issues a switched voice signal.
  • the voice signal may be a "switching" or the like.
  • the first earphone can also emit other signals, such as controlling the LED light on the Bluetooth headset to blink at a specified frequency or the LED light to emit light of a specified color.
  • the Bluetooth headset master-slave switching method of the present invention detects that the user does not listen to music before switching between the master and slave headphones. Or switch the master-slave headset when the user switches the audio file or pauses the audio file, or switch after the user listens to an audio file, and then plays the next audio file after the switch is successful. Making the master-slave switch of the headset does not disturb the user to listen to the audio file, giving the user a good experience.
  • the present invention further provides a Bluetooth headset master-slave switching device, including:
  • the acquiring module 1 is configured to acquire a first remaining power value of the first earphone as the primary earphone;
  • the first determining module 2 is configured to determine whether the first remaining power value is lower than a first threshold
  • the second determining module 3 is configured to determine whether the audio player is playing an audio file if the first remaining power value is lower than the first threshold; if not, calling the switching module 4; if yes, calling the third determining module 5;
  • the switching module 4 is configured to switch the second earphone as the earphone to the main earphone;
  • the third determining module 5 is configured to determine whether the audio player receives an instruction to switch or pause; if yes, the switching module 4 is invoked.
  • the user downloads the Bluetooth headset APP on the mobile phone, and then uses the mobile phone to open the Bluetooth, and connects the Bluetooth headset to the mobile phone.
  • the default left earphone is the first earphone, the main earphone, and the right earphone is the second earphone, which is the slave earphone.
  • the Bluetooth headset APP of the mobile phone is connected to the main headset BLE through Bluetooth, so that the APP can obtain the working information of the main earphone or send control information to the main earphone;
  • the mobile phone is connected with the first earphone A2DP (Advanced Audio Distribution Profile), and the A2DP is the first earphone and
  • the audio connection protocol between the mobile phones enables the first earphone to play and output the audio file in the mobile phone;
  • the first earphone and the second earphone TWS Truste Wireless Stereo
  • the TWS is a connection protocol between the main earphone and the slave earphone for The first earphone transmits information to the second earphone.
  • the first earphone receives the audio file of the mobile phone, converts it into a broadcasted electronic signal, and sends an electronic signal that should be output by the second earphone to the second earphone, so that the second earphone outputs music according to the electronic signal.
  • the acquiring module 1 obtains the power status of the first earphone in real time.
  • the acquiring module 1 obtains the percentage of the remaining power of the first earphone, and generates a first remaining power value; and then the first determining module 2 determines whether If it is greater than the first threshold, that is, whether the remaining power is sufficient, if it is smaller than the first threshold, it is determined that the primary earphone and the secondary earphone need to be switched; then the second determining module 3 determines whether the current time is suitable for switching, and obtains the current mobile phone. Whether the audio player is playing an audio file, if not playing, the switching module 4 is called to switch the main earphone and the slave earphone, which has a small negative impact on the user experience, and minimizes interference to the user's use.
  • the Bluetooth headset temporarily does not switch the main earphone and the slave earphone, and invokes the third determining module 5, and the third determining module 5 obtains the playing state of the audio player of the mobile phone in real time. , determining whether the instruction to switch or pause is received, the instruction to switch or pause will stop the currently playing audio file, and when the played audio file stops switching, the third determining module 5 calls the switching module 4 to switch the second earphone to The main earphone switches the first earphone to the slave earphone, so that the switching does not appear abrupt, and the music is switched after the music is stopped, thereby improving the user experience.
  • the pause command is an instruction that the user actively sends a pause to play the music generation pause, or an instruction that the user switches to another program when the mobile phone is operated, and the playback of the audio file is forced to be suspended to generate a pause.
  • the main process of switching the main earphone and the slave earphone is to disconnect the A2DP connection between the first earphone and the mobile phone, disconnect the first earphone from the Bluetooth headset APP, establish an A2DP connection between the second earphone and the mobile phone, and establish a second earphone and Bluetooth. Headphones APP connection. Additionally, a specific embodiment of the first threshold may be 40%.
  • the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
  • the switching instruction refers to stopping playing the current audio file and playing another audio file.
  • the user is listening to a song. After listening to half of the song, I feel that it is not good to cut the song.
  • the audio player will choose to terminate the currently playing audio file and play the next audio file in the system. The user is not currently playing the music.
  • the next song is selected, that is, the switching instruction issued by the user.
  • the system generates the switching instruction to end the current audio file with the audio player and automatically play the next audio file in the system.
  • the Bluetooth headset master-slave switching device further includes:
  • the fourth determining module 6 is configured to determine, if the audio player does not receive the instruction of the switching or the suspension, whether the first remaining power value is lower than the second threshold, wherein the second threshold is smaller than the first threshold; , the switching module 4 is called.
  • the fourth determining module 6 monitors the first remaining power value of the first earphone in real time.
  • the fourth judging module 6 calls the switching module 4, controls to start the switching, switches the second earphone to the main earphone, and switches the first earphone to the slave earphone, reducing the first
  • the power consumption of the headphones makes the Bluetooth headset as a whole longer.
  • the second threshold is smaller than the first threshold. Specifically, the size of the second threshold is 20%.
  • the switching module 4 further includes:
  • the determining unit 41 is configured to determine whether the second remaining power value of the second earphone is higher than the first remaining power value
  • the command unit 42 is configured to generate a switching instruction if the second remaining power value is higher than the first remaining power value
  • the switching unit 43 is configured to switch the second earphone as the slave earphone to the main earphone.
  • the first earphone is switched to the slave earphone, and the second earphone is switched to the master earphone.
  • the strategy followed is to extend the use time of the entire bluetooth earphone, and switch the earphone with more remaining power to the main earphone with fast power consumption. Switch the headphones with less remaining power to the slaves with slow power consumption. Therefore, when the second earphone is switched to the main earphone, the determining unit 41 first determines whether the second remaining power value of the second earphone is higher than the first remaining power value of the first earphone, and if the second earphone has more remaining power, It is necessary to switch, the command unit 42 generates a switching command, and the switching unit 43 switches the second earphone to the main earphone.
  • the remaining power of the second earphone does not have more remaining power of the first earphone, the second earphone with less power will be consumed more quickly after the switchover, and the entire Bluetooth headset cannot work due to running out of power, which is contrary to the above strategy. Therefore, the remaining power of the second earphone is lower than the remaining power of the first earphone, and there is no need to switch. Further, at this time, the remaining power value of the first earphone is lower than the first threshold, and the remaining power value of the second earphone is lower than the power value of the first earphone, indicating that it is necessary to charge, and the APP sends a prompt signal to remind the user. Charge the Bluetooth headset in time.
  • the switching module 4 further includes:
  • a signal unit for signaling a master-slave switching when switching is provided.
  • the second earphone from the earphone is switched to the main earphone, and the signal unit controls the voice signal of the master/slave switching when the Bluetooth earphone is switched. Remind the user that the Bluetooth headset is doing the master-slave switch at this time, and it is temporarily unavailable.
  • the second earphone when the second earphone is switched to the main earphone, the second earphone sends a switched voice signal, and the first earphone is switched to the slave earphone, and the first earphone also issues a switched voice signal.
  • the voice signal may be a "switching" or the like.
  • the first earphone can also emit other signals, such as controlling the LED light on the Bluetooth headset to blink at a specified frequency or the LED light to emit light of a specified color.
  • the Bluetooth headset master-slave switching device of the present invention detects that the device is not listening to music before switching between the master and slave headphones. Or switch the master-slave headset when the user switches the audio file or pauses the audio file, or switch after the user listens to an audio file, and then plays the next audio file after the switch is successful. Making the master-slave switch of the headset does not disturb the user to listen to the audio file, giving the user a good experience.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

Disclosed in the present invention are a Bluetooth headset master/salve switching method and apparatus. The method comprises the steps of: obtaining a first residual electric quantity value of a first headset as a master headset; determining whether the first residual electric quantity value is lower than a first threshold; determining whether an audio player is playing an audio file if the first residual electric quantity value is lower than the first threshold; switching a second headset as a slave headset to be the master headset if the audio player is not playing an audio file; determining whether the audio player receives a switching or pausing instruction if the audio player is playing an audio file; and switching the second headset as the slave headset to be the master headset if the audio player receives the switching or pausing instruction. According to the present invention, before the master/slave switching is carried out on Bluetooth headsets, whether a user is using the Bluetooth headsets is detected, and the switching is merely carried out when the user is not using the Bluetooth headsets, so that a good experience effect is provided for the user.

Description

蓝牙耳机主从切换方法及装置Bluetooth headset master-slave switching method and device 技术领域Technical field
本发明涉及到蓝牙耳机领域,特别是涉及到蓝牙耳机主从切换方法及装置。The invention relates to the field of Bluetooth earphones, in particular to a master-slave switching method and device for a Bluetooth earphone.
背景技术Background technique
无线立体声蓝牙耳机,由于左右耳机之间没有线连接,可以两只一起使用,而且左右两个耳机的功能结构也都完全一样,因而也可以单只使用。佩戴轻便时尚。这种蓝牙耳机是分主从的,主耳机跟手机等音频播放设备蓝牙连接,同时主耳机还要和从耳机保持连接。从耳机的音频是主耳机发送的。由于主从耳机耗电不同,主耳机耗电大,从耳机耗电小,为了最大限度的增加耳机的实际使用时间,主从耳机在特定的情况下,可以切换电量多的来做主耳机。切换的过程是指将主耳机和手机断开连接,同时从耳机与手机建立连接,这个过程大概要花3-5秒钟时间,有的慢一点的甚至要花10秒钟的时间。Wireless stereo Bluetooth headset, because there is no line connection between the left and right headphones, you can use both together, and the function structure of the left and right headphones is also the same, so you can use it alone. Wear light and stylish. This type of Bluetooth headset is sub-master, the main headset is connected to the audio player such as a mobile phone, and the main headset is connected to the slave. The audio from the headset is sent by the main headset. Since the main and slave headphones consume different power, the main earphone consumes a large amount of power, and the power consumption from the earphone is small. In order to maximize the actual use time of the earphone, the master-slave earphone can switch the power to be the main earphone under certain circumstances. The process of switching refers to disconnecting the main earphone from the mobile phone, and establishing a connection from the earphone to the mobile phone. This process takes about 3-5 seconds, and sometimes it takes 10 seconds to slow down.
现在的切换都是当主耳机的电量低于一定值后,就开始切换主从耳机,而用户此时在听歌或看视频,要停顿3-5秒钟甚至10秒钟,给用户带来很不流畅的感觉,体验效果不太好。Now the switch is to switch the master and slave headphones when the power of the main headphone is lower than a certain value, and the user is listening to the song or watching the video at this time, and it is necessary to pause for 3-5 seconds or even 10 seconds, which brings the user very much. The feeling is not smooth, the experience is not very good.
技术问题technical problem
本发明的主要目的为提供一种给用户体验良好的蓝牙耳机主从切换方法,使用户在使用蓝牙耳机时在主从切换的时候不会有突兀不流畅的感觉。The main object of the present invention is to provide a master/slave switching method for a Bluetooth headset that has a good user experience, so that the user does not have a sudden and unsmooth feeling when switching between master and slave when using the Bluetooth headset.
技术解决方案Technical solution
本发明提出一种蓝牙耳机主从切换方法,包括步骤:The invention provides a Bluetooth headset master-slave switching method, comprising the steps of:
S1、获取作为主耳机的第一耳机的第一剩余电量值;S1. Acquire a first remaining power value of the first earphone as the primary earphone;
S2、判断所述第一剩余电量值是否低于第一阈值;S2. Determine whether the first remaining power value is lower than a first threshold.
S3、若第一剩余电量值低于第一阈值,判断音频播放器是否在播放音频文件;若否,则执行步骤S4;若是,则执行步骤S5; S3, if the first remaining power value is lower than the first threshold, determine whether the audio player is playing an audio file; if not, proceed to step S4; if yes, proceed to step S5;
S4、将作为从耳机的第二耳机切换为主耳机;S4, which will be switched as the second earphone from the earphone to the main earphone;
S5、判断音频播放器是否接收到切换或暂停的指令;若是,则执行步骤S4。S5. Determine whether the audio player receives an instruction to switch or pause; if yes, execute step S4.
进一步地,所述切换指令包括:用户发出的切换指令以及系统生成的切换指令。Further, the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
进一步地,所述判断音频播放器是否接收到切换或暂停的指令的步骤之后包括:Further, after the step of determining whether the audio player receives the instruction of switching or suspending, the method includes:
S6、若音频播放器没有接收到切换或暂停的指令,则判断所述第一剩余电量值是否低于第二阈值,其中,第二阈值小于所述第一阈值;若是,则执行步骤S4。S6. If the audio player does not receive the instruction to switch or pause, determine whether the first remaining power value is lower than the second threshold, where the second threshold is smaller than the first threshold; if yes, step S4 is performed.
进一步地,所述将作为从耳机的第二耳机切换为主耳机的步骤包括:Further, the step of switching the second earphone from the earphone as the main earphone comprises:
S41、判断第二耳机的第二剩余电量值是否高于第一剩余电量值;S41. Determine whether the second remaining power value of the second earphone is higher than the first remaining power value.
S42、若是,生成切换指令;S42. If yes, generate a switching instruction;
S43、将作为从耳机的第二耳机切换为主耳机。S43. Switching to the main earphone as the second earphone from the earphone.
进一步地,所述将作为从耳机的第二耳机切换为主耳机的步骤包括:Further, the step of switching the second earphone from the earphone as the main earphone comprises:
S44、切换时发出主从切换的语音信号。S44. A voice signal that is switched between master and slave when switching.
本发明还提出一种蓝牙耳机主从切换装置,包括:The invention also provides a Bluetooth headset master-slave switching device, comprising:
获取模块,用于获取作为主耳机的第一耳机的第一剩余电量值;An acquiring module, configured to acquire a first remaining power value of the first earphone as the primary earphone;
第一判断模块,用于判断所述第一剩余电量值是否低于第一阈值;a first determining module, configured to determine whether the first remaining power value is lower than a first threshold;
第二判断模块,用于若第一剩余电量值低于第一阈值,判断音频播放器是否在播放音频文件;若否,则调用切换模块;若是,则调用第三判断模块;a second determining module, configured to determine whether the audio player is playing an audio file if the first remaining power value is lower than the first threshold; if not, calling the switching module; if yes, calling the third determining module;
切换模块,用于将作为耳机的第二耳机切换为主耳机;a switching module, configured to switch a second earphone as a headset to a primary earphone;
第三判断模块,用于判断音频播放器是否接收到切换或暂停的指令;若是,则调用切换模块。The third determining module is configured to determine whether the audio player receives an instruction to switch or pause; if yes, invoke the switching module.
进一步地,所述切换指令包括:用户发出的切换指令以及系统生成的切换指令。Further, the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
进一步地,所述蓝牙耳机主从切换装置还包括:Further, the Bluetooth headset master-slave switching device further includes:
第四判断模块,用于若音频播放器没有接收到切换或暂停的指令,则判断所述第一剩余电量值是否低于第二阈值,其中,第二阈值小于所述第一阈值;若是,则调用切换模块。a fourth determining module, configured to determine whether the first remaining power value is lower than a second threshold if the audio player does not receive an instruction to switch or pause; wherein, the second threshold is less than the first threshold; if yes, Then call the switch module.
进一步地,所述切换模块包括:Further, the switching module includes:
判断单元,用于判断第二耳机的第二剩余电量值是否高于第一剩余电量值;a determining unit, configured to determine whether the second remaining power value of the second earphone is higher than the first remaining power value;
指令单元,用于若第二剩余电量值高于第一剩余电量值,生成切换指令;An instruction unit, configured to generate a switching instruction if the second remaining power value is higher than the first remaining power value;
切换单元,用于将作为从耳机的第二耳机切换为主耳机。The switching unit is configured to switch the second earphone as the slave earphone to the main earphone.
进一步地,所述切换模块包括:Further, the switching module includes:
信号单元,用于切换时发出主从切换的语音信号。A signal unit for signaling a master-slave switching when switching.
有益效果Beneficial effect
与现有技术相比,本发明的有益效果是:在主从耳机切换前,检测是没有在收听音乐才切换。或者是趁着用户切换音频文件或将音频文件暂停的时候切换主从耳机,或者是趁着用户听完一个音频文件后再切换,切换成功后播放下一个音频文件。使耳机的主从切换不会打扰到用户收听音频文件,给用户很好的体验效果。Compared with the prior art, the invention has the beneficial effects that before the master-slave headset switches, the detection is not switched when listening to music. Or switch the master-slave headset when the user switches the audio file or pauses the audio file, or switch after the user listens to an audio file, and then plays the next audio file after the switch is successful. Making the master-slave switch of the headset does not disturb the user to listen to the audio file, giving the user a good experience.
附图说明DRAWINGS
图1是本发明一实施例的蓝牙耳机主从切换方法的步骤示意图;1 is a schematic diagram of steps of a method for master-slave switching of a Bluetooth headset according to an embodiment of the present invention;
图2是本发明一实施例的蓝牙耳机主从切换方法的步骤示意图;2 is a schematic diagram of steps of a method for master-slave switching of a Bluetooth headset according to an embodiment of the present invention;
图3是本发明一实施例的蓝牙耳机主从切换方法的步骤示意图;3 is a schematic diagram of steps of a method for master-slave switching of a Bluetooth headset according to an embodiment of the present invention;
图4是本发明一实施例的蓝牙耳机主从切换装置的结构示意图;4 is a schematic structural diagram of a master/slave switching device for a Bluetooth headset according to an embodiment of the present invention;
图5是本发明一实施例的蓝牙耳机主从切换装置的结构示意图;FIG. 5 is a schematic structural diagram of a Bluetooth headset master-slave switching apparatus according to an embodiment of the present invention; FIG.
图6是本发明一实施例的蓝牙耳机主从切换装置的结构示意图。FIG. 6 is a schematic structural diagram of a master/slave switching device for a Bluetooth headset according to an embodiment of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
参照图1,提出本发明一实施例的蓝牙耳机主从切换方法,包括步骤:Referring to FIG. 1 , a method for master-slave switching of a Bluetooth headset according to an embodiment of the present invention is provided, including the steps of:
S1、获取作为主耳机的第一耳机的第一剩余电量值;S1. Acquire a first remaining power value of the first earphone as the primary earphone;
S2、判断所述第一剩余电量值是否低于第一阈值;S2. Determine whether the first remaining power value is lower than a first threshold.
S3、若第一剩余电量值低于第一阈值,判断音频播放器是否在播放音频文件;若音频播放器没有播放音频文件,则执行步骤S4;若音频播放器在播放音频文件,则执行步骤S5;S3. If the first remaining power value is lower than the first threshold, determine whether the audio player is playing an audio file; if the audio player does not play the audio file, perform step S4; if the audio player is playing the audio file, perform steps S5;
S4、将作为从耳机的第二耳机切换为主耳机;S4, which will be switched as the second earphone from the earphone to the main earphone;
S5、判断音频播放器是否接收到切换或暂停的指令,若音频播放器接收到切换或暂停的指令,则执行步骤S4。S5. Determine whether the audio player receives the instruction of switching or suspending. If the audio player receives the instruction of switching or suspending, step S4 is performed.
本实施例中,用户在手机上下载蓝牙耳机APP,然后用手机打开蓝牙,将蓝牙耳机与手机连接,默认左耳机为第一耳机,是主耳机,右耳机是第二耳机,是从耳机。手机的蓝牙耳机APP通过蓝牙与主耳机BLE连接,使APP可以获取主耳机的工作信息或者发送控制信息给主耳机;手机和第一耳机A2DP(Advanced Audio Distribution Profile)连接,A2DP是第一耳机和手机之间的音频连接协议,使第一耳机播放输出手机内的音频文件;第一耳机和第二耳机TWS(True Wireless Stereo)连接,TWS是主耳机和从耳机之间的连接协议,用于第一耳机发送信息给第二耳机。开始播放音乐,第一耳机接收到手机的音频文件,转换为播出的电子信号,并将应该是第二耳机输出的电子信号发送给第二耳机,使第二耳机依此电子信号输出音乐。播放音乐的同时,手机APP实时获取第一耳机的电量情况,具体的,获取的是第一耳机的剩余电量的百分比,生成第一剩余电量值;然后判断是否大于第一阈值,即剩余电量是否是充足的,如果比第一阈值小,则判定需要切换主耳机与从耳机了;然后判断当前的时刻是否适合切换,获取当前的手机里的音频播放器是否在播放音频文件,如果没有播放,则切换主耳机与从耳机,这样对用户的体验造成较小的负面影响,尽可能的减少对用户使用的干扰。如果判定音频播放器是在播放音频文件,则APP暂时不切换主耳机和从耳机,实时获取手机的音频播放器的播放状态,判断是否接收到切换或暂停的指令,切换或暂停的指令都会使当前播放的音频文件停止,当播放的音频文件停止再进行切换,将第二耳机切换为主耳机,将第一耳机切换为从耳机,这样切换不会显得突兀,是音乐停止了之后再切换的,提高用户的体验效果。暂停指令是用户主动发出的暂停播放音乐生成暂停的指令,或者是用户在操作手机时,切换到其他程序而使音频文件的播放被迫中止而生成暂停的指令。其中,切换主耳机与从耳机的主要步骤是断开第一耳机与手机的A2DP连接,断开第一耳机与蓝牙耳机APP连接,建立第二耳机与手机的A2DP连接,建立第二耳机与蓝牙耳机APP连接。另,第一阈值的具体实施例可以是40%。In this embodiment, the user downloads the Bluetooth headset APP on the mobile phone, and then uses the mobile phone to open the Bluetooth, and connects the Bluetooth headset to the mobile phone. The default left earphone is the first earphone, the main earphone, and the right earphone is the second earphone, which is the slave earphone. The Bluetooth headset APP of the mobile phone is connected to the main headset BLE through Bluetooth, so that the APP can obtain the working information of the main earphone or send control information to the main earphone; the mobile phone is connected with the first earphone A2DP (Advanced Audio Distribution Profile), and the A2DP is the first earphone and The audio connection protocol between the mobile phones enables the first earphone to play and output the audio file in the mobile phone; the first earphone and the second earphone TWS (True Wireless Stereo) are connected, and the TWS is a connection protocol between the main earphone and the slave earphone for The first earphone transmits information to the second earphone. Starting to play music, the first earphone receives the audio file of the mobile phone, converts it into a broadcasted electronic signal, and sends an electronic signal that should be output by the second earphone to the second earphone, so that the second earphone outputs music according to the electronic signal. While playing music, the mobile phone APP obtains the power status of the first earphone in real time. Specifically, the percentage of the remaining power of the first earphone is obtained, and the first remaining power value is generated; and then it is determined whether it is greater than the first threshold, that is, whether the remaining power is It is sufficient. If it is smaller than the first threshold, it is determined that it is necessary to switch between the main earphone and the slave earphone; then it is judged whether the current time is suitable for switching, and whether the audio player in the current mobile phone is playing an audio file, if not, Then the main earphone and the slave earphone are switched, which has less negative impact on the user experience and minimizes interference to the user's use. If it is determined that the audio player is playing an audio file, the APP temporarily does not switch between the main earphone and the slave earphone, and obtains the playing state of the audio player of the mobile phone in real time, and determines whether a command to switch or pause is received, and the command of switching or suspending makes The currently playing audio file stops. When the played audio file stops switching, the second earphone is switched to the main earphone, and the first earphone is switched to the slave earphone, so that the switching does not appear abrupt, and the music is switched after the music is stopped. To improve the user experience. The pause command is an instruction that the user actively sends a pause to play the music generation pause, or an instruction that the user switches to another program when the mobile phone is operated, and the playback of the audio file is forced to be suspended to generate a pause. The main steps of switching the main earphone and the slave earphone are to disconnect the A2DP connection between the first earphone and the mobile phone, disconnect the first earphone from the Bluetooth headset APP, establish an A2DP connection between the second earphone and the mobile phone, and establish a second earphone and Bluetooth. Headphones APP connection. Additionally, a specific embodiment of the first threshold may be 40%.
进一步地,所述切换指令包括:用户发出的切换指令以及系统生成的切换指令。Further, the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
本实施例中,切换指令是指停止播放当前的音频文件转而播放另一个音频文件。用户在听一首歌,听了一半觉得不好听就切歌,选择下一首歌,音频播放器就会选择终止当前播放的音频文件,播放系统里的下一个音频文件,用户在当前音乐未播放完毕的情况下选择下一首歌,即用户发出的切换指令。系统生成的切换指令是用音频播放器播放结束当前的音频文件,自动播放系统里的下一个音频文件。In this embodiment, the switching instruction refers to stopping playing the current audio file and playing another audio file. The user is listening to a song. After listening to half of the song, I feel that it is not good to cut the song. When I select the next song, the audio player will choose to terminate the currently playing audio file and play the next audio file in the system. The user is not currently playing the music. When the playback is completed, the next song is selected, that is, the switching instruction issued by the user. The system generates the switching instruction to end the current audio file with the audio player and automatically play the next audio file in the system.
参照图2,进一步地,所述判断音频播放器是否接收到切换或暂停的指令的步骤之后包括:Referring to FIG. 2, further, the step of determining whether the audio player receives an instruction to switch or pause includes:
S6、若音频播放器没有接收到切换或暂停的指令,则判断所述第一剩余电量值是否低于第二阈值,其中,第二阈值小于所述第一阈值;若是,则执行步骤S4。S6. If the audio player does not receive the instruction to switch or pause, determine whether the first remaining power value is lower than the second threshold, where the second threshold is smaller than the first threshold; if yes, step S4 is performed.
本实施例中,如果第一耳机的电量值低于第一阈值,而音频播放器持续在播放音频文件,而且也没有接收到播放暂停或切换下一个音频文件的指令,在这个过程中,第一耳机的电量在持续消耗,APP继续实时监测第一耳机的第一剩余电量值,如果第一剩余电量值低于第二阈值了,表示第一耳机的电量值不多了,即将消耗完,而音频播放器还在播放音频文件,则APP控制启动切换,将第二耳机切换为主耳机,将第一耳机切换为从耳机,减小第一耳机的电量消耗,使蓝牙耳机整体获得更长的使用时间。第二阈值小于第一阈值,具体的,第二阈值的大小是20%。In this embodiment, if the power value of the first earphone is lower than the first threshold, and the audio player continues to play the audio file, and the instruction to pause the playback or switch the next audio file is not received, in the process, The power of a headset is continuously consumed, and the APP continues to monitor the first remaining power value of the first earphone in real time. If the first remaining power value is lower than the second threshold, it indicates that the power value of the first earphone is not much, and is about to be exhausted. While the audio player is still playing the audio file, the APP control starts the switching, switches the second earphone to the main earphone, switches the first earphone to the slave earphone, reduces the power consumption of the first earphone, and makes the Bluetooth earphone overall longer. Use time. The second threshold is smaller than the first threshold. Specifically, the size of the second threshold is 20%.
参照图3,进一步地,所述将作从耳机的第二耳机切换为主耳机的步骤包括:Referring to FIG. 3, further, the step of switching the second earphone from the earphone to the main earphone includes:
S41、判断第二耳机的第二剩余电量值是否高于第一剩余电量值;S41. Determine whether the second remaining power value of the second earphone is higher than the first remaining power value.
S42、若是,生成切换指令;S42. If yes, generate a switching instruction;
S43、将作为从耳机的第二耳机切换为主耳机。S43. Switching to the main earphone as the second earphone from the earphone.
本实施例中,将第一耳机切换为从耳机,将第二耳机切换为主耳机,所遵循的策略是延长整个蓝牙耳机的使用时长,将剩余电量多的耳机切换为耗电快的主耳机,将剩余电量少的耳机切换为耗电慢的从耳机。因此,将第二耳机切换为主耳机的时候,先判断第二耳机的第二剩余电量值是否高于第一耳机的第一剩余电量值,如果是第二耳机的剩余电量多,就有必要进行切换,生成切换指令,将第二耳机切换为主耳机。如果第二耳机的剩余电量还没有第一耳机的剩余电量多,则切换后会使电量少的第二耳机更迅速的耗完而使整个蓝牙耳机因电用完而无法工作,有违上述策略,因此第二耳机的剩余电量比第一耳机的剩余电量低,就没必要进行切换了。进一步地,此时,第一耳机的剩余电量值低于第一阈值,而第二耳机的剩余电量值比第一耳机的电量值还要低,说明有必要充电了,APP发出提示信号提醒用户对蓝牙耳机及时充电。In this embodiment, the first earphone is switched to the slave earphone, and the second earphone is switched to the master earphone. The strategy followed is to extend the use time of the entire bluetooth earphone, and switch the earphone with more remaining power to the main earphone with fast power consumption. Switch the headphones with less remaining power to the slaves with slow power consumption. Therefore, when the second earphone is switched to the main earphone, it is first determined whether the second remaining power value of the second earphone is higher than the first remaining power value of the first earphone, and if the remaining power of the second earphone is large, it is necessary Switching is performed to generate a switching command to switch the second earphone to the main earphone. If the remaining power of the second earphone does not have more remaining power of the first earphone, the second earphone with less power will be consumed more quickly after the switchover, and the entire Bluetooth headset cannot work due to running out of power, which is contrary to the above strategy. Therefore, the remaining power of the second earphone is lower than the remaining power of the first earphone, and there is no need to switch. Further, at this time, the remaining power value of the first earphone is lower than the first threshold, and the remaining power value of the second earphone is lower than the power value of the first earphone, indicating that it is necessary to charge, and the APP sends a prompt signal to remind the user. Charge the Bluetooth headset in time.
进一步地,所述将作为从耳机的第二耳机切换为主耳机的步骤包括:Further, the step of switching the second earphone from the earphone as the main earphone comprises:
S44、切换时发出主从切换的语音信号。S44. A voice signal that is switched between master and slave when switching.
本实施例中,将作为从耳机的第二耳机切换为主耳机,在切换时发出主从切换的语音信号。提醒用户此时蓝牙耳机在做主从切换的动作,暂时不可使用。其中,将第二耳机切换为主耳机时,第二耳机发出切换的语音信号,同时第一耳机切换为从耳机,第一耳机也发出切换的语音信号。语音信号可以是“切换中”等类似的声音。第一耳机也可以发出其他的信号,例如控制蓝牙耳机上的LED灯以指定的频率闪烁或LED灯发出指定颜色的光。In this embodiment, the second earphone from the earphone is switched to the main earphone, and the voice signal of the master-slave switching is issued at the time of switching. Remind the user that the Bluetooth headset is doing the master-slave switch at this time, and it is temporarily unavailable. Wherein, when the second earphone is switched to the main earphone, the second earphone sends a switched voice signal, and the first earphone is switched to the slave earphone, and the first earphone also issues a switched voice signal. The voice signal may be a "switching" or the like. The first earphone can also emit other signals, such as controlling the LED light on the Bluetooth headset to blink at a specified frequency or the LED light to emit light of a specified color.
综上所述,本发明的蓝牙耳机主从切换方法,在主从耳机切换前,检测是没有在收听音乐才切换。或者是趁着用户切换音频文件或将音频文件暂停的时候切换主从耳机,或者是趁着用户听完一个音频文件后再切换,切换成功后播放下一个音频文件。使耳机的主从切换不会打扰到用户收听音频文件,给用户很好的体验效果。In summary, the Bluetooth headset master-slave switching method of the present invention detects that the user does not listen to music before switching between the master and slave headphones. Or switch the master-slave headset when the user switches the audio file or pauses the audio file, or switch after the user listens to an audio file, and then plays the next audio file after the switch is successful. Making the master-slave switch of the headset does not disturb the user to listen to the audio file, giving the user a good experience.
参照图4,本发明还提出一蓝牙耳机主从切换装置,包括:Referring to FIG. 4, the present invention further provides a Bluetooth headset master-slave switching device, including:
获取模块1,用于获取作为主耳机的第一耳机的第一剩余电量值;The acquiring module 1 is configured to acquire a first remaining power value of the first earphone as the primary earphone;
第一判断模块2,用于判断所述第一剩余电量值是否低于第一阈值;The first determining module 2 is configured to determine whether the first remaining power value is lower than a first threshold;
第二判断模块3,用于若第一剩余电量值低于第一阈值,判断音频播放器是否在播放音频文件;若否,则调用切换模块4;若是,则调用第三判断模块5;The second determining module 3 is configured to determine whether the audio player is playing an audio file if the first remaining power value is lower than the first threshold; if not, calling the switching module 4; if yes, calling the third determining module 5;
切换模块4,用于将作为耳机的第二耳机切换为主耳机;The switching module 4 is configured to switch the second earphone as the earphone to the main earphone;
第三判断模块5,用于判断音频播放器是否接收到切换或暂停的指令;若是,则调用切换模块4。The third determining module 5 is configured to determine whether the audio player receives an instruction to switch or pause; if yes, the switching module 4 is invoked.
本实施例中,用户在手机上下载蓝牙耳机APP,然后用手机打开蓝牙,将蓝牙耳机与手机连接,默认左耳机为第一耳机,是主耳机,右耳机是第二耳机,是从耳机。手机的蓝牙耳机APP通过蓝牙与主耳机BLE连接,使APP可以获取主耳机的工作信息或者发送控制信息给主耳机;手机和第一耳机A2DP(Advanced Audio Distribution Profile)连接,A2DP是第一耳机和手机之间的音频连接协议,使第一耳机播放输出手机内的音频文件;第一耳机和第二耳机TWS(True Wireless Stereo)连接,TWS是主耳机和从耳机之间的连接协议,用于第一耳机发送信息给第二耳机。开始播放音乐,第一耳机接收到手机的音频文件,转换为播出的电子信号,并将应该是第二耳机输出的电子信号发送给第二耳机,使第二耳机依此电子信号输出音乐。播放音乐的同时,获取模块1实时获取第一耳机的电量情况,具体的,获取模块1获取的是第一耳机的剩余电量的百分比,生成第一剩余电量值;然后第一判断模块2判断是否大于第一阈值,即剩余电量是否是充足的,如果比第一阈值小,则判定需要切换主耳机与从耳机了;然后第二判断模块3判断当前的时刻是否适合切换,获取当前的手机里的音频播放器是否在播放音频文件,如果没有播放,则调用切换模块4切换主耳机与从耳机,这样对用户的体验造成较小的负面影响,尽可能的减少对用户使用的干扰。如果第二判断模块3判定音频播放器是在播放音频文件,则蓝牙耳机暂时不切换主耳机和从耳机,调用第三判断模块5,第三判断模块5实时获取手机的音频播放器的播放状态,判断是否接收到切换或暂停的指令,切换或暂停的指令都会使当前播放的音频文件停止,当播放的音频文件停止再进行切换,第三判断模块5调用切换模块4将第二耳机切换为主耳机,将第一耳机切换为从耳机,这样切换不会显得突兀,是音乐停止了之后再切换的,提高用户的体验效果。暂停指令是用户主动发出的暂停播放音乐生成暂停的指令,或者是用户在操作手机时,切换到其他程序而使音频文件的播放被迫中止而生成暂停的指令。其中,切换主耳机与从耳机的主要过程是断开第一耳机与手机的A2DP连接,断开第一耳机与蓝牙耳机APP连接,建立第二耳机与手机的A2DP连接,建立第二耳机与蓝牙耳机APP连接。另,第一阈值的具体实施例可以是40%。In this embodiment, the user downloads the Bluetooth headset APP on the mobile phone, and then uses the mobile phone to open the Bluetooth, and connects the Bluetooth headset to the mobile phone. The default left earphone is the first earphone, the main earphone, and the right earphone is the second earphone, which is the slave earphone. The Bluetooth headset APP of the mobile phone is connected to the main headset BLE through Bluetooth, so that the APP can obtain the working information of the main earphone or send control information to the main earphone; the mobile phone is connected with the first earphone A2DP (Advanced Audio Distribution Profile), and the A2DP is the first earphone and The audio connection protocol between the mobile phones enables the first earphone to play and output the audio file in the mobile phone; the first earphone and the second earphone TWS (True Wireless Stereo) are connected, and the TWS is a connection protocol between the main earphone and the slave earphone for The first earphone transmits information to the second earphone. Starting to play music, the first earphone receives the audio file of the mobile phone, converts it into a broadcasted electronic signal, and sends an electronic signal that should be output by the second earphone to the second earphone, so that the second earphone outputs music according to the electronic signal. While the music is being played, the acquiring module 1 obtains the power status of the first earphone in real time. Specifically, the acquiring module 1 obtains the percentage of the remaining power of the first earphone, and generates a first remaining power value; and then the first determining module 2 determines whether If it is greater than the first threshold, that is, whether the remaining power is sufficient, if it is smaller than the first threshold, it is determined that the primary earphone and the secondary earphone need to be switched; then the second determining module 3 determines whether the current time is suitable for switching, and obtains the current mobile phone. Whether the audio player is playing an audio file, if not playing, the switching module 4 is called to switch the main earphone and the slave earphone, which has a small negative impact on the user experience, and minimizes interference to the user's use. If the second judging module 3 determines that the audio player is playing the audio file, the Bluetooth headset temporarily does not switch the main earphone and the slave earphone, and invokes the third determining module 5, and the third determining module 5 obtains the playing state of the audio player of the mobile phone in real time. , determining whether the instruction to switch or pause is received, the instruction to switch or pause will stop the currently playing audio file, and when the played audio file stops switching, the third determining module 5 calls the switching module 4 to switch the second earphone to The main earphone switches the first earphone to the slave earphone, so that the switching does not appear abrupt, and the music is switched after the music is stopped, thereby improving the user experience. The pause command is an instruction that the user actively sends a pause to play the music generation pause, or an instruction that the user switches to another program when the mobile phone is operated, and the playback of the audio file is forced to be suspended to generate a pause. The main process of switching the main earphone and the slave earphone is to disconnect the A2DP connection between the first earphone and the mobile phone, disconnect the first earphone from the Bluetooth headset APP, establish an A2DP connection between the second earphone and the mobile phone, and establish a second earphone and Bluetooth. Headphones APP connection. Additionally, a specific embodiment of the first threshold may be 40%.
进一步地,所述切换指令包括:用户发出的切换指令以及系统生成的切换指令。Further, the switching instruction includes: a switching instruction issued by a user and a switching instruction generated by the system.
本实施例中,切换指令是指停止播放当前的音频文件转而播放另一个音频文件。用户在听一首歌,听了一半觉得不好听就切歌,选择下一首歌,音频播放器就会选择终止当前播放的音频文件,播放系统里的下一个音频文件,用户在当前音乐未播放完毕的情况下选择下一首歌,即用户发出的切换指令。系统生成的切换指令是用音频播放器播放结束当前的音频文件,自动播放系统里的下一个音频文件。In this embodiment, the switching instruction refers to stopping playing the current audio file and playing another audio file. The user is listening to a song. After listening to half of the song, I feel that it is not good to cut the song. When I select the next song, the audio player will choose to terminate the currently playing audio file and play the next audio file in the system. The user is not currently playing the music. When the playback is completed, the next song is selected, that is, the switching instruction issued by the user. The system generates the switching instruction to end the current audio file with the audio player and automatically play the next audio file in the system.
参照图5,进一步地,所述蓝牙耳机主从切换装置还包括:Referring to FIG. 5, the Bluetooth headset master-slave switching device further includes:
第四判断模块6,用于若音频播放器没有接收到切换或暂停的指令,则判断所述第一剩余电量值是否低于第二阈值,其中,第二阈值小于所述第一阈值;若是,则调用切换模块4。The fourth determining module 6 is configured to determine, if the audio player does not receive the instruction of the switching or the suspension, whether the first remaining power value is lower than the second threshold, wherein the second threshold is smaller than the first threshold; , the switching module 4 is called.
本实施例中,如果第一耳机的电量值低于第一阈值,而音频播放器持续在播放音频文件,而且也没有接收到播放暂停或切换下一个音频文件的指令,在这个过程中,第一耳机的电量在持续消耗,第四判断模块6实时监测第一耳机的第一剩余电量值,如果第一剩余电量值低于第二阈值了,表示第一耳机的电量值不多了,即将消耗完,而音频播放器还在播放音频文件,则第四判断模块6调用切换模块4,控制启动切换,将第二耳机切换为主耳机,将第一耳机切换为从耳机,减小第一耳机的电量消耗,使蓝牙耳机整体获得更长的使用时间。第二阈值小于第一阈值,具体的,第二阈值的大小是20%。In this embodiment, if the power value of the first earphone is lower than the first threshold, and the audio player continues to play the audio file, and the instruction to pause the playback or switch the next audio file is not received, in the process, The power of a headset is continuously consumed, and the fourth determining module 6 monitors the first remaining power value of the first earphone in real time. If the first remaining power value is lower than the second threshold, it indicates that the power value of the first earphone is not much, that is, After the audio player is still playing the audio file, the fourth judging module 6 calls the switching module 4, controls to start the switching, switches the second earphone to the main earphone, and switches the first earphone to the slave earphone, reducing the first The power consumption of the headphones makes the Bluetooth headset as a whole longer. The second threshold is smaller than the first threshold. Specifically, the size of the second threshold is 20%.
参照图6,进一步地,所述切换模块4包括:Referring to FIG. 6, the switching module 4 further includes:
判断单元41,用于判断第二耳机的第二剩余电量值是否高于第一剩余电量值;The determining unit 41 is configured to determine whether the second remaining power value of the second earphone is higher than the first remaining power value;
指令单元42,用于若第二剩余电量值高于第一剩余电量值,生成切换指令;The command unit 42 is configured to generate a switching instruction if the second remaining power value is higher than the first remaining power value;
切换单元43,用于将作为从耳机的第二耳机切换为主耳机。The switching unit 43 is configured to switch the second earphone as the slave earphone to the main earphone.
本实施例中,将第一耳机切换为从耳机,将第二耳机切换为主耳机,所遵循的策略是延长整个蓝牙耳机的使用时长,将剩余电量多的耳机切换为耗电快的主耳机,将剩余电量少的耳机切换为耗电慢的从耳机。因此,将第二耳机切换为主耳机的时候,判断单元41先判断第二耳机的第二剩余电量值是否高于第一耳机的第一剩余电量值,如果是第二耳机的剩余电量多,就有必要进行切换,指令单元42生成切换指令,切换单元43将第二耳机切换为主耳机。如果第二耳机的剩余电量还没有第一耳机的剩余电量多,则切换后会使电量少的第二耳机更迅速的耗完而使整个蓝牙耳机因电用完而无法工作,有违上述策略,因此第二耳机的剩余电量比第一耳机的剩余电量低,就没必要进行切换了。进一步地,此时,第一耳机的剩余电量值低于第一阈值,而第二耳机的剩余电量值比第一耳机的电量值还要低,说明有必要充电了,APP发出提示信号提醒用户对蓝牙耳机及时充电。In this embodiment, the first earphone is switched to the slave earphone, and the second earphone is switched to the master earphone. The strategy followed is to extend the use time of the entire bluetooth earphone, and switch the earphone with more remaining power to the main earphone with fast power consumption. Switch the headphones with less remaining power to the slaves with slow power consumption. Therefore, when the second earphone is switched to the main earphone, the determining unit 41 first determines whether the second remaining power value of the second earphone is higher than the first remaining power value of the first earphone, and if the second earphone has more remaining power, It is necessary to switch, the command unit 42 generates a switching command, and the switching unit 43 switches the second earphone to the main earphone. If the remaining power of the second earphone does not have more remaining power of the first earphone, the second earphone with less power will be consumed more quickly after the switchover, and the entire Bluetooth headset cannot work due to running out of power, which is contrary to the above strategy. Therefore, the remaining power of the second earphone is lower than the remaining power of the first earphone, and there is no need to switch. Further, at this time, the remaining power value of the first earphone is lower than the first threshold, and the remaining power value of the second earphone is lower than the power value of the first earphone, indicating that it is necessary to charge, and the APP sends a prompt signal to remind the user. Charge the Bluetooth headset in time.
进一步地,所述切换模块4还包括:Further, the switching module 4 further includes:
信号单元,用于切换时发出主从切换的语音信号。A signal unit for signaling a master-slave switching when switching.
本实施例中,将作为从耳机的第二耳机切换为主耳机,信号单元控制蓝牙耳机在切换时发出主从切换的语音信号。提醒用户此时蓝牙耳机在做主从切换的动作,暂时不可使用。其中,将第二耳机切换为主耳机时,第二耳机发出切换的语音信号,同时第一耳机切换为从耳机,第一耳机也发出切换的语音信号。语音信号可以是“切换中”等类似的声音。第一耳机也可以发出其他的信号,例如控制蓝牙耳机上的LED灯以指定的频率闪烁或LED灯发出指定颜色的光。In this embodiment, the second earphone from the earphone is switched to the main earphone, and the signal unit controls the voice signal of the master/slave switching when the Bluetooth earphone is switched. Remind the user that the Bluetooth headset is doing the master-slave switch at this time, and it is temporarily unavailable. Wherein, when the second earphone is switched to the main earphone, the second earphone sends a switched voice signal, and the first earphone is switched to the slave earphone, and the first earphone also issues a switched voice signal. The voice signal may be a "switching" or the like. The first earphone can also emit other signals, such as controlling the LED light on the Bluetooth headset to blink at a specified frequency or the LED light to emit light of a specified color.
综上所述,本发明的蓝牙耳机主从切换装置,在主从耳机切换前,检测是没有在收听音乐才切换。或者是趁着用户切换音频文件或将音频文件暂停的时候切换主从耳机,或者是趁着用户听完一个音频文件后再切换,切换成功后播放下一个音频文件。使耳机的主从切换不会打扰到用户收听音频文件,给用户很好的体验效果。In summary, the Bluetooth headset master-slave switching device of the present invention detects that the device is not listening to music before switching between the master and slave headphones. Or switch the master-slave headset when the user switches the audio file or pauses the audio file, or switch after the user listens to an audio file, and then plays the next audio file after the switch is successful. Making the master-slave switch of the headset does not disturb the user to listen to the audio file, giving the user a good experience.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of the present invention.

Claims (11)

  1. 一种蓝牙耳机主从切换方法,其特征在于,包括步骤:A Bluetooth headset master-slave switching method, characterized in that the method comprises the steps of:
    S1、获取作为主耳机的第一耳机的第一剩余电量值;S1. Acquire a first remaining power value of the first earphone as the primary earphone;
    S2、判断所述第一剩余电量值是否低于第一阈值;S2. Determine whether the first remaining power value is lower than a first threshold.
    S3、若第一剩余电量值低于第一阈值,判断音频播放器是否在播放音频文件;若否,则执行步骤S4;若是,则执行步骤S5; S3, if the first remaining power value is lower than the first threshold, determine whether the audio player is playing an audio file; if not, proceed to step S4; if yes, proceed to step S5;
    S4、将作为从耳机的第二耳机切换为主耳机;S4, which will be switched as the second earphone from the earphone to the main earphone;
    S5、判断音频播放器是否接收到切换或暂停的指令;若是,则执行步骤S4。S5. Determine whether the audio player receives an instruction to switch or pause; if yes, execute step S4.
  2. 如权利要求1所述的蓝牙耳机主从切换方法,其特征在于,所述切换指令包括:用户发出的切换指令以及系统生成的切换指令。The master/slave switching method for a Bluetooth headset according to claim 1, wherein the switching instruction comprises: a switching instruction issued by a user and a switching instruction generated by the system.
  3. 如权利要求1所述的蓝牙耳机主从切换方法,其特征在于,所述判断音频播放器是否接收到切换或暂停的指令的步骤之后包括:The master/slave switching method for a Bluetooth headset according to claim 1, wherein the step of determining whether the audio player receives an instruction to switch or pause comprises:
    S6、若音频播放器没有接收到切换或暂停的指令,则判断所述第一剩余电量值是否低于第二阈值,其中,第二阈值小于所述第一阈值;若是,则执行步骤S4。S6. If the audio player does not receive the instruction to switch or pause, determine whether the first remaining power value is lower than the second threshold, where the second threshold is smaller than the first threshold; if yes, step S4 is performed.
  4. 如权利要求3所述的蓝牙耳机主从切换方法,其特征在于,所述第一阈值的大小是总电量的40%,第二阈值的大小是总电量的20%。The master/slave switching method for a Bluetooth headset according to claim 3, wherein the size of the first threshold is 40% of the total power, and the size of the second threshold is 20% of the total power.
  5. 如权利要求1所述的蓝牙耳机主从切换方法,其特征在于,所述将作为从耳机的第二耳机切换为主耳机的步骤包括:The method for switching a master/slave headset of a Bluetooth headset according to claim 1, wherein the step of switching the second headset as the master headset from the headset comprises:
    S41、判断第二耳机的第二剩余电量值是否高于第一剩余电量值;S41. Determine whether the second remaining power value of the second earphone is higher than the first remaining power value.
    S42、若是,生成切换指令;S42. If yes, generate a switching instruction;
    S43、将作为从耳机的第二耳机切换为主耳机。S43. Switching to the main earphone as the second earphone from the earphone.
  6. 如权利要求1所述的蓝牙耳机主从切换方法,其特征在于,所述将作为从耳机的第二耳机切换为主耳机的步骤包括:The method for switching a master/slave headset of a Bluetooth headset according to claim 1, wherein the step of switching the second headset as the master headset from the headset comprises:
    S44、切换时发出主从切换的语音信号。S44. A voice signal that is switched between master and slave when switching.
  7. 一种蓝牙耳机主从切换装置,其特征在于,包括:A Bluetooth headset master-slave switching device, comprising:
    获取模块,用于获取作为主耳机的第一耳机的第一剩余电量值;An acquiring module, configured to acquire a first remaining power value of the first earphone as the primary earphone;
    第一判断模块,用于判断所述第一剩余电量值是否低于第一阈值;a first determining module, configured to determine whether the first remaining power value is lower than a first threshold;
    第二判断模块,用于若第一剩余电量值低于第一阈值,判断音频播放器是否在播放音频文件;若否,则调用切换模块;若是,则调用第三判断模块;a second determining module, configured to determine whether the audio player is playing an audio file if the first remaining power value is lower than the first threshold; if not, calling the switching module; if yes, calling the third determining module;
    切换模块,用于将作为耳机的第二耳机切换为主耳机;a switching module, configured to switch a second earphone as a headset to a primary earphone;
    第三判断模块,用于判断音频播放器是否接收到切换或暂停的指令;若是,则调用切换模块。The third determining module is configured to determine whether the audio player receives an instruction to switch or pause; if yes, invoke the switching module.
  8. 如权利要求7所述的蓝牙耳机主从切换装置,其特征在于,所述切换指令包括:用户发出的切换指令以及系统生成的切换指令。The master/slave switching device for a Bluetooth headset according to claim 7, wherein the switching instruction comprises: a switching instruction issued by a user and a switching instruction generated by the system.
  9. 如权利要求7所述的蓝牙耳机主从切换装置,其特征在于,还包括:The master/slave switch device for a Bluetooth headset according to claim 7, further comprising:
    第四判断模块,用于若音频播放器没有接收到切换或暂停的指令,则判断所述第一剩余电量值是否低于第二阈值,其中,第二阈值小于所述第一阈值;若是,则调用切换模块。a fourth determining module, configured to determine whether the first remaining power value is lower than a second threshold if the audio player does not receive an instruction to switch or pause; wherein, the second threshold is less than the first threshold; if yes, Then call the switch module.
  10. 如权利要求7所述的蓝牙耳机主从切换装置,其特征在于,所述切换模块包括:The master/slave switching device for a Bluetooth headset according to claim 7, wherein the switching module comprises:
    判断单元,用于判断第二耳机的第二剩余电量值是否高于第一剩余电量值;a determining unit, configured to determine whether the second remaining power value of the second earphone is higher than the first remaining power value;
    指令单元,用于若第二剩余电量值高于第一剩余电量值,生成切换指令;An instruction unit, configured to generate a switching instruction if the second remaining power value is higher than the first remaining power value;
    切换单元,用于将作为从耳机的第二耳机切换为主耳机。The switching unit is configured to switch the second earphone as the slave earphone to the main earphone.
  11. 如权利要求7所述的蓝牙耳机主从切换装置,其特征在于,所述切换模块包括:The master/slave switching device for a Bluetooth headset according to claim 7, wherein the switching module comprises:
    信号单元,用于切换时发出主从切换的语音信号。A signal unit for signaling a master-slave switching when switching.
PCT/CN2018/077611 2018-01-10 2018-02-28 Bluetooth headset master/salve switching method and apparatus WO2019136810A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810024219.3A CN108271090A (en) 2018-01-10 2018-01-10 Bluetooth headset master-slave switching method and device
CN201810024219.3 2018-01-10

Publications (1)

Publication Number Publication Date
WO2019136810A1 true WO2019136810A1 (en) 2019-07-18

Family

ID=62773413

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/077611 WO2019136810A1 (en) 2018-01-10 2018-02-28 Bluetooth headset master/salve switching method and apparatus

Country Status (2)

Country Link
CN (1) CN108271090A (en)
WO (1) WO2019136810A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432314A (en) * 2020-03-19 2020-07-17 Oppo广东移动通信有限公司 Audio data playing method and device and related equipment

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109041141B (en) * 2018-07-26 2021-06-15 Oppo广东移动通信有限公司 Transmission link switching control method and related product
CN109121172B (en) * 2018-07-27 2021-01-08 Oppo广东移动通信有限公司 Transmission link switching control method and related product
CN109151934B (en) * 2018-07-27 2020-09-01 Oppo广东移动通信有限公司 Transmission link switching control method and related product
CN109150221B (en) 2018-08-01 2020-05-26 Oppo广东移动通信有限公司 Master-slave switching method for wearable equipment and related product
CN109121173A (en) * 2018-08-01 2019-01-01 Oppo广东移动通信有限公司 wearable device switching method and related product
CN109121034B (en) 2018-08-01 2020-06-12 Oppo广东移动通信有限公司 Master-slave switching method based on volume and related product
CN109151644B (en) * 2018-09-21 2020-04-14 万魔声学科技有限公司 Method and device for distributing master-slave state of earphone
CN112806023B (en) * 2018-10-27 2023-03-17 深圳市欢太科技有限公司 Control method of wireless earphone and related product
WO2020118641A1 (en) * 2018-12-13 2020-06-18 华为技术有限公司 Microphone (mic) switching method and device
CN111436041B (en) * 2019-10-31 2022-11-18 珠海市杰理科技股份有限公司 Method and device for switching master and slave Bluetooth earphones, bluetooth earphones and system
CN110913375B (en) * 2019-11-27 2023-07-04 南京中感微电子有限公司 Wireless communication system and equipment
CN111629299B (en) * 2020-06-05 2022-06-10 歌尔科技有限公司 TWS earphone, and battery replacement method, device and medium thereof
CN111988770A (en) * 2020-07-23 2020-11-24 炬芯科技股份有限公司 Control method and system of wireless equipment
CN111988695B (en) * 2020-08-24 2022-11-22 歌尔科技有限公司 Earphone synchronization method, device, equipment and storage medium of wireless earphone
CN112261535A (en) * 2020-10-16 2021-01-22 深圳传音控股股份有限公司 Major-minor switching method and device for wireless earphone and readable storage medium
CN113115201B (en) * 2021-03-06 2022-07-15 深圳市尊特数码有限公司 Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium
CN113553025B (en) * 2021-09-18 2021-12-10 深圳市外星人创新电子有限公司 Control method and system of Bluetooth headset based on game mode
CN115175065B (en) * 2022-09-06 2023-01-17 荣耀终端有限公司 Broadcasting method, TWS headset and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102623041A (en) * 2012-04-05 2012-08-01 福兴达科技实业(深圳)有限公司 Music player and method for automatically adjusting audio output of music player
CN106535057A (en) * 2016-12-07 2017-03-22 歌尔科技有限公司 Operation switching method and system for master device and slave device
CN106878921A (en) * 2017-01-04 2017-06-20 佳禾智能科技股份有限公司 Earphone, earphone and voice signal send the method and device connected between equipment
CN107071618A (en) * 2017-04-26 2017-08-18 歌尔科技有限公司 A kind of method and apparatus for connecting ears bluetooth earphone

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2476263B1 (en) * 2009-09-10 2014-04-23 Koss Corporation Synchronizing wireless earphones
TWI669923B (en) * 2016-05-05 2019-08-21 美律實業股份有限公司 Method of choosing master wireless earphone in wireless earphone set, electronic apparatus and wireless earphone
CN206350153U (en) * 2016-12-07 2017-07-21 歌尔科技有限公司 A kind of operation switching system of main equipment and slave unit
CN106937197B (en) * 2017-01-25 2019-06-25 北京国承万通信息科技有限公司 Double-ear wireless earphone and communication control method thereof
CN107145366B (en) * 2017-04-10 2020-11-27 北京猎户星空科技有限公司 Notification method and device and intelligent sound box

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102623041A (en) * 2012-04-05 2012-08-01 福兴达科技实业(深圳)有限公司 Music player and method for automatically adjusting audio output of music player
CN106535057A (en) * 2016-12-07 2017-03-22 歌尔科技有限公司 Operation switching method and system for master device and slave device
CN106878921A (en) * 2017-01-04 2017-06-20 佳禾智能科技股份有限公司 Earphone, earphone and voice signal send the method and device connected between equipment
CN107071618A (en) * 2017-04-26 2017-08-18 歌尔科技有限公司 A kind of method and apparatus for connecting ears bluetooth earphone

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432314A (en) * 2020-03-19 2020-07-17 Oppo广东移动通信有限公司 Audio data playing method and device and related equipment

Also Published As

Publication number Publication date
CN108271090A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
WO2019136810A1 (en) Bluetooth headset master/salve switching method and apparatus
WO2019232912A1 (en) Wireless headset role switching method, wireless headset and tws headset
CN111225346B (en) Connection switching method of wireless earphone, wireless earphone and storage medium
WO2021082875A1 (en) Method and apparatus for switching master and slave bluetooth headsets, bluetooth headset, and system
WO2010009636A1 (en) Bluetooth earphone and method for automatically opening and closing terminal application
CN109743654A (en) A kind of bluetooth headset major-minor ear switching method, device, equipment and medium
WO2020019820A1 (en) Microphone hole blockage detection method and related product
JP2004235838A (en) Electronic apparatus, its connection controlling method and method for regulating voice
CN112055349B (en) Wireless communication method and Bluetooth device
WO2017148270A1 (en) Volume control method and device, and terminal
CN109788387A (en) Control method, bluetooth headset and the computer readable storage medium of bluetooth headset
US20160330541A1 (en) Audio duplication using dual-headsets to enhance auditory intelligibility
WO2022262223A1 (en) Hearing aid earphone, control method, apparatus and system therefor, and readable medium
CN111988770A (en) Control method and system of wireless equipment
JP2017520165A (en) Method, apparatus and system for powering an active noise reduction headset
CN103984518A (en) Intelligent mobile terminal
CN103811033A (en) Method and device for controlling voice playing modes
CN110933555A (en) TWS noise reduction earphone and noise reduction method and device thereof
CN112367581B (en) Earphone device, conversation system, equipment and device
CN111770403A (en) Wireless earphone control method, wireless earphone and control system thereof
TW201625020A (en) Headset and controlling handheld device system, method
WO2020042491A9 (en) Headphone far-field interaction method, headphone far-field interaction accessory, and wireless headphones
CN114222216B (en) Voice software working state indicating method, earphone suite and earphone component
JP2004120652A (en) Electronic apparatus and output destination switchover method of content data
CN105828132B (en) The control method and audio-video frequency playing system of broadcasting group in audio-video frequency playing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18899722

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18899722

Country of ref document: EP

Kind code of ref document: A1