Method, apparatus, storage medium and wireless communication device for receiving data frame
By integrating the scoring board, retransmission filtering, and reordering functions into the PIPE architecture in wireless communication devices, the problems of system complexity and low resource utilization caused by functional dispersion are solved, and efficient and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510157788.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-02-13
AI Technical Summary
In existing wireless communication devices, scoring boards, retransmission filtering, and reordering functions are distributed across different hardware or software components, resulting in high system complexity, low resource utilization, performance bottlenecks, and poor flexibility.
The PIPE architecture integrates the scoring board, retransmission filtering, and reordering functions into a single pipeline layer. Each pipeline layer contains a flag bit, sequence number, and data frame information storage unit. Through the collaborative work of the LMAC and UMAC modules, effective processing and acknowledgment of data frames are achieved.
It simplifies system design, improves resource utilization and data transmission efficiency, enhances system scalability and adaptability, reduces system complexity, and improves data transmission reliability and performance.
Smart Images

Figure CN120017218B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication, and more particularly to a method, apparatus, storage medium, and wireless communication device for receiving data frames. Background Technology
[0002] In devices conforming to the WLAN (Wireless Local Area Network) protocol, the design of the data link layer is crucial for ensuring efficient and reliable data transmission. The MAC (Media Access Control) module in the data link layer is responsible for handling critical tasks such as data encapsulation, decapsulation, error detection, and correction. Traditional MAC module designs often distribute functions such as scoring, retransmission filtering, and reordering across different components or sub-modules. This not only increases system complexity but may also lead to insufficient resource utilization and reduced efficiency.
[0003] The scoring board function tracks and manages the status of data transmission, ensuring the correct reception and acknowledgment of data frames. The retransmission filtering function identifies and discards duplicate data frames to avoid unnecessary processing overhead. The reordering function is responsible for rearranging data frames in the correct order to ensure that upper-layer protocols can correctly parse and process the data.
[0004] However, in existing wireless communication devices, these functions are typically implemented across different hardware or software components, leading to several significant problems. First, the distributed implementation increases the overall complexity of the system, making debugging and maintenance more difficult. Second, due to the data interaction and synchronization requirements between different components, the system's resource utilization is often low, especially when processing large numbers of data frames, which may result in performance bottlenecks. Finally, the distributed implementation also limits the system's flexibility and scalability, making it difficult to adapt to new communication protocols or application scenarios that may emerge in the future.
[0005] To address these issues, the industry has been exploring a more efficient and integrated hardware architecture to integrate functions such as scoreboard, retransmission filtering, and reordering. This integrated architecture not only simplifies system design and improves resource utilization but also enhances data transmission efficiency and reliability. Summary of the Invention
[0006] The data frame receiving method, apparatus, storage medium, and wireless communication device provided in this application can solve the problem of easy interference during Bluetooth data transmission in related technologies. The technical solution is as follows:
[0007] In a first aspect, embodiments of this application provide a method for receiving data frames. The pipeline includes K pipeline layers, each pipeline layer having a pipeline index, namely pipeline index 0 to pipeline index K-1. Each pipeline layer is associated with a data frame, and each pipeline layer includes three storage units: a flag bit storage unit, a sequence number storage unit, and a data frame information storage unit. The flag bit storage unit stores flag bits indicating whether the data frame has been successfully received, the sequence number storage unit stores the sequence number of the data frame, and the data frame information storage unit stores the address information of the data frame. K represents the maximum number of aggregations, and K is an integer greater than 1.
[0008] The LMAC module receives a data frame with sequence number SN_M from the sender, calculates the difference M between SN_M and the current reference sequence number; determines whether M < 0 or M > K-1. If yes, the data frame is discarded; if no, it reads the flag bit in the flag bit storage unit indicated by the pipe index M, and determines whether the read flag bit is equal to the first preset value. If yes, it indicates that the data frame is a retransmission frame and discards the data frame; if no, it sets the flag bit indicated by the pipe index M to the first preset value, sets the sequence number in the sequence number storage unit to SN_M, and updates the data frame information storage unit according to the address information of the received data frame.
[0009] The UMAC module reads the flag bit indicated by pipe index 0. When the read flag bit is equal to the first preset value, it reads the data frame according to the address information indicated by pipe index 0, deletes the data in the pipe layer indicated by pipe index 0, and then moves the data in pipe layer 1 to pipe layer K-1 down one layer. Then, it increments the current base sequence number SN_base by 1. The base sequence number SN_base is equal to the sequence number indicated by pipe index 0, and the base sequence number SN_base represents the sequence number of the next data frame that the UMAC module is expected to read.
[0010] When the LMAC module detects that the flag bit indicated by pipe index 0 is equal to the second preset value for a period of time exceeding the preset time, the LMAC module deletes the data in the pipe layer indicated by pipe index 0, then moves the data in pipe layer 1 to pipe layer K-1 down one layer as a whole, and then increments the current reference sequence number by 1.
[0011] The LMAC module receives a block acknowledgment request frame from the sender, parses the block acknowledgment request frame to obtain the SSN, and determines the flag bits of K data frames with sequence numbers ranging from SSN to SSN+K-1: when the sequence number of a data frame is less than the current SN_base, the flag bit of the data frame is set to a first preset value; when the sequence number of a data frame is greater than SN_base+K-1, the flag bit of the data frame is set to a second preset value; when the sequence number of a data frame is between SN_base and SN_base+K-1, the flag bit is read from the corresponding pipeline layer according to the sequence number of the data frame, and the flag bit of the data frame is set according to the read flag bit; a bitmap is generated based on the flag bits of the K data frames, and a block acknowledgment frame including the bitmap is returned to the sender.
[0012] Secondly, embodiments of this application provide a data frame receiving device. The pipeline includes K pipeline layers, each pipeline layer having a pipeline index, namely pipeline index 0 to pipeline index K-1. Each pipeline layer is associated with a data frame, and each pipeline layer includes three storage units: a flag bit storage unit, a sequence number storage unit, and a data frame information storage unit. The flag bit storage unit stores a flag bit indicating whether the data frame has been successfully received. The sequence number storage unit stores the sequence number of the data frame. The data frame information storage unit stores the address information of the data frame. K represents the maximum number of aggregations, and K is an integer greater than 1.
[0013] The receiving device includes:
[0014] The LMAC module receives a data frame with sequence number SN_M from the sender, calculates the difference M between SN_M and the current reference sequence number; determines whether M < 0 or M > K-1. If yes, the data frame is discarded; if no, it reads the flag bit in the flag bit storage unit indicated by the pipe index M, and determines whether the read flag bit is equal to a first preset value. If yes, it indicates that the data frame is a retransmission frame and discards the data frame; if no, it sets the flag bit indicated by the pipe index M to the first preset value, sets the sequence number in the sequence number storage unit to SN_M, and updates the data frame information storage unit according to the address information of the received data frame.
[0015] The UMAC module is used to read the flag bit indicated by pipe index 0. When the read flag bit is equal to the first preset value, it reads the data frame according to the address information indicated by pipe index 0, deletes the data in the pipe layer indicated by pipe index 0, then moves the data in pipe layer 1 to pipe layer K-1 down one layer, and then increments the current base sequence number SN_base by 1. The base sequence number SN_base is equal to the sequence number indicated by pipe index 0, and the base sequence number SN_base represents the sequence number of the next data frame that the UMAC module is expected to read.
[0016] The LMAC module is also used to delete the data in the pipe layer indicated by pipe index 0 when the timer detects that the flag bit indicated by pipe index 0 is equal to the second preset value for a longer than a preset time. Then, the LMAC module moves the data in pipe layer 1 to pipe layer K-1 down one layer as a whole, and then increments the current reference sequence number by 1.
[0017] The LMAC module is further configured to receive a block acknowledgment request frame from the sender, parse the block acknowledgment request frame to obtain the SSN, and determine the flag bits of K data frames with sequence numbers ranging from SSN to SSN+K-1: when the sequence number of a data frame is less than the current SN_base, the flag bit of the data frame is set to a first preset value; when the sequence number of a data frame is greater than SN_base+K-1, the flag bit of the data frame is set to a second preset value; when the sequence number of a data frame is between SN_base and SN_base+K-1, the flag bit is read from the corresponding pipeline layer according to the sequence number of the data frame, and the flag bit of the data frame is set according to the read flag bit; generate a bitmap based on the flag bits of the K data frames, and return a block acknowledgment frame including the bitmap to the sender.
[0018] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0019] Fourthly, embodiments of this application provide a wireless communication device, which may include: a processor and a memory; wherein the memory stores a computer program, the computer program being adapted to be loaded by the processor and to execute the above-described method steps.
[0020] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following:
[0021] By integrating the scoreboard, retransmission filtering, and reordering functions into a single PIPE architecture, the system design is greatly simplified, the interaction and synchronization requirements between components are reduced, and the overall complexity of the system is lowered.
[0022] Each pipeline layer in the PIPE architecture is equipped with a flag storage unit, a sequence number storage unit, and a data frame information storage unit. These storage units are effectively utilized during data processing, avoiding resource idleness and waste, and achieving efficient resource reuse.
[0023] The LMAC module effectively filters retransmitted frames and out-of-range data frames by calculating the sequence number difference and determining the validity of data frames according to preset rules, reducing unnecessary data processing overhead. Meanwhile, the UMAC module only needs to read data frames from the lowest level of the PIPE, without needing to concern itself with the internal processing flow of the data frames within the PIPE, further improving data transmission efficiency.
[0024] The LMAC module can receive and process block acknowledgment request frames, set flag bits according to the sequence number of the data frame, and generate a bitmap to return to the sender. This flexible block acknowledgment mechanism not only improves the reliability of data transmission but also reduces the number of acknowledgment frame transmissions, further enhancing the overall system performance.
[0025] By introducing the concepts of pipeline index and maximum aggregation quantity K, this technical solution can easily adapt to the aggregation requirements of data frames of different sizes, enhancing the scalability and adaptability of the system. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the structure of the wireless communication device provided in the embodiments of this application;
[0028] Figure 2 This is a flowchart illustrating the data frame receiving method provided in an embodiment of this application;
[0029] Figure 3 This is a schematic diagram of the data structure of the pipeline provided in an embodiment of this application;
[0030] Figure 4 This is a schematic diagram illustrating the principle of the LMAC module receiving data frames provided in this embodiment of the application;
[0031] Figure 5 This is a schematic diagram illustrating the principle of the UMAC module reading data frames provided in this application embodiment;
[0032] Figure 6 Figure 1 is a schematic diagram of timer timeout processing provided in an embodiment of this application;
[0033] Figure 7 This is a schematic diagram illustrating the principle of the response block confirmation request frame provided in this application;
[0034] Figure 8 This is an exemplary timing diagram illustrating the interaction between the LMAC module and the UMAC module provided in this application;
[0035] Figure 9 yes Figure 8 A schematic diagram of the data distribution in the pipeline at different times. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0037] See Figure 1 This is a schematic diagram of the structure of a wireless communication device provided in an embodiment of this application. The wireless communication device is a device that supports the WLAN protocol, including a network layer, a data link layer and a physical layer. The data link layer includes an LMAC module and a UMAC module. The LMAC module is provided with a pipe (PIPE).
[0038] The network layer, the third layer of the OSI model, is primarily responsible for packet path selection, forwarding, and routing. In wireless communication devices, the network layer processes IP (Internet Protocol) packets, ensuring they are correctly transmitted from source to destination. This layer also handles network congestion control, error detection, and recovery.
[0039] The data link layer, located between the network layer and the physical layer, is a crucial layer in wireless communication devices. Its primary responsibility is to transmit data frames (smaller units of data than data packets) from one node to another, ensuring data integrity and order. The data link layer is divided into two sublayers: Logical Link Control (LLC) and Media Access Control (MAC).
[0040] In wireless communication devices that support the WLAN protocol, the data link layer typically contains two main MAC modules: LMAC (lower-layer MAC) and UMAC (upper-layer MAC).
[0041] The LMAC module is primarily responsible for handling data transmission tasks directly related to the physical layer, such as frame encapsulation, decapsulation, error detection, and correction. It also includes the management and access control of the wireless channel to ensure efficient and orderly data transmission over the shared wireless medium.
[0042] UMAC Module: UMAC focuses more on handling tasks related to network connectivity and session management, such as authentication, encryption, and key management. It also provides an interface with upper-layer protocols (such as the IP layer) to ensure the correct transmission and reception of data.
[0043] In the LMAC module, PIPE is an important concept used to manage and optimize data transmission processes. PIPE can be viewed as a data processing channel or pipeline, responsible for passing data frames from the physical layer to LMAC for further processing, and then passing the processed data frames to UMAC or upper-layer protocols.
[0044] The design of the PIPE in this application helps to achieve high efficiency and real-time data transmission. By optimizing the processing flow and resource allocation of the PIPE, wireless communication devices can more effectively utilize wireless channels and processor resources, thereby improving data transmission throughput and reducing latency.
[0045] Please see Figure 2 The above is a flowchart illustrating a method for receiving data frames according to an embodiment of this application. The method may include the following steps:
[0046] S201: The LMAC module receives a data frame with sequence number SN_M from the sender, calculates the difference M between SN_M and the current reference sequence number; determines whether M < 0 or M > K-1. If yes, the data frame is discarded; if no, it reads the flag bit in the flag bit storage unit indicated by the pipe index M, and determines whether the read flag bit is equal to the first preset value. If yes, it indicates that the data frame is a retransmission frame and discards the data frame; if no, it sets the flag bit indicated by the pipe index M to the first preset value, sets the sequence number in the sequence number storage unit to SN_M, and updates the data frame information storage unit according to the address information of the received data frame.
[0047] The LMAC module allocates K pipeline layers in memory based on the configured maximum number of aggregations K (K is an integer greater than 1). Each pipeline layer has a unique pipeline index, ranging from 0 to K-1.
[0048] Configuration storage units: In each pipeline layer, the system initialization module configures three storage units:
[0049] Flag storage unit: A Boolean value (or a similar binary status) used to indicate whether the corresponding data frame has been successfully received.
[0050] Serial number storage unit: an integer used to store the serial number of the data frame.
[0051] Data frame information storage unit: a pointer or reference that points to the memory address where the actual content of the data frame is stored.
[0052] The LMAC module initializes all pipeline layer flag storage units to a preset value (e.g., 0) indicating "not received", sequence number storage units to an invalid value (e.g., -1), and data frame information storage units to empty (e.g., NULL).
[0053] For example, see Figure 3 As shown, the maximum number of aggregations is K=64, the pipeline has 64 pipeline layers, the pipeline index pipe_idx is 0 to 63, and each pipeline layer has 3 storage units: a flag storage unit, a sequence number storage unit, and a data frame information storage unit, which are used to store the flag valid, the sequence number SN, and the data frame information info, respectively. The data frame information includes the start address and length of the data frame.
[0054] See Figure 4 The diagram shown illustrates the principle of the LMAC module receiving data frames. Figure 3 Taking K=64 as an example: The LMAC module receives a data frame from the physical layer, which contains the sequence number SN_M.
[0055] The LMAC module reads the current base sequence number SN_base (usually stored in a global variable or register) and calculates the difference M between SN_M and SN_base.
[0056] The LMAC module determines whether the difference M is less than 0 or greater than K-1. If so, the data frame is discarded because it indicates that the sequence number of the data frame is outside the expected reception range.
[0057] If the difference M is within the valid range (0 to K-1), the LMAC module accesses the corresponding pipeline layer based on the pipeline index M (i.e., the value of M) and reads the flag bit in the flag bit storage unit.
[0058] The LMAC module checks whether the read flag bit is equal to a first preset value (e.g., 1, indicating that the data frame has been successfully received). If so, the data frame is discarded, as this indicates that it is a retransmission frame.
[0059] If the flag bit is not equal to the first preset value, the LMAC module sets the flag bit to the first preset value, updates the serial number in the serial number storage unit to SN_M, and updates the data frame information storage unit according to the address information of the received data frame.
[0060] S202, the UMAC module reads the flag bit indicated by pipe index 0. When the read flag bit is equal to the first preset value, it reads the data frame according to the address information indicated by pipe index 0, deletes the data in the pipe layer indicated by pipe index 0, then moves the data in pipe layer 1 to pipe layer K-1 down one layer as a whole, and then increments the current base sequence number SN_base by 1.
[0061] The base sequence number SN_base is equal to the sequence number indicated by pipe index 0, and the base sequence number SN_base represents the sequence number of the data frame that the UMAC module is expected to read next.
[0062] See Figure 5 The diagram shown illustrates the principle of the UMAC module reading data frames. Figure 4 Taking K=63 as an example: The UMAC module accesses the pipeline layer corresponding to pipeline index 0 and reads the flag bit in the flag bit storage unit. If the flag bit is equal to the first preset value (indicating that the data frame has been successfully received), the UMAC module reads the content of the data frame according to the address information in the data frame information storage unit. The UMAC module deletes the data in the pipeline layer corresponding to pipeline index 0 (i.e., clears the flag bit, sequence number, and data frame information storage unit), and moves the data from pipeline layer 1 to pipeline layer K-1 down one layer (i.e., moves the data in pipeline layer 1 to pipeline layer 0, the data in pipeline layer 2 to pipeline layer 1, and so on). The UMAC module increments the current base sequence number SN_base by 1 and updates it to the sequence number of the next expected data frame to be read.
[0063] S203, the LMAC module detects that the duration for which the flag bit indicated by pipe index 0 is equal to the second preset value exceeds the preset duration. The LMAC module deletes the data in the pipe layer indicated by pipe index 0, then moves the data in pipe layer 1 to pipe layer K-1 down one layer as a whole, and then increments the current reference sequence number by 1.
[0064] Among them, see Figure 6 The diagram illustrates the principle of timer timeout. The LMAC module's internal or associated timer continuously monitors the flag storage unit in the pipeline layer corresponding to pipeline index 0. The timer is configured to check the flag status at specific time intervals.
[0065] When the timer detects that the flag bit of pipe index 0 is equal to the second preset value (e.g., 0, which usually indicates that the data frame has not been successfully received or processed) for a duration exceeding the preset duration (i.e., the timeout threshold), the timer triggers a timeout event.
[0066] In response to a timer timeout event, the LMAC module first deletes all data in the pipe layer corresponding to pipe index 0. This includes clearing or setting the contents of the flag storage unit, sequence number storage unit, and data frame information storage unit to invalid values.
[0067] Subsequently, the LMAC module moves the data in pipeline layers 1 to K-1 (i.e., pipeline layers from index 1 to K-1) down one layer. Specifically, it moves the data in pipeline layer 1 to pipeline layer 0, the data in pipeline layer 2 to pipeline layer 1, and so on, until the data in pipeline layer K-1 (if any) is moved to pipeline layer K-2 (but note that since there are no more layers after pipeline layer K-1, no data is actually moved to a non-existent layer).
[0068] Finally, the LMAC module increments the current base sequence number (SN_base) by 1. This operation ensures that the receiving order and validity of data frames can be correctly determined based on the new base sequence number when receiving data frames next time.
[0069] S204. The LMAC module receives a block acknowledgment request frame from the sender, parses the block acknowledgment request frame to obtain the SSN, and determines the flag bits of K data frames with sequence numbers in the range of SSN to SSN+K-1: when the sequence number of a data frame is less than the current SN_base, the flag bit of the data frame is set to a first preset value; when the sequence number of a data frame is greater than SN_base+K-1, the flag bit of the data frame is set to a second preset value; when the sequence number of a data frame is between SN_base and SN_base+K-1, the flag bit is read from the corresponding pipeline layer according to the sequence number of the data frame, and the flag bit of the data frame is set according to the read flag bit; a bitmap is generated based on the flag bits of the K data frames, and a block acknowledgment frame including the bitmap is returned to the sender.
[0070] The LMAC module receives a block acknowledgment request frame from the sender, which contains the starting sequence number (SSN). The LMAC module parses the block acknowledgment request frame and extracts the SSN. Based on the SSN and the maximum aggregation quantity K, the LMAC module determines the range of data frame sequence numbers requiring acknowledgment (SSN to SSN+K-1).
[0071] See Figure 7 The schematic diagram shown is based on the principle of a response block request frame, using K=64 as an example. For each data frame sequence number within the range:
[0072] If the sequence number is less than the current SN_base, the LMAC module sets the flag of the data frame to the first preset value (indicating that the data frame has been received but may not be in the current window).
[0073] If the sequence number is greater than SN_base+K-1, the LMAC module sets the flag of the data frame to the second preset value (indicating that the data frame has not yet been received).
[0074] If the sequence number is between SN_base and SN_base+K-1, the LMAC module reads the flag bit in the corresponding pipeline layer based on the sequence number and sets the flag bit of the data frame based on the read flag bit.
[0075] The LMAC module generates a bitmap based on the flag bits of the aforementioned K data frames, where each bit corresponds to the reception status of a data frame (1 indicates received, 0 indicates not received). The LMAC module constructs a block acknowledgment frame containing the generated bitmap and sends it to the sender through the physical layer.
[0076] In some embodiments of this application, a first preset value represents a flag value indicating that a data frame has been successfully received, and its length is one bit and equal to 1.
[0077] The second preset value represents the flag value indicating that the data frame has not been successfully received (or has not yet been received). Its length is also one bit and is equal to 0.
[0078] In some embodiments of this application, when the LMAC module receives a data frame from the sender, it first writes the data frame into a dedicated buffer area. This buffer area is used to temporarily store the received data frames until they are read and processed by the UMAC module.
[0079] The address information of a data frame consists of two parts: the starting storage address and the data frame length.
[0080] The starting memory address is the initial location of the data frame in the buffer, typically a memory address or pointer pointing to the first byte of the data frame. The data frame length, in bytes, represents the total number of bytes from the starting memory address to the end of the data frame. When the LMAC module writes a data frame to the buffer, it simultaneously records the starting memory address and the data frame length. This information is then stored in the corresponding pipeline layer's data frame information storage unit so that the UMAC module can accurately read and process the data frame.
[0081] In some embodiments of this application, after the LMAC module successfully receives and processes a series of data frames, they are stored in a buffer. The UMAC module is responsible for reading these data frames from the buffer. The UMAC module needs to determine which data frames are consecutive. This is typically achieved by checking the sequence number of the data frames. Since the LMAC module has ensured that the data frames are received and stored in the buffer in sequence number order, the UMAC module can simply read the data frames in ascending order of sequence number. Once the UMAC module has identified K consecutive data frames, it begins to construct an Ethernet frame. An Ethernet frame includes an Ethernet header, a data portion, and an Ethernet trailer. The data portion contains the contents of these K data frames. The Ethernet header contains information such as the destination MAC address, source MAC address, and type / length fields. The Ethernet trailer is typically a Cyclic Redundancy Check (CRC) field used to detect errors in data transmission. After constructing the Ethernet frame, the UMAC module sends it to the network layer for further processing. This typically involves passing the Ethernet frame to a network interface card (NIC) or the corresponding network driver for transmission over the network.
[0082] See Figure 8 and Figure 9 The following describes the data frame receiving method of this application embodiment with a specific example. In the following text, the LMAC module is abbreviated as LMAC and the UMAC module is abbreviated as UMAC.
[0083] Before time T0, LMAC has completed the pipeline initialization. Assuming the maximum number of aggregations K is 8, each pipeline layer is allocated a flag storage unit, a sequence number storage unit, and a data frame information storage unit. The pipeline index ranges from 0 to 7, corresponding to 8 possible sequence numbers (in this example, 100 to 107, but in practice, the sequence numbers can be arbitrary). All pipeline layer flags are initialized to 0 (indicating no reception), the sequence number storage unit is initialized to an invalid value, and the data frame information storage unit is initialized to empty.
[0084] At time T0, LMAC received an aggregated frame containing SNs from 100 to 107, but only successfully received four data frames: 100, 101, 102, and 104.
[0085] LMAC updates the pipeline layer based on the received data frames:
[0086] Pipeline Index 0 (SN=100): Flag bit is set to 1, sequence number is set to 100, and data frame information storage unit points to actual data.
[0087] Pipeline Index 1 (SN=101): The flag bit is set to 1, the sequence number is set to 101, and the data frame information storage unit points to the actual data.
[0088] Pipeline Index 2 (SN=102): The flag bit is set to 1, the sequence number is set to 102, and the data frame information storage unit points to the actual data.
[0089] Pipeline index 4 (SN=104): Flag bit is set to 1 (note that index 3 is skipped because 103 was not received), sequence number is set to 104, and data frame information storage unit points to actual data.
[0090] Other unreceived data frames (103, 105, 106, 107) did not have corresponding flags set in the pipeline.
[0091] At time T1, UMAC reads the data frames (100, 101, 102) sequentially from pipe index 0 to 2.
[0092] After reading, UMAC resets the flags of pipe indices 0 to 2 to a certain state (in actual implementation, it may not need to be reset immediately, but waits to confirm that all subsequent data frames have been received before cleaning up), and moves the entire pipe layer down one level. However, since pipe index 3 is empty (103 was not received), only the data of pipe indices 4 to 7 (if any) will actually move down one position (in this example, only 104 of index 4 will move to the position of index 3, but indices 5 to 7 are still empty).
[0093] At the same time, SN_base is updated to 103, indicating that the next expected data frame sequence number is 103.
[0094] If, after a period of time following time T1 (e.g., after a timeout threshold), the flag bit of pipe index 0 is not reset by subsequent data frame reception or acknowledgment, and the timer detects this situation, then LMAC will execute step S204.
[0095] In this specific example, since UMAC has already read 100 to 102 and the pipeline layer has been updated according to the logic in S203, the timer timeout scenario did not occur directly. However, if we consider more complex scenarios, such as network latency or data loss, timer timeouts are possible.
[0096] At time T0, LMAC attempts to send a BLOCKACK containing SSN=100 and the corresponding bitmap (1110_1000...), but the receiving device fails to receive it.
[0097] At time T2, when LMAC successfully received the complete data frames 100 to 107 again (although 100 to 102 were retransmitted and discarded according to SN_base), it tried to send BLOCKACK again, this time containing the complete bitmap (1111_1111...), but the other device still failed to receive it.
[0098] After time T3, the other device sends a BAREQ query frame to inquire about the reception status of data frames starting from SSN=100.
[0099] LMAC generates a BLOCKACK containing the correct bitmap and sends it to the other device based on the current pipeline status and the scoreboard principle (in this example, since SN_base has been updated to 107 and there are no unacknowledged data frames in the PIPE, only the range from 100 to 107 needs to be considered).
[0100] After receiving this BLOCKACK, the other device confirms that all data frames from 100 to 107 have been successfully sent.
[0101] At time T4, the UMAC becomes idle and prepares to read the remaining data frames in the pipeline. As described earlier, by time T4, only the data frame with SN=107 should remain unread by the UMAC in the PIPE (because data frames with SN=100 to 106 were read and processed by the UMAC at some point earlier, and SN_base was updated to 108 after time T3, indicating that the next expected data frame sequence number is 108).
[0102] The technical solution of this application has the following technical effects:
[0103] By integrating the scoreboard, retransmission filtering, and reordering functions into a single PIPE architecture, the system design is greatly simplified, the interaction and synchronization requirements between components are reduced, and the overall complexity of the system is lowered.
[0104] Each pipeline layer in the PIPE architecture is equipped with a flag storage unit, a sequence number storage unit, and a data frame information storage unit. These storage units are effectively utilized during data processing, avoiding resource idleness and waste, and achieving efficient resource reuse.
[0105] The LMAC module effectively filters retransmitted frames and out-of-range data frames by calculating the sequence number difference and determining the validity of data frames according to preset rules, reducing unnecessary data processing overhead. Meanwhile, the UMAC module only needs to read data frames from the lowest level of the PIPE, without needing to concern itself with the internal processing flow of the data frames within the PIPE, further improving data transmission efficiency.
[0106] The LMAC module can receive and process block acknowledgment request frames, set flag bits according to the sequence number of the data frame, and generate a bitmap to return to the sender. This flexible block acknowledgment mechanism not only improves the reliability of data transmission but also reduces the number of acknowledgment frame transmissions, further enhancing the overall system performance.
[0107] By introducing the concepts of pipeline index and maximum aggregation quantity K, this technical solution can easily adapt to the aggregation requirements of data frames of different sizes, enhancing the scalability and adaptability of the system.
[0108] This application also provides a computer storage medium that can store multiple instructions, which are adapted to be loaded and executed by a processor as described above. Figure 2 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figure 2 The specific details of the illustrated embodiments will not be elaborated here.
[0109] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the data frame receiving method as described in the above embodiments.
[0110] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0111] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that implementing all or part of the processes of the above embodiments and making equivalent changes in accordance with the claims of this application are still within the scope of the invention.
Claims
1. A method for receiving data frames, characterized in that, The pipeline consists of K pipeline layers, each with a pipeline index, ranging from pipeline index 0 to pipeline index K-1. Each pipeline layer is associated with a data frame, and each pipeline layer includes three storage units: a flag bit storage unit, a sequence number storage unit, and a data frame information storage unit. The flag bit storage unit stores flags indicating whether the data frame has been successfully received, the sequence number storage unit stores the sequence number of the data frame, and the data frame information storage unit stores the address information of the data frame. K represents the maximum number of aggregations, and K is an integer greater than 1. The LMAC module receives a data frame with sequence number SN_M from the sender and calculates the difference M between SN_M and the current reference sequence number. Determine whether M < 0 or M > K-1. If yes, discard the data frame. If not, read the flag bit in the flag bit storage unit indicated by the pipe index M, and determine whether the read flag bit is equal to the first preset value. If yes, it indicates that the data frame is a retransmission frame, and the data frame is discarded. If not, the flag bit indicated by the pipe index M is set to the first preset value, the sequence number in the sequence number storage unit is set to SN_M, and the data frame information storage unit is updated according to the address information of the received data frame. The UMAC module reads the flag bit indicated by pipe index 0. When the read flag bit is equal to the first preset value, it reads the data frame according to the address information indicated by pipe index 0, deletes the data in the pipe layer indicated by pipe index 0, and then moves the data in pipe layer 1 to pipe layer K-1 down one layer. Then, it increments the current base sequence number SN_base by 1. The base sequence number SN_base is equal to the sequence number indicated by pipe index 0, and the base sequence number SN_base represents the sequence number of the next data frame that the UMAC module is expected to read. When the LMAC module detects that the flag bit indicated by pipe index 0 is equal to the second preset value for a period of time exceeding the preset time, the LMAC module deletes the data in the pipe layer indicated by pipe index 0, then moves the data in pipe layer 1 to pipe layer K-1 down one layer as a whole, and then increments the current reference sequence number by 1. The LMAC module receives a block acknowledgment request frame from the sender, parses the block acknowledgment request frame to obtain the SSN, and determines the flag bits of K data frames with sequence numbers ranging from SSN to SSN+K-1: when the sequence number of a data frame is less than the current SN_base, the flag bit of the data frame is set to a first preset value; when the sequence number of a data frame is greater than SN_base+K-1, the flag bit of the data frame is set to a second preset value; when the sequence number of a data frame is between SN_base and SN_base+K-1, the flag bit is read from the corresponding pipeline layer according to the sequence number of the data frame, and the flag bit of the data frame is set according to the read flag bit; a bitmap is generated based on the flag bits of the K data frames, and a block acknowledgment frame including the bitmap is returned to the sender.
2. The method according to claim 1, characterized in that, The length of the first preset value and the second preset value is one bit, the first preset value is equal to 1, and the second preset value is equal to 0.
3. The method according to claim 1 or 2, characterized in that, K=64。 4. The method according to claim 3, characterized in that, Also includes: The LMAC module writes the received data frames into the buffer; The address information of a data frame includes the starting storage address and the data frame length.
5. The method according to claim 4, characterized in that, Also includes: When the UMAC module reads K consecutive data frames from the cache, it packages the K data frames into an Ethernet frame and sends the Ethernet frame to the network layer.
6. A data frame receiving device, characterized in that, The pipeline consists of K pipeline layers, each with a pipeline index, ranging from pipeline index 0 to pipeline index K-1. Each pipeline layer is associated with a data frame, and each pipeline layer includes three storage units: a flag bit storage unit, a sequence number storage unit, and a data frame information storage unit. The flag bit storage unit stores flag bits indicating whether the data frame has been successfully received, the sequence number storage unit stores the sequence number of the data frame, and the data frame information storage unit stores the address information of the data frame. K represents the maximum number of aggregations, and K is an integer greater than 1; The receiving device includes: The LMAC module receives a data frame with sequence number SN_M from the sender, calculates the difference M between SN_M and the current reference sequence number; determines whether M < 0 or M > K-1. If yes, the data frame is discarded; if no, it reads the flag bit in the flag bit storage unit indicated by the pipe index M, and determines whether the read flag bit is equal to a first preset value. If yes, it indicates that the data frame is a retransmission frame and discards the data frame; if no, it sets the flag bit indicated by the pipe index M to the first preset value, sets the sequence number in the sequence number storage unit to SN_M, and updates the data frame information storage unit according to the address information of the received data frame. The UMAC module is used to read the flag bit indicated by pipe index 0. When the read flag bit is equal to the first preset value, it reads the data frame according to the address information indicated by pipe index 0, deletes the data in the pipe layer indicated by pipe index 0, then moves the data in pipe layer 1 to pipe layer K-1 down one layer, and then increments the current base sequence number SN_base by 1. The base sequence number SN_base is equal to the sequence number indicated by pipe index 0, and the base sequence number SN_base represents the sequence number of the next data frame that the UMAC module is expected to read. The LMAC module is also used to delete the data in the pipe layer indicated by pipe index 0 when the timer detects that the flag bit indicated by pipe index 0 is equal to the second preset value for a longer than a preset time. Then, the LMAC module moves the data in pipe layer 1 to pipe layer K-1 down one layer as a whole, and then increments the current reference sequence number by 1. The LMAC module is further configured to receive a block acknowledgment request frame from the sender, parse the block acknowledgment request frame to obtain the SSN, and determine the flag bits of K data frames with sequence numbers ranging from SSN to SSN+K-1: when the sequence number of a data frame is less than the current SN_base, the flag bit of the data frame is set to a first preset value; when the sequence number of a data frame is greater than SN_base+K-1, the flag bit of the data frame is set to a second preset value; when the sequence number of a data frame is between SN_base and SN_base+K-1, the flag bit is read from the corresponding pipeline layer according to the sequence number of the data frame, and the flag bit of the data frame is set according to the read flag bit; generate a bitmap based on the flag bits of the K data frames, and return a block acknowledgment frame including the bitmap to the sender.
7. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as the method steps of any one of claims 1 to 5.
8. A wireless communication device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Redundancy management method for double optical fiber channel network communication system
CN105227279A
Block acknowledgement frame generation method and device and computer readable storage medium
CN118057876A