CN114143268B - TCP-based message receiving method and device, electronic equipment and storage medium - Google Patents
TCP-based message receiving method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114143268B CN114143268B CN202111238367.3A CN202111238367A CN114143268B CN 114143268 B CN114143268 B CN 114143268B CN 202111238367 A CN202111238367 A CN 202111238367A CN 114143268 B CN114143268 B CN 114143268B
- Authority
- CN
- China
- Prior art keywords
- message segment
- segment
- message
- cached
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 230000005540 biological transmission Effects 0.000 claims description 10
- 230000003139 buffering effect Effects 0.000 claims 2
- 238000012545 processing Methods 0.000 description 8
- 238000012423 maintenance Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/72—Admission control; Resource allocation using reservation actions during connection setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/32—Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域Technical field
本申请涉及网络技术领域,尤其涉及一种基于传输控制协议(TransmissionControl Protocol,TCP)的报文接收方法及装置、电子设备及存储介质。The present application relates to the field of network technology, and in particular to a message receiving method and device, electronic equipment and storage medium based on Transmission Control Protocol (Transmission Control Protocol, TCP).
背景技术Background technique
TCP层的接收功能一般包括:The receiving functions of the TCP layer generally include:
从网络协议(Internet Protocol,IP)层接收报文段;Receive message segments from the Internet Protocol (IP) layer;
解析包头信息;Parse header information;
根据序号和地址的对应将数据缓存在缓存区域中;According to the correspondence between serial number and address Cache data in the cache area;
执行窗口控制,对正序接收的数据及时提交给应用层;Execute window control and submit the data received in the positive sequence to the application layer in a timely manner;
对于乱序报文进行维护。Maintain out-of-order packets.
对乱序报文的维护方式包括:缓存全部落在窗口内的报文,并使用链表或者数据标识位进行标识,但是采用这种缓存方式会导致存储开销极大。Maintenance methods for out-of-order packets include: caching all packets that fall within the window and using linked lists or data identifiers to identify them. However, this caching method will cause huge storage overhead.
发明内容Contents of the invention
本申请实施例提供了一种基于TCP的报文接收方法及装置、电子设备及存储介质。Embodiments of the present application provide a TCP-based message receiving method and device, electronic equipment, and storage media.
本申请实施例第一方面提供一种基于传输控制协议TCP的报文接收方法,包括:The first aspect of the embodiment of the present application provides a message receiving method based on the transmission control protocol TCP, including:
若所述当前报文段不是待接收的第s顺序报文段,确定所述当前报文段是当前乱序报文段;If the current message segment is not the s-th sequential message segment to be received, determine that the current message segment is the current out-of-order message segment;
若存在N个已缓存报文段,确定所述当前乱序报文段与所述已缓存报文段之间是否满足预设条件,得到确定结果;其中,所述已缓存报文段为:历史乱序报文段;所述当前乱序报文段与所述已缓存报文段之间满足所述预设条件包括:所述当前乱序报文段与所述已缓存报文段内容连续或者存在重叠内容;所述N为小于或等于预先设置的允许缓存报文段的最大段数M;If there are N cached message segments, determine whether the preset conditions are met between the current out-of-order message segment and the cached message segment, and obtain a determination result; wherein the cached message segment is: Historical out-of-order message segments; satisfying the preset conditions between the current out-of-order message segment and the cached message segment includes: the contents of the current out-of-order message segment and the cached message segment Continuous or overlapping content exists; the N is less than or equal to the preset maximum number of segments M that are allowed to be cached;
根据所述确定结果,确定是否缓存所述当前乱序报文段。According to the determination result, it is determined whether to cache the current out-of-order message segment.
基于上述方案,所述根据所述确定结果,确定是否缓存所述当前乱序报文段,包括:Based on the above solution, determining whether to cache the current out-of-order message segment according to the determination result includes:
当所述确定结果表明所述当前乱序报文段与所述已缓存报文段不满足所述预设条件,丢弃所述当前乱序报文段;When the determination result indicates that the current out-of-order message segment and the cached message segment do not meet the preset condition, discard the current out-of-order message segment;
或者,or,
当所述N小于所述M且所述当前报文段与所述已缓存报文段不满足所述预设条件,缓存所述当前报文段。When the N is less than the M and the current message segment and the cached message segment do not meet the preset condition, the current message segment is cached.
基于上述方案,所述根据所述确定结果,确定是否缓存所述当前乱序报文段,还包括:Based on the above solution, determining whether to cache the current out-of-order message segment based on the determination result also includes:
若所述当前乱序报文段与所述已缓存报文段满足所述预设条件,根据所述当前乱序报文段确定对第一报文段执行的操作,其中,所述第一报文段为N个所述已缓存报文段中的任意一个。If the current out-of-order message segment and the cached message segment meet the preset condition, the operation to be performed on the first message segment is determined based on the current out-of-order message segment, wherein the first The message segment is any one of the N cached message segments.
基于上述方案,所述若所述当前乱序报文段与所述已缓存报文段满足所述预设条件,根据所述当前乱序报文段确定对第一报文段执行的操作,包括以下至少之一:Based on the above solution, if the current out-of-order message segment and the cached message segment meet the preset condition, determine the operation to be performed on the first message segment based on the current out-of-order message segment, Include at least one of the following:
若所述当前乱序报文段的报文内容全部包含在第一报文段内,确定维持所述第一报文段;If the message contents of the current out-of-order message segment are all included in the first message segment, determine to maintain the first message segment;
若所述当前乱序报文段的部分内容包含在所述第一报文段内或者所述当前乱序报文段与所述第一报文段内容连续,根据所述当前乱序报文段,更新所述第一报文段得到第一更新报文段,并缓存所述第一更新报文段;其中,所述第一更新报文段包含:所述当前乱序报文段内当前不包含在所述第一报文段内的内容。If part of the content of the current out-of-order message segment is included in the first message segment or the current out-of-order message segment is continuous with the content of the first message segment, according to the current out-of-order message segment segment, update the first message segment to obtain a first update message segment, and cache the first update message segment; wherein the first update message segment includes: within the current out-of-order message segment Content currently not included in the first message segment.
基于上述方案,所述方法还包括:Based on the above solution, the method also includes:
若所述第一更新报文段的至少部分内容位于接收窗口外,丢弃所述当前乱序报文段。If at least part of the content of the first update message segment is located outside the receiving window, the current out-of-order message segment is discarded.
基于上述方案,所述缓存所述第一更新报文段,包括:Based on the above solution, the cache of the first update message segment includes:
若所述第一更新报文段位于所述接收窗口内,缓存所述第一更新报文段。If the first update message segment is located within the receiving window, cache the first update message segment.
基于上述方案,所述方法还包括:Based on the above solution, the method also includes:
若所述第一更新报文段与第二报文段之间满足所述预设条件,合并所述第一更新报文段和所述第二报文段,得到第二更新报文段;其中,所述第二报文段为N个所述已缓存报文段中所述第一报文段以外的已缓存报文段;If the preset condition is met between the first update message segment and the second message segment, merge the first update message segment and the second message segment to obtain a second update message segment; Wherein, the second message segment is a cached message segment other than the first message segment among the N cached message segments;
缓存所述第二更新报文段。Cache the second update message segment.
基于上述方案,所述缓存所述第二更新报文段,包括:Based on the above solution, the cache of the second update message segment includes:
若所述第二更新报文段位于所述接收窗口内,缓存所述第二更新报文段。If the second update message segment is located within the receiving window, cache the second update message segment.
基于上述方案,所述方法还包括:Based on the above solution, the method also includes:
当所述第二更新报文段至少部分位于所述接收窗口外,丢弃所述当前乱序报文段。When at least part of the second update message segment is located outside the receiving window, the current out-of-order message segment is discarded.
基于上述方案,所述方法还包括:Based on the above solution, the method also includes:
若所述当前报文段为所述第s顺序报文段;If the current message segment is the s-th sequence message segment;
将所述第s顺序报文段提交给应用层。Submit the s-th sequence message segment to the application layer.
基于上述方案,所述方法还包括:Based on the above solution, the method also includes:
当所述当前报文段为所述第s顺序报文段时,确定所述已缓存报文段与所述第s顺序报文段之间是否满足所述预设条件;When the current message segment is the s-th sequential message segment, determine whether the preset condition is satisfied between the cached message segment and the s-th sequential message segment;
将与所述第s顺序报文段之间满足所述预设条件的所述已缓存报文段提交给应用层;Submit the cached message segments that satisfy the preset condition between the s-th sequential message segment and the s-th sequence message segment to the application layer;
删除已提交到所述应用层的所述已缓存报文段。Delete the cached message segment that has been submitted to the application layer.
基于上述方案,所述方法还包括:Based on the above solution, the method also includes:
当有报文段提交到所述应用层时,根据已提交到所述应用层的报文段,更新待接收的第s顺序报文段的信息且接收窗口。When a message segment is submitted to the application layer, the information of the s-th sequence message segment to be received and the receiving window are updated according to the message segment submitted to the application layer.
基于上述方案,所述方法还包括:Based on the above solution, the method also includes:
N个所述已缓存报文段中的至少一个有更新,根据更新后的所述已缓存报文段,更新已缓存报文段的边界的信息,其中,所述边界的信息包括:指示对应所述已缓存报文段左边界的信息和指示对应所述已缓存报文段右边界的信息。At least one of the N cached message segments is updated. According to the updated cached message segment, the boundary information of the cached message segment is updated, wherein the boundary information includes: indicating the corresponding The information and indication on the left boundary of the cached message segment correspond to the information on the right boundary of the cached message segment.
本申请实施例第二方面提供一种基于传输控制协议TCP的报文接收装置,所述装置包括:The second aspect of the embodiment of the present application provides a message receiving device based on Transmission Control Protocol TCP. The device includes:
第一确定模块,用于若所述当前报文段不是待接收的第s顺序报文段,确定所述当前报文段是当前乱序报文段;A first determination module, configured to determine that the current message segment is the current out-of-order message segment if the current message segment is not the s-th sequential message segment to be received;
第二确定模块,用于若存在N个已缓存报文段,确定所述当前乱序报文段与所述已缓存报文段之间是否满足预设条件,得到确定结果;其中,所述已缓存报文段为:历史乱序报文段;所述当前乱序报文段与所述已缓存报文段之间满足所述预设条件包括:所述当前乱序报文段与所述已缓存报文段内容连续或者存在重叠内容;所述N为小于或等于预先设置的允许缓存报文段的最大段数M;The second determination module is used to determine whether the current out-of-order message segment and the cached message segment satisfy the preset conditions if there are N cached message segments, and obtain a determination result; wherein, the The cached message segment is: a historical out-of-order message segment; the preset condition between the current out-of-order message segment and the cached message segment includes: the current out-of-order message segment and all The content of the cached message segments is continuous or there is overlapping content; the N is less than or equal to the preset maximum number of segments M that is allowed to be cached;
缓存模块,用于根据所述确定结果,确定是否缓存所述当前乱序报文段。A cache module, configured to determine whether to cache the current out-of-order message segment according to the determination result.
本公开实施例第三方面提供一种电子设备,包括:A third aspect of the embodiment of the present disclosure provides an electronic device, including:
存储器;memory;
处理器,与所述存储器连接,用于通过执行存储在所述存储器上的计算机可执行指令,能够实现前述任意技术方案提供的基于TCP的报文接收方法。A processor, connected to the memory, is configured to implement the TCP-based message receiving method provided by any of the foregoing technical solutions by executing computer-executable instructions stored on the memory.
本公开实施例第四方面提供一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机可执行指令;所述计算机可执行指令被处理器执行后,实现前述任意技术方案提供的基于TCP的报文接收方法。The fourth aspect of the embodiment of the present disclosure provides a computer storage medium, which is characterized in that the computer storage medium stores computer executable instructions; after the computer executable instructions are executed by the processor, the method provided by any of the foregoing technical solutions is implemented. TCP message receiving method.
本公开实施例提供的技术方案,首先允许缓存乱序报文,但是乱序报文的缓存数量为N个,则一方面相对于是乱序报文就直接丢弃后续再请求,可以减少重复请求和重复传输,另一方面,限定了乱序报文的个数,可以很大程度上减少乱序报文占用的存储开销,从而实现了重复传输和存储开销之间的平衡。The technical solution provided by the embodiment of the present disclosure first allows out-of-order messages to be cached, but the number of cached out-of-order messages is N. On the one hand, compared to out-of-order messages, subsequent requests are directly discarded, which can reduce repeated requests and Repeated transmission, on the other hand, limits the number of out-of-order messages, which can greatly reduce the storage overhead occupied by out-of-order messages, thereby achieving a balance between repeated transmission and storage overhead.
附图说明Description of drawings
图1为本申请实施例提供的一种基于TCP的报文接收方法的流程示意图;Figure 1 is a schematic flow chart of a TCP-based message receiving method provided by an embodiment of the present application;
图2为本申请实施例提供的一种基于TCP的报文接收方法的流程示意图;Figure 2 is a schematic flow chart of a TCP-based message receiving method provided by an embodiment of the present application;
图3为本申请实施例提供的报文接收的示意图;Figure 3 is a schematic diagram of message reception provided by the embodiment of the present application;
图4为本申请实施例提供的基于TCP的报文接收装置的结构示意图;Figure 4 is a schematic structural diagram of a TCP-based message receiving device provided by an embodiment of the present application;
图5为本公开实施例提供的一种寄存器存储的字段对应的示意图;Figure 5 is a schematic diagram corresponding to fields stored in a register provided by an embodiment of the present disclosure;
图6为本申请实施例提供的一种基于TCP的报文接收方法的流程示意图;Figure 6 is a schematic flow chart of a TCP-based message receiving method provided by an embodiment of the present application;
图7为本申请实施例提供的一种基于TCP的报文接收方法的流程示意图;Figure 7 is a schematic flow chart of a TCP-based message receiving method provided by an embodiment of the present application;
图8本申请实施例提供的一种基于TCP的报文接收方法的流程示意图。。Figure 8 is a schematic flowchart of a TCP-based message receiving method provided by an embodiment of the present application. .
具体实施方式Detailed ways
为了能够更加详尽地了解本申请的特点与技术内容,下面结合附图对本申请的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请。In order to understand the characteristics and technical content of the present application in more detail, the implementation of the present application will be described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the present application.
如图1所示,本公开实施例提供一种基于TCP的报文接收方法,包括:As shown in Figure 1, an embodiment of the present disclosure provides a TCP-based message receiving method, including:
S110:若所述当前报文段不是待接收的第s顺序报文段,确定所述当前报文段是当前乱序报文段;S110: If the current message segment is not the s-th sequential message segment to be received, determine that the current message segment is the current out-of-order message segment;
S120:若存在N个已缓存报文段,确定所述当前乱序报文段与所述已缓存报文段之间是否满足预设条件,得到确定结果;其中,所述已缓存报文段为:历史乱序报文段;所述当前乱序报文段与所述已缓存报文段之间满足所述预设条件包括:所述当前乱序报文段与所述已缓存报文段内容连续或者存在重叠内容;所述N为小于或等于预先设置的允许缓存报文段的最大段数M;S120: If there are N cached message segments, determine whether the current out-of-order message segment and the cached message segment meet the preset conditions, and obtain a determination result; wherein, the cached message segment is: a historical out-of-order message segment; the preset condition satisfied between the current out-of-order message segment and the cached message segment includes: the current out-of-order message segment and the cached message segment The segment content is continuous or there is overlapping content; the N is less than or equal to the preset maximum number M of segments allowed to be cached;
S130:根据所述确定结果,确定是否缓存所述当前乱序报文段。S130: According to the determination result, determine whether to cache the current out-of-order message segment.
本公开实施例提供的基于TCP的报文接收方法,应用于报文接收端。该接收端可为任意网络设备。该网络设备可为:终端和/或服务器。所述终端包括但不限于:固定终端和/或移动终端。所述固定终端包括:台式电脑、智能电视或者广告播放设备等。所述移动终端包括但不限于:手机、平板、可穿戴式设备、智能家居设备、智能办公设备、和/或各种智能机器人。所述智能机器人包括但不限于:包括移动底盘的地面机器人和/或低空飞行的飞行机器人。The TCP-based message receiving method provided by the embodiment of the present disclosure is applied to the message receiving end. The receiving end can be any network device. The network device can be: a terminal and/or a server. The terminals include but are not limited to: fixed terminals and/or mobile terminals. The fixed terminal includes: desktop computer, smart TV or advertising playback equipment, etc. The mobile terminals include but are not limited to: mobile phones, tablets, wearable devices, smart home devices, smart office devices, and/or various smart robots. The intelligent robot includes but is not limited to: a ground robot including a mobile chassis and/or a low-flying aerial robot.
该接收端可包括:现场可编程逻辑门阵列(Field Programmable Gate Array,FPGA)芯片,FPGA芯片用于将IP层接收的报文段提交到TCP层,TCP层再将报文段提交到应用层,实现应用层之前的报文收发。The receiving end may include: a Field Programmable Gate Array (FPGA) chip. The FPGA chip is used to submit the message segments received by the IP layer to the TCP layer. The TCP layer then submits the message segments to the application layer. , to realize the sending and receiving of messages before the application layer.
若当前接收的报文段为首个报文段,若报文段的编号是从0开始计数则第s顺序报文段为报文段0;若报文段的编号是从1开始计数则第s顺序报文段为报文段1。若当前接收的报文段并非首个报文段,则当前接收的报文段为已提交到应用层的报文段m+1;m为任意自然数。If the currently received message segment is the first message segment, if the number of the message segment starts counting from 0, then the sth sequential message segment is message segment 0; if the number of the message segment starts counting from 1, then the sth sequence message segment starts from 1. The s sequence segment is segment 1. If the currently received message segment is not the first message segment, the currently received message segment is the message segment m+1 that has been submitted to the application layer; m is any natural number.
若当前接收的报文段的序号与第s顺序报文段的序号不匹配,则说明当前报文段为乱序报文段,且因为是当前时刻接收的,则该当前报文段为当前乱序报文段。If the sequence number of the currently received message segment does not match the sequence number of the s-th sequence message segment, it means that the current message segment is an out-of-order message segment, and because it is received at the current time, the current message segment is the current message segment. Out-of-order message segments.
若当前已经缓存了N个乱序报文段,则需要根据当前报文段与已缓存报文段之间是否连续或者是否有内容重复,来确定是否缓存当前乱序报文段。If N out-of-order message segments have been cached, it is necessary to determine whether to cache the current out-of-order message segment based on whether the current message segment and the cached message segment are continuous or have duplicate content.
若所述N的取值小于或等于M;M可为任意正整数。例如,M的取值可为2或3或4等取值,此时N的取值可为0、1或2等任意小于M的自然数。若N为0,则说明当前没有已缓存报文段。If the value of N is less than or equal to M; M can be any positive integer. For example, the value of M can be 2, 3, or 4. In this case, the value of N can be 0, 1, 2, or any other natural number smaller than M. If N is 0, it means that there are currently no cached segments.
在一个实施例中,若当前已经缓存了最大段数的历史乱序报文,且当前报文段也是乱序报文段,则通过当前乱序报文段与已缓存报文段之间是否有内容连续或者内容重叠确定是否需要缓存当前报文段,从而减少因为缓存乱序报文段的个数不受限,导致的存储开销大,且相对于不缓存乱序报文段,则可以减少重复传输。In one embodiment, if the maximum number of historical out-of-order packets has been cached, and the current packet segment is also an out-of-order packet segment, the method determines whether there is a gap between the current out-of-order packet segment and the cached packet segment. Continuous content or overlapping content determines whether the current message segment needs to be cached, thereby reducing the storage overhead caused by the unlimited number of cached out-of-order message segments, and compared with not caching out-of-order message segments, it can be reduced Repeat the transfer.
在一些实施例中,所述S130可包括:In some embodiments, the S130 may include:
S131:当所述确定结果表明所述当前乱序报文段与所述已缓存报文段不满足所述预设条件且所述N等于所述M时,丢弃所述当前乱序报文段。S131: When the determination result indicates that the current out-of-order message segment and the cached message segment do not meet the preset condition and the N is equal to the M, discard the current out-of-order message segment. .
若当前乱序报文段与已缓存报文段既不是连续报文段,也不是没有内容重叠,则说明若缓存该当前乱序报文段,会使得缓存的乱序报文段超过做大段数N,因此就会丢弃该当前乱序报文段,从而减少存储开销过大的问题。If the current out-of-order message segment and the cached message segment are neither continuous segments nor overlapping content, it means that if the current out-of-order message segment is cached, the cached out-of-order message segment will exceed the size The number of segments is N, so the current out-of-order message segment will be discarded, thereby reducing the problem of excessive storage overhead.
当前乱序报文段与已缓存报文段是连续报文段,则满足以下情况之一:If the current out-of-order message segment and the cached message segment are consecutive message segments, one of the following conditions is met:
已缓存报文段的最后一个字节与当前乱序报文段的第1个字节相邻字节;The last byte of the cached message segment is adjacent to the first byte of the current out-of-order message segment;
已缓存报文段的第1个字节与当前乱序报文段的最后一个字节是相邻字节。The first byte of the cached message segment and the last byte of the current out-of-order message segment are adjacent bytes.
当前乱序报文段与已缓存报文段具有内容重叠包括:The current out-of-order message segment and the cached message segment have overlapping contents, including:
当前乱序报文段包含的至少一个字节在已缓存报文段内。At least one byte contained in the current out-of-order segment is within a cached segment.
根据TCP协议的拆包,一个报文段内的多个字节都是连续分布的。According to the unpacking of the TCP protocol, multiple bytes within a message segment are continuously distributed.
在另一些实施例中,所述方法还包括:In other embodiments, the method further includes:
当所述确定结果表明所述当前乱序报文段与所述已缓存报文段不满足所述预设条件,则在当前乱序报文段和已缓存报文段中丢弃与所述第s顺序报文段之间间隔距离最近的报文段。When the determination result indicates that the current out-of-order message segment and the cached message segment do not meet the preset condition, then the current out-of-order message segment and the cached message segment are discarded. S-sequential message segments are the segments with the closest distance between them.
若接收到一个乱序报文段,基于TCP会再次发送一个请求第s顺序报文段的请求,有鉴于此,基于接收端的顺序请求,则当前第s顺序报文段距离越近的报文段会更早被请求,从而减少一个已缓存报文段的平均缓存时长,从而通过减少单个已缓存报文段的平均缓存时长来减少占用的缓存容量,达到再次减少缓存开销的目的。If an out-of-order message segment is received, a request for the s-th sequence message segment will be sent again based on TCP. In view of this, based on the sequence request of the receiving end, the closer the current s-th sequence message segment is Segments will be requested earlier, thereby reducing the average cache duration of a cached message segment, thereby reducing the cache capacity occupied by reducing the average cache duration of a single cached message segment, thereby reducing cache overhead again.
在另一些实施例中,所述S130还可包括:In other embodiments, S130 may also include:
S132:当所述N小于所述M且所述当前报文段与所述已缓存报文段不满足所述预设条件,缓存所述当前报文段。S132: When the N is less than the M and the current message segment and the cached message segment do not meet the preset condition, cache the current message segment.
若N小于M,说明当前已缓存报文段还没有达到最大段数,此时若当前接收的报文段为乱序报文段,也可以继续缓存当前乱序报文段。If N is less than M, it means that the currently cached message segments have not reached the maximum number of segments. At this time, if the currently received message segment is an out-of-order message segment, the current out-of-order message segment can continue to be cached.
在另一些实施例中,所述S130还包括:In other embodiments, the S130 further includes:
S133A:若所述当前乱序报文段与所述已缓存报文段满足所述预设条件,根据所述当前乱序报文段和第一报文段,得到第一更新报文段,中,所述第一报文段为N个所述已缓存报文段中的任意一个;S133A: If the current out-of-order message segment and the cached message segment meet the preset condition, obtain the first updated message segment based on the current out-of-order message segment and the first message segment, , the first message segment is any one of the N cached message segments;
S133B:缓存所述第一更新报文段。S133B: Cache the first update message segment.
此时,不管N是小于或者等于M,都可以根据当前乱序报文段与各以缓存报文段之间满足预设条件,都会通过报文段合并来减少缓存的报文段的段数,同时减少重复内容的缓存。At this time, regardless of whether N is less than or equal to M, the number of cached message segments will be reduced by merging message segments based on the preset conditions between the current out-of-order message segment and each cached message segment. Also reduce caching of duplicate content.
在一个实施例中,所述S130还包括:In one embodiment, the S130 further includes:
若所述当前乱序报文段与所述已缓存报文段满足所述预设条件,根据所述当前乱序报文段确定对第一报文段执行的操作,其中,所述第一报文段为N个所述已缓存报文段中的任意一个。If the current out-of-order message segment and the cached message segment meet the preset condition, the operation to be performed on the first message segment is determined based on the current out-of-order message segment, wherein the first The message segment is any one of the N cached message segments.
当前乱序报文段可能是因为在传输过程中,因为转发或者掉包等情况,出现的重传报文段或者携带了字节有出现丢失或重复等显现。The current out-of-order message segment may be caused by the retransmission of the message segment or the loss or duplication of bytes carried due to forwarding or packet loss during the transmission process.
在这种情况下,当前乱序报文段与已缓存的第一报文段之间满足预设条件又可以分为以下几种情况哈:In this case, the preset conditions between the current out-of-order message segment and the cached first message segment can be divided into the following situations:
当前乱序报文段与第一报文段之间内容连续且没有重复;The content between the current out-of-order message segment and the first message segment is continuous and has no duplication;
当前乱序报文段的所有内容都包含在第一报文段内;All contents of the current out-of-order message segment are included in the first message segment;
当前乱序报文段的部分内容包含在第一报文段内,还包含了部分新的内容。Part of the content of the current out-of-order message segment is included in the first message segment, and some new content is also included.
在一些实施例中,所述S130可包括以下至少之一:In some embodiments, the S130 may include at least one of the following:
若所述当前乱序报文段与所述已缓存报文段满足所述预设条件,根据所述当前乱序报文段和第一报文段,得到第一更新报文段,其中,所述第一报文段为N个所述已缓存报文段中的任意一个;If the current out-of-order message segment and the cached message segment meet the preset condition, a first updated message segment is obtained according to the current out-of-order message segment and the first message segment, where, The first message segment is any one of the N cached message segments;
缓存所述第一更新报文。Cache the first update message.
即针对不同的情况,对第一报文段的操作是不同,以下结合上述分情况分别进行分析:That is to say, the operation on the first message segment is different for different situations. The following is an analysis based on the above situations:
情况1:当前乱序报文段的所有内容都包含在第一报文段内,则不对第一报文段进行更新处理,维持第一报文段的当前缓存状况;即当前的第一报文段即为前述的第一更新报文段;Case 1: All contents of the current out-of-order message segment are included in the first message segment, then the first message segment will not be updated and the current cache status of the first message segment will be maintained; that is, the current first message segment The text segment is the aforementioned first update message segment;
情况2:当前乱序报文段的部分内容包含在第一报文段内,将当前报文段中不包含在第一报文段的内容添加到第一报文段中,得到内容添加后的第一更新报文段;Case 2: Part of the content of the current out-of-order message segment is included in the first message segment. Add the content of the current message segment that is not included in the first message segment to the first message segment. After the content is added, The first update message segment;
情况3:当前乱序报文段的全部内容都不包含在第一报文段内,则将当前报文段与第一报文段直接合并,得到合并后的第一更新报文段。Case 3: All the contents of the current out-of-order message segment are not included in the first message segment, then the current message segment and the first message segment are directly merged to obtain the merged first updated message segment.
后续第一更新报文段将作为下一个时刻的已缓存报文段。The subsequent first updated message segment will be used as the cached message segment at the next moment.
根据上述列举的不同情况,所述根据所述当前乱序报文段和第一报文段,得到第一更新报文段,包括以下至少之一:According to the different situations listed above, the first updated message segment is obtained based on the current out-of-order message segment and the first message segment, including at least one of the following:
若所述当前乱序报文段的报文内容全部包含在第一报文段内,确定所述第一报文段为所述第一更新报文段;If the message contents of the current out-of-order message segment are all included in the first message segment, determine that the first message segment is the first update message segment;
若所述当前乱序报文段的部分内容包含在所述第一报文段内,将所述当前乱序报文段不包含在所述第一报文段的内容添加到所述第一报文段,得到所述第一更新报文段;If part of the content of the current out-of-order message segment is included in the first message segment, add the content of the current out-of-order message segment that is not included in the first message segment to the first message segment. message segment to obtain the first update message segment;
若所述当前乱序报文段与所述第一报文段内容连续,合并所述第一报文段和所述当前乱序报文段得到第一更新报文段。If the contents of the current out-of-order message segment and the first message segment are continuous, merge the first message segment and the current out-of-order message segment to obtain a first updated message segment.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
配置有接收窗口,该接收窗口限制了最大缓存字节数P。A receive window is configured, which limits the maximum number of buffered bytes P.
图3所示的接收窗口的窗口长度为8个字节,即P=8。该接收窗口的首个字节为第k个字节。The window length of the receiving window shown in Figure 3 is 8 bytes, that is, P=8. The first byte of the receive window is the k-th byte.
具体的接收窗口的起始最接为:待接收的第s顺序报文段的首个字节;The starting point of the specific receiving window is: the first byte of the s-th sequence message segment to be received;
接收窗口的终止字节为:P个字节。P为窗口包含的最大缓存字节数。P可为任意正整数。The termination byte of the receiving window is: P bytes. P is the maximum number of cache bytes contained in the window. P can be any positive integer.
接收窗口的终止字节减去接收窗口的首个字节等于P,P可大于一个报文段所包含的最大字节数。The end byte of the receive window minus the first byte of the receive window equals P, and P can be greater than the maximum number of bytes contained in a message segment.
在本公开实施例中,为了抑制单个已缓存报文段包含的字节数过多导致的存户开销大,引入了接收窗口,通过接收窗口进一步确定如何缓存报文段。In the embodiment of the present disclosure, in order to suppress the depositor overhead caused by too many bytes contained in a single cached message segment, a receiving window is introduced, and how to cache the message segment is further determined through the receiving window.
示例性地,所述缓存所述第一更新报文段,包括:Exemplarily, the caching of the first update message segment includes:
若所述第一更新报文段位于所述接收窗口内,缓存所述第一更新报文段。If the first update message segment is located within the receiving window, cache the first update message segment.
所述第一更新报文段位于所述接收窗口内,即所述第一更新报文段的最后一个字节的编号小于或等于当前所述接收窗口的终止字节。The first update message segment is located within the receiving window, that is, the number of the last byte of the first update message segment is less than or equal to the end byte of the current receiving window.
若第一更新报文段位于接收窗口内,才缓存第一更新报文段,否则不缓存第一更新报文段。If the first update message segment is within the receiving window, the first update message segment is cached; otherwise, the first update message segment is not cached.
不缓存第一更新报文段之后,所述方法还包括:After not caching the first update message segment, the method further includes:
丢弃当前乱序报文段;Discard the current out-of-order segment;
或者,or,
丢弃当前乱报文段与当前的第s顺序报文段之间距离最小的一个或多个报文段后再缓存第一更新报文段。此处的距离可以用间隔的字节数来体现。The first updated message segment is cached after discarding one or more message segments with the smallest distance between the current random message segment and the current s-th sequential message segment. The distance here can be reflected in the number of bytes of the interval.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
若所述第一更新报文段与第二报文段之间满足所述预设条件,根据所述第一更新报文段和所述第二报文段,得到第二更新报文段;其中,所述第二报文段为N个所述已缓存报文段中所述第一报文段以外的已缓存报文段;If the preset condition is met between the first update message segment and the second message segment, a second update message segment is obtained based on the first update message segment and the second message segment; Wherein, the second message segment is a cached message segment other than the first message segment among the N cached message segments;
缓存所述第二更新报文段。Cache the second update message segment.
若产生的一个更新报文段与第二报文段之间内容连续或者具有内容重复,将合并第一更新报文段和第二报文段,得到第二更新报文段。If the content between the generated update message segment and the second message segment is continuous or has duplicate content, the first update message segment and the second message segment will be merged to obtain the second update message segment.
第一报文段可以为与当前乱序报文段之间满足预设条件的一个报文段;若当前报文段同时与两个已缓存报文段之间满足预设条件,则当前报文段与其中一个已缓存报文段合并之后得到第一更新报文段之后,则第一更新报文段会与另一个已缓存报文段(即第二报文段)之间满预设关系。The first message segment can be a message segment that meets the preset conditions with the current out-of-order message segment; if the current message segment meets the preset conditions with two cached message segments at the same time, the current message segment After the segment is merged with one of the cached segments to obtain the first update segment, the first update segment will be fully preset with another cached segment (i.e., the second segment). relation.
在一些实施例中,所述若所述第一更新报文段与第二报文段之间满足所述预设条件,根据所述第一更新报文段确定对所述第二报文段的操作,包括以下之一:In some embodiments, if the preset condition is met between the first update message segment and the second message segment, the second message segment is determined based on the first update message segment. operations, including one of the following:
若所述第二报文段的全部内容包含在所述第一更新报文段中,删除所述第二报文段;If the entire content of the second message segment is included in the first update message segment, delete the second message segment;
若所述第二报文段的部分内容包含在所述第一更新报文段中,将所述第二报文段不包含在所述第一更新报文段中的内容添加到所述第一更新报文段,得到所述第二更新报文段;If part of the content of the second message segment is included in the first update message segment, add the content of the second message segment that is not included in the first update message segment to the third update message segment. An update message segment is obtained to obtain the second update message segment;
若所述第二报文段与所述第一更新报文段的内容连续,合并所述第一更新报文段和所述第二报文段,得到所述第二更新报文段。If the contents of the second message segment and the first update message segment are continuous, merge the first update message segment and the second message segment to obtain the second update message segment.
此处的第二报文段为:除所述第一报文段以外,多个与当前报文段之间具有预设关系之间已缓存报文段中的任意一个。The second message segment here is: in addition to the first message segment, any one of a plurality of cached message segments that have a preset relationship with the current message segment.
在一个实施例中,所述缓存所述第二更新报文段,包括:In one embodiment, caching the second update message segment includes:
若所述第二更新报文段位于所述接收窗口内,缓存所述第二更新报文段。If the second update message segment is located within the receiving window, cache the second update message segment.
在另一个实施例中,所述方法还包括:In another embodiment, the method further includes:
当所述第二更新报文段至少部分位于所述接收窗口外,丢弃所述当前乱序报文段。When at least part of the second update message segment is located outside the receiving window, the current out-of-order message segment is discarded.
通过接收窗口的设置,相当于设置了M个报文段包含的最大字节,从而控制最大的缓存量。By setting the receive window, it is equivalent to setting the maximum bytes contained in M message segments, thereby controlling the maximum buffer amount.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
若所述当前报文段为所述第s顺序报文段;If the current message segment is the s-th sequence message segment;
将所述第s顺序报文段提交给应用层。Submit the s-th sequence message segment to the application layer.
TCP层在确定出接收的当前报文段为第s顺序报文段时,就直接将第s顺序报文段上报给应用层,即不缓存当前接收到的顺序报文段,直接提交到应用层,从而减少了当前报文段占用的缓存。When the TCP layer determines that the current message segment received is the s-th sequence message segment, it directly reports the s-th sequence message segment to the application layer, that is, it does not cache the currently received sequence message segment and directly submits it to the application layer. layer, thereby reducing the cache occupied by the current message segment.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
在所述第s顺序报文段提交到所述应用层之后,更新所述第s顺序报文段的序号,确定第s+1顺序报文段;After the s-th sequence message segment is submitted to the application layer, update the sequence number of the s-th sequence message segment and determine the s+1-th sequence message segment;
确定所述已缓存报文段中是否存在所述第s+1顺序报文段;Determine whether the s+1th sequential message segment exists in the cached message segment;
当所述已缓存报文段中存在所述第s+1顺序报文段,将所述已缓存报文段中的所述第s+1正序提交到应用层;When the s+1th sequential message segment exists in the cached message segment, submit the s+1th positive sequence in the cached message segment to the application layer;
删除提交到所述应用层的所述已缓存报文段。Delete the cached message segment submitted to the application layer.
示例性地,第s顺序报文段提交到应用层之后,将会确定第s+1顺序报文段。第s+1顺序报文段的首个字节是第s顺序报文段的最后一个字节的下一个字节。For example, after the s-th sequence message segment is submitted to the application layer, the s+1-th sequence message segment will be determined. The first byte of the s+1th sequential message segment is the next byte of the last byte of the sth sequential message segment.
若已缓存报文段中存在包含所述第s+1顺序报文段中的首个字节的已缓存报文段,则该已缓存报文段即为所述第s+1个顺序报文段。If there is a cached message segment containing the first byte of the s+1th sequential message segment in the cached message segment, then the cached message segment is the s+1th sequential message segment. paragraph.
将已缓存报文段的第s+1个顺序报文段提交到应用层,并从缓存区域中删除已提交到应用层的已缓存报文段,一方面减少向应用层的重复提交,另一方面可以将已缓存报文段提交到应用层,不用重复传输。Submit the s+1 sequential message segment of the cached message segment to the application layer, and delete the cached message segment that has been submitted to the application layer from the cache area. On the one hand, it reduces repeated submissions to the application layer, and on the other hand, it reduces repeated submissions to the application layer. On the one hand, cached message segments can be submitted to the application layer without repeated transmission.
在一些实施例中,应用层在接收到第s顺序报文段之后,会向发送端传输请求第s+1顺序报文段的请求,若当前已缓存报文段中包含了第s+1顺序报文段,则可以拦截该请求,减少该请求触发发送端对第s+1顺序报文段的重复传输。In some embodiments, after receiving the s-th sequence message segment, the application layer will transmit a request for the s+1-th sequence message segment to the sending end. If the currently cached message segment contains the s+1-th sequence message segment, Sequential message segment, the request can be intercepted to reduce the request triggering the sender to repeatedly transmit the s+1 sequential message segment.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
当有报文段提交到所述应用层时,根据已提交到所述应用层的报文段,更新待接收的顺序报文段的序号;When a message segment is submitted to the application layer, update the sequence number of the sequence message segment to be received based on the message segment that has been submitted to the application layer;
和/或,and / or,
更新接收窗口,其中,N个所述已缓存报文段位于所述接收窗口内。Update the receiving window, wherein the N cached message segments are located in the receiving window.
此处更新后的顺序报文段的序号为已提交到应用层的报文段的最后一个字节的下一个字节。此处的接收窗口的首个字节为更新后的顺序报文段的首个字节+P个字节。The sequence number of the updated sequential message segment here is the next byte of the last byte of the message segment that has been submitted to the application layer. The first byte of the receive window here is the first byte of the updated sequence message segment + P bytes.
在一个实施例中,所述方法还包括:In one embodiment, the method further includes:
N个所述已缓存报文段中的至少一个有更新,根据更新后的所述已缓存报文段,更新对应所述已缓存报文段的边界的信息,其中,所述边界的信息包括:指示对应所述已缓存报文段左边界的信息和指示对应所述已缓存报文段右边界的信息。At least one of the N cached message segments is updated. According to the updated cached message segment, the information corresponding to the boundary of the cached message segment is updated, wherein the boundary information includes : Indicates information corresponding to the left boundary of the cached message segment and information indicating corresponding to the right boundary of the cached message segment.
如图4所示,本公开实施例提供一种基于TCP的报文接收装置,所述装置包括:As shown in Figure 4, an embodiment of the present disclosure provides a TCP-based message receiving device. The device includes:
第一确定模块110,用于若所述当前报文段不是待接收的第s顺序报文段,确定所述当前报文段是当前乱序报文段;其中,所述s为正整数;The first determination module 110 is configured to determine that the current message segment is the current out-of-order message segment if the current message segment is not the s-th sequential message segment to be received; wherein, the s is a positive integer;
第二确定模块120,用于若存在N个已缓存报文段,确定所述当前乱序报文段与所述已缓存报文段之间是否满足预设条件,得到确定结果;其中,所述已缓存报文段为:历史乱序报文段;所述当前乱序报文段与所述已缓存报文段之间满足所述预设条件包括:所述当前乱序报文段与所述已缓存报文段内容连续或者存在重叠内容;The second determination module 120 is used to determine whether the preset conditions are met between the current out-of-order message segment and the cached message segment if there are N cached message segments, and obtain a determination result; wherein, The cached message segment is: a historical out-of-order message segment; the preset condition between the current out-of-order message segment and the cached message segment includes: the current out-of-order message segment and The contents of the cached message segments are continuous or have overlapping contents;
缓存模块130,用于根据所述确定结果,确定是否缓存所述当前乱序报文段。The cache module 130 is configured to determine whether to cache the current out-of-order message segment according to the determination result.
在一些实施例中,所述第一确定模块110、第二确定模块120及缓存模块130可为程序模块;所述程序模块被处理器执行之后,能够实现上述功能。在一些实施例中,所述第一确定模块110、第二确定模块120及缓存模块130可为软硬结合模块;所述软硬结合模块板包括但不限于可编程阵列;所述可编程阵列包括但不限于:现场可编程阵列和/或复杂可编程阵列。In some embodiments, the first determination module 110, the second determination module 120 and the cache module 130 may be program modules; after the program modules are executed by the processor, the above functions can be implemented. In some embodiments, the first determination module 110, the second determination module 120 and the cache module 130 may be soft and hard combined modules; the soft and hard combined module board includes but is not limited to a programmable array; the programmable array Including but not limited to: field programmable arrays and/or complex programmable arrays.
在一些实施例中,所述第一确定模块110、第二确定模块120及缓存模块130可为纯硬件模块;所述纯硬件模块包括但不限于专用集成电路。In some embodiments, the first determination module 110, the second determination module 120 and the cache module 130 may be pure hardware modules; the pure hardware modules include but are not limited to application specific integrated circuits.
在一些实施例中,所述缓存模块130,具体用于当所述确定结果表明所述当前乱序报文段与所述已缓存报文段不满足所述预设条件且所述N等于所述M时,丢弃所述当前乱序报文段;或者,当所述N小于所述M且所述当前报文段与所述已缓存报文段不满足所述预设条件,缓存所述当前报文段。In some embodiments, the caching module 130 is specifically used when the determination result indicates that the current out-of-order message segment and the cached message segment do not meet the preset condition and the N is equal to the When M is stated, discard the current out-of-order message segment; or, when N is less than M and the current message segment and the cached message segment do not meet the preset conditions, cache the The current message segment.
在一些实施例中,所述缓存模块130,具体用若所述当前乱序报文段与所述已缓存报文段满足所述预设条件,根据所述当前乱序报文段和第一报文段,得到第一更新报文段,中,所述第一报文段为N个所述已缓存报文段中的任意一个;缓存所述第一更新报文段。In some embodiments, the caching module 130 is specifically used to cache the current out-of-order message segment and the first cached message segment according to the current out-of-order message segment and the first cached message segment if the current out-of-order message segment and the cached message segment satisfy the preset condition. message segment to obtain a first update message segment, where the first message segment is any one of the N cached message segments; and the first update message segment is cached.
在一些实施例中,所述缓存模块130,具体用于执行以下至少之一:若所述当前乱序报文段的报文内容全部包含在第一报文段内,确定所述第一报文段为所述第一更新报文段;In some embodiments, the cache module 130 is specifically configured to perform at least one of the following: if all the message contents of the current out-of-order message segment are included in the first message segment, determine that the first message segment The text segment is the first update message segment;
若所述当前乱序报文段的部分内容包含在所述第一报文段内,将所述当前乱序报文段不包含在所述第一报文段的内容添加到所述第一报文段,得到所述第一更新报文段;If part of the content of the current out-of-order message segment is included in the first message segment, add the content of the current out-of-order message segment that is not included in the first message segment to the first message segment. message segment to obtain the first update message segment;
若所述当前乱序报文段与所述第一报文段内容连续,合并所述第一报文段和所述当前乱序报文段得到第一更新报文段。If the contents of the current out-of-order message segment and the first message segment are continuous, merge the first message segment and the current out-of-order message segment to obtain a first updated message segment.
在一些实施例中,所述装置,还包括:In some embodiments, the device further includes:
丢弃模块,用于若所述第一更新报文段的至少部分内容位于接收窗口外,丢弃所述当前乱序报文段。A discarding module configured to discard the current out-of-order message segment if at least part of the content of the first update message segment is located outside the receiving window.
在一些实施例中,所述缓存模块130,具体用于若所述第一更新报文段位于所述接收窗口内,缓存所述第一更新报文段。In some embodiments, the cache module 130 is specifically configured to cache the first update message segment if the first update message segment is located within the receiving window.
在一些实施例中,所述装置还包括:In some embodiments, the device further includes:
得到模块,用于若所述第一更新报文段与第二报文段之间满足所述预设条件,根据所述第一更新报文段和所述第二报文段,得到第二更新报文段;其中,所述第二报文段为N个所述已缓存报文段中所述第一报文段以外的已缓存报文段;Obtaining module, configured to obtain a second update message segment according to the first update message segment and the second message segment if the preset condition is satisfied between the first update message segment and the second message segment. Update message segments; wherein the second message segment is a cached message segment other than the first message segment among the N cached message segments;
所述缓存模块130,还用于缓存所述第二更新报文段。The cache module 130 is also used to cache the second update message segment.
在一些实施例中,所述得到模块,还具体用于执行以下之一:In some embodiments, the obtaining module is specifically configured to perform one of the following:
若所述第二报文段的全部内容包含在所述第一更新报文段中,删除所述第二报文段;If the entire content of the second message segment is included in the first update message segment, delete the second message segment;
若所述第二报文段的部分内容包含在所述第一更新报文段中,将所述第二报文段不包含在所述第一更新报文段中的内容添加到所述第一更新报文段,得到所述第二更新报文段;If part of the content of the second message segment is included in the first update message segment, add the content of the second message segment that is not included in the first update message segment to the third update message segment. An update message segment is obtained to obtain the second update message segment;
若所述第二报文段与所述第一更新报文段的内容连续,合并所述第一更新报文段和所述第二报文段,得到所述第二更新报文段。If the contents of the second message segment and the first update message segment are continuous, merge the first update message segment and the second message segment to obtain the second update message segment.
在一些实施例中,所述缓存模块130,还用于若所述第二更新报文段位于所述接收窗口内,缓存所述第二更新报文段。In some embodiments, the cache module 130 is also configured to cache the second update message segment if the second update message segment is located within the receiving window.
在一些实施例中,所述装置还包括:In some embodiments, the device further includes:
丢弃模块,用于当所述第二更新报文段至少部分位于所述接收窗口外,丢弃所述当前乱序报文段。A discarding module configured to discard the current out-of-order message segment when at least part of the second update message segment is located outside the receiving window.
在一些实施例中,所述装置还包括:In some embodiments, the device further includes:
上报模块,用于若所述当前报文段为所述第s顺序报文段,将所述第s顺序报文段提交给应用层。A reporting module is configured to submit the s-th sequence message segment to the application layer if the current message segment is the s-th sequence message segment.
在一些实施例中,所述装置还包括:In some embodiments, the device further includes:
更新模块,用于在所述第s顺序报文段提交到所述应用层之后,更新所述第s顺序报文段的序号,确定第s+1顺序报文段;An update module, configured to update the sequence number of the s-th sequence message segment and determine the s+1-th sequence message segment after the s-th sequence message segment is submitted to the application layer;
存在模块,用于确定所述已缓存报文段中是否存在所述第s+1顺序报文段;An existence module is used to determine whether the s+1th sequential message segment exists in the cached message segment;
所述上报模块,还用于当所述已缓存报文段中存在所述第s+1顺序报文段,将所述已缓存报文段中的所述第s+1正序提交到应用层;The reporting module is also configured to submit the s+1th positive sequence in the cached message segment to the application when the s+1th sequential message segment exists in the cached message segment. layer;
缓存模块130,用于删除提交到所述应用层的所述已缓存报文段。The caching module 130 is configured to delete the cached message segments submitted to the application layer.
在有些实施例中,所述装置还包括:In some embodiments, the device further includes:
序号模块,用于当有报文段提交到所述应用层时,根据已提交到所述应用层的报文段,更新待接收的顺序报文段的序号;A sequence number module, used to update the sequence number of the sequence message segment to be received according to the message segment submitted to the application layer when a message segment is submitted to the application layer;
和/或,and / or,
窗口模块,用于更新接收窗口,其中,N个所述已缓存报文段位于所述接收窗口内。A window module is used to update the receiving window, wherein the N cached message segments are located in the receiving window.
在一些实施例中,所述装置还包括:In some embodiments, the device further includes:
边界的信息模块,用于N个所述已缓存报文段中的至少一个有更新,根据更新后的所述已缓存报文段,更新对应所述已缓存报文段的边界的信息,其中,所述边界的信息包括:指示对应所述已缓存报文段左边界的信息和指示对应所述已缓存报文段右边界的信息。The boundary information module is used to update at least one of the N cached message segments, and update the information corresponding to the boundary of the cached message segment according to the updated cached message segment, wherein , the boundary information includes: information indicating the left boundary corresponding to the cached message segment and information indicating the right boundary corresponding to the cached message segment.
所述边界的信息可为:已缓存报文段的首字节的序号和末字节的序号。The boundary information may be: the sequence number of the first byte and the sequence number of the last byte of the cached message segment.
若当前缓存有N个已缓存报文段,则具有N个左边界的信息和N个右边界的信息。左边界的信息指示对应已缓存报文段的首个字节;右边界的信息指示对应已缓存报文段的末个字节。If there are N cached segments in the current cache, there are N left boundary information and N right boundary information. The information indication on the left boundary corresponds to the first byte of the cached segment; the information indication on the right boundary corresponds to the last byte of the cached segment.
本公开实施例提供了一种基于FPGA的支持TCP协议乱序接收的方法,此方案的处理能力描述如下:The embodiment of the present disclosure provides an FPGA-based method for supporting TCP protocol out-of-order reception. The processing capabilities of this solution are described as follows:
1)可以接收两个没有内容重叠的乱序报文段;1) Can receive two out-of-order message segments with no overlapping content;
2)如果第三个报文段顺序接收的报文,即当前接收到的第三个报文段为顺序报文段,针对顺序报文段可以正常处理(此处的正常处理包括但不限于:直接提交给应用层),如果是乱序报文段,并且和前两个乱序报文段无重叠部分,则丢掉该报文段。此处的前两个乱序报文段即为前述的已缓存报文段。在本实施例中,以M=2进行举例说明。2) If the third message segment is received sequentially, that is, the third message segment currently received is a sequential message segment, the sequential message segment can be processed normally (normal processing here includes but is not limited to : Directly submitted to the application layer), if it is an out-of-order segment and there is no overlap with the previous two out-of-order segments, the segment is discarded. The first two out-of-order message segments here are the aforementioned cached message segments. In this embodiment, M=2 is used as an example.
若果当前接收的乱序报文段与前两个缓存的乱序报文段有重叠部分,则需要根据重叠部分的情况,对该乱序报文段分情况进行处理。If the currently received out-of-order message segment overlaps with the first two buffered out-of-order message segments, the out-of-order message segment needs to be processed on a case-by-case basis based on the overlap.
基于FPGA芯片的支持TCP协议乱序接收的方法,适用于设备间通过以太网TCP协议实现数据互联通信的领域。由FPGA芯片实现TCP协议,释放了通用处理器软件处理的负载。其特征在于:支持TCP协议报文段一定程度的乱序处理;采用流水线处理方式,占用FPGA芯片的存储资源极少。The method based on the FPGA chip that supports out-of-order reception of the TCP protocol is suitable for the field of data interconnection communication between devices through the Ethernet TCP protocol. The TCP protocol is implemented by the FPGA chip, which releases the load of software processing on the general processor. Its characteristics are: it supports a certain degree of out-of-order processing of TCP protocol message segments; it adopts pipeline processing and occupies very little storage resources of the FPGA chip.
所谓支持一定程度的乱序处理:可以接收两个没有重叠关系的乱序报文段;如果第三个报文段顺序接收则可以正常处理,如果是乱序报文段,并且和前两个乱序报文段无重叠部分,则丢掉该报文段。此方案在实际应用中能够覆盖TCP协议95%以上的乱序情况。The so-called support for a certain degree of out-of-order processing: two out-of-order message segments with no overlapping relationship can be received; if the third message segment is received sequentially, it can be processed normally. If it is an out-of-order message segment, and it is the same as the first two If the out-of-sequence segment does not overlap, the segment is discarded. In practical applications, this solution can cover more than 95% of the out-of-order situations of the TCP protocol.
所谓采用流水线处理方式,在保证FPGA时序的前提下,FPGA采用五个周期完成一个乱序报文段的接收,占用FPGA存储资源极少,实现复杂度低、协议可靠性高。接收窗口控制逻辑包括两部分内容:The so-called pipeline processing method, on the premise of ensuring the FPGA timing, uses five cycles to receive an out-of-sequence message segment, occupying very little FPGA storage resources, low implementation complexity, and high protocol reliability. The receiving window control logic includes two parts:
接收窗口指针的维护;Maintenance of receiving window pointer;
乱序报文段的维护。Maintenance of out-of-order message segments.
(1)接收窗口指针的维护(1) Maintenance of receiving window pointer
接收窗口示意图如图5所示。图中所出现标示符的具体意义如表5所示。rx_dat指向顺序数据的首个字节,rx_nxt指向下一个期待接收的顺序数据,rx_wnd标识接收窗口的大小,该值不受乱序数据的影响。The schematic diagram of the receiving window is shown in Figure 5. The specific meanings of the identifiers appearing in the figure are shown in Table 5. rx_dat points to the first byte of sequential data, rx_nxt points to the next sequential data expected to be received, and rx_wnd identifies the size of the receiving window. This value is not affected by out-of-order data.
其中,rx_dat的改变在存储管理模块中实现,本模块在计算接收窗口右边界的时候用到该变量。rx_nxt的改变由本模块实现,并通知存储管理模块,存储管理模块使用该变量确定顺序数据的末尾位置,以供应用层读取。Among them, the change of rx_dat is implemented in the storage management module. This module uses this variable when calculating the right boundary of the receiving window. The change of rx_nxt is implemented by this module and notified to the storage management module. The storage management module uses this variable to determine the end position of the sequential data for reading by the application layer.
表1寄存器管理模块接口描述Table 1 Register management module interface description
表1Table 1
(2)乱序报文段维护(2) Out-of-order message segment maintenance
如图6和图7所示,接收端维护一个具有两条表项的寄存器,每条表项设置一个有效位。对于一个新收到的报文段,处理过程如下:As shown in Figure 6 and Figure 7, the receiving end maintains a register with two entries, and each entry sets a valid bit. For a newly received message segment, the processing process is as follows:
第K个周期(数据到达):根据当前报文段的序号和长度计算出报文段的左边界的信息(首字节的序号)和报文段的右边界的信息(末字节的序号);同时窗口左边界的信息、乱序报文段1的左右边界的信息、乱序报文段2的左右边界的信息已知。Kth cycle (data arrival): Calculate the information on the left boundary of the message segment (the sequence number of the first byte) and the information on the right boundary of the message segment (the sequence number of the last byte) based on the sequence number and length of the current message segment. ); at the same time, the information about the left boundary of the window, the information about the left and right boundaries of the out-of-order message segment 1, and the information about the left and right boundaries of the out-of-order message segment 2 are known.
第K+1个周期:窗口左边界减去六个边界值(顺序报文段、乱序报文段1、乱序报文段2的左右边界)。该边界值可包括:作为编辑的字节的序号该边界值作为边界的信息的一种。The K+1th cycle: the left boundary of the window minus six boundary values (the left and right boundaries of the sequential message segment, the out-of-order message segment 1, and the out-of-order message segment 2). The boundary value may include: as a sequence number of the edited byte, the boundary value serves as a type of boundary information.
第K+2个周期:根据第一个周期计算的差值结果进行边界比较,包括:报文段左边界与窗口左边界比较、文段左边界与四个乱序边界比较、报文段右边界与四个乱序边界比较、乱序报文段1左边界与乱序报文段2右边界比较、乱序报文段2左边界与乱序报文段1右边界比较。K+2 cycle: Boundary comparison is performed based on the difference result calculated in the first cycle, including: comparison of the left boundary of the message segment and the left boundary of the window, comparison of the left boundary of the message segment and the four out-of-order boundaries, comparison of the right boundary of the message segment The boundary is compared with four out-of-order boundaries, the left boundary of out-of-order segment 1 is compared with the right boundary of out-of-order segment 2, and the left boundary of out-of-order segment 2 is compared with the right boundary of out-of-order segment 1.
第k+2个周期的操作可如下:The operation of the k+2th cycle can be as follows:
如果是顺序报文段,则修改rx_nxt为末字节序号加1,此情况包括序号小于rx_nxt,但是序号与长度之和大于等于rx_nxt的报文段。If it is a sequential message segment, modify rx_nxt to the last byte sequence number plus 1. This situation includes message segments whose sequence number is less than rx_nxt, but the sum of the sequence number and length is greater than or equal to rx_nxt.
如果是乱序报文段,将当前报文段的首末字节序号与有效表项中的序号进行对比,并修改表项。If it is an out-of-order message segment, compare the first and last byte sequence numbers of the current message segment with the sequence numbers in the valid entry, and modify the entry.
第K+3个周期的操作可如下:The operation of the K+3th cycle can be as follows:
如果是顺序报文段,则判断rx_nxt与乱序报文段1的关系,如果有与rx_nxt衔接的表项,修改rx_nxt的值后,将表项置为无效;If it is a sequential message segment, determine the relationship between rx_nxt and out-of-sequence message segment 1. If there is an entry connected to rx_nxt, modify the value of rx_nxt and set the entry to be invalid;
如果是乱序报文段,则如果乱序报文段1无效,并且乱序报文段2未更新,则存储在乱序报文段1;如果乱序报文段1有效,乱序报文段2无效,并且乱序报文段1未更新,则存储在乱序报文段2。If it is an out-of-order message segment, if the out-of-order message segment 1 is invalid and the out-of-order message segment 2 has not been updated, it will be stored in the out-of-order message segment 1; if the out-of-order message segment 1 is valid, the out-of-order message segment 1 will be stored in the out-of-order message segment 1. If segment 2 is invalid and out-of-order segment 1 has not been updated, it is stored in out-of-order segment 2.
第K+4个周期的操作可如下:The operation of the K+4th cycle can be as follows:
如果是顺序报文段,则判断rx_nxt与乱序报文段2的关系,如果有与rx_nxt衔接的表项,修改rx_nxt的值后,将表项置为无效;If it is a sequential message segment, determine the relationship between rx_nxt and out-of-order message segment 2. If there is an entry connected to rx_nxt, modify the value of rx_nxt and set the entry to be invalid;
如果是乱序报文段,报文段左边界与窗口左边界不相等且乱序报文段1和乱序报文段2都有效(未更新前):如果报文段的左边界小于等于乱序报文段1右边界且报文段右边界大于等于乱序报文段2左边界并且乱序报文段2的左边界大于乱序报文段1的右边界:将乱序报文段2的右边界赋值给乱序报文段1的右边界,乱序报文段2无效。如果报文段的左边界小于等于乱序报文段2右边界且报文段右边界大于等于乱序报文段1左边界并且乱序报文段1的左边界大于乱序报文段2的右边界:将乱序报文段1的右边界赋值给乱序报文段2的右边界,乱序报文段1无效。If it is an out-of-order message segment, the left boundary of the message segment is not equal to the left boundary of the window and both the out-of-order message segment 1 and the out-of-order message segment 2 are valid (before updating): If the left boundary of the message segment is less than or equal to The right boundary of out-of-order message segment 1 and the right boundary of the message segment are greater than or equal to the left boundary of out-of-order message segment 2 and the left boundary of out-of-order message segment 2 is greater than the right boundary of out-of-order message segment 1: the out-of-order message segment The right boundary of segment 2 is assigned to the right boundary of out-of-order message segment 1, and out-of-order message segment 2 is invalid. If the left edge of the message segment is less than or equal to the right edge of out-of-order message segment 2 and the right edge of the message segment is greater than or equal to the left edge of out-of-order message segment 1 and the left edge of out-of-order message segment 1 is greater than the left edge of out-of-order message segment 2 The right boundary of: assign the right boundary of out-of-order message segment 1 to the right boundary of out-of-order message segment 2, and out-of-order message segment 1 is invalid.
该方案的处理示例可如图8所示。rx_nxt(期待接收的下一个顺序报文的首个字节的序号)值为1,三个报文段顺序到来,报文段左右边界分别是字节(2,3)、(5,7)、(3,8)。A processing example of this solution can be shown in Figure 8. The value of rx_nxt (the sequence number of the first byte of the next sequential message expected to be received) is 1. The three message segments arrive sequentially. The left and right boundaries of the message segments are bytes (2, 3) and (5, 7) respectively. , (3,8).
第一个报文段包含的字节的序号(2,3)判定为乱序报文段,则将左右边界进行存储,乱序报文段1表项有效(T表示表项有效,F表示表项无效)。The sequence number (2, 3) of the bytes contained in the first message segment is determined to be an out-of-order message segment, then the left and right boundaries are stored, and the out-of-order message segment 1 entry is valid (T indicates that the entry is valid, F indicates The entry is invalid).
第二个报文段包含的字节的序号(5,7)判定为乱序报文段,且与乱序报文段1表项没有交集,将左右边界进行存储,乱序报文段2表项有效;第三个报文段包含的字节的序号(3,8)为乱序报文段,但与乱序报文段1和乱序报文段2的表项同时有交集,且在更新乱序报文段1和乱序报文段2后,二者存在包含关系,最终,乱序报文段1表项有效,乱序报文段2表项无效。The byte sequence number (5, 7) contained in the second message segment is determined to be an out-of-order message segment, and there is no intersection with the out-of-order message segment 1 entry. The left and right boundaries are stored, and the out-of-order message segment 2 is stored. The entry is valid; the byte sequence number (3, 8) contained in the third message segment is an out-of-order message segment, but it overlaps with the entries of out-of-order message segment 1 and out-of-order message segment 2 at the same time. And after updating out-of-order message segment 1 and out-of-order message segment 2, there is an inclusive relationship between the two. Finally, the entry for out-of-order message segment 1 is valid, and the entry for out-of-order message segment 2 is invalid.
经验证,此方案在实际应用中能够覆盖TCP协议95%以上的报文段接收乱序情况,同时占用FPGA芯片的存储资源极少,实现复杂度低、协议可靠性高,可广泛用于各类乱序接收的应用环境中。缺点是该方案不能处理第三个乱序报文段和前两个乱序报文段无关联的情况,但TCP协议具有重传机制,少量丢弃的报文重传对协议影响较小。It has been verified that in practical applications, this solution can cover more than 95% of the out-of-order reception of message segments of the TCP protocol. At the same time, it takes up very little storage resources of the FPGA chip. It has low implementation complexity and high protocol reliability, and can be widely used in various applications. In the application environment of out-of-order reception. The disadvantage is that this solution cannot handle the situation where the third out-of-order message segment is not related to the first two out-of-order message segments. However, the TCP protocol has a retransmission mechanism, and the retransmission of a small number of discarded messages has little impact on the protocol.
本公开实施例提供一种电子设备,其特征在于,所述电子设备包括:An embodiment of the present disclosure provides an electronic device, characterized in that the electronic device includes:
存储器;memory;
处理器,与所述存储器连接,用于通过执行存储在所述存储器上的计算机可执行指令,能够实现前述任意实施例提供的基于TCP的报文接收方法。A processor, connected to the memory, is configured to implement the TCP-based message receiving method provided in any of the foregoing embodiments by executing computer-executable instructions stored on the memory.
该电子设备可为接收报文的任意接收设备,该接收设备可包括接收报文的FPGA芯片。该处理器可包括所述FPGA芯片。The electronic device may be any receiving device that receives messages, and the receiving device may include an FPGA chip that receives messages. The processor may include the FPGA chip.
本公开实施例提供一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令;所述计算机可执行指令被处理器执行后,能够实现前述任意实施例提供的基于TCP的报文接收方法。Embodiments of the present disclosure provide a computer storage medium that stores computer-executable instructions; after the computer-executable instructions are executed by a processor, the TCP-based message receiving method provided by any of the foregoing embodiments can be implemented .
本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。The technical solutions described in the embodiments of this application can be combined arbitrarily as long as there is no conflict.
在本申请所提供的几个实施例中,应该理解到,所揭露的方法和智能设备,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed methods and smart devices can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components may be combined, or can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be electrical, mechanical, or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各实施例中的各功能单元可以全部集成在一个第二处理单元中,也可以是各单元分别单独作为一个单元,也可以N个或N个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, all the functional units in the embodiments of the present application can be integrated into one second processing unit, or each unit can be separately used as a unit, or N or more units can be integrated into one unit; The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application. should be covered by the protection scope of this application.
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111238367.3A CN114143268B (en) | 2021-10-25 | 2021-10-25 | TCP-based message receiving method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111238367.3A CN114143268B (en) | 2021-10-25 | 2021-10-25 | TCP-based message receiving method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114143268A CN114143268A (en) | 2022-03-04 |
CN114143268B true CN114143268B (en) | 2024-02-06 |
Family
ID=80394783
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111238367.3A Active CN114143268B (en) | 2021-10-25 | 2021-10-25 | TCP-based message receiving method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114143268B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105939297A (en) * | 2015-10-26 | 2016-09-14 | 杭州迪普科技有限公司 | TCP message reassembling method and TCP message reassembling device |
CN106230744A (en) * | 2016-07-26 | 2016-12-14 | 京信通信系统(中国)有限公司 | A kind of method of out of order restructuring of data stream and forwarding unit |
CN112165457A (en) * | 2020-09-04 | 2021-01-01 | 苏州浪潮智能科技有限公司 | Method, system and device for file rearrangement and readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7346701B2 (en) * | 2002-08-30 | 2008-03-18 | Broadcom Corporation | System and method for TCP offload |
JP4872952B2 (en) * | 2008-03-06 | 2012-02-08 | 日本電気株式会社 | TCP buffer copy distributed parallel processing apparatus, method and program |
-
2021
- 2021-10-25 CN CN202111238367.3A patent/CN114143268B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105939297A (en) * | 2015-10-26 | 2016-09-14 | 杭州迪普科技有限公司 | TCP message reassembling method and TCP message reassembling device |
CN106230744A (en) * | 2016-07-26 | 2016-12-14 | 京信通信系统(中国)有限公司 | A kind of method of out of order restructuring of data stream and forwarding unit |
CN112165457A (en) * | 2020-09-04 | 2021-01-01 | 苏州浪潮智能科技有限公司 | Method, system and device for file rearrangement and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114143268A (en) | 2022-03-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI332150B (en) | Processing data for a tcp connection using an offload unit | |
US11695669B2 (en) | Network interface device | |
USRE47756E1 (en) | High performance memory based communications interface | |
US8719456B2 (en) | Shared memory message switch and cache | |
US9276993B2 (en) | Apparatus and method for in-line insertion and removal of markers | |
EP1784735B1 (en) | Apparatus and method for supporting memory management in an offload of network protocol processing | |
US20040117368A1 (en) | Transmitting acknowledgements using direct memory access | |
CN107257329B (en) | A kind of data sectional unloading sending method | |
US20070208820A1 (en) | Apparatus and method for out-of-order placement and in-order completion reporting of remote direct memory access operations | |
CN115941616A (en) | Multi-path RDMA transport | |
US20100265954A1 (en) | Method, System, and Computer Program Product for High-Performance Bonding Resequencing | |
US20030172169A1 (en) | Method and apparatus for caching protocol processing data | |
US20080256271A1 (en) | Methods and apparatus for reducing storage usage in devices | |
US20060268936A1 (en) | Communication apparatus and method thereof | |
CN104484295A (en) | Receiver sliding window-based data transmission method in parallel computer system | |
US8223788B1 (en) | Method and system for queuing descriptors | |
WO2024221928A1 (en) | Packet transmission method and device | |
US20060004933A1 (en) | Network interface controller signaling of connection event | |
US20060075142A1 (en) | Storing packet headers | |
US20060031588A1 (en) | Distributing timers across processors | |
US7822051B1 (en) | Method and system for transmitting packets | |
CN114143268B (en) | TCP-based message receiving method and device, electronic equipment and storage medium | |
CN116089656A (en) | Stream table management method, apparatus, device and computer readable storage medium | |
CN115208830B (en) | A high-performance non-blocking data sending method and device | |
WO2025000184A1 (en) | Methods, apparatuses, and storage media for high performance transmission control protocol communication using b+ trees |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |