Search

CN-122027076-A - TCP packet forward fault-tolerant rearrangement method based on protocol natural redundancy and related equipment

CN122027076ACN 122027076 ACN122027076 ACN 122027076ACN-122027076-A

Abstract

The invention provides a TCP packet forward fault-tolerant rearrangement method based on protocol natural redundancy and related equipment, and relates to the technical field of TCP/IP network protocols and error correction. The method comprises the steps of 1, receiving a TCP session stream, detecting a sequence window from the TCP session stream based on a sequence window detection method of generalized repeated decoding, and 2, rearranging the rest packets in the TCP session stream by adopting a Beam width self-adaptive bidirectional Beam Search recursive Search method by taking the detected sequence window as an initial value of a rearrangement window. The invention realizes rearrangement performance which is greatly superior to the existing method with lower complexity.

Inventors

  • YU HONGYI
  • Zhu Zhaorui
  • Zha Renpeng
  • YU GUOXIAN
  • LI YONGBIN
  • ZHANG XIA
  • RAN XIAOMIN
  • HU BINPENG
  • DU JIANPING
  • LIU GUANGYI
  • SHEN ZHIXIANG
  • WANG BIN

Assignees

  • 中国人民解放军网络空间部队信息工程大学

Dates

Publication Date
20260512
Application Date
20241112

