Cache capacity determination method, device, bluetooth playback device and storage medium

By obtaining the target code rate and level sent by the terminal device, the cache capacity of audio data is determined directly when the Bluetooth playback device is connected to the terminal device, solving the problems of high testing resource consumption and lagging cache capacity adjustment in the prior art, and achieving more efficient and accurate cache capacity determination.

CN115243322BActive Publication Date: 2025-03-21GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110444022.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2025-03-21
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

When determining the cache capacity, existing Bluetooth playback devices need to conduct a lot of tests, resulting in high consumption of test resources and lagging in adjustment of cache capacity, affecting the delay and anti-interference of audio data transmission.

Method used

By obtaining the target code rate sent by the terminal device, the target code rate level is determined, and the target cache capacity is determined based on this level, and the cache capacity of the audio data is determined directly when the Bluetooth playback device is connected to the terminal device.

Benefits of technology

It reduces the consumption of test resources, improves the accuracy and efficiency of cache capacity determination, reduces the lag of cache capacity adjustment, and takes into account the delay and anti-interference of audio data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115243322B_ABST
    Figure CN115243322B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of computer technology, and specifically, relates to a cache capacity determination method, apparatus, Bluetooth playback device and storage medium. Among them, a cache capacity determination method is applied to a Bluetooth playback device, including: obtaining a target bit rate sent by a terminal device, the target bit rate being the bit rate for audio data transmission negotiated when the Bluetooth playback device is currently connected to the terminal device; obtaining a target bit rate level corresponding to the target bit rate; based on the target bit rate level, determining a target cache capacity, the target cache capacity being the cache capacity of audio data when the Bluetooth playback device is currently connected to the terminal device. The use of this application can improve the accuracy and efficiency of cache capacity determination while reducing test resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and specifically relates to a cache capacity determination method, device, Bluetooth playback device and storage medium. Background Art

[0002] With the development of science and technology, communication technology has also developed rapidly, making the popularity of Bluetooth playback devices increasingly high. The terminal device can connect to the Bluetooth playback device when receiving a connection instruction from the Bluetooth playback device. When the Bluetooth playback device and the terminal device are connected, the Bluetooth playback device can receive the audio data transmitted by the terminal device and play the audio data to facilitate the user's use. Summary of the invention

[0003] The embodiment of the present application provides a method and apparatus for determining cache capacity, a Bluetooth playback device, and a storage medium, which can reduce the consumption of test resources while improving the accuracy and efficiency of determining cache capacity. The technical solution of the embodiment of the present application is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for determining cache capacity, which is applied to a Bluetooth playback device, and the method includes:

[0005] Acquire a target bit rate sent by the terminal device, where the target bit rate is a bit rate for audio data transmission negotiated when the Bluetooth playback device is currently connected to the terminal device;

[0006] Obtaining a target bit rate level corresponding to the target bit rate;

[0007] Based on the target bit rate level, a target cache capacity is determined, where the target cache capacity is the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device.

[0008] In a second aspect, an embodiment of the present application provides a cache capacity determination device, the device comprising:

[0009] A bit rate acquisition unit, used to acquire a target bit rate sent by a terminal device, wherein the target bit rate is a bit rate for audio data transmission negotiated when the Bluetooth playback device is currently connected to the terminal device;

[0010] A level acquisition unit, used to acquire a target bit rate level corresponding to the target bit rate;

[0011] The cache capacity determination unit is used to determine the target cache capacity based on the target bit rate level, and the target cache capacity is the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device.

[0012] In a third aspect, a Bluetooth playback device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the methods described in the first aspect when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements any of the methods described above when executed by a processor.

[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0015] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0016] In one or more embodiments of the present application, by obtaining the target bit rate sent by the terminal device, the target bit rate level corresponding to the target bit rate can be obtained, and the target cache capacity can be determined based on the target bit rate level. That is, the Bluetooth playback device can directly determine the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device based on the target bit rate sent by the terminal device. There is no need to perform a large number of tests to determine the fixed cache capacity, thereby reducing the situation where the test resource consumption is high. At the same time, there is no need to identify the transmission situation after each audio data is played, which can reduce the lag of the cache capacity adjustment. The delay and anti-interference performance in the audio data transmission process can be taken into account, thereby reducing the accuracy and efficiency of the cache capacity determination while reducing the test resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A background schematic diagram showing a cache capacity determination method applied to an embodiment of the present application;

[0019] Figure 2 A background schematic diagram showing a method for determining a bit rate applied to an embodiment of the present application;

[0020] Figure 3A system architecture diagram showing a cache capacity determination method applied to an embodiment of the present application;

[0021] Figure 4 A schematic diagram showing a flow chart of a method for determining cache capacity according to an embodiment of the present application;

[0022] Figure 5 A schematic diagram showing a flow chart of a method for determining cache capacity according to an embodiment of the present application;

[0023] Figure 6 An example schematic diagram showing a Bluetooth playback device storing sampling parameters according to an embodiment of the present application is shown;

[0024] Figure 7 An example schematic diagram showing a terminal interface according to an embodiment of the present application is shown;

[0025] Figure 8 An example schematic diagram showing an interface of a Bluetooth playback device according to an embodiment of the present application;

[0026] Fig. 9 A schematic diagram showing the structure of a cache capacity determination device according to an embodiment of the present application is shown;

[0027] Fig.10 A schematic diagram showing the structure of a cache capacity determination device according to an embodiment of the present application is shown;

[0028] Fig.11 A schematic diagram showing the structure of a cache capacity determination device according to an embodiment of the present application is shown;

[0029] Fig.12 A schematic structural diagram of a Bluetooth playback device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0032] With the development of science and technology, there are more and more types of terminal devices, and the application functions that terminal devices can support are also increasing. Figure 1 A background diagram of a cache capacity determination method applied to an embodiment of the present application is shown. The terminal device may support Bluetooth function. For example, the terminal device may use the Bluetooth function to send audio data to a Bluetooth playback device so that the Bluetooth playback device can play the audio data, thereby improving the convenience of audio data playback and enhancing the user experience. Figure 1 As shown, a fixed buffer capacity is set in the Bluetooth playback device. The Bluetooth playback device may be, for example, a Bluetooth watch. After the Bluetooth playback device establishes a connection with the terminal device, the Bluetooth playback device may cache the received audio data to a buffer area corresponding to the fixed buffer capacity when receiving the audio data sent by the terminal. When the Bluetooth playback device detects that the audio data cached in the buffer area is cached, the Bluetooth playback device may output the audio data.

[0033] It is easy to understand that when a Bluetooth playback device sets a fixed buffer capacity, when the fixed buffer capacity is large, the playback delay of the audio data is relatively high. When the fixed buffer capacity is small, the transmission stability of the audio data is poor. Therefore, users need to conduct a large number of tests to determine the fixed buffer capacity so that the fixed buffer capacity can take into account both the playback delay and transmission stability of the audio data, resulting in high consumption of test resources.

