Data frame receiving method and device, storage medium and wireless communication equipment
By integrating the scoring board, retransmission filtering and reordering functions into a PIPE architecture in the data link layer of wireless communication equipment, the problems of system complexity and low resource utilization caused by functional dispersion are solved, and efficient data transmission and system flexibility are achieved.
Patent Information
- Application Number
- CN202510157788.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-13
AI Technical Summary
In existing wireless communication devices, the scoring board, retransmission filtering and reordering functions are scattered in different components or submodules, resulting in high system complexity, low resource utilization, reduced efficiency, and difficulty in adapting to new communication protocols and application scenarios.
By integrating the scoring board, retransmission filtering and reordering functions in a PIPE architecture, the flag bits, sequence numbers and data frame information storage units of the pipeline layer can be used to achieve efficient reception and processing of data frames.
It simplifies system design, reduces system complexity, improves resource utilization and data transmission efficiency, and enhances system flexibility and scalability.
Smart Images

Figure CN120017218A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communications, and in particular to a method, device, storage medium and wireless communication device for receiving a data frame. Background Art
[0002] In devices that follow the WLAN (wireless local area network) protocol, the design of the data link layer is crucial to ensure the efficiency and reliability of data transmission. The MAC (media access control) module in the data link layer is responsible for handling key tasks such as data encapsulation, decapsulation, error detection and correction. Traditional MAC module design often implements functions such as scoreboard, retransmission filtering and reordering in different components or submodules, which not only increases the complexity of the system, but also may lead to insufficient resource utilization and reduced efficiency.
[0003] The scoreboard function is used to track and manage the status of data transmission to ensure the correct reception and confirmation of data frames. The retransmission filtering function is used to identify and discard duplicated data frames to avoid unnecessary processing overhead. The reordering function is responsible for rearranging data frames in the correct order to ensure that the upper layer protocol can correctly parse and process the data.
[0004] However, in existing wireless communication devices, these functions are usually implemented in different hardware or software components, which leads to several significant problems. First, the decentralized 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 resource utilization of the system is often not high, especially when processing a large number of data frames, performance bottlenecks may occur. Finally, the decentralized function implementation also limits the flexibility and scalability of the system, making it difficult to adapt to new communication protocols or application scenarios that may appear in the future.
[0005] In order to solve the above problems, 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 can not only simplify system design and improve resource utilization, but also improve the efficiency and reliability of data transmission. Summary of the invention
[0006] The data frame receiving method, device, storage medium and wireless communication device provided in the embodiments of the present application can solve the problem that Bluetooth data transmission is easily interfered in the related art. The technical solution is as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for receiving a data frame, wherein a pipeline includes K pipeline layers, each pipeline layer is provided with a pipeline index, which are pipeline index 0 to pipeline index K-1 respectively; each pipeline layer is associated with a data frame, and each pipeline layer includes 3 storage units: a flag storage unit, a sequence number storage unit, and a data frame information storage unit, the flag storage unit is used to store a flag indicating whether the data frame is successfully received, the sequence number storage unit is used to store the sequence number of the data frame, and the data frame information storage unit is used to store the address information of the data frame; K represents the maximum aggregation number, and K is an integer greater than 1;
[0008] The LMAC module receives a data frame with a sequence number of 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 is satisfied, and if so, discards the data frame; if not, reads the flag bit in the flag bit storage unit indicated by the pipeline index M, and determines whether the read flag bit is equal to the first preset value, and if so, it indicates that the data frame is a retransmission frame, and the data frame is discarded; if not, sets the flag bit indicated by the pipeline 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 the pipe index 0. When the flag bit read is equal to the first preset value, the data frame is read according to the address information indicated by the pipe index 0, the data in the pipe layer indicated by the pipe index 0 is deleted, and then the data in the pipe layer 1 to the pipe layer K-1 are moved down by one layer as a whole, and then the current reference sequence number SN_base is increased by 1; the reference sequence number SN_base is equal to the sequence number indicated by the pipe index 0, and the reference sequence number SN_base represents the sequence number of the data frame that the UMAC module is expected to read next time;
[0010] When the LMAC module detects through the timer that the flag bit indicated by the pipeline index 0 is equal to the second preset value for a period exceeding the preset period, the LMAC module deletes the data in the pipeline layer indicated by the pipeline index 0, and then moves the data in the pipeline layer 1 to the pipeline layer K-1 downward by one layer as a whole, and then increases the current reference sequence number by 1;
[0011] The LMAC module receives a block confirmation request frame from the sender, parses the block confirmation request frame to obtain 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 the 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 the 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 the data frame is between SN_base and SN_base+K-1, the flag bit is read in 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 confirmation frame including the bitmap is returned to the sender.
[0012] In a second aspect, an embodiment of the present application provides a data frame receiving device, wherein the pipeline includes K pipeline layers, each pipeline layer is provided with a pipeline index, which are pipeline index 0 to pipeline index K-1 respectively; each pipeline layer is associated with a data frame, and each pipeline layer includes 3 storage units: a flag storage unit, a sequence number storage unit, and a data frame information storage unit, the flag storage unit is used to store a flag indicating whether the data frame is successfully received, the sequence number storage unit is used to store the sequence number of the data frame, and the data frame information storage unit is used to store the address information of the data frame; K represents the maximum aggregation number, and K is an integer greater than 1;
[0013] Wherein, the receiving device comprises:
[0014] The LMAC module is used to receive a data frame with a sequence number of SN_M from the sender, calculate the difference M between SN_M and the current reference sequence number; determine whether M < 0 or M > K-1 is satisfied, and if so, discard the data frame; if not, read the flag bit in the flag bit storage unit indicated by the pipeline index M, and determine whether the read flag bit is equal to a first preset value, and if so, it indicates that the data frame is a retransmission frame, and the data frame is discarded; if not, set the flag bit indicated by the pipeline index M to the first preset value, set the sequence number in the sequence number storage unit to SN_M, and update 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 the pipeline index 0, and when the read flag bit is equal to the first preset value, read the data frame according to the address information indicated by the pipeline index 0, delete the data in the pipeline layer indicated by the pipeline index 0, and then move the data in the pipeline layer 1 to the pipeline layer K-1 downward by one layer as a whole, and then add 1 to the current reference sequence number SN_base; the reference sequence number SN_base is equal to the sequence number indicated by the pipeline index 0, and the reference sequence number SN_base represents the sequence number of the data frame that the UMAC module is expected to read next time;
[0016] The LMAC module is further configured to, when the timer detects that the duration of the flag bit indicated by the pipeline index 0 being equal to the second preset value exceeds the preset duration, delete the data in the pipeline layer indicated by the pipeline index 0, and then move the data in the pipeline layer 1 to the pipeline layer K-1 downward by one layer as a whole, and then increase the current reference sequence number by 1;
[0017] The LMAC module is also used to receive a block confirmation request frame from the sender, parse the block confirmation request frame to obtain SSN, and determine the flag bits of K data frames with sequence numbers in the range of SSN to SSN+K-1: when the sequence number of the data frame is less than the current SN_base, set the flag bit of the data frame to a first preset value; when the sequence number of the data frame is greater than SN_base+K-1, set the flag bit of the data frame to a second preset value; when the sequence number of the data frame is between SN_base and SN_base+K-1, read the flag bit in the corresponding pipeline layer according to the sequence number of the data frame, and set the flag bit of the data frame according to the read flag bit; generate a bitmap based on the flag bits of the K data frames, and return a block confirmation frame including the bitmap to the sender.
[0018] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0019] In a fourth aspect, an embodiment of the present application provides a wireless communication device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0020] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0021] By integrating the scoreboard, retransmission filtering and reordering functions into a 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 reduced.
[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 the data processing process, avoiding idleness and waste of resources and achieving efficient reuse of resources.
[0023] The LMAC module effectively filters out retransmitted frames and out-of-range frames by calculating the difference in sequence numbers and judging the validity of data frames according to preset rules, reducing unnecessary data processing overhead. At the same time, the UMAC module only needs to read data frames from the bottom layer of PIPE, without having to worry about the processing flow of data frames within PIPE, further improving the efficiency of data transmission.
[0024] The LMAC module can receive and process block confirmation request frames, set flags according to the sequence number of the data frame, and generate a bitmap to return to the sender. This flexible block confirmation mechanism not only improves the reliability of data transmission, but also reduces the number of transmissions of confirmation frames, further improving the overall performance of the system.
[0025] By introducing the concepts of pipeline index and maximum aggregation number 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 is a schematic diagram of the structure of a wireless communication device provided in an embodiment of the present application;
[0028] Figure 2 It is a flowchart of a method for receiving a data frame provided in an embodiment of the present application;
[0029] Figure 3 It is a data structure diagram of a pipeline provided in an embodiment of the present application;
[0030] Figure 4 It is a schematic diagram of the principle of receiving a data frame by an LMAC module provided in an embodiment of the present application;
[0031] Figure 5 It is a schematic diagram of the principle of the UMAC module reading the data frame provided in the embodiment of the present application;
[0032] Figure 6 Figure 1. Schematic diagram of processing of timer timeout provided in the embodiment of the present application;
[0033] Figure 7 It is a schematic diagram of the principle of the response block confirmation request frame provided by this application;
[0034] Figure 8 is an exemplary timing diagram of the interaction between the LMAC module and the UMAC module provided by the present application;
[0035] Fig. 9 yes Figure 8 Schematic diagram of data distribution in the pipeline at different corresponding times. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0037] See also Figure 1 , is a structural diagram of a wireless communication device provided in an embodiment of the present 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. A pipe PIPE is set in the LMAC module.
[0038] The network layer is the third layer of the OSI model and is responsible for the path selection, forwarding, and routing of data packets. In wireless communication devices, the network layer is responsible for processing IP (Internet Protocol) data packets and ensuring that they can be correctly transmitted from the source address to the destination address. This layer is also responsible for handling network congestion control, error detection, and recovery.
[0039] The data link layer is located between the network layer and the physical layer and is a very critical layer in wireless communication devices. It is mainly responsible for transmitting data frames (smaller data units than packets) from one node to another and ensuring the integrity and order of the data. The data link layer is divided into two sublayers: logical link control (LLC) and media access control (MAC).
[0040] In wireless communication devices supporting WLAN protocols, the data link layer usually includes two main MAC modules: LMAC (lower layer MAC) and UMAC (upper layer MAC).
[0041] LMAC module: LMAC is mainly responsible for processing data transmission tasks directly related to the physical layer, such as frame encapsulation, decapsulation, error detection and correction, etc. It also includes the management and access control of wireless channels to ensure that data can be transmitted efficiently and orderly on the shared wireless medium.
[0042] UMAC module: UMAC focuses more on processing tasks related to network connection and session management, such as authentication, encryption, key management, etc. It also provides interfaces with upper layer protocols (such as IP layer) to ensure the correct transmission and reception of data.
[0043] In the LMAC module, PIPE is an important concept, which is used to manage and optimize the data transmission process. PIPE can be regarded as a data processing channel or pipeline, which is responsible for passing the data frame from the physical layer to LMAC for further processing, and then passing the processed data frame to UMAC or upper layer protocol.
[0044] The design of PIPE in this application helps to achieve high efficiency and real-time data transmission. By optimizing the processing flow and resource allocation of PIPE, wireless communication devices can more effectively utilize wireless channels and processor resources, thereby improving data transmission throughput and reducing latency.
[0045] See also Figure 2 , is a flow chart of a method for receiving a data frame provided in an embodiment of the present application. The method of the present application may include the following steps:
[0046] S201, the LMAC module receives a data frame with a sequence number of 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 is satisfied, if yes, discards the data frame; if not, reads the flag bit in the flag bit storage unit indicated by the pipeline 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 not, sets the flag bit indicated by the pipeline 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 according to the configured maximum aggregation number K (K is an integer greater than 1). Each pipeline layer has a unique pipeline index from 0 to K-1.
[0048] Configuring storage units: In each pipeline layer, the system initialization module configures three storage units:
[0049] Flag storage unit: A Boolean value (or similar binary state) used to indicate whether the corresponding data frame is successfully received.
[0050] Sequence number storage unit: an integer used to store the sequence number of the data frame.
[0051] Data frame information storage unit: a pointer or reference pointing to the memory address where the actual content of the data frame is stored.
[0052] The LMAC module initializes the flag storage units of all pipeline layers to a preset value indicating "not received" (e.g., 0), the sequence number storage unit to an invalid value (e.g., -1), and the data frame information storage unit to empty (e.g., NULL).
[0053] For example, see Figure 3 As shown, the maximum aggregation number is K=64, the pipeline is provided with 64 pipeline layers, the pipeline index pipe_idx is 0 to 63 respectively, and each pipeline layer is provided with 3 storage units: a flag storage unit, a sequence number storage unit and a data frame information storage unit, which are respectively used to store the flag valid, the sequence number SN and the data frame information info, and the data frame information includes the starting address and length of the data frame.
[0054] See also Figure 4 The schematic diagram of the principle of the LMAC module receiving data frames is shown in FIG. Figure 3 Take K=64 as an example to illustrate: the LMAC module receives a data frame from the physical layer, and the data frame includes a 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 this indicates that the sequence number of the data frame is beyond the expected receiving range.
[0057] If the difference M is within the valid range (0 to K-1), the LMAC module accesses the corresponding pipeline layer according to the pipeline index M (ie, the value of M) and reads the flag bit in the flag bit storage unit.
[0058] The LMAC module determines whether the read flag bit is equal to a first preset value (eg, 1, indicating that the data frame has been successfully received). If so, the data frame is discarded because it 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 the pipe index 0. When the read flag bit is equal to the first preset value, the data frame is read according to the address information indicated by the pipe index 0, the data in the pipe layer indicated by the pipe index 0 is deleted, and then the data in the pipe layer 1 to the pipe layer K-1 are moved down one layer as a whole, and then the current base sequence number SN_base is increased by 1.
[0061] The base sequence number SN_base is equal to the sequence number indicated by the 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 time.
[0062] See also Figure 5 The schematic diagram of the principle of the UMAC module reading the data frame is shown. Figure 4 Take K=63 as an example: the UMAC module accesses the pipe layer corresponding to the pipe index 0 and reads the flag in the flag storage unit. If the flag 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 pipe layer corresponding to the pipe index 0 (that is, clears the flag, sequence number and data frame information storage unit), and moves the data in pipe layer 1 to pipe layer K-1 down by one layer as a whole (that is, moves the data in pipe layer 1 to pipe layer 0, moves the data in pipe layer 2 to pipe layer 1, and so on). The UMAC module adds 1 to the current base sequence number SN_base and updates it to the sequence number of the next data frame expected to be read.
[0063] S203. The LMAC module detects through the timer that the duration of the flag bit indicated by the pipeline index 0 being equal to the second preset value exceeds the preset duration. The LMAC module deletes the data in the pipeline layer indicated by the pipeline index 0, and then moves the data in the pipeline layer 1 to the pipeline layer K-1 down one layer as a whole, and then increases the current reference sequence number by 1.
[0064] Among them, see Figure 6 Schematic diagram of the principle of timer timeout shown, the timer inside or associated with the LMAC module continuously monitors the flag storage unit in the pipeline layer corresponding to pipeline index 0. The timer is set to check the status of the flag at a specific time interval.
[0065] When the timer detects that the flag bit of pipe index 0 is equal to a second preset value (eg, 0, which usually indicates that the data frame has not been successfully received or processed) for a duration exceeding a preset duration (ie, a timeout threshold), the timer triggers a timeout event.
[0066] The LMAC module responds to the timeout event of the timer by first deleting all data in the pipeline layer corresponding to pipeline 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 layer 1 to pipeline layer K-1 (i.e., pipeline layers with indices 1 to K-1) down by one layer as a whole. 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 will actually be moved to non-existent layers).
[0068] Finally, the LMAC module adds 1 to the current reference sequence number (SN_base). This operation is to ensure that the next time a data frame is received, the receiving order and validity of the data frame can be correctly determined based on the new reference sequence number.
[0069] S204, the LMAC module receives a block confirmation request frame from the sender, parses the block confirmation request frame to obtain 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 the 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 the 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 the data frame is between SN_base and SN_base+K-1, the flag bit is read in 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 confirmation frame including the bitmap is returned to the sender.
[0070] Among them, the LMAC module receives a block confirmation request frame from the sender, which contains the starting sequence number SSN. The LMAC module parses the block confirmation request frame and extracts the starting sequence number SSN. The LMAC module determines the data frame sequence number range (SSN to SSN+K-1) that needs to be confirmed based on SSN and the maximum aggregation number K.
[0071] See also Figure 7 The schematic diagram of the principle of the response block request frame shown in the figure takes K=64 as an example for explanation. For each data frame sequence number in the range:
[0072] If the sequence number is less than the current SN_base, the LMAC module sets the flag bit of the data frame to a 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 bit of the data frame to a second preset value (indicating that the data frame has not 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 according to the sequence number, and sets the flag bit of the data frame according to the read flag bit.
[0075] The LMAC module generates a bitmap based on the flag bits of the above K data frames, where each bit corresponds to the reception status of a data frame (1 means received, 0 means not received). The LMAC module constructs a block confirmation frame containing the generated bitmap and sends it to the sender through the physical layer.
[0076] In some embodiments of the present application, the first preset value represents a flag value indicating that the data frame has been successfully received, has a length of one bit, and is equal to 1.
[0077] The second preset value represents a flag value indicating that the data frame has not been successfully received (or has not yet been received), and its length is also one bit and is equal to 0.
[0078] In some embodiments of the present application, when the LMAC module receives a data frame from the sender, it will first write 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 the data frame consists of two parts: the starting storage address and the data frame length.
[0080] The starting storage address is the starting position of the data frame in the cache, usually a memory address or pointer pointing to the first byte of the data frame. The data frame length is the length of the data frame, in bytes, indicating the total number of bytes from the starting storage address to the end of the data frame. When the LMAC module writes a data frame into the cache, it records the starting storage address and the data frame length of the data frame at the same time. This information is then stored in the data frame information storage unit of the corresponding pipeline layer so that the subsequent UMAC module can accurately read and process the data frame.
[0081] In some embodiments of the present application, after the LMAC module successfully receives and processes a series of data frames, they are stored in a cache. The UMAC module is responsible for reading these data frames from the cache. The UMAC module needs to determine which data frames are consecutive. This is usually achieved by checking the sequence number of the data frame. Since the LMAC module has ensured that the data frames are received and stored in the cache in sequence number order, the UMAC module can simply read the data frames in order of increasing sequence numbers. Once the UMAC module identifies K consecutive data frames, it will start to construct Ethernet frames. The Ethernet frame includes an Ethernet header, a data part, and an Ethernet tail. The data part will contain the contents of these K data frames. The Ethernet header will contain information such as the destination MAC address, the source MAC address, and the type / length field. The Ethernet tail is usually a cyclic redundancy check (CRC) field used to detect errors in data transmission. After constructing the Ethernet frame, the UMAC module will send it to the network layer for further processing. This usually involves passing the Ethernet frame to a network interface card (NIC) or a corresponding network driver so that it can be sent to the network.
[0082] See also Figure 8 and Fig. 9 , the following is a specific example to illustrate the method for receiving the data frame of the embodiment of the present application. In the following text, the LMAC module is referred to as LMAC, and the UMAC module is referred to as UMAC.
[0083] Before time T0, LMAC has completed the initialization of the pipeline. Assuming that the maximum aggregation number K is 8, a flag storage unit, a sequence number storage unit, and a data frame information storage unit are allocated to each pipeline layer. The pipeline index ranges from 0 to 7, corresponding to 8 possible sequence numbers (in this example, 100 to 107, but the sequence number can be arbitrary in actual situations). The flag bits of all pipeline layers are initialized to 0 (indicating that they are not received), 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 receives an aggregate frame containing SN=100 to 107, but only successfully receives four data frames 100, 101, 102 and 104.
[0085] LMAC updates the pipeline layer based on the received data frame:
[0086] Pipe index 0 (SN=100): the flag bit is set to 1, the sequence number is set to 100, and the data frame information storage unit points to the 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] Pipe 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] Pipe index 4 (SN=104): The flag bit is set to 1 (note that index 3 is skipped because 103 is not received), the sequence number is set to 104, and the data frame information storage unit points to the actual data.
[0090] The other unreceived data frames (103, 105, 106, 107) have no corresponding flag bits set in the pipeline.
[0091] At time T1, UMAC reads the data frames (100, 101, 102) of pipeline indexes 0 to 2 in sequence.
[0092] After reading, UMAC resets the flag bits of pipeline indexes 0 to 2 to a certain state (in actual implementation, it may not be necessary to reset them immediately, but wait for confirmation that all subsequent data frames have been received before cleaning up), and moves the pipeline layer down by one layer as a whole, but since pipeline index 3 is empty (103 is not received), in fact only the data of pipeline indexes 4 to 7 (if any) will be moved down by one position (in this example, only 104 at index 4 will be moved to the position of index 3, but indexes 5 to 7 are still empty).
[0093] At the same time, SN_base is updated to 103, indicating that the next expected received data frame sequence number is 103.
[0094] If within a period of time after time T1 (such as after a timeout threshold), the flag bit of pipe index 0 is still not reset by the subsequent data frame reception or confirmation process, and the timer detects this situation, then LMAC will execute step S204.
[0095] But in this specific example, since UMAC has read 100 to 102 and the pipeline layer has been updated according to the logic of S203, the timer timeout scenario does not occur directly. However, if more complex scenarios are considered, such as network delays 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 other device fails to receive it successfully.
[0097] At time T2, when LMAC successfully receives the complete data frames 100 to 107 again (although 100 to 102 are retransmitted and discarded according to SN_base), it tries to send BLOCKACK again, this time containing the complete bitmap (1111_1111...), but the other device still fails to receive it successfully.
[0098] After time T3, the other device sends a BAREQ inquiry frame to inquire about the reception status of the 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 unconfirmed data frames in PIPE, only the range from 100 to 107 needs to be considered).
[0100] After receiving this BLOCKACK, the other device confirms that data frames 100 to 107 have all been sent successfully.
[0101] At time T4, UMAC becomes idle and is ready to read the remaining data frames in the pipeline. According to the previous description, by time T4, only the data frame with SN=107 should be left in PIPE that has not been read by UMAC (because the data frames with SN=100 to 106 have been read and processed by UMAC at some point in the past, and SN_base has been 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 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 reduced.
[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 the data processing process, avoiding idleness and waste of resources and achieving efficient reuse of resources.
[0105] The LMAC module effectively filters out retransmitted frames and out-of-range frames by calculating the difference in sequence numbers and judging the validity of data frames according to preset rules, reducing unnecessary data processing overhead. At the same time, the UMAC module only needs to read data frames from the bottom layer of PIPE, without having to worry about the processing flow of data frames within PIPE, further improving the efficiency of data transmission.
[0106] The LMAC module can receive and process block confirmation request frames, set flags according to the sequence number of the data frame, and generate a bitmap to return to the sender. This flexible block confirmation mechanism not only improves the reliability of data transmission, but also reduces the number of transmissions of confirmation frames, further improving the overall performance of the system.
[0107] By introducing the concepts of pipeline index and maximum aggregation number 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] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 2 The specific description of the illustrated embodiment will not be repeated here.
[0109] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data frame receiving method described in the above embodiments.
[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0111] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present application are still within the scope of the invention.
Claims
1. A method for receiving a data frame, characterized in that: The pipeline includes K pipeline layers, each pipeline layer is provided with a pipeline index, which is pipeline index 0 to pipeline index K-1 respectively; each pipeline layer is associated with a data frame, and each pipeline layer includes 3 storage units: a flag storage unit, a sequence number storage unit, and a data frame information storage unit. The flag storage unit is used to store a flag indicating whether the data frame is successfully received, the sequence number storage unit is used to store the sequence number of the data frame, and the data frame information storage unit is used to store the address information of the data frame; K represents the maximum aggregation number, and K is an integer greater than 1; The LMAC module receives a data frame with a sequence number of 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 is satisfied, if so, discard the data frame; If not, read the flag bit in the flag bit storage unit indicated by the pipeline 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 a 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 the pipe index 0. When the flag bit read is equal to the first preset value, the data frame is read according to the address information indicated by the pipe index 0, the data in the pipe layer indicated by the pipe index 0 is deleted, and then the data in the pipe layer 1 to the pipe layer K-1 are moved down by one layer as a whole, and then the current reference sequence number SN_base is increased by 1; the reference sequence number SN_base is equal to the sequence number indicated by the pipe index 0, and the reference sequence number SN_base represents the sequence number of the data frame that the UMAC module is expected to read next time; When the LMAC module detects through the timer that the flag bit indicated by the pipeline index 0 is equal to the second preset value for a period exceeding the preset period, the LMAC module deletes the data in the pipeline layer indicated by the pipeline index 0, and then moves the data in the pipeline layer 1 to the pipeline layer K-1 downward by one layer as a whole, and then increases the current reference sequence number by 1; The LMAC module receives a block confirmation request frame from the sender, parses the block confirmation request frame to obtain 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 the 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 the 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 the data frame is between SN_base and SN_base+K-1, the flag bit is read in 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 confirmation 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 frame into the cache; The address information of the 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 Ethernet frames and sends the Ethernet frames to the network layer.
6. A data frame receiving device, characterized in that: The pipeline includes K pipeline layers, each pipeline layer is provided with a pipeline index, which are pipeline index 0 to pipeline index K-1 respectively; each pipeline layer is associated with a data frame, and each pipeline layer includes three storage units: a flag storage unit, a sequence number storage unit, and a data frame information storage unit. The flag storage unit is used to store a flag indicating whether the data frame is successfully received, the sequence number storage unit is used to store the sequence number of the data frame, and the data frame information storage unit is used to store the address information of the data frame; K represents the maximum number of aggregations, and K is an integer greater than 1; Wherein, the receiving device comprises: The LMAC module is used to receive a data frame with a sequence number of SN_M from the sender, calculate the difference M between SN_M and the current reference sequence number; determine whether M < 0 or M > K-1 is satisfied, and if so, discard the data frame; if not, read the flag bit in the flag bit storage unit indicated by the pipeline index M, and determine whether the read flag bit is equal to a first preset value, and if so, it indicates that the data frame is a retransmission frame, and the data frame is discarded; if not, set the flag bit indicated by the pipeline index M to the first preset value, set the sequence number in the sequence number storage unit to SN_M, and update 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 the pipeline index 0, and when the read flag bit is equal to the first preset value, read the data frame according to the address information indicated by the pipeline index 0, delete the data in the pipeline layer indicated by the pipeline index 0, and then move the data in the pipeline layer 1 to the pipeline layer K-1 downward by one layer as a whole, and then add 1 to the current reference sequence number SN_base; the reference sequence number SN_base is equal to the sequence number indicated by the pipeline index 0, and the reference sequence number SN_base represents the sequence number of the data frame that the UMAC module is expected to read next time; The LMAC module is further configured to, when the timer detects that the duration of the flag bit indicated by the pipeline index 0 being equal to the second preset value exceeds the preset duration, delete the data in the pipeline layer indicated by the pipeline index 0, and then move the data in the pipeline layer 1 to the pipeline layer K-1 downward by one layer as a whole, and then increase the current reference sequence number by 1; The LMAC module is also used to receive a block confirmation request frame from the sender, parse the block confirmation request frame to obtain SSN, and determine the flag bits of K data frames with sequence numbers in the range of SSN to SSN+K-1: when the sequence number of the data frame is less than the current SN_base, set the flag bit of the data frame to a first preset value; when the sequence number of the data frame is greater than SN_base+K-1, set the flag bit of the data frame to a second preset value; when the sequence number of the data frame is between SN_base and SN_base+K-1, read the flag bit in the corresponding pipeline layer according to the sequence number of the data frame, and set the flag bit of the data frame according to the read flag bit; generate a bitmap based on the flag bits of the K data frames, and return a block confirmation frame including the bitmap to the sender.
7. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to 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, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Ethernet MAC (Media Access Control) sublayer controller applicable to WLAN (Wireless Local Area Network)
CN102065569A
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
Multi-lane transmission device and multi-lane transmission method
WO2013125621A1
Cited By
Wifi-based hidden camera judgment method and device, equipment and storage medium
CN122053820A