Method, electronic device, computer program product for data latency processing

By caching and calculating the reception delay of data packets in the communication system, and adjusting the caching time using the correlation between adjacent packets, the problem of inconsistent delays in multi-link and single-link transmission systems is solved, thus achieving the continuity and stability of data transmission.

CN123145182APending Publication Date: 2026-11-20ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510645557.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In multi-link aggregation transmission systems and single-link data transmission systems, the uneven data load and channel quality differences among links lead to inconsistent latency, causing data packet latency jitter and affecting the time sequence continuity of real-time services. Existing technical solutions, such as unified caching strategies and video data stream encoding and decoding strategies, suffer from stuttering or hardware burden.

Method used

By receiving and caching data packets transmitted through the communication link, data packets with consecutive sequence numbers are extracted and added to the sliding window after being cached sequentially according to a preset sequence number. The reception delay of each packet in the sliding window is calculated, and the smoothing time is determined based on the reception delay of adjacent packets. The buffering time of the data packets is adjusted to spread the delay difference caused by link jitter.

Benefits of technology

It effectively ensures the continuity of data transmission, reduces latency differences caused by link jitter, improves the continuity and stability of data transmission, and avoids excessive consumption of hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145182A_ABST
    Figure CN123145182A_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for data latency processing, which comprises: receiving data packets of a data stream transmitted by a communication link, and sequentially buffering the data packets according to preset sequence numbers of the data packets; when the buffered data packets include a plurality of data packets with continuous sequence numbers, taking out the plurality of data packets with continuous sequence numbers and adding them to a sliding window; determining the receiving latency of each data packet in the sliding window based on the receiving time of each data packet; determining the smoothing time of each data packet based on the receiving latency of each data packet and its adjacent data packets, and adjusting the buffering time of each data packet according to the smoothing time. The present disclosure improves the continuity of data transmission, ensures that the data stream is sent continuously, quickly and timely at an equal latency rhythm. The present disclosure also provides an electronic device, a medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a method for data delay processing, an electronic device, and a computer program product. Background Technology

[0002] In communication systems, latency jitter is a common problem that can occur in both multi-link aggregation transmission systems and single-link data transmission systems.

[0003] For example, in a multi-link aggregation transmission system, the uneven data load across links and differences in channel quality lead to inconsistent round-trip times (RTTs) for each link. This delay difference causes time skew in the transmission of sub-data packets from the same data stream to the terminal device, resulting in data packet delay jitter. Similarly, in a single-link data transmission system, significant fluctuations in link transmission speed over time can also cause delay jitter.

[0004] Taking video transmission as an example, when the transmission delay of video sub-data packets exceeds the maximum waiting time threshold preset by the video player, the player will experience phenomena such as screen stuttering and glitches. Summary of the Invention

[0005] This disclosure provides a method for data delay processing, an electronic device, a medium, and a computer program product.

[0006] In a first aspect, embodiments of this disclosure provide a method for processing data latency, the method comprising: receiving data packets of a data stream transmitted via a communication link, and sequentially caching the data packets according to a preset sequence number of each data packet; when the cached data packets include multiple data packets with consecutive sequence numbers, retrieving the multiple data packets with consecutive sequence numbers and adding them to a sliding window; determining the reception latency of each data packet in the sliding window based on the reception time of each data packet; determining the smoothing time of each data packet based on the reception latency of each data packet and its adjacent data packets, and adjusting the caching time of each data packet accordingly based on the smoothing time.

[0007] Secondly, embodiments of this disclosure provide an electronic device, which includes a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements any of the data delay processing methods of embodiments of this disclosure.

[0008] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the data delay processing methods of embodiments of this disclosure.

[0009] Fourthly, embodiments of this disclosure provide a computer program product, which includes a computer program that, when executed by a processor, implements any of the data latency processing methods of embodiments of this disclosure.

[0010] In this embodiment, data packets transmitted via the communication link are received and buffered. After buffering data packets sequentially according to their preset sequence numbers, consecutively sequenced data packets are extracted and stored in a sliding window. Then, the reception delay of each packet within the sliding window is calculated, and a smoothing time is calculated based on the reception delays of adjacent packets. The buffering time of each data packet is then adjusted accordingly based on the smoothing time. This embodiment utilizes the correlation between the transmission delays of adjacent packets to distribute the delay differences caused by link jitter in a single data packet across the sequence of adjacent packets, thereby improving the continuity of data transmission. Attached Figure Description

[0011] In the accompanying drawings of the embodiments disclosed herein:

[0012] Figure 1 This is a schematic diagram of a communication system applicable to an embodiment of the present disclosure;

[0013] Figure 2 A flowchart illustrating a data latency processing method provided in an embodiment of this disclosure;

[0014] Figure 3 A flowchart illustrating another data latency processing method provided in this embodiment of the disclosure;

[0015] Figure 4 This is a schematic diagram of a live broadcast communication system applicable to an embodiment of the present disclosure;

[0016] Figure 5 A schematic diagram illustrating the interaction process between the client and the aggregation server in a data latency processing method provided in this embodiment of the disclosure;

[0017] Figure 6 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0018] To enable those skilled in the art to better understand the technical solutions of this disclosure, the cell handover method, terminal, computer-readable medium, and computer program product provided in the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0019] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.

[0020] The accompanying drawings of the embodiments disclosed herein are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings.

[0021] This disclosure may be described with reference to plan and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances.

[0022] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0023] The terminology used in this disclosure is for describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The term "comprising" as used in this disclosure specifies the presence of the stated feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.

[0024] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.

[0025] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0026] Please see Figure 1 , Figure 1 The diagram shown is a schematic representation of a communication system applicable to an embodiment of this disclosure. Figure 1 As shown, the communication system 100 may include multiple network nodes. Figure 1 Taking network node 1 and network node 2 as an example, network node 1 and network node 2 can communicate through one or more communication links.

[0027] For example, Figure 1 This illustrates that network node 1 communicates with network node 2 through communication link 1, communication link 2, ..., communication link n. When n is 1... Figure 1 The system shown is a single-link transmission system. When n is greater than 1, Figure 1 The system shown is a multi-link transmission system. This disclosure does not limit the scope of the embodiments.

[0028] The network node can be a device with data and / or message sending and receiving capabilities. For example, the network node can be a server, network device, or client device. It is understood that the embodiments of this application do not limit the specific form of the network node.

[0029] For example, a server can be a device with data processing capabilities. For instance, a server can be a traditional physical server, such as a server in a data center, or simply a component of a server in a data center, such as a processor, chip, or chip system. Of course, a server can also be a cloud server built based on virtualization technology and distributed architecture.

[0030] For example, network devices can be wireless WIFI routers, whose WAN port configuration can be divided into single WAN or multiple WAN. The link matching mechanism realizes intelligent scheduling of multiple logical links (such as PPPoE multi-dialing, MPTCP sub-stream, VPN tunnel) through dynamic load balancing algorithms (such as weighted decision based on RTT, packet loss rate, and bandwidth utilization).

[0031] For example, a client device (or terminal for short) is a user terminal device, which is a device with wireless transceiver capabilities. Terminal devices can be mobile phones, tablets, computers with wireless transceiver capabilities, or CPEs (Customer Premises Equipment). CPEs can be equipped with external devices for acquiring user video data streams, etc.

[0032] It should be noted that, Figure 1 The communication system shown is merely an example and does not limit the communication systems to which the method provided in this application is applicable. In summary, the method provided in this application is applicable to various communication systems where there are multiple communication paths between the sending device and the receiving end.

[0033] As described above, in this embodiment of the application, network node 1 and network node 2 can communicate through one or more communication links. Communication link 1, communication link 2, and communication link n can be either wireless or wired channels.

[0034] In other words, in this embodiment, network node 1 and network node 2 can be connected wirelessly, wiredly, or a combination of both. It is understood that this embodiment does not limit the specific connection method of the network nodes. Wireless connections can include SIM card connections, Wi-Fi connections, Bluetooth connections, satellite connections, etc.; while wired connections can use wired fixed-line networks.

[0035] Correspondingly, embodiments of this application can communicate based on one of various types and standards of communication systems, or form multi-link aggregation communication across different types and standards of communication systems. The different types and standards of communication systems involved in embodiments of this application include 5G mobile communication systems, LTE systems, Vehicle-to-Everything (V2X) systems, Internet of Things (IoT) systems, Wi-Fi systems, Bluetooth, satellite communication systems, and wired fixed networks (such as fiber optics and Ethernet). It is understood that embodiments of this application do not limit the type and standard of the communication system.

[0036] exist Figure 1 In the communication system shown, latency jitter is a common problem that can occur in both single-link data transmission systems and multi-link aggregation transmission systems.

[0037] For example, in communication system 100, a multi-link transmission architecture uses multiple parallel links (such as communication links 1 to n) to achieve data transmission between network node 1 and network node 2. Due to the uneven distribution of data load across links and differences in channel quality (such as wireless signal attenuation and varying interference strength), their round-trip time (RTT) varies significantly. This RTT inconsistency causes time skew in the transmission of data packets from the same data stream to the destination network node, resulting in latency jitter and affecting the timing continuity of real-time services (such as video data streams).

[0038] In contrast, if the communication system 100 is a single-link transmission system, when the link transmission rate fluctuates significantly due to factors such as network congestion or physical layer interference (such as sudden changes in channel bandwidth), the transmission interval of data packets will also be unevenly distributed, resulting in disordered arrival or accumulated delay problems, and ultimately forming a time delay jitter phenomenon.

[0039] Based on the above problems, relevant technologies have proposed two solutions:

[0040] One approach is a unified caching strategy. Specifically, network node 2 caches all video data streams received from network node 1, setting a caching time T for each stream. Once the video data has been cached for a sufficient period, network node 2 then sends the cached video data stream out. However, this uniform caching method still results in stuttering.

[0041] Secondly, there's the video data stream encoding / decoding strategy. Specifically, network node 1 encodes the original video data stream, generating more encoded packets than the original, and sends them to network node 2 via multiple links. Network node 2 only needs to receive any N encoded packets to reconstruct the original video data stream using a decoding algorithm. This scheme places high demands on the algorithm and requires re-encoding and decoding the data, posing a challenge to the hardware CPU and server processing capabilities.

[0042] In view of this, the present disclosure provides a method for data latency processing. After sending data packets of a data stream file, network node 1 transmits them to network node 2 through at least one communication link. Network node 2 utilizes the correlation between the transmission latency of adjacent data packets in the data stream sequence number and, by using smoothing time, re-plans and adjusts the "sending rhythm" of the data packets. This distributes the difference in reception latency caused by link jitter in a single packet evenly across the adjacent packet sequence, so that the actual buffering time of each data packet no longer depends on a fixed threshold, but adapts to changes based on link fluctuations. By dynamically controlling the packet buffering time, the data stream of the network node is effectively guaranteed to be sent continuously, quickly, and timely with a balanced latency rhythm.

[0043] Figure 2 A flowchart illustrating a data latency processing method provided in this disclosure embodiment, which can be applied to... Figure 1 In the communication system 100 shown, it is understood that the steps performed by network node 1 can also be specifically performed by a module or component of that network node, for example, by a chip or chip system in that network node; similarly, the steps performed by network node 2 can also be specifically performed by a module or component of that network node, for example, by a chip or chip system in that network node.

[0044] For ease of explanation, in this embodiment, network node 1 is designated as the sending device for data packets in the data stream, and network node 2 is the receiving device, which receives data packets from the data stream transmitted through the communication link from network node 1. Please refer to the following. Figure 2 The flowchart illustrating the data latency processing method in this embodiment provides a detailed explanation of the method. After network node 1 acquires the data stream, it sends it to network node 2 via the communication link. Network node 2 can perform the following operations:

[0045] S201: Receive data packets from the data stream transmitted through the communication link and cache the data packets sequentially according to the preset sequence number of each data packet.

[0046] As an illustration, the communication link can also be a multi-link scenario, where network node 1 sends data streams to network node 2 through multiple parallel links (for example, using Wi-Fi, SIM cards, or even multiple carrier SIMs at the same time). Network node 2 needs to aggregate the messages from different links.

[0047] In one embodiment, network node 2 can be an aggregation server used for uplink transmission, such as for implementing push streaming services. In this embodiment, network node 1 is a client device (e.g., a CPE), and the video content data from the broadcaster's end is uploaded to the aggregation server via the CPE.

[0048] As described above, as an example, the communication link can be a single-link scenario. For instance, data streams can be transmitted between network node 1 and network node 2 via a single physical link. This can be achieved through fixed-line wired transmission or through wireless transmission links such as Wi-Fi, Bluetooth, or SIM cards. In one embodiment, network node 2 can be a client device used for downlink transmission. In application scenarios such as "streaming services," network node 2 is a content consumer, for example, a client device for a live streaming platform.

[0049] It should be noted that the data stream captured by network node 1 can be a real-time audio and video data stream based on video conferencing or live streaming, or a sensor data stream periodically reported by IoT devices, or other forms of data stream. This disclosure does not limit the specific data stream.

[0050] In one embodiment, after capturing the data stream, network node 1 generates data packets according to application layer requirements. For example, the video data stream is segmented into multiple data packets, and each packet is assigned a unique sequence number (Seq).

[0051] For example, each message may include the following header information:

[0052] | Stream Type (F_Type) | Stream Identifier (Idx) | Sequence Number (Seq) | CRC | ...

[0053] Among them, the stream type (F_Type) is used to distinguish between real-time streams, reliable transmission streams, etc.; the stream identifier (Idx) marks the data stream affiliation (e.g., video data stream 1, audio stream 2).

[0054] After obtaining the data packets of the data stream transmitted through the communication link, network node 2 can obtain the sequence number of the data packet based on the header information encapsulated in the data packet.

[0055] When network node 2 receives a packet, it records the reception timestamp (T_Recv) to determine the reception time of the data packet. The reception timestamp (T_Recv) can be generated based on a hardware clock, specifically the hardware timestamp of the network interface card (NIC) in one exemplary embodiment; it can also be based on a software clock, i.e., obtaining the system time through an operating system API (such as Linux's clock_gettime()); or, it can be generated globally consistent by synchronizing with a time server via the Network Time Protocol (NTP). This disclosure does not limit the scope of the embodiments.

[0056] As an example, when caching data packets, network node 2 can cache the received data packets according to the sequence number encapsulated in the data packet or other predetermined rules, and this disclosure does not limit this.

[0057] When caching, network node 2 maintains a dynamic cache table. For example, the fields of the cache table may include:

[0058] |Seq|Receive Status (R)|Receive Timestamp (T_Recv)|Timeout Flag (Timeout_Flag)...

[0059] The meanings of each field can be:

[0060] Receive status (R): 0 indicates no reception, 1 indicates reception;

[0061] Timeout flag (Timeout_Flag): Marks whether to enter the timeout retransmission process;

[0062] Messages can be stored in the cache table according to the following rules:

[0063] i. Sort by sequence number (Seq): Use Seq as the key and store the message in a linked list or array.

[0064] ii. When dynamically managing the cache table, you can set up cyclic redundancy check (CRC check), and you can also perform at least one of the following: duplicate message detection and expired message detection.

[0065] For example, when performing CRC check, the checksum is calculated based on the fields encapsulated in the data packet. It is then determined whether the checksum matches the checksum encapsulated in the data packet. If not, the data packet is discarded. If the received packet Seq is less than the currently cached minimum sequence number (RecvNextSeq), it is determined to be a duplicate or expired packet and is discarded directly. If the received packet Seq is not cached and is greater than RecvNextSeq, it is inserted into the cache table and RecvNextSeq is updated.

[0066] In one exemplary embodiment, the cache table needs to undergo a continuity check. In another exemplary embodiment, after caching the data packets sequentially according to their preset sequence numbers, the method may further include: identifying missing data packets among the cached data packets that cause a break in the data packet sequence number; and if the latency of the missing data packet is greater than the maximum timeout, sending a retransmission request; wherein the maximum timeout is adjusted based on at least one of the following: the type of the data stream, the RTT of the current communication link, the number of current communication links, and the type of communication link.

[0067] In one embodiment, the latency of a missing data packet can be determined as follows:

[0068] The currently cached data packets are polled at the first moment. Based on the data packet reception flag, the unreceived data packets in the data stream are identified to form a first packet set. The first unreceived timestamp of each data packet in the first packet set is recorded.

[0069] At the second moment, the currently cached data packets are polled. When a data packet in the first packet set has a packet reception mark, the data packet is deleted from the first packet set, the first packet set is updated to the second packet set, and the second unreceived timestamp of each data packet in the second packet set is recorded.

[0070] The delay time of each data packet is determined based on the first and second unreceived timestamps of each data packet.

[0071] After obtaining the hysteresis time, it is determined whether the hysteresis time is greater than the maximum timeout time. If so, the retransmission request is sent.

[0072] S202: When the cached data packets include multiple data packets with consecutive sequence numbers, retrieve the multiple data packets with consecutive sequence numbers and add them to the sliding window.

[0073] During data transmission, when multiple data packets stored in the cache table of network node 2 have consecutive sequence numbers, the system can use a batch processing mechanism to improve transmission efficiency.

[0074] In one exemplary implementation, the system can traverse the sequence numbers of each message in the cache table, identify message groups that meet the continuity condition, and perform centralized transfer. For example, when there are four messages with sequence numbers 100, 101, 102, and 103 in the cache table, since their sequence numbers are consecutive and without any gaps, network node 2 can remove "this group of message segments" as a data unit from the cache table and store it as a whole in the storage area corresponding to the sliding window.

[0075] As will be understood by those skilled in the art, the sliding window can be a dynamically adjustable buffer structure, which can be implemented using a first-in-first-out (FIFO) queue, and its window size and position parameters can be dynamically updated according to the network status.

[0076] For example, when data packets with sequence numbers 100, 101, 103, and 104 exist in the cache table, the system will prioritize identifying the consecutive segments 100-101 for transfer, while packets 103-104 will be temporarily stored in the cache table because they lack packet number 102.

[0077] Understandably, by transferring consecutively arranged groups of data packets to a sliding window in batches, network node 2 can readjust the subsequent "processing rhythm" of each data packet sent by network node 1 through the sliding window, thereby avoiding decoding anomalies caused by network jitter or out-of-order arrival.

[0078] S203: Determine the reception delay of each data packet in the sliding window based on the reception time of each data packet.

[0079] After network node 2 stores continuous data packets into the sliding window, the reception delay of each data packet relative to the unified reference time is calculated by comparing the difference between the reception timestamp of each packet in the sliding window and the unified reference time.

[0080] For example, suppose there are four data packets with sequence numbers 100-104 in the sliding window, and their reception timestamps are T0=101ms, T1=100ms, T2=105ms, T3=107ms, and T4=112ms respectively. The system takes the reception time T1 of the first data packet (Seq=100) as the base time (T_Base=100ms). Then the reception delays of each data packet are ΔT0=1ms, ΔT1=0ms(T1-T_Base), ΔT2=5ms(T2-T_Base), ΔT3=7ms, and ΔT4=12ms respectively.

[0081] For example, in a multi-link aggregation system, where network node 2 is connected to network node 1 through multiple communication links, since data packets are sent from network node 1 to network node 2 through different links, network node 2, acting as the aggregation server, needs to set a unified reference time T to facilitate the calculation of the reception delay of each data packet in the aggregation server and the time consumed by the data packet in the communication link. Base Therefore, the server startup time can be used as T_Base.

[0082] S204: Based on the reception delay of each data packet and its adjacent data packets, determine the smoothing time of each data packet, and adjust the buffering time of each data packet accordingly based on the smoothing time.

[0083] For example, as mentioned above, assuming the five data packets with sequence numbers 100-104 in the current sliding window have timestamps T0, T1, T2, T3, and T4 respectively when they enter network node 2, and taking the power-on time of network node 2 as the same base time T_Base, then the reception delay of each data packet is as follows:

[0084] ΔT0 = T0 - T_Base;

[0085] ΔT1 = T1 - T_Base;

[0086] ΔT2 = T2 - T_Base;

[0087] ΔT3 = T3 - T_Base;

[0088] ΔT4 = T4 - T_Base;

[0089] Next, a smoothing calculation is performed based on the reception latency of each data packet in the current window and its adjacent data packets to determine the buffer time corresponding to each data packet. In other words, by utilizing the correlation of transmission latency of adjacent packets, transmission time fluctuations are dynamically suppressed, and sudden delays are amortized.

[0090] The following section further elaborates on the data processing operations for determining the smoothing time of each data packet.

[0091] In the embodiments of this disclosure, the smoothing time of each data packet is determined based on the reception delay of each data packet. This can be based on various algorithms, such as smoothing calculation based on a linear weighted algorithm. Besides linear weighted algorithms, nonlinear algorithms, such as polynomial fitting, can also be used to smooth and optimize the non-uniformity of the delay distribution. This disclosure does not limit this approach. When selecting a smoothing algorithm, it is appropriate to flexibly choose or combine algorithms according to the actual scenario requirements (such as real-time performance, computational complexity, and accuracy) to ensure a balance between the temporal continuity of the data stream and transmission efficiency. This disclosure does not limit this approach either.

[0092] In one embodiment, determining the smoothing time for each data packet includes the following steps:

[0093] a. Determine the weight of the reception delay for each data packet and its adjacent data packets;

[0094] b. Perform linear weighted calculation based on the reception delay and corresponding weight of each data packet and its adjacent data packets to determine the smoothing time of each data packet;

[0095] The weight of the reception delay of each data packet is determined based on the number of consecutive data packets with sequence numbers in the sliding window, and the position of each data packet in the sliding window.

[0096] In one example, refer to Figure 3 Step b involves performing a linear weighted calculation based on the reception delay and corresponding weight of each data packet and its adjacent data packets to determine the smoothing time for each data packet. This includes the following steps:

[0097] Step 301: Determine whether the number of multiple data packets with consecutive sequence numbers in the sliding window is not less than a preset threshold; if yes, proceed to step 302A; if no, proceed to step 302B.

[0098] The "preset threshold" for multiple data packets with consecutive sequence numbers in a sliding window is generally based on a performance trade-off between actual business needs and computational overhead. For example, if real-time performance needs to be prioritized (such as video streaming), the threshold can be set to a smaller value, such as a preset threshold of 5, to ensure a fast response when the data volume is small. If higher smoothness and stability are required (such as file transfer), the preset threshold can be appropriately increased, such as a preset threshold of 10. The setting of the preset threshold may also need to consider link dynamics (such as RTT fluctuation range), hardware processing capabilities, and data stream type (such as the difference in timing sensitivity between video and games).

[0099] Step 302A: Divide multiple data packets with consecutive sequence numbers in the sliding window into multiple segments.

[0100] In one embodiment, multiple data packets with consecutive sequence numbers in the sliding window can be divided into a first segment, a middle segment, and a last segment. The purpose of segmentation is to employ differentiated weighting strategies based on the transmission characteristics of data packets in different segments. For example, in one embodiment, a feasible segmentation method is as follows:

[0101] First segment: Among multiple data packets with consecutive sequence numbers, the first two data packets;

[0102] Middle segment: Among multiple data packets with consecutive sequence numbers, the first 3 to n-2 data packets,

[0103] Tail segment: The last two data packets in a series of consecutive data packets with consecutive sequence numbers.

[0104] Of course, the data packets in the first and last segments are not limited to the first two or the last two; they can also be one, three, or other numbers. This disclosure does not limit this.

[0105] Step 303A: Determine the weight of the reception delay of each data packet and its adjacent data packets within each segment, and determine the smoothing time of each data packet based on the reception delay of each data packet and its adjacent data packets and the corresponding weight.

[0106] In one exemplary implementation, the reception delay of the data packets of the first segment and the last segment is linearly weighted based on asymmetric weight allocation, and the reception delay of the data packets of the middle segment is linearly weighted based on symmetric weight allocation.

[0107] For example, the weight allocation method for each data packet in the first and last segments can be set to a method in which the weight coefficient positively strengthens the near-end data packet and negatively suppresses the far-end data packet, but the weight allocation method for each data packet in the middle segment is a method in which the weight coefficients are the same.

[0108] The following describes in detail, with reference to embodiments of the present disclosure, the method for calculating the smoothing time of each data packet in the intermediate segment.

[0109] For example, taking the current data packet as the center, select a symmetrical number of adjacent packets before and after it, and calculate the smoothing time by assigning different weights to the reception delay of adjacent data packets and the data packet itself, thereby utilizing the statistical characteristics of adjacent packets to smooth link delay fluctuations.

[0110] In a further exemplary real-time approach, for the current data packet k, the delays of the n preceding and n following adjacent data packets, totaling (2n+1) data packets, are selected, and a weighted average (or simple average) is calculated as the buffer time for the current packet.

[0111] The buffer time for each data packet in the intermediate segment can be determined by: the reception delay of the data packet itself, and the sum of the reception delays of several data packets before its sequence number and the corresponding number of data packets after its sequence number, divided by the total number of data packets involved in the calculation. Wherein, one data packet before the sequence number and one data packet after the sequence number can be selected, which is "three-point smoothing"; of course, two data packets before the sequence number and two data packets after the sequence number can be selected, which is "five-point smoothing"; three data packets before the sequence number and three data packets after the sequence number can be selected, which is "seven-point smoothing", and so on. This embodiment of the disclosure does not limit this.

[0112] Assuming the current message k is the center, and one adjacent message is selected before and after it with sequence numbers k-1, k, and k+1, the corresponding reception delays are ΔT0 = 50ms, ΔT1 = 60ms, and ΔT2 = 70ms, respectively. Then the buffering time for the data packets with sequence numbers k-1, k, and k+1 is (50ms + 60ms + 70ms) / 3 = 60ms.

[0113] Next, the linear weighted confirmation smoothing time of the data packets of the first segment and the last segment based on asymmetric weight allocation in the embodiments of this disclosure will be described.

[0114] First, let me explain how the smoothing time of the first data segment is calculated.

[0115] Based on the positional dependency analysis of data packets within the sliding window, the linear weighting design of the first data packet needs to specifically address the computational constraints under boundary conditions. The application of smoothing algorithms for the middle segment (such as three-point or five-point smoothing) requires that there be a symmetrical number of adjacent packets before and after the target packet (such as one or two packets before and after the middle segment packet), thus forming a complete symmetrical computation window.

[0116] However, when a data packet is located at the beginning of a sliding window (such as the first or first few packets), the number of preceding data packets is insufficient or completely missing, which makes it impossible to fully construct the calculation of the smoothing time of the data packet.

[0117] For such boundary data packets, the linear weighted design of the first packet adopts an asymmetric weight allocation strategy: taking the current first packet as a reference point, it prioritizes the use of its subsequent available near-end packets (one or more adjacent subsequent packets), and highlights the dominant role of near-end packet reception latency on the current buffer time by positively strengthening the weight coefficient (assigning a larger positive weight coefficient); at the same time, it adopts negative suppression for far-end packets (subsequent packets that are far from the data packet at this reference point) (i.e., assigning a smaller weight or a negative weight coefficient), weakening their impact on the smoothing time calculation of the first packet.

[0118] By using the asymmetric distribution of weights, when the preceding data of the first segment of the message is missing, the system dynamically focuses on the limited available subsequent near-end data, avoiding the problem of amplified reception delay fluctuations caused by insufficient data samples, and ensuring that the buffer time calculation at the boundary of the sliding window can still closely reflect the real-time link status.

[0119] In one embodiment, for the first data packet, such as the first data packet or the first two data packets, asymmetric weighting is used for weighted calculation.

[0120] The asymmetric weighting method can be further described as linearly weighting the data packet of the first segment based on an asymmetric weighting method that positively strengthens near-end data packets and negatively suppresses far-end data packets.

[0121] For example, the sequence numbers of the data packets in the current sliding window are: 1, 2, 3, 4, 5, 6, 7;

[0122] For data packet 1, the corresponding reception delays for each data packet are ΔT1, ΔT2, ΔT3, ΔT4, ΔT5, ΔT6 and ΔT7, respectively;

[0123] One way to divide the above data packets is:

[0124] The sequence number of the first data packet is 1, the sequence numbers of the middle data packets are 2-6, and the sequence number of the last data packet is 7.

[0125] The smoothing time of data packet 1 included in the first segment can be calculated as follows:

[0126] T1 缓存 = (3ΔT1+2ΔT2+1ΔT3-ΔT4) / 5, where the weighting coefficients of ΔT1, ΔT2, ΔT3, and ΔT4 are 3 / 5, 2 / 5, 1 / 5, and -1 / 5, respectively.

[0127] The specific method of weighting the first data packet in the sliding window using asymmetric weights shows that the buffering time is adjusted by positively strengthening near-end data packets and negatively suppressing far-end data packets. Taking data packet 1 as an example, its first segment only contains itself (sequence number 1), near-end data packets refer to the subsequent packets that are closer to it (sequence numbers 2 and 3), and far-end data packets are the relatively distant subsequent packets (sequence number 4).

[0128] Positive reinforcement of near-end data packets is manifested by assigning positive weighting coefficients to the reception delays (ΔT1, ΔT2, ΔT3) of sequence numbers 1, 2, and 3, with the weights decreasing with distance (ΔT1 weight 3 / 5, ΔT2 weight 2 / 5, ΔT3 weight 1 / 5), to highlight the reception delay impact of nearby adjacent packets; negative suppression of far-end data packets is manifested by assigning a negative weighting coefficient (-1 / 5) to the reception delay (ΔT4) of sequence number 4, to reduce the potential for outdated or abnormal interference from far-distance packets through subtraction.

[0129] The linear weighted calculation method of asymmetric weight allocation in the above embodiments makes the smoothing time of the first segment more dependent on the real-time latency status of adjacent segments, while suppressing the influence of irrelevant or unstable data at the far end. This allows for more precise dynamic adjustment of the buffer time at the beginning of the sliding window, adapting to the link status changes that the first segment may face in multi-link transmission, reducing latency jitter caused by interference from far-end data, and improving the stability of data transmission.

[0130] Next, the tail segment data packet buffering time will be explained through embodiments of this disclosure.

[0131] When calculating the buffering time of the tail segment data packet based on the linear weighted algorithm, the logic is similar to that of the aforementioned processing method for the first segment data packet.

[0132] As mentioned above, if the sequence number of the data packets in the current sliding window is: 1, 2, 3, 4, 5, 6, 7;

[0133] For data packet 1, the corresponding reception delays for each data packet are ΔT1, ΔT2, ΔT3, ΔT4, ΔT5, ΔT6 and ΔT7, respectively;

[0134] One way to divide the above data packets is:

[0135] The sequence number of the first data packet is 1, the sequence numbers of the middle data packets are 2-6, and the sequence number of the last data packet is 7.

[0136] The smoothing time of data packet 7 included in the tail segment can be calculated as follows:

[0137] T7 缓存 = (3ΔT7+2ΔT6+ΔT5-ΔT4) / 5, where the weighting coefficients of ΔT7, ΔT6, ΔT5, and ΔT4 are 3 / 5, 2 / 5, 1 / 5, and -1 / 5, respectively.

[0138] Based on the positional dependency analysis of data packets within the sliding window, the linear weighted design of the tail data packets needs to specifically address the computational constraints under the boundary conditions at the end of the sliding window. When a data packet is located at the tail of the sliding window (such as the last or several packets after it), the number of subsequent packets is insufficient or completely missing, causing the symmetric computation window required by the traditional symmetric smoothing algorithm to be unable to be fully constructed.

[0139] For such boundary scenarios, the linear weighted design of the tail segment message adopts an asymmetric weight allocation strategy that is symmetrical to that of the first segment: taking the current tail segment message as the endpoint, it prioritizes the use of its preceding available near-end messages (one or more adjacent preceding messages), and highlights the dominant role of the near-end message reception delay on the current buffer time by positively strengthening the weight coefficient (assigning a larger positive weight); at the same time, it adopts negative suppression (assigning a smaller or negative weight) for far-end messages (preceding messages that are far away), weakening their impact on the calculation of the tail segment message buffer time.

[0140] Taking the tail segment data packet 7 as an example, its buffer time is calculated as follows:

[0141] T7 缓存 = (3ΔT7 + 2ΔT6 + ΔT5 - ΔT4) / 5

[0142] Among them, the tail segment message itself (ΔT7) has the highest weight (3 / 5), the adjacent preceding messages ΔT6 (2 / 5) and ΔT5 (1 / 5) have progressively lower weights, while the more distant ΔT4 is given a negative weight (-1 / 5).

[0143] Therefore, by positively reinforcing the latency contribution of near-end preceding messages (ΔT5, ΔT6) and combining this with the reception latency of the tail segment message itself, the system dynamically focuses on the limited available near-end preceding data. Simultaneously, negative weights suppress potential outdated or abnormal latency interference introduced by the far-end preceding message (ΔT4), avoiding buffer time calculation deviations caused by missing subsequent data. In other words, through the asymmetric distribution of weights, even with missing subsequent data in the tail segment message, the system ensures that the buffer time calculation at the sliding window boundary still reflects the real-time status of the near-end link, forming a positionally symmetrical boundary adaptation mechanism with the processing logic of the first segment message.

[0144] On the other hand, when performing step 301, if the number of multiple data packets with consecutive sequence numbers in the sliding window is less than a preset threshold, then step 302B is executed directly, that is, the average reception delay is directly calculated. For example:

[0145] Assuming there are three packets within the sliding window, with reception delays of ΔT1 = 50ms, ΔT2 = 60ms, and ΔT3 = 70ms respectively, and an average of 60ms, then the buffer time for all three packets is set to 60ms. This method simplifies computational complexity and avoids algorithmic complexity caused by data sparsity.

[0146] By using preset threshold branches, the caching strategy is finely adjusted when there is sufficient data packets, and degraded to a robust mean smoothing when there is insufficient data. This dynamic adaptation mechanism is particularly suitable for scenarios where the link status changes frequently during transmission, especially in multi-link aggregation scenarios (such as outdoor mobile live streaming), and can effectively reduce stuttering or screen tearing caused by RTT differences.

[0147] In one example, step 302A can be further divided into a first sub-segment and a second sub-segment of the first segment, and a first sub-segment and a second sub-segment of the last segment; the first sub-segment and the second sub-segment of the first segment are linearly weighted according to different asymmetric weight allocation methods; the first sub-segment and the second sub-segment of the last segment are linearly weighted according to different asymmetric weight allocation methods.

[0148] By further subdividing the first and last segments in step 302A into two sub-segments—namely, the first and second sub-segments of the first segment, and the first and second sub-segments of the last segment—a "five-segment" partitioning structure is formed. This allows for a more refined allocation of the weights of the reception delay, thereby improving the dynamic adaptability and computational accuracy of the smoothing algorithm. A more detailed embodiment will be provided below to illustrate this further, and will not be elaborated upon here.

[0149] In one embodiment of this disclosure, the method further includes periodically scanning the data packets in the sliding window and determining whether the data packets should continue to be cached or not, based on the current scanning time, the reception time of each data packet, and the maximum dwell time of the data packets.

[0150] In other words, the data packets in the sliding window are periodically scanned, according to...

[0151] R = T now -T 接收 -T Max Calculate the R value for each data packet;

[0152] When R≥0, a data packet is sent;

[0153] When R < 0, the data packet remains in the queue;

[0154] Among them, T now T represents the current scan time. 接收 For message reception time, T Max This is the maximum dwell time for data packets.

[0155] Among them, the maximum data packet dwell time T Max Determined based on the type of the data stream;

[0156] In cases where data stream smoothing time is not required, T Max =0;

[0157] If the data stream requires smoothing time, adjustments are made based on at least one of the following: the round-trip time (RTT) of the current communication link, the number of current communication links, and the type of communication link.

[0158] As can be seen, the data packets in the sliding window are dynamically changing. On the one hand, newly added data packets with consecutive sequence numbers are imported into the sliding window from the cache table; on the other hand, each data packet triggers a removal mechanism after reaching its smoothing time. Therefore, according to a preset time interval, the smoothing time for each data packet is determined based on the reception delay of each data packet and its adjacent data packets. By continuously and periodically refreshing the sliding window, the delay compensation parameters are kept synchronized with the real-time status of the packet sequence, thereby adapting to the timing fluctuations during transmission.

[0159] The time period for this rolling calculation is a preset time interval, which can be dynamically adjusted based on at least one of the following: the type of the current data stream, the round-trip time (RTT) of the current communication link, the number of current communication links, and the type of communication link.

[0160] In one embodiment of this disclosure, after caching the data packets sequentially according to the preset sequence number of the data packets, the method further includes: updating the minimum sequence number RecvNextSeq of the data packets to be received, wherein the minimum sequence number of the data packets to be received is the minimum sequence number that makes the currently cached data packets consecutive data packets.

[0161] As mentioned earlier, the minimum sequence number RecvNextSeq of the data packets to be received is used to identify the starting point of consecutive packets in the currently received data stream, ensuring that the sliding window processes data packets in order.

[0162] In other words, RecvNextSeq provides a guarantee of the order of data packets in the buffer. When network node 2 receives data, only consecutive data packet segments starting from the current RecvNextSeq (such as 0-4) can be moved into the sliding window for processing. For example, if RecvNextSeq = 0, but data packet 4 has not arrived, the window will be blocked in the range of 0-4, and even if data packets 5-9 have arrived, they cannot be processed.

[0163] Furthermore, as mentioned above, the sending end may repeatedly send the same message due to link fluctuations (such as sending message 3 multiple times). However, if RecvNextSeq has been updated to sequence number 4, duplicate messages with sequence numbers less than 4 can be directly discarded to avoid redundant processing. Simply put, RecvNextSeq can also filter invalid retransmission requests.

[0164] Furthermore, after caching the data packets sequentially according to their preset sequence numbers, the minimum sequence number RecvNextSeq of the data packets to be received is updated, providing a strong guarantee for the sequential caching and advancement of data packets.

[0165] In embodiments of this disclosure, after retrieving multiple data packets with consecutive sequence numbers and adding them to the sliding window, the method further includes updating the maximum sequence number SmoothMaxSeq of the multiple data packets with consecutive sequence numbers in the current sliding window.

[0166] The maximum sequence number (SmoothMaxSeq) of multiple consecutive data packets is used to define the processing boundary of the current sliding window, ensuring the integrity of smooth calculations and transmission decisions.

[0167] Specifically, the smoothing time within the sliding window needs to be determined based on a fixed range of data packet sequences. SmoothMaxSeq defines the right boundary of the current window to prevent data corruption caused by cross-window calculations. For example, if the window range is 0-4, the five-point smoothing is calculated only for the timestamp differences of these five packets, avoiding data confusion with subsequent packets. Furthermore, by limiting the sliding window range (e.g., sequence numbers 0-4), too many data packets are avoided from being processed simultaneously, reducing memory and computational overhead.

[0168] This embodiment of the disclosure utilizes the correlation of transmission delays between adjacent packets. A smoothing algorithm distributes extreme delay differences caused by link jitter in a single packet across the sequence of adjacent packets. This ensures that the actual buffering time of each packet no longer depends on a fixed threshold but is adaptively adjusted based on real-time link fluctuations. Therefore, it eliminates the accumulation of packet waiting time caused by sudden delay jitter (e.g., when a packet is delayed by 200ms due to a link failure, its waiting time is distributed among adjacent packets), and avoids the shortcomings of fixed buffering times that cannot adapt to dynamic link states (e.g., single-link transmission rate fluctuations or multi-link RTT differences). Ultimately, by dynamically controlling packet dwell time, it improves the continuity of data transmission, effectively ensuring that the data stream is sent continuously, quickly, and timely with a balanced delay rhythm, thus solving many problems caused by delay jitter.

[0169] Example:

[0170] It is understood that the data latency processing method of this disclosure can be applied to fields such as live video streaming.

[0171] With the rapid development of the live video streaming industry, users are no longer satisfied with indoor live streaming. To attract more viewers, users are venturing outdoors for mobile live streaming. In outdoor scenarios, the wireless environment is complex. To ensure video transmission quality, users can use devices such as CPEs (Cyber ​​Premises Equipment) that leverage link aggregation to combine the wireless bandwidth of different network operators. For example, users can insert multiple SIM cards simultaneously, and the aggregation device will combine the bandwidth of multiple operators' SIM cards into a single stream, solving problems such as weak signals, insufficient upload bandwidth, and unstable signals associated with traditional single-channel systems.

[0172] However, in multi-link wireless transmission systems, when multiple links transmit data simultaneously, the varying data volumes and signal quality across links lead to different Time-to-Time (RTT) values ​​between them. In aggregation networks, when a user uses multiple links (composed of multiple different SIM cards and WAN ports) for simultaneous data transmission or real-time video streaming, the user's individual video stream data is segmented into multiple sub-data packets. These sub-data packets are transmitted through multiple links to the aggregation server S, which then sorts them before sending them to the destination server. Due to the different RTT values ​​of the multiple links, the arrival times of the video data sub-data packets at the aggregation server S will also differ. When a video data sub-data packet exceeds the maximum waiting time for the video player, the video will experience stuttering or screen tearing.

[0173] This embodiment is proposed to address the above-mentioned problems.

[0174] Reference Figure 4 Link aggregation requires a client and an aggregation server S. The client typically inserts multiple SIM cards or connects to multiple WAN ports, establishing multiple transmission channels with the aggregation server S by binding the SIM cards and WAN ports. The client captures data packets from connected devices and then transmits these data packets to the aggregation server S through the established transmission channels. Upon receiving the data packets, the aggregation server S sorts and buffers them, and finally sends the captured data stream data packets from the client to the destination server.

[0175] In this example, network node 1 is a client device, and network node 2 is an aggregation server. The data latency processing method of this disclosure embodiment is based on the client device and the aggregation server.

[0176] Reference Figure 5 , Figure 5 This disclosure illustrates a flowchart of how a client device and an aggregation server implement data transmission and interaction, including:

[0177] Step 1: The client establishes a data communication link with the aggregation server S, which is represented as a link tunnel in this embodiment. The client can use various methods to establish a data connection with the aggregation server S. Currently, two main connection methods are used: wireless connection and wired connection.

[0178] Wireless connection methods include SIM card, Wi-Fi, Bluetooth, and satellite; while wired connections directly utilize wired fixed-line networks. The client dynamically establishes tunnel connections with the aggregation server S based on the available connection methods, denoted as Tunnel1, Tunnel2, ..., Tunnel...n .

[0179] Step 2: The client captures user data from the downstream device. When a user is performing a video streaming service, the current continuous data stream is the video data stream F. vedio Similarly, when the customer is only engaged in gaming activities, the current continuous data stream is the gaming data stream F. game The client can perform statistical identification on the captured messages and select the continuous data stream F that the device is currently transmitting.

[0180] The following uses a single video data stream F vedio Let's illustrate with examples.

[0181] The client receives the captured raw video data stream F. vedio Data packet A0, A 1,..., A n Perform custom encapsulation of H, including adding a data stream type field F. Type Information such as stream data label Idx, stream data sequence number Seq, and data CRC checksum is used to distinguish and identify F. Type The Seq message of the Idx stream.

[0182] According to video data stream F vedio Data A0, A1, ..., A n The received data is sequenced using sequence numbers (Seq), and the encapsulated data packets are denoted as P0, P1, ..., P... n .

[0183] Based on the tunnels Tunnel1, Tunnel2, ..., Tunnel actively established by the client in step 1 n The client can select one of them. m A tunnel transmits data, where (1≤m≤n), and the encapsulated data P0, P1, ..., P... n Send to aggregation server S.

[0184] Step 3-1: Aggregator server S aggregates data from tunnels Tunnel1, Tunnel2, ..., Tunnel... n The received data packets (hereinafter referred to as "packets") are sorted according to the sequence number Seq marked in step 2. These received data packets are cached and then stored in the aggregation server. S In the cache table Table.

[0185] When the aggregation server S receives data from the tunnel, it encapsulates H based on the information carried in the message in step 2 to extract the following information: data stream type field F. Type The data stream identifier (Idx), sequence number (Seq), and CRC checksum are specified. Aggregator server S first performs a CRC check on the packet data again. If the CRC checksum calculated by aggregation server S does not match the CRC checksum in the packet encapsulation H, the packet is discarded. If they match, the data stream type field (F) is used to determine the correct data stream type. Type Given the stream data label Idx, query whether the cache table Table exists in the aggregation server S. If the cache table Table does not exist, the aggregation server S creates and initializes the field F belonging to this stream type. Type The cache table T and sliding window W contain the stream data label Idx. After the aggregation server S initializes the cache table Table, there are no message reception success flags R in the cache table Table by default.

[0186] To prevent the aggregation server S from receiving duplicate and expired messages, the aggregation server S needs to perform an existence check on the received messages. When the aggregation server S receives a message from the tunnel, it needs to determine its data stream type based on the data stream type field F. Type Using the data stream identifier Idx, locate the cache table Table belonging to that data stream; then, check if the message sequence number Seq exists in the cache table Table as a successful reception flag R. If the flag R for that sequence number already exists, discard the message and do not store it in the cache table Table. If the flag R does not exist in the cache table, compare it with RecvNextSeq from step 5. If the message sequence number Seq is less than RecvNextSeq, discard the message and do not store it in the cache table Table; otherwise, save the message with that Seq and mark it with R in the cache table Table.

[0187] Step 3-2: When the aggregation server S successfully receives messages P0, P1, ..., P n Subsequently, the aggregation server S records the packets P0, P1, ..., P at this time. n The received timestamp, denoted as T. R1 ,T R2 ,...,T Rn .

[0188] Because messages P0, P1, ..., P n Data is transmitted across different links, and the RTT (Round-Trip Time) varies between these links. This causes the aggregation server S to receive packets P0, P1, ..., P... n The timing may vary, and the messages received by the aggregation server S may be out of order or lost.

[0189] Step 4: When a tunnel suddenly disconnects (when a user inserts or removes a SIM card or network cable) or the link latency RTT is large (when the wireless signal is weak or the device signal is poor), the aggregation server S can detect this by calculating the timeout period for receiving messages from the client. When not transmitting user data, the client's link tunnel can periodically send heartbeat messages to the aggregation server S using that tunnel. The aggregation server S can detect the status of the link tunnel by calculating how long it takes to receive a message from that tunnel. The aggregation server S will proactively initiate a retransmission request for data transmitted on the disconnected link, ensuring that no data is lost. When using aggregated link tunnels to transmit data, the disconnection of some link tunnels or signal interference (SIM card hot-swapping or wireless signal attenuation, etc.) will not affect the overall data transmission of the client, thus increasing the stability and robustness of the transmission system.

[0190] Because the client transmits data in the order of P0, P1, ..., P... n Data is added to the link tunnels Tunnel1, Tunnel2, ..., Tunnel in the following order. n Sending data via (one or more tunnels can be selected), and due to the various links of the client's tunnels (Tunnel1, Tunnel2, ..., Tunnel...), the data is transmitted. n The RTT (Round-Trip Time) differs for each link during data transmission, leading to out-of-order or lost packets received by the aggregation server S from these tunnels. To address the possibility of packet loss or timeout, it is necessary to periodically poll and check the corresponding cache table (Table) for the data stream.

[0191] Suppose that the aggregation server S can adjust the data stream type F. Type The current tunnel link RTT, the total number of tunnel links, and the link type (wireless SIM card, Wi-Fi, Bluetooth, satellite, or wired fixed network) are used as a parameter set Q to dynamically update the corresponding data stream type F. Type The maximum timeout is T DelayMaxSuppose that within a certain time period, the client sends data streams ranging from P0 to P10, where packets with odd sequence numbers time out. When the aggregation server S polls and checks the cache table Table belonging to this data stream, it will find that packets with even sequence numbers P0, P2, P4, P8, and P10 have a receive flag R, while packets with odd sequence numbers P1, P3, P5, P7, and P9 do not have a corresponding receive flag R. The aggregation server S needs to record the timestamps T for packets P1, P3, P5, P7, and P9 that were not successfully received at this time. Loss1 ,T Loss3 ,T Loss5 ,T Loss7 ,T Loss9 Let set G1 be the set of messages that the aggregation server S has not yet received.

[0192] When aggregation server S performs its next polling (assuming the message with the largest sequence number transmitted by the client for this data stream is still P10), aggregation server S checks again whether there is a receive flag R in the set G1. If there is a receive flag R, the corresponding message is removed from G1, and the current timestamp is obtained and denoted as T. Now Update the set of unreceived messages to G2. Use the current timestamp T. Now Subtract the timestamps T of messages that were not successfully received in set G2 Loss Thus, the latency T of the unreceived messages in set G2 is obtained. Delay When T Delay More than T DelayMax When the timeout occurs, the aggregation server S sends a retransmission request R to the client for the timeout messages in set G2. After receiving the retransmission request R, the client retransmits the corresponding message from set G2 to the aggregation server S.

[0193] Step 5: When the aggregation server S receives a message, it needs to update the minimum sequence number RecvNextSeq of the consecutive messages in the corresponding data stream Flow.

[0194] Suppose that the client (Client) and the aggregation server (S) agree that the minimum sequence number of a message is 0 and the maximum is 0xFFFFFFFF. Assume that when the client starts sending data from sequence number 0, if the aggregation server (S) receives messages P1, P2, P3, P5, and P6 at the current time, and at time T, the aggregation server (S) has not received message P0, then the aggregation server (S) cannot update RecvNextSeq. When the aggregation server (S) receives message P0, it starts from P0 and finds another message with a non-contiguous sequence number, namely message P4 with sequence number 4. At this time, the aggregation server (S) updates RecvNextSeq to 4, retrieves messages P0 to P3 from the cache table Table, adds them to the sliding window W, and updates SmoothMaxSeq. In multi-link transmission, multiple data streams use their own independent minimum sequence numbers RecvNextSeq and SmoothMaxSeq, which helps to effectively filter packets that are repeatedly requested for transmission in step 4 by multiple identical retransmission requests R. Furthermore, based on the minimum sequence number RecvNextSeq as the starting Seq, the sequence number Seq and latency T of unreceived packets are searched and updated in the cache table Table in an incrementing manner. Delay .

[0195] If the cache table contains a sequence of consecutive sequence numbers starting from the lowest received sequence number, let's assume the consecutive sequence numbers of these packets are P0, P1, ..., P... n Then it is necessary to separate the consecutive sequence numbers of this segment of messages P0 to P... n Retrieve the data from the buffer table Table and add it to the sliding window W. Update the maximum sequence number of smoothed packets in the current sliding window W to SmoothMaxSeq. Finally, clear the receive completion flags R0, R1, ..., R from the buffer table Table. n .

[0196] Step 6: Since the messages are sent from the client to the aggregation server S through different tunnels, in order to easily calculate the buffering time of each message in the aggregation server S, it is necessary to determine the transmission time of each message in the tunnel within the sliding window. This can be reflected as the time when each message is received by the aggregation server relative to the unified reference time T. Base The latency. In this embodiment, the startup time of the aggregation server S is used as T. Base Time. Record the reception delay for each message as... T Smooth Taking message P0 as an example, the reception delay of message P0 can be obtained using the following formula:

[0197] T Smooth 0 = T R0-T Base

[0198] Similarly, this formula can be used to obtain the reception delay T for other consecutive messages in this segment. Smooth 0,T Smooth 1,...,T SmoothN .

[0199] Step 7: Aggregation server S performs aggregation at certain time intervals T. loop For the continuous segments of packets P0, P1, ..., P in the sliding window W of the data stream corresponding to step 3-1 n Linear smoothing calculations are performed to smooth out and eliminate jitter caused by RTT differences between different link tunnels.

[0200] Wherein, the scan time interval T loop According to the corresponding data stream type F Type Adjustments are made; when the data stream is video data F vedio Or game data F game To ensure the continuity of the video data stream and the smoothness of the game, the scanning time interval T is... loop It must be less than the time interval for scanning webpage data.

[0201] Meanwhile, the aggregation server S can be dynamically adjusted according to the parameter Q in step 4. When a certain tunnel transmission experiences significant jitter or abnormality, the scanning time interval T of the corresponding data stream can be appropriately reduced. loop ;

[0202] When the transmission status of the link tunnel remains stable, the original scan interval T is maintained. loop Unchanged. For continuously transmitted video packets, the aggregation server S uses a five-point linear smoothing algorithm for smoothing calculations.

[0203] Step 7-1: Determine the total number of smoothed packets in the sliding window W, LinerNum. Since Step 5 updated the maximum sequence number of smoothed packets in W, SmoothMaxSeq, let the minimum sequence number of the packets currently added to the sliding window W from the cache table Table be SmoothMinSeq. Use the following formula to determine whether to perform five-point linear smoothing calculation:

[0204] LinerNum=SmoothMaxSeq-SmoothMinSeq

[0205] When LinerNum is less than 5, five-point linear smoothing calculation is not performed; only the average calculation of several messages is required.

[0206] Assume that SmoothMinSeq is at this timen SmoothMaxSeq is q, where 1 < qn < 5, and n < q; then the message P n ~P q The formula for calculating the smoothing time is as follows:

[0207]

[0208] Conversely, if LinerNum is greater than or equal to 5, then perform a five-point linear smoothing calculation and proceed to step 7-2.

[0209] Step 7-2: Five-point linear smoothing calculation refreshes the buffer time from message SmoothMinSeq to message SmoothMaxSeq. This involves calculating the smoothing time for messages with current LinearNum and adjusting the buffer time accordingly. The process is as follows:

[0210] The message buffer times within the range of SmoothMinSeq to SmoothMaxSeq are extracted sequentially from the sliding window W and added to the calculation set C. The elements of set C are then as follows:

[0211] C={T SmoothMinSeq ,T Sm oothMinSeq+1,...,T SmoothMaxSeq}

[0212] At this time, T SmoothMinSeq To T SmoothMaxSeq The corresponding index in set C is 0 to LinerNum.

[0213] The formula for calculating the smoothing time of the first message, i.e., the message with sequence number SmoothMinS eq, is as follows:

[0214] P SmoothMinSeq = (3C0 + 2C1 + C2 - C3) / 5

[0215] The second message, namely the one with sequence number SmoothMinSeq+1, uses the following formula for calculating the smoothing time:

[0216] P SmoothMinSeq+1 =(4C0+3C1+2C2+C3) / 10

[0217] Message P (segment 3) SmoothMinSeq+2 ~P SmoothMaxSeq-3 The smoothing time is calculated as follows. Let the intermediate segment message P... SmoothMinSeq+2 ~P SmoothMaxSeq-2 The starting sequence number is i. The buffer time for each message within this range is calculated as follows:

[0218] P i=(C i-2 +C i-1 +C i +C i+1 +C i+2 ) / 5

[0219] The formula for calculating the SmoothMaxSeq-1 smoothing time in the fourth message segment is as follows:

[0220] P SmoothMaxseq-1 =(4C LinerNum-1 +3C LinerNum-2 +2C LinerNum-3 +C LinerNum-4 ) / 10

[0221] The formula for calculating the SmoothMaxSeq smoothing time in the fifth message segment is as follows:

[0222] P SmoothMaxs eq =(3C LinerNum-1 +2C LinerNum-2 +C LinerNum-3 -C LinerNum-5 ) / 5

[0223] The message P can be obtained through the above calculations. SmoothMinSeq To P SmoothMaxSeq The cache time will be used to re-store the calculated time result into message T. SmoothMinSeq To T SmoothMaxSeq middle.

[0224] Step 7-3: Aggregation server S calculates the buffering time of all packets in the sliding window W of the current data stream F, and determines the packet buffering time T after the calculation in step 7-2. Smooth Does it time out? Assume the maximum buffer time (the maximum smooth buffer time for a packet in aggregation server S) is T. SmoothMaxTime The current time is T. Now .

[0225] Where T SmoothMaxT ime Adjustments can be made based on the data stream type F. When certain data streams do not require smoothing calculations (ICMP messages or other user-configured data streams), the largest consecutive segment can be directly sent out in step 5 without adding it to the corresponding sliding window W. When the data stream is a video data stream, to ensure the smoothness and integrity of the video, T... SmoothMaxTime The parameter Q can be dynamically adjusted based on the parameter in step 4. When the link condition is poor, T can be appropriately increased. SmoothMaxTime When the link is in good condition, maintain the default T. SmoothMaxT imeThat's it. The formula for determining whether data can be sent is as follows:

[0226] R = T Now -T R -T SmoothMaxTime

[0227] When R≥0, it means that the received message has been cached in the aggregation server S for more than T. SmoothMaxTime The message has met the sending criteria and needs to be sent immediately.

[0228] When R < 0, it means that the message does not meet the sending conditions and needs to continue to be cached in the sliding window W, waiting for the next polling to recalculate and refresh the cache time.

[0229] In addition, after step 7, the process includes: checking the messages in the sliding window W and updating SmoothMinSeq. If there are messages Pn to Pm in the sliding window W that meet the transmission criteria, then messages Pn to Pm need to be removed from the sliding window W and sent, and then SmoothMinSeq is updated to m+1.

[0230] Since data is transmitted and sent through multiple links, the RTT of each link will be as follows.

[0231] When the RTT of each link is not significantly different, the buffering time of consecutive packets within a certain period is calculated using step 7-2. Assuming the consecutive packets are P0 to P9, and the tunnel transmission times for packets P0 to P9 are 90ms, 50ms, 60ms, 80ms, 70ms, 90ms, 50ms, 60ms, 80ms, and 70ms respectively, if the aggregation server S sends packets with a fixed buffering time (assuming a buffering time of 100ms), the transmission times for packets P0 to P10 are as follows:

[0232]

[0233] 2. When there is a large difference in the RTT of the link, the buffer time of consecutive packets within a certain period is calculated using step 7-2. Assuming the consecutive packets are P0 to P9, and the tunnel transmission times for packets P0 to P9 are 90ms, 50ms, 60ms, 80ms, 200ms, 90ms, 50ms, 60ms, 80ms, and 70ms respectively, if the aggregation server S sends packets with a fixed buffer time (assuming a buffer time of 100ms), the transmission times for packets P0 to P10 are as follows:

[0234]

[0235]

[0236] Message P4 took up to 200ms during transmission. After smoothing calculation, it can be found that message P4 distributed the link time evenly among other messages. Among them, data message P0 was delayed by 30ms compared to before smoothing, while message P1 was advanced by 21ms compared to before smoothing, and messages P2 to P5 were advanced by 4ms.

[0237] In a multi-link system, after using a smoothing algorithm, the aggregation server S distributes the latency of packets with high latency from one or more links evenly across other packets. Although the aggregation server S specifies a maximum buffer time, after smoothing calculation, the buffer time of data within the aggregation server S is dynamically adjusted based on the latency of subsequent packets in the links, so that data is sent out from the aggregation server S in a smoother manner.

[0238] The table data shows that when the RTT (Round-Trip Time) in the system transmission tunnel is relatively uniform, the smoothing calculation results in less fluctuation compared to the original fixed buffer time, leading to more timely message delivery and further ensuring the stability and continuity of the data stream. In video stream data transmission, this translates to smoother video playback. This method not only improves performance when RTT fluctuations in the tunnel are small, but also eliminates jitter caused by data transmission when RTT fluctuations are significant, thus ensuring that the data stream is not affected by poor link performance.

[0239] As can be seen from this embodiment, in a multi-link transmission system, compared with the method of simply using a buffer to cache data, the embodiment of this disclosure can dynamically adjust according to the link latency, update the data caching time in the buffer, reduce the latency jitter of video data packets caused by excessive link differences, and thus optimize the video playback effect.

[0240] Secondly, referring to Figure 6 This disclosure provides an electronic device, which includes a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements any of the data delay processing methods of this disclosure.

[0241] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the data delay processing methods of embodiments of this disclosure.

[0242] Fourthly, embodiments of this disclosure provide a computer program product, which includes a computer program that, when executed by a processor, implements any of the data latency processing methods of embodiments of this disclosure.

[0243] Among them, the processor is a device with data processing capabilities, including but not limited to the central processing unit (CPU); the memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, enabling information exchange between the memory and the processor, including but not limited to the data bus (Bus).

[0244] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0245] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.

[0246] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technique for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only optical disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cartridges, magnetic tapes, disk storage or other magnetic storage; and any other media that can be used to store desired information and can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0247] This disclosure has disclosed exemplary embodiments, and although specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for processing data latency, the method comprising: Receive data packets from the data stream transmitted via the communication link, and cache the data packets sequentially according to the preset sequence number of each data packet; When the cached data packets include multiple data packets with consecutive sequence numbers, retrieve the multiple data packets with consecutive sequence numbers and add them to the sliding window; Based on the reception time of each data packet, the reception delay of each data packet in the sliding window is determined; Based on the reception delay of each data packet and its adjacent data packets, the smoothing time of each data packet is determined, and the buffering time of each data packet is adjusted accordingly based on the smoothing time.

2. The method according to claim 1, wherein, The process of determining the smoothing time for each data packet based on the reception delay of each data packet and its adjacent data packets includes: Determine the weight of the reception delay for each data packet and its adjacent data packets; The smoothing time for each data packet is determined by linear weighting calculation based on the reception delay and corresponding weight of each data packet and its adjacent data packets. The weight of the reception delay of each data packet is determined based on the number of consecutive data packets with sequence numbers in the sliding window, and the position of each data packet in the sliding window.

3. The method according to claim 2, wherein, The process of determining the smoothing time of each data packet by performing a linear weighted calculation based on the reception delay and corresponding weight of each data packet and its adjacent data packets includes: If the number of consecutive data packets with consecutive sequence numbers in the sliding window is not less than a preset threshold, the consecutive data packets with consecutive sequence numbers in the sliding window are divided into multiple segments. Determine the weight of the reception delay of each data packet and its adjacent data packets within each segment, and determine the smoothing time of each data packet based on the reception delay of each data packet and its adjacent data packets and the corresponding weight. and / or If the number of consecutive data packets with the same sequence number in the sliding window is less than a preset threshold, the average reception delay of the multiple data packets is determined as the smoothing time corresponding to each data packet.

