Data transmission method and device, equipment, storage medium and computer program product

By acquiring the data status and environmental status of the terminal and dynamically adjusting the data packet type, the problem of poor anti-interference performance of the terminal is solved, and higher anti-interference ability and data transmission success rate are achieved.

CN119544144AActive Publication Date: 2025-02-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202311122422.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

During data transmission, the terminal's anti-interference performance is poor, especially in the scenario of heavy interference. Traditional technology prioritizes the use of long packet types, resulting in higher probability of data packets hitting interference, which wastes air interface resources during retransmission, affecting the transmission success rate.

Method used

By obtaining the terminal's current transmission data state and transmission environment state, the packet type is dynamically adjusted. For example, when the current data transmission rate requirement of the transmission data state characterization terminal is small and the transmission environment state characterization environment interference is large, a short packet type is selected for packet encapsulation to reduce the number of time slots occupied by a single data packet when sending, reduce the probability of interference collision, and improve the success rate of retransmission.

Benefits of technology

By dynamically adjusting the data packet type, the terminal's anti-interference performance during data transmission is improved, the time and resource waste of data packet retransmission are reduced, and the success rate and stability of data transmission are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544144A_ABST
    Figure CN119544144A_ABST
Patent Text Reader

Abstract

The invention relates to a data transmission method and device, equipment, a storage medium and a computer program product. The method comprises the steps of obtaining a current transmission data state and a current transmission environment state of a terminal in a process of performing data packet encapsulation on data to be transmitted; determining a data packet type corresponding to the to-be-transmitted data according to the transmission data state and the transmission environment state, and performing data packet encapsulation on the to-be-transmitted data according to the data packet type to obtain a plurality of target data packets; wherein the numbers of time slots occupied by single data packets corresponding to different data packet types are different when the single data packets are sent. By adopting the method, the anti-interference performance of the terminal in the data transmission process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method, apparatus, device, storage medium and computer program product. Background Art

[0002] In the process of data transmission, the data to be transmitted needs to be encapsulated into data packets before data transmission. Generally speaking, data packets are divided into long packets and short packets. Long packets, that is, a single data packet after encapsulation has a large amount of data and occupies a large number of time slots when sending a single data packet, and short packets, that is, a single data packet after encapsulation has a small amount of data and occupies a small number of time slots when sending a single data packet.

[0003] In conventional technology, in order to increase the data transmission rate as much as possible, a long packet type is usually used to encapsulate the data to be transmitted. However, in this way, the anti-interference performance of the terminal during the data transmission process is often poor. Summary of the invention

[0004] The embodiments of the present application provide a data transmission method, apparatus, device, storage medium and computer program product, which can improve the anti-interference performance of a terminal during data transmission.

[0005] In a first aspect, the present application provides a data transmission method. The method comprises:

[0006] In the process of encapsulating the data packets to be transmitted, obtaining the current transmission data status and transmission environment status of the terminal;

[0007] Determine the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and perform data packet encapsulation on the data to be transmitted according to the data packet type to obtain multiple target data packets;

[0008] Among them, a single data packet corresponding to different data packet types occupies a different number of time slots when being sent.

[0009] In a second aspect, the present application also provides a data transmission device. The device comprises:

[0010] The acquisition module is used to obtain the current transmission data state and transmission environment state of the terminal during the process of encapsulating the data packet to be transmitted;

[0011] An encapsulation module, used to determine the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and to perform data packet encapsulation on the data to be transmitted according to the data packet type to obtain multiple target data packets;

[0012] Among them, a single data packet corresponding to different data packet types occupies a different number of time slots when being sent.

[0013] In a third aspect, the present application further provides an electronic device, wherein the electronic device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0015] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0016] The above-mentioned data transmission method, device, equipment, storage medium and computer program product obtain the current transmission data state and transmission environment state of the terminal during the process of data packet encapsulation of the data to be transmitted, and then determine the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and then encapsulate the data packet of the data to be transmitted according to the data packet type to obtain multiple target data packets. The single data packets corresponding to different data packet types occupy different numbers of time slots when sending. The embodiment of the present application can dynamically adjust the number of time slots used by the terminal when encapsulating the data packet in combination with the transmission data state and the transmission environment state of the terminal. According to the packet type, for example, when the transmission data state represents that the current data transmission rate requirement of the terminal is relatively small and the transmission environment state represents that the environmental interference of the current transmission environment of the terminal is relatively large, the data packet type of the short packet can be selected for data packet encapsulation. In this way, the short packet has a smaller data volume and a smaller number of time slots occupied by a single data packet when sending. Therefore, the probability of the short packet "colliding" with environmental interference is lower. Moreover, even if the short packet collides with environmental interference and causes the short packet to be retransmitted, compared with the data packet type of the long packet used in the traditional technology, the short packet can be retransmitted in a shorter time and is more likely to be transmitted successfully, thereby improving the anti-interference performance of the terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are 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 creative work.

[0018] Figure 1 This is a schematic diagram of data interaction between the terminal and the TWS headset under three exemplary data packet types: 2DH1, 2DH3, and 2DH5;

[0019] Figure 2 This is a schematic diagram of an exemplary sudden interference during the data interaction between the terminal and the TWS headset;

[0020] Figure 3 A diagram of an implementation environment of a data transmission method in an embodiment;

[0021] Figure 4 is a flow chart of a data transmission method in one embodiment;

[0022] Figure 5 A schematic diagram of an exemplary terminal and a Bluetooth audio device periodically performing noise scanning in another embodiment;

[0023] Figure 6 is a flow chart of step 402 in another embodiment;

