CN106792462B - Bluetooth audio transmission adjusting method and device - Google Patents
Bluetooth audio transmission adjusting method and device Download PDFInfo
- Publication number
- CN106792462B CN106792462B CN201611201751.5A CN201611201751A CN106792462B CN 106792462 B CN106792462 B CN 106792462B CN 201611201751 A CN201611201751 A CN 201611201751A CN 106792462 B CN106792462 B CN 106792462B
- Authority
- CN
- China
- Prior art keywords
- bluetooth
- packet loss
- loss rate
- audio transmission
- transmitting power
- 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 277
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000004364 calculation method Methods 0.000 claims abstract description 16
- 230000006978 adaptation Effects 0.000 claims 4
- 230000006854 communication Effects 0.000 description 15
- 238000004891 communication Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 230000003044 adaptive effect Effects 0.000 description 4
- 238000013507 mapping Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B5/00—Near-field transmission systems, e.g. inductive or capacitive transmission systems
- H04B5/70—Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
- H04B5/72—Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/04—TPC
- H04W52/18—TPC being performed according to specific parameters
- H04W52/24—TPC being performed according to specific parameters using SIR [Signal to Interference Ratio] or other wireless path parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/04—TPC
- H04W52/18—TPC being performed according to specific parameters
- H04W52/26—TPC being performed according to specific parameters using transmission rate or quality of service QoS [Quality of Service]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a Bluetooth audio transmission adjusting method, which comprises the following steps: acquiring the packet loss rate of the current Bluetooth audio transmission of the terminal; judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value or not; if so, calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm; and adjusting the current Bluetooth transmitting power of the terminal according to the calculation result. The invention also discloses a Bluetooth audio transmission adjusting device. The invention can solve the technical problem of audio jamming caused by packet loss in the process of Bluetooth audio data transmission.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a Bluetooth audio transmission adjusting method and device.
Background
As a short-distance communication mode, bluetooth is widely applied to communication of various terminal devices (such as smart televisions, smart phones, bluetooth headsets, bluetooth speakers, etc.). The bluetooth audio transmission is based on an A2DP protocol (Advanced audio distribution Profile, bluetooth audio transmission model protocol), and bluetooth earphones, speakers, and the like transmit audio data streams through the protocol.
In the bluetooth communication process, the packet loss rate indicates the ratio of the number of lost data packets to the number of sent data packets during data transmission, and generally, the data transmission is very smooth only if the empirical packet loss rate is lower than one ten thousandth. However, the A2DP protocol has a strict requirement on the real-time performance of audio data transmission, and when two terminals perform bluetooth communication, due to the influence of environmental factors (thick walls, metal isolation strips, electronic interference, etc.) or the distance between the two terminals becomes long, the packet loss rate of bluetooth audio transmission increases, which causes the audio to be jammed, and seriously affects the user experience.
Disclosure of Invention
The invention mainly aims to provide a Bluetooth audio transmission adjusting method and a Bluetooth audio transmission adjusting device, and aims to solve the technical problem of audio blockage caused by packet loss in the process of Bluetooth audio data transmission.
In order to achieve the above object, the present invention provides a bluetooth audio transmission adjusting method, which comprises the following steps:
acquiring the packet loss rate of the current Bluetooth audio transmission of the terminal;
judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value or not;
if so, calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm;
and adjusting the current Bluetooth transmitting power of the terminal according to the calculation result.
Optionally, the step of adjusting the current bluetooth transmission power of the terminal according to the calculation result includes:
acquiring the current Bluetooth transmitting power of the terminal;
judging whether the current Bluetooth transmitting power of the terminal is smaller than the calculated Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission;
and if so, adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission.
Optionally, after the step of determining whether the current bluetooth transmission power of the terminal is less than the calculated bluetooth transmission power corresponding to the packet loss ratio of the current bluetooth audio transmission, the method further includes:
if not, calculating the Bluetooth transmitting power corresponding to the packet loss rate threshold according to the preset algorithm, and adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate threshold.
Optionally, the step of calculating the bluetooth transmission power corresponding to the packet loss rate of the current bluetooth audio transmission according to a preset algorithm includes:
by passingCalculating to obtain Bluetooth transmitting power P corresponding to the packet loss rate of the current Bluetooth audio transmissionc;
Wherein L iscIndicating the packet loss rate, L, of the current Bluetooth Audio TransmissionmaxRepresents the maximum packet loss rate and Lmax100%, e is a constant.
Optionally, the method further comprises:
and adjusting the current Bluetooth audio transmission rate of the terminal according to a curve relation between a preset Bluetooth audio transmission rate and the packet loss rate of the current Bluetooth audio transmission of the terminal.
In addition, to achieve the above object, the present invention further provides a bluetooth audio transmission adjusting apparatus, including:
the acquisition module is used for acquiring the packet loss rate of the current Bluetooth audio transmission of the terminal;
the judging module is used for judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value;
the calculating module is used for calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm if the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold;
and the first adjusting module is used for adjusting the current Bluetooth transmitting power of the terminal according to the calculation result.
Optionally, the first adjusting module is further configured to:
acquiring the current Bluetooth transmitting power of the terminal;
judging whether the current Bluetooth transmitting power of the terminal is smaller than the calculated Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission;
and if so, adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission.
Optionally, the first adjusting module is further configured to:
if the current Bluetooth transmitting power of the terminal is larger than or equal to the calculated Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission, calculating the Bluetooth transmitting power corresponding to the packet loss rate threshold according to the preset algorithm, and adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate threshold.
Optionally, the computing module is further configured to:
by passingCalculating to obtain Bluetooth transmitting power P corresponding to the packet loss rate of the current Bluetooth audio transmissionc;
Wherein L iscIndicating the packet loss rate, L, of the current Bluetooth Audio TransmissionmaxRepresents the maximum packet loss rate and Lmax100%, e is a constant.
Optionally, the apparatus further comprises:
and the second adjusting module is used for adjusting the current Bluetooth audio transmission rate of the terminal according to a curve relation between the preset Bluetooth audio transmission rate and the packet loss rate of the current Bluetooth audio transmission of the terminal.
The method comprises the steps of obtaining the packet loss rate of the current Bluetooth audio transmission of a terminal; judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value or not; if so, calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm; and adjusting the current Bluetooth transmitting power of the terminal according to the calculation result. Through the mode, when the Bluetooth audio transmission environment is poor, compared with the Bluetooth transmitting power fixed by the terminal in the prior art, the Bluetooth transmitting power of the terminal can be adaptively adjusted according to the packet loss rate of the current Bluetooth audio transmission, so that the packet loss rate of the Bluetooth audio transmission is reduced, the pause phenomenon is reduced, and the technical problem of audio pause caused by packet loss in the Bluetooth audio data transmission process can be solved.
Drawings
Fig. 1 is a flowchart illustrating a bluetooth audio transmission adjustment method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a detailed step of step S40 in FIG. 1;
fig. 3 is a diagram illustrating a mapping curve between bluetooth transmission power and packet loss rate in formula i;
FIG. 4 is a flowchart illustrating a Bluetooth audio transmission adjustment method according to a second embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a curve relationship between a preset bluetooth audio transmission rate and a packet loss rate of the current bluetooth audio transmission of the terminal according to the present invention;
FIG. 6 is a functional block diagram of a Bluetooth audio transmission adjustment apparatus according to a first embodiment of the present invention;
fig. 7 is a functional block diagram of a bluetooth audio transmission adjustment apparatus according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a Bluetooth audio transmission adjusting method.
Referring to fig. 1, fig. 1 is a flowchart illustrating a bluetooth audio transmission adjustment method according to a first embodiment of the present invention. The method comprises the following steps:
step S10, obtaining the packet loss rate of the current Bluetooth audio transmission of the terminal;
in this embodiment, the terminal may be an electronic device having a bluetooth communication function, such as a smart television, a smart phone, a bluetooth headset, and a bluetooth speaker.
When two terminal devices perform bluetooth audio transmission, a terminal first obtains a packet loss rate of current bluetooth audio transmission, wherein the packet loss rate represents a ratio of the number of lost data packets to a sent data group during data transmission, and generally, the data transmission is very smooth only if an empirical packet loss rate value is lower than one ten thousandth. The terminal in this embodiment refers to the host end in two bluetooth communication terminal devices, that is, the master device, for example, when the smart television uses the bluetooth to listen separately to the function and the bluetooth speaker to pair and connect, the smart television can be used as the master device, and the bluetooth speaker can be used as the slave device.
Specifically, when performing bluetooth audio transmission, the terminal device uses an A2DP protocol (bluetooth audio transmission model protocol), and an A2dp Service process of the terminal can detect that A2dp is in a play state, at this time, the terminal can call a bluetooth bottom layer read Packet Loss Rate (Packet Loss Rate) interface ReadLossRate (), so as to read the Packet Loss Rate of the current bluetooth audio transmission of the terminal. The terminal can read the packet loss rate of the current Bluetooth audio transmission in real time, can also read the packet loss rate of the current Bluetooth audio transmission according to the preset frequency, and can be flexibly set during specific implementation.
Step S20, judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value;
after the terminal acquires the packet loss rate of the current bluetooth audio transmission, whether the acquired packet loss rate is greater than or equal to a preset packet loss rate threshold is judged, and the packet loss rate threshold can be flexibly set according to actual needs, for example, can be set to one ten thousandth. If the obtained packet loss rate is smaller than the preset packet loss rate threshold, it can be determined that the current bluetooth audio transmission interference is small, and no audio jamming phenomenon occurs, so that no processing is required.
Step S30, if the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold, calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm;
if the obtained packet loss rate is greater than or equal to the preset packet loss rate threshold, it can be determined that the current bluetooth audio transmission interference is large, and at this time, the bluetooth transmission power of the terminal needs to be adjusted.
In the prior art, the bluetooth transmission power of the terminal equipment is generally a fixed value, and according to the bluetooth communication protocol formulated by the official, the maximum bluetooth transmission power of the terminal cannot exceed the specified maximum transmission power, otherwise, the related bluetooth standard cannot be tested to pass. Meanwhile, under the same other conditions, the larger the terminal bluetooth transmission power is, the longer the transmission distance is, and the larger the effective distance of bluetooth audio transmission is, so that the terminal bluetooth transmission power is improved to a certain extent, the packet loss rate of bluetooth audio transmission can be reduced, and the generation of audio jamming phenomenon is reduced.
The terminal of this embodiment may calculate the bluetooth transmission power corresponding to the packet loss rate of the current bluetooth audio transmission according to a preset algorithm, where the calculated bluetooth transmission power needs to be within a reasonable range, for example, between 0 and a maximum transmission power specified by a protocol, and the preset algorithm may be flexibly set according to the maximum transmission power specified by the protocol or an empirical value of the maximum transmission power.
And step S40, adjusting the current Bluetooth transmitting power of the terminal according to the calculation result.
And after the terminal obtains the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission through calculation, the current Bluetooth transmitting power of the terminal is adjusted according to the calculation result. For example, the calculated bluetooth transmitting power may be compared with the current bluetooth transmitting power of the terminal, and if the calculated bluetooth transmitting power is greater than the current bluetooth transmitting power of the terminal, the calculated bluetooth transmitting power may be used as the current bluetooth transmitting power of the terminal, so as to increase the current bluetooth transmitting power of the terminal and improve the stuck phenomenon in the audio transmission process.
In the embodiment, the packet loss rate of the current Bluetooth audio transmission of the terminal is obtained; judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value or not; if so, calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm; and adjusting the current Bluetooth transmitting power of the terminal according to the calculation result. Through the mode, when the Bluetooth audio transmission environment is poor, compared with the Bluetooth transmitting power fixed by the terminal in the prior art, the Bluetooth transmitting power of the terminal can be adaptively adjusted according to the packet loss rate of the current Bluetooth audio transmission, so that the packet loss rate of the Bluetooth audio transmission is reduced, the pause phenomenon is reduced, and the technical problem of audio pause caused by packet loss in the Bluetooth audio data transmission process can be solved.
Further, referring to fig. 2, fig. 2 is a schematic diagram of a refinement step of step S40 in fig. 1. Based on the above-mentioned embodiment shown in fig. 1, the step S40 may include:
step S41, obtaining the current Bluetooth transmitting power of the terminal;
step S42, judging whether the current Bluetooth transmitting power of the terminal is smaller than the calculated Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission;
step S43, if yes, adjusting the current bluetooth transmission power of the terminal to the bluetooth transmission power corresponding to the packet loss rate of the current bluetooth audio transmission.
The terminal reads the current Bluetooth transmitting power of the terminal, and compares the current Bluetooth transmitting power of the terminal with the Bluetooth transmitting power calculated according to a preset algorithm. Because the calculated Bluetooth transmitting power does not exceed the maximum transmitting power specified by the protocol, if the current Bluetooth transmitting power is smaller than the calculated Bluetooth transmitting power, the terminal can adjust the current Bluetooth transmitting power to the calculated Bluetooth transmitting power, so that the Bluetooth transmitting power is increased, and audio frequency blockage is reduced.
Further, after the step S42, the method may further include:
step S44, if not, calculating the Bluetooth transmitting power corresponding to the packet loss rate threshold according to the preset algorithm, and adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate threshold.
If the current bluetooth transmission power is greater than or equal to the calculated bluetooth transmission power, in order to reduce audio jamming, the terminal may adjust the current bluetooth transmission power to a maximum bluetooth transmission power allowed by a protocol, where the maximum bluetooth transmission power allowed by the protocol corresponds to a previously set packet loss rate threshold, so that the set packet loss rate threshold may be converted into the bluetooth transmission power by the same algorithm as before, and then the current bluetooth transmission power of the terminal is adjusted to the bluetooth transmission power corresponding to the packet loss rate threshold. Therefore, the current Bluetooth transmitting power of the terminal can be increased, and the audio jamming is reduced.
In this embodiment, the terminal performs reasonable adaptive adjustment (mainly referred to as increase) on the bluetooth transmitting power of the terminal according to the calculated bluetooth transmitting power corresponding to the packet loss rate of the current bluetooth audio transmission in combination with the current bluetooth transmitting power of the terminal, so that the packet loss rate of the bluetooth audio transmission is reduced, and the occurrence of an audio stuck phenomenon is reduced.
Further, based on the above embodiment, the step S30 may include:
step S31, byCalculating to obtain Bluetooth transmitting power P corresponding to the packet loss rate of the current Bluetooth audio transmissionc(ii) a Wherein L iscIndicating the packet loss rate, L, of the current Bluetooth Audio TransmissionmaxRepresents the maximum packet loss rate and Lmax100%, e is a constant.
In this embodiment, if the maximum bluetooth transmission power specified by the bluetooth communication protocol is 10dbm (decibel milliwatt), the algorithm for the terminal to calculate the bluetooth transmission power may be set as:
obtaining the packet loss rate L of the current Bluetooth audio transmission of the terminalcThe Bluetooth transmitting power P corresponding to the packet loss rate of the current Bluetooth audio transmission can be calculated by substituting the formulac. Referring to fig. 3, fig. 3 is a schematic diagram of a mapping curve between bluetooth transmission power and packet loss rate in formula i, when the current packet loss rate is 0, the corresponding maximum bluetooth transmission power is 10dbm, when the current packet loss rate is 100%, the corresponding bluetooth transmission power is 0, and the calculated bluetooth transmission power is between 0 and 10dbm, so that the formula design conforms to the bluetooth communication protocol and is more reasonable and reliable.
Further, referring to fig. 4, fig. 4 is a flowchart illustrating a bluetooth audio transmission adjustment method according to a second embodiment of the present invention. Based on the first embodiment of the bluetooth audio transmission adjustment method of the present invention, after step S40, the method may further include:
step S50, adjusting the current bluetooth audio transmission rate of the terminal according to a curve relationship between a preset bluetooth audio transmission rate and the packet loss rate of the current bluetooth audio transmission of the terminal.
When carrying out bluetooth audio transmission, except bluetooth transmitting power, bluetooth transmission rate also can exert an influence to the effective transmission distance of bluetooth transmission, and when other conditions are the same, bluetooth transmission rate is faster, and transmission course occupies the channel just more, and natural anti-interference can be worse, and effective audio transmission distance can shorten promptly.
In order to further enhance the anti-interference capability of Bluetooth transmission, the Bluetooth transmission rate can be adjusted while the Bluetooth transmitting power is adjusted in a self-adaptive manner. When the A2DP protocol is used to transmit audio data, the Link layer all uses an ACL (asynchronous connection Link) asynchronous Link, and uses an ACL-U (ACL-User) bearer to transmit a packet (data packet), and at this time, if an EBR (Enhanced Basic Rate) modulation mode is used for transmission, the audio transmission Rate is 2Mbps-3 Mbps.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a curve relationship between a preset bluetooth audio transmission rate and a packet loss rate of the current bluetooth audio transmission of the terminal according to the present invention. As an embodiment, for example, the packet loss rate of the current bluetooth audio transmission does not exceed the preset packet loss rate threshold LoDuring the process, the Bluetooth audio transmission rate is set to be 3Mbps, and the packet loss rate of the current Bluetooth audio transmission exceeds a preset packet loss rate threshold value LoDuring the time, adjust bluetooth audio transmission rate to 2Mbps, reduce bluetooth audio transmission rate promptly to reduce the interference, improve the calorie of pause phenomenon among the audio transmission process. Therefore, the terminal realizes the adaptive adjustment of the Bluetooth audio transmission rate.
This embodiment terminal also carries out self-adaptation adjustment to audio transmission rate in the time of self-adaptation adjustment bluetooth emission power to can further increase bluetooth audio transmission's effective transmission distance, reduce the packet loss rate, reduce audio transmission's the card pause phenomenon, promote user experience.
The invention also provides a Bluetooth audio transmission adjusting device.
Referring to fig. 6, fig. 6 is a functional block diagram of a bluetooth audio transmission adjustment apparatus according to a first embodiment of the present invention. The device comprises:
the obtaining module 10 is configured to obtain a packet loss rate of current bluetooth audio transmission of the terminal;
in this embodiment, the terminal may be an electronic device having a bluetooth communication function, such as a smart television, a smart phone, a bluetooth headset, and a bluetooth speaker.
When two terminal devices perform bluetooth audio transmission, a terminal first obtains a packet loss rate of current bluetooth audio transmission, wherein the packet loss rate represents a ratio of the number of lost data packets to a sent data group during data transmission, and generally, the data transmission is very smooth only if an empirical packet loss rate value is lower than one ten thousandth. The terminal in this embodiment refers to the host end in two bluetooth communication terminal devices, that is, the master device, for example, when the smart television uses the bluetooth to listen separately to the function and the bluetooth speaker to pair and connect, the smart television can be used as the master device, and the bluetooth speaker can be used as the slave device.
Specifically, when performing bluetooth audio transmission, the terminal device uses an A2DP protocol (bluetooth audio transmission model protocol), and an A2dp Service process of the terminal can detect that A2dp is in a play state, at this time, the obtaining module 10 may call a bluetooth bottom layer read Packet Loss Rate (Packet Loss Rate) interface ReadLossRate (), so as to read the Packet Loss Rate of the current bluetooth audio transmission of the terminal. The obtaining module 10 may read the packet loss rate of the current bluetooth audio transmission in real time, and may also read the packet loss rate of the current bluetooth audio transmission according to a preset frequency, which may be flexibly set during specific implementation.
A determining module 20, configured to determine whether a packet loss rate of the current bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold;
after the obtaining module 10 obtains the packet loss rate of the current bluetooth audio transmission, the determining module 20 determines whether the obtained packet loss rate is greater than or equal to a preset packet loss rate threshold, where the packet loss rate threshold may be flexibly set according to actual needs, for example, may be set to one ten thousandth. If the obtained packet loss rate is smaller than the preset packet loss rate threshold, the determining module 20 may determine that the current bluetooth audio transmission interference is small, and no audio jamming phenomenon occurs, so that no processing is required.
A calculating module 30, configured to calculate, according to a preset algorithm, a bluetooth transmission power corresponding to the packet loss rate of the current bluetooth audio transmission if the packet loss rate of the current bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold;
if the obtained packet loss rate is greater than or equal to the preset packet loss rate threshold, it can be determined that the current bluetooth audio transmission interference is large, and at this time, the bluetooth transmission power of the terminal needs to be adjusted.
In the prior art, the bluetooth transmission power of the terminal equipment is generally a fixed value, and according to the bluetooth communication protocol formulated by the official, the maximum bluetooth transmission power of the terminal cannot exceed the specified maximum transmission power, otherwise, the related bluetooth standard cannot be tested to pass. Meanwhile, under the same other conditions, the larger the terminal bluetooth transmission power is, the longer the transmission distance is, and the larger the effective distance of bluetooth audio transmission is, so that the terminal bluetooth transmission power is improved to a certain extent, the packet loss rate of bluetooth audio transmission can be reduced, and the generation of audio jamming phenomenon is reduced.
The calculating module 30 of this embodiment may calculate the bluetooth transmission power corresponding to the packet loss rate of the current bluetooth audio transmission according to a preset algorithm, where the calculated bluetooth transmission power needs to be within a reasonable range, for example, between 0 and the maximum transmission power specified by the protocol, and the preset algorithm may be flexibly set according to the maximum transmission power specified by the protocol or an empirical value of the maximum transmission power.
And the first adjusting module 40 is configured to adjust the current bluetooth transmission power of the terminal according to the calculation result.
After the calculating module 30 calculates the bluetooth transmitting power corresponding to the packet loss rate of the current bluetooth audio transmission, the first adjusting module 40 adjusts the current bluetooth transmitting power of the terminal according to the calculation result. For example, the first adjusting module 40 may compare the calculated bluetooth transmission power with the current bluetooth transmission power of the terminal, and if the calculated bluetooth transmission power is greater than the current bluetooth transmission power of the terminal, the calculated bluetooth transmission power may be used as the current bluetooth transmission power of the terminal, so as to increase the current bluetooth transmission power of the terminal and improve a stuck phenomenon in an audio transmission process.
In this embodiment, the obtaining module 10 obtains a packet loss rate of the current bluetooth audio transmission of the terminal; the judging module 20 judges whether the packet loss rate of the current bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold; if yes, the calculating module 30 calculates the bluetooth transmitting power corresponding to the packet loss rate of the current bluetooth audio transmission according to a preset algorithm; the first adjusting module 40 adjusts the current bluetooth transmitting power of the terminal according to the calculation result. Through the mode, when the Bluetooth audio transmission environment is poor, compared with the Bluetooth transmitting power fixed by the terminal in the prior art, the Bluetooth transmitting power of the terminal can be adaptively adjusted according to the packet loss rate of the current Bluetooth audio transmission, so that the packet loss rate of the Bluetooth audio transmission is reduced, the pause phenomenon is reduced, and the technical problem of audio pause caused by packet loss in the Bluetooth audio data transmission process can be solved.
Further, with continued reference to fig. 6, the first adjusting module 40 is further configured to: acquiring the current Bluetooth transmitting power of the terminal; judging whether the current Bluetooth transmitting power of the terminal is smaller than the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission; and if so, adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission.
The first adjusting module 40 reads the current bluetooth transmitting power of the terminal, and compares the current bluetooth transmitting power with the bluetooth transmitting power calculated according to the preset algorithm. Because the calculated bluetooth transmitting power does not exceed the maximum transmitting power specified by the protocol, if the current bluetooth transmitting power is smaller than the calculated bluetooth transmitting power, the first adjusting module 40 can adjust the current bluetooth transmitting power to the calculated bluetooth transmitting power, so that the bluetooth transmitting power is increased, and the audio frequency jamming is reduced.
Further, the first adjusting module 40 is further configured to: if the current Bluetooth transmitting power of the terminal is larger than or equal to the calculated Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission, calculating the Bluetooth transmitting power corresponding to the packet loss rate threshold according to the preset algorithm, and adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate threshold.
If the current bluetooth transmission power is greater than or equal to the calculated bluetooth transmission power, in order to reduce audio jamming, the first adjusting module 40 may adjust the current bluetooth transmission power to a maximum bluetooth transmission power allowed by a protocol, where the maximum bluetooth transmission power allowed by the protocol corresponds to a packet loss rate threshold previously set, and therefore the first adjusting module 40 may convert the set packet loss rate threshold into the bluetooth transmission power through the same algorithm as previously set, and then adjust the current bluetooth transmission power of the terminal to the bluetooth transmission power corresponding to the packet loss rate threshold. Therefore, the current Bluetooth transmitting power of the terminal can be increased, and the audio jamming is reduced.
In this embodiment, the terminal performs reasonable adaptive adjustment (mainly referred to as increase) on the bluetooth transmitting power of the terminal according to the calculated bluetooth transmitting power corresponding to the packet loss rate of the current bluetooth audio transmission in combination with the current bluetooth transmitting power of the terminal, so that the packet loss rate of the bluetooth audio transmission is reduced, and the occurrence of an audio stuck phenomenon is reduced.
Further, with continued reference to fig. 6, based on the above-mentioned embodiment, the calculating module 30 is further configured to: by passingCalculating to obtain Bluetooth transmitting power P corresponding to the packet loss rate of the current Bluetooth audio transmissionc(ii) a Wherein L iscIndicating the packet loss rate, L, of the current Bluetooth Audio TransmissionmaxRepresents the maximum packet loss rate and Lmax100%, e is a constant.
In this embodiment, if the maximum bluetooth transmission power specified by the bluetooth communication protocol is 10dbm (decibel milliwatt), the algorithm for calculating the bluetooth transmission power by the calculating module 30 may be set as:
obtaining the packet loss rate L of the current Bluetooth audio transmission of the terminalcSubstituting the above formula, the calculating module 30 can calculate the bluetooth transmitting power P corresponding to the packet loss rate of the current bluetooth audio transmissionc. Referring to fig. 3, fig. 3 is a schematic diagram of a mapping curve between bluetooth transmission power and packet loss rate in formula i, when the current packet loss rate is 0, the corresponding maximum bluetooth transmission power is 10dbm, when the current packet loss rate is 100%, the corresponding bluetooth transmission power is 0, and the calculated bluetooth transmission power is between 0 and 10dbm, so that the formula design conforms to the bluetooth communication protocol and is more reasonable and reliable.
Further, referring to fig. 7, fig. 7 is a functional module diagram of a bluetooth audio transmission adjusting apparatus according to a second embodiment of the present invention. Based on the first embodiment of the bluetooth audio transmission adjustment apparatus of the present invention, the apparatus may further include:
and the second adjusting module 50 is configured to adjust the current bluetooth audio transmission rate of the terminal according to a curve relationship between a preset bluetooth audio transmission rate and a packet loss rate of the current bluetooth audio transmission of the terminal.
When carrying out bluetooth audio transmission, except bluetooth transmitting power, bluetooth transmission rate also can exert an influence to the effective transmission distance of bluetooth transmission, and when other conditions are the same, bluetooth transmission rate is faster, and transmission course occupies the channel just more, and natural anti-interference can be worse, and effective audio transmission distance can shorten promptly.
In order to further enhance the anti-interference capability of Bluetooth transmission, the Bluetooth transmission rate can be adjusted while the Bluetooth transmitting power is adjusted in a self-adaptive manner. When the A2DP protocol is used to transmit audio data, the Link layer all uses an ACL (asynchronous connection Link) asynchronous Link, and uses an ACL-U (ACL-User) bearer to transmit a packet (data packet), and at this time, if an EBR (Enhanced Basic Rate) modulation mode is used for transmission, the audio transmission Rate is 2Mbps-3 Mbps.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a curve relationship between a preset bluetooth audio transmission rate and a packet loss rate of the current bluetooth audio transmission of the terminal according to the present invention. As an embodiment, for example, the packet loss rate of the current bluetooth audio transmission does not exceed the preset packet loss rate threshold LoDuring the process, the Bluetooth audio transmission rate is set to be 3Mbps, and the packet loss rate of the current Bluetooth audio transmission exceeds a preset packet loss rate threshold value LoIn the meantime, the second adjusting module 50 adjusts the bluetooth audio transmission rate to 2Mbps, i.e., reduces the bluetooth audio transmission rate, thereby reducing interference and improving the pause phenomenon in the audio transmission process. Therefore, the terminal realizes the adaptive adjustment of the Bluetooth audio transmission rate.
This embodiment terminal also carries out self-adaptation adjustment to audio transmission rate in the time of self-adaptation adjustment bluetooth emission power to can further increase bluetooth audio transmission's effective transmission distance, reduce the packet loss rate, reduce audio transmission's the card pause phenomenon, promote user experience.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (6)
1. A Bluetooth audio transmission adjustment method, comprising the steps of:
acquiring the packet loss rate of the current Bluetooth audio transmission of the terminal;
judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value or not;
if so, calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm;
adjusting the current Bluetooth transmitting power of the terminal according to the calculation result;
wherein, the step of adjusting the current Bluetooth transmitting power of the terminal according to the calculation result comprises:
acquiring the current Bluetooth transmitting power of the terminal;
judging whether the current Bluetooth transmitting power of the terminal is smaller than the calculated Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission;
if so, adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission;
if not, calculating the Bluetooth transmitting power corresponding to the packet loss rate threshold according to the preset algorithm, and adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate threshold.
2. The method for adjusting bluetooth audio transmission according to claim 1, wherein the step of calculating the bluetooth transmission power corresponding to the packet loss rate of the current bluetooth audio transmission according to a preset algorithm comprises:
by passingCalculating to obtain Bluetooth transmitting power P corresponding to the packet loss rate of the current Bluetooth audio transmissionc;
Wherein L iscIndicating the packet loss rate, L, of the current Bluetooth Audio TransmissionmaxRepresents the maximum packet loss rate and Lmax100%, e is a constant.
3. The bluetooth audio transmission adaptation method of claim 2, wherein the method further comprises:
and adjusting the current Bluetooth audio transmission rate of the terminal according to a curve relation between a preset Bluetooth audio transmission rate and the packet loss rate of the current Bluetooth audio transmission of the terminal.
4. An apparatus for bluetooth audio transmission adaptation, the apparatus comprising:
the acquisition module is used for acquiring the packet loss rate of the current Bluetooth audio transmission of the terminal;
the judging module is used for judging whether the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold value;
the calculating module is used for calculating the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission according to a preset algorithm if the packet loss rate of the current Bluetooth audio transmission is greater than or equal to a preset packet loss rate threshold;
the first adjusting module is used for adjusting the current Bluetooth transmitting power of the terminal according to the calculation result;
wherein the first adjusting module is further configured to:
acquiring the current Bluetooth transmitting power of the terminal;
judging whether the current Bluetooth transmitting power of the terminal is smaller than the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission;
if so, adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission;
if the current Bluetooth transmitting power of the terminal is larger than or equal to the calculated Bluetooth transmitting power corresponding to the packet loss rate of the current Bluetooth audio transmission, calculating the Bluetooth transmitting power corresponding to the packet loss rate threshold according to the preset algorithm, and adjusting the current Bluetooth transmitting power of the terminal to the Bluetooth transmitting power corresponding to the packet loss rate threshold.
5. The bluetooth audio transmission adaptation device of claim 4, wherein the calculation module is further configured to:
by passingCalculating to obtain Bluetooth transmitting power P corresponding to the packet loss rate of the current Bluetooth audio transmissionc;
Wherein L iscIndicating the packet loss rate, L, of the current Bluetooth Audio TransmissionmaxRepresents the maximum packet loss rate and Lmax100%, e is a constant.
6. The bluetooth audio transmission adaptation device of claim 5, characterized in that the device further comprises:
and the second adjusting module is used for adjusting the current Bluetooth audio transmission rate of the terminal according to a curve relation between the preset Bluetooth audio transmission rate and the packet loss rate of the current Bluetooth audio transmission of the terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611201751.5A CN106792462B (en) | 2016-12-22 | 2016-12-22 | Bluetooth audio transmission adjusting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611201751.5A CN106792462B (en) | 2016-12-22 | 2016-12-22 | Bluetooth audio transmission adjusting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106792462A CN106792462A (en) | 2017-05-31 |
CN106792462B true CN106792462B (en) | 2020-05-22 |
Family
ID=58897473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611201751.5A Active CN106792462B (en) | 2016-12-22 | 2016-12-22 | Bluetooth audio transmission adjusting method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106792462B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110248341A (en) * | 2018-03-08 | 2019-09-17 | 华为技术有限公司 | Transmission rate switching method, bluetooth equipment and computer-readable medium |
CN110392367A (en) * | 2018-04-16 | 2019-10-29 | 深圳Tcl新技术有限公司 | A kind of Bluetooth transmission control method, system and storage medium |
CN109005582B (en) * | 2018-08-14 | 2021-07-13 | Oppo广东移动通信有限公司 | Transmission power adjusting method, device, electronic equipment and storage medium |
CN110875756B (en) * | 2018-08-29 | 2021-07-02 | 杭州海康威视数字技术股份有限公司 | Method and equipment for automatically adjusting transmitting power in frequency hopping communication |
CN112640505B (en) * | 2018-12-22 | 2022-04-26 | 华为技术有限公司 | Transmission rate control method and equipment |
CN110446193B (en) * | 2019-04-25 | 2020-12-01 | 华为技术有限公司 | Processing method and device of Bluetooth data packet |
CN110337095B (en) * | 2019-06-10 | 2022-06-10 | 深圳市豪恩声学股份有限公司 | Parameter updating method and device for audio listening equipment and audio listening equipment |
CN115002834A (en) * | 2022-06-20 | 2022-09-02 | 深圳十米网络科技有限公司 | Data transmission method for somatosensory device and terminal |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065534A (en) * | 2011-01-31 | 2011-05-18 | 华为技术有限公司 | Power adjustment method and device |
CN203445876U (en) * | 2013-09-11 | 2014-02-19 | 天脉聚源(北京)传媒科技有限公司 | Radio frequency signal output power control device and terminal equipment |
CN103686978A (en) * | 2013-12-24 | 2014-03-26 | 深圳市双赢伟业科技股份有限公司 | Wireless terminal device transmitting power control method |
WO2015021784A1 (en) * | 2013-08-12 | 2015-02-19 | 惠州Tcl移动通信有限公司 | Method and terminal for adjusting wifi transmission power |
CN105430732A (en) * | 2015-11-03 | 2016-03-23 | 广东欧珀移动通信有限公司 | WIFI transmitting power regulation method, terminal and system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102340860B (en) * | 2010-07-27 | 2014-04-02 | 杭州华三通信技术有限公司 | Power control method and device for intelligent antenna system |
CN102595520B (en) * | 2012-02-07 | 2014-06-18 | 北京傲天动联技术股份有限公司 | Transmitting speed adjusting method in wireless local area network and device using same |
CN102781087B (en) * | 2012-07-31 | 2015-11-25 | 福建星网锐捷网络有限公司 | Transmission power adjustment method, device and access device |
-
2016
- 2016-12-22 CN CN201611201751.5A patent/CN106792462B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065534A (en) * | 2011-01-31 | 2011-05-18 | 华为技术有限公司 | Power adjustment method and device |
WO2015021784A1 (en) * | 2013-08-12 | 2015-02-19 | 惠州Tcl移动通信有限公司 | Method and terminal for adjusting wifi transmission power |
CN203445876U (en) * | 2013-09-11 | 2014-02-19 | 天脉聚源(北京)传媒科技有限公司 | Radio frequency signal output power control device and terminal equipment |
CN103686978A (en) * | 2013-12-24 | 2014-03-26 | 深圳市双赢伟业科技股份有限公司 | Wireless terminal device transmitting power control method |
CN105430732A (en) * | 2015-11-03 | 2016-03-23 | 广东欧珀移动通信有限公司 | WIFI transmitting power regulation method, terminal and system |
Also Published As
Publication number | Publication date |
---|---|
CN106792462A (en) | 2017-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106792462B (en) | Bluetooth audio transmission adjusting method and device | |
US9179417B2 (en) | Method, apparatus, and terminal for wireless network connection | |
US10237193B2 (en) | Prioritizing short-range wireless packets for time-sensitive applications | |
CN104350789B (en) | PCU Power Conditioning Unit and method | |
CN107809773B (en) | Control method and device of data transmission equipment | |
KR101088920B1 (en) | Wireless communication method and wireless base station | |
US10560950B2 (en) | User equipment sending signal directly to user equipment | |
CN105704819A (en) | Systems and methods for LTE and WLAN coexistence | |
WO2007033579A1 (en) | An adaptive power adjustment method and means based on reducing crosstalk among dsl lines | |
RU2004107498A (en) | METHOD AND DEVICE FOR SCHEDULED TRANSMISSION OF PACKET DATA IN A WIRELESS COMMUNICATION SYSTEM | |
CN108430094B (en) | Reduce method, apparatus and terminal that WIFI and LTE is interfered with each other | |
KR20150023351A (en) | User interaction monitoring for adaptive real time communication | |
CN111465090B (en) | Wireless data transmission method and device, storage medium and terminal | |
CN109495660B (en) | Audio data coding method, device, equipment and storage medium | |
WO2018058701A1 (en) | Control device and method based on packet loss rate | |
JP2019500765A5 (en) | ||
US9642087B2 (en) | Methods for reducing the power consumption in voice communications and communications apparatus utilizing the same | |
WO2019201185A1 (en) | Bluetooth transmission control method, system, and storage medium | |
CN112866851A (en) | Bluetooth headset self-adaptive cache region algorithm | |
CN101883164A (en) | Adaptive volume gain device and method | |
CN110895939A (en) | Voice interaction method, device and system | |
CN113194527B (en) | WIFI device, transmission power adjusting method thereof and computer-readable storage medium | |
JP5792877B1 (en) | Delay time adjusting apparatus, method and program | |
CN110505658B (en) | Voice rate adjusting method, terminal and VoLTE system | |
CN109803324B (en) | Network threshold value determination method and device, storage medium and electronic equipment |
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 |