4. The method according to claim 3, wherein, The step of dividing multiple data packets with consecutive sequence numbers in the sliding window into multiple segments includes: Divide multiple data packets with consecutive sequence numbers in the sliding window into a first segment, a middle segment, and a last segment; The weight allocation method for each data packet in the first segment and the last segment is a method in which the weight coefficient positively strengthens the near-end data packet and negatively suppresses the far-end data packet. The weight allocation method for each data packet in the intermediate segment is an allocation method with the same weight coefficient.

5. The method according to claim 1, wherein, The process of determining the smoothing time of each data packet based on the reception delay of each data packet and its adjacent data packets includes: According to a preset time interval, the smoothing time of each data packet is determined based on the reception delay of each data packet and its adjacent data packets. The preset time interval is adjusted based on at least one of the following: the type of the data stream, the round-trip time (RTT) of the current communication link, the number of current communication links, and the type of communication link.

6. The method according to claim 1, wherein, The method further includes: The data packets in the sliding window are periodically scanned, and the data packets are determined to continue to be cached or not based on the current scan time, the reception time of each data packet, and the maximum dwell time of the data packets.

7. The method according to claim 6, wherein, The maximum dwell time of the data packet is determined based on the type of the data stream; When the data stream does not require a smoothing time, the maximum dwell time of the data packet is zero; If the data stream requires smoothing time, adjustments are made based on at least one of the following: the round-trip time (RTT) of the current communication link, the number of current communication links, and the type of communication link.