[0024] Figure 7 is a flow chart of step 402 in another embodiment;

[0025] Figure 8 A schematic diagram of an exemplary data packet type adjustment in another embodiment;

[0026] Fig. 9 is a structural block diagram of a data transmission device in one embodiment;

[0027] Fig.10 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0029] In the process of data transmission, the data to be transmitted needs to be encapsulated into data packets before data transmission. Generally speaking, data packets are divided into long packets and short packets. Long packets, that is, a single data packet after encapsulation has a large amount of data and occupies a large number of time slots when sending a single data packet, and short packets, that is, a single data packet after encapsulation has a small amount of data and occupies a small number of time slots when sending a single data packet.

[0030] In conventional technology, in order to increase the data transmission rate as much as possible, a long packet type is usually used to encapsulate the data to be transmitted. However, in this way, the anti-interference performance of the terminal during the data transmission process is poor.

[0031] Exemplarily, the data interaction between TWS (True Wireless Stereo) headphones and the terminal in the Bluetooth data transmission scenario is taken as an example to illustrate. With the maturity of TWS technology, TWS headphones have become extremely popular due to their portability, and the environments in which users use TWS headphones are becoming more and more complex, including outdoors, offices, airports, stations and other environments. Taking the more commonly used 2Mbps transmission rate as an example, the audio data packet types transmitted between the terminal and the TWS headphones include three types of data packets: 2DH1, 2DH3, and 2DH5. Under the three data packet types of 2DH1, 2DH3, and 2DH5, the data interaction behaviors between the terminal and the TWS headphones are as follows: Figure 1 shown.

[0032] Please refer to Figure 1 In the scenario where the terminal is connected to the TWS headset to play music, the terminal transmits a data packet (i.e., a data packet encapsulated according to the corresponding data packet format) to the TWS headset, and the TWS headset returns an acknowledgment packet (ACK indicates that the TWS headset successfully receives the data packet sent by the terminal, and NAK indicates that the TWS headset fails to successfully receive the data packet sent by the terminal). Figure 1 In the interactive behaviors corresponding to the three data packet types 2DH1, 2DH3, and 2DH5, "T" represents the data packet sent (TX) by the terminal to the TWS headset, and "A" represents the confirmation packet replied by the TWS headset.

[0033] like Figure 1 As shown, in the 2DH1 interaction behavior, the data packets (P0, P1, P2, ..., P5) sent by the terminal to the TWS headset each occupy 1 time slot (slot), and the confirmation packets (P0-ACK, P1-ACK, ..., P5-ACK) replied by the TWS headset each occupy 1 slot; in the 2DH3 interaction behavior, the data packets (P0, P1, P2) sent by the terminal to the TWS headset each occupy 3 slots, and the confirmation packets (P0-ACK, P1-ACK, P2-ACK) replied by the TWS headset each occupy 1 slot; in the 2DH5 interaction behavior, the data packets (P0, P1) sent by the terminal to the TWS headset each occupy 5 slots, and the confirmation packets (P0-ACK, P1-ACK) replied by the TWS headset each occupy 1 slot.

[0034] Since the air efficiency corresponding to each of the above data packet types (equivalent to the number of time slots occupied by a single data packet corresponding to each data packet type when being sent) and the size of the effective data volume (payload) in the encapsulated data packet are different, the limit throughput corresponding to each data packet type is different, as shown in Table 1:

[0035] Packet Type Payload header (bytes) User payload(bytes) Max RATE(kbps) 2DH1 2 0-54 345.6 2DH2 2 0-367 1117.4 2DH3 2 0679 1448.5

[0036] Table 1

[0037] Among them, Payload header is the amount of packet header data, User payload is the amount of data in a single data packet corresponding to the three data packet types of 2DH1, 2DH2, and 2DH3, and Max RATE is the maximum transmission rate corresponding to the three data packet types. As can be seen from Table 1, the data packet type with a larger amount of data in a single data packet has a greater limit transmission rate. Therefore, in traditional technology, during the data transmission process between the terminal and the TWS headset, the 2DH5 type is preferentially used to encapsulate the Bluetooth data to be transmitted, thereby increasing the Bluetooth data transmission rate as much as possible and ensuring that users enjoy higher sound quality. That is, traditional technology obtains better transmission sound quality through a larger transmission rate, and obtains more idle time and retransmission opportunities.

[0038] However, compared with the communication method of wired headphones, TWS headphones use short-range wireless communication technology (specifically Bluetooth communication technology), and its data transmission process is more susceptible to interference from other surrounding electromagnetic wave signals. In particular, Bluetooth uses the unlicensed ISM2.4G frequency band, and many devices also work in this frequency band, such as microwave ovens, cordless phones, infrared, wireless cameras, etc. Therefore, the Bluetooth signal of TWS headphones is easily affected by surrounding signals. The traditional technology preferentially uses the 2DH5 data packet type to encapsulate the Bluetooth data to be transmitted, and cannot achieve good performance in heavy interference scenarios.

[0039] For example, please combine Figure 2 , Figure 2This is a schematic diagram of burst interference in the process of data interaction between a terminal and a TWS headset. The interference in the actual environment is usually sudden interference, and the traditional technology defaults to using 2DH5 type data packets. Since a 2DH5 type data packet occupies 5 slots, that is, a 2DH5 type data packet occupies a relatively long time in the air interface at a time (compared to a 2DH3 type data packet that only occupies 3 slots and a 2DH1 type data packet that only occupies 1 slot, 5 slots are obviously greater than 3 slots or 1 slot), therefore, the probability of a 2DH5 type data packet encountering burst interference in the air interface is higher. In addition, once a 2DH5 type data packet is interfered with and needs to be retransmitted, the current 2DH5 type data packet needs to be retransmitted, which is a great waste of air interface resources. If the continuous transmission / retransmission of the 2DH5 type data packet encounters a burst retransmission, the user side will experience a phenomenon of freezing when listening to songs.

[0040] In view of this, the embodiment of the present application proposes a data transmission method, which can improve the anti-interference performance of the terminal. In the following, the data transmission method of the embodiment of the present application is introduced in combination with the implementation environment in which the data transmission method of the embodiment of the present application can be applied.

[0041] The data transmission method provided in the embodiment of the present application can be applied to Figure 3 In the implementation environment shown, the terminal 102 communicates with the opposite end 104 through the network. In the process of encapsulating the data packet to be transmitted, the terminal 102 obtains the current transmission data state and transmission environment state of the terminal 102, and the terminal 102 determines the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and encapsulates the data packet to be transmitted according to the data packet type to obtain multiple target data packets, and the terminal 102 sends the multiple target data packets to the opposite end 104, wherein the single data packet corresponding to different data packet types occupies different numbers of time slots when sending.

[0042] Among them, the terminal 102 and the counterpart 104 can be but are not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices, portable wearable devices, etc.; among them, the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, smart cars, etc., and the portable wearable devices can be smart watches, smart bracelets, head-mounted devices, headphones, etc.

[0043] In one embodiment, Figure 4 As shown, a data transmission method is provided, which is applied to Figure 3 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:

[0044] Step 401 : During the process of encapsulating data packets for data to be transmitted, the terminal obtains the current transmission data state and transmission environment state of the terminal.

[0045] The transmission data state may represent a data transmission rate requirement of the terminal during the current data transmission process, and the transmission data state may be in the form of a state value corresponding to the transmission data state.

[0046] For example, taking the data transmission process of the terminal sending a data packet to the TWS headset as an example, the larger the status value of the transmission data status, the higher the current data transmission rate requirement (that is, the sound quality requirement for the TWS headset to play audio) is. Conversely, the smaller the status value of the transmission data status, the lower the current data transmission rate requirement is.

[0047] In the embodiment of the present application, the transmission data status may include the current encoding bit rate of the terminal, and the encoding bit rate may be an audio bit rate, and of course, may also be a video bit rate.

[0048] Continuing with the above example of the terminal sending a data packet to the TWS headset, the higher the current encoding bit rate of the terminal, the higher the sound quality of the current audio, and accordingly a higher Bluetooth data transmission rate is required to support the audio of the encoding bit rate without lag; when the encoding bit rate is smaller, it indicates that the sound quality of the current audio is lower, and accordingly the required Bluetooth data transmission rate can also be lower, and it is not easy to lag.

[0049] Generally speaking, the terminal can adaptively adjust the current encoding bit rate. For example, when the data transmission rate requirement is high, the terminal can increase the encoding bit rate to send more data in the same time to improve the data transmission rate. When the data transmission rate requirement is low, the terminal can reduce the encoding bit rate accordingly. The data transmission rate requirement can be a user input obtained by the terminal, or it can be determined by the terminal itself according to relevant reference information (such as the transmission environment in which the terminal is currently located), etc.

[0050] In an embodiment of the present application, the terminal can periodically count and store the encoding bit rate of the terminal. In this way, in the process of encapsulating the data packet to be transmitted, the terminal can directly read the encoding bit rate that the terminal has most recently periodically counted. In other possible implementations, the terminal can also actively count the encoding bit rate of the terminal when the data to be transmitted is generated and the data packet to be transmitted needs to be encapsulated, and so on.

[0051] Among them, the way in which the terminal counts the current encoding bit rate can be that the terminal counts the rate of data volume (that is, the amount of data corresponding to unit time) encoded by the codec in the terminal and sent to the other side (for example, it can be the Bluetooth side, such as TWS headphones) within a preset time period, and uses the rate of the data volume as the current encoding bit rate of the terminal, and the unit of the encoding bit rate is kbps.

[0052] In this way, through the above implementation, during the process of encapsulating the data to be transmitted into data packets, the terminal obtains the current transmission data state of the terminal, that is, the encoding bit rate.

[0053] The following is an exemplary introduction to the process in which the terminal obtains the current transmission environment state of the terminal.

[0054] Similar to the transmission data state, the transmission environment state may characterize the transmission environment conditions during the current data transmission process of the terminal, such as interference conditions in the transmission environment. The transmission environment state may be in the form of a state value corresponding to the transmission environment state.

[0055] Exemplarily, the size of the state value of the transmission environment state may be negatively correlated with the environmental quality of the current transmission environment of the terminal. For example, the larger the state value of the transmission environment state, the worse the environmental quality of the current transmission environment, and the smaller the state value of the transmission environment state, the better the environmental quality of the current transmission environment. As an implementation mode, the transmission environment state includes at least one of the current transmission bit error rate of the terminal and the environmental noise energy value.

[0056] Similar to the coding bit rate, the terminal can periodically calculate and store the terminal's transmission bit error rate and environmental noise energy value. In this way, in the process of encapsulating the data packet to be transmitted, the terminal can directly read the transmission bit error rate and environmental noise energy value that the terminal calculated most recently periodically. In other possible implementations, the terminal can also actively calculate the terminal's transmission bit error rate and environmental noise energy value when the data packet to be transmitted is generated and needs to be encapsulated, and so on.

