Data sending method, data sending device and electronic equipment

By dynamically adjusting the A2DP service time slice and reserved time slot strategy, combined with channel quality evaluation, the fluency and stability of A2DP service transmission under multi-service concurrency is solved, and efficient audio transmission is achieved.

CN119030663APending Publication Date: 2024-11-26ROCKCHIP (BEIJING) INTEGRATED CIRCUIT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411081358.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the case of multi-service concurrency, the smoothness and stability of A2DP service transmission are difficult to ensure, and it is susceptible to interference from other services, resulting in a degradation of audio transmission quality.

Method used

By dynamically adjusting the length of the A2DP service time slice, combining the reserved time slot strategy and comprehensive channel quality evaluation, we ensure that the A2DP service has sufficient resources and bandwidth for data transmission within a specific time, and reduce interference through the alternating service time slice mechanism.

Benefits of technology

It realizes the fluency and stability of A2DP services, avoids the decline in service quality caused by resource competition, and improves data transmission efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030663A_ABST
    Figure CN119030663A_ABST
Patent Text Reader

Abstract

The invention provides a data sending method, a data sending device and electronic equipment. The data sending method comprises the following steps: transmitting an A2DP service in an A2DP service time slice; determining a next A2DP service time slice for transmitting the A2DP service next time; and transmitting other services in other service time slices, wherein the A2DP service time slice and the other service time slices are alternated with each other. The data sending method can ensure the stability and efficiency of the A2DP service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of communication technology, and relates to a data transmission method, and in particular to a data sending method, a data sending device, and an electronic device. Background Art

[0002] A2DP (Advanced Audio Distribution Profile) is a standard for high-quality audio transmission via Bluetooth technology. A2DP defines specifications for audio encoding and decoding, allowing devices such as smartphones, tablets, PCs (Personal Computers), etc. to transmit stereo audio streams to receiving devices such as Bluetooth headsets, speakers, or car audio systems. A2DP supports multiple audio codecs and can provide a low-latency audio transmission experience while ensuring audio quality, which makes it widely used in scenarios such as music playback, video synchronization, and game audio, and ensures the continuity and real-time nature of the audio stream by optimizing time slices and bandwidth management. Summary of the invention

[0003] The embodiments of the present disclosure provide a data sending method, a data sending device, and an electronic device, which are used to ensure the smoothness and stability of A2DP service transmission when multiple services are concurrent.

[0004] In a first aspect, an embodiment of the present disclosure provides a data transmission method. The data transmission method includes: transmitting an A2DP service within an A2DP service time slice; determining a next A2DP service time slice for the next transmission of the A2DP service; and transmitting other services within other service time slices, wherein the A2DP service time slices and the other service time slices are alternated with each other.

[0005] In an implementation of the first aspect, determining a next A2DP service time slice for the next transmission of the A2DP service includes: dynamically adjusting the next A2DP service time slice based on the number of data packets to be transmitted when the last transmission of the A2DP service is completed, the number of new data packets expected to be received from the host, and the expected number of retransmissions determined by the channel quality.

[0006] In an implementation manner of the first aspect, the data sending method further includes: determining a time interval value after the A2DP link is established, and the length of the other service time slice is determined according to the time interval value.

[0007] In an implementation manner of the first aspect, the data sending method is applied to a master device, and the data sending method further includes: determining that a length of the other service time slice is equal to the time interval value.

[0008] In an implementation of the first aspect, the data sending method is applied to a slave device, and the data sending method also includes: obtaining the size of the data to be sent at the current moment when the A2DP service time slice ends; and if the size of the data to be sent is 0, determining that the length of the other service time slice is equal to the time interval value, otherwise determining that the length of the other service time slice is equal to 1 / 2 of the time interval value.

