CN111107526A - Master-slave switching method, device and system for double wireless Bluetooth devices in standard time slot - Google Patents

Master-slave switching method, device and system for double wireless Bluetooth devices in standard time slot Download PDF

Info

Publication number
CN111107526A
CN111107526A CN201910949946.5A CN201910949946A CN111107526A CN 111107526 A CN111107526 A CN 111107526A CN 201910949946 A CN201910949946 A CN 201910949946A CN 111107526 A CN111107526 A CN 111107526A
Authority
CN
China
Prior art keywords
master
slave
wireless
switching
bluetooth
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.)
Granted
Application number
CN201910949946.5A
Other languages
Chinese (zh)
Other versions
CN111107526B (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.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli Technology 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 Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN201910949946.5A priority Critical patent/CN111107526B/en
Publication of CN111107526A publication Critical patent/CN111107526A/en
Application granted granted Critical
Publication of CN111107526B publication Critical patent/CN111107526B/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/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a master-slave switching method, equipment and a system of wireless Bluetooth equipment in a standard time slot, wherein the master-slave switching method of the wireless slave equipment comprises the following steps: acquiring a switching trigger event of master-slave role switching; generating a master-slave switching request according to the switching trigger event, wherein the master-slave switching request comprises target standard time slot information of master-slave switching; sending a master-slave switching request to the wireless master device at the nearest idle time interval of the slave device end through the established master and slave Bluetooth links, wherein the idle time interval is positioned in a standard time slot; and executing the operation of master-slave role switching with the current wireless master equipment when the target standard time slot of master-slave switching arrives. The existing communication link is time-division multiplexed, the condition that extra bandwidth is used for sending information of a master-slave switching request is avoided, and the phenomena of audio playing delay and jamming of master-slave equipment can be reduced. In addition, the master-slave switching request is sent at the latest idle time interval, so that the master-slave switching speed is improved.

Description

Master-slave switching method, device and system for double wireless Bluetooth devices in standard time slot
Technical Field
The invention relates to the technical field of Bluetooth data transmission, in particular to a master-slave switching method, equipment and a system of double wireless Bluetooth equipment of a standard time slot.
Background
In the application of the dual-wireless bluetooth communication, for example, in scenes such as dual-wireless bluetooth headsets, dual-wireless bluetooth sound boxes and the like, three bluetooth devices are required to communicate through at least two bluetooth links, so that a dual-wireless bluetooth device communication system is formed. That is, the dual wireless bluetooth device communication system includes three bluetooth devices, one of which is a bluetooth sound source device (such as a mobile phone, a notebook computer, etc.), and the other two of which are wireless bluetooth devices (such as a dual wireless bluetooth headset, a dual wireless bluetooth speaker, etc.) that are played simultaneously. Among them, a bluetooth playback device connected to a bluetooth sound source device is generally called a bluetooth playback master device, and a bluetooth playback device connected to the bluetooth playback master device and monitoring the bluetooth sound source device is called a bluetooth playback slave device.
Due to the fact that the bluetooth links are different in position, distance and direction, the degree of interference on the wireless bluetooth devices is different, and the behaviors of the dual-wireless bluetooth devices are different, for example, after the devices are powered off and charged, the dual-wireless bluetooth communication network needs to be rebuilt. If the Bluetooth playing master device needs to disconnect the connection with the Bluetooth sound source device and continue playing by the Bluetooth playing slave device due to a certain condition (such as device power failure, earphone being put back to a charging bin, or master device signal difference, etc.), the Bluetooth playing master device needs to stop or pause the Bluetooth sound source device to send audio data, then master-slave switching information is exchanged, after master-slave switching, the Bluetooth playing slave device will replace the original Bluetooth playing master device and serve as a new Bluetooth playing master device to communicate with the Bluetooth sound source device, at this time, because the master-slave switching information is exchanged to consume bandwidth, the interval of receiving the audio data sent by the Bluetooth sound source device by the Bluetooth playing device is larger, the audio playing delay and pause phenomena occur, and the user experience is influenced.
Specifically, as shown in fig. 1, in an application of an existing dual wireless bluetooth device communication system, a bluetooth sound source device 101 is connected to a bluetooth playback device first bluetooth master device 102 through a bluetooth standard protocol to establish a first bluetooth link for communication, the bluetooth playback device first bluetooth master device 102 is connected to a bluetooth playback device second bluetooth slave device 103 through the bluetooth standard protocol to establish a second bluetooth link for communication, the first bluetooth master device 102 sends first bluetooth link communication information to the second bluetooth slave device through the second bluetooth link to establish a bluetooth monitoring link for the second bluetooth slave device to monitor bluetooth sound source device audio data, and at this time, a dual wireless bluetooth audio network 104 is formed among the bluetooth sound source device 101, the first bluetooth master device 102, and the second bluetooth slave device 103. When the master-slave role switching is performed between the bluetooth play master device and the bluetooth play slave device, the bluetooth play master device needs to stop or suspend receiving of audio data, and switches to a second bluetooth link for master-slave switching information exchange, after the master-slave switching, the bluetooth play slave device will replace the original bluetooth play master device and serve as a new bluetooth play master device to communicate with the bluetooth sound source device, as shown in fig. 1, a dual-wireless bluetooth audio network is changed into a network 105 form from a network 104, a first bluetooth device is changed into a slave device from the master device, and a first bluetooth link connected with the bluetooth sound source device is changed into a bluetooth monitoring link; and the second Bluetooth equipment is changed from slave equipment to master equipment, and the Bluetooth monitoring link is changed into the first Bluetooth link, so that the master and slave roles of the Bluetooth playing equipment are switched. At this time, due to the fact that the audio source data are temporarily stopped from being received and the master-slave switching information exchange is carried out, bandwidth consumption is caused, the interval of the Bluetooth playing device for receiving the audio data sent by the Bluetooth audio source device is large, audio playing delay and pause phenomena occur, and user experience is affected.
In the prior art, some optimization is performed on a master-slave switching mode, the Bluetooth playing master device does not need to pause the Bluetooth sound source device to send audio data, communication is directly performed through a communication time sequence between the Bluetooth playing master device and the Bluetooth sound source device, and master-slave role switching is performed after master-slave switching information exchange. The method can reduce the interval of receiving audio data by the Bluetooth playing equipment, thereby reducing audio playing delay and pause phenomenon, but bandwidth consumption still can be caused due to the fact that master-slave switching information exchange is needed, if the communication quality between the Bluetooth playing master equipment and the Bluetooth playing slave equipment is poor, master-slave switching information needs to be retransmitted more, bandwidth consumption is greatly increased under the condition, the interval of receiving audio data by the Bluetooth playing equipment is also larger, audio playing delay and pause phenomenon occur, and user experience is influenced.
In addition, when the power of the current master device is too low or the signal interference is serious, the master-slave switching needs to be performed quickly.
Therefore, it is an urgent technical problem to perform master-slave switching quickly and with reduced bandwidth consumption according to a trigger event.
Disclosure of Invention
Based on the above situation, the main objective of the present invention is to provide a master-slave switching method, device and system for dual wireless bluetooth devices in standard time slots, so as to perform master-slave switching quickly and with reduced bandwidth consumption according to a trigger event.
To achieve the above object, according to a first aspect, an embodiment of the present invention discloses a master-slave switching method for a dual-wireless bluetooth device, which is applicable to a wireless slave device, and includes:
acquiring a switching trigger event of master-slave role switching; generating a master-slave switching request according to the switching trigger event, wherein the master-slave switching request comprises target standard time slot information of master-slave switching; sending a master-slave switching request to the wireless master device at the nearest idle time interval of the slave device end through the established master and slave Bluetooth links, wherein the idle time interval is positioned in a standard time slot; and executing the operation of master-slave role switching with the current wireless master equipment when the target standard time slot of master-slave switching arrives.
According to the master-slave switching method of the double wireless Bluetooth equipment disclosed by the embodiment of the invention, the master-slave switching request is sent to the wireless master equipment at the nearest idle time interval of the slave equipment end through the established master and slave Bluetooth links, the idle time interval is positioned in the standard time slot, the embodiment multiplexes the existing communication link in a time-sharing manner, and the master-slave switching is carried out by utilizing the idle time interval in the standard time slot, so that the condition that the information of the master-slave switching request is sent by extra bandwidth is avoided, and the phenomena of audio playing delay and jamming of the master-slave equipment can be reduced during the master-slave switching. In addition, the master-slave switching request is sent at the latest idle time interval, so that the master-slave switching speed is increased, and the master-slave switching can be rapidly carried out according to the triggering event and the bandwidth consumption is reduced.
Furthermore, because the mapping relation between the sub-time slot position and the target standard time slot and the current standard time slot is preset, the target standard time slot position is borne by the preset sub-time slot position, and the receiver can directly obtain the target standard time slot position according to the mapping relation, thereby reducing the transmitted data capacity and the complex data operation.
Furthermore, the odd-even positions of the sub-time slots are adopted to distinguish whether the wireless slave device monitors the audio data, so that data transmission can be reduced, and the probability of information errors caused by data transmission can be reduced due to the fact that different data information is carried through different positions; in addition, the special information is transmitted by adopting the special position, so that the pertinence of data transmission is improved, the extra operation of data decoding and analysis is reduced, and the efficiency of communication information transmission is improved.
According to a second aspect, an embodiment of the present invention discloses a master-slave switching method for a dual wireless bluetooth device, which is applicable to a wireless master device, and includes: before receiving a master-slave switching request sent by wireless slave equipment, waiting for receiving the master-slave switching request through the established master and slave Bluetooth links at the idle time interval in each standard time slot of the master equipment end; receiving a master-slave switching request sent by wireless slave equipment at the idle time interval of a master equipment end through established master and slave Bluetooth links; and when the target standard time slot of master-slave switching arrives, executing the master-slave role switching operation with the current wireless slave device.
The technical scheme of the invention multiplexes the existing communication link in a time-sharing manner, utilizes the idle time interval in the standard time slot to carry out master-slave switching, and avoids the condition that the extra bandwidth is used for sending the information of the master-slave switching request, thereby reducing the audio playing delay and the blocking phenomenon of master-slave equipment during the master-slave switching. In conclusion, the speed of master-slave switching is improved, and therefore the master-slave switching can be rapidly carried out according to the triggering event and the bandwidth consumption is reduced.
Furthermore, by dividing the idle time interval into sub-time slots, the target standard time slot position of the master-slave switching can be determined according to the position of the sub-time slot for receiving and sending the master-slave switching request, thereby reducing the data capacity for receiving and sending the master-slave switching request.
According to a third aspect, an embodiment of the present invention discloses a master-slave switching method for a dual-wireless bluetooth device, including: before receiving a master-slave switching request sent by a wireless slave device, a wireless master device waits for receiving the master-slave switching request through the established master and slave Bluetooth links at the idle time intervals in each standard time slot of a master device end; the wireless slave equipment acquires a switching trigger event of master-slave role switching; the wireless slave equipment generates a master-slave switching request according to the switching trigger event, wherein the master-slave switching request comprises target standard time slot information of master-slave switching; the wireless slave device sends the master-slave switching request to the wireless master device at the nearest idle time interval of the slave device end through the established master and slave Bluetooth links, wherein the idle time interval is positioned in a standard time slot; the wireless master device receives a master-slave switching request sent by the wireless slave device at the idle time interval of the master device end through the established master and slave Bluetooth links; when the target standard time slot of master-slave switching comes, the current wireless master device and the wireless slave device perform master-slave role switching operation.
According to a fourth aspect, an embodiment of the present invention discloses a master-slave switching apparatus for dual wireless bluetooth devices, which is suitable for wireless slave devices, and includes: the event acquisition module is used for acquiring a switching trigger event of master-slave role switching; the request generating module is used for generating a master-slave switching request according to the switching trigger event, wherein the master-slave switching request comprises target standard time slot information of master-slave switching; the request sending module is used for sending a master-slave switching request to the wireless master equipment at the nearest idle time interval of the slave equipment end through the established master and slave Bluetooth links, wherein the idle time interval is positioned in a standard time slot; the first switching module is used for executing the operation of master-slave role switching with the current wireless master device when the target standard time slot of master-slave switching arrives.
According to a fifth aspect, an embodiment of the present invention discloses a master-slave switching apparatus for dual wireless bluetooth devices, which is applicable to a wireless master device, and is characterized in that the master-slave switching apparatus includes: a request waiting module, which is used for waiting to receive the master-slave switching request through the idle time interval of the established master and slave bluetooth links in each standard time slot of the master device end before receiving the master-slave switching request sent by the wireless slave device; the request receiving module is used for receiving a master-slave switching request sent by the wireless slave equipment at the idle time interval of the master equipment end through the established master and slave Bluetooth links; and the second switching module is used for executing the operation of master-slave role switching with the current wireless slave equipment when the target standard time slot of master-slave switching arrives.
According to a sixth aspect, an embodiment of the present invention discloses a wireless bluetooth device, including: a controller for implementing the method of any of the above first aspects, or for implementing the method of any of the above second aspects.
According to a seventh aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, the computer program stored in the storage medium being adapted to be executed to implement the method of any of the first aspects described above, or to implement the method of any of the second aspects described above.
According to an eighth aspect, an embodiment of the present invention discloses a dual wireless bluetooth audio system, including: a sound source device for providing audio data; and a first wireless bluetooth device and a second wireless bluetooth device; the first wireless Bluetooth device and the second wireless Bluetooth device are respectively a wireless master device and a wireless slave device; the wireless main equipment is in data interaction with the sound source equipment and receives audio data; the wireless slave equipment and the wireless master equipment carry out data interaction through a master Bluetooth link and a slave Bluetooth link, and the wireless slave equipment is also used for monitoring audio data provided by the sound source equipment; the wireless master device is configured to execute the program in the method of any of the second aspects above; the wireless slave device is configured to execute a program to implement the method of any of the first aspects described above.
Drawings
Preferred embodiments according to the present invention will be described below with reference to the accompanying drawings. In the figure:
fig. 1 is a schematic diagram of a communication system of a dual-wireless bluetooth device in the prior art;
fig. 2 is a flowchart of a master-slave switching method for a dual-wireless bluetooth device disclosed in embodiment 1 of the present invention;
fig. 3 is a schematic timing diagram illustrating a data interaction principle of a dual-wireless bluetooth device according to an embodiment of the present invention;
fig. 4 is a flowchart of a master-slave switching method for a dual-wireless bluetooth device disclosed in embodiment 2 of the present invention;
FIG. 5 is a timing diagram illustrating a time slot division operation principle according to an embodiment of the present invention;
fig. 6 is a timing diagram of a master-slave switching method for a dual-wireless bluetooth device disclosed in embodiment 2 of the present invention;
fig. 7 is a schematic structural principle diagram of a master-slave switching apparatus of a wireless device suitable for a pair of wireless slave devices according to embodiment 3 of the present invention;
fig. 8 is a schematic structural principle diagram of a wireless device master-slave switching apparatus suitable for a wireless master device pair disclosed in embodiment 3 of the present invention;
fig. 9 is a schematic structural diagram of a wireless bluetooth device disclosed in embodiment 3 of the present invention;
fig. 10 is a schematic structural diagram of a dual-wireless bluetooth audio system according to embodiment 3 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
Generally, when the master wireless bluetooth device and the slave wireless bluetooth device transmit and receive audio data, an idle time interval exists in a standard time slot of the bluetooth communication standard, and this time interval is generally reserved as digital processing time such as consumption of some hardware implementation protocols or analog processing time such as transmit-receive switching, frequency hopping stabilization, and the time interval is not fully utilized as the hardware performance is improved, for example. Based on the above findings, in order to reduce bandwidth consumption caused by master-slave switching, this embodiment discloses a master-slave switching method for a dual-wireless bluetooth device, which is applicable to a wireless slave device, that is, a master-slave switching request end, and the description is given by taking the wireless slave device as a wireless bluetooth headset as an example.
Please refer to fig. 2, which is a flowchart illustrating a master-slave switching method for a dual-wireless bluetooth device according to the present embodiment, the master-slave switching method for a dual-wireless bluetooth device includes:
step S201, acquiring a switching trigger event of master-slave role switching. Generally speaking, when the wireless master device is low in power or interfered by signals, the master-slave role switching can be performed, so that the current wireless master device becomes a wireless slave device, and the current wireless slave device becomes a wireless master device; of course, the master-slave role switching may also be performed when the signal of the current wireless slave device is stronger than that of the wireless master device, and the specific condition for the master-slave role switching is not limited in this embodiment. In a specific embodiment, a switching trigger event of master-slave role switching may be obtained through an external event, for example, the master-slave role switching is triggered according to a signal state, an electric quantity state, and the like; the handover triggering event sent from the outside may also be received, for example, the handover triggering event sent from the current wireless master device; the master-slave role switching can also be triggered by a physical button or a touch signal and the like.
Step S202, a master-slave switching request iRSR is generated according to a switching trigger event. In this embodiment, the master-slave switching request iRSR may include target standard time slot information of master-slave switching, and in a specific embodiment, the target standard time slot information may be a target standard time slot position, so that the wireless master-slave device performs master-slave role switching when the target standard time slot arrives.
Step S203, the master-slave switching request iRSR is sent to the wireless master device at the nearest idle time interval of the slave device end through the established master and slave Bluetooth links. In this embodiment, the idle time interval is located in the standard timeslot, that is, the idle time interval is a time resource existing in the standard timeslot of the established master and slave bluetooth links. In this embodiment, the established master and slave bluetooth links refer to establishing a bluetooth communication link between a wireless master device and a wireless slave device in a dual-wireless bluetooth device network.
Taking a dual-wireless bluetooth audio network as an example, please refer to fig. 1, a bluetooth sound source device 101, a first bluetooth device 102 (currently, a wireless master device) and a second bluetooth device 103 (currently, a wireless slave device) form a dual-wireless bluetooth audio network 104. Specifically, the bluetooth sound source device 101 and the bluetooth playback device first bluetooth device 102 are connected according to the wireless bluetooth standard protocol to establish a first bluetooth link. The first bluetooth device 102 and the bluetooth playing device and the second bluetooth device 103 are connected according to the wireless bluetooth standard protocol to establish a second bluetooth link. The first bluetooth device 102 sends the first bluetooth link communication information to the second bluetooth device through the second bluetooth link, and establishes a bluetooth monitoring link for the second bluetooth device to monitor the audio data of the bluetooth sound source device, and at this time, a dual-wireless bluetooth audio network 104 is formed among the bluetooth sound source device 101, the first bluetooth device 102 and the second bluetooth device 103. In this embodiment, the second bluetooth link established by the first bluetooth device 102 and the second bluetooth device 103 is the established master and slave communication links referred to in this embodiment.
Referring to fig. 1 and 3, the current dual wireless bluetooth audio network communication process is as follows:
the first Bluetooth device 102 receives the audio data packet of the Bluetooth sound source device 101 in the first Bluetooth link, the second Bluetooth device 103 receives the audio data packet of the Bluetooth sound source device 101 in the Bluetooth monitoring link and responds to the data packet in the first Bluetooth link time slot, and the first Bluetooth device 102 responds to the data packet through the first Bluetooth link according to the condition that the first Bluetooth link receives the data packet and the condition that the second Bluetooth link responds. Specifically, as shown in fig. 3, the bluetooth sound source device 101 sends an audio data packet 301, the first bluetooth device 102 correctly receives an audio data packet 302, and the second bluetooth device 103 correctly monitors an audio data packet 303, the second bluetooth device 103 sends an acknowledgement packet iACK packet 304 indicating that audio data has been successfully monitored by the second bluetooth device in a time interval when entering the first bluetooth link, the first bluetooth device 102 also enters the first bluetooth link time slot to wait for receiving the acknowledgement packet, if receiving the iACK acknowledgement packet, the first bluetooth device 102 sends an acknowledgement packet ACK packet 305 in a time interval of the first bluetooth link thereafter, the bluetooth sound source device receives the acknowledgement packet 306, and one-time audio data packet communication is completed.
When an external event triggers the master-slave role switch, the second bluetooth device 103 sends a master-slave switch request packet (iRSR)308 in the latest time interval after listening for the audio data packet 307 according to the master-slave role switch triggering event.
And step S204, executing the operation of master-slave role switching with the current wireless master device when the target standard time slot of master-slave switching arrives.
Referring to fig. 1 and fig. 3, after the target standard time slot of the master-slave switching arrives, the dual-wireless bluetooth audio network is changed from the network 104 to the network 105, the first bluetooth device 102 is changed from the wireless master device to the wireless slave device, and the first bluetooth link connected to the bluetooth sound source device 101 is changed to the bluetooth listening link; the second bluetooth device 103 changes from a wireless slave device to a wireless master device, and changes a bluetooth monitoring link for monitoring the audio data of the bluetooth sound source device 101 to a first bluetooth link, so as to realize master-slave role switching of the bluetooth playing device, at this time, after the dual-wireless bluetooth audio devices (102 and 103) receive the audio data of the bluetooth sound source device 101, the first bluetooth device 102 sends a response packet iACK packet 312 indicating that the audio data has been successfully monitored, and the second bluetooth master device 103 receives the packet condition and the response condition of the second bluetooth link according to the first bluetooth link, and performs packet response through the first bluetooth link.
In this embodiment, the master-slave handover request iRSR is sent to the wireless master device in the nearest idle time interval of the slave device side by using the established master and slave bluetooth links, and specifically, the master-slave handover request iRSR may be sent to the wireless master device in the form of an additional packet in the use time interval. Since the idle time interval is a time period during which the master and slave communication links are unoccupied, bandwidth consumption can be reduced by sending the master-slave handover request iRSR within the time interval. In addition, the master-slave switching request is sent at the latest idle time interval, so that the master-slave switching speed is increased, and the master-slave switching can be rapidly carried out according to the triggering event and the bandwidth consumption is reduced.
In order to better allocate resources, in an alternative embodiment, the idle time interval of the slave device includes several sub-slots, and when step S203 is executed, sending the master-slave handover request iRSR to the wireless master device at the nearest idle time interval of the slave device through the established master and slave bluetooth links includes: and sending a master-slave switching request iRSR to the wireless master equipment in a preset sub-time slot. Specifically, the time period of the idle time interval may be divided into several sub-slots, where one or more sub-slots are used to transmit an acknowledgement packet iACK packet of audio data, and in addition, one or more sub-slots are preset to transmit a master-slave handover request iRSR. As an alternative embodiment, the predetermined sub-slot is a sub-slot different from the sub-slot for sending the acknowledgement packet itack, and in this embodiment, the acknowledgement packet itack indicates that the wireless slave device has successfully listened to the audio data. It should be noted that, in the implementation process, the sub-slot for sending the acknowledgement packet iACK may be set before the preset sub-slot.
To further determine whether the wireless slave device listens to the audio data, in an alternative embodiment, the sub-slot positions of the several sub-slots carry listening status information of the wireless slave device, the listening status information being whether the wireless slave device successfully listens to the audio data. Specifically, when the wireless slave device successfully monitors audio data, a master-slave switching request iRSR is sent to the wireless master device through a sub-slot at an even number position; when the wireless slave device does not monitor the audio data, the master-slave switching request iRSR is sent to the wireless master device through the sub-time slots in the odd number positions.
It should be noted that, in the specific implementation process, according to the teachings of this embodiment, a person skilled in the art may also perform odd-even permutation, that is, when audio data is not monitored, a master-slave switching request iRSR is sent through a sub-slot at an even position; and when audio data are monitored, sending a master-slave switching request iRSR through the sub-time slots at odd positions. Should be considered as equivalents for the technical solution of the present invention.
In order to indicate the target standard timeslot position information of the master-slave handover to the wireless master device, in an optional embodiment, the preset sub-timeslot position carries the target standard timeslot position information of the master-slave handover. That is, the sub-slot position where the master-slave handover request iRSR is sent represents the target standard slot position information of the master-slave handover.
In a specific embodiment, when the wireless slave device sends the master-slave handover request iRSR, the wireless master device may be indicated with the location information of the target standard timeslot for master-slave handover:
in an embodiment, the target standard time slot position of the master-slave handover may also be directly located, that is, each preset sub-time slot position represents a preset standard time slot interval number of the current standard time slot from the target standard time slot position, for example, the a-th sub-time slot represents that the standard time slot interval number of the current standard time slot from the target standard time slot position is a, and the B-th sub-time slot represents that the standard time slot interval number of the current standard time slot from the target standard time slot position is B.
In another embodiment, the number of standard time slots spaced from the target standard time slot position of the master-slave handover in the current standard time slot may be determined. Specifically, the preset sub-slot position may be determined based on the target standard slot position and the current standard slot position of the master-slave handover, and specifically, assuming that the idle time interval is divided into a plurality of sub-slots, the target standard slot of the master-slave handover is located in the nth standard slot, and the current standard slot is the mth standard slot, then the sub-slot position where the master-slave handover request iRSR is sent is a position obtained by a function related to N, M.
In one embodiment, when the wireless slave device successfully listens to audio data, a master-slave handover request iRSR is sent to the wireless master device through sub-slots in even positions. Specifically, the sub-slot at the even position is the 2+2 × N-M (2 × M) slots, where N is the target standard slot position of the master-slave handover, and M is the current standard slot position.
To further reduce bandwidth consumption, in an alternative embodiment, when the wireless slave device successfully listens to the audio data, an additional packet is sent to the wireless master device through the established master and slave bluetooth links in a specific sub-slot within the slave device's last idle time interval, the additional packet indicating the master-slave handover request iRSR and information that the wireless slave device successfully listens to the audio data.
In another embodiment, the master-slave handover request iRSR is sent to the wireless master device through odd-positioned sub-slots when the wireless slave device is not listening to audio data. Specifically, the odd-numbered sub-slots are 3+2 × N-M slots, where N is the target standard slot position of the master-slave handover, and M is the current standard slot position.
In order to determine the synchronization of the information, in an alternative embodiment, after performing step S203, the method may further include:
step S205, determine whether the master-slave switching response iRSA sent by the wireless master device is received. In this embodiment, after the master-slave switching request iRSR is sent through the idle time interval, the master-slave switching response iRSA sent by the wireless master device is waited to be received. After receiving the master-slave switching request iRSR, the wireless master device sends a master-slave switching response packet iRSA to the wireless slave device through the established master and slave communication links, please refer to fig. 2 and 3, if receiving a master-slave switching response packet (iRSA)311, execute step S204, wait for the target standard time slot of the master-slave switching to arrive and perform the master-slave switching; if the master-slave switching response packet iRSA is not received, step S206 is executed.
And step S206, updating the position of the current standard time slot. Specifically, the position M of the current standard time slot may be updated by performing a self-add-1 operation on the position M of the current standard time slot, that is, M + 1. It should be noted that, when updating the position of the current standard time slot, the standard time slot with the idle time interval should be updated until the next standard time slot with the idle time interval, that is, the next standard time slot with the idle time interval is updated to the position of the current standard time slot.
In this embodiment, after updating the position of the current standard timeslot, the master-slave handover request iRSR may be retransmitted to the wireless master device through the updated preset sub-timeslot, that is, the steps S203 to S204 are sequentially performed.
It should be noted that, when updating the position of the current standard time slot, if the actual position of the current standard time slot can be obtained, the position of the current standard time slot can be updated with the actual position, and should be considered as an equivalent alternative to the "self-add 1" scheme of the present invention.
According to the master-slave switching method of the double wireless Bluetooth equipment disclosed by the embodiment of the invention, the master-slave switching request is sent to the wireless master equipment at the nearest idle time interval of the slave equipment end through the established master and slave Bluetooth links, the idle time interval is positioned in the standard time slot, the embodiment multiplexes the existing communication link in a time-sharing manner, and the master-slave switching is carried out by utilizing the idle time interval in the standard time slot, so that the condition that the information of the master-slave switching request is sent by extra bandwidth is avoided, and the phenomena of audio playing delay and jamming of the master-slave equipment can be reduced during the master-slave switching. In addition, the master-slave switching request is sent at the latest idle time interval, so that the master-slave switching speed is increased, and the master-slave switching can be rapidly carried out according to the triggering event and the bandwidth consumption is reduced.
Further, by sub-time slot division of the idle time interval, the target standard time slot position of the master-slave switching can be determined according to the sub-time slot position of the master-slave switching request iRSR, so that the data capacity of the master-slave switching request iRSR is reduced.
Example 2
The embodiment discloses a master-slave switching method for dual wireless bluetooth devices, which is applicable to a wireless master device, that is, a master-slave switching receiving end, and the wireless master device is taken as a wireless bluetooth headset for explanation. Please refer to fig. 4, which is a flowchart illustrating a master-slave switching method for a dual-wireless bluetooth device according to the present embodiment, the master-slave switching method for a dual-wireless bluetooth device includes:
step S400, before receiving the master-slave switching request iRSR sent by the wireless slave device, waiting to receive the master-slave switching request iRSR through the established master and slave Bluetooth links in the idle time interval of each standard time slot of the master device end. In this embodiment, the idle time interval is located in the standard timeslot, that is, the idle time interval is a time resource existing in the standard timeslot of the established master and slave bluetooth links. In this embodiment, the established master and slave bluetooth links refer to establishing a bluetooth communication link between a wireless master device and a wireless slave device in a dual-wireless bluetooth device network. In this embodiment, when the master-slave handover request iRSR sent by the wireless slave device is not received, the master-slave handover request iRSR may wait to be received in an idle time interval in each standard timeslot, so as to be able to receive the master-slave handover request iRSR in time.
Step S401, receiving a master-slave switching request iRSR sent by the wireless slave device at the idle time interval of the master device end through the established master and slave Bluetooth links. In this embodiment, the master-slave switching request iRSR may include target standard time slot information of master-slave switching, and in a specific embodiment, the target standard time slot information may be a target standard time slot position, so that the wireless master-slave device performs master-slave role switching when the target standard time slot arrives.
Step S402, when the target standard time slot of master-slave switching comes, the master-slave role switching operation with the current wireless slave device is executed.
Referring to fig. 1 and fig. 3, after the target standard time slot of master-slave switching arrives, the dual-wireless bluetooth audio network is changed from the network 104 to the network 105, the first bluetooth device 102 is changed from the master device to the wireless slave device, and the first bluetooth link connected to the bluetooth sound source device 101 is changed to the bluetooth listening link; the second bluetooth device 103 is changed from a slave device to a wireless master device, and a bluetooth monitoring link for monitoring the audio data of the bluetooth sound source device 101 is changed to a first bluetooth link, so as to realize master-slave role switching of the bluetooth playing device, at this time, after the dual-wireless bluetooth audio devices (102 and 103) receive the audio data of the bluetooth sound source device 101, the first bluetooth device 102 sends a response packet iACK packet 312 indicating that the audio data has been successfully monitored, and the second bluetooth master device 103 receives the data packet condition and the second bluetooth link response condition according to the first bluetooth link and performs data packet response through the first bluetooth link.
In this embodiment, before receiving the master-slave switching request iRSR sent by the wireless slave device, the master-slave switching request iRSR is waited to be received at the idle interval of each standard time slot by using the established master and slave communication links, and the master-slave switching request iRSR sent by the wireless slave device is received at the idle interval of the master device end by using the established master and slave bluetooth links, so that the master-slave switching request can be received quickly, and the bandwidth of master-slave switching information exchange is saved. According to the scheme of the embodiment, the communication of the dual-wireless Bluetooth audio network is not influenced, the bandwidth consumption of information exchange during master-slave switching is not increased, the dual-wireless Bluetooth audio master-slave switching mode is optimized, and the audio playing delay and the pause phenomenon are eliminated.
In order to better allocate resources and indicate the target standard timeslot position of the master-slave handover by the position of the sub-timeslot, in an alternative embodiment, the idle time interval at the master device end includes a plurality of sub-timeslots, which are respectively in one-to-one correspondence with the plurality of sub-timeslots at the slave device end. Specifically, a plurality of sub-slots of the master device side and a plurality of sub-slots of the slave device side are mapped one by one in time sequence. Referring to fig. 5, a time period of an idle time interval of a master device (e.g., the first bluetooth device 102) is divided into a plurality of sub-slots (411, 412, 413, 414, 415, 416), and the sequence in time sequence is 1-6; in an idle time interval of the slave device (for example, the second bluetooth device 103), a plurality of sub-slots (404, 405, 406, 407, 408, 409) are divided, the sequence in time sequence is respectively 1-6, and the sub-slots respectively correspond to a plurality of sub-slots (411, 412, 413, 414, 415, 416) of the master device (for example, the first bluetooth device 102) in a one-to-one manner.
In a specific embodiment, a target standard time slot position of the master-slave switching is determined according to a sub time slot position where a received master-slave switching request is located, that is, a plurality of sub time slot positions of an idle time interval at a master device end indicate target standard time slot position information of the master-slave switching. Specifically, since the sub-slot position of the slave device end sending the master-slave switching request iRSR indicates the target standard slot position information of the master-slave switching, and the plurality of sub-slots of the master device end are in one-to-one correspondence with the plurality of sub-slots of the slave device end, the target standard slot position of the master-slave switching is indicated by the sub-slot position of the master device end receiving the master-slave switching request iRSR.
In an embodiment, the sub-slot position where the master device receives the master-slave handover request iRSR may directly indicate a target standard slot position of the master-slave handover, that is, each preset sub-slot position indicates a preset standard slot interval number of the current standard slot from the target standard slot position, for example, the a-th sub-slot indicates that the standard slot interval number of the current standard slot from the target standard slot position is a, and the B-th sub-slot indicates that the standard slot interval number of the current standard slot from the target standard slot position is B.
In another embodiment, a target standard time slot position for master-slave handover is determined based on the current standard time slot position and the sub-time slot position at which the master-slave handover request iRSR is received.
Specifically, in an embodiment, when the x-th sub-slot receives a master-slave handover request iRSR, it is determined that a target standard slot position of the master-slave handover is N ═ 2)/2+ M, where N is the target standard slot position of the master-slave handover, M is the standard slot position, and x is an even number; or,
in another embodiment, when the xth sub-slot receives the master-slave handover request iRSR, it is determined that the target standard slot position of the master-slave handover is N ═ 3)/2+ M, where N is the target standard slot position of the master-slave handover, M is the current standard slot position, and x is an odd number.
Note that, in the above two embodiments, when only N — M ═ 2/2 is calculated, x is an even number; or, if N-M is (x-3)/2, and x is an odd number, it indicates that the current standard timeslot position is the anchor point interval number from the target standard timeslot position of the master-slave handover, which should be considered as an equivalent alternative to the technical solution of the present invention.
To further reduce bandwidth consumption, in an alternative embodiment, it is determined whether the wireless slave device successfully listens to the audio data based on the sub-slot position in which the received master-slave switch request is located. Specifically, when a master-slave switching request iRSR is received through a sub-slot at an even position, it indicates that the wireless slave device successfully listens to audio data; when receiving the master-slave switching request iRSR through the sub-slot in the odd position, it indicates that the wireless slave device does not listen to the audio data. It should be noted that, in the implementation process, those skilled in the art can make odd and even substitutions according to the teaching of the present embodiment, and should be considered as equivalent to the technical solution of the present invention.
In an optional embodiment, after the step S402 is executed, after receiving a master-slave handover request iRSR sent by a wireless slave device, the method further includes:
and step S403, sending a master-slave switching response packet iRSA to the wireless slave device at the idle time interval in the standard time slot of the master device end.
The embodiment discloses a master-slave switching method for dual-wireless Bluetooth equipment, which is applicable to wireless master and slave equipment, namely double ends of master-slave switching. Please refer to fig. 6, which is a timing chart of a master-slave switching method for a dual-wireless bluetooth device disclosed in this embodiment, the master-slave switching method for a dual-wireless bluetooth device includes:
step S600, the wireless master device waits to receive the master-slave switching request iRSR, that is, before receiving the master-slave switching request iRSR sent by the wireless slave device, the wireless master device waits to receive the master-slave switching request iRSR through the established master and slave bluetooth links at the idle time intervals in each standard timeslot of the master device. Specifically, please refer to the description of the above embodiments.
Step S601, the wireless slave device obtains a switching trigger event of master-slave role switching. Specifically, please refer to the description of the above embodiments.
Step S602, the wireless slave device generates a master-slave switching request iRSR according to the switching trigger event. Specifically, please refer to the description of the above embodiments. It should be noted that, in this embodiment, the execution sequence between step S600 and steps S601 to 602 is not limited.
Step S603, the wireless slave device sends a master-slave handover request iRSR to the wireless master device at the latest idle time interval of the slave device side through the established master and slave bluetooth links. In this embodiment, the idle time interval is located in the standard time slot. Specifically, please refer to the description of the above embodiments.
Step S604, the wireless master device receives a master-slave switching request iRSR sent by the wireless slave device at the idle time interval of the master device end through the established master and slave Bluetooth links. Specifically, please refer to the description of the above embodiments.
Step S605, when the target standard time slot for master-slave switching arrives, the current wireless master device and the wireless slave device perform master-slave role switching operation. Specifically, please refer to the description of the above embodiments.
To facilitate understanding by those skilled in the art, the following describes a data interaction procedure in a specific exemplary scenario, please refer to fig. 5, which describes that the sub-slots transmit and receive the master-slave handover request and receive the successful response packet (iRSR + iACK), and the timing of the sub-slots is changed when the transmission and reception are unsuccessful.
The bluetooth sound source device 101 sends the audio data packet 401, the first bluetooth device 102 correctly receives the audio data packet 402, and the second bluetooth device 103 correctly listens to the audio data packet 403.
When no external event triggers the master-slave role switching, the second bluetooth device 103 enters the first sub-slot 404 in the first bluetooth link sub-slot to send an acknowledgement packet iACK packet indicating that the second bluetooth device has successfully monitored the audio data, the first bluetooth device 102 also enters the first bluetooth link sub-slot to wait for receiving the acknowledgement packet, and if an additional packet (only including the acknowledgement packet iACK packet) is received in the first sub-slot 411 of the first bluetooth sub-slot, it indicates that the additional packet is an acknowledgement packet iACK without master-slave switching. It should be noted that, the placing of the acknowledgement packet iACK packet for successfully listening to the audio data in the first sub-slot 404 is only an example, and it should not be understood that the placing in the first sub-slot is a limitation of the present invention.
When an external event triggers the master-slave role switching, additional packets with master-slave switching requests iRSR will be sent and received at the second sub-time slots (405 and 412, 407 and 414, 409 and 416, etc.) where even numbered sub-time slots (405 and 412, 407 and 414, 409 and 416, etc.) indicate that there is master-slave switching request and audio data packets 403 are correctly listened to, and odd numbered sub-time slots (406 and 413, 408 and 415, etc.) indicate that there is master-slave switching request but audio data packets 403 are not correctly listened to. It should be noted that in other embodiments, odd and even permutations are possible, and should be considered as equivalents of the technical solution of the present invention.
When an external event triggers the master-slave role switching, the change of the master-slave switching request at the position of the sub-time slot is sent, and the change is determined by the position of the current standard time slot and the position of the target standard time slot of the master-slave switching. Suppose the dual wireless bluetooth audio device determines that the second time slot is used for transmitting master-slave switching, and then every time a standard time slot is passed, the transmission of the master-slave switching request will shift to the right by taking the sub-time slot as a unit interval. Assuming that the initial variable M is 1, every time a standard timeslot passes, the current standard timeslot position will be updated so that M is M + 1.
If the second bluetooth device 103 correctly listens to the audio data packet 403, the second bluetooth device 103 sends a master slave switch request and receives a successful response packet (iRSR + iACK) will occur in the (2+2(N-M)) th sub-slot (405 and 412, 407 and 414, 409 and 416, etc.) of the even sub-slot. If the second bluetooth device 103 does not correctly listen to the audio data packet 403, the second bluetooth device 103 sending the master slave switch request packet iRSR will occur in the (3+2(N-M)) th sub-slot (406 and 413, 408 and 415, etc.) of the odd sub-slot. Then the first bluetooth device 102 sends an acknowledgement ACK packet 417 in the first bluetooth link master slot 625us, and after receiving the acknowledgement packet 418, the bluetooth sound source device responds to a master-slave switching acknowledgement packet (iRSA)419 in the same master slot and sends the packet to the second bluetooth device 103(420), so as to confirm the master-slave switching request.
According to the master-slave switching method of the double-wireless Bluetooth equipment disclosed by the embodiment of the invention, when the master-slave switching request iRSR sent by the wireless slave equipment is not received, the master-slave switching request iRSR is waited to be received in the idle time interval in each standard time slot, so that the master-slave switching request iRSR can be received in time.
The embodiment multiplexes the existing communication link in a time-sharing manner, utilizes the idle time interval in the standard time slot to carry out master-slave switching, and avoids the condition that extra bandwidth is used for sending the information of the master-slave switching request, thereby reducing the audio playing delay and the blocking phenomenon of master-slave equipment during master-slave switching. In conclusion, the speed of master-slave switching is improved, and therefore the master-slave switching can be rapidly carried out according to the triggering event and the bandwidth consumption is reduced.
Further, by sub-time slot division of the idle time interval, the target standard time slot position of the master-slave switching can be determined according to the sub-time slot position of the master-slave switching request iRSR, so that the data capacity of the master-slave switching request iRSR is reduced.
Example 3
The present embodiment discloses a master-slave switching apparatus for dual wireless bluetooth devices, which is suitable for wireless slave devices, please refer to fig. 7, which is a schematic structural diagram of the master-slave switching apparatus for dual wireless bluetooth devices disclosed in the present embodiment, and the master-slave switching apparatus for dual wireless bluetooth devices includes: an event acquisition module 701, a request generation module 702, a request transmission module 703 and a first switching module 704, wherein,
the event obtaining module 701 is configured to obtain a switching trigger event for switching between master and slave roles; the request generating module 702 is configured to generate a master-slave switching request iRSR according to a switching trigger event, where the master-slave switching request iRSR includes target standard time slot information of master-slave switching; the request sending module 703 is configured to send a master-slave switching request iRSR to the wireless master device at the nearest idle time interval of the slave device end through the established master and slave bluetooth links, where the idle time interval is located in the standard time slot; the first switching module 704 is configured to perform a master-slave role switching operation with the current wireless master device when a target standard timeslot for master-slave switching arrives.
The present embodiment discloses a master-slave switching apparatus for dual wireless bluetooth devices, which is suitable for a wireless master device, please refer to fig. 8, which is a schematic structural diagram of the master-slave switching apparatus for dual wireless bluetooth devices disclosed in the present embodiment, and the master-slave switching apparatus for dual wireless bluetooth devices includes: a request receiving module 800, a request receiving module 801 and a second switching module 802, wherein:
the request waiting module 800 is configured to wait to receive a master-slave switching request iRSR through an idle time interval of each standard timeslot of the master device end in the established master and slave bluetooth links before receiving the master-slave switching request iRSR sent by the wireless slave device; the request receiving module 801 is configured to receive a master-slave handover request iRSR sent by a wireless slave device at an idle time interval of a master device end through an established master and slave bluetooth link; the second switching module 802 is configured to perform a master-slave role switching operation with a current wireless slave device when a target standard timeslot for master-slave switching arrives.
Please refer to fig. 9, which is a schematic structural diagram of a wireless bluetooth device disclosed in this embodiment, the wireless bluetooth device may be a device having a wireless data interaction function, such as a wireless bluetooth headset, a bluetooth speaker, and the like, and the wireless bluetooth device includes: electrically connected master and slave communication links 901 and a controller 902.
In one embodiment, the wireless bluetooth device is adapted to be a wireless slave device, and the master and slave communication links 901 are used for wireless data interaction between the wireless master device and the wireless slave device; the controller 902 is configured to implement any of the methods of embodiment 1.
In another embodiment, the wireless bluetooth device is adapted to a wireless master device, and the master and slave communication links 901 are used for wireless data interaction between the wireless master device and the wireless slave device; the controller 902 is configured to implement any of the methods of embodiment 2.
The present embodiment also discloses a computer-readable storage medium on which a computer program is stored, the computer program stored in the storage medium being used for being executed to implement the method described in any of embodiment 1 and/or embodiment 2.
Referring to fig. 10, a schematic structural diagram of a dual wireless bluetooth audio system disclosed in this embodiment is shown, where the dual wireless bluetooth audio system includes: a sound source device 1A, a first wireless bluetooth device 1B, and a second wireless bluetooth device 1C, wherein,
the sound source device 1A is configured to provide audio data, and specifically, the sound source device 1A is configured to provide wireless audio data, such as bluetooth audio data, to the first wireless bluetooth device 1B and the second wireless bluetooth device 1C; the first wireless Bluetooth device 1B and the second wireless Bluetooth device 1C are a wireless master device and a wireless slave device respectively;
the first wireless Bluetooth device 1B performs data interaction with the sound source device 1A and receives audio data; the second wireless Bluetooth device 1C and the first wireless Bluetooth device 1B perform data interaction through a master Bluetooth link and a slave Bluetooth link, and the second device is also used for monitoring audio data provided by the sound source device; in this embodiment, the first wireless bluetooth device 1B and the second wireless bluetooth device 1C may be a bluetooth headset or a bluetooth speaker.
In a particular embodiment, the first wireless bluetooth device is configured to execute a program to implement the method described arbitrarily in embodiment 2; the second wireless bluetooth device is configured to execute a program to implement the method arbitrarily described in embodiment 1.
According to the master-slave switching method of the double wireless Bluetooth equipment disclosed by the embodiment of the invention, the master-slave switching request information interaction is carried out at the nearest idle time interval through the established master and slave Bluetooth links, the idle time interval is positioned in the standard time slot, the embodiment multiplexes the existing communication link in a time-sharing manner, and the master-slave switching is carried out by utilizing the idle time interval in the standard time slot, so that the condition that the information of the master-slave switching request is sent by extra bandwidth is avoided, and the phenomena of audio playing delay and jamming of the master-slave equipment can be reduced during the master-slave switching. In addition, the master-slave switching request information interaction is carried out at the latest idle time interval, so that the master-slave switching speed is improved, and the master-slave switching is carried out quickly and the bandwidth consumption is reduced according to the triggering event.
Further, by sub-time slot division of the idle time interval, the target standard time slot position of the master-slave switching can be determined according to the sub-time slot position of the master-slave switching request iRSR, so that the data capacity of the master-slave switching request iRSR is reduced.
It will be appreciated by those skilled in the art that the above-described preferred embodiments may be freely combined, superimposed, without conflict.
It will be understood that the embodiments described above are illustrative only and not restrictive, and that various obvious and equivalent modifications and substitutions for details described herein may be made by those skilled in the art without departing from the basic principles of the invention.