Claims (10)

  1. 1. A method for forward fault-tolerant reordering of TCP packets based on natural redundancy of a protocol, comprising: Step 1, receiving a TCP session stream, and detecting a sequence window from the TCP session stream based on a sequence window detection method of generalized repeated decoding; And 2, rearranging the rest packets in the TCP session stream by using the detected sequence window as an initial value of a rearrangement window and adopting a Beam width self-adaptive bidirectional Beam Search recursive Search method.
  2. 2. The method for forward fault-tolerant rearrangement of TCP packets based on natural redundancy of protocol according to claim 1, wherein in step 1, a sequence window is detected from a TCP session stream by a sequence window detection method based on generalized repeated decoding, specifically comprising: Step 1.1 setting the test window Length lower limit W min , the upper limit W max and the estimated confidence threshold for the initial binary sequence number Initializing the length of a test window to be W max ; Step 1.2, for a test window of a given length, sliding the test window on a received packet sequence with a step length of 1, calculating the estimated value of the packet sequence number in the window, the total Hamming distance between the estimated value of the packet sequence number and the observed value of the packet sequence number, and the bit-level estimated confidence of the initial binary sequence number, if the minimum value of the bit-level estimated confidence of the initial binary sequence number corresponding to the current window is not less than Selecting a window position with the minimum total hamming distance as a sequence window, otherwise, reducing the length of a test window, and repeating the process; step 1.3, if the bit level estimation confidence minimum value of the calculated initial binary sequence number is smaller than the minimum value under the test window of all the lengths Then decrease Taking value and re-executing step 2.2 until the minimum value of the bit level estimation confidence of the initial binary sequence number corresponding to the existence window is not less than
  3. 3. The method for forward fault-tolerant reordering of TCP packets based on natural redundancy of a protocol of claim 2, wherein in step 1.2, the calculation of the packet sequence number estimate in the window comprises: estimating initial binary sequence number of packet in window Based on generalized repetition coding relationship between binary sequence number of arbitrary packet and initial binary sequence number Binary sequence number estimation value for estimating remaining packets in window N represents the length of the current window, L i is the load accumulation length of the first i-1 packets, and b (L i ) represents the 32-bit binary representation of L i .
  4. 4. A method for forward fault-tolerant reordering of TCP packets based on natural redundancy of a protocol according to any one of claims 1 to 3, wherein step 2 comprises: Step 2.1, setting an out-of-order span, a Hamming distance coefficient and an initial beam width, wherein the out-of-order span represents the maximum deviation value of the true sending sequence number and the receiving sequence number of an out-of-order packet; initializing a surviving path in a first preset list as a packet sequence number in a sequence window; Step 2.3, determining a next recursion direction and a feasible search interval according to the number of the packets at two sides of the current rearrangement window and the disorder span; step 2.4, traversing the feasible search interval, expanding path nodes on the survivor paths to form new survivor paths, calculating binary sequence number estimated values of all groups on the new survivor paths and total Hamming distances between the binary sequence number estimated values and corresponding observed values according to the group lengths, taking the total Hamming distances as path metric values of the new survivor paths, and adding the new survivor paths and the path metric values into a second preset list; Step 2.5, calculating the self-adaptive beam width K adp according to the minimum path metric value, the Hamming distance coefficient and the initial beam width in the second preset list; Step 2.6, the first preset list is emptied, and K adp surviving paths with the minimum path metric value in the second preset list and the corresponding path metric values are stored in the first preset list; step 2.7, adding 1 to the length of the rearrangement window and updating the position of the rearrangement window; And 2.8, repeatedly executing the steps 2.3 to 2.7 until the length of the rearrangement window reaches the total number of the packets of the TCP session flow, and taking the arrangement mode of all the packets corresponding to the surviving paths with the minimum path metric value in the first preset list and the binary sequence number value at the moment as a final rearrangement result.
  5. 5. The method for forward fault-tolerant reordering of TCP packets based on natural redundancy of a protocol of claim 4, wherein step 2.3 comprises: For the next recursion direction selection, the sequence numbers of the initial packet and the sequence numbers of the final packet in the current rearrangement window are marked as w s ' and w e ', and w s ' -1 and T-w e ' residual packets are respectively arranged on two sides of the rearrangement window, and the next recursion is performed by selecting one side with more residual packets, namely, when w s ′-1≥T-w e ', the forward recursion to the rearrangement window is selected, and otherwise, the backward recursion is performed; For the selection of the feasible search interval of each step of recursion, if the current rearrangement window length is not smaller than the disorder span, the search spaces recursively performed in any direction are only limited in the rest groups in the same direction, namely the feasible search spaces corresponding to forward and backward recursions are [ max (1, w s ′-1-r span ),w s '-1] and [ w e ′+1,min(w e ′+1+r span , T) ], wherein r span is the disorder span, otherwise, the feasible search space of the next step of recursion also comprises part of the rest groups in the opposite direction to the recursion direction, namely the feasible search spaces corresponding to forward and backward recursions also comprise [ w e ′+1,min(w s ′-1+r span , T) ] and [ max (1, w e ′+1-r span ),w s ' -1].
  6. 6. The method for forward fault-tolerant reordering of TCP packets based on natural redundancy of a protocol of claim 5, wherein in step 2.4, the binary sequence number estimation of all packets on the new surviving path is calculated according to the packet length, specifically comprising: If the next recursion direction is the forward direction of the current rearrangement window, the binary sequence number estimated value of the j-th received packet is selected The method comprises the following steps: Wherein, the Representing a binary subtraction operation, A binary sequence number estimate representing the start packet, b (-) represents a binary transition, A decimal sequence number indicating a start packet, l' j indicating the length of a j-th received packet; If the next recursion direction is the backward direction of the current rearrangement window, the binary sequence number estimated value of the j-th received packet is selected The method comprises the following steps: Wherein, the Representing a binary addition operation, A binary sequence number estimate representing the end packet, Indicating the length of the last packet.
  7. 7. The method for forward fault-tolerant reordering of TCP packets based on natural redundancy of a protocol according to claim 5 or 6, wherein step 2.5 comprises: calculating the path metric value to be less than or equal to The adaptive beam width is the number of paths K ρd Where min (M cum ) represents the minimum path metric value in the set of all path metrics M cum in the second preset list, ρ d represents the Hamming distance coefficient, Representing a rounding down operation, K pre is the initial beamwidth.
  8. 8. A TCP packet forward fault tolerant reordering system based on natural redundancy of a protocol, comprising: The sequence window detection module is used for receiving the TCP session stream, and detecting a sequence window from the TCP session stream based on a sequence window detection method of generalized repeated decoding; And the packet estimation module is used for rearranging the rest packets in the TCP session stream by adopting a Beam width self-adaptive bidirectional Beam Search recursive Search method by taking the detected sequence window as an initial value of the rearrangement window.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the program is executed by the processor.
  10. 10. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.

Description

TCP packet forward fault-tolerant rearrangement method based on protocol natural redundancy and related equipment Technical Field The invention relates to the technical field of TCP/IP network protocols and error correction, in particular to a TCP packet forward fault-tolerant rearrangement method based on protocol natural redundancy and related equipment. Background In the widely used TCP/IP protocol standard, a TCP session stream is a common service, and a plurality of packets in the session stream are sent in sequence, however, due to reasons of route switching, load balancing and the like, a part of packets sent later may arrive first and further cause disorder. The existing mechanism of rearrangement of the TCP packet in disorder usually assumes that the binary data submitted to the upper layer by the receiving end through demodulation and decoding of the physical layer is basically error-free, so that the size of the TCP sequence number field can be directly utilized to rearrange different packets received in disorder for being submitted to the upper layer application. However, this assumption is not necessarily true in a complex radio reception environment, and especially in radio communication scenarios such as high-speed mobile, closed space, urban dense area, and remote area, some occasional bit errors, and even high bit errors, may still be caused due to the vulnerability of the link and the variation characteristics of the channel with time and space. When the upper layer of the receiving end detects the error code, a feedback retransmission mechanism is generally adopted to discard and retransmit the error packet. For time-sensitive networks, the expansion of error codes and retransmission delays can bring great harm, and even threaten the life safety of human beings in the scenes of automatic driving, industrial automation control, telemedicine and the like, while for non-time-sensitive networks, frequent error retransmission can increase communication delay and reduce network throughput on the one hand, and on the other hand, communication services which are sent to human beings by facing traditional broadcasting and multicasting do not even have retransmission conditions when error codes are generated. Therefore, a new error correction decoding technology of key fields of the TCP serial number independent of retransmission is designed by utilizing sequential incremental redundancy contained in the TCP serial number, and the method has important significance in reducing transmission delay and improving network reliability and throughput. Less recent disclosures regarding this problem are made, and document 1 (Chen Yuexin, zheng Hui, zhao Yanqiu, etc.) a data-contained misordering algorithm based on sequence numbers [ J ]. University of martial arts, 2009,31 (24): 116-119) builds a sequential metric for the potential adjacency of any two packet groups, and then searches for the ordering with the largest sequential metric by means of a packet-wise expansion. The method has a large number of repeated metric calculations among different data packets, meanwhile, the performance is reduced due to the fact that the constructed sequential metrics make simplified consideration on the initial sequence number, and the method that only the biggest accumulated metrics are reserved in each step of recursion is likely to enable the algorithm to be in local optimum. In document 2 (Chen Yan, wang Xiaomei, fan Liang) the TCP sequence number field cooperation recovery method under high error conditions [ J ]. The university of information engineering report 2016,17 (3): 365-369), a partial correct sequence number is first obtained based on error checking, and then the remaining positions are padded by means of beam search. However, when the error rate increases, the probability of packet passing verification is greatly reduced, and the method is difficult to effectively reduce the search space, and the complexity is high. Patent document CN118740962a discloses a method for estimating the initial sequence number of a noisy TCP session stream and related equipment, in which although the problem of error correction and restoration of the noisy TCP field is considered, the method does not make the assumption of out-of-order reception of TCP packets, and is only suitable for the scene of in-order reception. Overall, existing work lacks analysis of packet out-of-order behavior, does not fully exploit the natural redundancy contained in TCP sequence numbers, and still has a large performance enhancement space. Disclosure of Invention Aiming at the problem of out-of-order rearrangement of noisy TCP packets, the invention provides a forward fault-tolerant rearrangement method of TCP packets based on protocol natural redundancy and related equipment. In a first aspect, the present invention provides a method for forward fault-tolerant reordering of TCP packets based on natural redundancy of a protocol, including: Step 1,