Data forwarding method, system and storage medium based on small packet aggregation
By using the small packet aggregation method and fixed-frame head/tail matching verification technology in data transmission, the problems of transmission reliability and QoS attribute aggregation in A-MSDU technology are solved, and efficient and reliable data transmission and system stability are achieved.
Patent Information
- Application Number
- CN202111681274.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the prior art, the A-MSDU technology has poor transmission reliability when aggregating longer frames and does not allow frame aggregation with different QoS attributes, limiting message transmission efficiency and system stability.
Using the small packet aggregation method, by adding fixed frame header and fixed frame tail to the message data, using the SUNDAY algorithm for matching and verification, aggregation and de-aggregation of different QoS attribute frames is realized, and the timer is used to prevent the data from being forwarded for a long time. Lost the packet.
It improves the throughput of small packets, realizes reliable data transmission and system stability, supports frame aggregation with different QoS attributes, and enhances the integrity and efficiency of data transmission.
Smart Images

Figure CN114339762B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data forwarding, and in particular relates to a data forwarding method, system and storage medium based on small packet aggregation. Background Art
[0002] The message aggregation method based on the 802.3 protocol usually adopts the A-MSDU technology based on 802.11. The A-MSDU technology refers to aggregating multiple MAC service data units (MSDU) into a larger payload in a certain way. The MSDU here can be considered as an Ethernet message. Usually, when an AP or a wireless client receives a message (MSDU) from the protocol stack, it will be marked with an Ethernet message header, called an A-MSDUSubframe; and before sending it out through the radio port, it needs to be converted into the 802.11 message format one by one. The A-MSDU technology aims to aggregate several A-MSDUSubframes together and encapsulate them into an 802.11 message for transmission. This reduces the overhead of the PLCPPreamble, PLCPBeader and 802.11MAC header required to send each 802.11 message, while reducing the number of response frames and improving the efficiency of message transmission.
[0003] In the existing technology, A-MSDU is only applicable to the aggregation of smaller MSDUs. When the aggregated frame is longer, there will only be one FCS, which leads to poor reliability of A-MSDU transmission. If one of the MSDUs is transmitted incorrectly, the entire A-MSDU will be retransmitted. At the same time, A-MSDU technology requires that the aggregated subframes can only have one QoS attribute, and does not allow the aggregation of frames with different QoS attributes, such as broadcast and multicast frames cannot be aggregated.
[0004] In view of the above defects, a patent with authorization announcement number CN112995064B discloses a method, device, terminal and storage medium for forwarding messages in a time-sensitive network, and the method includes: receiving a message to be forwarded, determining the target service flow corresponding to the message to be forwarded, obtaining the number of bytes of the message sent by the target service flow and the committed service rate of the target service flow; determining the number of sending rounds and the real-time queue to which the message to be forwarded belongs according to the number of bytes of the message to be forwarded and the number of bytes of the message to be forwarded, and adding the message to be forwarded to the real-time queue; reading the messages in each real-time queue in turn in each round, and the reading time of each real-time queue does not exceed the preset time period each time. When the message to be forwarded in the real-time queue to which it belongs is read, if the remaining reading time of the real-time queue to which it belongs is greater than the sending time of the message to be forwarded and the number of sending rounds of the message to be forwarded is not greater than the current number of rounds, the message to be forwarded is sent. The present invention can support the dynamic addition / deletion of service flows in a time-sensitive network. However, it only improves the message forwarding throughput and forwarding efficiency, and does not solve the problem of reliable transmission and frame aggregation of different QoS attributes. Summary of the invention
[0005] The purpose of the present invention is to provide a data forwarding method, system and storage medium based on small packet aggregation, which aggregates or deaggregates frames with different QoS attributes, greatly improves the throughput of small packets, realizes reliable transmission, and improves system stability.
[0006] The present invention provides the following technical solutions:
[0007] The present application proposes a data forwarding method based on small packet aggregation, comprising the following steps:
[0008] S1. The user-side message data is connected and sent to the service bridge. After the small packets are aggregated and the frame header and frame tail are added, they are stored in the sending ring buffer queue. The frame header is used to determine the message data length, and the frame tail is used to confirm the integrity of the message data.
[0009] S2 extracts the agreed length message data in the transmission ring buffer queue and adds a private Ethernet header for forwarding;
[0010] S3. The peer end receives the aggregated message from the user side and transfers it to the receiving ring buffer queue, uses the SUNDAY algorithm to match the frame header, and deaggregates according to the message data length in the frame header.
[0011] Preferably, the framing header includes a magic word of a fixed length, a message sequence number and a message length, and the framing trailer includes a CRC check of the framing trailer.
[0012] Preferably, in step S2, the method for forwarding ring buffer queue message data specifically includes the following steps:
[0013] S21. If the length of the message data in the sending ring buffer queue reaches the agreed number of bytes, the agreed number of bytes of message data is extracted from the sending ring buffer queue and a private Ethernet header is added for forwarding. The agreed number of bytes is a fixed length, regardless of the integrity of the message data;
[0014] S22. If the message data in the sending ring buffer queue is less than the agreed number of bytes, a timer is enabled for periodic forwarding to prevent the message data from being lost due to long-term non-forwarding.
[0015] Preferably, in step S3, the depolymerization method specifically comprises the following steps:
[0016] S31. The fixed magic word in the frame header is used as a pattern string to match the receive ring buffer queue to determine the frame header position and the received message data length;
[0017] S32. If the message length is less than or equal to the number of bytes remaining in the receive ring buffer queue, the frame tail is determined by the message data length and the CRC check is performed to determine the integrity of the message data. The complete message data is taken out from the receive ring buffer queue and forwarded to the service bridge. The operation is repeated until the message data cannot be taken out. The remaining message is combined with the beginning of the next received packet aggregation message into a complete short byte message data;
[0018] S33. If the message length is greater than the number of bytes remaining in the receiving ring buffer queue, the current deaggregation is terminated, and the remaining data is left for deaggregation after the next message data is received.
[0019] Based on the above-mentioned data forwarding method based on small packet aggregation, the present application also proposes a data forwarding system based on small packet aggregation, including:
[0020] Data docking module, used to dock user-side data and direct it to the service bridge;
[0021] The packet aggregation driver module is used to add a specified framing header and framing tail to the user-side message data of the service bridge for aggregation, and to de-aggregate through framing header pattern string matching and framing tail verification.
[0022] Preferably, the device further includes a processor for executing the above-mentioned data forwarding method based on small packet aggregation during operation.
[0023] Preferably, the packet aggregation driving module includes a sending ring buffer queue, a receiving ring buffer queue and a timer, and the timer is used to periodically forward the message data in the sending ring buffer queue.
[0024] Based on the above-mentioned data forwarding system based on small packet aggregation, the present application also proposes a computer-readable storage medium, in which a computer program is stored. The computer program is executed by a processor to implement the above-mentioned data forwarding method based on small packet aggregation.
[0025] The beneficial effects of the present invention are:
[0026] 1. After adding framing headers and framing tails to short-byte message data with different QoS attributes through the small packet aggregation driver module to aggregate them into large-byte message data, a private Ethernet header is added for forwarding, which facilitates the management of user message data, improves the throughput of the small packet aggregation driver module, and reduces the bandwidth resource occupation in data forwarding;
[0027] 2. The small packet aggregation driver module matches the fixed frame header through the SUNDAY algorithm to determine the message data length, and determines the integrity of the message data through the CRC check of the fixed frame tail, realizes the deaggregation and aggregation of the aggregated message data, and realizes stable and secure data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0029] Figure 1 It is a flow chart of the data forwarding method of the present invention;
[0030] Figure 2 This is a schematic diagram of the working process of the packet aggregation driving module of the present invention;
[0031] Figure 3 It is a schematic diagram of the aggregated message structure of the present invention. DETAILED DESCRIPTION
[0032] Example 1
[0033] like Figure 1-Figure 2 As shown, the present application proposes a data forwarding method based on small packet aggregation, comprising the following steps:
[0034] S1. Connect the user-side wired port message data and send it to the service bridge. After the small packets are aggregated, the frame header FrameHrader and frame footer Frame Footer are added and stored in the sending ring buffer queue txkfifio. The frame header Frame Hrader is used to determine the message data length, and the frame footer Frame Footer is used to confirm the message data integrity. The frame header FrameHrader includes a magic word Magic with a fixed length, a message sequence number Sequence and a message length Length, and the frame footer Frame Footer includes a CRC check. The QoS attributes of the aggregated short byte message data can be the same or different, and both broadcast frames and multicast frames can be aggregated.
[0035] S2. Extract the agreed length message data in the sending ring buffer queue txkfifio and add the private Ethernet header Ether Header for forwarding. In step S2, the method for forwarding message data in the sending ring buffer queue txkfifio specifically includes the following steps:
[0036] S21. If the length of the message data in the sending ring buffer queue txkfifio reaches the agreed number of bytes, extract the agreed number of bytes of message data from the sending ring buffer queue txkfifio and add the private Ethernet header Ether Header for forwarding. The agreed number of bytes is a fixed length, and the integrity of the message data is not considered;
[0037] S22. If the message data in the sending ring buffer queue txkfifio is less than the agreed number of bytes, it is left to form a complete short byte original message data with the message data stored next time. In order to prevent the message data with a length less than the agreed length in the sending ring buffer queue txkfifio from being not forwarded for a long time and causing packet loss, a timer is enabled to periodically forward the remaining message data.
[0038] S3. The receiving port of the wireless driver at the opposite end receives the aggregated message from the user side and transfers it to the receiving ring buffer queue rxkfifo, uses the SUNDAY algorithm to match the Frame Header, and deaggregates according to the message data length in the Frame Header. In step S3, the deaggregation method specifically includes the following steps:
[0039] S31. Using the fixed magic word Magic in the frame header Frame Hrader as a pattern string to match in the receiving ring buffer queue rxkfifo, determine the position of the frame header Frame Hrader and the length of the received message data.
[0040] When matching, the SUNDAY algorithm uses a fixed-length magic word Magic as the pattern string to match from front to back. When the match fails, it focuses on the next character of the last character in the main string that participates in the match. When the pattern string is found to be unmatched, the SUNDAY algorithm can skip as many characters as possible for the next match, thereby improving the matching efficiency. The specific matching rules are as follows:
[0041] (1) If the character does not appear in the pattern string, it is skipped directly, that is, the number of shifted bits = pattern string length + 1;
[0042] (2) Otherwise, the number of shifted bits = the length of the pattern string - the rightmost position of the character (starting with 0) = the distance from the rightmost position of the character in the pattern string to the tail + 1.
[0043] S32. If the message length is less than or equal to the number of bytes remaining in the receiving ring buffer queue rxkfifo, the frame footer is determined by the message data length and the CRC check is performed to determine the integrity of the message data. The complete message data is taken out from the receiving ring buffer queue rxkfifo and forwarded to the service bridge. The operation is repeated until the message data cannot be taken out. The remaining message is combined with the beginning part of the small packet aggregation message received next time to form a complete short byte message data.
[0044] S33. If the message length is greater than the number of bytes remaining in the receiving ring buffer queue rxkfifo, the deaggregation is terminated and the remaining data is left for deaggregation after the next message data is received.
[0045] Example 2
[0046] Based on the above-mentioned embodiment 1, the present application further proposes a data forwarding system based on packet aggregation, including:
[0047] Data docking module, used to dock user-side data and direct it to the service bridge;
[0048] The packet aggregation driver module is used to add the specified Frame Header and Frame Footer to the user-side message data of the service bridge for aggregation, and to de-aggregate through Frame Header pattern string matching and Frame Footer verification.
[0049] It also includes a processor for executing the data forwarding method based on packet aggregation as in Example 1 during runtime.
[0050] The packet aggregation driver module includes a sending ring buffer queue txkfifio, a receiving ring buffer queue rxkfifo and a timer. The timer is used to periodically forward the message data in the sending ring buffer queue txkfifio.
[0051] The data forwarding method of this embodiment is the same as that of Embodiment 1.
[0052] Example 3
[0053] Based on the above-mentioned embodiment 2, the present application further proposes a computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processor to implement the data forwarding method based on packet aggregation as in embodiment 1. The data forwarding method of this embodiment is the same as that of embodiment 1.
[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data forwarding method based on small packet aggregation, characterized in that: The following steps are involved: S1. The user-side message data is connected and sent to the service bridge. After the packet aggregation adds the framing header and the framing tail, it is stored in the sending ring buffer queue. The framing header is used to determine the message data length, and the framing tail is used to confirm the integrity of the message data; the framing header includes a magic word of fixed length, a message sequence number and a message length, and the framing tail includes a CRC check of the framing tail; S2. Extract the agreed length message data in the sending ring buffer queue and add a private Ethernet header for forwarding: S21. If the length of the message data in the sending ring buffer queue reaches the agreed number of bytes, the agreed number of bytes of message data is extracted from the sending ring buffer queue and a private Ethernet header is added for forwarding. The agreed number of bytes is a fixed length, regardless of the integrity of the message data; S22. If the message data in the sending ring buffer queue is less than the agreed number of bytes, the timer is enabled to forward periodically to prevent the message data from being lost due to long-term non-forwarding; S3. The peer receives the aggregated message from the user side and transfers it to the receiving ring buffer queue, uses the SUNDAY algorithm to match the frame header, and deaggregates according to the message data length in the frame header; The depolymerization method specifically comprises the following steps: S31. The fixed magic word in the frame header is used as a pattern string to match the receive ring buffer queue to determine the frame header position and the received message data length; S32. If the message length is less than or equal to the number of bytes remaining in the receive ring buffer queue, the frame tail is determined by the message data length and the CRC check is performed to determine the integrity of the message data. The complete message data is taken out from the receive ring buffer queue and forwarded to the service bridge. The operation is repeated until the message data cannot be taken out. The remaining message is combined with the beginning of the next received small packet aggregation message into a complete short byte message data; S33. If the message length is greater than the number of bytes remaining in the receiving ring buffer queue, the current deaggregation is terminated, and the remaining data is left for deaggregation after the next message data is received.
2. A data forwarding system based on the method of claim 1, characterized in that: include: Data docking module, used to dock user-side data and direct it to the service bridge; The packet aggregation driver module is used to add a specified framing header and framing tail to the user-side message data of the service bridge for aggregation, and to de-aggregate through framing header pattern string matching and framing tail verification.
3. The data forwarding system according to claim 2, characterized in that: It also includes a processor for executing the data forwarding method based on packet aggregation as claimed in claim 1 during operation.
4. The data forwarding system according to claim 2, characterized in that: The packet aggregation driving module includes a sending ring buffer queue, a receiving ring buffer queue and a timer, and the timer is used to periodically forward the message data in the sending ring buffer queue.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the data forwarding method based on packet aggregation as claimed in claim 1.