Claims (26)

1. A master-slave switching method for double wireless Bluetooth equipment is suitable for wireless slave equipment, and is characterized by comprising the following steps:
acquiring a switching trigger event of master-slave role switching;
generating a master-slave switching request (iRSR) according to the switching trigger event, wherein the master-slave switching request (iRSR) comprises target standard time slot information of master-slave switching;
sending the master-slave switching request (iRSR) to the wireless master device at the nearest idle time interval of the slave device end through the established master and slave Bluetooth links, wherein the idle time interval is positioned in a standard time slot;
and executing the operation of master-slave role switching with the current wireless master equipment when the target standard time slot of the master-slave switching arrives.
2. The master-slave handover method of claim 1, wherein the idle time interval comprises a number of sub-slots;
the sending the master-slave switching request (iRSR) to the wireless master device at the latest idle time interval of the slave device side through the established master and slave bluetooth links comprises:
and sending the master-slave switching request (iRSR) to the wireless master equipment in a preset sub-time slot.
3. The master-slave handover method of claim 2,
the preset sub-time slot position bears the target standard time slot information of the master-slave switching.
4. The master-slave switching method according to claim 3, wherein the preset sub-slot position is determined based on the master-slave switching target standard slot position and the current standard slot position.
5. The method as claimed in any one of claims 2-4, wherein the sub-slot position of the sub-slots carries the listening status information of the wireless slave device, wherein the listening status information is whether the wireless slave device successfully listens to audio data.
6. The master-slave handover method of claim 5,
and when the wireless slave equipment successfully listens audio data, sending the master-slave switching request (iRSR) to the wireless master equipment through the sub-time slot at the even number position.
Further, the sub-slot at the even position is the 2+2 x (N-M) th slot, where N is the target standard slot position of the master-slave handover, and M is the current standard slot position.
7. The master-slave handover method of claim 5,
when the wireless slave device successfully monitors audio data, an additional packet is sent to the wireless master device through the established master and slave Bluetooth links in a specific sub-time slot in the latest idle time interval of the slave device end, and the additional packet represents the master-slave switching request (iRSR) and information that the wireless slave device successfully monitors the audio data.
8. The master-slave handover method of claim 5,
when the wireless slave device does not listen to audio data, the master-slave switching request (iRSR) is sent to the wireless master device through the sub-time slots in odd positions.
Further, the sub-time slots at odd positions are 3+2 x (N-M) th time slots, where N is the target standard time slot position of the master-slave handover, and M is the current standard time slot position.
9. A method according to any of claims 4-8, wherein after said sending of said master slave handover request (iRSR) to a wireless master device in a preset sub-slot, further comprises:
judging whether a master-slave switching response (iRSA) sent by the wireless master equipment is received;
if the master-slave switching response (iRSA) is not received, updating the next standard time slot with the idle time interval to the current standard time slot position;
and retransmitting the master-slave switching request (iRSR) to the wireless master device through the updated preset sub-time slot.
10. A method according to claim 3 or 4, wherein said predetermined sub-slot position represents a predetermined standard slot spacing number of the current standard slot from said target standard slot position.
11. The master-slave switching method of claim 2, wherein the predetermined sub-slot is a sub-slot distinct from a transmission of an acknowledgement packet (iACK) indicating that the wireless slave device has successfully listened to the audio data.
12. A master-slave switching method for double wireless Bluetooth equipment is suitable for wireless master equipment and is characterized by comprising the following steps:
before receiving a master-slave switching request (iRSR) sent by a wireless slave device, waiting for receiving the master-slave switching request (iRSR) through an idle time interval in each standard time slot of an established master Bluetooth link and an established slave Bluetooth link at a master device end;
receiving a master-slave switching request (iRSR) sent by wireless slave equipment at the idle time interval of a master equipment end through an established master Bluetooth link and an established slave Bluetooth link;
and executing the operation of master-slave role switching with the current wireless slave equipment when the target standard time slot of the master-slave switching arrives.
13. The master-slave switching method according to claim 12, wherein the idle time interval of the master device comprises a plurality of sub-slots, which are respectively in one-to-one correspondence with the plurality of sub-slots of the slave device.
14. The master-slave switching method according to claim 13, wherein the target standard slot position of the master-slave switching is determined according to the sub-slot position of the received master-slave switching request.
15. The master-slave switching method according to claim 14, wherein each sub-slot position represents the number of slot intervals of the current standard slot from the target standard slot position.
16. The master-slave handover method of claim 14, wherein the target standard timeslot position for the master-slave handover is determined based on the current standard timeslot position and the sub-timeslot position at which the master-slave handover request (iRSR) is received.
17. The master-slave handover method of claim 16,
when the x-th sub-slot receives the master slave handover request (iRSR),
determining the target standard time slot position of the master-slave switching to be N ═ x-2)/2+ M, wherein N is the target standard time slot position of the master-slave switching, M is the current standard time slot position, and x is an even number; or,
and determining the target standard time slot position of the master-slave switching to be N ═ x-3)/2+ M, wherein N is the target standard time slot position of the master-slave switching, M is the current standard time slot position, and x is an odd number.
18. The master-slave handover method according to any of claims 13-17,
and determining whether the wireless slave equipment successfully monitors the audio data according to the position of the sub-time slot of the received master-slave switching request.
19. A master-slave handover method according to any of claims 12-18, wherein after receiving a master-slave handover request (iRSR) sent by a wireless slave device, further comprising:
and transmitting a master-slave switching response packet (iRSA) to the wireless slave equipment at an idle time interval in a standard time slot of the master equipment end.
20. A master-slave switching method for double wireless Bluetooth equipment is characterized by comprising the following steps:
before receiving a master-slave switching request (iRSR) sent by a wireless slave device, a wireless master device waits for receiving the master-slave switching request (iRSR) through an idle time interval in each standard time slot of a master device end by an established master and slave Bluetooth link;
the wireless slave equipment acquires a switching trigger event of master-slave role switching;
the wireless slave equipment generates a master-slave switching request (iRSR) according to the switching trigger event, wherein the master-slave switching request (iRSR) comprises target standard time slot information of master-slave switching;
the wireless slave device sends the master-slave switching request (iRSR) to the wireless master device at the latest idle time interval of the slave device end through the established master and slave Bluetooth links, wherein the idle time interval is positioned in a standard time slot;
the wireless master device receives a master-slave switching request (iRSR) sent by the wireless slave device at the idle time interval of the master device end through the established master and slave Bluetooth links;
and when the target standard time slot of the master-slave switching arrives, the current wireless master device and the wireless slave device perform master-slave role switching operation.
21. A master-slave switching device for dual wireless Bluetooth equipment is suitable for wireless slave equipment, and is characterized by comprising:
the event acquisition module is used for acquiring a switching trigger event of master-slave role switching;
a request generation module, configured to generate a master-slave switching request (iRSR) according to the switching trigger event, where the master-slave switching request (iRSR) includes target standard timeslot information for master-slave switching;
a request sending module, configured to send a master-slave handover request (iRSR) to a wireless master device at a nearest idle time interval of a slave device end through an established master/slave bluetooth link, where the idle time interval is located in a standard timeslot;
and the first switching module is used for executing the operation of master-slave role switching with the current wireless master equipment when the target standard time slot of the master-slave switching arrives.
22. The utility model provides a two wireless bluetooth equipment principal and subordinate auto-change over device, is applicable to wireless master device which characterized in that includes:
a request waiting module, which is used for waiting to receive the master-slave switching request (iRSR) in each idle time interval of the standard time slot of the master device end through the established master and slave Bluetooth links before receiving the master-slave switching request (iRSR) sent by the wireless slave device;
a request receiving module, which is used for receiving a master-slave switching request (iRSR) sent by the wireless slave equipment at the idle time interval of the master equipment end through the established master and slave Bluetooth links;
and the second switching module is used for executing the operation of master-slave role switching with the current wireless slave equipment when the target standard time slot of the master-slave switching arrives.
23. A wireless bluetooth device, comprising:
a controller for implementing the method of any one of claims 1 to 11 or for implementing the method of any one of claims 12 to 19.
24. The wireless bluetooth device of claim 23, wherein the wireless bluetooth device is a bluetooth headset or a bluetooth speaker.
25. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program stored in the storage medium is adapted to be executed for carrying out the method according to any one of claims 1-11 or for carrying out the method according to any one of claims 12-19.
26. A dual wireless bluetooth audio system, comprising:
a sound source device for providing audio data; and
a first wireless Bluetooth device and a second wireless Bluetooth device;
the first wireless Bluetooth device and the second wireless Bluetooth device are respectively a wireless master device and a wireless slave device;
the wireless main equipment is in data interaction with the sound source equipment and receives the audio data;
the wireless slave equipment and the wireless master equipment perform data interaction through a master Bluetooth link and a slave Bluetooth link, and the wireless slave equipment is also used for monitoring audio data provided by the sound source equipment; it is characterized in that the preparation method is characterized in that,
the wireless master device is configured to execute a program to implement the method of any one of claims 12-19;
the wireless slave device is configured to execute a program to implement the method of any of claims 1-11.
CN201910949946.5A 2019-10-08 2019-10-08 Master-slave switching method, device and system for standard time slot dual-wireless Bluetooth device Active CN111107526B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910949946.5A CN111107526B (en) 2019-10-08 2019-10-08 Master-slave switching method, device and system for standard time slot dual-wireless Bluetooth device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910949946.5A CN111107526B (en) 2019-10-08 2019-10-08 Master-slave switching method, device and system for standard time slot dual-wireless Bluetooth device