8. The method according to any one of claims 1-7, wherein, The method is applied to an aggregation server; The data packets received from the data streams transmitted through the communication links include: the aggregation server receiving data packets from the data streams transmitted by the client devices through multiple communication links; After adjusting the cache time of each data packet according to the smoothing time, the aggregation server sends the data packet to the destination server after the storage time of each data packet meets the adjusted cache time.

9. The method according to claim 1, wherein, The step of sequentially caching the data packets according to their preset sequence numbers includes: The data packets transmitted through the communication link are filtered; Each data packet is cached sequentially according to its preset sequence number after passing the filtering. The filtering includes at least one of the following: filtering based on cyclic redundancy check, filtering based on duplicate message detection, and filtering based on expired message detection.

10. The method according to claim 1, wherein, After the step of sequentially caching the data packets according to their preset sequence numbers, the method further includes: If a missing data packet that causes the sequence number of the data packet to be interrupted is identified in the cached data packets, and a retransmission request is sent if the delay time of the missing data packet is greater than the maximum timeout time; The maximum timeout is adjusted based on at least one of the following: the type of the data stream, the RTT of the current communication link, the number of current communication links, and the type of the communication link.

11. The method according to claim 10, wherein, The step of confirming the missing data packets in the cached data packets that cause the data packet sequence number to be interrupted, and sending a retransmission request if the delay time of the missing data packet is greater than the maximum timeout time, includes: The currently cached data packets are polled at the first moment. Based on the data packet reception flag, the unreceived data packets in the data stream are identified to form a first packet set. The first unreceived timestamp of each data packet in the first packet set is recorded. At the second moment, the currently cached data packets are polled. When a data packet in the first packet set has a packet reception mark, the data packet is deleted from the first packet set, the first packet set is updated to the second packet set, and the second unreceived timestamp of each data packet in the second packet set is recorded. Based on the first and second unreceived timestamps of each data packet, the latency of each data packet is determined, and if the latency is greater than the maximum timeout, the retransmission request is sent.

12. The method according to claim 1, wherein After caching the data packets sequentially according to their preset sequence numbers, the method further includes: Update the minimum sequence number of the data packets to be received, wherein the minimum sequence number of the data packets to be received is the minimum sequence number that makes the currently cached data packets consecutive data packets; Furthermore, after retrieving and adding multiple data packets with consecutive sequence numbers to the sliding window, the method further includes updating the maximum sequence number of the multiple data packets with consecutive sequence numbers in the current sliding window.

13. An electronic device comprising a memory and a processor; the memory storing a computer program executable by the processor, wherein the computer program, when executed by the processor, implements the data delay processing method according to any one of claims 1 to 12.

14. A computer program product comprising a computer program that, when executed by a processor, implements the data delay processing method according to any one of claims 1 to 12.