CN114302311A - Available duration calculation method and chip of audio equipment and audio equipment - Google Patents

Available duration calculation method and chip of audio equipment and audio equipment Download PDF

Info

Publication number
CN114302311A
CN114302311A CN202111660047.7A CN202111660047A CN114302311A CN 114302311 A CN114302311 A CN 114302311A CN 202111660047 A CN202111660047 A CN 202111660047A CN 114302311 A CN114302311 A CN 114302311A
Authority
CN
China
Prior art keywords
power
transmitting
historical
calculating
transmit
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.)
Pending
Application number
CN202111660047.7A
Other languages
Chinese (zh)
Inventor
谢林庭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhongke Lanxun Technology Co ltd
Original Assignee
Shenzhen Zhongke Lanxun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhongke Lanxun Technology Co ltd filed Critical Shenzhen Zhongke Lanxun Technology Co ltd
Priority to CN202111660047.7A priority Critical patent/CN114302311A/en
Publication of CN114302311A publication Critical patent/CN114302311A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to the technical field of audio equipment, and discloses a method and a chip for calculating available duration of audio equipment and the audio equipment. The available time length calculation method comprises the following steps: the method includes the steps of obtaining a power adjustment instruction, current playing power and current remaining capacity, wherein the power adjustment instruction carries specified transmitting power, determining reference transmitting power according to the specified transmitting power, and calculating current available duration according to the reference transmitting power, the current playing power and the current remaining capacity.

Description