[0057] First, the method of calculating the transmission bit error rate by the terminal is introduced. For example, the terminal transmits a data packet (i.e., a data packet encapsulated according to a certain data packet type) to the other end, and the other end returns an acknowledgment packet or may not respond. The acknowledgment packet has two forms: ACK and NAK. ACK indicates that the other end has successfully received the data packet sent by the terminal, and NAK indicates that the other end has not successfully received the data packet sent by the terminal. In this way, the terminal can count the total number of data packets sent by the terminal to the other end within a preset time period, the number of ACKs returned by the terminal, and the number of NAKs returned by the terminal. The number of No Responses from the other end is obtained by subtracting the number of ACKs and the number of NAKs from the total number of data packets.

[0058] In this way, the terminal can calculate the transmission bit error rate (packet error rate, PER) according to the following formula:

[0059] PER = (number of NAKs + number of No Responses) / total number of packets

[0060] Next, the method for the terminal to obtain the environmental noise energy value is introduced.

[0061] As an implementation method, the terminal can scan the electromagnetic wave energy of the communication channel within a preset distance range around the terminal, that is, the noise energy of the communication channel, and obtain the noise energy value of each communication channel. The terminal can use the noise energy value of each communication channel as the current environmental noise energy value of the terminal, or the terminal can also perform statistical processing on the noise energy value of each communication channel to obtain the current environmental noise energy value of the terminal, and so on.

[0062] In other possible implementations, the other end may scan the electromagnetic wave energy of the communication channels within a preset distance range around the other end to obtain the noise energy value of each communication channel. Then, the other end sends the noise energy value of each communication channel to the terminal as the current environmental noise energy value of the terminal, or the other end performs statistical processing on the noise energy value of each communication channel and sends the result to the terminal as the current environmental noise energy value of the terminal.

[0063] For example, take the data interaction between the terminal and the Bluetooth audio device as an example, see Figure 5 , Figure 5 The figure is a schematic diagram of an exemplary terminal and a Bluetooth audio device periodically performing noise scanning. After the terminal is connected to the Bluetooth audio device, the terminal or the Bluetooth audio device periodically opens the Bluetooth scanning path to scan the electromagnetic wave energy of each Bluetooth channel around to obtain the noise energy value of each Bluetooth channel. The higher the noise energy value, the stronger the interference of the Bluetooth channel and the higher the probability of Bluetooth data transmission failure.

[0064] Thus, through the above implementation, in the process of encapsulating the data to be transmitted into data packets, the terminal obtains the current transmission environment state of the terminal, for example, including the above transmission bit error rate and environmental noise energy value.

[0065] Step 402: The terminal determines the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and performs data packet encapsulation on the data to be transmitted according to the data packet type to obtain multiple target data packets.

[0066] The terminal obtains the current transmission data status and transmission environment status of the terminal through the above-mentioned implementation method, and can select the data packet type in combination with the data transmission rate requirement represented by the transmission data status and the interference situation in the transmission environment represented by the transmission environment status. The single data packets corresponding to different data packet types occupy different numbers of time slots when sending, and the number of time slots occupied by the single data packet corresponding to each data packet type when sending is positively correlated with the data volume of the single data packet, that is, the more time slots a single data packet occupies when sending, the larger the data volume of the single data packet.

[0067] In the embodiment of the present application, the current data transmission corresponding to the data to be transmitted is cellular data transmission or short-range wireless communication data transmission.

[0068] When the terminal and the other end are conducting a voice call, the data packet types are divided into long packets and short packets; when the terminal and the other end are conducting short-distance wireless communication data transmission, the data packet types are also divided into long packets and short packets. Taking the Bluetooth data transmission scenario described above as an example, the data packet types can be 2DH1, 2DH3, and 2DH5. 2DH5 can be understood as a long packet, 2DH3 can be understood as a short packet, and so on.

[0069] When the terminal determines the data packet type corresponding to the data to be transmitted according to the transmission data status and the transmission environment status, for example, when the transmission data status indicates that the current data transmission rate requirement of the terminal is relatively small and the transmission environment status indicates that the environmental interference of the current transmission environment of the terminal is relatively large, then the data packet type of the short packet can be selected for data packet encapsulation. Since the short packet has a small amount of data and a small number of time slots occupied by a single data packet when sending, the probability of the short packet "colliding" with environmental interference is lower. Furthermore, even if the short packet collides with environmental interference and causes the short packet to be retransmitted, the short packet can be retransmitted in a shorter time and is more likely to be transmitted successfully, thereby improving the terminal's anti-interference performance.

[0070] In addition, as described above, the transmission data status may include the current coding rate of the terminal, and the transmission environment status includes at least one of the current transmission bit error rate and environmental noise energy value of the terminal. The process of the terminal determining the data packet type corresponding to the data to be transmitted based on the coding rate, transmission bit error rate and environmental noise energy value will be introduced in the following embodiments.

[0071] After the terminal determines the data packet type in the above manner, it can encapsulate the data to be transmitted according to the data volume of the single data packet indicated by the data packet type to obtain multiple target data packets. Then, the terminal sends each target data packet to the other end in sequence according to the number of time slots occupied by the single data packet indicated by the data packet type when it is sent.