Publications (2)

Publication Number Publication Date
CN111107526A true CN111107526A (en) 2020-05-05
CN111107526B CN111107526B (en) 2023-05-02

Family

ID=70421356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910949946.5A Active CN111107526B (en) 2019-10-08 2019-10-08 Master-slave switching method, device and system for standard time slot dual-wireless Bluetooth device

Country Status (1)

Country Link
CN (1) CN111107526B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437370A (en) * 2020-08-11 2021-03-02 珠海市杰理科技股份有限公司 Link switching method, system, TWS earphone pair, chip and medium
CN112437371A (en) * 2020-08-11 2021-03-02 珠海市杰理科技股份有限公司 BLE link switching method, equipment, earphone pair, chip and medium
CN112672290A (en) * 2020-12-02 2021-04-16 无锡中感微电子股份有限公司 Method, device and equipment for master-slave switching in wireless communication system
CN113645715A (en) * 2021-10-13 2021-11-12 荣耀终端有限公司 Method and terminal device for monitoring link
CN114079896A (en) * 2021-07-22 2022-02-22 珠海市杰理科技股份有限公司 Method, device, equipment and system for correcting packet loss data in dual-transmission mode
JP2023531314A (en) * 2020-09-01 2023-07-21 深▲セン▼市中科藍訊科技股▲フン▼有限公司 Wireless device communication method, wireless device and computer readable storage medium
WO2024045012A1 (en) * 2022-08-31 2024-03-07 宁德时代未来能源(上海)研究院有限公司 Master-backup switching method and apparatus, computer device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335642A (en) * 2012-05-26 2015-02-04 高通股份有限公司 Smart battery wear leveling for audio devices
CN107708014A (en) * 2017-11-08 2018-02-16 深圳市沃特沃德股份有限公司 Method and device for automatically switching master-slave relation of wireless earphone and wireless earphone
CN108323241A (en) * 2018-01-25 2018-07-24 深圳市为通博科技有限责任公司 Principal and subordinate's role transforming method, chip and data transmission system
CN108769432A (en) * 2018-07-27 2018-11-06 Oppo广东移动通信有限公司 Main earphone switching method, mobile terminal and computer readable storage medium
CN109040887A (en) * 2018-07-02 2018-12-18 Oppo广东移动通信有限公司 Principal and subordinate's earphone method for handover control and Related product
CN109327829A (en) * 2018-11-22 2019-02-12 重庆物奇科技有限公司 The method of bluetooth equipment, Bluetooth communication system and equipment room transmission instruction
CN109660906A (en) * 2019-03-12 2019-04-19 恒玄科技(上海)有限公司 Wireless Bluetooth headsets, wireless Bluetooth headsets master-slave swap optimization method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335642A (en) * 2012-05-26 2015-02-04 高通股份有限公司 Smart battery wear leveling for audio devices
CN107708014A (en) * 2017-11-08 2018-02-16 深圳市沃特沃德股份有限公司 Method and device for automatically switching master-slave relation of wireless earphone and wireless earphone
CN108323241A (en) * 2018-01-25 2018-07-24 深圳市为通博科技有限责任公司 Principal and subordinate's role transforming method, chip and data transmission system
CN109040887A (en) * 2018-07-02 2018-12-18 Oppo广东移动通信有限公司 Principal and subordinate's earphone method for handover control and Related product
CN108769432A (en) * 2018-07-27 2018-11-06 Oppo广东移动通信有限公司 Main earphone switching method, mobile terminal and computer readable storage medium
CN109327829A (en) * 2018-11-22 2019-02-12 重庆物奇科技有限公司 The method of bluetooth equipment, Bluetooth communication system and equipment room transmission instruction
CN109660906A (en) * 2019-03-12 2019-04-19 恒玄科技(上海)有限公司 Wireless Bluetooth headsets, wireless Bluetooth headsets master-slave swap optimization method

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437370A (en) * 2020-08-11 2021-03-02 珠海市杰理科技股份有限公司 Link switching method, system, TWS earphone pair, chip and medium
CN112437371A (en) * 2020-08-11 2021-03-02 珠海市杰理科技股份有限公司 BLE link switching method, equipment, earphone pair, chip and medium
CN112437370B (en) * 2020-08-11 2023-02-24 珠海市杰理科技股份有限公司 Link switching method, system, TWS earphone pair, chip and medium
CN112437371B (en) * 2020-08-11 2023-02-21 珠海市杰理科技股份有限公司 BLE link switching method, equipment, earphone pair, chip and medium
JP7449521B2 (en) 2020-09-01 2024-03-14 深▲セン▼市中科藍訊科技股▲フン▼有限公司 Wireless device communication method, wireless device and computer readable storage medium
JP2023531314A (en) * 2020-09-01 2023-07-21 深▲セン▼市中科藍訊科技股▲フン▼有限公司 Wireless device communication method, wireless device and computer readable storage medium
CN112672290B (en) * 2020-12-02 2022-05-31 无锡中感微电子股份有限公司 Method, device and equipment for master-slave switching in wireless communication system
CN112672290A (en) * 2020-12-02 2021-04-16 无锡中感微电子股份有限公司 Method, device and equipment for master-slave switching in wireless communication system
CN114079896A (en) * 2021-07-22 2022-02-22 珠海市杰理科技股份有限公司 Method, device, equipment and system for correcting packet loss data in dual-transmission mode
CN114079896B (en) * 2021-07-22 2024-06-07 珠海市杰理科技股份有限公司 Method, device, equipment and system for error correction of packet loss data in double-transmission mode
CN113645715B (en) * 2021-10-13 2022-01-04 荣耀终端有限公司 Method and terminal device for monitoring link
CN113645715A (en) * 2021-10-13 2021-11-12 荣耀终端有限公司 Method and terminal device for monitoring link
WO2024045012A1 (en) * 2022-08-31 2024-03-07 宁德时代未来能源(上海)研究院有限公司 Master-backup switching method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN111107526B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN111106853B (en) Master-slave switching method, device and equipment for double wireless Bluetooth equipment and audio system
CN111107526B (en) Master-slave switching method, device and system for standard time slot dual-wireless Bluetooth device
US12096199B2 (en) Dual advanced audio distribution profile (A2DP) sink
CN111436044B (en) Method, device and system for processing packet loss data of dual-wireless Bluetooth communication network
CN111435844B (en) Method, device, equipment and system for correcting audio data in dual-wireless Bluetooth communication
CN111654845B (en) Bluetooth multi-terminal link switching method, bluetooth audio equipment and system
CN111885553B (en) Bluetooth device communication method and related device
CN111436043B (en) Communication method, device, equipment and system of dual-wireless Bluetooth communication network
CN112188415B (en) Low-power-consumption Bluetooth synchronous data streaming transmission method and device
CN110944311B (en) Method for distributing time slot of wireless earphone and wireless earphone adopting same
CN111885554B (en) Link switching method based on dual-wireless Bluetooth communication and related equipment
CN111901730A (en) TWS earphone interaction method and system and TWS earphone
CN112672290B (en) Method, device and equipment for master-slave switching in wireless communication system
CN107027166B (en) A kind of sending method, device and the node of the synchronizing information of node
TWI758673B (en) Network coordination
EP2359515B1 (en) System and method to implement synchronous channel timing in a wireless communications network
US20130182602A1 (en) Method For Transmitting A Signal While Avoiding The Influences Of An Interference Signal Existing In The Same Channel In A Communication System Having A Main Communication Device And A Plurality Of Terminal Communication Devices
JP7333034B2 (en) Wireless RF transmission method and wireless RF receiver
CN110493764A (en) Bluetooth devices method, apparatus, bluetooth equipment and storage medium
CN113630904B (en) Bluetooth multi-pairing connection method and medium
JP7314740B2 (en) transmitter, program
JP4639987B2 (en) Wireless communication system and wireless communication apparatus
CN114007211B (en) Multi-connection scheduling method for wireless Bluetooth audio system
CN112437370B (en) Link switching method, system, TWS earphone pair, chip and medium
CN115967929A (en) Communication method, bluetooth headset and Bluetooth communication system

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519075 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Applicant after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Applicant before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant