[go: up one dir, main page]

CN113115201B - Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium - Google Patents

Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium Download PDF

Info

Publication number
CN113115201B
CN113115201B CN202110247897.8A CN202110247897A CN113115201B CN 113115201 B CN113115201 B CN 113115201B CN 202110247897 A CN202110247897 A CN 202110247897A CN 113115201 B CN113115201 B CN 113115201B
Authority
CN
China
Prior art keywords
earphone
equipment
distance
slave
position information
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
CN202110247897.8A
Other languages
Chinese (zh)
Other versions
CN113115201A (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.)
Shenzhen Jonter Digital Co ltd
Original Assignee
Shenzhen Jonter Digital Co 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 Shenzhen Jonter Digital Co ltd filed Critical Shenzhen Jonter Digital Co ltd
Priority to CN202110247897.8A priority Critical patent/CN113115201B/en
Publication of CN113115201A publication Critical patent/CN113115201A/en
Application granted granted Critical
Publication of CN113115201B publication Critical patent/CN113115201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • 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/20Manipulation of established connections
    • H04W76/23Manipulation of direct-mode connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/02Details of telephonic subscriber devices including a Bluetooth interface

Landscapes

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

Abstract

The application relates to a control method, a system, an intelligent terminal and a storage medium for a plurality of Bluetooth earphones, which belong to the field of Bluetooth earphones, wherein the method comprises the steps of periodically acquiring main equipment position information of the main equipment earphones and terminal position information of the terminal equipment; calculating and generating a main equipment distance according to the main equipment position information and the terminal position information; judging whether the distance of the main equipment is greater than or equal to a preset communication distance; if the master equipment distance is greater than or equal to a preset communication distance, acquiring the slave equipment distance of each slave equipment earphone; defining and generating a standby earphone from the earphone of the slave equipment according to the distance of the slave equipment; and switching the master earphone and the slave earphone. This application has and reduces many bluetooth headset broadcast in the use and is influenced the possibility, the effect of the smoothness nature in the guarantee user use.