[0034] According to some embodiments, Figure 2 A background diagram of a cache capacity determination method applied to an embodiment of the present application is shown. Figure 2As shown, the Bluetooth playback device can adjust the cache capacity range based on the transmission environment after the audio data is played. When the Bluetooth playback device determines that the current transmission environment of the audio data does not meet the preset environment requirements, the Bluetooth playback device can increase the buffering amount of the audio data and cache more audio data to improve the stability of the audio data transmission. For example, when the transmission of audio data from the Bluetooth playback device to the device is unstable, the cached data can be increased to improve the stability of the audio data transmission. For example, when the Bluetooth playback device is in a scene of electromagnetic interference or a long distance, when the Bluetooth playback device determines that the current transmission environment of the audio data meets the preset environment requirements, the terminal device can reduce the buffering amount of the audio data, reduce the playback delay of the audio data, and improve the user's sound quality experience. For example, when the Bluetooth playback device is in a scene of non-electromagnetic interference or a short distance, when the Bluetooth playback device detects that the audio data transmission is relatively stable, the cached data can be reduced, which can provide a better delay experience. When the Bluetooth playback device adjusts the cache capacity based on the current transmission environment, the specific capacity value of the cache capacity cannot be determined, and the transmission situation is only identified after each audio data is played, and a large amount of data cannot be analyzed, resulting in a relatively delayed adjustment of the cache capacity, which makes the accuracy and efficiency of the cache capacity determination low.

[0035] According to some embodiments, Figure 3 A system architecture diagram of a cache capacity determination method applied to an embodiment of the present application is shown. Figure 3 As shown, the execution subject of the embodiment of the present application is a Bluetooth playback device. The Bluetooth playback device includes but is not limited to a Bluetooth module, a Bluetooth headset, a Bluetooth car, a Bluetooth MP3 player (Moving Picture Experts Group Audio Layer-3), etc. The Bluetooth playback device includes a speaker. The terminal device refers to a device that transmits audio data with the Bluetooth playback device. The terminal device can be a terminal device with Bluetooth function, and the terminal device includes but is not limited to: a wearable device, a handheld device, a personal computer, a tablet computer, a car device, a smart phone, a computing device or other processing devices connected to a wireless modem, etc. The cache capacity determination device in different networks can be called different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), fifth generation mobile communication technology (5th generation mobile networks, 5G) network or future evolution network in the cache capacity determination device, etc.

[0036] According to some embodiments, the Bluetooth playback device can be connected to the terminal device via a network. The network is used to provide a communication link between the Bluetooth playback device and the terminal device. The network can include various connection types, such as a wireless communication link, etc. It should be understood that Figure 3 The number of Bluetooth playback devices, networks, and terminal devices in the description is only illustrative. According to actual needs, there can be any number of Bluetooth playback devices, networks, and terminal devices. For example, the terminal device can be multiple terminal devices, and the Bluetooth playback device can select one of the terminal devices for connection so as to receive audio data sent by the terminal device and play the audio data.

[0037] The present application is described in detail below with reference to specific embodiments.

[0038] In one embodiment, Figure 4 As shown, a method for determining cache capacity is proposed, which can be implemented by a computer program and can be run on a Bluetooth playback device with an audio playback function. The computer program can be integrated into an application or run as an independent tool application.

[0039] Specifically, the cache capacity determination method includes:

[0040] S101, obtaining a target bit rate sent by a terminal device;

[0041] According to some embodiments, the execution subject of the embodiments of the present application is a Bluetooth playback device. Audio data refers to audio data transmitted from the terminal device to the Bluetooth playback device when the Bluetooth playback device is connected to the terminal device. When the Bluetooth playback device receives the audio data, the Bluetooth playback device can play the audio data. The audio data does not specifically refer to a fixed audio data. For example, each time the terminal device is connected to the Bluetooth playback device, the terminal device can send audio data corresponding to the audio playback instruction to the Bluetooth playback device based on the audio playback instruction obtained from the user. The audio playback instruction includes but is not limited to voice audio playback instructions, click audio playback instructions, and timed audio playback instructions.

[0042] It is easy to understand that audio data transmission is used to indicate that when a terminal device is connected to a Bluetooth playback device, the Bluetooth playback device receives audio data transmitted by the terminal device and plays the audio data. The audio data transmission may include multiple audio data transmission processes. An audio data transmission process may refer to a transmission process of an audio file, or may refer to a process of transmitting at least one audio file when the terminal device and the Bluetooth playback device are connected once. The embodiments of the present application are not limited to this.

[0043] Optionally, the bit rate refers to the number of bits transmitted per second during the audio data transmission process. The target bit rate is the bit rate for audio data transmission negotiated when the Bluetooth playback device and the terminal device are currently connected, that is, when the Bluetooth playback device and the terminal device are currently connected, the terminal device can negotiate the bit rate with the Bluetooth playback device, and determine the negotiated bit rate as the target bit rate. When the terminal device and the Bluetooth playback device negotiate and obtain the target bit rate when they are connected for the first time, the terminal device can send the target bit rate to the Bluetooth playback device. When the Bluetooth playback device detects that the terminal device has reached the target bit rate, the Bluetooth playback device can obtain the target bit rate sent by the terminal device.

[0044] According to some embodiments, the target bit rate does not specifically refer to a fixed bit rate. When the transmission environment of the current connection changes, the target bit rate will also change accordingly. When the terminal device changes, the target bit rate will also change accordingly.

[0045] S102, obtaining a target bit rate level corresponding to the target bit rate;

[0046] According to some embodiments, the target bit rate level refers to the bit rate level corresponding to the target bit rate. The target bit rate level does not specifically refer to a fixed level. When the target bit rate changes, the target bit rate level will also change accordingly. When the mapping relationship between the target bit rate and the bit rate level changes, the target bit rate level will also change accordingly.

[0047] It is easy to understand that when the terminal device and the Bluetooth playback device negotiate to obtain the target bit rate when they are connected for the first time, the terminal device can send the target bit rate to the Bluetooth playback device. When the Bluetooth playback device detects that the terminal device has a target bit rate, the Bluetooth playback device can obtain the target bit rate sent by the terminal device. When the Bluetooth playback device obtains the target bit rate, the Bluetooth playback device can obtain the target bit rate level corresponding to the target bit rate. The target bit rate obtained by the Bluetooth playback device can be, for example, 334Kbps, and the target bit rate level corresponding to the target bit rate obtained by the Bluetooth playback device can be, for example, the third bit rate level.

[0048] S103: Determine a target cache capacity based on the target bit rate level.

[0049] According to some embodiments, the cache capacity is used to represent the cache capacity of audio data when the Bluetooth playback device is connected to the terminal device. The cache area corresponding to the cache capacity is used to cache the audio data received by the Bluetooth playback device. The size of the cache capacity will affect the amount of cached audio data. The larger the cache capacity, the more audio data can be cached by the Bluetooth playback device.

[0050] It is easy to understand that the target cache capacity is the cache capacity of audio data when the Bluetooth playback device is currently connected to the terminal device. The target cache capacity does not specifically refer to a fixed cache capacity. When the target bit rate received by the Bluetooth playback device changes, the target bit rate level will also change accordingly, and the target cache capacity will also change accordingly.

[0051] Optionally, when the terminal device and the Bluetooth playback device negotiate to obtain a target bit rate when they are connected for the first time, the terminal device may send the target bit rate to the Bluetooth playback device. When the Bluetooth playback device detects that the terminal device has a target bit rate, the Bluetooth playback device may obtain the target bit rate sent by the terminal device. When the Bluetooth playback device obtains the target bit rate, the Bluetooth playback device may obtain a target bit rate level corresponding to the target bit rate. When the Bluetooth playback device obtains the target bit rate level, the Bluetooth playback device may determine a target cache capacity based on the target bit rate level. When the Bluetooth playback device determines the target cache capacity based on the target bit rate level, the Bluetooth playback device may, for example, directly obtain the cache capacity corresponding to the target bit rate level in the capacity mapping information, and use the cache capacity as the target cache capacity.

[0052] According to some embodiments, the target bit rate obtained by the Bluetooth playback device may be, for example, 128 Kbps, and the target bit rate level corresponding to the target bit rate obtained by the Bluetooth playback device may be, for example, the third bit rate level. The target cache capacity obtained by the Bluetooth playback device based on the third bit rate level may be, for example, 10 Mb.

[0053] In one or more embodiments of the present application, by obtaining the target bit rate sent by the terminal device, the target bit rate level corresponding to the target bit rate can be obtained, and the target cache capacity can be determined based on the target bit rate level, that is, the Bluetooth playback device can directly determine the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device based on the target bit rate sent by the terminal device, without the need to perform a large number of tests to determine the fixed cache capacity, reducing the situation where the test resource consumption is high, and can reduce the test resource consumption. At the same time, there is no need to identify the transmission situation after each audio data playback, which can reduce the lag of the adjustment of the cache capacity, and can take into account the delay and anti-interference in the audio data transmission process, while reducing the test resource consumption. Improve the accuracy and efficiency of the cache capacity determination. Secondly, when the terminal device changes, the Bluetooth playback device can redetermine the target cache capacity, and can take into account the stability when using different bit rates when connecting to different terminal devices.

[0054] See also Figure 5 , which is a flow chart of a method for determining cache capacity according to an embodiment of the present application. Figure 5As shown, the embodiment of the present invention jointly describes the specific process of the cache capacity determination method from the terminal device side and the Bluetooth playback device side. It should be noted that the method of the embodiment of the present invention can be specifically applied to the scenario of cache capacity determination. The method includes the following S201-S208.

[0055] S201, the Bluetooth playback device obtains the stability parameter corresponding to the last audio data transmission process;

[0056] According to some embodiments, the stability parameter refers to a parameter used to characterize the stability of audio data transmission during the current audio data transmission process. The stability parameter corresponds to the audio data transmission process one by one. The stability parameter does not specifically refer to a fixed parameter. When the audio data transmission changes, the stability parameter corresponding to the audio data transmission will also change accordingly.

[0057] According to some embodiments, before the Bluetooth playback device and the terminal device are currently connected, the Bluetooth playback device can obtain the stability parameter of the last audio data transmission process. For example, before the A Bluetooth playback device is currently connected to the B terminal device, the A Bluetooth playback device can obtain the audio data of the last transmission process with the B terminal device, and obtain the stability parameter of the last audio data transmission process. The stability parameter can be, for example, the a1 stability parameter.

[0058] S202, the Bluetooth playback device determines an initial bit rate based on a stability parameter;

[0059] According to some embodiments, the initial bit rate refers to the stability parameter determined by the Bluetooth playback device based on the last audio data transmission process. The initial bit rate does not specifically refer to a fixed bit rate. When the parameter information in the last audio data transmission process changes, the initial bit rate will also change accordingly. The initial bit rate can be a bit rate value or a bit rate range.

[0060] It is easy to understand that when the Bluetooth playback device obtains the stability parameter corresponding to the last audio data transmission process, the Bluetooth playback device can determine the initial bit rate based on the stability parameter. For example, when the Bluetooth playback device obtains the stability parameter corresponding to the last audio data transmission process, the Bluetooth playback device can obtain the bit rate corresponding to the stability parameter in the parameter mapping information, and determine the bit rate as the initial bit rate.

[0061] Optionally, before the Bluetooth playback device determines the initial bit rate based on the stability parameter, the Bluetooth playback device may obtain the stability parameter and the bit rate corresponding to the stability parameter, and store the stability parameter and the bit rate corresponding to the stability parameter in association with the parameter mapping information.

[0062] S203, the Bluetooth playback device sends an initial bit rate to the terminal device;

[0063] According to some embodiments, when the Bluetooth playback device determines the initial bit rate based on the stability parameter, the Bluetooth playback device may send the initial bit rate to the terminal device. The terminal device may be, for example, a smart phone. The Bluetooth playback device may be, for example, a Bluetooth headset. The Bluetooth headset may be, for example, a true wireless stereo headset (True Wireless Stereo, TWS). The left and right earphones of the TWS headset are independent of each other and do not require a cable to be connected, thereby achieving wireless separation of the left and right channels. When the Bluetooth headset determines that the initial bit rate is 330Kbps based on the stability parameter, the Bluetooth headset may send the initial bit rate of 330Kbps to the smartphone.

[0064] S204, the terminal device determines a target bit rate based on the initial bit rate;

[0065] According to some embodiments, when the terminal device receives the initial bit rate sent by the Bluetooth playback device, the terminal device may determine the target bit rate based on the initial bit rate. When the terminal device determines the target bit rate based on the initial bit rate, the terminal device may determine the target bit rate based on the bit rate supported by itself and the initial bit rate. The terminal device may also determine the target bit rate based on the transmission environment and the initial bit rate.

[0066] It is easy to understand that when the Bluetooth headset determines that the initial bit rate is 330Kbps based on the stability parameter, the Bluetooth headset can send the initial bit rate 330Kbps to the smartphone. When the smartphone receives the initial bit rate, the target bit rate determined by the smartphone based on the transmission environment can be, for example, 334Kbps.

[0067] S205, the terminal device sends the target bit rate to the Bluetooth playback device;

[0068] According to some embodiments, after the terminal device determines the target bit rate based on the initial bit rate, the terminal device can send the target bit rate to the Bluetooth playback device. For example, when the Bluetooth headset determines that the initial bit rate is 330Kbps based on the stability parameter, the Bluetooth headset can send the initial bit rate of 330Kbps to the smartphone. When the smartphone receives the initial bit rate, the target bit rate determined by the smartphone based on the transmission environment can be, for example, 334Kbps. The smartphone can send the target bit rate of 334Kbps to the Bluetooth headset.

[0069] S206, the Bluetooth playback device obtains the target bit rate sent by the terminal device;

[0070] The specific process is as described above and will not be repeated here.

[0071] It is easy to understand that when the Bluetooth headset determines that the initial bit rate is 330Kbps based on the stability parameter, the Bluetooth headset can send the initial bit rate of 330Kbps to the smartphone. When the smartphone receives the initial bit rate, the target bit rate determined by the smartphone based on the transmission environment may be, for example, 334Kbps. The smartphone can send the target bit rate of 334Kbps to the Bluetooth headset. When the Bluetooth headset detects the target bit rate of 334Kbps sent by the smartphone, the Bluetooth headset can obtain the target bit rate of 334Kbps sent by the smartphone.

[0072] S207, the Bluetooth playback device obtains a target bit rate level corresponding to the target bit rate;

[0073] The specific process is as described above and will not be repeated here.

[0074] It is easy to understand that when the Bluetooth headset detects the target bit rate 334Kbps sent by the smartphone, the Bluetooth headset can obtain the target bit rate 334Kbps sent by the smartphone. When the target bit rate obtained by the Bluetooth headset is 334Kbps, the target bit rate level corresponding to the target bit rate obtained by the Bluetooth headset can be, for example, the third bit rate level.

[0075] S208: The Bluetooth playback device determines a target buffer capacity based on the target bit rate level.

[0076] The specific process is as described above and will not be repeated here.

[0077] According to some embodiments, when the target bit rate obtained by the Bluetooth headset is 334 Kbps, the target bit rate level corresponding to the target bit rate obtained by the Bluetooth headset may be, for example, the third bit rate level. The target buffer capacity obtained by the Bluetooth headset based on the third bit rate level may be, for example, 10 Mb.

[0078] In one or more embodiments of the present application, a target bit rate sent by a terminal device can be obtained through a Bluetooth playback device, and the Bluetooth playback device can obtain a target bit rate level corresponding to the target bit rate. The Bluetooth playback device determines the target cache capacity based on the target bit rate level, that is, the Bluetooth playback device can directly determine the cache capacity of audio data when the Bluetooth playback device and the terminal device are currently connected based on the target bit rate sent by the terminal device, without performing a large number of tests to determine a fixed cache capacity, thereby reducing the situation where test resource consumption is high, and reducing test resource consumption. At the same time, there is no need to identify the transmission situation after each audio data is played, which can reduce the lag in adjusting the cache capacity, and can improve the accuracy and efficiency of cache capacity determination while reducing test resource consumption.

[0079] See also Figure 6 , is a flow chart of a method for determining cache capacity according to an embodiment of the present application. Figure 6 As shown, the embodiment of the present invention describes the specific process of the method for determining the buffer capacity from the Bluetooth playback device side, and the method includes the following S301-S307.

[0080] S301, obtaining a stability parameter corresponding to the last audio data transmission process;

[0081] According to some embodiments, the last audio data transmission process is the process of audio data transmission when the Bluetooth playback device is connected to the terminal device. The stability parameter refers to a parameter used to characterize the stability of audio data transmission in the current audio data transmission process. Among them, the stability parameter corresponds to the audio data transmission process one by one. The stability parameter does not specifically refer to a fixed parameter. When the audio data transmission changes, the stability parameter corresponding to the audio data transmission will also change accordingly.

[0082] It is easy to understand that before the Bluetooth playback device establishes the current connection with the terminal device, the Bluetooth playback device can obtain the stability parameters corresponding to the last audio data transmission process, that is, the Bluetooth playback device can obtain the stability parameters corresponding to the audio data transmission process when it was last connected to the terminal device.

[0083] According to some embodiments, when the Bluetooth playback device obtains the stability parameter corresponding to the last audio data transmission process, the Bluetooth playback device can obtain parameter information within several unit time lengths during the last audio data transmission process. The parameter information includes at least one of the number of playback freezes, the signal strength value, the transmission interval duration of the audio data packet, and the retransmission rate of the audio data packet. The Bluetooth playback device can obtain several sampling parameters corresponding to several unit time lengths based on the parameter information within several unit time lengths and the weight coefficient corresponding to the parameter information, and calculate the stability parameter corresponding to the last audio data transmission process based on the several sampling parameters.

[0084] It is easy to understand that the unit duration refers to a certain quantitative duration for parameter information acquisition, and the unit duration does not specifically refer to a fixed duration. The unit duration can be set according to the duration setting instruction. The duration setting instruction includes but is not limited to a voice duration setting instruction, a click duration setting instruction, and a text duration setting instruction, etc. The unit duration is the duration included in the audio data transmission duration. Several refers to the number of unit durations included in the current audio data transmission process.

[0085] Optionally, the number of playback freezes refers to the number of times the audio data freezes within a unit time length when the Bluetooth playback device receives the audio data transmitted by the terminal device and plays the audio data during the last audio data transmission. The information strength value refers to the strength value when the Bluetooth playback device receives the audio data transmitted by the terminal device during the last audio data transmission. The transmission interval duration of an audio data packet refers to the transmission interval duration of two adjacent audio data packets within a unit time length during the last audio data transmission. For example, the interval duration of an audio data packet can be the duration between the transmission time point of the first audio data packet and the transmission time point of the second audio data packet. The transmission interval duration of the audio data packet can be the mean of the transmission interval duration of the audio data packets, or it can be the median of the transmission interval duration of the audio data packets, etc. The retransmission rate of an audio data packet refers to the probability that the retransmitted audio data packet accounts for all the transmitted audio data packets during the last audio data transmission.

[0086] According to some embodiments, the weight coefficient refers to a weight coefficient corresponding to the parameter information, and different parameter information corresponds to different weight coefficients. The weight coefficient may be set according to a coefficient setting instruction, and may also be adjusted according to a coefficient adjustment instruction.

[0087] It is easy to understand that several sampling parameters refer to sampling parameters corresponding to several unit durations, that is, one unit duration corresponds to one sampling parameter. The sampling parameter does not specifically refer to a fixed sampling parameter. When the parameter information obtained by the Bluetooth playback device changes or the weight coefficient corresponding to the parameter information changes within the unit duration, the sampling parameter will also change accordingly.

[0088] Optionally, the several unit time lengths may be, for example, Q1 unit time length, Q2 unit time length, Q3 unit time length, and Q4 unit time length. For example, when the parameter information within the several unit time lengths acquired by the Bluetooth playback device includes the number of playback freezes, the signal strength value, and the transmission interval duration of the audio data packet, the Bluetooth playback device may obtain the sampling parameters corresponding to the several unit time lengths according to formula (1).

[0089] S=K1N+K2(RR I )+K3(II V ) 2 (1)

[0090] Among them, S is the sampling parameter;

[0091] K1 is the weight coefficient corresponding to the number of playback freezes;

[0092] N is the number of playback freezes per unit time;

[0093] K2 is the weight coefficient corresponding to the signal strength value;

[0094] R is the signal strength value corresponding to the unit time length;

[0095] R i is the standard value of signal strength;

[0096] K3 is the weight coefficient corresponding to the transmission interval of the audio data packet;

[0097] I is the transmission interval duration of the audio data packet corresponding to the unit duration;

[0098] I v It is the average value of the transmission interval duration of the audio data packets corresponding to the unit duration.

[0099] According to some embodiments, Figure 6 FIG. 1 is a schematic diagram showing an example of storing sampling parameters of a Bluetooth playback device according to an embodiment of the present application. Figure 6 As shown, when the Bluetooth playback device obtains the q1 sampling parameter corresponding to the Q1 unit duration, the q2 sampling parameter corresponding to the Q2 unit duration, the q3 sampling parameter corresponding to the Q3 unit duration, and the q4 sampling parameter corresponding to the Q4 unit duration, the Bluetooth playback device can calculate the average sampling parameter of the q1 sampling parameter corresponding to the Q1 unit duration, the q2 sampling parameter corresponding to the Q2 unit duration, the q3 sampling parameter corresponding to the Q3 unit duration, and the q4 sampling parameter corresponding to the Q4 unit duration, which can be, for example, the q5 sampling parameter. The Bluetooth playback device can set the q5 sampling parameter as the stability parameter during the last audio data transmission process.

[0100] It is easy to understand that, for example, when the parameter information obtained by the Bluetooth playback device within several unit time lengths includes the number of playback freezes, the signal strength value, the transmission interval duration of the audio data packet and the retransmission rate of the audio data packet, the Bluetooth playback device can obtain the sampling parameters corresponding to the several unit time lengths according to formula (2).

[0101] S=K1N+K2(RR I )+K3(II V ) 2 +K4A (2)

[0102] Among them, S is the sampling parameter;

[0103] K1 is the weight coefficient corresponding to the number of playback freezes;

[0104] N is the number of playback freezes per unit time;

[0105] K2 is the weight coefficient corresponding to the signal strength value;

[0106] R is the signal strength value corresponding to the unit time length;

[0107] Ri is the standard value of signal strength;

[0108] K3 is the weight coefficient corresponding to the transmission interval of the audio data packet;

[0109] I is the transmission interval duration of the audio data packet corresponding to the unit duration;

[0110] I v is the average value of the transmission interval duration of the audio data packets corresponding to the unit duration;

[0111] K4 is the weight coefficient corresponding to the retransmission rate of the audio data packet;

[0112] A is the retransmission rate of the audio data packet corresponding to the unit time length.

[0113] According to some embodiments, when the Bluetooth playback device calculates the stability parameters corresponding to the last audio data transmission process based on a number of sampling parameters, the Bluetooth playback device can filter the several sampling parameters according to a preset method to obtain the filtered sampling parameters. The preset method includes but is not limited to a sampling parameter quantity threshold, a sampling parameter value threshold, etc. When the Bluetooth playback device obtains the filtered sampling parameters, the Bluetooth playback device can calculate the average sampling parameters of the filtered sampling parameters, and use the average sampling parameters as the stability parameters in the current audio data transmission process. The screening of sampling parameters by the Bluetooth playback device can reduce the impact of abnormal sampling parameters on stability parameters, improve the accuracy of stability parameters, and further improve the accuracy of bit rate determination.

[0114] Optionally, when the Bluetooth playback device calculates the average sampling parameter of the filtered sampling parameters, the average sampling parameter includes but is not limited to arithmetic mean sampling parameter, geometric mean sampling parameter, square mean sampling parameter, harmonic mean sampling parameter, weighted mean sampling parameter, etc.

[0115] It is easy to understand that when the Bluetooth playback device calculates the average sampling parameter of the filtered sampling parameters as the arithmetic average sampling parameter, the Bluetooth playback device can calculate the sum of the filtered sampling parameters and obtain the parameter number of the filtered sampling parameters. The Bluetooth playback device can divide the sum of the filtered sampling parameters by the parameter number of the filtered sampling parameters to obtain the arithmetic average sampling parameter.

[0116] It is easy to understand that when the Bluetooth playback device obtains the sampling parameters within 15 unit time lengths, the Bluetooth playback device can sort the sampling parameters within the 15 unit time lengths. For example, the Bluetooth playback device can sort the sampling parameters within the 15 unit time lengths in order from small to large parameter values, and filter out a preset number of 5 sampling parameters to obtain the filtered sampling parameters, that is, the terminal can obtain 10 sampling parameters. The Bluetooth playback device can calculate the average sampling parameter of the 10 filtered sampling parameters, and use the average sampling parameter as the stability parameter in the current audio data transmission process.

[0117] S302, determining an initial bit rate based on the stability parameter, and sending the initial bit rate to the terminal device, where the initial bit rate is used to instruct the terminal device to determine a target bit rate based on the initial bit rate;

[0118] According to some embodiments, the initial bit rate refers to the stability parameter determined by the Bluetooth playback device based on the last audio data transmission process. When the Bluetooth playback device obtains the stability parameter corresponding to the last audio data transmission process, the Bluetooth playback device can determine the initial bit rate based on the stability parameter. For example, when the Bluetooth playback device obtains the stability parameter corresponding to the last audio data transmission process, the Bluetooth playback device can obtain the bit rate corresponding to the stability parameter in the parameter mapping information, and determine the bit rate as the initial bit rate.

[0119] It is easy to understand that when the Bluetooth playback device determines the initial bit rate, the Bluetooth playback device can send the initial bit rate to the terminal device. The initial bit rate is used to instruct the terminal device to determine the target bit rate based on the initial bit rate, that is, when the terminal device receives the initial bit rate sent by the Bluetooth playback device, the terminal device can determine the target bit rate based on the initial bit rate. When the terminal device determines the target bit rate based on the initial bit rate, the terminal device can determine the target bit rate based on the initial bit rate and the bit rate parameters. The bit rate parameters include but are not limited to the bit rate supported by the terminal itself, the transmission signal strength, the interference signal strength, etc. When the terminal device determines the target bit rate, the terminal device can also issue a prompt message, which is used to prompt that the target bit rate has been determined based on the initial bit rate, and whether to send the target bit rate to the Bluetooth playback device. At this time, the example diagram of the interface of the terminal device can be as follows Figure 7 When the terminal device detects that the user clicks the confirmation control, the terminal device can send the target bit rate to the Bluetooth playback device.

[0120] Optionally, before the Bluetooth playback device determines the initial bit rate based on the stability parameter, the Bluetooth playback device may obtain the stability parameter and the bit rate corresponding to the stability parameter, and store the stability parameter and the bit rate corresponding to the stability parameter in association with the parameter mapping information.

[0121] S303, obtaining a target bit rate sent by the terminal device;

[0122] The specific process is as described above and will not be repeated here.

[0123] S304, obtaining a target bit rate level corresponding to the target bit rate;

[0124] The specific process is as described above and will not be repeated here.

[0125] According to some embodiments, when the Bluetooth playback device obtains the target bit rate level corresponding to the target bit rate, the Bluetooth playback device can obtain the target bit rate range corresponding to the target bit rate. When the Bluetooth playback device obtains the target bit rate range, the Bluetooth playback device can obtain the bit rate level corresponding to the target bit rate range in the bit rate mapping information as the target bit rate level. The Bluetooth playback device can directly obtain the bit rate level corresponding to the target bit rate range from the bit rate mapping information as the target bit rate level, which can reduce the acquisition time of the bit rate level, reduce the determination time of the cache capacity, and improve the determination efficiency of the cache capacity.

[0126] It is easy to understand that the bit rate mapping information of the Bluetooth headset can be, for example, that the bit rate level corresponding to 300-315Kbps is the first bit rate level, the bit rate level corresponding to 315-330Kbps is the second bit rate level, the bit rate level corresponding to 330-345Kbps is the third bit rate level, and the bit rate level corresponding to 345-360Kbps is the fourth bit rate level. When the Bluetooth headset detects the target bit rate of 334Kbps sent by the smartphone, the Bluetooth headset can obtain the target bit rate of 334Kbps sent by the smartphone. When the target bit rate obtained by the Bluetooth headset is 334Kbps, the Bluetooth headset can determine the target bit rate range of 330-345Kbps corresponding to the target bit rate. The Bluetooth headset can obtain the target bit rate level corresponding to the target bit rate range of 330-345Kbps in the bit rate mapping information as the third bit rate level, that is, the target bit rate level corresponding to the target bit rate obtained by the Bluetooth headset can be, for example, the third bit rate level.

[0127] According to some embodiments, when the Bluetooth playback device obtains the target bit rate level corresponding to the target bit rate, the Bluetooth playback device obtains the current bit rate level corresponding to the current cache capacity. When the Bluetooth playback device obtains the current bit rate level, the Bluetooth playback device can adjust the current bit rate level according to the bit rate threshold and the target bit rate to obtain the target bit rate level. The Bluetooth playback device determines the target bit rate level based on the current bit rate level, which can improve the accuracy of bit rate level determination and improve the accuracy of cache capacity determination.

[0128] It is easy to understand that when the Bluetooth playback device adjusts the current bit rate level according to the bit rate threshold and the target bit rate to obtain the target bit rate level, the Bluetooth playback device can adjust the current bit rate based on the bit rate threshold corresponding to the bit rate level. When the Bluetooth playback device can adjust the current bit rate based on the bit rate threshold corresponding to the bit rate level, the Bluetooth playback device can only adjust the current parameter level by one level, which can improve the stability of the cache capacity adjustment.

[0129] Optionally, for example, the current bit rate level corresponding to the current cache capacity may be, for example, the first bit rate level. The bit rate threshold corresponding to the first bit rate level is 300Kbps, the bit rate threshold corresponding to the second bit rate level is 315Kbps, the bit rate threshold corresponding to the third bit rate level is 330Kbps, and the bit rate threshold corresponding to the fourth bit rate level is 345Kbps. The target bit rate obtained by the Bluetooth headset is 334Kbps. The Bluetooth headset can increase the current bit rate level by one level, that is, the target bit rate level is the second bit rate level.

[0130] It is easy to understand that when the Bluetooth playback device can adjust the current bit rate based on the bit rate threshold corresponding to the bit rate level, it can also determine the bit rate level corresponding to the bit rate threshold as the target bit rate level when the target bit rate is greater than the maximum bit rate threshold, that is, the target bit rate level and the current bit rate level can differ by multiple bit rate levels, which can improve the accuracy of cache capacity determination.

[0131] Optional, for example, when the current bit rate level corresponding to the current cache capacity is the first bit rate level. The bit rate threshold corresponding to the first bit rate level is 300Kbps, the bit rate threshold corresponding to the second bit rate level is 315Kbps, the bit rate threshold corresponding to the third bit rate level is 330Kbps, and the bit rate threshold corresponding to the fourth bit rate level is 345Kbps. The target bit rate obtained by the Bluetooth playback device is 334Kbps. When the Bluetooth headset determines that the target bit rate is greater than the bit rate threshold corresponding to the third bit rate level, the Bluetooth headset can adjust the current bit rate level to the third bit rate level, that is, the target bit rate level is the third bit rate level.

[0132] S305, determining a target cache capacity based on the target bit rate level;

[0133] The specific process is as described above and will not be repeated here.

[0134] Optionally, when the Bluetooth playback device obtains the target bit rate level corresponding to the target bit rate, the Bluetooth playback device can directly obtain the cache capacity corresponding to the target bit rate level in the capacity mapping information. The capacity mapping information refers to a collection of bit rate levels and cache capacities corresponding to the bit rate levels. The capacity mapping information does not specifically refer to a fixed capacity mapping information. The capacity mapping information can, for example, change with the user's information setting instructions. The information setting instructions include but are not limited to voice information setting instructions, click information setting instructions, and timing information setting instructions, etc.

[0135] It is easy to understand that the capacity mapping information of the Bluetooth headset may be, for example, that the cache capacity corresponding to the first bit rate level is 2Mb, the cache capacity corresponding to the second bit rate level is 5Mb, the cache capacity corresponding to the third bit rate level is 10Mb, and the cache capacity corresponding to the fourth bit rate level is 15Mb. The target bit rate obtained by the Bluetooth headset may be, for example, 128Kbps, and the target bit rate level corresponding to the target bit rate obtained by the Bluetooth headset may be, for example, the third bit rate level. The target cache capacity obtained by the Bluetooth headset based on the third bit rate level may be, for example, 10Mb.

[0136] According to some embodiments, when the Bluetooth playback device is a device with a display screen, after the Bluetooth playback device determines the target cache capacity based on the target bit rate level, the Bluetooth playback device can issue a prompt message, and the prompt message is used to prompt the target cache capacity. For example, when the Bluetooth playback device is a Bluetooth watch, and the Bluetooth watch determines the target cache capacity to be, for example, 10Mb based on the target bit rate level, the Bluetooth watch can display a prompt message on the display screen. The prompt message can be, for example, that the target cache capacity is 10Mb. At this time, an example schematic diagram of the Bluetooth watch interface can be as follows: Figure 8 shown.

[0137] S306, if the audio data sent by the terminal device is received, the audio data is cached in a cache area corresponding to the target cache capacity;

[0138] According to some embodiments, after the terminal device and the Bluetooth playback device are currently connected, the terminal device can send audio data to the Bluetooth playback device. If the Bluetooth playback device receives the audio data sent by the terminal device, the Bluetooth playback device can cache the audio data in a cache area corresponding to the target cache capacity.

[0139] It is easy to understand that the target bit rate obtained by the Bluetooth headset may be, for example, 128Kbps, and the target bit rate level corresponding to the target bit rate obtained by the Bluetooth headset may be, for example, the third bit rate level. The target cache capacity obtained by the Bluetooth headset based on the third bit rate level may be, for example, 10Mb. When the Bluetooth headset can receive audio data sent by a smartphone. The audio data may be, for example, audio data corresponding to a song. When the Bluetooth headset receives the audio data, the audio data may be cached in a cache area corresponding to 10Mb.

[0140] S307: If the buffer capacity corresponding to the audio data meets the audio data playing condition, the audio data is played.

[0141] According to some embodiments, the audio data playback condition is used to verify whether the cache capacity corresponding to the audio data meets the audio playback condition. The audio data playback condition does not specifically refer to a fixed condition, and the audio data playback condition can be modified based on a condition modification instruction, for example. The condition modification instruction includes but is not limited to a voice condition modification instruction, a click condition modification instruction, and a timing condition modification instruction, etc. The condition modification instruction can also be sent by the user to the Bluetooth playback device through the terminal device.

[0142] It is easy to understand that when the Bluetooth playback device caches the audio data to the cache area corresponding to the target cache capacity, the Bluetooth playback device can detect whether the cache capacity corresponding to the audio data meets the audio data playback conditions. If the cache capacity corresponding to the audio data meets the audio data playback conditions, the Bluetooth playback device can play the audio data. Since a high delay will occur when the cache capacity is too high, and poor anti-interference ability will occur when the cache capacity is too low, the target cache capacity of the embodiment of the present application is determined by the Bluetooth playback device based on the target bit rate level. When the Bluetooth playback device plays audio data, the delay and anti-interference in the audio data transmission process can be taken into account, thereby improving the user experience.

[0143] Optionally, the audio data playback condition may be that the cache capacity corresponding to the audio data reaches 80% of the target cache capacity. When the Bluetooth headset caches the audio data to the cache area corresponding to 10Mb, the Bluetooth headset may detect that the cache capacity corresponding to the audio data reaches 80% of the target cache capacity. If the cache capacity corresponding to the audio data is 8Mb, which reaches 80% of the target cache capacity of 10Mb, the Bluetooth headset may play the audio data.

[0144] In one or more embodiments of the present application, by obtaining the stability parameter corresponding to the last audio data transmission process, the initial bit rate can be determined based on the stability parameter, and the initial bit rate is sent to the terminal device. The initial bit rate is used to instruct the terminal device to determine the target bit rate based on the initial bit rate, thereby improving the accuracy of the initial bit rate determination, improving the accuracy of the target bit rate acquisition, and further improving the accuracy of the cache capacity determination. In addition, if audio data sent by the terminal device is received, the audio data is cached in the cache area corresponding to the target cache capacity. If the cache capacity corresponding to the audio data meets the audio data playback conditions, the audio data is played. Since the target cache capacity is determined by the Bluetooth playback device based on the target bit rate level, the delay and stability of the audio data playback can be taken into account, thereby improving the audio data playback effect and the user experience.

[0145] The following will be combined with the attached Figure 9-11 , a cache capacity determination device provided in an embodiment of the present application is described in detail. It should be noted that the attached Figure 9-11 The cache capacity determination device shown is used to execute the present application Figure 4-Figure 8 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 4-Figure 8 The embodiment shown.

[0146] See also Fig. 9 , which shows a schematic diagram of the structure of the cache capacity determination device of an embodiment of the present application. The cache capacity determination device 900 can be implemented as all or part of the user terminal through software, hardware, or a combination of both. According to some embodiments, the cache capacity determination device 900 includes a bit rate acquisition unit 901, a level acquisition unit 902, and a cache capacity determination unit 903, which are specifically used to:

[0147] A bit rate acquisition unit 901 is used to acquire a target bit rate sent by a terminal device, where the target bit rate is a bit rate for audio data transmission negotiated when the Bluetooth playback device is currently connected to the terminal device;

[0148] A level acquisition unit 902, configured to acquire a target bit rate level corresponding to the target bit rate;

[0149] The cache capacity determination unit 903 is used to determine a target cache capacity based on the target bit rate level, where the target cache capacity is the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device.

[0150] According to some embodiments, Fig.10 A schematic diagram of the structure of a cache capacity determination device according to an embodiment of the present application is shown. Fig.10As shown, the cache capacity determination device 900 also includes a bit rate determination unit 904, which is used to obtain the stability parameter corresponding to the last audio data transmission process before obtaining the target bit rate sent by the terminal device; the last audio data transmission process is the process of audio data transmission when the Bluetooth playback device is connected to the terminal device;

[0151] An initial bit rate is determined based on the stability parameter, and the initial bit rate is sent to the terminal device, where the initial bit rate is used to instruct the terminal device to determine a target bit rate based on the initial bit rate.

[0152] According to some embodiments, the bit rate determination unit 904 includes an information acquisition subunit 914, a coefficient acquisition subunit 924 and a parameter calculation subunit 934. The bit rate determination unit 904 is used to obtain the stability parameter corresponding to the last audio data transmission process:

[0153] The information acquisition subunit 914 is used to acquire parameter information within a certain time unit during the last audio data transmission process; the parameter information includes at least one of the number of playback freezes, the signal strength value, the transmission interval of the audio data packet, and the retransmission rate of the audio data packet;

[0154] The coefficient acquisition subunit 924 is used to acquire a plurality of sampling parameters corresponding to a plurality of unit durations according to the parameter information within the plurality of unit durations and the weight coefficients corresponding to the parameter information;

[0155] The parameter calculation subunit 934 is used to calculate the stability parameter corresponding to the last audio data transmission process according to a number of sampling parameters.

[0156] According to some embodiments, the parameter calculation subunit 934 is used to calculate the stability parameter corresponding to the last audio data transmission process according to a plurality of sampling parameters, specifically to:

[0157] Screening a number of sampling parameters according to a preset method to obtain screened sampling parameters;

[0158] The average sampling parameter of the filtered sampling parameters is calculated, and the average sampling parameter is used as the stability parameter corresponding to the previous audio data transmission process.

[0159] According to some embodiments, the level acquisition unit 902, when used to acquire the target bit rate level corresponding to the target bit rate, is specifically used to:

[0160] Get the target bit rate range corresponding to the target bit rate;

[0161] The bit rate level corresponding to the target bit rate range is obtained in the bit rate mapping information as the target bit rate level.

[0162] According to some embodiments, the level acquisition unit 902, when used to acquire the target bit rate level corresponding to the target bit rate, is specifically used to:

[0163] Get the current bitrate level corresponding to the current cache capacity;

[0164] The current bit rate level is adjusted according to the bit rate threshold and the target bit rate to obtain the target bit rate level.

[0165] According to some embodiments, Fig.11 A schematic diagram of the structure of a cache capacity determination device according to an embodiment of the present application is shown. Fig.11 As shown, the cache capacity determination device 900 further includes an audio data playback unit 905, which is used to determine the target cache capacity based on the target bit rate level, and if the audio data sent by the terminal device is received, cache the audio data to the cache area corresponding to the target cache capacity;

[0166] If the buffer capacity corresponding to the audio data meets the audio data playing condition, the audio data is played.

[0167] In one or more embodiments of the present application, a target bit rate sent by a terminal device can be obtained through a bit rate acquisition unit, a target bit rate level corresponding to the target bit rate can be obtained by a level acquisition unit, and a cache capacity determination unit can determine the target cache capacity based on the target bit rate level, that is, the cache capacity determination device can directly determine the cache capacity of audio data when the Bluetooth playback device is currently connected to the terminal device based on the target bit rate sent by the terminal device, without the need to perform a large number of tests to determine a fixed cache capacity, thereby reducing the situation where test resource consumption is high, and reducing test resource consumption. At the same time, there is no need to identify the transmission situation after each audio data is played, which can reduce the lag in adjusting the cache capacity, and can take into account both the delay and anti-interference performance during audio data transmission, thereby reducing the accuracy and efficiency of cache capacity determination while reducing test resource consumption.

[0168] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 4-Figure 8 The cache capacity determination method of the embodiment shown in the figure can be specifically executed by referring to Figure 4-Figure 8 The specific description of the illustrated embodiment will not be repeated here.

[0169] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 4-Figure 8 The cache capacity determination method of the embodiment shown in the figure can be specifically executed by referring to Figure 4-Figure 8 The specific description of the illustrated embodiment will not be repeated here.

[0170] See also Fig.12 , is a schematic diagram of the structure of a Bluetooth playback device provided in an embodiment of the present application. Fig.12 As shown, the Bluetooth playback device 1200 may include: at least one processor 1201 , at least one network interface 1204 , a user interface 1203 , a memory 1205 , and at least one communication bus 1202 .

[0171] The communication bus 1202 is used to realize the connection and communication between these components.

[0172] The user interface 1203 may include a speaker, and the optional user interface 1203 may also include a standard wired interface or a wireless interface.

[0173] The network interface 1204 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0174] Among them, the processor 1201 may include one or more processing cores. The processor 1201 uses various interfaces and lines to connect the various parts of the entire Bluetooth playback device 1200, and executes various functions and processes data of the Bluetooth playback device 1200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1205, and calling data stored in the memory 1205. Optionally, the processor 1201 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1201 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1201, and it can be implemented separately through a chip.

[0175] Among them, the memory 1205 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1205 includes a non-transitory computer-readable storage medium. The memory 1205 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1205 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1205 may also be optionally at least one storage device located away from the aforementioned processor 1201. As Fig.12 As shown, the memory 1205 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for determining cache capacity.

[0176] exist Fig.12 In the Bluetooth playback device 1200 shown, the user interface 1203 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1201 can be used to call the application program determined by the cache capacity stored in the memory 1205, and specifically perform the following operations:

[0177] Get the target bit rate sent by the terminal device, which is the bit rate of audio data transmission negotiated when the Bluetooth playback device and the terminal device are currently connected;

[0178] Get the target bit rate level corresponding to the target bit rate;

[0179] Based on the target bit rate level, a target cache capacity is determined, where the target cache capacity is the cache capacity of audio data when the Bluetooth playback device is currently connected to the terminal device.

[0180] According to some embodiments, before the processor 1201 is used to execute the acquisition of the target bit rate sent by the terminal device, the processor 1201 further specifically performs the following operations:

[0181] Obtain the stability parameter corresponding to the last audio data transmission process; the last audio data transmission process is the process of audio data transmission when the Bluetooth playback device is connected to the terminal device;

[0182] An initial bit rate is determined based on the stability parameter, and the initial bit rate is sent to the terminal device, where the initial bit rate is used to instruct the terminal device to determine a target bit rate based on the initial bit rate.

[0183] According to some embodiments, when the processor 1201 is used to obtain the stability parameter corresponding to the last audio data transmission process, the following operations are specifically performed:

[0184] Obtain parameter information within a number of unit time lengths during the last audio data transmission process; the parameter information includes at least one of the number of playback freezes, the signal strength value, the transmission interval length of the audio data packet, and the retransmission rate of the audio data packet;

[0185] According to the parameter information in the plurality of unit time lengths and the weight coefficients corresponding to the parameter information, a plurality of sampling parameters corresponding to the plurality of unit time lengths are obtained;

[0186] The stability parameter corresponding to the last audio data transmission process is calculated according to a number of sampling parameters.

[0187] According to some embodiments, when the processor 1201 is used to calculate the stability parameter corresponding to the last audio data transmission process according to a plurality of sampling parameters, the following operations are specifically performed: a plurality of sampling parameters are filtered according to a preset method to obtain filtered sampling parameters;

[0188] The average sampling parameter of the filtered sampling parameters is calculated, and the average sampling parameter is used as the stability parameter corresponding to the previous audio data transmission process.

[0189] According to some embodiments, when the processor 1201 is used to execute the acquisition of the target bit rate level corresponding to the target bit rate, the following operations are specifically performed:

[0190] Get the target bit rate range corresponding to the target bit rate;

[0191] The bit rate level corresponding to the target bit rate range is obtained in the bit rate mapping information as the target bit rate level.

[0192] According to some embodiments, when the processor 1201 is used to execute the acquisition of the target bit rate level corresponding to the target bit rate, the following operations are specifically performed:

[0193] Get the current bitrate level corresponding to the current cache capacity;

[0194] The current bit rate level is adjusted according to the bit rate threshold and the target bit rate to obtain the target bit rate level.

[0195] According to some embodiments, the processor 1201 is configured to perform the following operations after determining the target cache capacity based on the target bit rate level:

[0196] If audio data sent by the terminal device is received, the audio data is cached in a cache area corresponding to the target cache capacity;

[0197] If the buffer capacity corresponding to the audio data meets the audio data playing condition, the audio data is played.

[0198] In one or more embodiments of the present application, by obtaining the target bit rate sent by the terminal device, the target bit rate level corresponding to the target bit rate can be obtained, and the target cache capacity can be determined based on the target bit rate level. That is, the Bluetooth playback device can directly determine the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device based on the target bit rate sent by the terminal device. There is no need to perform a large number of tests to determine the fixed cache capacity, thereby reducing the situation where the test resource consumption is high. At the same time, there is no need to identify the transmission situation after each audio data is played, which can reduce the lag of the cache capacity adjustment. The delay and anti-interference performance in the audio data transmission process can be taken into account, thereby reducing the accuracy and efficiency of the cache capacity determination while reducing the test resource consumption.

[0199] In addition, those skilled in the art will appreciate that the structure of the terminal shown in the above drawings does not constitute a limitation on the terminal, and the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the terminal also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.

[0200] In the embodiment of the present application, the execution subject of each step may be the terminal described above. Optionally, the execution subject of each step is the operating system of the terminal. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiment of the present application.

[0201] The terminal of the embodiment of the present application may also be equipped with a display device, which may be any device capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), etc. The user may use the display device on the terminal 100 to view displayed text, images, videos and other information. The terminal may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.

[0202] Those skilled in the art can clearly understand that the technical solution of the present application can be implemented with the help of software and / or hardware. The "unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array (FPGA), an integrated circuit (IC), etc.

[0203] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0204] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0205] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0206] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0207] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0208] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.

[0209] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct the relevant hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0210] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for determining cache capacity, applied to a Bluetooth playback device, characterized in that: The method comprises: Obtain parameter information within several unit time lengths during the last audio data transmission process; the parameter information includes at least one of the number of playback freezes, the signal strength value, the transmission interval duration of the audio data packet, and the retransmission rate of the audio data packet, and the last audio data transmission process is the process of audio data transmission when the Bluetooth playback device is connected to the terminal device; Acquire a plurality of sampling parameters corresponding to the plurality of unit time lengths according to the parameter information within the plurality of unit time lengths and the weight coefficients corresponding to the parameter information; Screening the plurality of sampling parameters according to a preset method to obtain screened sampling parameters; Calculating an average sampling parameter of the filtered sampling parameters, and using the average sampling parameter as a stability parameter corresponding to the last audio data transmission process; Determine an initial bit rate based on the stability parameter, and send the initial bit rate to the terminal device, where the initial bit rate is used to instruct the terminal device to determine a target bit rate based on the initial bit rate; Acquire the target bit rate sent by the terminal device, where the target bit rate is the bit rate for audio data transmission negotiated when the Bluetooth playback device is currently connected to the terminal device; Obtaining a target bit rate level corresponding to the target bit rate; Based on the target bit rate level, a target cache capacity is determined, where the target cache capacity is the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device.

2. The method according to claim 1, characterized in that The obtaining a target bit rate level corresponding to the target bit rate includes: Obtaining a target bit rate range corresponding to the target bit rate; The bit rate level corresponding to the target bit rate range is obtained in the bit rate mapping information as the target bit rate level.

3. The method according to claim 1, characterized in that The obtaining a target bit rate level corresponding to the target bit rate includes: Get the current bitrate level corresponding to the current cache capacity; The current bit rate level is adjusted according to the bit rate threshold and the target bit rate to obtain the target bit rate level.

4. The method according to claim 1, characterized in that: After determining the target buffer capacity based on the target bit rate level, the method further includes: If the audio data sent by the terminal device is received, the audio data is cached in a cache area corresponding to the target cache capacity; If the buffer capacity corresponding to the audio data meets the audio data playing condition, the audio data is played.

5. A cache capacity determination device, characterized in that: The device comprises: A bit rate acquisition unit, used to acquire parameter information within several unit time lengths in the last audio data transmission process; the parameter information includes at least one of the number of playback freezes, the signal strength value, the transmission interval duration of the audio data packet and the retransmission rate of the audio data packet, and the last audio data transmission process is the process of audio data transmission when the Bluetooth playback device is connected to the terminal device; according to the parameter information within the several unit time lengths and the weight coefficients corresponding to the parameter information, a number of sampling parameters corresponding to the several unit time lengths are acquired; according to a preset method, the several sampling parameters are filtered to obtain the filtered sampling parameters; the average sampling parameters of the filtered sampling parameters are calculated, and the average sampling parameters are used as the stability parameters corresponding to the last audio data transmission process; based on the stability parameter, an initial bit rate is determined, and the initial bit rate is sent to the terminal device, and the initial bit rate is used to instruct the terminal device to determine a target bit rate based on the initial bit rate; the target bit rate sent by the terminal device is acquired, and the target bit rate is the bit rate of audio data transmission negotiated when the Bluetooth playback device and the terminal device are currently connected; A level acquisition unit, used to acquire a target bit rate level corresponding to the target bit rate; The cache capacity determination unit is used to determine the target cache capacity based on the target bit rate level, and the target cache capacity is the cache capacity of the audio data when the Bluetooth playback device is currently connected to the terminal device.

6. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Sound quality adjustment method and system, main unit end and storage medium

    CN107170460A

  • Method and device for adjusting video code rate

    CN111083536A