Available duration calculation method and chip of audio equipment and audio equipment
Technical Field
The invention relates to the technical field of audio equipment, in particular to a method and a chip for calculating available duration of audio equipment and the audio equipment.
Background
Existing bluetooth headsets can support the bluetooth standard protocol version 5.2, wherein the bluetooth standard protocol version 5.2 provides a function of supporting dynamic management of radio frequency power, and a transmitting party is informed to increase or decrease transmission power through monitoring received signal strength RSSI.
As such, the transmit power of a bluetooth headset may change many times in a short time under complex communication environments according to dynamic transmit power management of the bluetooth standard protocol version 5.2. In the process of implementing the invention, the inventor finds that: the available time of the traditional Bluetooth headset can also be calculated according to the playing power and the radio frequency power during communication with the terminal, but the transmitting power of the Bluetooth headset is easy to change for many times in a short time, so that the calculation result of the available time of each time is not accurate or reliable.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method for calculating an available duration of an audio device, a chip and an audio device, which can solve the problem that a calculation result of the available duration is not reliable enough.
In a first aspect, an embodiment of the present invention provides a method for calculating an available duration of an audio device, including:
acquiring a power adjustment instruction, current playing power and current remaining capacity, wherein the power adjustment instruction carries specified transmitting power;
determining reference transmitting power according to the appointed transmitting power;
and calculating the current available duration according to the reference transmitting power, the current playing power and the current residual electric quantity.
Optionally, the determining the reference transmission power according to the specified transmission power includes:
determining target historical transmitting power meeting power screening conditions according to the designated transmitting power;
and determining reference transmission power according to a plurality of target historical transmission powers.
Optionally, the determining, according to the specified transmission power, a target historical transmission power that meets a power screening condition includes:
obtaining a historical power bank, wherein the historical power bank comprises a plurality of historical transmitting powers;
and traversing a target power set meeting a power screening condition according to the designated transmitting power and the historical transmitting power, wherein the target power set comprises a plurality of target historical transmitting powers.
Optionally, the target power set is a power set closest to the specified transmission power and satisfying a power screening condition.
Optionally, the traversing a target power set meeting a power screening condition according to the specified transmission power and the historical transmission power includes:
taking the appointed transmitting power as a starting point, and searching a reverse sliding window along the time axis of the historical power library according to a preset acquisition time length;
in the reverse sliding window search, judging whether the change times of the transmitting power in each sliding window is greater than or equal to a preset threshold value or not;
if so, collecting the transmitting power in the sliding window as target historical transmitting power to obtain a target power collection;
if not, the reverse sliding window searching is carried out according to the sliding window distance.
Optionally, the determining a reference transmission power according to a plurality of the target historical transmission powers includes:
and calculating the average value of the plurality of target historical transmitting powers to obtain an average transmitting power, and taking the average transmitting power as a reference transmitting power.
Optionally, the audio device is configured with a transmission power range, the transmission power range may be divided into a plurality of transmission power intervals, and the determining a reference transmission power according to a plurality of the target historical transmission powers includes:
determining a number of target historical transmit powers falling within each of the transmit power intervals and a total number of total target historical transmit powers;
calculating a weight factor corresponding to each transmitting power interval according to the total number and the number corresponding to each transmitting power interval;
and calculating the reference transmitting power according to the weight factor corresponding to each transmitting power interval and the target historical transmitting power.
Optionally, the calculating the reference transmit power according to the weight factor corresponding to each transmit power interval and the target historical transmit power includes:
calculating a total weighted sum according to the weight factor corresponding to each transmitting power interval and the target historical transmitting power;
and calculating reference transmitting power according to the total weighted sum and the total amount.
Optionally, the calculating a current available duration according to the reference transmission power, the current playing power, and the current remaining power includes:
calculating power consumption power according to the reference transmitting power and the current playing power;
and calculating the current available time according to the current residual electric quantity and the power consumption power.
Optionally, the calculating power consumption according to the reference transmission power and the current playing power includes:
adding the reference transmitting power and the current playing power to obtain undetermined power;
and correcting the undetermined power according to a preset correction coefficient to obtain the power consumption.
In a second aspect, an embodiment of the present invention provides a storage medium storing computer-executable instructions for causing an electronic device to execute the method for calculating the usable time of an audio device described above.
In a third aspect, an embodiment of the present invention provides a chip, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for calculating a usable time period of an audio device described above.
In a fourth aspect, an embodiment of the present invention provides an audio apparatus, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for calculating a usable time period of an audio device described above.
In the method for calculating the available duration of the audio device according to the embodiment of the present invention, a power adjustment instruction, a current playing power, and a current remaining power are obtained, where the power adjustment instruction carries a specified transmitting power, a reference transmitting power is determined according to the power adjustment instruction, and the current available duration is calculated according to the reference transmitting power, the current playing power, and the current remaining power.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a schematic circuit structure diagram of a bluetooth headset according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for calculating an available duration of an audio device according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of S23 shown in fig. 2;
fig. 4 is a schematic flow chart of S22 shown in fig. 2;
FIG. 5 is a schematic flowchart of S221 shown in FIG. 4;
fig. 6 is a schematic flowchart of S2212 shown in fig. 5;
FIG. 7 is a schematic flow chart of S222 shown in FIG. 4;
fig. 8 is a schematic circuit structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the invention. Additionally, while functional block divisions are performed in apparatus schematics, with logical sequences shown in flowcharts, in some cases, steps shown or described may be performed in sequences other than block divisions in apparatus or flowcharts. The terms "first", "second", "third", and the like used in the present invention do not limit data and execution order, but distinguish the same items or similar items having substantially the same function and action.
Referring to fig. 1, a bluetooth headset 100 includes a bluetooth communication circuit 11, an audio playing circuit 12, a battery management circuit 13, and a controller 14, where the controller 14 is electrically connected to the bluetooth communication circuit 11, the audio playing circuit 12, and the battery management circuit 13, respectively.
The bluetooth communication circuit 11 is used for external communication, wherein, as shown in fig. 1, the terminal device 15 may transmit a communication instruction to the bluetooth headset 100, or the bluetooth headset 100 may transmit a communication instruction to the terminal device 15. In some embodiments, the terminal device 15 may send a communication instruction to the bluetooth headset 100, the bluetooth communication circuit 11 receives the communication instruction, and the controller 14 performs a corresponding operation according to the communication instruction.
For example, a user carries the bluetooth headset 100 and the terminal device 15 in a scene with a poor communication environment, where such a scene includes a scene with dense wireless devices and many interference sources or a scene with airflow around the device or in a moving state, and the terminal device 15 detects that the RSSI strength sent by the bluetooth headset 100 is too low because of interference from the interfering device or the change in the air pressure around the bluetooth headset 100 is caused by the relatively violent flow of the airflow, and the terminal device 15 is prone to have a decoding error phenomenon because the RSSI strength is too low. Therefore, in order to increase the RSSI strength, the terminal device 15 sends a power adjustment command to the bluetooth headset 100, and the controller 14 adjusts the transmission power of the bluetooth communication circuit 11 according to the power adjustment command, so that the RSSI strength sent by the bluetooth headset 100 can meet the requirement of the terminal device 15.
For another example, suppose that the user carries the bluetooth headset 100 and the terminal device 15 and switches from a poor communication environment to a better communication environment, since the terminal device 15 detects that the RSSI strength sent by the bluetooth headset 100 is too strong, the terminal device 15 enters a saturation state due to the too strong RSSI strength. Therefore, in order to reduce the RSSI strength, the terminal device 15 sends a power adjustment command to the bluetooth headset 100, and the controller 14 adjusts the transmission power of the bluetooth communication circuit 11 according to the power adjustment command, so that the RSSI strength sent by the bluetooth headset 100 can meet the requirement of the terminal device 15.
In some embodiments, the bluetooth communication circuit 11 may be a bluetooth chip.
The audio playback circuit 12 is configured to play back an audio signal according to a playback power, wherein the controller 14 is capable of accessing the audio playback circuit 12 to determine the playback power.
In some embodiments, audio playback circuit 12 may be an audio circuit formed from an audio chip or other discrete components.
The battery management circuit 13 is used for managing the battery of the bluetooth headset 100, wherein the controller 14 can access the battery management circuit 13 to obtain the current remaining power.
In some embodiments, the battery management circuit 13 may be a battery management circuit composed of a battery management chip or other discrete components.
The embodiment of the invention provides a method for calculating the available time length of audio equipment. Referring to fig. 2, the method for calculating the available duration of the audio device includes the following steps:
s21, acquiring a power adjustment instruction, current playing power and current remaining capacity, wherein the power adjustment instruction carries the appointed transmitting power;
in this step, the power adjustment instruction is used to instruct the audio device to adjust the current transmission power according to the specified transmission power, which is the radio frequency power that the receiving end instructs the transmitting end to transmit.
For example, the current transmit power is R1, the designated transmit power is R2, R2> R1. The terminal device detects that the RSSI strength sent by the Bluetooth headset is too low, wherein the RSSI strength at the moment corresponds to the current transmission power R1 of the Bluetooth headset, so that the terminal device selects the appointed transmission power R2 to be packaged into a power adjustment command, the power adjustment command is sent to the Bluetooth headset, and the Bluetooth headset analyzes the appointed transmission power R2 from the power adjustment command.
Generally, in the bluetooth standard protocol version 5.2, the transmission power of the bluetooth headset corresponds to a gain range of-30 dB to 20dB, and the gain range is converted into the transmission power, wherein the transmission power range is 0.001mW to 100 mW.
In this step, the current playing power is the playing power adopted by the audio device when playing the audio signal currently, and generally, when the audio device is a bluetooth headset, the playing power of the bluetooth headset is 4mV to 38 mW.
In this step, the current remaining power is the current remaining power of the audio device.
S22, determining reference transmitting power according to the appointed transmitting power;
in this step, the reference transmission power is obtained from the transmission power of the integrated audio device in the multiple transmission power adjustments. In some embodiments, the present embodiment may multiply the specified transmit power by an empirical constant to obtain the reference transmit power. In some embodiments, the present embodiment may calculate the reference transmit power from the specified transmit power and the target historical transmit power.
And S23, calculating the current available duration according to the reference transmitting power, the current playing power and the current remaining capacity.
In some embodiments, referring to fig. 3, S23 includes:
s231, calculating power consumption power according to the reference transmitting power and the current playing power;
and S232, calculating the current available time according to the current residual electric quantity and the power consumption.
In step S231, the present embodiment may calculate the power consumption according to the reference transmission power and the current playing power, by combining any suitable rule.
In some embodiments, the present embodiment may add the reference transmission power and the current playing power, for example, W0 ═ W1+ W2, W0 is power consumption, W1 is reference transmission power, and W2 is current playing power.
The RSSI strength is also affected by the temperature, wind noise and humidity around the audio device (transmitting end), and the designated transmitting power from the receiving end to the transmitting end is also easily affected.
Therefore, in calculating the power consumption, the difference from the above embodiment is that the present embodiment adds the reference transmit power and the current broadcast power to obtain the pending power, and corrects the pending power according to the preset correction coefficient to obtain the power consumption, for example, W0 ═ K (W1+ W2), where W1 is the reference transmit power, W2 is the current broadcast power, W0 is the power consumption, and K is the preset correction coefficient, where K is user-defined according to engineering experience, and K is generally selected between [1 and 2 ]. Therefore, by adopting the method, the current available time length can be reliably and accurately calculated.
In step S232, the present embodiment divides the current remaining capacity by the consumed power to obtain a current available duration, for example, t is Q/W0, t is the current available duration, and Q is the current remaining capacity.
In general, the present embodiment can accurately and reliably calculate the current available duration on the premise that the transmission power is adjusted.
In some embodiments, referring to fig. 4, S22 includes:
s221, determining target historical transmitting power meeting power screening conditions according to the designated transmitting power;
s222, determining reference transmitting power according to the plurality of target historical transmitting powers.
In step S221, the target historical transmission power is the historical transmission power that satisfies the power screening condition, the historical transmission power is the transmission power of the transmission time before the specified transmission power, and the power screening condition may be customized by the user according to engineering experience, for example, the power screening condition is that a difference between two adjacent transmission powers of the transmission time before the specified transmission power is greater than a preset difference, or the power screening condition is that the number of changes of each transmission power in the power set of the preset acquisition duration is greater than or equal to a preset threshold.
In step S222, the present embodiment determines a reference transmit power according to any suitable algorithm, such as a weighting algorithm, a minimum mean square error algorithm, etc., in combination with a plurality of target historical transmit powers.
In some embodiments, referring to fig. 5, S221 includes:
s2211, obtaining a historical power base, wherein the historical power base comprises a plurality of historical transmitting powers;
and S2212, traversing a target power set meeting the power screening condition according to the designated transmitting power and the historical transmitting power, wherein the target power set comprises a plurality of target historical transmitting powers.
In this embodiment, the historical power library is used to store the transmission power generated by the audio device, wherein the historical power library may adopt any form of data structure, such as a ring data structure.
In this embodiment, the target power set includes power sets corresponding to a plurality of target historical transmission powers. It is understood that each power set contains the same amount of transmit power, for example, the historical power library includes 99 transmit powers, and the total power set Z1 of the historical power library is { p1, p2, p3 … …, p98, p99}, where p isiHistorical transmission power p corresponding to ith transmission timei+1Is transmitted later than the historical transmission power piThe time of transmission of (a).
It is defined herein that the transmit power in each power set is acquired for the same acquisition duration. The embodiment may add the designated transmission power as p100 into the total power set Z1 of the historical power library for traversal, and then update the total power set Z1 of the historical power library to obtain an updated total power set Z2 ═ p1, p2, p3 … …, p98, p99, p100 }.
In this embodiment, when a target power set satisfying the power screening condition is traversed in the historical power library according to the specified transmission power, since the transmission power in each power set is acquired according to the same acquisition duration, the following power sets can be obtained:
power set h1 ═ { p100, p99, p98 };
power set h2 ═ { p99, p98, p97, p96 };
power set h3 ═ p98, p97, p96, p95, p94, p93 };
power set h4 ═ p97, p96, p95, p94, p93 };
… …, and the like.
As mentioned above, the acquisition duration of the power sets h1, h2, h3 and h4 are the same, and the transmit power in each power set is different, for example, for the power set h1, p100, p99 and p98 are different transmit powers. For the power set h2, p99, p98, p97, and p96 are all different transmit powers. Here, the reason why the number of power in the power set h1 is 3 and the number of power in the power set h2 is 4 are different is that the number of changes in the transmission power of the power set h1 is relatively small and the number of changes in the transmission power of the power set h2 is relatively large in the same acquisition time period Δ T.
For example, for time points T1 to T2 to T3 to T4, where T1-T3 is T2-T4 is Δ T, when forming the power set h1, the embodiment starts to collect from time point T1 in the historical power base until time point T3, and then a total of three transmit powers, p100, p99, and p98, occur between time point T1 and time point T3, that is, 2 transmit power changes occur between time point T1 and time point T3.
In forming the power set h2, the embodiment collects from time T2 to time T4 in the historical power base. Then, a total of four transmission powers, p99, p98, p97, and p96, occur between the time point T2 and the time point T4, that is, 3 transmission power changes occur between the time point T2 and the time point T4.
The target power set is a power set that satisfies the power screening condition. As described above, according to the historical transmission powers in the power set h1 and the power set h2, it is determined that the power set h1 and the power set h2 do not satisfy the power screening condition, and then neither the power set h1 nor the power set h2 belongs to the target power set. And judging that the power set h3 meets the power screening condition according to the historical transmitting power in the power set h3, and enabling the power set h3 to belong to a target power set.
It is to be understood that, in some embodiments, the number of the target power sets may be multiple, for example, the power set h3, the power set h5, the power set 6, and the power set 100 all satisfy the power screening condition, and the power set h3, the power set h5, the power set 6, and the power set 100 all belong to the target power sets.
It is understood that in some embodiments, the target power set may be a power set far from the designated transmission power and satisfying the power filtering condition, for example, although the power sets h3, h5, 6 and 100 satisfy the power filtering condition, the embodiment searches with the historical transmission power with the earliest transmission time as the starting point in the searching process, that is, searches with the historical transmission power p1 as the starting point.
It will also be appreciated that in some embodiments, the target power set is the set of powers that is closest to the specified transmit power and that satisfies the power screening condition. As described above, since the transmission power of the bluetooth headset is likely to change many times in a short time, the calculation result of the available time duration each time is not accurate or reliable enough, in order to reflect the change of the electric quantity more accurately, in this embodiment, a power set that is closest to the specified transmission power and satisfies the power screening condition may be selected as the target power set, and the change of the target historical transmission power in the target power set may represent the change of the current remaining electric quantity.
In some embodiments, referring to fig. 6, S2212 includes:
s61, taking the appointed transmitting power as a starting point, and searching a reverse sliding window along the time axis of the historical power library according to the preset acquisition duration;
s62, in the reverse sliding window search, judging whether the change times of the transmitting power in each sliding window is larger than or equal to a preset threshold value;
s63, if yes, collecting the transmitting power in the sliding window as the target historical transmitting power to obtain a target power collection;
and S64, if not, carrying out reverse sliding window search according to the sliding window distance.
In step S61, each historical transmit power in the historical power library corresponds to a corresponding transmit time, and the transmit times of all the historical transmit powers are in order from front to back, so as to form a time axis of the historical power library, for example, for the updated total power set Z2 ═ p1, p2, p3 … …, p98, p99, p100}, the historical transmit power p1 corresponds to the transmit time t1, the historical transmit power p2 corresponds to the transmit time t2, the historical transmit power p3 corresponds to the transmit time t3, the designated transmit power p100 corresponds to the transmit time t100, and then the transmit times t1-t2-t3 … … t98-t99-t100 may form a time axis of the historical power library.
In order to search for a target power set capable of reliably and accurately reflecting the change of the current electric quantity, the embodiment uses the designated transmission power as a starting point, and performs reverse sliding window search along the time axis of the historical power base according to the preset acquisition duration, for example, the embodiment uses the designated transmission power p100 as a starting point, and reversely selects p100 corresponding to T100, p99 corresponding to T99, and p98 corresponding to T98 along the time axis of the historical power base to be concentrated in one sliding window, so as to obtain a sliding window r1 ═ p100, p99, p98 }.
In step S62, in the reverse sliding window search, the embodiment determines whether the number of changes of the transmission power within each sliding window is greater than or equal to a preset threshold, where the preset threshold is customized by the user according to engineering experience, for example, for the sliding window r1, the number of changes from p98 to p99 is 1, and the number of changes from p99 to p100 is 1, and thus, the number of changes of the transmission power within the sliding window r1 is 2. Since the preset threshold is 5 and the variation number 2 is smaller than the preset threshold 5, the embodiment performs step S64, that is, performs reverse sliding window search according to the sliding window pitch to obtain the sliding window r2, where the sliding window r2 is { p99, p98, p97, p96 }.
In the present embodiment, the duration of the sliding window interval is customized by the user according to engineering experience, for example, the duration of the sliding window interval is 5 seconds or 5 minutes or 10 minutes, etc.
Since the number of changes in the transmission power in the sliding window r2 is 3, the number of changes in the sliding window r2 is 1 from p96 to p97, 1 from p97 to p98, and 1 from p98 to p 99. Since the preset threshold is 5 and the change number 3 is smaller than the preset threshold 5, the embodiment performs step S64, that is, performs reverse sliding window search according to the sliding window pitch, so as to obtain the sliding window r3, where the sliding window r3 is { p98, p97, p96, p95, p94, p93 }.
Since the number of changes in the transmission power in the sliding window r3 is 1 from p93 to p94, 1 from p94 to p95, 1 from p95 to p96, 1 from p96 to p97, and 1 from p97 to p98, the sliding window r3 has a number of changes of 5. Since the preset threshold is 5 and the number of changes is 5 equal to 5, the embodiment performs step S63, that is, the transmission power in the sliding window r3 is collected as the target historical transmission power to obtain the target power set, that is, the target power set is { p98, p97, p96, p95, p94, p93 }.
In some embodiments, when determining the reference transmission power according to a plurality of target historical transmission powers, the present embodiment may obtain an average transmission power by averaging the plurality of target historical transmission powers, and use the average transmission power as the reference transmission power.
For example, as described above, for the target power set { p98, p97, p96, p95, p94, p93}, the target historical transmit powers are p98, p97, p96, p95, p94, and p93, respectively. The present embodiment calculates the average transmission power according to the following formula:
pa ═ (p98+ p97+ p96+ p95+ p94+ p93)/6, where Pa is the average transmit power, and the average transmit power Pa can be used as the reference transmit power.
In some embodiments, which differ from the above-described embodiments in that the audio device is configured with a transmission power range, the transmission power range may be divided into a plurality of transmission power intervals, as previously described, the transmission power range being 0.001mW to 100mW, and this transmission power range may be divided into 5 transmission power intervals, a first transmission power interval [0.001mW,0.01mW ], a second transmission power interval [0.01mW,0.1mW ], a third transmission power interval [0.1mW,1mW ], a fourth transmission power interval [1mW,10mW ], a fifth transmission power interval [10mW,100mW ], respectively.
In this embodiment, when determining the reference transmission power according to the plurality of target historical transmission powers, please refer to fig. 7, S222 includes:
s2221, determining the number of target historical transmitting powers falling into each transmitting power interval and the total number of all the target historical transmitting powers;
s2222, calculating a weight factor corresponding to each transmitting power interval according to the total number and the number corresponding to each transmitting power interval;
s2223, calculating the reference transmitting power according to the weight factor corresponding to each transmitting power interval and the target historical transmitting power.
In step S2221, for example, for the target power set { p98, p97, p96, p95, p94, p93}, it is assumed that p98 is 80mW, p97 is 50mW, p96 is 6mW, p95 is 0.8mW, p94 is 0.06mW, and p93 is 0.005 mW. The target historical transmit power falling within the first transmit power interval is p93, i.e., the number is 1. The target historical transmit power falling within the second transmit power interval is p94, i.e., the number is 1. The target historical transmit power falling within the third transmit power interval is p95, i.e., the number is 1. The target historical transmit power falling within the fourth transmit power interval is p96, i.e., the number is 1. The target historical transmit powers falling within the fifth transmit power interval are p97 and p98, i.e., the number is 2. The total amount of the total target historical transmit power is 6.
In step S2222, the present embodiment calculates a weighting factor, x, corresponding to each transmission power interval according to the following equationi=si/n,xiFor the weight factor, s, corresponding to the ith transmit power intervaliIs the number corresponding to the ith transmission power interval, and n is the total numberAmount of the compound (A).
For example, the weight factor x 1-1/6 for the first transmit power interval, the weight factor x 2-1/6 for the second transmit power interval, the weight factor x 3-1/6 for the third transmit power interval, the weight factor x 4-1/6 for the fourth transmit power interval, and the weight factor x 5-2/6 for the fifth transmit power interval.
In this embodiment, instead of configuring a fixed weight factor for each weighted value as in the conventional technique, the embodiment can flexibly configure a corresponding weight factor for each transmit power interval according to actual conditions, so that the adaptability and compatibility of this embodiment are stronger.
In step S2223, the present embodiment may calculate the reference transmit power according to the weight factor corresponding to each transmit power interval and the target historical transmit power, by combining any suitable rule.
In some embodiments, the present embodiment calculates a total weighted sum according to the weighting factor corresponding to each transmit power interval and the target historical transmit power, and calculates the reference transmit power according to the total weighted sum and the total amount. For example, the present embodiment calculates the reference transmission power according to the following formula:
Figure BDA0003447249830000131
wherein, W1 is the reference transmission power, xi is the weighting factor corresponding to the ith transmission power interval, pi is the transmission power corresponding to the ith transmission power interval, and n is the total number.
Therefore, W1 ═ x1 × p93+ x2 × 94+ x3 × p95+ x4 × p95+ x6 × p96+ x7 × p97+ x8 × p98 ═ 1/6 × 0.005+1/6 ═ 0.06+1/6 ×. 0.8+1/6 × 6+2/6 + 50+2/6 ═ 44.4775.
Therefore, the reference transmission power W1 is 44.4775mW, and with this method, the transmission power of the bluetooth headset is likely to change many times in a short time, and the reference transmission power that can be used to describe the change of the electric quantity can be reliably and effectively obtained, so that the available time period can be calculated more accurately and reliably.
It should be noted that, in the foregoing embodiments, a certain order does not necessarily exist between the foregoing steps, and those skilled in the art can understand, according to the description of the embodiments of the present invention, that in different embodiments, the foregoing steps may have different execution orders, that is, may be executed in parallel, may also be executed interchangeably, and the like.
Referring to fig. 8, fig. 8 is a schematic circuit structure diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be any suitable type of chip or audio device. As shown in fig. 8, the electronic device 800 includes one or more processors 81 and memory 82. In fig. 8, one processor 81 is taken as an example.
The processor 81 and the memory 82 may be connected by a bus or other means, and fig. 8 illustrates the connection by a bus as an example.
The memory 82, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the available duration calculation method of the audio device in the embodiment of the present invention. The processor 81 implements the functions of the available time period calculation method of the audio device provided by the above-described method embodiments by executing the nonvolatile software program, instructions, and modules stored in the memory 82.
The memory 82 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 82 may optionally include memory located remotely from the processor 81, which may be connected to the processor 81 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in the memory 82 and, when executed by the one or more processors 81, perform the method of calculating a usable time period of an audio device in any of the method embodiments described above.
Embodiments of the present invention further provide a storage medium storing computer-executable instructions, which are executed by one or more processors, for example, one processor 81 in fig. 8, and enable the one or more processors to execute the method for calculating the available duration of the audio device in any of the method embodiments.
An embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by an electronic device, the electronic device is caused to execute the method for calculating the available duration of the audio device.
The above-described embodiments of the apparatus or device are merely illustrative, wherein the unit modules described as separate parts may or may not be physically separate, and the parts displayed as module units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (13)