[0009] In an implementation of the first aspect, determining the next A2DP service time slice for the next transmission of the A2DP service includes: at the end of the A2DP service time slice, obtaining the sending duration of the current data packet to be transmitted, the sending duration of the newly received data packet expected from the host, and the reserved retransmission duration; and determining the length of the next A2DP service time slice based on the sending duration of the current data packet to be transmitted, the sending duration of the newly received data packet expected from the host, and the reserved retransmission duration.

[0010] In an implementation of the first aspect, obtaining the sending duration of the current data packet to be transmitted includes: obtaining the number of the current data packets to be transmitted; and obtaining the sending duration of the current data packet to be transmitted based on the number of the current data packets to be transmitted and the transmission duration, wherein the transmission duration includes the time for a data sending device to send data and the time for receiving confirmation information from a peer device.

[0011] In an implementation of the first aspect, obtaining the estimated sending duration of a newly received data packet from the host includes: obtaining the number of newly received data packets expected from the host based on the sending duration of the data packet to be transmitted, the duration of the next other service time slice and the data packet generation interval; and obtaining the estimated sending duration of the newly received data packet from the host based on the number of newly received data packets expected from the host and the transmission duration, wherein the transmission duration includes the time for a data sending device to send data and the time for receiving confirmation information from a peer device.

[0012] In an implementation of the first aspect, obtaining the reserved retransmission duration includes: determining an expected number of retransmissions based on channel quality; and obtaining the reserved retransmission duration based on the expected number of retransmissions and the transmission duration, wherein the transmission duration includes the time for a data sending device to send data and the time for receiving confirmation information from a peer device.

[0013] In an implementation of the first aspect, determining the expected number of retransmissions based on channel quality includes: obtaining a current average packet error rate; determining a level of the current average packet error rate, different levels of packet error rates corresponding to different expected numbers of retransmissions; and determining the expected number of retransmissions based on the level of the current average packet error rate.

[0014] In an implementation manner of the first aspect, the A2DP service is an audio streaming service.

[0015] In a second aspect, an embodiment of the present disclosure provides a data sending device. The data sending device includes: an A2DP service sending module, configured to transmit an A2DP service within an A2DP service time slice; an other service sending module, configured to transmit other services within other service time slices, wherein the A2DP service time slice and the other service time slices are alternated with each other; and a scheduling module, configured to determine a next A2DP service time slice for the next transmission of the A2DP service.