[0072] In the above-mentioned embodiment, during the process of data packet encapsulation of the data to be transmitted, the current transmission data state and transmission environment state of the terminal are obtained, and then, according to the transmission data state and the transmission environment state, the data packet type corresponding to the data to be transmitted is determined, and then the data packet type corresponding to the data to be transmitted is encapsulated according to the data packet type to obtain multiple target data packets. The number of time slots occupied by a single data packet corresponding to different data packet types when being sent is different. The embodiment of the present application can dynamically adjust the data packet type when the terminal performs data packet encapsulation in combination with the transmission data state and the transmission environment state of the terminal. For example, when the transmission data state indicates that the current data transmission rate requirement of the terminal is relatively small and the transmission environment state indicates that the environmental interference of the current transmission environment of the terminal is relatively large, a short packet data packet type can be selected for data packet encapsulation. In this way, the short packet has a small amount of data and a small number of time slots occupied by a single data packet when being sent. Therefore, the probability of the short packet "colliding" with environmental interference is lower. Moreover, even if the short packet collides with environmental interference and causes the short packet to be retransmitted, compared with the method of using the long packet data packet type for data packet encapsulation in the traditional technology, the short packet can be retransmitted in a shorter time, and it is easier to transmit successfully, thereby improving the anti-interference performance of the terminal.

[0073] In one embodiment, based on Figure 4 The embodiment shown, see Figure 6 This embodiment relates to a process in which, when the transmission data state includes the current encoding bit rate of the terminal and the transmission environment state includes at least one of the current transmission bit error rate of the terminal and the environmental noise energy value, the terminal determines the type of data packet corresponding to the data to be transmitted according to the transmission data state and the transmission environment state. Figure 6 As shown, step 402 includes Figure 6 Step 601 and step 602 are shown:

[0074] Step 601: If the encoding rate is within the encoding rate threshold range, the terminal determines the data packet type according to the transmission bit error rate.

[0075] The coding rate threshold interval can be set by itself during implementation, or it can be set in combination with the current data transmission scenario of the terminal. For example, the terminal can preset the correspondence between the identifiers of each data transmission scenario and each coding rate threshold interval. In this way, the terminal can obtain the identifier of the current data transmission scenario and find the corresponding coding rate threshold interval in the above correspondence. The data transmission scenarios include Bluetooth data transmission scenarios, WIFI (Wireless Fidelity) transmission scenarios, voice call transmission scenarios, and so on.

[0076] Taking self-setting as an example, illustratively, a first encoding rate threshold and a second encoding rate threshold can be set, and the first encoding rate threshold is greater than the second encoding rate threshold. The first encoding rate threshold and the second encoding rate threshold are used as the two endpoint values ​​of the interval to obtain the encoding rate threshold interval.

[0077] After the terminal determines the encoding bit rate threshold interval, the terminal first detects whether the current encoding bit rate of the terminal is within the encoding bit rate threshold interval.

[0078] The coding rate threshold interval can represent a numerical range of moderate coding rate. If the current coding rate of the terminal is within the coding rate threshold interval, it indicates that the current data transmission rate requirement is moderate or small, that is, the data transmission rate requirement is neither very high nor very low. The terminal can dynamically adjust the data packet type according to the transmission environment status.

[0079] Therefore, if the current encoding rate of the terminal is within the encoding rate threshold range, the terminal determines the data packet type according to the size of the transmission bit error rate.

[0080] like Figure 7 As shown, step 601 may include Figure 7 Step 701 and step 702 shown:

[0081] Step 701: If the encoding rate is within the encoding rate threshold range and the transmission bit error rate is less than or equal to the transmission bit error rate threshold, the terminal determines that the data packet type is the first data packet type.

[0082] The first data packet type may be, for example, a long packet type.

[0083] When the coding rate is within the coding rate threshold range, the terminal compares the current transmission bit error rate of the terminal with the preset transmission bit error rate threshold. The setting method of the transmission bit error rate threshold can be similar to the setting method of the above-mentioned coding rate threshold range, which will not be repeated here.

[0084] The transmission bit error rate is equivalent to the packet retransmission rate. The larger the transmission bit error rate, the larger the packet retransmission rate. The smaller the transmission bit error rate, the smaller the packet retransmission rate. If the current transmission bit error rate of the terminal is less than or equal to the transmission bit error rate threshold, the packet retransmission rate is relatively small, indicating that the transmission environment is good at this time. Therefore, the long packet type can be used. In this case, the use of the long packet type can ensure that the encapsulated target data packets occupy less air interface time as a whole, so that the remaining air interface time of the entire air interface becomes more, so that more retransmission opportunities can be obtained in the remaining air interface time.

[0085] To sum up, when the coding rate is within the coding rate threshold range and the transmission bit error rate is less than or equal to the transmission bit error rate threshold, it is mainly for scenarios with moderate coding rate and relatively clean environment. The first data packet type is used. Since the current transmission bit error rate is low, it will not cause the problem of poor transmission success rate, and can ensure that each target data packet after encapsulation occupies a lower air interface time as a whole to obtain more retransmission opportunities.

[0086] Step 702: If the encoding rate is within the encoding rate threshold range and the transmission bit error rate is greater than the transmission bit error rate threshold, the terminal determines the data packet type according to the environmental noise energy value.

[0087] When the coding rate is within the coding rate threshold range, if the transmission bit error rate is greater than the transmission bit error rate threshold, that is, the packet retransmission rate is relatively large, in this case, it can be understood that the packet retransmission rate may be relatively large due to environmental interference, or it may be due to other reasons, for example, the distance between the terminal and the other end is far in short-distance wireless communication data transmission. Therefore, it is necessary to distinguish the size of the environmental noise energy value to determine the packet type.

[0088] Exemplarily, for the process of determining the data packet type according to the size of the environmental noise energy value by the terminal, in a possible implementation, if the environmental noise energy value is less than or equal to the noise energy threshold, the terminal determines that the data packet type is the first data packet type. The noise energy threshold can be set based on experience in implementation, and of course, it can also be similar to the setting method of the encoding bit rate threshold interval, and can be searched through the identifier of the current data transmission scenario, and so on.