1. A method for calculating an available duration of an audio device, comprising:
acquiring a power adjustment instruction, current playing power and current remaining capacity, wherein the power adjustment instruction carries specified transmitting power;
determining reference transmitting power according to the appointed transmitting power;
and calculating the current available duration according to the reference transmitting power, the current playing power and the current residual electric quantity.
2. The method of claim 1, wherein determining a reference transmit power based on the specified transmit power comprises:
determining target historical transmitting power meeting power screening conditions according to the designated transmitting power;
and determining reference transmission power according to a plurality of target historical transmission powers.
3. The method of claim 2, wherein determining a target historical transmit power that satisfies a power screening condition based on the specified transmit power comprises:
obtaining a historical power bank, wherein the historical power bank comprises a plurality of historical transmitting powers;
and traversing a target power set meeting a power screening condition according to the designated transmitting power and the historical transmitting power, wherein the target power set comprises a plurality of target historical transmitting powers.
4. The method of claim 3, wherein the target power set is a set of powers that is closest to the specified transmit power and satisfies a power screening condition.
5. The method of claim 3, wherein traversing the target power set satisfying the power screening condition according to the specified transmit power and the historical transmit power comprises:
taking the appointed transmitting power as a starting point, and searching a reverse sliding window along the time axis of the historical power library according to a preset acquisition time length;
in the reverse sliding window search, judging whether the change times of the transmitting power in each sliding window is greater than or equal to a preset threshold value or not;
if so, collecting the transmitting power in the sliding window as target historical transmitting power to obtain a target power collection;
if not, the reverse sliding window searching is carried out according to the sliding window distance.
6. The method of claim 2, wherein determining a reference transmit power based on a plurality of the target historical transmit powers comprises:
and calculating the average value of the plurality of target historical transmitting powers to obtain an average transmitting power, and taking the average transmitting power as a reference transmitting power.
7. The method of claim 2, wherein the audio device is configured with a transmission power range, wherein the transmission power range is divisible into a plurality of transmission power intervals, and wherein determining a reference transmission power from a plurality of the target historical transmission powers comprises:
determining a number of target historical transmit powers falling within each of the transmit power intervals and a total number of total target historical transmit powers;
calculating a weight factor corresponding to each transmitting power interval according to the total number and the number corresponding to each transmitting power interval;
and calculating the reference transmitting power according to the weight factor corresponding to each transmitting power interval and the target historical transmitting power.
8. The method of claim 7, wherein the calculating the reference transmit power according to the weighting factor corresponding to each transmit power interval and the target historical transmit power comprises:
calculating a total weighted sum according to the weight factor corresponding to each transmitting power interval and the target historical transmitting power;
and calculating reference transmitting power according to the total weighted sum and the total amount.
9. The method according to any one of claims 1 to 8, wherein said calculating a current available duration according to said reference transmission power, said current playing power and said current remaining power comprises:
calculating power consumption power according to the reference transmitting power and the current playing power;
and calculating the current available time according to the current residual electric quantity and the power consumption power.
10. The method of claim 9, wherein calculating the power consumption according to the reference transmission power and the current playing power comprises:
adding the reference transmitting power and the current playing power to obtain undetermined power;
and correcting the undetermined power according to a preset correction coefficient to obtain the power consumption.
11. A storage medium storing computer-executable instructions for causing an electronic device to execute the available duration calculation method of an audio device according to any one of claims 1 to 10.
12. A chip, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of calculating a usable time period of an audio device according to any one of claims 1 to 10.
13. An audio device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of calculating a usable time period of an audio device according to any one of claims 1 to 10.
CN202111660047.7A 2021-12-30 2021-12-30 Available duration calculation method and chip of audio equipment and audio equipment Pending CN114302311A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111660047.7A CN114302311A (en) 2021-12-30 2021-12-30 Available duration calculation method and chip of audio equipment and audio equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111660047.7A CN114302311A (en) 2021-12-30 2021-12-30 Available duration calculation method and chip of audio equipment and audio equipment

