WO2016061987A1 - Packet processing method and device - Google Patents
Packet processing method and device Download PDFInfo
- Publication number
- WO2016061987A1 WO2016061987A1 PCT/CN2015/074331 CN2015074331W WO2016061987A1 WO 2016061987 A1 WO2016061987 A1 WO 2016061987A1 CN 2015074331 W CN2015074331 W CN 2015074331W WO 2016061987 A1 WO2016061987 A1 WO 2016061987A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- packets
- packet
- messages
- data packet
- group
- Prior art date
Links
Images
Definitions
- the present invention relates to the field of communications, and in particular to a packet processing method and apparatus.
- the Layer 2 user plane protocol stack of LTE consists of three sublayers, which are divided into Packet Data Convergence Protocol (PDCP), Radio Link Control (RLC), and Media Access Control ( Media Access Control, referred to as MAC).
- PDCP Packet Data Convergence Protocol
- RLC Radio Link Control
- MAC Media Access Control
- the main functions of the PDCP layer include header compression, security functions (integrity protection and encryption), and support for reordering and retransmission at handover. These functions depend on the radio bearer, and each radio bearer has a PDCP entity.
- the processing flow of the transmitting end of the PDCP layer after receiving the Service Data Unit (SDU) from the upper layer, the sequence number (Sequence Number, referred to as SN) is assigned, and if integrity protection is required, the integrity protection process is performed. If the encryption is required, the encryption process is performed; the serial number of the sender and the Hyper Frame Number (HFN) value are maintained, and the Protocol Data Unit (PDU) is sent to the lower layer for processing.
- SDU Service Data Unit
- SN Sequence Number
- HFN Hyper Frame Number
- PDCP layer receiving end processing flow receiving protocol data unit PDU from the lower layer, performing decryption processing if decryption is required; performing integrity protection check if integrity protection processing is required; maintaining local receiving serial number according to receiving serial number SN The SN and superframe number HFN values, the service data unit SDU is delivered to the higher layer processing.
- the processing of the PDCP protocol is basically a chip of a central processing unit (CPU), and its main feature is linear processing, and the packet processing capability is poor.
- each SDU of the upper layer needs to be processed independently, and processed by the PDCP protocol to form a PDU and sent to a lower layer protocol stack, such as RLC.
- a Frequency Division Duplex (FDD) 20M bandwidth cell has an air interface capacity of 150 Mbps. It is assumed that the chip can process 10,000 packets per second.
- each packet is 1500 bytes
- the traffic is 110 Mbps. Left and right; if each message size is 64 bytes, the traffic is only about 5 Mbps. Of course, considering the 1500-byte and 64-byte memory processing factors, it may be higher, but the traffic is still very low, far from meeting the needs of real-life commercial environments.
- the current processing method generally uses a higher speed processor and a larger memory, but basically it is a temporary solution.
- the present invention provides a packet processing method and apparatus, so as to at least solve the problem that the related art cannot solve the problem that the small message processing capability is poor.
- a packet processing method including: storing at least two messages for sending in a buffer area; determining whether the at least two messages meet a predetermined grouping condition; If the determination result is yes, the at least two messages are sent in a group package.
- determining whether the at least two messages meet the predetermined grouping condition includes at least one of: determining whether the total number of bytes of the at least two messages is greater than or equal to a first preset value, and determining a result If yes, determining whether to group the at least two packets; determining whether the time waiting to cache the first one of the at least two packets exceeds a second preset value, and determining the result In the case of YES, it is determined that the at least two messages are grouped.
- performing packet transmission on the at least two packets includes: adding, after the grouping the at least two packets, a data packet to identify that the data packet is a combination of at least two packets.
- the package identifier; the data packet to which the group package identifier is added is sent.
- the group sending of the at least two packets comprises: grouping the at least two packets by using a TLV (Tag, Length, Value) format to distinguish the at least two packets. send.
- TLV Tag, Length, Value
- a packet processing method including: determining whether a received data packet is a data packet sent by a group packet, wherein the data packet is at least two stored in a buffer area. The combination of the messages; if the result of the determination is YES, the received data packet is parsed by using a group packet format combining the at least two messages.
- a packet processing apparatus includes: a storage module configured to store at least two messages for transmission in a buffer area; and a first determining module configured to determine the at least Whether the two packets meet the predetermined grouping condition; the sending module is configured to perform group packet sending on the at least two packets if the determination result is yes.
- the first determining module includes at least one of the following: a first determining unit, configured to determine whether a total number of bytes of the at least two messages is greater than or equal to a first preset value, and the determination result is And determining, by the second determining unit, whether the waiting time after buffering the first one of the at least two packets exceeds a second preset The value, if the determination result is yes, determines to group the at least two messages.
- a first determining unit configured to determine whether a total number of bytes of the at least two messages is greater than or equal to a first preset value, and the determination result is And determining, by the second determining unit, whether the waiting time after buffering the first one of the at least two packets exceeds a second preset The value, if the determination result is yes, determines to group the at least two messages.
- the sending module includes: an adding unit, configured to add a group identifier for identifying that the data packet is a combination of at least two packets after the data packet obtained by grouping the at least two packets a first sending unit configured to transmit the data packet to which the group packet identifier is added.
- the sending module includes: a second sending unit, configured to perform group sending of the at least two packets in a manner that distinguishes the at least two packets by using a TLV format.
- a message processing apparatus including: a second determining module, configured to determine whether a received data packet is a data packet sent by a group packet, wherein the data packet is a combination of at least two packets stored in the buffer area; and a parsing module configured to parse the received data packet by using a group packet format combining the at least two packets when the determination result is yes deal with.
- At least two messages for transmission are stored in the buffer area; determining whether the at least two messages satisfy a predetermined grouping condition; and if the determination result is yes, the at least two The packets are sent in groups, which solves the problem that the related technologies cannot solve the problem of small packet processing capability, and effectively improves the processing capability of small messages in the wireless network.
- FIG. 1 is a flowchart 1 of a message processing method according to an embodiment of the present invention.
- FIG. 2 is a second flowchart of a message processing method according to an embodiment of the present invention.
- FIG. 3 is a block diagram 1 of a message processing apparatus according to an embodiment of the present invention.
- FIG. 5 is a block diagram 2 of a message processing apparatus in accordance with a preferred embodiment of the present invention.
- FIG. 5 is a block diagram 2 of a message processing apparatus in accordance with a preferred embodiment of the present invention.
- FIG. 6 is a block diagram 3 of a message processing apparatus in accordance with a preferred embodiment of the present invention.
- FIG. 7 is a block diagram 2 of a message processing apparatus according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of a message processing apparatus according to a preferred embodiment of the present invention.
- FIG. 9 is a schematic diagram of a PDCP packet header related to an embodiment of the present invention.
- FIG. 10 is a schematic diagram of a PDCP header according to an embodiment of the present invention.
- FIG. 11 is a schematic diagram of a PDCP message according to an embodiment of the present invention.
- FIG. 12 is a flowchart 1 of a message processing method according to a preferred embodiment of the present invention.
- FIG. 13 is a second flowchart of a message processing method according to a preferred embodiment of the present invention.
- FIG. 1 is a flowchart 1 of a packet processing method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
- Step S102 storing at least two messages for sending in the buffer area
- Step S104 determining whether the at least two messages meet the predetermined grouping condition
- Step S106 If the determination result is yes, the at least two packets are sent in a group package.
- the at least two packets stored in the buffer area are determined by the foregoing steps to determine whether the at least two packets meet the predetermined grouping condition, and if the two packets are satisfied, the at least two packets are sent to the group to solve the problem.
- the problem that the small message processing capability is poor can not be solved, and the processing capability of the small message in the wireless network is improved.
- the foregoing two modes are only preferred embodiments, and the packet can be grouped according to other conditions, and details are not described herein again.
- an identifier is added to a data packet obtained after grouping at least two packets, and is used to identify that the data packet is a group identifier of at least two packet combinations, and the group identifier is added.
- the data packet is sent, and the identifier is added, so that after receiving the data packet, the data packet can be known as the data packet after the group packet, so that the data packet is directly parsed and processed, thereby improving the processing efficiency.
- the at least two packets are sent in groups by using the TLV format to differentiate the at least two packets, and the TLV format is used to facilitate each packet in the packet.
- the TLV format is used to facilitate each packet in the packet.
- FIG. 2 is a second flowchart of a packet processing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes:
- Step S202 determining whether the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area;
- Step S204 If the determination result is yes, the received data packet is parsed by using a packet format that combines the at least two messages.
- the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area; if the determination result is yes, the combination is adopted.
- the packet format of the at least two packets parses the received data packet, which solves the problem that the small message processing capability cannot be solved in the related art, and improves the processing capability of the small message in the wireless network.
- a message processing apparatus which is used to implement the above-described embodiments and preferred embodiments, and has not been described again.
- the term "module” may implement a combination of software and/or hardware of a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- FIG. 3 is a block diagram of a message processing apparatus according to an embodiment of the present invention.
- the storage module 32 includes a storage module 32, a first determining module 34, and a sending module 36.
- the modules are briefly described below.
- the storage module 32 is configured to store at least two messages for sending in the buffer area;
- the first determining module 34 is configured to determine whether the at least two packets meet the predetermined grouping condition
- the sending module 36 is configured to, when the determination result is yes, perform packet transmission on the at least two packets.
- the first determining module 34 includes at least one of the following:
- the first determining unit 42 is configured to determine whether the total number of bytes of the at least two messages is greater than or equal to the first preset value, and if the determination result is yes, determine to group the at least two packets. ;
- the second determining unit 44 is configured to determine whether the time waiting for the first message in the at least two messages to be cached exceeds a second preset value, and if the determination result is yes, determining the at least two The message is grouped.
- FIG. 5 is a block diagram 2 of a message processing apparatus according to a preferred embodiment of the present invention.
- the sending module 36 includes:
- the adding unit 52 is configured to add, to the data packet obtained after the grouping the at least two packets, a group identifier for identifying that the data packet is a combination of at least two packets;
- the first transmitting unit 54 is configured to transmit the data packet to which the group identifier is added.
- FIG. 6 is a block diagram 3 of a message processing apparatus according to a preferred embodiment of the present invention.
- the sending module 36 includes:
- the second sending unit 62 is configured to perform packet sending of the at least two packets in a manner that distinguishes the at least two packets by using a TLV format.
- FIG. 7 is a block diagram 2 of a message processing apparatus according to an embodiment of the present invention. As shown in FIG. 7, the method includes:
- the second determining module 72 is configured to determine whether the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area;
- the parsing module 74 is configured to parse the received data packet by using a packet format combining the at least two messages when the determination result is YES.
- FIG. 8 is a schematic diagram of a message processing apparatus according to a preferred embodiment of the present invention.
- the buffer area is mainly used for : If the number of bytes in the buffer area is greater than or equal to N bytes, or the first message in the buffer area waits for more than T time; all the packets in the buffer area are sent together to the PDCP protocol layer as a SUD. Send; otherwise, wait in the buffer area.
- the packet is packaged into an SDU and processed in the PDCP layer. Therefore, the format of the current PDCP protocol packet is changed.
- the standard PDCP protocol packet needs to be extended to some extent. Leave the field to indicate whether it is enabled.
- FIG. 9 is a schematic diagram of a PDCP packet header related to an embodiment of the present invention.
- the format of the small packet in the Data field is TLV format in the packet format, such as As shown in Figure 10 and Figure 11, the T flag occupies 1 bit, indicating whether there is still a message at the end of the message; if it is, it is 1, if it is not, it is 0; if there is only one message, it is 0; the Length field is 7 bit, the most The length indicates the length of the long message of 128; the data field is the upper layer message; if there are multiple messages, the plurality of small messages are arranged in the order of the TLV.
- the existing PDCP protocol process is modified.
- the high-level packet first arrives in the buffer area, and the buffer area determines whether the message can be sent to the PDCP protocol layer.
- the packet in the buffer area is sent to the PDCP protocol layer; if not, the message is buffered in the packet buffer area; when there is more than one packet in the PDCP layer protocol processing, the Flag flag is set. Enable; otherwise, the flag is not enabled; all packets are grouped into one SDU according to the above TLV format, and the PDCP protocol is processed.
- the PDCP receiving end process After the PDCP receiving end processes the PDCP protocol process, it determines the Flag flag; if the Flag flag is not enabled, it directly delivers to the upper layer; if the Flag flag is enabled, it is opened according to the packet function; The packet parsing is performed according to the above TLV format, and each parsed message is delivered to the upper layer separately.
- Embodiment 1 Timer timeout scenario
- FIG. 12 is a flowchart 1 of a packet processing method according to a preferred embodiment of the present invention. As shown in FIG. 12, the method includes the following steps:
- Step S1202 the message arrives
- Step S1204 the message is added to the middle layer queue
- step S1206 it is determined whether the packet in the middle layer queue is greater than N? If the determination result is no, step S1208 is performed, and if the determination result is yes, step S1210 is performed;
- Step S1208 Determine whether the waiting time of the first packet in the packet in the middle layer queue is greater than T? If the determination result is no, the message processing ends, and if the determination result is yes, step S1210 is performed;
- Step S1210 all the intermediate layer queue buffer messages are taken out
- step S1212 all the packets buffered by the middle-layer packet queue are taken out, that is, sent to the receiving end, and the PDCP protocol stack of the receiving end is processed normally, and the SDU is parsed;
- Step S1214 the PDCP layer processes, and sets the Flag flag.
- the sender-side algorithm N is set to 120 bytes and T is 100 ms.
- the upper layer of the sending end sends a packet P1, the length of the packet is less than N, P1 enters the buffer area and waits for the timeout locator T; the upper layer of the sending end sends the second packet P2, and the length of P1+P2 is still less than N, then P2 also Waiting in the buffer area; if the timer expires, the packets P1 and P2 are sent to the PDCP protocol stack, and the flag is enabled to indicate that multiple packets need to be sent; the PDCP protocol stack sends P1 and P2 as a whole SDU.
- the SDU is parsed to determine the Flag flag; if the Flag flag is enabled, the message is parsed according to the above TLV format, and the message is sent. P1 and P2 are parsed and delivered to the high-level protocol.
- Embodiment 2 The accumulated message exceeds the maximum value
- FIG. 13 is a second flowchart of a message processing method according to a preferred embodiment of the present invention. As shown in FIG. 13, the method includes the following steps:
- Step S1302 low-level delivery PDU
- Step S130 PDCP layer protocol processing
- Step S1306 determining whether Flag is set in the PDCP header, if the determination result is yes, step S1308 is performed, and if the determination result is no, step S1312 is performed;
- Step S1310 each data parsed is delivered separately
- Step S1312 delivery to the upper level.
- the algorithm N of the transmitting end is 120 bytes, and T is 100 ms; the upper layer of the transmitting end sends a packet P1, the length of the packet is less than N, and P1 enters the buffer area to wait, and the timeout locator T is started; the transmitting end sends the second one. If the length of the packet P2 and P1+P2 is greater than N, the packets P1 and P2 are sent to the PDCP protocol stack, and the flag is set, indicating that multiple packets in the buffer area need to be sent together; meanwhile, the timer T is killed. The PDCP protocol stack sends the PDUs as P1 and P2 as a whole to the lower layer protocol stack, and sets the Flag flag to be enabled.
- the SDU is parsed and the Flag flag is determined. If the Flag flag is enabled, the Flag flag is enabled. Then, parsing according to the above TLV format, parsing the messages P1 and P2, and delivering them to the higher layer protocol respectively.
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- the above embodiments and the preferred embodiments solve the problem that the processing capability of the small message cannot be solved poorly in the related art, and the processing capability of the small message in the wireless network is effectively improved.
Landscapes
- Communication Control (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Disclosed are a packet processing method and device, the method comprising: at least two packets used for sending are stored in a cache; it is determined whether the at least two packets satisfy predetermined packet assembly conditions; if the determined result is affirmative, the at least two packets are assembled and sent. The present invention solves the problem in the related art of the capability to process small packets being relatively poor, and effectively improves small-packet processing capacity in a wireless network.
Description
本发明涉及通信领域,具体而言,涉及一种报文处理方法及装置。The present invention relates to the field of communications, and in particular to a packet processing method and apparatus.
LTE的层2用户面协议栈由3个子层组成,分为分组数据汇聚协议(Packet Data Convergence Protocol,简称为PDCP)、无线链路控制(Radio Link Control,简称为RLC)和媒体接入控制(Media Access Control,简称为MAC)。其中PDCP层主要功能包括头压缩、安全性功能(完整性保护和加密)以及对切换时重排序和重传的支持,这些功能取决于无线承载,每一无线承载有一个PDCP实体。The Layer 2 user plane protocol stack of LTE consists of three sublayers, which are divided into Packet Data Convergence Protocol (PDCP), Radio Link Control (RLC), and Media Access Control ( Media Access Control, referred to as MAC). The main functions of the PDCP layer include header compression, security functions (integrity protection and encryption), and support for reordering and retransmission at handover. These functions depend on the radio bearer, and each radio bearer has a PDCP entity.
PDCP层发送端处理流程:从上层接收到业务数据单元(Service Data Unit,简称为SDU)后,赋予序列号(Sequence Number,简称为SN)值,如果需要完整性保护,则执行完整性保护处理;如果需要加密,则执行加密处理;维护发送端的序列号和超帧号(Hyper Frame Number,简称为HFN)值,将协议数据单元(Protocol Data Unit,简称为PDU)发送给下层处理。The processing flow of the transmitting end of the PDCP layer: after receiving the Service Data Unit (SDU) from the upper layer, the sequence number (Sequence Number, referred to as SN) is assigned, and if integrity protection is required, the integrity protection process is performed. If the encryption is required, the encryption process is performed; the serial number of the sender and the Hyper Frame Number (HFN) value are maintained, and the Protocol Data Unit (PDU) is sent to the lower layer for processing.
PDCP层接收端处理流程:从下层接收到协议数据单元PDU,如果需要解密,执行解密处理;如果需要完整性保护处理,执行完整性保护校验;根据接收到序列号SN维护本地的接收序列号SN和超帧号HFN值,将业务数据单元SDU投递到高层处理。PDCP layer receiving end processing flow: receiving protocol data unit PDU from the lower layer, performing decryption processing if decryption is required; performing integrity protection check if integrity protection processing is required; maintaining local receiving serial number according to receiving serial number SN The SN and superframe number HFN values, the service data unit SDU is delivered to the higher layer processing.
随着LTE的大规模商用和移动互联网的蓬勃发展,网络中的业务类型变得更加的丰富,各种各样的报文都存在,比如很多的O2O应用、如微信、易信,微博等,还有传输控制协议(Transmission Control Protocol,简称为TCP)的ACK反馈报文等,这些报文的特点都是小包,而且是非常频繁,数据量比较大。With the rapid development of LTE's large-scale commercial and mobile Internet, the types of services in the network have become more abundant, and various kinds of messages exist, such as many O2O applications, such as WeChat, E-mail, Weibo, etc. There are also ACK feedback messages of the Transmission Control Protocol (TCP). These messages are characterized by small packets, which are very frequent and have a large amount of data.
但目前不论是终端侧或者是网络侧,PDCP协议的处理基本上都是类中央处理单元(Central Processing Unit,简称为CPU)的芯片,其主要特点是线性处理,小包处理能力较差。而根据PDCP协议,高层的每一个SDU都需要独立处理,经过PDCP协议处理后形成PDU发送给低层协议栈,如RLC。这样就会导致终端或者网络侧PDCP层处理小报文能力非常差,而空口带宽又无法得到足够的利用。例如,频分双工(Frequency Division Duplex,简称为FDD)20M带宽小区,空口能力是150Mbps,假设芯片每秒能处理10000个报文,如果每个报文大小是1500字节,则流量是110Mbps
左右;如果每个报文大小是64字节,则流量仅仅有5Mbps左右。当然,考虑到1500字节和64字节内存处理等因素,可能会更高一些,但是流量还是非常的低,远远没法满足真实商用环境的需求。However, at present, whether it is the terminal side or the network side, the processing of the PDCP protocol is basically a chip of a central processing unit (CPU), and its main feature is linear processing, and the packet processing capability is poor. According to the PDCP protocol, each SDU of the upper layer needs to be processed independently, and processed by the PDCP protocol to form a PDU and sent to a lower layer protocol stack, such as RLC. In this way, the PDCP layer on the terminal or the network side can handle small packets very poorly, and the air interface bandwidth cannot be fully utilized. For example, a Frequency Division Duplex (FDD) 20M bandwidth cell has an air interface capacity of 150 Mbps. It is assumed that the chip can process 10,000 packets per second. If the size of each packet is 1500 bytes, the traffic is 110 Mbps.
Left and right; if each message size is 64 bytes, the traffic is only about 5 Mbps. Of course, considering the 1500-byte and 64-byte memory processing factors, it may be higher, but the traffic is still very low, far from meeting the needs of real-life commercial environments.
对于这种小包的问题,目前的处理方法一般是使用更高速的处理器,更大的内存,但是基本上是治标不治本。For the problem of this small packet, the current processing method generally uses a higher speed processor and a larger memory, but basically it is a temporary solution.
针对相关技术中不能解决小报文处理能力较差的问题,目前尚未提出有效的解决方案。In view of the inability of the related art to solve the problem of poor processing capability of small messages, no effective solution has been proposed yet.
发明内容Summary of the invention
本发明提供了一种报文处理方法及装置,以至少解决相关技术中不能解决小报文处理能力较差的问题。The present invention provides a packet processing method and apparatus, so as to at least solve the problem that the related art cannot solve the problem that the small message processing capability is poor.
根据本发明的一个方面,提供了一种报文处理方法,包括:在缓存区中存储用于发送的至少两个报文;判断所述至少两个报文是否满足预定的组包条件;在判断结果为是的情况下,对所述至少两个报文进行组包发送。According to an aspect of the present invention, a packet processing method is provided, including: storing at least two messages for sending in a buffer area; determining whether the at least two messages meet a predetermined grouping condition; If the determination result is yes, the at least two messages are sent in a group package.
优选地,判断所述至少两个报文是否满足预定的组包条件包括以下至少之一:判断所述至少两个报文的总字节数是否大于或等于第一预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包;判断缓存所述至少两个报文中的第一个报文后等待的时间是否超过第二预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包。Preferably, determining whether the at least two messages meet the predetermined grouping condition includes at least one of: determining whether the total number of bytes of the at least two messages is greater than or equal to a first preset value, and determining a result If yes, determining whether to group the at least two packets; determining whether the time waiting to cache the first one of the at least two packets exceeds a second preset value, and determining the result In the case of YES, it is determined that the at least two messages are grouped.
优选地,对所述至少两个报文进行组包发送包括:在对所述至少两个报文进行组包后获得的数据包添加用于标识所述数据包为至少两个报文组合的组包标识;将添加了所述组包标识的所述数据包进行发送。Preferably, performing packet transmission on the at least two packets includes: adding, after the grouping the at least two packets, a data packet to identify that the data packet is a combination of at least two packets. The package identifier; the data packet to which the group package identifier is added is sent.
优选地,对所述至少两个报文进行组包发送包括:采用TLV(Tag、Length、Value)格式对所述至少两个报文进行区分的方式对所述至少两个报文进行组包发送。Preferably, the group sending of the at least two packets comprises: grouping the at least two packets by using a TLV (Tag, Length, Value) format to distinguish the at least two packets. send.
根据本发明的另一方面,提供了一种报文处理方法,包括:判断接收到的数据包是否为组包发送的数据包,其中,所述数据包为在缓存区中存储的至少两个报文的组合;在判断结果为是的情况下,采用组合所述至少两个报文的组包格式对接收到的所述数据包进行解析处理。
According to another aspect of the present invention, a packet processing method is provided, including: determining whether a received data packet is a data packet sent by a group packet, wherein the data packet is at least two stored in a buffer area. The combination of the messages; if the result of the determination is YES, the received data packet is parsed by using a group packet format combining the at least two messages.
根据本发明的另一方面,提供了一种报文处理装置,包括:储存模块,设置为在缓存区中存储用于发送的至少两个报文;第一判断模块,设置为判断所述至少两个报文是否满足预定的组包条件;发送模块,设置为在判断结果为是的情况下,对所述至少两个报文进行组包发送。According to another aspect of the present invention, a packet processing apparatus includes: a storage module configured to store at least two messages for transmission in a buffer area; and a first determining module configured to determine the at least Whether the two packets meet the predetermined grouping condition; the sending module is configured to perform group packet sending on the at least two packets if the determination result is yes.
优选地,所述第一判断模块包括以下至少之一:第一判断单元,设置为判断所述至少两个报文的总字节数是否大于或等于第一预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包;第二判断单元,设置为判断缓存所述至少两个报文中的第一个报文后等待的时间是否超过第二预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包。Preferably, the first determining module includes at least one of the following: a first determining unit, configured to determine whether a total number of bytes of the at least two messages is greater than or equal to a first preset value, and the determination result is And determining, by the second determining unit, whether the waiting time after buffering the first one of the at least two packets exceeds a second preset The value, if the determination result is yes, determines to group the at least two messages.
优选地,所述发送模块包括:添加单元,设置为在对所述至少两个报文进行组包后获得的数据包添加用于标识所述数据包为至少两个报文组合的组包标识;第一发送单元,设置为将添加了所述组包标识的所述数据包进行发送。Preferably, the sending module includes: an adding unit, configured to add a group identifier for identifying that the data packet is a combination of at least two packets after the data packet obtained by grouping the at least two packets a first sending unit configured to transmit the data packet to which the group packet identifier is added.
优选地,所述发送模块包括:第二发送单元,设置为采用TLV格式对所述至少两个报文进行区分的方式对所述至少两个报文进行组包发送。Preferably, the sending module includes: a second sending unit, configured to perform group sending of the at least two packets in a manner that distinguishes the at least two packets by using a TLV format.
根据本发明的另一方面,还提供了一种报文处理装置,包括:第二判断模块,设置为判断接收到的数据包是否为组包发送的数据包,其中,所述数据包为在缓存区中存储的至少两个报文的组合;解析模块,设置为在判断结果为是的情况下,采用组合所述至少两个报文的组包格式对接收到的所述数据包进行解析处理。According to another aspect of the present invention, a message processing apparatus is provided, including: a second determining module, configured to determine whether a received data packet is a data packet sent by a group packet, wherein the data packet is a combination of at least two packets stored in the buffer area; and a parsing module configured to parse the received data packet by using a group packet format combining the at least two packets when the determination result is yes deal with.
通过本发明,采用在缓存区中存储用于发送的至少两个报文;判断所述至少两个报文是否满足预定的组包条件;在判断结果为是的情况下,对所述至少两个报文进行组包发送,解决了相关技术中不能解决小报文处理能力较差的问题,有效提升了无线网络中小报文的处理能力。According to the present invention, at least two messages for transmission are stored in the buffer area; determining whether the at least two messages satisfy a predetermined grouping condition; and if the determination result is yes, the at least two The packets are sent in groups, which solves the problem that the related technologies cannot solve the problem of small packet processing capability, and effectively improves the processing capability of small messages in the wireless network.
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的报文处理方法的流程图一;1 is a flowchart 1 of a message processing method according to an embodiment of the present invention;
图2是根据本发明实施例的报文处理方法的流程图二;
2 is a second flowchart of a message processing method according to an embodiment of the present invention;
图3是根据本发明实施例的报文处理装置的框图一;3 is a block diagram 1 of a message processing apparatus according to an embodiment of the present invention;
图5是根据本发明优选实施例的报文处理装置的框图二;Figure 5 is a block diagram 2 of a message processing apparatus in accordance with a preferred embodiment of the present invention;
图5是根据本发明优选实施例的报文处理装置的框图二;Figure 5 is a block diagram 2 of a message processing apparatus in accordance with a preferred embodiment of the present invention;
图6是根据本发明优选实施例的报文处理装置的框图三;Figure 6 is a block diagram 3 of a message processing apparatus in accordance with a preferred embodiment of the present invention;
图7是根据本发明实施例的报文处理装置的框图二;FIG. 7 is a block diagram 2 of a message processing apparatus according to an embodiment of the present invention; FIG.
图8是根据本发明优选实施例的报文处理装置的示意图;FIG. 8 is a schematic diagram of a message processing apparatus according to a preferred embodiment of the present invention; FIG.
图9是与本发明实施例相关的PDCP报文头的示意图;9 is a schematic diagram of a PDCP packet header related to an embodiment of the present invention;
图10是根据本发明实施例的PDCP报文头的示意图;FIG. 10 is a schematic diagram of a PDCP header according to an embodiment of the present invention; FIG.
图11是根据本发明实施例的PDCP报文的示意图;11 is a schematic diagram of a PDCP message according to an embodiment of the present invention;
图12是根据本发明优选实施例的报文处理方法的流程图一;12 is a flowchart 1 of a message processing method according to a preferred embodiment of the present invention;
图13是根据本发明优选实施例的报文处理方法的流程图二。FIG. 13 is a second flowchart of a message processing method according to a preferred embodiment of the present invention.
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种报文处理方法,图1是根据本发明实施例的报文处理方法的流程图一,如图1所示,该流程包括如下步骤:A packet processing method is provided in this embodiment. FIG. 1 is a flowchart 1 of a packet processing method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,在缓存区中存储用于发送的至少两个报文;Step S102, storing at least two messages for sending in the buffer area;
步骤S104,判断该至少两个报文是否满足预定的组包条件;Step S104, determining whether the at least two messages meet the predetermined grouping condition;
步骤S106,在判断结果为是的情况下,对该至少两个报文进行组包发送。Step S106: If the determination result is yes, the at least two packets are sent in a group package.
通过上述步骤,在缓存区中存储的至少两个报文,判断该至少两个报文是否满足预定的组包条件,在满足的情况下,对该至少两个报文进行组包发送,解决了相关技术中不能解决小报文处理能力较差的问题,提升了无线网络中小报文的处理能力。
And the at least two packets stored in the buffer area are determined by the foregoing steps to determine whether the at least two packets meet the predetermined grouping condition, and if the two packets are satisfied, the at least two packets are sent to the group to solve the problem. In the related art, the problem that the small message processing capability is poor can not be solved, and the processing capability of the small message in the wireless network is improved.
作为优选的实施方式,通过以下至少之一判断至少两个报文是否满足预定的组包条件:判断该至少两个报文的总字节数是否大于或等于第一预设值,在判断结果为是的情况下,确定对该至少两个报文进行组包;判断缓存该至少两个报文中的第一个报文后等待的时间是否超过第二预设值,在判断结果为是的情况下,确定对该至少两个报文进行组包,另外,需要强调的是,在缓存第一个报文后等待的时间超过第二预设值,且此时仅有一个报文的情况下,将该报文直接进行发送即可。上述两种方式仅仅的优选的实施方式而已,也可以根据别的条件确定对报文进行组包,在此不再赘述。As a preferred implementation manner, it is determined whether the at least two packets meet the predetermined grouping condition by at least one of the following: determining whether the total number of bytes of the at least two packets is greater than or equal to the first preset value, and determining the result If yes, determine whether to group the at least two packets; determine whether the waiting time after buffering the first one of the at least two packets exceeds a second preset value, and the result is In the case of the case, it is determined that the at least two packets are grouped. In addition, it is emphasized that the waiting time after buffering the first packet exceeds the second preset value, and only one packet is available at this time. In this case, the message can be sent directly. The foregoing two modes are only preferred embodiments, and the packet can be grouped according to other conditions, and details are not described herein again.
本实施例中,在对至少两个报文进行组包后获得的数据包中添加标识,用于标识该数据包为至少两个报文组合的组包标识,将添加了该组包标识的该数据包进行发送,通过添加标识的方式,使得接收到数据包之后能够知晓该数据包是经过组包之后的数据包,从而直接对数据包进行解析处理,提高了处理的效率。In this embodiment, an identifier is added to a data packet obtained after grouping at least two packets, and is used to identify that the data packet is a group identifier of at least two packet combinations, and the group identifier is added. The data packet is sent, and the identifier is added, so that after receiving the data packet, the data packet can be known as the data packet after the group packet, so that the data packet is directly parsed and processed, thereby improving the processing efficiency.
作为一种优选的实施方式,采用TLV格式对该至少两个报文进行区分的方式对该至少两个报文进行组包发送,采用TLV格式有利于区分组包中的每一个报文,从而在解析出租包后的数据包时,能够准确地区分中各个报文。当然也可以采用别的格式,只要是能达到相同效果的格式均在本发明实施例的保护范围之中。As a preferred implementation, the at least two packets are sent in groups by using the TLV format to differentiate the at least two packets, and the TLV format is used to facilitate each packet in the packet. When parsing the data packet after the rental package, it can accurately distinguish each message. Of course, other formats may be used, as long as the format that can achieve the same effect is within the protection scope of the embodiment of the present invention.
本发明实施例的另一方面,提供了一种报文处理方法,图2是根据本发明实施例的报文处理方法的流程图二,如图2所示,包括:Another aspect of the present invention provides a packet processing method. FIG. 2 is a second flowchart of a packet processing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes:
步骤S202,判断接收到的数据包是否为组包发送的数据包,其中,该数据包为在缓存区中存储的至少两个报文的组合;Step S202, determining whether the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area;
步骤S204,在判断结果为是的情况下,采用组合该至少两个报文的组包格式对接收到的该数据包进行解析处理。Step S204: If the determination result is yes, the received data packet is parsed by using a packet format that combines the at least two messages.
通过上述步骤,判断接收到的数据包是否为组包发送的数据包,其中,该数据包为在缓存区中存储的至少两个报文的组合;在判断结果为是的情况下,采用组合该至少两个报文的组包格式对接收到的该数据包进行解析处理,解决了相关技术中不能解决小报文处理能力较差的问题,提升了无线网络中小报文的处理能力。Through the above steps, it is determined whether the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area; if the determination result is yes, the combination is adopted. The packet format of the at least two packets parses the received data packet, which solves the problem that the small message processing capability cannot be solved in the related art, and improves the processing capability of the small message in the wireless network.
根据本发明的另一方面,提供了一种报文处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
According to another aspect of the present invention, a message processing apparatus is provided, which is used to implement the above-described embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图3是根据本发明实施例的报文处理装置的框图一,如图3所示,包括:储存模块32、第一判断模块34和发送模块36,下面对各个模块进行简要说明。FIG. 3 is a block diagram of a message processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the storage module 32 includes a storage module 32, a first determining module 34, and a sending module 36. The modules are briefly described below.
储存模块32,设置为在缓存区中存储用于发送的至少两个报文;The storage module 32 is configured to store at least two messages for sending in the buffer area;
第一判断模块34,设置为判断该至少两个报文是否满足预定的组包条件;The first determining module 34 is configured to determine whether the at least two packets meet the predetermined grouping condition;
发送模块36,设置为在判断结果为是的情况下,对该至少两个报文进行组包发送。The sending module 36 is configured to, when the determination result is yes, perform packet transmission on the at least two packets.
图4是根据本发明优选实施例的报文处理装置的框图一,如图4所示,该第一判断模块34包括以下至少之一:4 is a block diagram 1 of a message processing apparatus according to a preferred embodiment of the present invention. As shown in FIG. 4, the first determining module 34 includes at least one of the following:
第一判断单元42,设置为判断该至少两个报文的总字节数是否大于或等于第一预设值,在判断结果为是的情况下,确定对该至少两个报文进行组包;The first determining unit 42 is configured to determine whether the total number of bytes of the at least two messages is greater than or equal to the first preset value, and if the determination result is yes, determine to group the at least two packets. ;
第二判断单元44,设置为判断缓存该至少两个报文中的第一个报文后等待的时间是否超过第二预设值,在判断结果为是的情况下,确定对该至少两个报文进行组包。The second determining unit 44 is configured to determine whether the time waiting for the first message in the at least two messages to be cached exceeds a second preset value, and if the determination result is yes, determining the at least two The message is grouped.
图5是根据本发明优选实施例的报文处理装置的框图二,如图5所示,该发送模块36包括:FIG. 5 is a block diagram 2 of a message processing apparatus according to a preferred embodiment of the present invention. As shown in FIG. 5, the sending module 36 includes:
添加单元52,设置为在对该至少两个报文进行组包后获得的数据包添加用于标识该数据包为至少两个报文组合的组包标识;The adding unit 52 is configured to add, to the data packet obtained after the grouping the at least two packets, a group identifier for identifying that the data packet is a combination of at least two packets;
第一发送单元54,设置为将添加了该组包标识的该数据包进行发送。The first transmitting unit 54 is configured to transmit the data packet to which the group identifier is added.
图6是根据本发明优选实施例的报文处理装置的框图三,如图6所示,该发送模块36包括:FIG. 6 is a block diagram 3 of a message processing apparatus according to a preferred embodiment of the present invention. As shown in FIG. 6, the sending module 36 includes:
第二发送单元62,设置为采用TLV格式对该至少两个报文进行区分的方式对该至少两个报文进行组包发送。The second sending unit 62 is configured to perform packet sending of the at least two packets in a manner that distinguishes the at least two packets by using a TLV format.
根据本发明的另一方面,提供了一种报文处理装置,图7是根据本发明实施例的报文处理装置的框图二,如图7所示,包括:According to another aspect of the present invention, a packet processing apparatus is provided. FIG. 7 is a block diagram 2 of a message processing apparatus according to an embodiment of the present invention. As shown in FIG. 7, the method includes:
第二判断模块72,设置为判断接收到的数据包是否为组包发送的数据包,其中,该数据包为在缓存区中存储的至少两个报文的组合;The second determining module 72 is configured to determine whether the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area;
解析模块74,设置为在判断结果为是的情况下,采用组合该至少两个报文的组包格式对接收到的该数据包进行解析处理。
The parsing module 74 is configured to parse the received data packet by using a packet format combining the at least two messages when the determination result is YES.
下面结合优选实施方式对本发明实施例进行进一步说明。The embodiments of the present invention are further described below in conjunction with the preferred embodiments.
本发明实施例的关键是在PDCP协议层和高层之间增加一个小包缓存区,图8是根据本发明优选实施例的报文处理装置的示意图,如图8所示,该缓存区主要用于:如果缓存区中的报文字节数大于等于N字节,或者缓存区第一个报文等待的时间超过T时间;把缓存区中的所有报文一起发送到PDCP协议层作为一个SUD进行发送;否则,在缓存区进行等待。在增加缓存区后,将小包打包成一个SDU在PDCP层进行处理,因此会对现在的PDCP协议报文格式有一定的改动,需要对于标准PDCP协议报文进行一定的扩展,使用了PDCP中的保留字段来表明是否启用。The key to the embodiment of the present invention is to add a packet buffer area between the PDCP protocol layer and the upper layer. FIG. 8 is a schematic diagram of a message processing apparatus according to a preferred embodiment of the present invention. As shown in FIG. 8, the buffer area is mainly used for : If the number of bytes in the buffer area is greater than or equal to N bytes, or the first message in the buffer area waits for more than T time; all the packets in the buffer area are sent together to the PDCP protocol layer as a SUD. Send; otherwise, wait in the buffer area. After the buffer area is added, the packet is packaged into an SDU and processed in the PDCP layer. Therefore, the format of the current PDCP protocol packet is changed. The standard PDCP protocol packet needs to be extended to some extent. Leave the field to indicate whether it is enabled.
图9是与本发明实施例相关的PDCP报文头的示意图,如图9所示,在Flag标记启用后,在上述报文格式中Data域存放多个小报文的格式为TLV格式,如图10、11所示,T标记占1bit,表明此报文结束是否还有报文;如果有则为1,如果没有则为0;如果只有一个报文则为0;Length域占7bit,最长表示128长报文长度;Data域是高层报文;如果有多个报文,则多个小报文按照TLV的格式依次排列。FIG. 9 is a schematic diagram of a PDCP packet header related to an embodiment of the present invention. As shown in FIG. 9 , after the Flag flag is enabled, the format of the small packet in the Data field is TLV format in the packet format, such as As shown in Figure 10 and Figure 11, the T flag occupies 1 bit, indicating whether there is still a message at the end of the message; if it is, it is 1, if it is not, it is 0; if there is only one message, it is 0; the Length field is 7 bit, the most The length indicates the length of the long message of 128; the data field is the upper layer message; if there are multiple messages, the plurality of small messages are arranged in the order of the TLV.
在增加缓存区后对现有的PDCP协议处理流程有一定的改动,对于PDCP发送端流程而言,高层报文先到缓存区,缓存区判断此报文是否可发送给PDCP协议层;如果是,则把缓存区的报文发送给PDCP协议层;如果否,则此报文缓存在小包缓存区;在PDCP层协议处理时,如果有1个以上的小包进行一起打包处理,则置Flag标记使能;否则,标记为非使能;将所有小包按照上述TLV格式进行组包为一个SDU,继续进行PDCP协议的处理。对于PDCP接收端流程而言,PDCP接收端处理完PDCP协议流程处理后,判断Flag标记;如果Flag标记未使能,则直接投递给高层;如果Flag标记使能,则按照小包功能打开进行处理;按照上述TLV格式进行小包解析,把解析出的每个小报文分别投递给高层。After the buffer area is added, the existing PDCP protocol process is modified. For the PDCP sender process, the high-level packet first arrives in the buffer area, and the buffer area determines whether the message can be sent to the PDCP protocol layer. The packet in the buffer area is sent to the PDCP protocol layer; if not, the message is buffered in the packet buffer area; when there is more than one packet in the PDCP layer protocol processing, the Flag flag is set. Enable; otherwise, the flag is not enabled; all packets are grouped into one SDU according to the above TLV format, and the PDCP protocol is processed. For the PDCP receiving end process, after the PDCP receiving end processes the PDCP protocol process, it determines the Flag flag; if the Flag flag is not enabled, it directly delivers to the upper layer; if the Flag flag is enabled, it is opened according to the packet function; The packet parsing is performed according to the above TLV format, and each parsed message is delivered to the upper layer separately.
下面结合具体实施例对本发明优选实施例进行详细说明。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail in conjunction with specific embodiments.
实施例1:定时器超时场景Embodiment 1: Timer timeout scenario
图12是根据本发明优选实施例的报文处理方法的流程图一,如图12所示,该方法包括以下步骤:FIG. 12 is a flowchart 1 of a packet processing method according to a preferred embodiment of the present invention. As shown in FIG. 12, the method includes the following steps:
步骤S1202,报文到达;Step S1202, the message arrives;
步骤S1204,报文加入到中间层队列;
Step S1204, the message is added to the middle layer queue;
步骤S1206,判断中间层队列中的报文是否大于N?在判断结果为否的情况下,执行步骤S1208,在判断结果为是的情况下,执行步骤S1210;In step S1206, it is determined whether the packet in the middle layer queue is greater than N? If the determination result is no, step S1208 is performed, and if the determination result is yes, step S1210 is performed;
步骤S1208,判断中间层队列中的报文中的第一报文等待的时间是否大于T?在在判断结果为否的情况下,报文处理结束,在判断结果为是的情况下,执行步骤S1210;Step S1208: Determine whether the waiting time of the first packet in the packet in the middle layer queue is greater than T? If the determination result is no, the message processing ends, and if the determination result is yes, step S1210 is performed;
步骤S1210,中间层队列缓存报文全部取出;Step S1210: all the intermediate layer queue buffer messages are taken out;
步骤S1212,中间层报文队列缓存的报文全部取出,即发送到接收端,接收端PDCP协议栈正常处理完后,解析出SDU;In step S1212, all the packets buffered by the middle-layer packet queue are taken out, that is, sent to the receiving end, and the PDCP protocol stack of the receiving end is processed normally, and the SDU is parsed;
步骤S1214,PDCP层处理,并且设置Flag标记。Step S1214, the PDCP layer processes, and sets the Flag flag.
具体地,假设设置发送端算法N为120byte,T为100ms。发送端高层发送一个报文P1,报文长度小于N,P1进入缓存区等待,启动超时定位器T;发送端高层发送第二个报文P2,P1+P2的长度仍然小于N,则P2也进入缓存区等待;若定时器超时,将报文P1、P2都发送给PDCP协议栈,并且设置标记使能,表明需要发送的是多个小包;PDCP协议栈将P1、P2作为一个整体SDU发送给低层协议栈,并且设置Flag标记为使能;接收端PDCP协议栈正常处理完后,解析出SDU,判断Flag标记;如果Flag标记被使能了,则按照上述TLV格式进行解析,将报文P1和P2解析出来,分别投递给高层协议。Specifically, it is assumed that the sender-side algorithm N is set to 120 bytes and T is 100 ms. The upper layer of the sending end sends a packet P1, the length of the packet is less than N, P1 enters the buffer area and waits for the timeout locator T; the upper layer of the sending end sends the second packet P2, and the length of P1+P2 is still less than N, then P2 also Waiting in the buffer area; if the timer expires, the packets P1 and P2 are sent to the PDCP protocol stack, and the flag is enabled to indicate that multiple packets need to be sent; the PDCP protocol stack sends P1 and P2 as a whole SDU. To the lower layer protocol stack, and set the Flag flag to be enabled; after the PDCP protocol stack is processed normally, the SDU is parsed to determine the Flag flag; if the Flag flag is enabled, the message is parsed according to the above TLV format, and the message is sent. P1 and P2 are parsed and delivered to the high-level protocol.
实施例2:积攒报文超过最大值Embodiment 2: The accumulated message exceeds the maximum value
图13是根据本发明优选实施例的报文处理方法的流程图二,如图13所示,该方法包括以下步骤:FIG. 13 is a second flowchart of a message processing method according to a preferred embodiment of the present invention. As shown in FIG. 13, the method includes the following steps:
步骤S1302,低层投递PDU;Step S1302, low-level delivery PDU;
步骤S1304,PDCP层协议处理;Step S1304, PDCP layer protocol processing;
步骤S1306,判断PDCP报文头中Flag是否置位,在判断结果为是的情况下,执行步骤S1308,在判断结果为否的情况下,执行步骤S1312;Step S1306, determining whether Flag is set in the PDCP header, if the determination result is yes, step S1308 is performed, and if the determination result is no, step S1312 is performed;
步骤S1308,按照TLV格式进行解析;Step S1308, parsing according to the TLV format;
步骤S1310,解析出的每个数据分别投递;Step S1310: each data parsed is delivered separately;
步骤S1312,投递给高层。
Step S1312, delivery to the upper level.
具体地,假设设置发送端算法N为120byte,T为100ms;发送端高层发送一个报文P1,报文长度小于N,P1进入缓存区等待,启动超时定位器T;发送端高超发送第二个报文P2,P1+P2的长度大于N,则将报文P1、P2都发送给PDCP协议栈,并且设置标记,表明缓存区有多个小包需要一起发送;同时,杀死定时器T。PDCP协议栈将P1、P2作为一个整体的SDU发送给低层协议栈,并且设置Flag标记为使能;接收端PDCP协议栈正常处理完后,解析出SDU,判断Flag标记;如果Flag标记被使能了,则按照上述TLV格式进行解析,将报文P1和P2解析出来,分别投递给高层协议。Specifically, it is assumed that the algorithm N of the transmitting end is 120 bytes, and T is 100 ms; the upper layer of the transmitting end sends a packet P1, the length of the packet is less than N, and P1 enters the buffer area to wait, and the timeout locator T is started; the transmitting end sends the second one. If the length of the packet P2 and P1+P2 is greater than N, the packets P1 and P2 are sent to the PDCP protocol stack, and the flag is set, indicating that multiple packets in the buffer area need to be sent together; meanwhile, the timer T is killed. The PDCP protocol stack sends the PDUs as P1 and P2 as a whole to the lower layer protocol stack, and sets the Flag flag to be enabled. After the PDCP protocol stack is processed normally, the SDU is parsed and the Flag flag is determined. If the Flag flag is enabled, the Flag flag is enabled. Then, parsing according to the above TLV format, parsing the messages P1 and P2, and delivering them to the higher layer protocol respectively.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
如上所述,通过上述实施例及优选实施方式,解决了相关技术中不能解决小报文处理能力较差的问题,有效提升了无线网络中小报文的处理能力。
As described above, the above embodiments and the preferred embodiments solve the problem that the processing capability of the small message cannot be solved poorly in the related art, and the processing capability of the small message in the wireless network is effectively improved.
Claims (10)
- 一种报文处理方法,包括:A packet processing method includes:在缓存区中存储用于发送的至少两个报文;Storing at least two messages for transmission in a buffer area;判断所述至少两个报文是否满足预定的组包条件;Determining whether the at least two messages meet a predetermined grouping condition;在判断结果为是的情况下,对所述至少两个报文进行组包发送。If the result of the determination is yes, the at least two messages are sent in groups.
- 根据权利要求1所述的方法,其中,判断所述至少两个报文是否满足预定的组包条件包括以下至少之一:The method of claim 1, wherein determining whether the at least two messages satisfy a predetermined grouping condition comprises at least one of the following:判断所述至少两个报文的总字节数是否大于或等于第一预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包;Determining whether the total number of bytes of the at least two packets is greater than or equal to a first preset value, and if the determination result is yes, determining to group the at least two packets;判断缓存所述至少两个报文中的第一个报文后等待的时间是否超过第二预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包。Determining whether the time waiting for the first one of the at least two packets to be cached exceeds a second preset value, and if the determination result is yes, determining to group the at least two packets.
- 根据权利要求1所述的方法,其中,对所述至少两个报文进行组包发送包括:The method of claim 1, wherein the group sending the at least two messages comprises:在对所述至少两个报文进行组包后获得的数据包添加用于标识所述数据包为至少两个报文组合的组包标识;Adding, to the data packet obtained after the grouping the at least two packets, a packet identifier for identifying that the data packet is a combination of at least two packets;将添加了所述组包标识的所述数据包进行发送。The data packet to which the group package identifier is added is transmitted.
- 根据权利要求1所述的方法,其中,对所述至少两个报文进行组包发送包括:The method of claim 1, wherein the group sending the at least two messages comprises:采用TLV格式对所述至少两个报文进行区分的方式对所述至少两个报文进行组包发送。The at least two packets are group-sently transmitted in a manner that distinguishes the at least two packets by using a TLV format.
- 一种报文处理方法,包括:A packet processing method includes:判断接收到的数据包是否为组包发送的数据包,其中,所述数据包为在缓存区中存储的至少两个报文的组合;Determining whether the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area;在判断结果为是的情况下,采用组合所述至少两个报文的组包格式对接收到的所述数据包进行解析处理。If the determination result is yes, the received data packet is parsed by using a group packet format that combines the at least two messages.
- 一种报文处理装置,包括:A message processing device comprising:储存模块,设置为在缓存区中存储用于发送的至少两个报文;a storage module, configured to store at least two messages for sending in a buffer area;第一判断模块,设置为判断所述至少两个报文是否满足预定的组包条件; a first determining module, configured to determine whether the at least two messages meet a predetermined grouping condition;发送模块,设置为在判断结果为是的情况下,对所述至少两个报文进行组包发送。The sending module is configured to perform group packet sending on the at least two packets if the determination result is yes.
- 根据权利要求6所述的装置,其中,所述第一判断模块包括以下至少之一:The apparatus of claim 6, wherein the first determining module comprises at least one of:第一判断单元,设置为判断所述至少两个报文的总字节数是否大于或等于第一预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包;The first determining unit is configured to determine whether the total number of bytes of the at least two packets is greater than or equal to a first preset value, and if the determination result is yes, determine to group the at least two packets package;第二判断单元,设置为判断缓存所述至少两个报文中的第一个报文后等待的时间是否超过第二预设值,在判断结果为是的情况下,确定对所述至少两个报文进行组包。a second determining unit, configured to determine whether a time waiting for buffering the first one of the at least two messages exceeds a second preset value, and if the determination result is yes, determining at least two Packets are grouped.
- 根据权利要求6所述的装置,其中,所述发送模块包括:The apparatus of claim 6, wherein the transmitting module comprises:添加单元,设置为在对所述至少两个报文进行组包后获得的数据包添加用于标识所述数据包为至少两个报文组合的组包标识;Adding a unit, configured to add, to the data packet obtained after the grouping the at least two packets, a group identifier for identifying that the data packet is a combination of at least two packets;第一发送单元,设置为将添加了所述组包标识的所述数据包进行发送。The first sending unit is configured to send the data packet to which the group packet identifier is added.
- 根据权利要求6所述的装置,其中,所述发送模块包括:The apparatus of claim 6, wherein the transmitting module comprises:第二发送单元,设置为采用TLV格式对所述至少两个报文进行区分的方式对所述至少两个报文进行组包发送。The second sending unit is configured to perform packet sending of the at least two packets in a manner that distinguishes the at least two packets by using a TLV format.
- 一种报文处理装置,包括:A message processing device comprising:第二判断模块,设置为判断接收到的数据包是否为组包发送的数据包,其中,所述数据包为在缓存区中存储的至少两个报文的组合;a second determining module, configured to determine whether the received data packet is a data packet sent by the group packet, where the data packet is a combination of at least two messages stored in the buffer area;解析模块,设置为在判断结果为是的情况下,采用组合所述至少两个报文的组包格式对接收到的所述数据包进行解析处理。 The parsing module is configured to parse the received data packet by using a group packet format combining the at least two messages when the determination result is yes.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410577678.6A CN105591975A (en) | 2014-10-24 | 2014-10-24 | Message processing method and apparatus |
CN201410577678.6 | 2014-10-24 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016061987A1 true WO2016061987A1 (en) | 2016-04-28 |
Family
ID=55760163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/074331 WO2016061987A1 (en) | 2014-10-24 | 2015-03-16 | Packet processing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105591975A (en) |
WO (1) | WO2016061987A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111541749A (en) * | 2020-04-14 | 2020-08-14 | 杭州涂鸦信息技术有限公司 | Data communication method and system of embedded equipment and related equipment |
CN115167612A (en) * | 2022-07-14 | 2022-10-11 | 北京中科心研科技有限公司 | Wall time and supplementary packet method, device and medium for synchronizing data |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106330393A (en) * | 2016-08-10 | 2017-01-11 | 成都广达新网科技股份有限公司 | Packet assembly method and system for TLV (Type, Length and Value) format data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010055317A1 (en) * | 2000-06-21 | 2001-12-27 | Noriki Kajizaki | Network relay apparatus and method of combining packets |
CN101175071A (en) * | 2006-11-01 | 2008-05-07 | 中兴通讯股份有限公司 | MAC protocol data unit construction method |
CN101515841A (en) * | 2009-04-03 | 2009-08-26 | 华为技术有限公司 | Method for data packet transmission based on RapidIO, device and system |
CN102377650A (en) * | 2010-08-12 | 2012-03-14 | 华为技术有限公司 | Data transmission processing method, device and system |
CN103379046A (en) * | 2012-04-20 | 2013-10-30 | 唐漫宇 | Method for improving message sending efficiency through IP message combining and splitting technology |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101415276A (en) * | 2008-11-24 | 2009-04-22 | 中兴通讯股份有限公司 | Method and equipment for sending and receiving data |
CN102026289A (en) * | 2010-12-22 | 2011-04-20 | 中兴通讯股份有限公司 | Generic routing encapsulation message processing method and system |
-
2014
- 2014-10-24 CN CN201410577678.6A patent/CN105591975A/en active Pending
-
2015
- 2015-03-16 WO PCT/CN2015/074331 patent/WO2016061987A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010055317A1 (en) * | 2000-06-21 | 2001-12-27 | Noriki Kajizaki | Network relay apparatus and method of combining packets |
CN101175071A (en) * | 2006-11-01 | 2008-05-07 | 中兴通讯股份有限公司 | MAC protocol data unit construction method |
CN101515841A (en) * | 2009-04-03 | 2009-08-26 | 华为技术有限公司 | Method for data packet transmission based on RapidIO, device and system |
CN102377650A (en) * | 2010-08-12 | 2012-03-14 | 华为技术有限公司 | Data transmission processing method, device and system |
CN103379046A (en) * | 2012-04-20 | 2013-10-30 | 唐漫宇 | Method for improving message sending efficiency through IP message combining and splitting technology |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111541749A (en) * | 2020-04-14 | 2020-08-14 | 杭州涂鸦信息技术有限公司 | Data communication method and system of embedded equipment and related equipment |
CN111541749B (en) * | 2020-04-14 | 2023-05-02 | 杭州涂鸦信息技术有限公司 | Data communication method and system of embedded equipment and related equipment |
CN115167612A (en) * | 2022-07-14 | 2022-10-11 | 北京中科心研科技有限公司 | Wall time and supplementary packet method, device and medium for synchronizing data |
Also Published As
Publication number | Publication date |
---|---|
CN105591975A (en) | 2016-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109716728B (en) | Method and apparatus for ordering delivery of protocol data units | |
CN102377803B (en) | Data processing method, device and system | |
RU2461147C2 (en) | Method of processing radio protocol in mobile communication system and mobile communication transmitter | |
EP2245827B1 (en) | Methods and apparatus for formatting headers in a communication frame | |
KR101342417B1 (en) | - - MAC-HS processing in an HSDPA-compatible receiver in a 3G wireless network | |
CN103782569B (en) | Data processing equipment and method | |
EP2183890B1 (en) | Aggregate data frame generation | |
US20190312938A1 (en) | Data Transmission Method And Apparatus | |
CN107404734B (en) | Data sending method, device and system | |
TR201809100T4 (en) | The method for transmitting the PDCP status report. | |
KR20090031239A (en) | A method for handling correctly received but header compression failed packets | |
WO2021128913A1 (en) | Enhancement method of cellular network uplink ecn mechanism, device and medium | |
WO2017049647A1 (en) | Data sending method, data receiving method and relevant device | |
CN101843157A (en) | Buffer status reporting based on radio bearer configuration | |
CN109714134B (en) | Receiving window sliding method and device | |
KR100954925B1 (en) | Method of delivering a pdcp data unit to an upper layer | |
WO2011150767A1 (en) | Method, apparatus and system for data transmission processing | |
CN108632326B (en) | Method and device for transmitting data by protocol data unit | |
CN102638328B (en) | A kind of method of transfer of data and device | |
WO2016061987A1 (en) | Packet processing method and device | |
JP2011514741A5 (en) | ||
WO2016061985A1 (en) | Packet processing method, device, and system | |
CN108200605B (en) | Data transmission method and device for base station | |
JP2023062123A (en) | Wireless communication device, wireless communication method, and wireless communication system | |
CN108012289B (en) | PDU (protocol data Unit) sending method and device and PDU receiving method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15853254 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15853254 Country of ref document: EP Kind code of ref document: A1 |