A data transmission method and apparatus
By predicting and suppressing interference by sending empty frames with the same priority in the Wi-Fi network, the latency and jitter problems caused by co-channel interference are solved, improving the channel contention success rate of service frames and user experience.
Patent Information
- Application Number
- CN202111028104.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-02
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2041-09-02
AI Technical Summary
In Wi-Fi networks, due to limited channel resources, co-channel interference leads to increased latency and jitter, which in particular affects user experience in latency-sensitive applications.
Several empty frames are sent before the next service frame is generated. The empty frames have the same priority as the service frames, and the sending time of the empty frames is determined according to the predicted service frame generation time, so as to improve the channel preemption success rate.
It reduces end-to-end latency and jitter, improves the channel contention success rate of service frames, and enhances user experience.
Smart Images

Figure CN115767639B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data transmission method and apparatus. Background Technology
[0002] In environments such as homes, offices, and shopping malls, the use of wireless fidelity (Wi-Fi) devices is increasing. Although the system performs channel selection to operate on the cleanest possible channel, Wi-Fi primarily operates in two frequency bands: 2.4 GHz (G) and 5 GHz. Figure 1a As shown, in the 2.4GHz band, the number of non-interfering frequency bands is very limited, typically only channels 1, 6, and 11. Furthermore, 5GHz frequency bands are unavailable in some countries or regions. For example, Figure 1b As shown, the available 5G frequency bands in China are very limited, with only three 80MHz bands and one 160MHz band. Due to the limited 2.4G / 5G channel resources, co-channel interference is unavoidable when using Wi-Fi; co-channel interference refers to the mutual interference between two wireless devices operating on the same frequency. When co-channel interference occurs, it often leads to increased packet loss rate, increased latency, and increased jitter. For latency-sensitive applications (such as screen mirroring applications), increased latency and jitter degrade the user experience. Therefore, how to minimize latency and jitter for latency-sensitive applications in a wireless network environment with co-channel interference, while adhering to the 802.11 protocol, is a pressing technical problem that needs to be solved. Summary of the Invention
[0003] To achieve the aforementioned technical objectives, this application provides a data transmission method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can send several empty frames before the next service frame is generated, thereby improving the channel preemption success rate of service frames and reducing end-to-end latency.
[0004] Firstly, a data transmission method is provided, comprising: generating at least one empty frame after generating a first service frame and before generating a second service frame, wherein the second service frame is the next service frame after the first service frame, and the empty frame has the same priority as the first service frame and / or the second service frame; and transmitting the empty frame before generating the second service frame. In this way, by transmitting several empty frames with the same priority as the service frames before the generation of the next service frame, the channel preemption success rate of service frames is improved, and end-to-end latency is reduced.
[0005] According to the first aspect, before sending the empty frame, the method further includes: obtaining the generation time of the second service frame and determining the start transmission time of the empty frame. This allows for the prediction of the generation time of the second service frame, thereby determining the start transmission time of the empty frame and improving the success rate of the empty frame preempting the channel.
[0006] According to the first aspect, or any implementation of the first aspect above, the generation time of the second service frame is obtained, specifically including: determining the generation time of the second service frame based on the generation time of the first service frame, the generation time of the service frame preceding the first service frame, and the difference between the generation times of two adjacent service frames within a preset time period. Thus, the generation time of the second service frame is predicted.
[0007] According to the first aspect, or any implementation of the first aspect above, sending a null frame specifically includes: sending a null frame once at a preset time interval. This allows for sending a null frame at regular intervals, thereby improving the success rate of null frames preempting the channel.
[0008] According to the first aspect, or any implementation of the first aspect above, the method further includes: stopping the transmission of empty frames when the number of empty frames sent reaches a preset number, and / or clearing the empty frames to be sent. This avoids the phenomenon of excessive empty frames causing transmission queue congestion, thereby preventing delays in the transmission of service frames.
[0009] According to the first aspect, or any implementation of the first aspect above, the method further includes: clearing the empty frames to be sent after the second service frame is generated. This avoids the phenomenon of excessive empty frames causing transmission queue congestion, thereby preventing service frame transmission delays.
[0010] According to the first aspect, or any implementation of the first aspect above, the priority of the target service frame is higher than the priority of other data frames, and the target service frame includes the first service frame and / or the second service frame. This allows critical data in the service to be transmitted first, preventing other frames from preempting the channel and improving data transmission efficiency.
[0011] According to the first aspect, or any implementation of the first aspect above, the method is applied to an electronic device, wherein the network environment in which the electronic device is located includes at least one device operating at the same frequency as the electronic device. For example, the network environment may be a Wi-Fi network environment.
[0012] In a second aspect, a data transmission apparatus is provided, comprising: a processing module for generating at least one empty frame after generating a first service frame and before generating a second service frame, wherein the second service frame is the next service frame after the first service frame, and the empty frame has the same priority as the first service frame and / or the second service frame; and a communication module for transmitting the empty frame before the processing module generates the second service frame.
[0013] According to the second aspect, before the communication module sends the empty frame, the processing module is also used to: obtain the generation time of the second service frame and determine the start time of sending the empty frame.
[0014] According to the second aspect, or any implementation of the second aspect above, the processing module is specifically used to: determine the generation time of the second service frame based on the generation time of the first service frame, the generation time of the previous service frame of the first service frame, and the difference between the generation times of two adjacent service frames within a preset time period.
[0015] According to the second aspect, or any implementation of the second aspect above, the communication module is specifically used to: send an empty frame once every preset time interval.
[0016] According to the second aspect, or any implementation of the second aspect above, the processing module is further configured to: stop sending empty frames when the number of empty frames sent reaches a preset number, and / or clear the empty frames to be sent.
[0017] According to the second aspect, or any implementation of the second aspect above, the processing module is further configured to: clear the empty frames to be sent after the second service frame is generated.
[0018] According to the second aspect, or any implementation of the second aspect above, the priority of the target service frame is greater than the priority of the data frames other than the target service frame, and the target service frame includes the first service frame and / or the second service frame.
[0019] According to the second aspect, or any implementation of the second aspect above, the data transmission device is deployed on an electronic device, and the network environment in which the electronic device is located includes at least one device operating at the same frequency as the electronic device.
[0020] Thirdly, a data transmission apparatus is provided, comprising: at least one memory for storing a program; and at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute a method as described in the first aspect or any implementation thereof.
[0021] Fourthly, an electronic device is provided, comprising: at least one memory for storing a program; and at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute a method as described in the first aspect or any implementation thereof.
[0022] Fifthly, a computer-readable storage medium is provided, which stores a computer program that, when run on an electronic device, causes the electronic device to perform a method as described in the first aspect or any implementation thereof.
[0023] In a sixth aspect, a computer program product is provided, characterized in that, when the computer program product is run on an electronic device, it causes the electronic device to execute a method as described in the first aspect or any one of the implementations of the first aspect.
[0024] A seventh aspect provides a data processing apparatus, including at least one processor and an interface; the at least one processor acquires program instructions or data through the interface; the at least one processor is configured to execute program line instructions to implement a method as described in the first aspect or any implementation thereof. For example, the data processing apparatus may be a chip.
[0025] It is understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0026] Figure 1a This is a schematic diagram of a 2.4G channel allocation provided in an embodiment of this application;
[0027] Figure 1b This is a schematic diagram of a 5G channel allocation provided in an embodiment of this application;
[0028] Figure 2a This is a schematic diagram illustrating the process of two stations competing for a channel under a DCF mechanism provided in an embodiment of this application;
[0029] Figure 2b This is a schematic diagram illustrating the process of two stations competing for a channel under another DCF mechanism provided in this application embodiment;
[0030] Figure 3 This is a schematic diagram illustrating four different access categories (ACs) defined under an EDCA mechanism provided in an embodiment of this application;
[0031] Figure 4 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application;
[0032] Figure 5This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0033] Figure 6 This is a flowchart illustrating a data transmission method provided in an embodiment of this application;
[0034] Figure 7 This is a schematic diagram illustrating the communication process between different layers during data transmission, as provided in an embodiment of this application.
[0035] Figure 8a This is a schematic diagram illustrating co-channel interference experienced by a transmitter during the transmission of service frames, provided in an embodiment of this application.
[0036] Figure 8b This is a schematic diagram illustrating another instance of a transmitter experiencing co-channel interference during the transmission of service frames, provided in an embodiment of this application.
[0037] Figure 9 This is a schematic diagram illustrating the steps of a data transmission method provided in an embodiment of this application;
[0038] Figure 10 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application;
[0039] Figure 11 This is a schematic diagram of another data transmission device provided in an embodiment of this application. Detailed Implementation
[0040] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one or more (including two). The term “and / or” is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.
[0041] References to "one embodiment" or "some embodiments" as used in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes both direct and indirect connections, unless otherwise stated.
[0042] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0043] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0044] Generally, such as Figure 2a As shown, in the 802.11 protocol, media access control (MAC) follows the distributed coordination function (DCF) mode. In this mode, each site competes for access to the channel and has the same priority. For details, please refer to [link to relevant documentation]. Figure 2a Both Station (STA)1 and STA2 need to transmit data and wait for the distributed inter-frame spacing (DIFS) time. If the channel remains idle, a backoff process is performed. During the backoff process, STA1 and STA2 select a random number from the contention window (CW). In the 802.11 protocol, the default initial contention window is 31, meaning the range of the random backoff count is [0, 31]. Figure 2aIn this scenario, STA 1 selected 8, while STA 2 selected 2. During the backoff process, after each slot time, STA 1 and / or STA 2 "listen" to the channel once. If the channel is idle, the corresponding random backoff counter value is decremented by 1. Figure 2a In the process, after 3 slot times, the random countdown counter of STA 1 decreases from 8 to 5, while that of STA 2 decreases from 2 to 0. When the random countdown counter of an STA reaches 0, the STA competes for the channel and can then transmit data. Figure 2a In the backoff process, after STA 2 obtains the channel, it sends data packet A (PACKETA) to the access point (AP). Upon receiving the data, the AP uses a cyclic redundancy check (CRC) mechanism to verify it. If the verification passes, the AP sends an acknowledgment frame (ACK) after a short interframe space (SIFS). After STA 2 successfully sends its data and waits for the SIFS period, it receives the ACK from the AP. Once STA 2 successfully receives the ACK, the transmission is complete. After this transmission, STA 1 and / or STA 2 need to wait again for the DIFS period before restarting the backoff process. If the station has just sent data, a new random number needs to be selected from the contention window for counting down at the start of the backoff process. If the station has not sent any data, the counting down continues directly from the previous result. Figure 2a If STA1 fails to compete for the channel, then during the second backoff process, it directly counts down from 5 to 4 based on the previous count, thereby ensuring the fairness of network transmission.
[0045] Furthermore, such as Figure 2b As shown, after "waiting" for DIFS, STA1 and STA2 each select a random number from their respective competition window CW. However, coincidentally, they both randomly selected the same value: 3 as the random backoff counter. Figure 2bIn the area marked by the dashed box, after 3 slot times, both signals count down to 0 simultaneously, meaning they will send data at the same time. At the AP, due to signal interference, neither signal can be correctly decoded, resulting in a CRC check error and a collision. After the collision, if the CRC check fails at the AP, no ACK packet will be sent to either node. Therefore, after the ACK timeout, both nodes wait for the EIFS before preparing for the next round of contention. Before entering the next round of contention, the site needs to use a binary exponential backoff (BEB) mechanism for the contention window (CW). Initially, the default CW range for a node is [0, 31]. However, with a large number of nodes, the aforementioned collision problem may occur, requiring an expansion of the contention window CW. That is, after a collision, the contention window CW range changes from [0, 31] to [0, 63]. Figure 2b As shown, after the collision, STA 1 randomly selects 50 again, and STA 2 randomly selects 32 again. In the 802.11 protocol, a total of 6 rollbacks are allowed. On the 7th attempt, the window is not doubled, and a retransmission is attempted. If this also fails, the packet is lost.
[0046] As described above, while the DCF mechanism can effectively reduce the probability of collisions when multiple nodes access the network simultaneously, it does not support Quality of Service (QoS). Different services have different packet sizes and varying requirements for latency and jitter. For example, email and internet browsing packets are small and have lower latency requirements; while audio and video services have very high latency requirements and need to provide a higher QoS experience. This makes it impossible for the DCF mechanism, which is based on equal opportunity access to the channel, to provide different levels of QoS.
[0047] In order to provide access services of different quality to different applications, the 802.11 working group has formulated an enhanced distributed channel access (EDCA) mechanism. To ensure the different QoS requirements of different services, the EDCA algorithm defines eight traffic categories (TCs) based on IEEE 802.1D at the upper layer and four access categories (ACs) at this layer. The eight TCs are mapped to the queues of the four ACs, that is, each channel defines four different access categories (ACs). The access categories can be represented as AC[0]-AC[3], with priority from low to high, and each access category has an independent transmission queue. Different contention parameters are assigned to each access category to distinguish the priority. Figure 3 As shown, the standard provides four different access types: AC0: background traffic (BK), AC1: best effort traffic (BE), AC2: video traffic (VI), and AC3: voice traffic (VO). The basic principle of EDCA is as follows: four access categories (ACs) are defined based on the real-time requirements of the service. Each terminal establishes four transmission queues, and data frames for various services are placed into different AC queues. When the media becomes idle, an arbitration inter-frame spacing (AIFS) is first applied, followed by a random backoff period, with the maximum value of the random number being CWmin. When multiple transmission queues within the same terminal conflict due to channel contention, higher-priority queues have smaller backoff values, while lower-priority queues have larger backoff values. The queue that successfully competes for the channel gets a transmission opportunity (TXOP), and the duration of the transmitted frame must not exceed the upper limit of the TXOP. Although the EDCA mechanism enables higher-priority services to preempt the channel with a higher probability than lower-priority services, the success rate of high-priority services in preempting the channel is still low when the number of nodes increases, so latency and jitter cannot be guaranteed.
[0048] Furthermore, to minimize latency and jitter in latency-sensitive applications and improve user experience in wireless network environments with co-channel interference while adhering to the 802.11 protocol, this application also provides a solution. This solution sends some zero-load empty frames before sending service frames, and sets the priority of the empty frames to the same as that of the service frames. This suppresses the transmission of interfering frames, increases the channel contention success rate of service frames, and thus reduces end-to-end latency and jitter. In this solution, it is necessary to accurately predict the generation time of the next service frame to determine the time to send the empty frames. Sending empty frames too early or too late may reduce the probability of successful channel contention. Additionally, when a service frame is generated and added to the MAC transmission queue, empty frames in the MAC transmission queue can be cleared, thereby reducing the queuing latency of service frames.
[0049] For example, Figure 4 This illustrates an application scenario based on an embodiment of this application. For example... Figure 4As shown, electronic device 100 projects video onto multiple screens 200 via broadcast. There are co-channel interference sources 300 near electronic device 100 and screens 200. These interference sources 300 may include multiple devices, some connected to an access point (AP) for data transmission, and others transmitting data via point-to-point (PTP) sharing. In this scenario, the latency and jitter sensitivity of the projection application on electronic device 100 is higher than other applications, and its service priority should also be higher than other service priorities. In this scenario, if the co-channel interference source 300 causes inconsistencies in latency and other parameters across different screens 200 during the projection of content from electronic device 100 to multiple screens 200, it will degrade the viewer's experience. This is understandable. Figure 4 The scenario shown is merely an illustrative example. This scenario can also be replaced by a scenario where electronic device 100 sends data via unicast or multicast. The alternative solution is still within the protection scope of this application.
[0050] For example, Figure 5 A schematic diagram of the hardware structure of an electronic device according to an embodiment of this application is shown. Figure 5 As shown, the electronic device 100 may include a processor 110, a memory 120, and a communication module 130. The processor 110, the memory 120, and the communication module 130 may be connected to each other via a bus or other means.
[0051] Processor 110 is the computing and control core of electronic device 100. Processor 110 may include one or more processing units. For example, processor 110 may include one or more of the following: application processor (AP), modem, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0052] The memory 120 may store a program, which can be executed by the processor 110, causing the processor 110 to perform the methods executed by the electronic device 100 provided in this embodiment. The memory 120 may also store data. The processor 110 may read the data stored in the memory 120. The memory 120 and the processor 110 may be configured separately. Optionally, the memory 120 may also be integrated into the processor 110.
[0053] The communication module 130 may include at least one of a mobile communication module and a wireless communication module. When the communication module 130 includes a mobile communication module, it can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the electronic device 100. Examples include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), and New Radio (NR).
[0054] When the communication module 130 includes a wireless communication module, the communication module 130 can provide solutions for wireless communication applied to the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0055] In addition, the communication module 130 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The communication module 130 can receive electromagnetic waves via at least one antenna, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem for demodulation. The communication module 130 can also amplify the signal modulated by the modem and radiate it as electromagnetic waves via the antenna. In some examples, at least some functional modules of the communication module 130 may be housed in the processor 110. In some examples, at least some functional modules of the communication module 130 and at least some modules of the processor 110 may be housed in the same device. The communication module 130 may be one or more devices integrating at least one communication processing module. The communication module 130 receives electromagnetic waves via the antenna, performs frequency modulation and filtering on the electromagnetic wave signal, and sends the processed signal to the processor 110. The communication module 130 can also receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on them, and radiate them as electromagnetic waves via the antenna.
[0056] It is understood that this application Figure 5 The illustrated structure does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0057] The following is combined Figure 6 The technical solution provided in this application will be described in detail below. For example, Figure 6 A schematic flowchart of a data transmission method provided in an embodiment of this application is shown. Figure 6 As shown, the method may include the following steps:
[0058] S601, Determine the generation of service frames.
[0059] Specifically, the application layer can generate a service frame at regular intervals. Once the application layer generates a service frame, its generation can be determined. For example, in video transmission services, this service frame can be referred to as a video service frame.
[0060] S602, Predict the generation time of the next service frame.
[0061] Specifically, after determining the generation of a service frame, the generation time of the next service frame can be predicted.
[0062] In one example, the generation time of the next service frame can be predicted using the exponential moving average method. For instance, the formula for predicting the generation time of the next service frame (i.e., "Formula One") is:
[0063] t=αt′+(1-α)t″ Formula 1
[0064] Where t is the difference between the predicted generation time of the next service frame and the generation time of the current service frame; t′ is the difference between the generation time of the current service frame and the generation time of the previous service frame; t″ is the average value of t′ calculated each time within a certain period, where t″ can be understood as the average value of the generation time difference between two adjacent service frames within a certain period; α is a correction parameter, which can be preset.
[0065] Understandably, due to the temporal randomness of co-channel interference, the data transmission bitrate (e.g., video bitrate) may continuously change in the time domain, which in turn causes the generation time interval of service frames to change in the time domain. However, this application uses Formula 1 to accurately predict the generation time of the next service frame, significantly improving the success rate of empty frames in preempting the channel.
[0066] S603. Determine the start time for sending empty frames.
[0067] Specifically, after predicting the generation time of the next service frame, the start time for sending empty frames can be determined. For example, the start time for sending empty frames can be dynamically adjusted based on the number of users on the same channel under the current network conditions, so that the start time of sending empty frames matches the number of users on the same channel, improving data transmission quality. In other words, the start time for sending empty frames can be dynamically adjusted based on the number of interference sources in the current network. For example, when the number of interference sources is large, empty frames can be sent earlier to increase the success rate of empty frames in preempting the channel; when the number of interference sources is small, empty frames can be sent later to reduce system power consumption.
[0068] S604. When the start transmission time is reached, a null frame is sent once, wherein the priority of the null frame is the same as the priority of the service frame.
[0069] Specifically, after the determined start transmission time is reached, a blank frame can be sent. This control has the same priority as the service frame, allowing the blank frame to enter the same transmission queue as the service frame. In one example, a blank frame can be understood as a blank frame, which may not contain data.
[0070] S605. After waiting for a preset time, increase the number of empty frames sent by one.
[0071] Specifically, after sending an empty frame and waiting for a preset duration, the number of empty frames sent can be increased by one. The preset duration can be the interval before sending the next empty frame. For example, this preset duration can be pre-set or dynamically adjusted based on the number of interference sources in the current network. For instance, when the number of interference sources is large, the preset duration can be reduced to improve the success rate of empty frames in preempting the channel; when the number of interference sources is small, the preset duration can be increased to reduce system power consumption.
[0072] In one example, a mapping relationship between the number of interference sources and the preset duration can be preset. Thus, after obtaining the number of interference sources, the required preset duration can be determined based on this mapping relationship.
[0073] S606. Determine whether the next service frame has been generated.
[0074] Specifically, when the time for sending the next empty frame is reached, it can be determined whether the next service frame has been generated. Once the next service frame is generated, it can be confirmed that the next service frame has been generated. If the next service frame has been generated, the count of sent empty frames is reset to zero, i.e., step S607 is executed. If the next service frame has not been generated, it is determined whether the count of sent empty frames exceeds a preset number, i.e., step S608 is executed.
[0075] S607, Send quantity reset to zero.
[0076] Specifically, after determining that the next service frame has been generated, the number of empty frames sent can be cleared to zero, and the process can return to execute S602, that is, execute the next round of operations.
[0077] S608. Determine whether the number of empty frames sent is greater than the preset number.
[0078] Specifically, after determining that the next service frame has not been generated, it can be determined whether the number of empty frames sent is greater than a preset number. If the number of empty frames sent is less than or equal to the preset number, then execute S609. If the number of empty frames sent is greater than the preset number, then return to execute S610.
[0079] S609, Send an empty frame.
[0080] Specifically, after determining that the number of empty frames to be sent is less than or equal to the preset number, since the time to send an empty frame has been reached, an empty frame can be sent at this time, and the process returns to execute S605.
[0081] S610: Clear the transmission count to zero and wait for the next service frame to be generated.
[0082] Specifically, after determining that the number of empty frames sent exceeds a preset number, the sending count can be cleared to zero, and the system waits for the next service frame to be generated. This avoids excessive empty frames causing transmission queue congestion and resulting in service frame transmission delays. Once the next service frame is generated, the system can return to step S602 to execute the next round of operations.
[0083] Therefore, this application improves the channel preemption success rate of service frames and reduces end-to-end latency by predicting the generation time of service frames and sending several empty frames before the generation of the next service frame. Furthermore, after the service frame is generated, empty frames in the transmission queue can be cleared, thereby reducing the queuing delay of service frames and consequently reducing the transmission delay of service frames.
[0084] Understandably, S605 can also be replaced with "increase the number of empty frames sent once after sending an empty frame", meaning it is not necessarily necessary to wait for a preset time before increasing the number of empty frames sent once.
[0085] The above is an introduction to the data transmission method provided in the embodiments of this application. Examples will be given below for ease of understanding.
[0086] For example, Figure 7 This illustration shows a communication process between different layers during data transmission, as provided in an embodiment of this application. For example... Figure 7 As shown, during this data transmission process, the application layer can generate a service frame at regular intervals; then, the UDP (user datagram protocol) layer can encapsulate the service frame generated by the application layer into a UDP (user datagram protocol) data packet and add it to the transmission queue in the MAC layer; afterwards, the MAC layer can clear the empty frames in the transmission queue in the MAC layer.
[0087] In this process, after generating a service frame, the application layer can calculate the start time for sending empty frames. When this start time is reached, it begins sending the empty frame, sending it before the next service frame is generated. The empty frame has the same priority as the service frame, therefore it can enter the same transmission queue. After the application layer sends an empty frame, the UDP layer can encapsulate it into a UDP packet and add it to the MAC layer's transmission queue. Furthermore, the application layer can count the number of empty frames sent.
[0088] The application layer can send an empty frame at regular intervals. After each empty frame is sent, the UDP layer can encapsulate it into a UDP data packet and add it to the transmission queue in the MAC layer. When the total number of empty frames sent reaches a preset number or the next service frame is generated, the count of empty frames sent is reset to zero, and the next round of operations begins.
[0089] In addition, empty frames in the transmission queue of the MAC layer may preempt the channel according to the 802.11 protocol. If the channel is successfully preempted, the empty frame is sent through the air interface.
[0090] Thus, in this embodiment of the application, by sending some zero-load empty frames before sending service frames and setting the priority of the empty frames to be the same as that of the service frames, the access priority of the service frames is increased without changing the 802.11 protocol. This effectively improves the channel contention success rate of the service frames, reduces end-to-end latency and jitter, and thereby improves the user experience.
[0091] Next, the data transmission process when the solution provided in this application is not adopted and when the solution provided in this application is adopted will be compared.
[0092] like Figure 8a As shown, when the scheme provided in this application is not adopted, if there is a co-channel interference source near the transmitter, the channel will be preempted before the transmitter can send the service frame. The transmitter will wait for the channel to become idle, wait for the DIFS time, and then perform random counting until the counter is cleared before it can send the service frame over the air interface, which leads to an increase in latency.
[0093] like Figure 8b As shown, when using the scheme provided in this application, the transmitting end sends an empty frame before sending the service frame. When the co-channel interference source is preparing to send a service frame, it waits for the DIFS time and finds that the channel is occupied, so it suspends the transmission until the channel becomes idle. Then it waits for DIFS and starts random counting. Since the count value is greater than that of the transmitting end, the contention for the channel fails.
[0094] Depend on Figure 8a and Figure 8b As can be seen from the comparison, when adopting the solution provided in this application, the sending end successfully suppressed the transmission of service frames from co-channel interference sources by sending empty frames in advance, thereby ensuring that the sending end's own service frames are sent on time, reducing end-to-end latency and jitter, and thus improving the user experience.
[0095] Next, based on the content described above, a data transmission method provided by an embodiment of this application will be introduced. It is understood that this method is another expression of the content described above, and the two are combined. This method is proposed based on the content described above, and some or all of its content can be found in the description above.
[0096] Please see Figure 9 , Figure 9 This is a schematic flowchart illustrating a data transmission method provided in an embodiment of this application. It is understood that this method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 9 As shown, the data transmission method includes:
[0097] S901. After generating the first service frame and before generating the second service frame, at least one empty frame is generated, wherein the second service frame is the next service frame after the first service frame, and the empty frame has the same priority as the first service frame and / or the second service frame.
[0098] Specifically, after a service frame is generated, and before the next service frame is generated, at least one empty frame can be generated. The empty frame can have the same priority as the service frame, so that it can be added to the same transmission queue as the service frame.
[0099] In one example, the target service frame has a higher priority than other data frames, including the first service frame and / or the second service frame. This allows critical data within the service to be transmitted first, preventing other frames from preempting the channel and improving data transmission efficiency.
[0100] S902. Before generating the second service frame, send an empty frame.
[0101] Specifically, before generating the second service frame, a generated empty frame can be sent. For example, an empty frame can be sent at preset intervals to improve the success rate of the empty frame preempting the channel.
[0102] In one example, before sending an empty frame, the generation time of the second service frame and the start time of sending the empty frame can be obtained. This allows for the prediction of the second service frame's generation time, and consequently, the determination of the start time for sending the empty frame, improving the success rate of the empty frame preempting the channel.
[0103] For example, the generation time of the second service frame can be determined based on the generation time of the first service frame, the generation time of the service frame preceding the first service frame, and the difference between the generation times of two adjacent service frames within a preset time period. For instance, the generation time of the second service frame can be obtained using the aforementioned "Formula 1".
[0104] Therefore, by sending several empty frames before the next service frame is generated, the channel preemption success rate of the service frame is improved and the end-to-end latency is reduced.
[0105] In one example, when the number of empty frames sent reaches a preset number, the sending of empty frames stops, and / or the list of empty frames to be sent is cleared. This avoids the transmission queue from becoming congested due to an excessive number of empty frames, which in turn causes delays in the transmission of service frames.
[0106] In one example, after the second service frame is generated, the empty frames to be sent are cleared. This avoids the transmission queue from becoming congested due to an excessive number of empty frames, which in turn causes delays in the transmission of service frames.
[0107] In one example, the method can be applied to an electronic device in which the network environment includes at least one device operating at the same frequency as the electronic device.
[0108] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. Furthermore, in some possible implementations, each step in the above embodiments may be selectively executed according to the actual situation, and no limitation is made here.
[0109] Based on the methods described in the above embodiments, this application provides a data transmission apparatus. Please refer to... Figure 10 , Figure 10 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application. Figure 10 As shown, the data transmission device 1000 includes a processing module 1001 and a communication module 1002. The processing module 1001 can generate at least one empty frame after generating a first service frame and before generating a second service frame, wherein the second service frame is the next service frame after the first service frame, and the empty frame has the same priority as the first service frame and / or the second service frame. The communication module 1002 can transmit the empty frame before the processing module 1001 generates the second service frame.
[0110] For example, the processing module 1001 can be Figure 5 The processor 110 and communication module 1002 shown can be Figure 5 The communication module 130 shown is shown.
[0111] In one example, before the communication module 1002 sends the empty frame, the processing module 1001 is also used to: obtain the generation time of the second service frame and determine the start time of the empty frame.
[0112] In one example, the processing module 1001 is specifically used to: determine the generation time of the second service frame based on the generation time of the first service frame, the generation time of the previous service frame of the first service frame, and the difference between the generation times of two adjacent service frames within a preset time period.
[0113] In one example, the communication module 1002 is specifically used to send an empty frame at preset intervals.
[0114] In one example, the processing module 1001 is also used to: stop sending empty frames when the number of empty frames sent reaches a preset number, and / or clear the empty frames to be sent.
[0115] In one example, the processing module 1001 is also used to: clear the empty frames to be sent after the second service frame is generated.
[0116] In one example, the priority of the target service frame is higher than that of other data frames, including the first service frame and / or the second service frame.
[0117] In one example, the data transmission device is deployed on an electronic device in a network environment in which the electronic device operates at at least one device that operates at the same frequency as the electronic device.
[0118] It should be understood that the above-described device is used to execute the methods in the above embodiments. The implementation principle and technical effect of the corresponding program modules in the device are similar to those described in the above methods. The working process of the device can be referred to the corresponding process in the above methods, and will not be repeated here.
[0119] Based on the methods described in the above embodiments, this application also provides a data transmission device. Please refer to... Figure 11 , Figure 11 This is a schematic diagram of a data transmission device provided in an embodiment of this application. Figure 11 As shown, the data transmission device 1100 includes one or more processors 1101 and interface circuitry 1102. Optionally, the data transmission device 1100 may also include a bus 1103. Wherein:
[0120] Processor 1101 may be an integrated circuit data transmission device with signal processing capabilities. In implementation, each step of the above method can be completed by integrated logic circuits in the hardware of processor 1101 or by instructions in software form. Processor 1101 may be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods and steps disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. Interface circuit 1102 can be used to send or receive data, instructions, or information. Processor 1101 can process the data, instructions, or other information received by interface circuit 1102 and send the processed information out through interface circuit 1102.
[0121] Optionally, the data transmission device further includes a memory, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM). Optionally, the memory stores executable software modules or data structures, and the processor can perform corresponding operations by calling operation instructions stored in the memory (which may be stored in the operating system).
[0122] Optionally, the interface circuit 1102 can be used to output the execution results of the processor 1101.
[0123] It should be noted that the functions of the processor 1101 and the interface circuit 1102 can be implemented through hardware design, software design, or a combination of hardware and software; no restrictions are imposed here.
[0124] It should be understood that the steps of the above method embodiments can be implemented by hardware logic circuits or software instructions in a processor. The data transmission device 1100 can be applied to the above-described electronic device 100 to implement the method provided in the embodiments of this application.
[0125] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0126] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. One exemplary embodiment couples a storage medium to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0127] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0128] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
Claims
1. A data transmission method, characterized in that, The method includes: After generating the first service frame and before generating the second service frame, at least one empty frame is generated, wherein the second service frame is the next service frame after the first service frame, and the priority of the empty frame is the same as the priority of the first service frame and / or the second service frame. The empty frame is sent before the second service frame is generated; After the second service frame is generated, the empty frames to be sent are cleared.
2. The method according to claim 1, characterized in that, Before sending the empty frame, the method further includes: Obtain the generation time of the second service frame and determine the start transmission time of the empty frame.
3. The method according to claim 2, characterized in that, The step of obtaining the generation time of the second service frame specifically includes: The generation time of the second service frame is determined based on the generation time of the first service frame, the generation time of the previous service frame of the first service frame, and the difference between the generation times of two adjacent service frames within a preset time period.
4. The method according to any one of claims 1-3, characterized in that, Sending the empty frame specifically includes: The empty frame is sent once at preset intervals.
5. The method according to any one of claims 1-3, characterized in that, The method further includes: When the number of empty frames sent reaches a preset number, the sending of empty frames is stopped, and / or the empty frames to be sent are cleared.
6. The method according to any one of claims 1-3, characterized in that, The target service frame has a higher priority than other data frames, including the first service frame and / or the second service frame.
7. The method according to any one of claims 1-3, characterized in that, The method is applied to an electronic device in which the network environment includes at least one device operating at the same frequency as the electronic device.
8. A data transmission device, characterized in that, The device includes: The processing module is configured to generate at least one empty frame after generating the first service frame and before generating the second service frame, wherein the second service frame is the next service frame after the first service frame, and the priority of the empty frame is the same as the priority of the first service frame and / or the second service frame. The communication module is used to send the empty frame before the processing module generates the second service frame; The processing module is also used to clear the empty frames to be sent after the second service frame is generated.
9. The apparatus according to claim 8, characterized in that, Before the communication module sends the empty frame, the processing module is also used to: Obtain the generation time of the second service frame and determine the start transmission time of the empty frame.
10. The apparatus according to claim 9, characterized in that, The processing module is specifically used for: The generation time of the second service frame is determined based on the generation time of the first service frame, the generation time of the previous service frame of the first service frame, and the difference between the generation times of two adjacent service frames within a preset time period.
11. The apparatus according to any one of claims 8-10, characterized in that, The communication module is specifically used for: The empty frame is sent once at preset intervals.
12. The apparatus according to any one of claims 8-10, characterized in that, The processing module is further configured to: When the number of empty frames sent reaches a preset number, the sending of empty frames is stopped, and / or the empty frames to be sent are cleared.
13. The apparatus according to any one of claims 8-10, characterized in that, The target service frame has a higher priority than other data frames, including the first service frame and / or the second service frame.
14. The apparatus according to any one of claims 8-10, characterized in that, The data transmission device is deployed on an electronic device, and the network environment in which the electronic device is located includes at least one device that operates at the same frequency as the electronic device.
15. A data transmission device, characterized in that, include: At least one memory for storing programs; At least one processor is configured to execute a program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to perform the method as described in any one of claims 1-7.
16. A computer-readable storage medium storing a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-7.
17. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Communication apparatus, communication method, computer program, and communication system
US20120057622A1