Bluetooth module transmitting power adjustment method, electronic equipment and storage medium
By dynamically adjusting the transmission power of the Bluetooth module by collecting user motion data, the problem of balancing data transmission quality and battery life during user movement is solved, thus extending device battery life while ensuring data transmission quality.
Patent Information
- Application Number
- CN202511212486.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-11-18
AI Technical Summary
How to balance the data transmission quality of the Bluetooth module with the battery life of electronic devices, especially considering the impact of the Bluetooth module's transmission power when the user is in motion.
By collecting users' motion data, the target transmission power corresponding to the target range is determined, and the transmission power of the Bluetooth module is dynamically adjusted to meet the preset conditions for data transmission quality, thus avoiding reduced battery life due to excessive power.
While ensuring data transmission quality, it extends the battery life of electronic devices and avoids excessive power consumption due to excessive power consumption.
Smart Images

Figure CN120980659A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of communication, in particular to a Bluetooth module transmission power adjustment method, an electronic device and a storage medium. BACKGROUND
[0002] Bluetooth, as a short-range communication method, is widely used in various electronic devices, such as wireless earphones, smart speakers, smart door locks, smart watches, etc. These electronic devices rely on Bluetooth to achieve wireless connection and data transmission. In these electronic devices, the Bluetooth module is the core hardware unit that implements Bluetooth functions, which integrates functions such as radio frequency transceiver, baseband processing and protocol stack, and directly determines the connection stability, data transmission rate and transmission quality when the device communicates with other Bluetooth devices.
[0003] The transmission power of the Bluetooth module is an important parameter that affects its communication distance and anti-interference capability. The higher the transmission power of the Bluetooth module, the better the data transmission quality. However, the higher the transmission power of the Bluetooth module, the greater the power consumption, which will result in a decrease in the endurance time of the electronic device. How to balance the data transmission quality of the Bluetooth module and the endurance time of the electronic device is a problem to be solved. SUMMARY
[0004] In view of the above problems, embodiments of the present application provide a Bluetooth module transmission power adjustment method, an electronic device and a storage medium, to solve the problem that the data transmission quality of the Bluetooth module and the endurance time of the electronic device cannot be balanced in the prior art.
[0005] According to an aspect of the embodiments of the present application, a Bluetooth module transmission power adjustment method is provided, applied to an electronic device including a Bluetooth module, the method comprising: collecting motion data of a user using the electronic device in a current period; determining a target interval to which the motion data belongs from a plurality of preset intervals, wherein the plurality of intervals correspond one-to-one to a plurality of motion intensities; determining a target transmission power corresponding to the target interval from a plurality of transmission powers, wherein the plurality of intervals correspond one-to-one to the plurality of transmission powers; setting the transmission power of the Bluetooth module to the target transmission power; determining the data transmission quality of the Bluetooth module; determining whether the data transmission quality meets a preset condition, wherein when the data transmission quality meets the preset condition, the data transmission quality meets the standard and has not reached the best state; and if the data transmission quality does not meet the preset condition, adjusting the transmission power of the Bluetooth module to make the data transmission quality meet the preset condition.
[0006] In an optional mode, the adjusting the transmission power of the Bluetooth module comprises: adjusting the transmission power of the Bluetooth module by a preset amplitude; and the method further comprises: after the step of adjusting the transmission power of the Bluetooth module by the preset amplitude, turning to the step of determining the data transmission quality of the Bluetooth module.
[0007] In an optional mode, the determining the data transmission quality of the Bluetooth module comprises: determining a pass-through rate of data transmitted by the Bluetooth module, wherein the pass-through rate is a proportion of data that is successfully transmitted at one time in all data transmitted by the Bluetooth module in a preset time period; the judging whether the data transmission quality meets a preset condition comprises: judging whether the pass-through rate is greater than a first threshold and less than a second threshold; and the adjusting the transmission power of the Bluetooth module if the data transmission quality does not meet the preset condition comprises: increasing the transmission power of the Bluetooth module if the pass-through rate is less than or equal to the first threshold; and decreasing the transmission power of the Bluetooth module if the pass-through rate is greater than or equal to the second threshold.
[0008] In an optional mode, the increasing the transmission power of the Bluetooth module comprises: increasing the transmission power of the Bluetooth module by a first preset amplitude; and the decreasing the transmission power of the Bluetooth module comprises: decreasing the transmission power of the Bluetooth module by a second preset amplitude.
[0009] In an optional mode, after the target interval to which the motion data belongs is determined from the preset multiple intervals, the method further comprises: determining a current motion intensity corresponding to the target interval from a first mapping table, wherein the first mapping table comprises the multiple intervals, the multiple motion intensities, and a correspondence relationship therebetween; and the determining a target transmission power corresponding to the target interval from the multiple transmission powers comprises: determining a target transmission power corresponding to the current motion intensity from a second mapping table, wherein the second mapping table comprises the multiple motion intensities, the multiple transmission powers, and a correspondence relationship therebetween.
[0010] In an optional mode, after the current motion intensity corresponding to the target interval is determined from the first mapping table, the method further comprises: determining a size relationship between the current motion intensity and a historical motion intensity determined according to motion data collected in a last historical time period; and if the current motion intensity is greater than the historical motion intensity, the step of determining a target transmission power corresponding to the current motion intensity from the second mapping table is performed.
[0011] In an alternative manner, after determining the size relationship between the current motion intensity and the historical motion intensity determined last time, if the current motion intensity is less than or equal to the historical motion intensity, the method further comprises: not performing the steps of determining the target transmission power corresponding to the current motion intensity from the second mapping table and setting the transmission power of the Bluetooth module as the target transmission power, and turning to the step of determining the data transmission quality of the Bluetooth module.
[0012] In an alternative manner, the motion data comprises one or more of the step frequency, acceleration and limb swing angle of the user.
[0013] According to another aspect of the embodiments of the present application, an electronic device is provided, comprising a Bluetooth module, a memory, a processor and a computer program stored in the memory, the processor executes the computer program to implement the Bluetooth module transmission power adjustment method as described above.
[0014] According to still another aspect of the embodiments of the present application, a computer readable storage medium is provided, having a computer program stored thereon, the computer program being executed by a processor to implement the Bluetooth module transmission power adjustment method as described above.
[0015] In the embodiments of the present application, by collecting the motion data of the user, the transmission power of the Bluetooth module is set as the target transmission power matching the current motion intensity of the user based on the motion data, so as to avoid the data transmission quality of the Bluetooth module being too low, and then it is determined whether the data transmission quality of the Bluetooth module meets the preset condition, if not, the transmission power of the Bluetooth module is adjusted, so that the data transmission quality of the Bluetooth module can meet the demand, when the data transmission quality meets the preset condition, the data transmission quality meets the requirement but does not reach the best state, the design can avoid the transmission power of the Bluetooth module being too large, so as to simultaneously take into account the data transmission quality of the Bluetooth module and the endurance time of the electronic device.
[0016] The above description is only a summary of the technical solutions of the embodiments of the present application, in order to more clearly understand the technical means of the embodiments of the present application, the embodiments of the present application can be implemented according to the content of the description, and in order to make the above and other purposes, characteristics and advantages of the embodiments of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings are included to provide a further understanding of the embodiments of the present application, and are incorporated herein and constitute a part of the description. The embodiments of the present application will be better understood and appreciated from the following detailed description, taken in combination with the drawings, in which:
[0018] Figure 1 A flowchart of the Bluetooth module transmission power adjustment method provided by the embodiments of the present application is shown.
[0019] Figure 2 A flowchart of a method for adjusting the transmission power of a Bluetooth module according to another embodiment of the present application is shown.
[0020] Figure 3 A structural diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] Exemplary embodiments of the present application will be described in greater detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0022] Bluetooth is a short-range wireless communication technology that operates at a frequency of 2.4 GHz and quickly switches between different channels through frequency hopping spread spectrum (FHSS) technology to reduce interference and ensure communication stability. However, the anti-interference capability of this technology is not unlimited, especially when the device is moving or the environment changes, it may be affected to a certain extent.
[0023] For example, a smart watch equipped with a Bluetooth module, when the user wears the watch and moves, the vigorous activity of the body will affect the stability of the Bluetooth signal, which is easy to cause the phenomenon of data transmission interruption or delay when the Bluetooth module transmits data. In order to ensure the data transmission quality of the Bluetooth module, the transmission power of the Bluetooth module can be increased to enhance the signal and resist interference, thereby ensuring the smoothness of data transmission. When it is detected that the user is in a moving state, if the transmission power of the Bluetooth module in the smart watch is directly set to the maximum value to optimize the data transmission quality, the power consumption of the Bluetooth module will be greatly increased, thereby reducing the endurance time of the smart watch.
[0024] In order to balance the data transmission quality of the Bluetooth module and the endurance time of the device, the present application proposes a method for adjusting the transmission power of the Bluetooth module, by collecting the current motion data of the user, and determining the target transmission power corresponding to the motion data, then setting the transmission power of the Bluetooth module to the target transmission power, and monitoring the data transmission quality of the Bluetooth module. If the data transmission quality of the Bluetooth module does not meet the standard or has reached the best state, the transmission power of the Bluetooth module is further adjusted to balance the data transmission quality of the Bluetooth module and the energy consumption of the device, while ensuring the connection stability and data transmission quality, and maximizing the endurance time of the device.
[0025] Figure 1A flowchart of a method for adjusting a transmission power of a Bluetooth module is shown, which is provided by an embodiment of the present application and is performed by an electronic device. The electronic device can be an electronic device comprising a Bluetooth module and one or more processors, such as a smart wearable electronic device (e.g., a smart watch or a smart bracelet), a smart phone, a smart head-mounted device, or another portable electronic device comprising a Bluetooth module. The processor can be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement an embodiment of the present application, without limitation. The one or more processors of the electronic device can be the same type of processors, such as one or more CPUs; or different types of processors, such as one or more CPUs and one or more ASICs, without limitation. As shown in FIG. 10, the method comprises the following steps: Figure 1
[0026] Step 110: Collect motion data of a user using the electronic device in a current time period.
[0027] In a motion scenario, the data transmission quality of the Bluetooth module can decrease with the increase of the motion intensity of the user. In this step, the motion data is collected to determine the motion intensity of the user, and then a suitable transmission power is set for the Bluetooth module based on the motion intensity, so as to balance the data transmission quality of the Bluetooth module and the endurance time of the electronic device. The current time period can be a current 100 ms or 200 ms time period, and the motion data refers to data that can be used to identify the motion intensity of the user, such as the step frequency, acceleration, and limb swing angle of the user, etc.
[0028] Specifically, a six-axis sensor (a three-axis accelerometer and a three-axis gyroscope) is provided in the electronic device to collect the motion data of the user. The step frequency of the user can be collected by the accelerometer, and the gyroscope can assist in identifying the frequency of non-step actions (such as skipping rope, swimming posture swing times). The limb swing angle of the user is calculated by the gyroscope.
[0029] In order to improve the accuracy of the collected motion data, in this step, the motion data of the user is preferably collected continuously for multiple times (e.g., three times), and the arithmetic mean of the motion data collected multiple times is taken as the final motion data, so as to eliminate transient interference and improve the accuracy of the data.
[0030] Step 120: Determine a target interval to which the motion data belongs from a plurality of preset intervals.
[0031] The plurality of preset intervals correspond to a plurality of motion intensities one-to-one, and the motion intensity of the current user can be determined by determining the target interval to which the motion data collected in step 110 belongs.
[0032] Step 130: determining the target transmission power corresponding to the target interval from the plurality of transmission powers.
[0033] Wherein, the plurality of intervals correspond to the plurality of transmission powers one by one, so the target transmission power corresponding to the target interval can be directly determined in this step.
[0034] In order to quickly determine the target transmission power, specifically, the first mapping table and the second mapping table can be pre-set and stored in the electronic device, wherein the first mapping table includes a plurality of intervals, a plurality of exercise intensities, and a first correspondence relationship therebetween, and the second mapping table includes a plurality of exercise intensities, a plurality of transmission powers, and a second correspondence relationship therebetween. The specific form of the first mapping table and the second mapping table can refer to Table One and Table Two below.
[0035] Table One: First mapping table
[0036]
[0037] Wherein, the synthetic acceleration refers to the acceleration of the three axes (X axis, Y axis and Z axis) collected by the three-axis accelerometer, and the synthetic acceleration is determined according to the acceleration of the three axes. The synthetic angle refers to the angle of the three axes (X axis, Y axis and Z axis) collected by the three-axis gyroscope, and the synthetic angle is determined according to the angle of the three axes. Here, only the step frequency, the synthetic acceleration and the synthetic angle of the motion data are taken as examples for introduction. In Table One, if the step frequency of the user collected by the accelerometer is greater than 160 steps / minute, it is determined as high-intensity exercise (such as sprinting); if the step frequency is greater than or equal to 120 and less than or equal to 160 steps / minute, it is determined as medium-intensity exercise (such as running at a constant speed); if the step frequency is less than 120 steps / minute, it is determined as low-intensity exercise (such as walking). The gyroscope assists in identifying the frequency of non-step actions (such as skipping rope, swimming posture swinging times).
[0038] The gyroscope determines the limb swinging angle of the user, if the arm swinging angle is greater than 60°, it is determined as high-intensity exercise (such as sprinting with arm swinging); if the arm swinging angle is greater than or equal to 30° and less than or equal to 60°, it is determined as medium-intensity exercise; if the arm swinging angle is less than 30°, it is determined as low-intensity exercise. If the three-axis synthetic vector peak-to-peak value of the accelerometer is greater than 1.2g, it is determined as high-intensity exercise (such as jumping); if the synthetic acceleration is greater than or equal to 0.5g and less than or equal to 1.2g, it is determined as medium-intensity exercise (such as running at a constant speed); if the synthetic acceleration is less than 0.5g, it is determined as low-intensity exercise.
[0039] Table Two: Second mapping table
[0040] Motion intensity Transmit power Low intensity -12 dBm Medium intensity 0 dBm High intensity 4 dBm
[0041] It is worth mentioning that Table 1 and Table 2 are only used to illustrate the first mapping table and the second mapping table, and do not constitute a limitation on the contents included in the first mapping table and the second mapping table.
[0042] After the target interval is determined in step 120, the corresponding motion intensity of the target interval (i.e., the motion intensity of the user in the current period, which is referred to as the current motion intensity for convenience) is determined according to the first correspondence relationship in the first mapping table, and then the target transmission power corresponding to the current motion intensity is determined according to the second correspondence relationship in the second mapping table. For example, if the current motion intensity is determined to be high intensity according to the first correspondence relationship in the first mapping table, then the target transmission power corresponding to the current motion intensity (high intensity) is determined to be 4 dBm according to the second correspondence relationship in the second mapping table.
[0043] In some embodiments, in order to improve the utilization rate of the storage space of the electronic device, only a single mapping table including a plurality of intervals, a plurality of transmission powers, and the correspondence relationship therebetween can be set and stored in the electronic device. Compared with setting the first mapping table and the second mapping table, the motion intensity does not need to be set in the table, but the plurality of intervals are still one-to-one corresponding to the plurality of motion intensities in essence. In this step, the target transmission power corresponding to the target interval can be directly determined according to the mapping table. The form of the mapping table when a single mapping table is set can refer to the aforementioned Table 1 and Table 2, which will not be described here. In other embodiments, the single mapping table can also be set to include a plurality of intervals, a plurality of motion intensities, a plurality of transmission powers, and the correspondence relationship therebetween.
[0044] Step 140: setting the transmission power of the Bluetooth module to the target transmission power.
[0045] The transmission power corresponding to different intensities is different. After the target transmission power is determined in step 130, the transmission power of the Bluetooth module is set to the target transmission power in this step, so that the transmission power of the Bluetooth module matches the current motion intensity of the user, thereby ensuring that the data transmission quality of the Bluetooth module can basically meet the requirements, and avoiding the phenomenon that the current motion intensity of the user is large, while the transmission power of the Bluetooth module is small, resulting in serious lag, delay, and other adverse phenomena when the Bluetooth module transmits data.
[0046] Step 150: determining the data transmission quality of the Bluetooth module.
[0047] The data transmission quality of the Bluetooth module can be evaluated by indexes such as the pass-through rate, the retransmission rate, and the packet loss rate. The following describes these indexes.
[0048] The pass-through rate of the Bluetooth module when transmitting data refers to the proportion of data that is successfully transmitted at one time in all data transmitted by the Bluetooth module within a certain time length. If the pass-through rate is low, the retransmission rate is high, the effective data throughput decreases, and even the connection is unstable or interrupted. Whether the Bluetooth transmission is successful is determined by the transmission feedback mechanism (ACK / NACK confirmation) of the Bluetooth kernel. The receiving end replies with an ACK confirmation signal after successful decoding, and replies with a NACK to trigger retransmission when CRC fails.
[0049] The retransmission rate of the Bluetooth module when transmitting data refers to the proportion of data packets that are not correctly received or confirmed by the receiving end and need to be retransmitted by the sending end within a certain time length. If the retransmission rate is high, it means that there are many unstable factors in the Bluetooth communication link, such as serious signal interference, poor channel quality, or the distance between devices exceeding the effective range. In this case, data packets need to be frequently retransmitted, which not only significantly increases the transmission delay, but also reduces the effective data throughput, affecting the smoothness and response speed of real-time applications such as audio playback, video calls, or remote control.
[0050] The packet loss rate of the Bluetooth module when transmitting data refers to the proportion of data packets that are lost due to signal interference, attenuation, multipath propagation, etc. during the transmission process from the Bluetooth sending end to the receiving end within a certain time length. If the packet loss rate is high, it will directly affect the reliability and real-time performance of the communication, leading to increased data transmission delay, decreased effective throughput, and even causing application-level lag or interruption.
[0051] In summary, the pass-through rate, retransmission rate, and packet loss rate can all be used to evaluate the data transmission quality of the Bluetooth module. Therefore, in this step, one or more parameters of the pass-through rate, retransmission rate, and packet loss rate within a preset time length can be determined to evaluate the data transmission quality of the Bluetooth module. The preset time length can be set as needed.
[0052] In the embodiments of the present application, the data transmission quality of the Bluetooth module is determined by the pass-through rate. In this step, the pass-through rate FPYR can be determined by the formula FPYR = (number of data packets successfully transmitted for the first time / total number of data packets transmitted) x 100%. The number of data packets successfully transmitted for the first time refers to the number of data packets that do not need to be retransmitted or corrected.
[0053] Step 160: Determine whether the data transmission quality meets the preset conditions. If not, go to step 170; if yes, end the process.
[0054] When the data transmission quality meets the preset condition, the data transmission quality is up to standard but not at the best state. The data transmission quality up to standard means that the data transmission quality meets the preset minimum quality standard. For example, if the minimum quality standard is set as the pass rate being greater than 90%, if the pass rate determined in step 150 is greater than 90%, it is determined that the data transmission quality is up to standard. Alternatively, if the minimum quality standard is set as the retransmission rate being less than 15%, if the retransmission rate determined in step 150 is less than 15%, it is determined that the data transmission quality is up to standard.
[0055] The data transmission quality at the best state means the optimal data transmission performance that the Bluetooth module can achieve under the current environment. For example, if the best state is set as the pass rate being greater than 95%, if the pass rate determined in step 150 is greater than 95%, it is determined that the data transmission quality is at the best state. Alternatively, if the best state is set as the retransmission rate being less than 3%, if the retransmission rate determined in step 150 is less than 3%, it is determined that the data transmission quality is at the best state.
[0056] If the data transmission quality of the Bluetooth module is evaluated by the pass rate, after the pass rate is determined in step 150, in this step, it is determined whether the pass rate is greater than a first threshold value and less than a second threshold value. If the pass rate is less than the first threshold value, it means that the current data transmission quality is poor and does not meet the requirement (i.e., not up to standard), and the process proceeds to step 170 to increase the transmission power of the Bluetooth module to improve the data transmission quality of the Bluetooth module.
[0057] As introduced above, the greater the transmission power of the Bluetooth module is, the greater the power consumption of the Bluetooth module is, and accordingly the endurance time of the electronic device is reduced. If the pass rate is greater than the second threshold value, it means that the current transmission power of the Bluetooth module is large, and the data transmission quality of the Bluetooth module is too high (i.e., the data transmission quality is at the best state), and the process proceeds to step 170 to reduce the transmission power of the Bluetooth module to reduce the power consumption of the Bluetooth module, so as to improve the endurance time of the electronic device as much as possible on the premise that the data transmission quality of the Bluetooth module meets the requirement. The first threshold value and the second threshold value can be set as needed, for example, the first threshold value can be set as 90% or 91%, and the second threshold value can be set as 95% or 96%.
[0058] If the data transmission quality of the Bluetooth module is evaluated by the packet loss rate, the step 150 determines the packet loss rate, and then the step 170 determines whether the packet loss rate is greater than a third threshold value and less than a fourth threshold value. If the packet loss rate is less than the third threshold value, it indicates that the current transmission power of the Bluetooth module is relatively large, and the data transmission quality of the Bluetooth module is too high (i.e., the data transmission quality reaches the best state), and then the step 170 reduces the transmission power of the Bluetooth module to reduce the power consumption of the Bluetooth module, so as to improve the endurance time of the electronic device as much as possible under the premise that the data transmission quality of the Bluetooth module meets the requirements. If the packet loss rate is greater than the fourth threshold value, it indicates that the current data transmission quality is poor and does not meet the requirements (i.e., does not reach the standard), and then the step 170 increases the transmission power of the Bluetooth module to improve the data transmission quality of the Bluetooth module.
[0059] Step 170: Adjusting the transmission power of the Bluetooth module to make the data transmission quality meet the preset condition.
[0060] If the pass-through rate is less than or equal to the first threshold value, the transmission power of the Bluetooth module is increased to improve the data transmission quality of the Bluetooth module. If the pass-through rate is greater than or equal to the second threshold value, the transmission power of the Bluetooth module is reduced to reduce the power consumption of the Bluetooth module and improve the endurance time of the electronic device.
[0061] In the embodiment of the present application, by collecting the motion data of the user, the transmission power of the Bluetooth module is set to the target transmission power matched with the current motion intensity of the user based on the motion data, so as to avoid that the data transmission quality of the Bluetooth module is too low, and then it is determined whether the data transmission quality of the Bluetooth module meets the preset condition. If not, the transmission power of the Bluetooth module is adjusted to make the data transmission quality of the Bluetooth module meet the requirements. When the data transmission quality meets the preset condition, the data transmission quality reaches the standard and does not reach the best state. The design can avoid that the transmission power of the Bluetooth module is too large, so as to balance the data transmission quality of the Bluetooth module and the endurance time of the electronic device.
[0062] Figure 2 A flowchart of a Bluetooth module transmission power adjustment method provided by another embodiment of the present application is shown. As shown in the figure, Figure 2 the method includes the following steps:
[0063] Step 201: Collecting the motion data of the user using the electronic device in the current period.
[0064] Step 202: Determining the target interval to which the motion data belongs from a plurality of preset intervals.
[0065] Step 203: Determining the current motion intensity corresponding to the target interval from a first mapping table.
[0066] The principles and specific implementation manners of the steps 201-203 can be referred to the foregoingFigure 1 The embodiments provided herein will not be described again.
[0067] Step 204: determining whether the current exercise intensity is greater than the historical exercise intensity. If yes, go to step 205; if no, go to step 207.
[0068] The historical exercise intensity is determined according to the exercise data collected in the last historical period, that is, the exercise intensity of the user is determined based on the exercise data collected in the last execution of step 201. As described in Table 1, the multiple exercise intensities include low intensity, medium intensity and high intensity, the intensity of high intensity is the largest, the intensity of medium intensity is the second, and the intensity of low intensity is the smallest. Therefore, in this step, by comparing the current exercise intensity with the historical exercise intensity, it can be determined whether the current exercise intensity is greater than the historical exercise intensity.
[0069] As can be seen from Table 2, the greater the exercise intensity, the greater the corresponding transmission power, and the difference between the transmission powers corresponding to different exercise intensities is large. When the current exercise intensity is greater than the historical exercise intensity, the transmission power corresponding to the current exercise intensity is greater than the transmission power corresponding to the historical exercise intensity, which indicates that the transmission power corresponding to the historical exercise intensity is not suitable for the current exercise intensity. If the transmission power of the Bluetooth module is not adjusted as soon as possible, the data transmission quality of the Bluetooth module will be seriously affected. Therefore, in the embodiments of the present application, when it is determined that the current exercise intensity is greater than the historical exercise intensity, go to step 205, so as to determine the target transmission power corresponding to the current exercise intensity in the subsequent steps, and set the transmission power of the Bluetooth module to the target transmission power matched with the current exercise intensity, so as to ensure that the data transmission quality of the Bluetooth module can basically meet the requirements, and avoid the situation that the data transmission quality of the Bluetooth module is greatly reduced due to the increase of the exercise intensity of the user.
[0070] In this step, by determining whether the current exercise intensity is greater than the historical exercise intensity, if the current exercise intensity is not greater than the historical exercise intensity, it indicates that the current exercise intensity is the same as the historical exercise intensity, or the current exercise intensity is less than the historical exercise intensity.
[0071] Since in the second mapping table, one exercise intensity corresponds to one transmission power, if the exercise intensity of the user does not change, the transmission power corresponding to the exercise intensity does not change. In the embodiments of the present application, when the current exercise intensity is the same as the historical exercise intensity, go to step 207 directly, without the need to repeatedly execute steps 205-206 described below (that is, without the need to change the current transmission power), thereby reducing the power consumption of the electronic device and further improving the endurance time of the electronic device.
[0072] As can be seen from Table 2, the greater the motion intensity, the greater the corresponding transmission power. When the current motion intensity is less than the historical motion intensity, the transmission power corresponding to the historical motion intensity is greater than the transmission power corresponding to the current motion intensity. Therefore, even if steps 205-206 are not performed, the data transmission quality of the Bluetooth module will not decrease. Moreover, when the current motion intensity is less than the historical motion intensity, step 207 is directly performed to gradually adjust the transmission power of the Bluetooth module according to the data transmission quality of the Bluetooth module, so as to avoid the transmission power of the Bluetooth module being always in a large state, thereby ensuring that the data transmission quality of the Bluetooth module meets the requirements and prolonging the endurance time of the electronic device as much as possible. Moreover, as can be seen from Table 2, the difference between the transmission powers corresponding to different motion intensities is large. In the embodiment of the application, when the current motion intensity is less than the historical motion intensity, step 207 is directly performed without performing steps 205-206, so as to avoid the data transmission quality of the Bluetooth module changing greatly due to the large adjustment of the transmission power of the Bluetooth module.
[0073] Step 205: determining the target transmission power corresponding to the current motion intensity from the second mapping table.
[0074] Step 206: setting the transmission power of the Bluetooth module to the target transmission power.
[0075] Step 207: determining the pass-through rate of the data transmitted by the Bluetooth module.
[0076] Step 208: determining whether the pass-through rate is greater than the first threshold value and less than the second threshold value. If yes, step 201 is performed; if no, step 209 is performed.
[0077] The principles and specific implementation manners of steps 205-208 can be referred to the foregoing embodiments provided herein, which will not be described herein again. Figure 1
[0078] It should be noted that if the pass-through rate is greater than the first threshold value and less than the second threshold value, it indicates that the data transmission quality of the Bluetooth module meets the requirements and the transmission power of the Bluetooth module is appropriate, so that the data transmission quality of the Bluetooth module and the endurance time of the electronic device can be considered at the same time without further adjusting the transmission power of the Bluetooth module. Therefore, in the embodiment of the application, if the pass-through rate is greater than the first threshold value and less than the second threshold value, step 201 is performed to continue monitoring the motion intensity of the user, so as to timely adjust the transmission power of the Bluetooth module when the motion intensity of the user changes, thereby ensuring that the data transmission quality of the Bluetooth module meets the requirements and the endurance time of the electronic device is considered at the same time.
[0079] It can be understood that as time goes on, the current period corresponds to different periods when step 201 is performed at different time.
[0080] Step 209: determining whether the pass-through rate is less than or equal to a first threshold value. If yes, go to step 210; if no, go to step 211.
[0081] Step 210: increasing the transmission power of the Bluetooth module by a first preset amplitude.
[0082] If the pass-through rate is less than or equal to the first threshold value, it indicates that the current data transmission quality of the Bluetooth module is poor. Therefore, the transmission power of the Bluetooth module is increased in this step. If the transmission power of the Bluetooth module is adjusted greatly, the data transmission quality of the Bluetooth module will change greatly, thereby reducing the user experience. Therefore, in the embodiments of the present application, the first preset amplitude is preferably a small amplitude, for example, which can be less than the difference between the two transmission powers corresponding to the adjacent two exercise intensities in the second mapping table. The first preset amplitude can be 1 dBm or 2 dBm.
[0083] Step 211: decreasing the transmission power of the Bluetooth module by a second preset amplitude.
[0084] If the pass-through rate is not less than nor equal to the first threshold value, the pass-through rate is greater than or equal to a second threshold value, which indicates that the current transmission power of the Bluetooth module is large. Therefore, the transmission power of the Bluetooth module is decreased in this step to ensure that the transmission power of the Bluetooth module meets the requirements and prolongs the endurance time of the electronic device. The second preset amplitude is similar to the first preset amplitude, and preferably, the second preset amplitude is also a small amplitude. For example, the first preset amplitude can be 1 dBm or 2 dBm.
[0085] It can be understood that step 209 can also be replaced by determining whether the pass-through rate is greater than or equal to the second threshold value. If the pass-through rate is greater than or equal to the second threshold value, step 211 is performed. If the pass-through rate is not greater than nor equal to the second threshold value, it indicates that the pass-through rate is less than or equal to the first threshold value, and step 210 is performed at this time.
[0086] In the embodiments of the present application, the user's exercise intensity is continuously monitored in the above manner. When the user's exercise intensity is greater than the historical exercise intensity, the transmission power of the Bluetooth module is adjusted by a large amplitude in time (i.e., the transmission power of the Bluetooth module is adjusted through steps 205-206), so as to ensure that the transmission power of the Bluetooth module matches the current exercise intensity, thereby ensuring that the data transmission quality of the Bluetooth module meets the requirements as much as possible. Moreover, the pass-through rate of the data transmitted by the Bluetooth module is determined, and the transmission power of the Bluetooth module is adjusted by a small amplitude according to the pass-through rate, so as to realize fine and dynamic adjustment of the transmission power of the Bluetooth module, thereby achieving the purpose of simultaneously considering the data transmission quality of the Bluetooth module and the endurance time of the electronic device.
[0087] In order to improve the efficiency of adjusting the transmission power of the Bluetooth module, in some embodiments, a third mapping table including a plurality of pass-through rates, a plurality of transmission powers and a correspondence relationship therebetween can be preset, when the current pass-through rate of the Bluetooth module is determined, if it is necessary to adjust the transmission power of the Bluetooth module, the transmission power corresponding to the current pass-through rate is directly determined according to the third mapping table, and then the transmission power of the Bluetooth module is directly adjusted to the determined transmission power, thereby improving the efficiency of adjusting the transmission power of the Bluetooth module.
[0088] Figure 3 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown, and embodiments of the present application do not limit the specific implementation of the electronic device.
[0089] As shown in Figure 3 The electronic device 300 can include a processor 302, a memory 304, a computer program 306 stored in the memory 304 and a Bluetooth module 308.
[0090] The memory 304 can include a high-speed RAM memory, and can also include a non-volatile memory such as at least one disk memory. The computer program 306 can include computer executable instructions.
[0091] The processor 302 is configured to execute the computer program 306 to implement the above-mentioned Bluetooth module transmission power adjustment embodiments, so as to adjust the transmission power of the Bluetooth module 308, so as to balance the data transmission quality of the Bluetooth module 308 and the endurance time of the electronic device 300.
[0092] The processor 302 can be a central processing unit CPU, or an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present application. One or more processors included in the electronic device 300 can be the same type of processor, such as one or more CPUs; or can be different types of processors, such as one or more CPUs and one or more ASICs.
[0093] An embodiment of the present application provides a computer readable storage medium, the storage medium stores a computer program, the computer program is executed by a processor to implement the above-mentioned Bluetooth module transmission power adjustment method embodiment.
[0094] An embodiment of the present application provides a computer program, the computer program can be executed by a processor to implement the above-mentioned Bluetooth module transmission power adjustment method embodiment.
[0095] The embodiment of the present application provides a computer program product, the computer program product comprises a computer program, the computer program is executed by a processor to realize the Bluetooth module transmission power adjustment method embodiment.
[0096] In several embodiments provided in the present application, any function realized in the form of a software function module / unit and sold or used as an independent product can be stored in a computer readable storage medium. Based on such understanding, all or part of the technical solutions of the present application can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can be a personal computer, a server, or an electronic device) execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store computer program codes.
[0097] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems can be used with these teachings, based on the description as set forth above. In terms of structure, the construction required to construct such systems is apparent to those skilled in the art from the above description. In addition, the embodiments of the present application are not directed to any particular programming language. It will be appreciated that a variety of programming languages can be used to implement the teachings of the present application described herein, and that the descriptions of specific languages above are provided for disclosure of the best mode of the present application.
[0098] It should be noted that the above embodiments explain the present application instead of limiting the present application, and alternative embodiments can be designed by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs located between parentheses shall not constitute a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the claims, several means of an apparatus recited in a claim are not necessarily meant to be realized by the same hardware item. The use of the words first, second, and third etc. does not indicate any order. These words can be interpreted as names. The steps in the above embodiments should not be understood as limited to the order of execution, unless otherwise specified.
[0099] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A method for adjusting a transmission power of a Bluetooth module, applied to an electronic device including a Bluetooth module, the method comprising: receiving a signal from a Bluetooth module; determining a signal strength of the received signal; and adjusting a transmission power of the Bluetooth module based on the determined signal strength. The method comprises: acquiring motion data of a user using the electronic device in a current period; determining a target interval to which the motion data belongs from a plurality of preset intervals, wherein the plurality of intervals correspond to a plurality of motion intensities one by one; determining a target transmission power corresponding to the target interval from a plurality of transmission powers, wherein the plurality of intervals correspond to the plurality of transmission powers one by one; setting the transmission power of the Bluetooth module as the target transmission power; determining the data transmission quality of the Bluetooth module; judging whether the data transmission quality meets a preset condition, wherein when the data transmission quality meets the preset condition, the data transmission quality is up to standard but not in an optimal state; if the data transmission quality does not meet the preset condition, adjusting the transmission power of the Bluetooth module to make the data transmission quality meet the preset condition.
2. The method of claim 1, wherein, The adjustment of the transmission power of the Bluetooth module comprises adjusting the transmission power of the Bluetooth module by a preset amplitude. The method further comprises, after the step of adjusting the transmission power of the Bluetooth module by the preset amplitude, turning to the step of determining the data transmission quality of the Bluetooth module.
3. The method of claim 1, wherein, The determination of the data transmission quality of the Bluetooth module comprises: determining a straight-through rate of data transmitted by the Bluetooth module, wherein the straight-through rate is the proportion of data that is successfully transmitted at one time in all data transmitted by the Bluetooth module in a preset time period. The judgment of whether the data transmission quality meets the preset condition comprises: judging whether the straight-through rate is greater than a first threshold value and less than a second threshold value. The adjustment of the transmission power of the Bluetooth module if the data transmission quality does not meet the preset condition comprises: if the straight-through rate is less than or equal to the first threshold value, increasing the transmission power of the Bluetooth module; if the straight-through rate is greater than or equal to the second threshold value, decreasing the transmission power of the Bluetooth module.
4. The method of claim 3, wherein, The increase of the transmission power of the Bluetooth module comprises increasing the transmission power of the Bluetooth module by a first preset amplitude. The decrease of the transmission power of the Bluetooth module comprises decreasing the transmission power of the Bluetooth module by a second preset amplitude.
5. The method of claim 1, wherein, After the determination of the target interval to which the motion data belongs from the plurality of preset intervals, the method further comprises: determining a current motion intensity corresponding to the target interval from a first mapping table, wherein the first mapping table comprises the plurality of intervals, the plurality of motion intensities, and the correspondence relationship therebetween. The determination of the target transmission power corresponding to the target interval from the plurality of transmission powers comprises: determining a target transmission power corresponding to the current motion intensity from a second mapping table, wherein the second mapping table comprises the plurality of motion intensities, the plurality of transmission powers, and the correspondence relationship therebetween.
6. The method of claim 5, wherein, After the determination of the current motion intensity corresponding to the target interval from the first mapping table, the method further comprises: determining the size relationship between the current motion intensity and a historical motion intensity determined last time, wherein the historical motion intensity is determined according to motion data acquired in a last historical period. If the current motion intensity is greater than the historical motion intensity, the step of determining the target transmission power corresponding to the current motion intensity from the second mapping table is performed.
7. The method of claim 6, wherein, After determining the size relationship between the current motion intensity and the last determined historical motion intensity, the method further comprises: If the current motion intensity is less than or equal to the historical motion intensity, the step of determining the target transmission power corresponding to the current motion intensity from the second mapping table and the step of setting the transmission power of the Bluetooth module to the target transmission power are not performed, and the step of determining the data transmission quality of the Bluetooth module is performed.
8. The method of claim 1, wherein, The motion data comprises one or more of the following: step frequency, acceleration, and limb swing angle of the user.
9. An electronic device comprising a Bluetooth module, a memory, a processor and a computer program stored on the memory, characterized in that The processor executes the computer program to implement the Bluetooth module transmission power adjustment method of any one of claims 1-8.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the Bluetooth module transmission power adjustment method of any one of claims 1-8.