Publications (1)

Publication Number Publication Date
CN114302311A true CN114302311A (en) 2022-04-08

Family

ID=80972650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111660047.7A Pending CN114302311A (en) 2021-12-30 2021-12-30 Available duration calculation method and chip of audio equipment and audio equipment

Country Status (1)

Country Link
CN (1) CN114302311A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1378816A1 (en) * 2002-07-01 2004-01-07 Sony Ericsson Mobile Communications AB System and method for power consumption management
JP2006025275A (en) * 2004-07-09 2006-01-26 Sanyo Electric Co Ltd Available time length detection circuit for mobile phone and available time length calculation method for mobile phone
CN102316567A (en) * 2011-08-02 2012-01-11 京信通信系统(中国)有限公司 Digital automatic gain control method and system thereof
US20150338469A1 (en) * 2014-05-20 2015-11-26 Samsung Electronics Co., Ltd. Method for managing battery of electronic device and electronic device performing the same
CN111031599A (en) * 2018-10-10 2020-04-17 维沃移动通信有限公司 Indication method, terminal and network side equipment for uplink transmission
CN112308354A (en) * 2019-07-31 2021-02-02 中兴通讯股份有限公司 System overload control method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1378816A1 (en) * 2002-07-01 2004-01-07 Sony Ericsson Mobile Communications AB System and method for power consumption management
JP2006025275A (en) * 2004-07-09 2006-01-26 Sanyo Electric Co Ltd Available time length detection circuit for mobile phone and available time length calculation method for mobile phone
CN102316567A (en) * 2011-08-02 2012-01-11 京信通信系统(中国)有限公司 Digital automatic gain control method and system thereof
US20150338469A1 (en) * 2014-05-20 2015-11-26 Samsung Electronics Co., Ltd. Method for managing battery of electronic device and electronic device performing the same
CN111031599A (en) * 2018-10-10 2020-04-17 维沃移动通信有限公司 Indication method, terminal and network side equipment for uplink transmission
CN112308354A (en) * 2019-07-31 2021-02-02 中兴通讯股份有限公司 System overload control method and device

Similar Documents

Publication Publication Date Title
US9338739B2 (en) Method and device for selecting network on which multimode terminal is to reside and multimode terminal
CA2997424C (en) Determining network rank for communication to neighboring nodes
US20100203862A1 (en) Method and a system for controlling and tracking radiation emitted from mobile phones
US20150084778A1 (en) System and method to estimate duration of battery (dis)charging of an electronic device and provide smart charging alerts based on device usage pattern
CN104584637A (en) Measurement-based network selection
US20130046732A1 (en) Data synchronization management methods and systems
CN106973431B (en) Transmission power adjusting method and terminal
CN105225681A (en) Speech playing method and system
US20210410036A1 (en) Network optimization method based on wearable device and wearable device
CN106714291B (en) ZigBee-based signal power automatic adjusting method
CN108848558A (en) A kind of SWIPT system self-adaption time slot signal method of reseptance collected based on nonlinear energy
CN111050387B (en) Base station dormancy method and device based on energy efficiency estimation, electronic equipment and medium
CN111510905A (en) Method for adaptively adjusting sound size of player based on user distance
US20220221924A1 (en) Prioritized Usage of Devices
CN114302311A (en) Available duration calculation method and chip of audio equipment and audio equipment
WO2017109919A1 (en) Electronic device, wbgt determination method, and wbgt determination program
JP2019115036A (en) Transceiver device with real-time clock
CN103327504A (en) Decision-making method of spectrum sensing interval in cognitive radio network
Deng et al. Energy management of WSN-based charge measurement system of ultra high-voltage direct-current transmission line
CN104956738A (en) A method of minimizing power consumption during operation of a battery operated mobile wireless information device
US10171282B1 (en) Dynamic optimization of amplitude weights
CN110785945A (en) Method and related device for reporting channel state information
CN112291711A (en) Terminal and positioning method and positioning device thereof
CN108337068B (en) Data communication and related products
CN111225361A (en) Wireless edge cooperative modulation method and device

Legal Events

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