[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory configured to store an executable program; and a processor configured to call the program so that the electronic device executes the data sending method according to any one of the first aspects of the embodiments of the present disclosure.

[0017] According to the disclosed embodiment, the A2DP link is protected as necessary, ensuring the smoothness and stability of audio transmission, while also taking into account the needs of other services, avoiding the degradation of service quality caused by resource competition and conflict. In addition, through precise time control and dynamic resource scheduling, it is ensured that all services can be reasonably handled under various business needs and environmental changes.

[0018] In some implementations, a reserved time slot strategy is proposed. In order to prevent the A2DP service from being interfered with by other services, the system reserves a specific time slot specifically for data transmission of the A2DP service. In this way, it is ensured that the A2DP service has sufficient resources and bandwidth for data transmission within a specific time, thereby ensuring the stability and efficiency of the service.

[0019] In some implementations, a dynamic time slot allocation mechanism is proposed. By dynamically adjusting the transmission time slot of the A2DP service, the transmission time is optimized according to the real-time data and system status (such as the number of packets to be transmitted, the number of A2DP packets expected to be received, channel quality, etc.). In this way, it is ensured that the A2DP service can transmit data at the best time, thereby improving the transmission efficiency and success rate.

[0020] In some implementations, the setting of fixed time intervals is proposed. After each A2DP service time slice is completed, a fixed interval is set according to the current device role and the data of the packet to be sent, providing a clear operation window for other services. In this way, the interference between different services is reduced, the resource requirements of various services in the system are balanced, and a certain service is prevented from occupying resources for a long time and affecting the normal operation of other services.

[0021] In some implementations, a comprehensive channel quality assessment is proposed. A mechanism for estimating retransmission time based on current channel quality helps to more accurately predict and adjust the transmission strategy of A2DP services, further improve the efficiency and reliability of data transmission, and avoid waste caused by too many reserved time slots. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 Shown is a schematic diagram of an application scenario of an embodiment of the present disclosure.

[0023] Figure 2 Shown is a flowchart of a data sending method provided by an embodiment of the present disclosure.

[0024] Figure 3 Shown is an example diagram of the A2DP service time slice and other service time slices in the embodiments of the present disclosure.

[0025] Figure 4 Shown is a flowchart for determining the length of other service time slices in an embodiment of the present disclosure.

[0026] Figure 5 Shown is a flowchart of determining the next A2DP service time slice for the next transmission of the A2DP service in an embodiment of the present disclosure.

[0027] Figure 6 Shown is a flow chart for obtaining the sending duration of the current data packet to be transmitted in an embodiment of the present disclosure.

[0028] Figure 7 Shown is a flow chart of obtaining the estimated sending duration of a newly received data packet from a host in an embodiment of the present disclosure.

[0029] Figure 8 Shown is a flowchart of obtaining the reserved retransmission duration in an embodiment of the present disclosure.

[0030] Fig. 9 Shown is a flow chart for determining the expected number of retransmissions in an embodiment of the present disclosure.

[0031] Fig.10 Shown is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] The following is an explanation of the embodiments of the present disclosure by specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0033] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present disclosure in a schematic manner, and thus the illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0034] Figure 1 is a schematic diagram showing the structure of an A2DP transmission system. Figure 1 As shown, the A2DP transmission system includes a host, a data sending device and a data receiving device. The host is connected to the data sending device in communication, and the host is configured to send data to the data sending device, including but not limited to A2DP service data. The data sending device and the data receiving device are connected via Bluetooth communication, and the data sending device is configured to send A2DP service data and / or other service data to the data receiving device. The above-mentioned other services are, for example, Inquiry Scan, Page Scan, Inquiry, Page, BLE Scan, non-A2DP links, etc., but the present disclosure is not limited thereto. In some implementations, the data sending device includes a cache. The data sending device stores the data it receives in the cache, and reads data from the cache and sends it to the data receiving device.

[0035] In the case of multiple services running concurrently, A2DP service data is easily interfered by other service data, which will reduce the smoothness and stability of A2DP service transmission. For example, in one instance, when Inquiry Scan, Page Scan, Inquiry, Page, BLE Scan, non-A2DP link and A2DP services are running concurrently, there will be problems such as sound freeze, slow search for surrounding devices, and other non-A2DP links not working properly.

[0036] At least in view of the above problems, the present disclosure provides a data transmission method, which can be applied to Figure 1 According to the disclosed embodiment, the A2DP link is protected as necessary, ensuring the smoothness and stability of audio transmission, while also taking into account the needs of other services, avoiding the degradation of service quality caused by resource competition and conflict. In addition, through precise time control and dynamic resource scheduling, it is ensured that all services can be reasonably handled under various business needs and environmental changes.

[0037] In some embodiments, a reserved time slot strategy is proposed. In order to prevent the A2DP service from being interfered with by other services, the system reserves a specific time slot specifically for data transmission of the A2DP service. In this way, it is ensured that the A2DP service has sufficient resources and bandwidth for data transmission within a specific time, thereby ensuring the stability and efficiency of the service.

[0038] In some embodiments, a dynamic time slot allocation mechanism is proposed. By dynamically adjusting the transmission time slot of the A2DP service, the transmission time is optimized according to the real-time data and system status (such as the number of packets to be transmitted, the number of A2DP packets expected to be received, channel quality, etc.). In this way, it is ensured that the A2DP service can transmit data at the best time, thereby improving the transmission efficiency and success rate.

[0039] In some embodiments, the setting of a fixed time interval is proposed. After each A2DP service time slice is completed, a fixed interval is set according to the current device role and the packet data to be sent, providing a clear operation window for other services. In this way, the interference between different services is reduced, the resource requirements of various services in the system are balanced, and a certain service is prevented from occupying resources for a long time and affecting the normal operation of other services.

[0040] In some embodiments, a comprehensive channel quality assessment is proposed. A mechanism for estimating retransmission time based on current channel quality helps to more accurately predict and adjust the sending strategy of A2DP services, further improve the efficiency and reliability of data transmission, and avoid waste caused by too many reserved time slots.

[0041] The technical solutions in the embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present disclosure.

[0042] Figure 2 is a flow chart showing a data transmission method provided according to an embodiment of the present disclosure. Figure 2 As shown, the data sending method provided by the embodiment of the present disclosure includes the following steps S21 to S23.

[0043] S21, transmitting the A2DP service in the A2DP service time slot. The A2DP service time slot is a specific time slot reserved by the system, which is specifically used for transmitting A2DP service data, and other services will not be transmitted in this time slot.

[0044] S22, determining a next A2DP service time slice for transmitting the A2DP service next time.

[0045] In some implementations, the next A2DP service time slice is dynamically adjusted based on the number of data packets to be transmitted when the last A2DP service transmission is completed, the number of new data packets expected to be received from the host, and the expected number of retransmissions determined by the channel quality.

[0046] S23, transmitting other services in other service time slices, and the A2DP service time slices and other service time slices are alternated with each other. Specifically, the A2DP service is not transmitted in other service time slices, and other services other than A2DP are transmitted in other service time slices.

[0047] Subsequently, the data sending method may further include transmitting the A2DP service in the next A2DP service time slice, determining the next A2DP service time slice for transmitting the A2DP service again, and transmitting other services in the next other service time slice, to repeat the above steps.

[0048] It should be noted that the above-mentioned labels S21, S22 and S23 are only used to distinguish different steps, but not to limit the execution order of these steps.

[0049] Figure 3 FIG. 2 is a diagram showing the division of the transmission time period in the embodiment of the present disclosure. Figure 3 As shown, the transmission time period includes multiple A2DP service time slices and other service time slices that alternate with each other. The end of the A2DP service time slice is the scheduling moment, and the data sending device determines the length of the next A2DP service time slice at the scheduling moment.

[0050] As described above, the data sending method provided in the embodiment of the present disclosure adopts a dedicated A2DP service time slice to transmit the A2DP service. In this way, it can ensure that the A2DP service has sufficient resources and bandwidth for data transmission within a specific time, thereby ensuring the stability and efficiency of the A2DP service.

[0051] In some implementations, the data transmission method may further include: after the A2DP link is established, determining a fixed time interval value, and determining the length of other service time slices according to the time interval value.

[0052] In some implementations, the data transmission method is applied to a master device, that is, the data transmission device is a master device. In these implementations, the data transmission method may further include: determining that the length of other service time slices is equal to the time interval value.

[0053] In some implementations, the data transmission method is applied to a slave device, that is, the data transmission device is a slave device. Figure 4 In these implementations, the data sending method may further include the following steps S41 and S42.

[0054] S41, obtaining the size of the data to be sent at the current moment when the A2DP service time slice ends.

[0055] S42, if the size of the data to be sent is 0, determine that the length of the other service time slice is equal to the time interval value, otherwise determine that the length of the other service time slice is less than the time interval value. For example, it can be determined that the length of the other service time slice is equal to 1 / 2 of the time interval value, but the present disclosure is not limited to this.

[0056] As described above, in the disclosed embodiment, the length of other service time slices can be determined according to the role of the data sending device (e.g., master device, slave device), providing a clear operation window for other services. In this way, interference between different services can be reduced, which is conducive to balancing the resource requirements of various services in the system and avoiding the problem that a certain service occupies resources for a long time and affects the normal operation of other services.

[0057] See also Figure 5 In some implementations, determining the next A2DP service time slice for the next transmission of the A2DP service includes the following steps S51 and S52.

[0058] S51, when the A2DP service time slice ends, obtaining the sending duration of the current data packet to be transmitted, the sending duration of the newly received data packet expected from the host, and the reserved retransmission duration.

[0059] S52, determining the length of the next A2DP service time slice according to the transmission time of the current data packet to be transmitted, the transmission time of the newly received data packet expected from the host, and the reserved retransmission time.

[0060] Exemplarily, the length of the next A2DP service time slice = the sending duration of the current data packet to be transmitted + the sending duration of the newly received data packet expected from the host + the reserved retransmission duration.

[0061] See also Figure 6 In some implementations, obtaining the sending duration of the current data packet to be transmitted includes the following steps S61 and S62.

[0062] S61, obtaining the number of data packets currently to be transmitted. The number of data packets currently to be transmitted is, for example, the number of data packets in the buffer of the data sending device.

[0063] S62, obtaining the transmission duration of the current data packet to be transmitted according to the number of the current data packets to be transmitted and the transmission duration, wherein the transmission duration includes the time for the data transmitting device to send data and the time for receiving confirmation (ACK) information from the opposite end device.

[0064] Exemplarily, the sending duration of the current data packet to be transmitted=the number of the current data packets to be transmitted*the transmission duration.

[0065] See also Figure 7In some implementations, obtaining the estimated transmission duration of a newly received data packet from the host includes the following steps S71 and S72.

[0066] S71, obtaining the number of new data packets expected to be received from the host according to the sending duration of the data packet to be transmitted, the duration of the next other service time slice and the generation interval of the data packets.

[0067] S72, obtaining the estimated transmission duration of the newly received data packets from the host according to the estimated number of newly received data packets from the host and the transmission duration, wherein the transmission duration includes the time for the data sending device to send data and the time for receiving confirmation (ACK) information from the opposite device.

[0068] Exemplarily, the number of newly received data packets expected from the host = (the duration of the next other service time slice + the sending duration of the data packet to be transmitted) / the interval between the generation of the data packets.

[0069] The estimated transmission time of the newly received data packet from the host = (the duration of the next other service time slice + the transmission time of the data packet to be transmitted) / the generation interval of the data packet * the transmission time.

[0070] See also Figure 8 In some implementations, obtaining the reserved retransmission duration includes the following steps S81 and S82.

[0071] S81, determining an expected number of retransmissions according to the channel quality. The worse the channel quality, the more the expected number of retransmissions, and the better the channel quality, the fewer the expected number of retransmissions.

[0072] S82, obtaining a reserved retransmission duration according to the expected number of retransmissions and the transmission duration, where the transmission duration includes the time it takes for the data sending device to send data and the time it takes to receive confirmation (ACK) information from the peer device.

[0073] Exemplarily, the reserved retransmission duration=the expected number of retransmissions*the transmission duration.

[0074] See also Fig. 9 In some implementations, determining the expected number of retransmissions based on the channel quality includes the following steps S91 to S93.

[0075] S91, obtaining a current average packet error rate. The average packet error rate refers to the proportion of erroneous data packets among data packets transmitted within a period of time.

[0076] S92, determining the level of the current average packet error rate, where different levels of packet error rates correspond to different expected retransmission times. The corresponding relationship between the packet error rate level and the expected retransmission times can be preset according to actual needs.

[0077] S93, determining the expected number of retransmissions according to the current average packet error rate level.

[0078] As described above, in the disclosed embodiment, the transmission duration of the A2DP service can be dynamically adjusted, and the length of the next A2DP service time slice can be optimized according to real-time data and system status (such as the number of data packets currently to be transmitted, the number of new data packets expected to be received from the host, channel quality, etc.). This dynamic allocation mechanism can ensure that the A2DP service transmits data at the best time, thereby improving transmission efficiency and success rate.

[0079] In addition, estimating the retransmission duration according to the current channel quality is conducive to more accurately predicting and adjusting the sending strategy of the A2DP service, further improving the efficiency and reliability of data transmission, and avoiding waste caused by too many reserved time slots.

[0080] The protection scope of the data sending method provided by the embodiment of the present disclosure is not limited to the execution order of the steps listed in the present embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present disclosure are included in the protection scope of the present disclosure.

[0081] The embodiments of the present disclosure also provide a data sending device, which can implement the data sending method provided by the embodiments of the present disclosure. However, the implementation device of the data sending method provided by the embodiments of the present disclosure includes but is not limited to the structure of the data sending device listed in the embodiments. All structural deformations and replacements of the prior art made according to the principles of the present disclosure are included in the protection scope of the present disclosure.

[0082] The data transmission device provided by the embodiment of the present disclosure includes an A2DP service transmission module, an other service transmission module and a scheduling module. The A2DP service transmission module is configured to transmit the A2DP service within the A2DP service time slice. The other service transmission module is configured to transmit other services within the other service time slices, and the A2DP service time slices and other service time slices are alternated with each other. The scheduling module is configured to determine the next A2DP service time slice for the next transmission of the A2DP service.

[0083] It should be noted that the A2DP service sending module, other service sending modules and scheduling module in the data sending device can be configured to execute the corresponding steps or actions in the data sending method described above, which will not be described in detail here.

[0084] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices or methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units 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 interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0085] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure. For example, the functional modules / units in the various embodiments of the present disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0086] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0087] The embodiments of the present disclosure may also provide an electronic device. Fig.10 The structure diagram of the electronic device 1000 in the embodiment of the present disclosure is shown. Fig.10 As shown, in this embodiment, the electronic device 1000 includes a memory 1010 and a processor 1020 .

[0088] The memory 1010 is configured to store executable programs. In some implementations, the memory 1010 may include: ROM, RAM, magnetic disk, USB disk, memory card, optical disk, or other media that can store program codes.

[0089] Exemplarily, the memory 1010 may include a computer system readable medium in the form of a volatile memory, such as a RAM and / or a cache memory. The electronic device 1000 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 1010 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0090] The processor 1020 is connected to the memory 1010 and is configured to call the program so that the electronic device 1000 executes the data sending method provided by the embodiment of the present disclosure.

[0091] Exemplarily, the processor 1020 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. In other embodiments, the processor 1020 may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0092] In some implementations, the electronic device 1000 provided by the embodiment of the present disclosure may further include a display 1030. The display 1030 is communicatively connected with the memory 1010 and the processor 1020, and is used to display a graphical user interface (GUI) related to the data transmission method.

[0093] In the disclosed embodiment, the display 1030 may include a display screen (display panel). In some implementations, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In addition, the display 1030 may also be a touch panel (touch screen, touch screen), and the touch panel may include a display screen and a touch-sensitive surface. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 1020 to determine the type of touch event, and then the processor 1020 provides a corresponding visual output on the display device according to the type of touch event.

[0094] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0095] In summary, the embodiments of the present disclosure provide a data transmission method, a data transmission device, and an electronic device, which can provide necessary protection for the A2DP link, ensure the smoothness and stability of audio transmission, and also take into account the needs of other services, avoiding the degradation of service quality caused by resource competition and conflict. In addition, the embodiments of the present disclosure ensure that all services can be reasonably processed under various business needs and environmental changes through precise time control and dynamic resource scheduling algorithms. Therefore, the present disclosure effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.

[0096] The above embodiments are merely illustrative of the principles and effects of the present disclosure, and are not intended to limit the present disclosure. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present disclosure. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present disclosure shall still be covered by the claims of the present disclosure.

Claims

1. A data transmission method, characterized in that: include: Transmitting A2DP services within the A2DP service time slice; Determine a next A2DP service time slice for next transmission of the A2DP service; as well as Other services are transmitted in other service time slices, and the A2DP service time slices and the other service time slices are alternated with each other.

2. The data transmission method according to claim 1, characterized in that: Determining the next A2DP service time slice for the next transmission of the A2DP service includes: The next A2DP service time slice is dynamically adjusted according to the number of data packets to be transmitted when the last transmission of the A2DP service is completed, the number of new data packets expected to be received from the host, and the expected number of retransmissions determined by the channel quality.

3. The data transmission method according to claim 1, characterized in that: Also includes: After the A2DP link is established, a time interval value is determined, and the length of the other service time slice is determined according to the time interval value.

4. The data transmission method according to claim 3, characterized in that: Applied to the master device, the data sending method further includes: Determine that the length of the other service time slice is equal to the time interval value.

5. The data transmission method according to claim 3, characterized in that: Applied to a slave device, the data sending method further includes: Acquire the size of the data to be sent at the current moment when the A2DP service time slice ends; and If the size of the data to be sent is 0, the length of the other service time slice is determined to be equal to the time interval value; otherwise, the length of the other service time slice is determined to be equal to 1 / 2 of the time interval value.

6. The data transmission method according to claim 1, characterized in that: Determining the next A2DP service time slice for the next transmission of the A2DP service includes: At the end of the A2DP service time slice, obtaining the sending duration of the current data packet to be transmitted, the sending duration of the newly received data packet expected from the host, and the reserved retransmission duration; and The length of the next A2DP service time slice is determined according to the sending duration of the current data packet to be transmitted, the sending duration of the newly received data packet expected from the host, and the reserved retransmission duration.

7. The data transmission method according to claim 6, characterized in that: Obtaining the sending time of the current data packet to be transmitted includes: Get the number of packets currently waiting to be transmitted; and The transmission duration of the current data packet to be transmitted is obtained according to the number of the current data packets to be transmitted and the transmission duration, wherein the transmission duration includes the time for a data transmitting device to send data and the time for receiving confirmation information from a peer device.

8. The data transmission method according to claim 6, characterized in that: Obtaining the estimated sending time of a new received data packet from the host includes: Obtaining the number of newly received data packets expected from the host according to the sending duration of the data packet to be transmitted, the duration of the next other service time slice and the generation interval of the data packets; and The estimated transmission duration of the newly received data packets from the host is obtained according to the estimated number of newly received data packets from the host and the transmission duration, wherein the transmission duration includes the time for the data sending device to send data and the time for receiving confirmation information from the opposite device.

9. The data transmission method according to claim 6, characterized in that: Obtaining the reserved retransmission time includes: Determining an expected number of retransmissions based on channel quality; and The reserved retransmission duration is acquired according to the expected number of retransmissions and the transmission duration, wherein the transmission duration includes the time for a data sending device to send data and the time for receiving confirmation information from a peer device.

10. The data transmission method according to claim 9, characterized in that: Determining the expected number of retransmissions based on channel quality includes: Get the current average packet error rate; Determining a level of the current average packet error rate, where different levels of packet error rates correspond to different expected numbers of retransmissions; and The expected number of retransmissions is determined according to the level of the current average packet error rate.

11. The data transmission method according to claim 1, characterized in that: The A2DP service is an audio streaming service.

12. A data sending device, characterized in that: include: An A2DP service sending module is configured to transmit the A2DP service within the A2DP service time slice; Other service sending module, configured to transmit other services in other service time slices, the A2DP service time slices and the other service time slices are alternated with each other; as well as The scheduling module is configured to determine a next A2DP service time slice for the next transmission of the A2DP service.

13. An electronic device, characterized in that: include: a memory configured to store an executable program; as well as The processor is configured to call the program so that the electronic device executes the data sending method according to any one of claims 1 to 11.