Description

Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium
Technical Field
The present application relates to the field of bluetooth headsets, and in particular, to a control method, system, intelligent terminal and storage medium for multiple bluetooth headsets.
Background
The bluetooth headset applies the bluetooth technology to the hands-free headset, so that the user can process many other things while talking or listening to music without being restricted by the headset wire. The common bluetooth headset comprises a left bluetooth headset and a right bluetooth headset, wherein one bluetooth headset is used as a master device, and the other bluetooth headset is used as a slave device. The Bluetooth earphone which is the master device is connected with terminals such as a mobile phone and the like to receive audio data, the Bluetooth earphone which is the slave device is connected with the Bluetooth earphone which is the master device to receive the audio data sent by the Bluetooth earphone which is the master device, and finally the audio data is transmitted to a user through a loudspeaker.
The invention with publication number CN105208511A provides a music sharing method based on an intelligent Bluetooth headset, which comprises the steps of establishing Bluetooth pairing connection between the intelligent Bluetooth headset and an audio playing device; establishing Bluetooth pairing connection between the intelligent Bluetooth headset and other Bluetooth headsets; the intelligent Bluetooth headset receives audio data sent by audio playing equipment; the intelligent Bluetooth headset decodes the audio data and then sends the audio data to other Bluetooth headsets. Therefore, the connection of a plurality of Bluetooth headsets is realized, and a plurality of Bluetooth headset users can enjoy music at the same time.
The related art described above has the following drawbacks: all earphones serving as slave equipment need to receive audio data only through the earphone serving as master equipment, and if the earphone serving as the master equipment is far away from the terminal equipment, communication between the earphone of the master equipment and the terminal is not smooth, audio playing in all the earphones is affected, and fluency of a user in the using process is affected.
Disclosure of Invention
In order to reduce the possibility that the playing of the multi-Bluetooth headset is influenced in the using process and guarantee the fluency of a user in the using process, the application provides a control method, a system, an intelligent terminal and a storage medium for the multi-Bluetooth headset.
In a first aspect, the present application provides a control method for a multi-bluetooth headset, which adopts the following technical solutions:
a control method for a multi-bluetooth headset, comprising:
periodically acquiring main equipment position information of a main equipment earphone and terminal position information of terminal equipment;
calculating and generating a main equipment distance according to the main equipment position information and the terminal position information;
judging whether the distance of the main equipment is greater than or equal to a preset communication distance, wherein the preset communication distance is smaller than the limit communication distance between the earphone and the terminal;
if the master equipment distance is greater than or equal to a preset communication distance, acquiring the slave equipment distance of each slave equipment earphone;
defining and generating a standby earphone from the earphone of the slave equipment according to the slave equipment distance;
and carrying out master-slave switching on the master equipment earphone and the standby earphone.
By adopting the technical scheme, when the master equipment earphone is far away from the terminal equipment, the optimal standby earphone is selected and generated automatically according to the distance length of each slave equipment earphone from the terminal equipment, and master-slave switching is carried out between the current master equipment earphone and the standby earphone. After the master-slave switching is completed, all slave equipment earphones acquire audio through the new master equipment earphone, and interruption caused by the previous distance of the master equipment earphone is avoided, so that the fluency of the user in the using process is guaranteed.
Optionally, the defining and generating a spare headset from the slave device headset according to the slave device distance specifically includes:
sequentially judging whether the distance of the slave equipment is smaller than a preset communication distance or not;
if the slave equipment distance is smaller than the preset communication distance, defining the slave equipment earphone corresponding to the slave equipment distance as a primary standby earphone;
acquiring preliminary standby position information of a preliminary standby earphone;
generating an equipment connection range according to the preliminary standby position information and a preset communication radius, wherein the equipment connection range corresponds to the preliminary standby position information one to one;
calculating the number of the slave equipment position information in each equipment connection range to generate the number of the slave equipment;
and defining the preliminary standby earphone corresponding to the maximum number of the slave devices as the standby earphone.
By adopting the technical scheme, the slave equipment earphone with the largest number of nearby earphones is selected as the primary master equipment earphone, so that after master-slave switching is carried out, the slave earphones as many as possible are guaranteed to have better audio transmission quality, and the use experience of a user is guaranteed.
Optionally, the defining the preliminary standby earphones corresponding to the maximum number of the slave devices as the standby earphones specifically includes:
judging whether a plurality of equipment connection ranges corresponding to the maximum number of the slave equipment exist or not;
if a plurality of equipment connection ranges corresponding to the maximum number of the slave equipment exist, acquiring the standby remaining electric quantity of the primary standby earphone corresponding to the equipment connection ranges;
and defining and generating a standby earphone from the preliminary standby earphone according to the standby residual capacity.
By adopting the technical scheme, if the number of the earphones near the plurality of slave equipment earphones is the same, the optimal standby earphone is selected according to the electric quantity, so that the preferred standby earphone can be used for as long as possible, and the master-slave switching is avoided frequently due to the fact that the electric quantity is too low.
Optionally, after the master device distance is greater than or equal to a preset communication distance, the method further includes:
acquiring the distance of the main equipment in real time;
judging whether the distance between the main equipment is greater than or equal to a preset safety distance or not;
and if the distance between the main equipment and the user equipment is greater than or equal to the preset safety distance, generating alarm information, and feeding the alarm information back to the user.
By adopting the technical scheme, when the main equipment is too far away from the terminal equipment, the situation that the main equipment is lost is shown, so that the alarm information is generated and fed back to the user, and the user can find the alarm information in time and find the alarm information.
Optionally, after the distance between the master device and the second device is greater than or equal to a preset communication distance, the method further includes:
adding one to the interruption times of the master device earphone preset to zero;
before periodically acquiring the main device position information of the main device earphone and the terminal position information of the terminal device, the method further comprises the following steps:
acquiring the remaining earphone power and earphone position information of each earphone;
generating an earphone priority list according to the earphone residual electric quantity, the earphone position information and the interruption times;
and feeding back the earphone equipment name of the earphone to the user according to the earphone priority list so that the user can select a main equipment earphone from the earphones.
By adopting the technical scheme, the times of switching the earphone to the earphone of the slave equipment due to the distance problem after the earphone is selected as the earphone of the master equipment is recorded, and the reference is provided for the user when the earphone is connected according to the times and the electric quantity and the position information of the earphone, so that the connection stability of the user is ensured as much as possible, and the times of master-slave switching are reduced.
Optionally, the generating a headset priority list according to the headset remaining power, the headset position information, and the interruption times specifically includes:
acquiring terminal position information of a terminal;
calculating and generating an earphone distance between the earphone and the terminal according to the earphone position information and the terminal position information;
dividing the preset communication distance by the earphone distance to generate a distance multiplier;
dividing the preset full-level electric quantity by the remaining electric quantity of the earphone to generate an electric quantity multiplier;
multiplying the distance multiplier, the electric quantity multiplier and the interruption times by a corresponding preset base number to generate a multiplication result, and generating a priority score according to the multiplication result;
and generating an earphone priority list according to the sequence of the priority scores from big to small.
By adopting the technical scheme, different cardinalities are set for the earphone distance, the residual electric quantity and the interruption times, the cardinalities are finally integrated into priority scoring, and according to the size of the corresponding cardinalities, the earphone distance, the residual electric quantity and the interruption times can play different importance, so that the calculation generation priority is more in line with the actual situation.
Optionally, after the names of the headset devices of the headsets are fed back to the user according to the headset priority list, the method further includes:
generating a countdown clock with preset duration;
when the countdown clock is reset to zero, defining the earphone with the maximum connection priority as a master equipment earphone;
and matching and connecting the main equipment earphone with the terminal.
By adopting the technical scheme, when the user does not select for a long time, the earphone with the highest priority is selected for automatic matching, so that the complexity of manual operation of the user is avoided, and the user experience is further improved.
In a second aspect, the present application provides a control system for a multi-bluetooth headset, which adopts the following technical solutions:
a control system for a multi-bluetooth headset, comprising:
the distance judgment module is used for periodically acquiring the main equipment position information of the main equipment earphone and the terminal position information of the terminal equipment; calculating and generating a main equipment distance according to the main equipment position information and the terminal position information; judging whether the distance of the main equipment is greater than or equal to a preset communication distance, wherein the preset communication distance is smaller than the limit communication distance between the earphone and the terminal;
the standby generating module is used for acquiring the slave equipment distance of each slave equipment earphone if the master equipment distance is greater than or equal to a preset communication distance; defining and generating a standby earphone from the earphone of the slave equipment according to the slave equipment distance;
and the master-slave switching module is used for carrying out master-slave switching on the master equipment earphone and the standby earphone.
By adopting the technical scheme, when the master equipment earphone is too far away from the terminal equipment and smooth transmission of audio data cannot be guaranteed, the master-slave earphone is preferentially used as the standby earphone from the existing slave earphones, and master-slave switching is performed between the master equipment earphone and the standby earphone, so that a user can always receive audio with higher quality, and the smoothness of use of the user is guaranteed.
In a third aspect, the present application provides an intelligent terminal, which adopts the following technical solution:
an intelligent terminal comprising a memory and a processor, said memory having stored thereon a computer program that can be loaded by the processor and that executes the method according to the first aspect.
By adopting the technical scheme, the master-slave switching is timely carried out on the master equipment earphone far away from the terminal, the audio interruption is avoided, the smoothness of the audio played by the user is guaranteed, and the user experience is ensured.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium comprising a computer program stored thereon which can be loaded by a processor and which performs the method according to the first aspect.
By adopting the technical scheme, the master-slave switching can be timely carried out when the distance between the earphones of the master device is far away, the condition that the audio is interrupted due to the distance problem in the playing process is avoided, and the use smoothness of a user is guaranteed.
In summary, the present application includes at least one of the following beneficial technical effects:
1. when the main equipment earphone is far away from the terminal equipment, the master-slave switching is automatically and timely carried out, the audio is prevented from being interrupted due to the fact that the main equipment earphone is far away, and the smoothness of the user in the using process is guaranteed;
2. when the earphone of the main equipment is too far away from the terminal, alarm information is generated to remind a user, so that the user can find the alarm information in time;
3. and generating the connection priority of each earphone according to the earphone distance, the residual electric quantity and the interruption times so as to provide reference for a user when the user connects the terminal and the earphone, ensuring the connection stability of the user as much as possible and reducing the times of master-slave switching.
Drawings
Fig. 1 is a flowchart illustrating a control method for a multi-bluetooth headset according to an embodiment of the present application;
fig. 2 is a flowchart illustrating the substeps of generating a headset priority list in S200 according to an embodiment of the present application;
fig. 3 is a schematic flowchart of the process of S1100 defining the generation of the standby headset according to the embodiment of the present application;
FIG. 4 is a flow chart illustrating a method for reducing loss of a primary device headset according to an embodiment of the present application;
fig. 5 is a block diagram of a control system for a multi-bluetooth headset according to an embodiment of the present application.
Description of the reference numerals: 1. a list generation module; 2. a master device generation module; 3. a distance judgment module; 4. a standby generation module; 5. a master-slave switching module; 6. and an alarm information module.
Detailed Description
The present application is described in further detail below with reference to figures 1-5.
The embodiment of the application discloses a control method for multiple Bluetooth earphones, which is applied to the condition of N Bluetooth earphones, wherein N is more than or equal to 2, and in order to carry out audio connection with terminal equipment such as a mobile phone, 1 master earphone and N-1 slave earphones exist in the N Bluetooth earphones. Referring to fig. 1, a control method for a multi bluetooth headset includes:
s100: and acquiring the remaining earphone power and the earphone position information of each earphone.
The unit of the remaining electric quantity of the earphone is mAh and is used for representing the remaining electric quantity in the earphone battery; the earphone position information is expressed in the form of three-dimensional space coordinates according to the specific position of the earphone acquired by a positioning module installed in the earphone. Specifically, when all earphones are in a state to be matched after being powered on, the earphone residual capacity and the earphone position information of each earphone are acquired.
S200: and generating an earphone priority list according to the remaining electric quantity of the earphone, the position information of the earphone and the preset interruption times.
The interruption times are used for representing the times of switching the earphone to the slave equipment when the earphone is used as the master equipment earphone, and the interruption times of each earphone are preset to be 0. The user can press a button on the headset to clear the corresponding interruption times. Specifically, referring to fig. 2, S200 includes the following sub-steps:
s201: and acquiring terminal position information of the terminal.
The terminal is a device which can play audio and is internally provided with a positioning module, such as a mobile phone and an audio player, and acquires terminal position information of the terminal according to the positioning module arranged in the terminal, wherein the terminal position information is expressed in a three-dimensional space coordinate mode.
S202: and calculating and generating the earphone distance between the earphone and the terminal according to the earphone position information and the terminal position information.
In particular toAnd bringing the earphone position information and the terminal position information into a three-dimensional space formula of Euclidean distance:
Figure DEST_PATH_IMAGE001
wherein the three-dimensional space coordinate form of the terminal position information is
Figure 539895DEST_PATH_IMAGE002
The three-dimensional space coordinate form of the earphone position information is
Figure DEST_PATH_IMAGE003
Generated Euclidean distance
Figure 245683DEST_PATH_IMAGE004
I.e. the earphone distance between the earphone and the terminal.
S203: and generating a priority score according to the distance of the earphones, the remaining capacity of the earphones and the interruption times.
Specifically, a preset communication distance D is first divided by an earphone distance D to generate a distance multiplier
Figure DEST_PATH_IMAGE005
,
Figure 908745DEST_PATH_IMAGE006
Then dividing the remaining electric quantity Q of the earphone by the preset full-level electric quantity Q of the earphone to generate an electric quantity multiplier
Figure DEST_PATH_IMAGE007
,
Figure 699984DEST_PATH_IMAGE008
,
Figure DEST_PATH_IMAGE009
(ii) a Then multiplying by distance
Figure 309957DEST_PATH_IMAGE005
Multiplying by its own corresponding preset cardinality
Figure 339093DEST_PATH_IMAGE010
Generating a first multiplication result
Figure DEST_PATH_IMAGE011
Multiplier of power consumption
Figure 907477DEST_PATH_IMAGE007
Multiplying by its own corresponding preset cardinality
Figure 389274DEST_PATH_IMAGE012
Generating a second multiplication result
Figure DEST_PATH_IMAGE013
Multiplying the interruption times i by the corresponding preset base number
Figure 599676DEST_PATH_IMAGE014
Generating a multiplication result
Figure DEST_PATH_IMAGE015
(ii) a Adding the obtained first multiplication result and the second multiplication result, and subtracting the third multiplication result to generate a priority score y,
Figure 17406DEST_PATH_IMAGE016
. It is noted that, among others,
Figure DEST_PATH_IMAGE017
Figure 225534DEST_PATH_IMAGE010
is a distance multiplier
Figure 194627DEST_PATH_IMAGE005
The corresponding base number is set to be,
Figure 146402DEST_PATH_IMAGE010
the maximum represents the maximum contribution of the headphone distance d to the priority score y, and, similarly,
Figure 150130DEST_PATH_IMAGE014
the minimum representing interruption times i have the smallest influence on the priority score y, so that the calculated and generated priority score y is more practical.
E.g. if predetermined
Figure 591476DEST_PATH_IMAGE018
Figure DEST_PATH_IMAGE019
Figure 579023DEST_PATH_IMAGE020
The communication distance D =10m, and the full-level electricity quantity Q =120 mAh. At the moment, a certain earphone
Figure DEST_PATH_IMAGE021
D =5m, the remaining battery q =60mAh, and the interruption number i =2, then the earphone is set to be a new earphone
Figure 68911DEST_PATH_IMAGE021
Priority scoring of
Figure 927145DEST_PATH_IMAGE022
(ii) a Another earphone
Figure DEST_PATH_IMAGE023
D =4m, the remaining battery q =60mAh, and the interruption number i =0, then the earphone is set to a distance of d =4m
Figure 477075DEST_PATH_IMAGE023
Priority rating of
Figure 686340DEST_PATH_IMAGE024
S204: and generating a headset priority list according to the sequence of the priority scores from large to small.
The earphone priority list is composed of the names of the earphone devices of the earphones. Specifically, the names of the earphone devices corresponding to the earphones are arranged in the descending order of the priority scores y to generate an earphone priority list. The higher the priority score y, the more the headphones are ranked in the headphone priority list, the higher the priority score y among all the headphones is ranked in the first of the headphone priority list, and the lowest priority score y among all the headphones is ranked in the last of the headphone priority list.
Continuing with the example in S203, headphones
Figure 245497DEST_PATH_IMAGE021
Priority score y =5, headset
Figure 958238DEST_PATH_IMAGE023
Y =8.5, 8.5 > 5, so in the headset priority list, the headset is in the headset priority list
Figure 882332DEST_PATH_IMAGE023
Arranged on the earphone
Figure 327962DEST_PATH_IMAGE021
Before.
S300: and feeding back the earphone priority list to the user to generate a countdown clock with preset duration.
Specifically, an earphone priority list composed of names of earphone devices is fed back to a display screen of the terminal for a user to check and select, and a countdown clock with preset duration is generated, wherein the generated countdown clock can be automatically reduced along with the lapse of objective time.
In addition, in the process of self-decreasing the countdown clock, a user can select a certain earphone device name by clicking a screen, obtain the earphone device name selected by the user, define an earphone corresponding to the earphone device name as a main device earphone, stop the countdown clock, and then directly skip to the step S500.
S400: and when the countdown clock is zero, generating the master equipment earphone according to the earphone priority list definition.
Specifically, if the user has not selected the master device earphone all the time, when the countdown clock is reset to zero, the name of the earphone device ranked first in the earphone priority list is obtained, and the earphone corresponding to the earphone device name is defined as the master device earphone.
S500: and connecting the earphone of the main equipment with the terminal equipment.
Specifically, a first bluetooth link is established between the master device earphone and the terminal device, so that the master device earphone and the terminal device are connected in a matching manner, the rest earphones serve as slave device earphones, a second bluetooth link is established between the rest earphones and the master device earphone, and the slave device earphone acquires bluetooth upper-layer state information from the master device earphone through the second bluetooth link.
S600: and periodically acquiring the main equipment position information of the main equipment earphone and the terminal position information of the terminal equipment.
Specifically, after a preset time period, the main device position information of the main device earphone is acquired through a positioning module built in the main device earphone, meanwhile, the terminal position information of the terminal device is acquired through a positioning module built in the terminal device, and the main device position information and the terminal position information are three-dimensional space coordinates.
S700: and calculating and generating the main equipment distance according to the main equipment position information and the terminal position information.
Specifically, the same calculation method as that in S202 is adopted, the main device position information and the terminal position information are substituted into a three-dimensional space formula of the euclidean distance, and the main device distance between the main device earphone and the terminal device is calculated and generated.
S800: and judging whether the distance between the main equipment and the main equipment is greater than or equal to a preset communication distance D.
Specifically, if the main device distance is greater than or equal to the preset communication distance D, it represents that the main device earphone needs to be switched, first, the number of interruption times corresponding to the main device earphone is increased by 1, and then, the steps are synchronously skipped to S900 and S11; if the distance of the main equipment is smaller than the preset communication distance D, the earphone of the main equipment works normally, and the system has no response.
S900: slave device location information for a slave device headset is obtained.
Specifically, since N-1 slave device earphones are provided, the slave device position information of each slave device earphone needs to be acquired sequentially through the positioning module built in each slave device earphone, and the slave device position information is a three-dimensional space coordinate.
S1000: and generating the slave device distance according to the slave device position information and the terminal position information.
Specifically, the slave device position information and the terminal position information are substituted into a three-dimensional space formula of euclidean distance in the same calculation manner as S202, and the slave device distance between each slave earphone and the terminal device is calculated and generated.
S1100: and defining and generating a standby earphone from the earphone of the slave equipment according to the distance of the slave equipment.
Specifically, referring to fig. 3, S1100 includes the following sub-steps:
s1101: and judging whether the distance of the slave equipment is less than a preset communication distance D.
Specifically, the calculated distances of the multiple slave devices are sequentially compared with a preset communication distance D, if the distances of the slave devices are smaller than the preset communication distance D, a corresponding slave device earphone is defined as a preliminary spare earphone, and then the process jumps to S1102; if the distance between the slave equipment and the terminal is larger than or equal to the preset communication distance D, the slave equipment earphone is far away from the terminal, the slave equipment earphone is not suitable to be used as a new master equipment earphone, and the system has no response.
S1102: preliminary standby position information of the preliminary standby headset is acquired.
Specifically, according to the name of the earphone device of the preliminary standby earphone, corresponding slave device position information is screened from all slave device position information, and the screened slave device position information is defined as the preliminary standby position information. It should be noted that the preliminary standby position information corresponds to the preliminary standby earphones one to one, and the preliminary standby position information is displayed in the form of a spatial three-dimensional coordinate.
S1103: and generating an equipment connection range according to the preliminary standby position information and a preset communication radius.
Wherein, the preset communication radius is the master device earphone and the slave deviceThe farthest distance between the earphones can keep better transmission efficiency. Specifically, each dimension of the preliminary standby position information coordinate is added or subtracted with a preset communication radius, and an equipment connection range is generated. For example, if the preliminary spare location information is
Figure DEST_PATH_IMAGE025
If the preset communication radius is r, the range of x in the generated device connection range is
Figure 221968DEST_PATH_IMAGE026
And y is in the range
Figure DEST_PATH_IMAGE027
Z is in the range
Figure 54795DEST_PATH_IMAGE028
S1104: and calculating the number of the slave equipment earphones in the equipment connection range to generate the number of the slave equipment.
Specifically, the slave device position information of all slave device earphones is sequentially compared with the device connection range, whether the slave device position information is located in the device connection range is judged, if the current slave device position information is located in the device connection range, the number of slave devices with the current device connection range preset to be 0 is added with 1, and the number of the slave devices corresponds to the device connection range one by one; and if the current slave equipment position information is not in the equipment connection range, continuing to judge the next slave equipment position information. And after all the device connection ranges are judged, jumping to S1105.
S1105: it is determined whether there are a plurality of device connection ranges corresponding to the maximum number of slave devices.
Specifically, first, the number of slave devices having the largest number is obtained from all the numbers of slave devices, and it is determined whether there are a plurality of device connection ranges having the same number of slave devices. If a plurality of device connection ranges corresponding to the maximum number of the slave devices exist, the master device earphone needs to be further selected preferentially, and the process jumps to S1106; if the device connection range corresponding to the maximum number of the slave devices is only one, the preliminary backup earphone corresponding to the device connection range is directly defined as the backup earphone, and then the process jumps to S1200.
S1106: and acquiring the spare remaining power of the preliminary spare earphone corresponding to the equipment connection range.
The unit of the spare remaining capacity is mAh, and the spare remaining capacity is used for representing the remaining capacity of the battery in the primary spare earphone. Specifically, the preliminary spare earphones corresponding to all the device connection ranges meeting the judgment condition in S1105 are acquired, and then the spare remaining capacity of the preliminary spare earphones is acquired.
S1107: and defining and generating a standby earphone from the preliminary standby earphones according to the standby residual capacity.
Specifically, the acquired standby remaining capacities are compared, and a preliminary standby earphone corresponding to the largest standby remaining capacity is selected and defined as a standby earphone.
For example, if the device connection range satisfying the maximum number of slave devices is two, the two device connection ranges correspond to the primary backup earphones respectively
Figure DEST_PATH_IMAGE029
And a preliminary backup earphone
Figure 680948DEST_PATH_IMAGE030
Preliminary spare earphone
Figure 864805DEST_PATH_IMAGE029
The spare residual capacity is 30mAh, and a preliminary spare earphone
Figure 969027DEST_PATH_IMAGE030
The spare remaining capacity is 50mAh,50 is more than 30, so that the primary spare earphone is finally used
Figure 390781DEST_PATH_IMAGE030
Defined as a spare headset.
S1200: and switching the master earphone and the slave earphone of the master equipment.
Specifically, firstly, the master device sends an address switching instruction to the standby earphone, after the standby earphone replies a confirmation instruction, the master device earphone sends the bluetooth upper layer state information to the slave device earphone, after the slave device replies the confirmation, the master device earphone sends a final switching instruction to the standby earphone, and after the standby earphone confirms, the master-slave switching between the master device earphone and the standby earphone is finally completed.
In order to reduce the situation that the master device earphone is too far away from the terminal and lost, referring to fig. 4, after determining that the master device distance is greater than or equal to the preset communication distance D in S800, the method further includes:
s11: and acquiring the distance of the main equipment in real time.
Specifically, the main device position information is acquired through a positioning module arranged in the main device earphone, the main device position information and the terminal position information are brought into a three-dimensional space formula of Euclidean distance, and the main device distance between the main device earphone and the terminal is calculated and generated.
S12: and judging whether the distance between the main equipment is greater than or equal to a preset safety distance.
The safety distance is far greater than the preset communication distance D, and when the distance between the main device and the earphone is greater than or equal to the preset safety distance, the earphone is likely to be lost. Specifically, if the master device distance is greater than or equal to the preset safe distance, the process jumps to S13, and if the master device distance is less than the preset safe distance, the process returns to S11 to obtain the next master device distance.
S13: and generating alarm information and feeding the alarm information back to the user.
Wherein, install voice broadcast module and LED lamp in the earphone, alarm information feeds back to the user through the mode of voice broadcast and LED scintillation, and the user of being convenient for in time discovers the earphone and apart from the condition far away from the terminal.
The implementation principle is as follows: generating an earphone priority list according to the remaining capacity of the earphone, the position information of the earphone and the interruption times, arranging the stably connected earphones at the front position in the earphone priority list, acquiring the main equipment earphone acquired by the user or automatically generated, and connecting the main equipment with the terminal equipment. And periodically calculating to generate the distance between the master equipment earphone and the master equipment of the terminal equipment, when the distance between the master equipment earphone and the terminal equipment is too large, selecting the communication distance to cover the slave equipment earphones of other earphones as much as possible according to the distance between the slave equipment, defining the communication distance as a standby earphone, and finally realizing master-slave switching between the master equipment earphone and the standby earphone.
Based on the method, the embodiment of the application further discloses a control system for the multiple Bluetooth headsets. Referring to fig. 5, the control system for multiple bluetooth headsets includes a list generation module 1, a master device generation module 2, a distance judgment module 3, a standby generation module 4, a master-slave switching module 5, and an alarm information module 6.
The list generating module 1 is used for acquiring the remaining earphone power, the earphone position information and the interruption times of each earphone and generating the earphone distance according to the earphone position information; and substituting the remaining electric quantity of the earphones, the distance of the earphones and the interruption times into a formula to calculate and generate a priority score, and generating an earphone priority list according to the descending order of the priority score.
The master equipment generating module 2 is used for generating a countdown clock and generating a master equipment earphone according to the earphone priority list definition when the countdown clock is finished; and in the countdown process, acquiring the name of the earphone equipment selected by the user, and defining the corresponding earphone as a main equipment earphone.
And the distance judgment module 3 is used for periodically acquiring the main device position information and the terminal position information, calculating and generating a main device distance according to the main device position information and the terminal position information, and judging whether the main device distance is greater than or equal to a preset communication distance.
And the standby generating module 4 is configured to obtain the slave device distance of each slave device earphone when the master device distance is greater than or equal to the preset communication distance, and define and generate a standby earphone in the slave device earphone according to the slave device distance.
And the master-slave switching module 5 is used for carrying out master-slave switching between the master equipment earphone and the standby earphone.
And the alarm information module 6 is used for judging whether the distance between the main equipment is greater than or equal to the safety distance or not, and generating alarm information to feed back to the user when the distance between the main equipment and the safety distance is greater than or equal to the safety distance.
The embodiment of the application also discloses an intelligent terminal, which comprises a memory and a processor, wherein the memory is stored with a computer program which can be loaded by the processor and can execute the control method for the multiple Bluetooth headsets.
The embodiment of the present application also discloses a computer readable storage medium, which stores a computer program that can be loaded by a processor and executes the control method for the multiple bluetooth headset as described above, and the computer readable storage medium includes, for example: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The above examples are only used to illustrate the technical solutions of the present application, and do not limit the scope of the application. It is to be understood that the embodiments described are only some of the embodiments of the present application and not all of them. All other embodiments, which can be derived by a person skilled in the art from these embodiments without making any inventive step, are within the scope of the present application.

Claims (9)

1. A control method for a multi-bluetooth headset, comprising:
periodically acquiring main equipment position information of a main equipment earphone and terminal position information of terminal equipment;
calculating and generating a main equipment distance according to the main equipment position information and the terminal position information;
judging whether the distance between the main equipment is greater than or equal to a preset communication distance, wherein the preset communication distance is smaller than a limit communication distance between the earphone and the terminal;
if the master equipment distance is greater than or equal to a preset communication distance, acquiring the slave equipment distance of each slave equipment earphone;
defining and generating a standby earphone from the earphone of the slave equipment according to the slave equipment distance;
performing master-slave switching on the master equipment earphone and the standby earphone;
the defining and generating a standby headset from the slave device headset according to the slave device distance specifically includes:
sequentially judging whether the distance of the slave equipment is smaller than a preset communication distance or not;
if the slave equipment distance is smaller than the preset communication distance, defining a slave equipment earphone corresponding to the slave equipment distance as a primary standby earphone;
acquiring preliminary standby position information of a preliminary standby earphone;
generating equipment connection ranges according to the preliminary standby position information and a preset communication radius, wherein the equipment connection ranges correspond to the preliminary standby position information one to one;
calculating the number of the slave equipment position information in each equipment connection range to generate the number of the slave equipment;
and defining the preliminary standby earphone corresponding to the maximum number of the slave devices as the standby earphone.
2. The method as claimed in claim 1, wherein the step of defining the preliminary backup headset corresponding to the largest number of slave devices as the backup headset specifically comprises:
judging whether a plurality of equipment connection ranges corresponding to the maximum number of the slave equipment exist or not;
if a plurality of equipment connection ranges corresponding to the maximum number of the slave equipment exist, acquiring the spare remaining capacity of the primary spare earphone corresponding to the equipment connection ranges;
and defining and generating a spare earphone from the preliminary spare earphone according to the spare residual capacity.
3. The method as claimed in claim 1, further comprising, after the master device distance is greater than or equal to a predetermined communication distance:
acquiring the distance of the main equipment in real time;
judging whether the distance between the main equipment is greater than or equal to a preset safety distance or not;
and if the distance between the main equipment and the user is greater than or equal to the preset safety distance, generating alarm information, and feeding the alarm information back to the user.
4. The method as claimed in claim 1, further comprising, after the master device distance is greater than or equal to a predetermined communication distance:
adding one to the interrupt times preset to zero by the master device earphone;
before periodically acquiring the main device position information of the main device earphone and the terminal position information of the terminal device, the method further comprises the following steps:
acquiring the remaining earphone power and earphone position information of each earphone;
generating an earphone priority list according to the earphone residual electric quantity, the earphone position information and the interruption times;
and feeding back the earphone equipment name of the earphone to the user according to the earphone priority list so that the user can select a main equipment earphone from the earphones.
5. The method as claimed in claim 4, wherein the generating a headset priority list according to the remaining power of the headset, the headset location information, and the interruption times specifically comprises:
acquiring terminal position information of a terminal;
calculating and generating an earphone distance between the earphone and the terminal according to the earphone position information and the terminal position information;
dividing the preset communication distance by the earphone distance to generate a distance multiplier;
dividing the preset full-level electric quantity by the remaining electric quantity of the earphone to generate an electric quantity multiplier;
multiplying the distance multiplier, the electric quantity multiplier and the interruption times by a corresponding preset base number to generate a multiplication result, and generating a priority score according to the multiplication result;
and generating an earphone priority list according to the sequence of the priority scores from big to small.
6. The control method for multiple bluetooth headsets as claimed in claim 4, wherein after feeding back the headset device name of the headset to the user according to the headset priority list, further comprising:
generating a countdown clock with preset duration;
when the countdown clock is reset to zero, defining the earphone with the maximum connection priority as a master equipment earphone;
and matching and connecting the main equipment earphone with the terminal.
7. A control system for a multi-Bluetooth headset, comprising,
the distance judgment module (3) is used for periodically acquiring the main equipment position information of the main equipment earphone and the terminal position information of the terminal equipment; calculating and generating a main equipment distance according to the main equipment position information and the terminal position information; judging whether the distance of the main equipment is greater than or equal to a preset communication distance, wherein the preset communication distance is smaller than the limit communication distance between the earphone and the terminal;
the standby generating module (4) is used for acquiring the slave equipment distance of each slave equipment earphone if the master equipment distance is greater than or equal to a preset communication distance; defining and generating a standby earphone from the earphone of the slave equipment according to the slave equipment distance;
a master-slave switching module (5) for performing master-slave switching on the master earphone and the standby earphone;
the defining and generating a standby headset from the slave device headset according to the slave device distance specifically includes:
sequentially judging whether the distance of the slave equipment is smaller than a preset communication distance;
if the slave equipment distance is smaller than the preset communication distance, defining a slave equipment earphone corresponding to the slave equipment distance as a primary standby earphone;
acquiring preliminary standby position information of a preliminary standby earphone;
generating equipment connection ranges according to the preliminary standby position information and a preset communication radius, wherein the equipment connection ranges correspond to the preliminary standby position information one to one;
calculating the number of the slave equipment position information in each equipment connection range to generate the number of the slave equipment;
and defining the preliminary standby earphone corresponding to the maximum number of the slave devices as the standby earphone.
8. An intelligent terminal, comprising a memory and a processor, the memory having stored thereon a computer program which can be loaded by the processor and which performs the method of any of claims 1 to 6.
9. A computer-readable storage medium, in which a computer program is stored which can be loaded by a processor and which executes the method of any one of claims 1 to 6.
CN202110247897.8A 2021-03-06 2021-03-06 Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium Active CN113115201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110247897.8A CN113115201B (en) 2021-03-06 2021-03-06 Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110247897.8A CN113115201B (en) 2021-03-06 2021-03-06 Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113115201A CN113115201A (en) 2021-07-13
CN113115201B true CN113115201B (en) 2022-07-15

Family

ID=76711013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110247897.8A Active CN113115201B (en) 2021-03-06 2021-03-06 Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113115201B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114913882A (en) * 2022-05-25 2022-08-16 维沃移动通信有限公司 Recording method and recording device
CN118890609B (en) * 2024-09-28 2025-01-14 深圳市尊特数码有限公司 Multi-Bluetooth headset interaction control method, terminal equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017182707A1 (en) * 2016-04-20 2017-10-26 Genelec Oy An active monitoring headphone and a method for regularizing the inversion of the same

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010117714A1 (en) * 2009-03-30 2010-10-14 Bose Corporation Personal acoustic device position determination
CN108271090A (en) * 2018-01-10 2018-07-10 深圳市沃特沃德股份有限公司 Bluetooth headset master-slave switching method and device
CN108769432B (en) * 2018-07-27 2020-02-11 Oppo广东移动通信有限公司 Main earphone switching method and mobile terminal
CN109660975A (en) * 2019-01-28 2019-04-19 上海与德通讯技术有限公司 The switching method of principal and subordinate's earphone, main earphone, from earphone and bluetooth headset network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017182707A1 (en) * 2016-04-20 2017-10-26 Genelec Oy An active monitoring headphone and a method for regularizing the inversion of the same

Also Published As

Publication number Publication date
CN113115201A (en) 2021-07-13

Similar Documents

Publication Publication Date Title
US11812485B2 (en) Bluetooth communication method and terminal
CN101695189B (en) Method for conducting data synchronization by earphone, and corresponding earphone and mobile terminal
CN113115201B (en) Control method and system for multiple Bluetooth earphones, intelligent terminal and storage medium
CN104871558B (en) The method and apparatus that image for collaborative audio system is produced
CN108550367A (en) A kind of portable intelligent interactive voice control device, method and system
CN110287473A (en) Electrical form edit methods and device
CN110049428A (en) Method, playback equipment and the system played for realizing multichannel surround sound
CN111372159A (en) Earphone play control method and earphone
CN109151172A (en) Audio output control method and related equipment
CN108154889A (en) A kind of music control method, system, player and a kind of regulator control system
CN105704604A (en) Smart home earphones
CN106130607B (en) A kind of control method and electronic equipment
WO2020082387A1 (en) Method for changing audio channel, and related device
CN110868621B (en) Audio playing method, device, equipment and computer readable medium
CN105847951B (en) Playing control method and device in audio and video playing system
CN113286219A (en) Bluetooth earphone with recording function and recording method thereof
CN205491035U (en) Intelligent home earphone
CN111525645A (en) Intelligent charging method, system and related equipment
CN109600470B (en) Mobile terminal and sound production control method thereof
CN114173255B (en) Parameter adjustment method and related products
CN216215930U (en) Charging device and wireless transmission system
CN116866472A (en) Volume control method and electronic device
CN203632839U (en) Head-wearing earphone
CN113507770A (en) Lamplight control method, system, terminal and storage medium based on audio visualization
CN114125638B (en) Earphone playing control method and control device

Legal Events

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