[0089] In this implementation, when the coding rate is within the coding rate threshold range, the transmission bit error rate is greater than the transmission bit error rate threshold, and the environmental noise energy value is less than or equal to the noise energy threshold, it indicates that although the data packet retransmission rate is relatively large at this time, the reason for the high transmission bit error rate / high data packet retransmission rate is not caused by interference in the transmission environment (because the environmental noise energy value is relatively small), and the data packet retransmission rate may be relatively large due to other reasons. For example, in short-distance wireless communication data transmission, the distance between the terminal and the other end is far, resulting in retransmission caused by weak signal strength. Therefore, the first data packet type (i.e., long packet type) transmission can obtain better bandwidth and more retransmission opportunities, which is more conducive to improving the success rate of data transmission and improving user experience.

[0090] In another possible implementation, if the environmental noise energy value is greater than the noise energy threshold, the terminal determines that the data packet type is the second data packet type.

[0091] In this implementation, when the coding rate is within the coding rate threshold interval, the transmission bit error rate is greater than the transmission bit error rate threshold, and the environmental noise energy value is greater than the noise energy threshold, indicating that the interference in the transmission environment is the main reason for the high transmission bit error rate / high data packet retransmission rate. In the case of severe interference, the terminal can adjust the data packet type to a second data packet type. The number of time slots occupied by a single data packet corresponding to the first data packet type when sending is greater than the number of time slots occupied by a single data packet corresponding to the second data packet type when sending, and the data volume of a single data packet corresponding to the first data packet type is also greater than the data volume of a single data packet corresponding to the second data packet type. The second data packet type can be understood as a "short packet" type to improve the anti-interference characteristics of the terminal.

[0092] Please combine Figure 8 , Figure 8 This is a schematic diagram of an exemplary data packet type adjustment. For example, short-range wireless communication data transmission, specifically Bluetooth data transmission scenario, is used as an example, and data interaction between a TWS headset and a terminal is used. Figure 8 As shown, the traditional technology uses the 2DH5 type by default. Figure 8 The data packet "0" in the figure is a data packet obtained by 2DH5 type encapsulation. Since the data packet "0" is long (large data volume and occupies many time slots), it is easy to collide with interference retransmission. At the same time, the retransmitted data packet (that is, the complete data packet "0") is too long and will most likely collide with interference again, resulting in poor anti-interference performance of the terminal.

[0093] In the embodiment of the present application, when the encoding rate is within the encoding rate threshold range, the transmission bit error rate is greater than the transmission bit error rate threshold, and the environmental noise energy value is greater than the noise energy threshold, it is adjusted to use the 2DH3 type to encapsulate the data packet, such as Figure 8 As shown, the data packet "0" obtained by using the 2DH5 type encapsulation is adjusted to the data packet "01" using the 2DH3 type encapsulation in the embodiment of the present application. Since the data packet "01" has not transmitted all the data of a data packet "0", it is determined according to the size of the remaining data that one (or more) data packets "02" using the 2DH3 type or 2DH1 type encapsulation are transmitted, wherein the 2DH3 type or 2DH1 type is determined by the size of the remaining data. If the remaining data amount is greater than the preset threshold, the 2DH3 type is selected, otherwise the 2DH1 type is selected.

[0094] Among them, when using 2DH3 type encapsulated data packets for transmission, although the data volume of a single data packet is reduced, the 2DH3 type data packet can be retransmitted in a shorter time after the data packet hits interference, such as Figure 8The first 2DH3 type data packet in the "Packet Type Adjustment" row shown needs to be retransmitted due to receiving a "NAK" confirmation packet. The probability of the retransmitted 2DH3 type data packet encountering interference again is also very low, so it is more likely to be transmitted successfully.

[0095] In addition, although the data volume of a data packet encapsulated with 2DH3 type is smaller than that of a data packet encapsulated with 2DH5 type, one 2DH3 type data packet cannot transmit all the data of one 2DH5 type data packet, and one or more 2DH1 / 2DH3 type data packets need to be transmitted. However, even so, the probability of encountering interference with multiple transmitted data packets (2DH3 type or 2DH1 type) is still lower due to its shorter duration, so the overall transmission efficiency is higher, such as Figure 8 As shown, air interface resources can be saved.

[0096] exist Figure 6-Figure 8 In any of the embodiments shown, when the current data transmission is Bluetooth data transmission in short-range wireless communication data transmission, the first data packet type is 2DH5 type and the second data packet type is 2DH3 type. For the relevant introduction of the first data packet type and the second data packet type, please refer to the relevant description of the above embodiment and will not be repeated here.

[0097] Step 602: The terminal encapsulates the data to be transmitted according to the data packet type to obtain multiple target data packets.

[0098] In this way, after the terminal determines the data packet type corresponding to the data to be transmitted based on the terminal's current coding rate, transmission bit error rate and environmental noise energy value, it can encapsulate the data to be transmitted according to the data amount of a single data packet indicated by the data packet type to obtain multiple target data packets. Then, the terminal sends each target data packet to the other end in sequence according to the number of time slots occupied by the single data packet indicated by the data packet type when it is sent.

[0099] The embodiment of the present application dynamically adjusts the data packet type by combining the terminal's current coding rate, transmission error rate, and environmental noise energy value indicators, taking into account both the data transmission rate and the terminal's anti-interference characteristics.

[0100] In one embodiment, based on Figure 4 In the embodiment shown, the data transmission method of this embodiment further includes the following steps A1 and A2:

[0101] Step A1: If the encoding rate is greater than the maximum encoding rate threshold in the encoding rate threshold interval, the terminal determines that the data packet type is the first data packet type.

[0102] When the current encoding rate of the terminal is greater than the maximum encoding rate threshold, it indicates that the data transmission rate requirement is relatively high at this time. Therefore, the first data packet type (ie, long packet type) is preferentially selected to ensure sufficient bandwidth.

[0103] Step A2: If the encoding rate is less than or equal to the minimum encoding rate threshold in the encoding rate threshold interval, the terminal determines that the data packet type is the second data packet type.

[0104] Taking the data interaction between TWS headphones and terminals in the Bluetooth data transmission scenario as an example, when the current coding rate of the terminal is less than or equal to the minimum coding rate threshold, it means that the data transmission rate requirement at this time is relatively low. Therefore, regardless of whether the environmental quality is good or poor, the use of the second data packet type (ie, 2DH3 type) can be sufficient to support audio data without lag and low air interface resource occupation, and can cope with low-probability sudden interference scenarios in the environment, ensuring a lower probability of lag in the TWS headphones.

[0105] Below, taking the current data transmission corresponding to the data to be transmitted as short-range wireless communication data transmission as an example, specifically taking the Bluetooth data transmission between the mobile phone and the TWS headset as an example (it can be a 2Mbps transmission scenario or a 3Mbps transmission scenario), the implementation method of the data transmission method of the embodiment of the present application is illustrated by example.

[0106] The data transmission method comprises the following steps:

[0107] Step a: During the process of encapsulating data packets for data to be transmitted, the mobile phone obtains the current encoding bit rate, transmission bit error rate and environmental noise energy value of the terminal.

[0108] Step b: If the encoding bit rate is within the encoding bit rate threshold range, the mobile phone detects the relationship between the transmission bit error rate and the transmission bit error rate threshold.

[0109] As described above, a first encoding rate threshold and a second encoding rate threshold can be set, and the first encoding rate threshold is greater than the second encoding rate threshold. The first encoding rate threshold and the second encoding rate threshold are used as two endpoint values ​​of the interval to obtain the encoding rate threshold interval.

[0110] Step c: if the transmission bit error rate is greater than the transmission bit error rate threshold, and the environmental noise energy value is less than or equal to the noise energy threshold, the mobile phone determines that the data packet type is 2DH5.

[0111] Step d: If the transmission bit error rate is greater than the transmission bit error rate threshold, and the environmental noise energy value is greater than the noise energy threshold, the mobile phone determines that the data packet type is 2DH3.

[0112] It should be noted that, as described above, the terminal can scan the electromagnetic wave energy of the communication channel within a preset distance range around the terminal, that is, the noise energy of the communication channel, and obtain the noise energy value of each communication channel. The terminal can use the noise energy value of each communication channel as the current environmental noise energy value of the terminal.

[0113] In this way, in the process of comparing the environmental noise energy value with the noise energy threshold, the terminal needs to compare the noise energy value of each communication channel with the noise energy threshold respectively.

[0114] If among the communication channels, at least some of the communication channels have noise energy values ​​greater than the noise energy threshold, it is determined that the ambient noise energy value of the terminal is greater than the noise energy threshold; otherwise, it is determined that the ambient noise energy value of the terminal is less than or equal to the noise energy threshold, wherein the number of "partial communication channels" can be set by oneself during implementation.

[0115] Step e: if the transmission bit error rate is less than or equal to the transmission bit error rate threshold, the mobile phone determines that the data packet type is 2DH5.

[0116] Step f: if the encoding rate is greater than the maximum encoding rate threshold value (ie, the first encoding rate threshold value) in the encoding rate threshold range, the mobile phone determines that the data packet type is 2DH5.

[0117] Step g: if the encoding rate is less than or equal to the minimum encoding rate threshold value (ie, the second encoding rate threshold value) in the encoding rate threshold range, the mobile phone determines that the data packet type is 2DH3.

[0118] In step h, the mobile phone encapsulates the data to be transmitted according to the data packet type determined in steps b to g to obtain multiple target data packets, and sends the multiple target data packets to the TWS headset in sequence.

[0119] Referring to Table 2, in the above data transmission method, the process of determining the data packet type can be simply summarized as shown in Table 2:

[0120]

[0121] Table 2

[0122] The encoding bit rate of the above-mentioned embodiment can be an audio bit rate. In this way, by combining the indicators of the current audio bit rate, transmission bit error rate and environmental noise energy value of the terminal, the data packet type is dynamically adjusted, taking into account the data transmission rate and the anti-interference characteristics of the terminal, thereby ensuring that the user end can enjoy Bluetooth high-definition sound quality and listen to music through Bluetooth without lag in harsh environments or sudden interference environments, thereby optimizing the user-end Bluetooth sound quality and Bluetooth lag experience.

[0123] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0124] Based on the same inventive concept, the embodiment of the present application also provides a data transmission device for implementing the data transmission method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data transmission device embodiments provided below can refer to the limitations on the data transmission method above, and will not be repeated here.

[0125] In one embodiment, Fig. 9 As shown, a data transmission device is provided, comprising:

[0126] The acquisition module 901 is used to acquire the current transmission data state and transmission environment state of the terminal during the process of encapsulating the data packet to be transmitted;

[0127] The encapsulation module 902 is used to determine the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and to perform data packet encapsulation on the data to be transmitted according to the data packet type to obtain multiple target data packets;

[0128] Among them, a single data packet corresponding to different data packet types occupies a different number of time slots when being sent.

[0129] In one of the embodiments, the transmission data state includes the current encoding code rate of the terminal, and the transmission environment state includes at least one of the current transmission bit error rate of the terminal and the environmental noise energy value.

[0130] In one of the embodiments, the encapsulation module 902 is specifically configured to determine the data packet type according to the transmission bit error rate if the encoding rate is within a encoding rate threshold range.

[0131] In one of the embodiments, the encapsulation module 902 is specifically configured to determine the data packet type according to the size of the environmental noise energy value if the transmission bit error rate is greater than a transmission bit error rate threshold.

[0132] In one embodiment, the encapsulation module 902 is specifically used to determine that the data packet type is a first data packet type if the ambient noise energy value is less than or equal to a noise energy threshold; if the ambient noise energy value is greater than the noise energy threshold, determine that the data packet type is a second data packet type, and the number of time slots occupied by a single data packet corresponding to the first data packet type when sent is greater than the number of time slots occupied by a single data packet corresponding to the second data packet type when sent.

[0133] In one of the embodiments, the encapsulation module 902 is specifically configured to determine that the data packet type is the first data packet type if the transmission bit error rate is less than or equal to the transmission bit error rate threshold.

[0134] In one of the embodiments, the encapsulation module 902 is further configured to determine that the data packet type is the first data packet type if the encoding bit rate is greater than a maximum encoding bit rate threshold in the encoding bit rate threshold interval.

[0135] In one of the embodiments, the encapsulation module 902 is further configured to determine that the data packet type is a second data packet type if the encoding rate is less than or equal to a minimum encoding rate threshold in the encoding rate threshold interval.

[0136] In one of the embodiments, the current data transmission corresponding to the data to be transmitted is cellular data transmission or short-range wireless communication data transmission;

[0137] Wherein, in the case that the current data transmission is Bluetooth data transmission in the short-range wireless communication data transmission, the first data packet type is 2DH5 type, and the second data packet type is 2DH3 type.

[0138] Each module in the above data transmission device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0139] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.10As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data transmission method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device housing, or an external keyboard, touchpad or mouse.

[0140] Those skilled in the art will understand that Fig.10 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0141] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the data transmission method.

[0142] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the data transmission method.

[0143] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0145] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0146] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data transmission method, characterized in that: include: In the process of encapsulating the data packets to be transmitted, obtaining the current transmission data status and transmission environment status of the terminal; Determine the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and perform data packet encapsulation on the data to be transmitted according to the data packet type to obtain multiple target data packets; Among them, a single data packet corresponding to different data packet types occupies a different number of time slots when being sent.

2. The method according to claim 1, characterized in that: The transmission data state includes the current encoding code rate of the terminal, and the transmission environment state includes at least one of the current transmission bit error rate of the terminal and the environmental noise energy value.

3. The method according to claim 2, characterized in that The determining, according to the transmission data state and the transmission environment state, a data packet type corresponding to the data to be transmitted includes: If the encoding rate is within the encoding rate threshold range, the data packet type is determined according to the transmission bit error rate.

4. The method according to claim 3, characterized in that The step of determining the data packet type according to the transmission bit error rate comprises: If the transmission bit error rate is greater than the transmission bit error rate threshold, the data packet type is determined according to the size of the environmental noise energy value.

5. The method according to claim 4, characterized in that The step of determining the data packet type according to the size of the environmental noise energy value includes: If the environmental noise energy value is less than or equal to the noise energy threshold, determining that the data packet type is a first data packet type; If the environmental noise energy value is greater than the noise energy threshold, the data packet type is determined to be a second data packet type, and the number of time slots occupied by a single data packet corresponding to the first data packet type when sent is greater than the number of time slots occupied by a single data packet corresponding to the second data packet type when sent.

6. The method according to claim 4, characterized in that The step of determining the data packet type according to the transmission bit error rate further comprises: If the transmission bit error rate is less than or equal to the transmission bit error rate threshold, the data packet type is determined to be the first data packet type.

7. The method according to claim 2, characterized in that The method further comprises: If the encoding bit rate is greater than the maximum encoding bit rate threshold in the encoding bit rate threshold interval, the data packet type is determined to be the first data packet type.

8. The method according to claim 2, characterized in that: The method further comprises: If the encoding rate is less than or equal to the minimum encoding rate threshold in the encoding rate threshold interval, the data packet type is determined to be the second data packet type.

9. The method according to any one of claims 5 to 8, characterized in that: The current data transmission corresponding to the data to be transmitted is cellular data transmission or short-range wireless communication data transmission; Wherein, in the case that the current data transmission is Bluetooth data transmission in the short-range wireless communication data transmission, the first data packet type is 2DH5 type, and the second data packet type is 2DH3 type.

10. A data transmission device, characterized in that: include: The acquisition module is used to obtain the current transmission data state and transmission environment state of the terminal during the process of encapsulating the data packet to be transmitted; An encapsulation module, used to determine the data packet type corresponding to the data to be transmitted according to the transmission data state and the transmission environment state, and to perform data packet encapsulation on the data to be transmitted according to the data packet type to obtain multiple target data packets; Among them, a single data packet corresponding to different data packet types occupies a different number of time slots when being sent.

11. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 9.

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

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Method and device for regulating and controlling coding parameters, equipment and storage medium

    CN110265046A

  • Dynamic regulation method and system for Bluetooth audio

    CN110689899A

  • Audio data encoding method and device, audio data decoding method and device, electronic equipment and storage medium

    CN111128203A

  • Communication method and terminal equipment

    CN111385778A

  • Bluetooth communication method and device

    CN114650523A