Data stream transmission method and apparatus

WO2026199527A1PCT designated stage Publication Date: 2026-10-01NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/085931
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2026-10-01

Smart Images

  • Figure CN2025085931_01102026_PF_FP_ABST
    Figure CN2025085931_01102026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a data stream transmission method and apparatus. The method comprises: when a currently received data packet is not the initial data packet of a data stream, on the basis of an arrival time of the currently received data packet and an arrival time of a previous data packet in the same data stream, determining a current data packet arrival time interval; if the current data packet arrival time interval is less than a dynamic time interval threshold, determining that the currently received data packet and the previous data packet in the same data stream belong to a same flowlet, and forwarding the currently received data packet on the basis of a forwarding path of the flowlet; and if the current data packet arrival time interval is greater than or equal to the dynamic time interval threshold, determining that the currently received data packet belongs to a new flowlet, and forwarding the currently received data packet on the basis of a forwarding path determined for the new flowlet. The embodiments of the present application can improve the flexibility and reasonableness of flowlet partitioning.
Need to check novelty before this filing date? Find Prior Art

Description

Data stream transmission methods and devices Technical Field

[0001] This application relates to network communication technology, and in particular to data stream transmission methods and devices. Background Technology

[0002] Link load balancing technology is widely used in wide area networks and data center networks to improve the efficiency of data center link bandwidth utilization, enhance the reliability of data transmission, and reduce data transmission latency.

[0003] In modern data center networks, fat-tree or leaf-spine network architectures are commonly used to provide multiple equivalent network transmission paths between different server nodes. In this context, distributing network traffic across multiple network transmission paths using appropriate load balancing algorithms or strategies is crucial for achieving efficient utilization of link bandwidth and reliable data transmission.

[0004] In recent years, load balancing based on sub-flows has been proposed. Its core idea is to take advantage of the discontinuous nature of the flow in time to divide burst packets in the flow into sub-flows. As long as the interval between these burst sub-flows is large enough, greater than the maximum delay difference between paths, two burst sub-flows can be forwarded along different paths without reordering the packets. Based on this characteristic, many sub-flow-based technical solutions have emerged. Summary of the Invention

[0005] This application provides a data stream transmission method and device to reduce congestion and out-of-order data streams caused by unreasonable sub-data stream division.

[0006] This application provides a data stream transmission method, including:

[0007] If the currently received data packet is not the first data packet in the data stream, the arrival time interval of the current data packet is determined based on the arrival time of the currently received data packet and the arrival time of the previous data packet in the same data stream.

[0008] If the arrival time interval of the current data packet is less than the dynamic time interval threshold, it is determined that the currently received data packet belongs to the same sub-data stream as the previous data packet in the same data stream, and the currently received data packet is forwarded according to the forwarding path of the sub-data stream; wherein, for any data stream, the dynamic time interval threshold is determined based on the average arrival time interval of the historical data packets of the data stream.

[0009] If the arrival time interval of the current data packet is greater than or equal to the dynamic time interval threshold, it is determined that the currently received data packet belongs to a new sub-data stream, a forwarding path is determined for the new sub-data stream, and the currently received data packet is forwarded according to the determined forwarding path.

[0010] This application also provides an electronic device. The electronic device includes: a processor and a machine-readable storage medium; the machine-readable storage medium stores machine-executable instructions executable by the processor; the processor is used to execute the machine-executable instructions to implement the steps of the disclosed method.

[0011] As can be seen from the above technical solutions, this embodiment dynamically determines the time interval threshold for dividing the data stream into sub-data streams based on the average arrival time interval of historical data packets in the data stream, eliminating the need to set a fixed time interval threshold. This improves the flexibility and rationality of sub-data stream division and provides technical support for reducing congestion and out-of-order data streams caused by unreasonable sub-data stream division. Attached Figure Description

[0012] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0013] Figure 1 is a flowchart of the data stream transmission method provided in an embodiment of this application;

[0014] Figure 2 is a schematic diagram of dividing data packets in inbound traffic into different data streams according to an embodiment of this application;

[0015] Figure 3 is a schematic diagram of the implementation process for determining the forwarding path for a sub-data stream according to an embodiment of this application;

[0016] Figure 4 is a schematic diagram of the implementation process for determining the queuing time of each exit queue according to an embodiment of this application;

[0017] Figure 5 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application. Detailed Implementation

[0018] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0019] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0020] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions provided in the embodiments of this application are described below in conjunction with the accompanying drawings.

[0021] The data stream transmission method provided in the embodiments of this application is described below with reference to the accompanying drawings:

[0022] Referring to Figure 1, Figure 1 is a flowchart of a data stream transmission method provided in an embodiment of this application. This method can be applied to network devices. For example, the network device may include a switch, router, firewall, or load balancer, etc. As shown in Figure 1, the process may include the following steps:

[0023] Step 101: If the currently received data packet is not the first data packet in the data stream, determine the arrival time interval of the current data packet based on the arrival time of the currently received data packet and the arrival time of the previous data packet in the same data stream.

[0024] In this embodiment, an adaptive threshold based on the time interval between data packets in the same data stream is used to divide the data stream into sub-data streams, thereby improving the flexibility and rationality of sub-data stream division.

[0025] For example, for any data stream, a dynamic time interval threshold can be determined based on the average arrival time interval of historical data packets in that data stream.

[0026] In one example, for any data stream, the dynamic time interval threshold is positively correlated with the average arrival time interval of the historical data packets of that data stream. That is, the larger the average arrival time interval of the historical data packets of that data stream, the larger the dynamic time interval threshold; the smaller the average arrival time interval of the historical data packets of that data stream, the smaller the dynamic time interval threshold.

[0027] If the currently received data packet is not the first data packet in the data stream, the arrival time interval of the current data packet can be determined based on the arrival time of the currently received data packet and the arrival time of the previous data packet in the same data stream, and the arrival time interval of the current data packet can be compared with the current dynamic time interval threshold of the data stream.

[0028] It should be noted that, in this embodiment of the application, for the first data packet of the data stream, since there is currently no sub-data stream of the data stream, the data packet is automatically determined to belong to the first sub-data stream of the data stream.

[0029] Furthermore, for the second data packet in the data stream, since the current number of historical data packets is 1, the arrival time interval of the historical data packets cannot be calculated. In this case, the arrival time interval of the historical data packets can be defaulted to 0, so that the second data packet will default to belonging to the same sub-data stream as the first data packet.

[0030] In this embodiment, the data stream to which the data packet belongs can be determined based on the metadata information of the data packet, thereby dividing the data packets in the ingress traffic into different data streams, as shown in Figure 2.

[0031] For example, the metadata information of a data packet is data that describes the characteristics of the data packet payload, such as quintuple information.

[0032] In one example, the hash value of the packet metadata is calculated, and the data is divided into different streams based on the hash value.

[0033] To avoid hash polarization, random values ​​can be introduced when calculating hash values.

[0034] Step 102: If the arrival time interval of the current data packet is less than the dynamic time interval threshold, determine that the currently received data packet belongs to the same sub-data stream as the previous data packet in the same data stream, and forward the currently received data packet according to the forwarding path of the sub-data stream; wherein, for any data stream, the dynamic time interval threshold is determined based on the average arrival time interval of the historical data packets of the data stream.

[0035] In this embodiment, if the arrival time interval of the current data packet is determined to be less than the current dynamic time interval threshold, it can be determined that the currently received data packet belongs to the same sub-data stream as the previous data packet in the data stream. In this case, the currently received data packet can be forwarded according to the forwarding path of the sub-data stream.

[0036] Step 103: If the arrival time interval of the current data packet is greater than or equal to the dynamic time interval threshold, determine that the currently received data packet belongs to a new sub-data stream, determine a forwarding path for the new sub-data stream, and forward the currently received data packet according to the determined forwarding path.

[0037] In this embodiment, if the arrival time interval of the current data packet is determined to be greater than or equal to the current dynamic time interval threshold, the currently received data packet can be divided into a new sub-data stream.

[0038] In this case, a forwarding path can be determined for the new sub-data stream, and the currently received data packets can be forwarded according to the determined forwarding path.

[0039] It should be noted that, when the sub-data stream to which the currently received data packet belongs is determined based on the current data packet arrival time interval and the current dynamic time threshold interval of the data stream to which the currently received data packet belongs, the current dynamic time threshold interval of that data stream can be updated based on the current data packet arrival time interval.

[0040] The method shown in Figure 1 determines the dynamic time interval threshold based on the average arrival time interval of historical data packets in the data stream. For non-first data packets in the currently received data stream, the arrival time interval of the current data packet can be determined based on the arrival time of the currently received data packet and the arrival time interval of the previous data packet in the same data stream. Based on the comparison between the arrival time interval of the current data packet and the dynamic time interval threshold, it is determined whether the currently received data packet belongs to the same sub-data stream as the previous data packet in the same data stream, or whether the currently received data packet belongs to a new sub-data stream. That is, the time interval threshold for sub-data stream division is dynamically determined based on the average arrival time interval of historical data packets in the data stream, eliminating the need to set a fixed time interval threshold. This improves the flexibility and rationality of sub-data stream division and provides technical support for reducing congestion and out-of-order data streams caused by unreasonable sub-data stream division.

[0041] This completes the process shown in Figure 1.

[0042] The method for determining the dynamic time interval threshold is described below:

[0043] In this embodiment, to reduce computational load while improving the reliability of the determined dynamic time interval threshold, a threshold value for the number of historical data packets (denoted as N0) can be set, where N0 > 1. When the amount of historical data packets is less than N0, the dynamic time interval threshold can be determined based on the average arrival time interval of all historical data packets to improve the reliability of the dynamic time interval threshold; when the number of historical data packets is greater than or equal to N0, the dynamic time interval threshold can be determined based on the average arrival time interval of the latest N0 historical data packets of the data stream to reduce computational load.

[0044] In this embodiment, determining the dynamic time interval threshold can include at least two stages:

[0045] Phase 1, Initial Processing of the Flow: In this phase, not enough data packets have been received to form a dynamic time interval threshold; that is, the number of received data packets is less than the number of historical data packets N0 required to set the dynamic time interval threshold. In this case, the initial value of the dynamic time interval threshold can be constructed based on the existing number of historical data packets.

[0046] Phase Two: Steady-State Processing of the Flow: In this phase, the number of received data packets is sufficient, exceeding the number of historical data packets N0 required to set the sliding dynamic time interval threshold. In this case, the dynamic time interval threshold can be determined based on the average arrival time interval of the latest N0 historical data packets.

[0047] Accordingly, in this embodiment, for any data stream, if the number of historical data packets in the data stream is less than N0, the dynamic time interval threshold is determined based on the average arrival time interval of all historical data packets in the data stream.

[0048] If the number of historical data packets in the data stream is greater than or equal to N0, the dynamic time interval threshold is determined based on the average arrival time interval of the latest N0 historical data packets in the data stream.

[0049] For example, the value of N0 can be set according to the traffic characteristics of the application scenario.

[0050] For example, in scenarios where short-term bursts of traffic dominate, the value of N0 can be set relatively small. For instance, the value range can be 8 to 20.

[0051] For scenarios with relatively stable traffic, the value of N0 can be set relatively large. For example, the value range can be 20 to 40.

[0052] In this embodiment, in order to achieve sub-data stream partitioning, for any data stream, if the number of historical data packets in the data stream is less than N0, the arrival time of the previous data packet, the number of historical data packets, and the average arrival time interval of all historical data packets can be recorded.

[0053] If the number of historical data packets in the data stream is greater than or equal to N0, the arrival time of the previous data packet and the average arrival time interval of the latest N0 historical data packets can be recorded.

[0054] In the case where the currently received data packet is divided into sub-data streams based on the recorded information, the arrival time of the previous data packet and the average arrival time interval of the historical data packets can be updated based on the arrival time of the currently received data packet, the arrival time of the previous data packet, and the average arrival time interval of the historical data packets.

[0055] For example, if the currently received data packet is divided into sub-data streams based on the recorded information above, the arrival time of the previous data packet can be updated to the arrival time of the currently received data packet.

[0056] For example, suppose the arrival time of the currently received data packet is t. A The arrival time of the previous data packet recorded is t. B Then the recorded t B The value is updated to t A The value of .

[0057] Furthermore, if the number of historical data packets is less than N0, assume that the average arrival time interval of the currently recorded historical data packets is T. avr If the number of historical data packets is N1 (N1 < N0), then the average arrival time interval of the updated historical data packets is:

[0058] If the number of historical data packets is greater than or equal to N0, assume that the average arrival time interval of the currently recorded historical data packets is T. avr If the arrival time interval between the (N0-1)th and N0th historical data packets in the latest N0 historical data packets, sorted by arrival time from latest to earliest, is ΔT, then the average arrival time interval of the updated historical data packets is:

[0059] That is, if the number of historical data packets is greater than or equal to N0, it is also necessary to record the arrival time interval of the N0-1th historical data packet and the N0th historical data packet in the latest N0 historical data packets, sorted by arrival time from last to first.

[0060] In one example, to improve the efficiency of updating the average arrival time interval of historical data packets, reduce the amount of information that needs to be recorded, and reduce memory consumption, when the number of historical data packets in the data stream is greater than N0, the average arrival time interval of the latest N0 historical data packets of the data stream can be determined in the following way:

[0061] Among them, T avr2 T is the average arrival time interval of the latest N0 historical data packets of this data stream. avr1 t is the average arrival time interval of the most recent N0 historical data packets of this data stream, as determined in the last analysis. A t represents the arrival time of the latest historical data packet in this data stream. B This represents the arrival time of the next newest historical data packet in this data stream.

[0062] In one example, for any data stream, if the number of historical data packets of the latest sub-data stream is less than N0, the dynamic time interval threshold is determined based on the average arrival time interval of all historical data packets of the latest sub-data stream.

[0063] If the number of historical data packets of the latest sub-data stream of the data stream is greater than or equal to N0, the dynamic time interval threshold is determined based on the average arrival time interval of the latest N0 historical data packets of the latest sub-data stream.

[0064] For example, to avoid the dynamic time interval threshold suddenly increasing due to an excessively large arrival time interval between the first data packet of a new sub-data stream and the last data packet of the previous sub-data stream, which in turn affects the rationality of sub-data stream division of subsequent data packets, the dynamic time interval threshold can be determined based on the arrival time interval of the historical data packets of the latest sub-data stream.

[0065] That is, each time a new sub-data stream is divided, the parameters for determining the dynamic time interval threshold are recalculated to ensure that the arrival time interval between different sub-data streams does not participate in the determination of the dynamic time interval threshold.

[0066] Accordingly, for any data stream, each time a new sub-data stream is partitioned for that data stream, the number of historical data packets in the latest sub-data stream of that data stream can be counted, and the dynamic time interval threshold can be determined.

[0067] Among them, if the number of historical data packets of the latest sub-data stream of the data stream is less than N0, the dynamic time interval threshold is determined based on the average arrival time interval of all historical data packets of the latest sub-data stream.

[0068] If the number of historical data packets of the latest sub-data stream of the data stream is greater than or equal to N0, the dynamic time interval threshold is determined based on the average arrival time interval of the latest N0 historical data packets of the latest sub-data stream.

[0069] It should be noted that for the second data packet of the latest sub-data stream, since the number of historical data packets of the latest sub-data stream is only 1, it is impossible to calculate the average arrival time interval of the historical data packets of the latest sub-data stream. In this case, the arrival time interval of the historical data packets of the latest sub-data stream can be defaulted to 0. Thus, the second data packet of the latest sub-data stream will be defaulted to belonging to the same sub-data stream as the first data packet of the latest sub-data stream.

[0070] In another example, if it is determined that the currently received data packet belongs to a new sub-data stream, the arrival time interval between the currently received data packet and the previous data packet in the same data stream is set to not participate in the determination of the dynamic time interval threshold.

[0071] For example, to avoid the dynamic time interval threshold suddenly increasing due to an excessively large arrival time interval between the first data packet of a new sub-data stream and the last data packet of the previous sub-data stream, which would affect the rationality of sub-data stream division for subsequent data packets, and to avoid having to re-determine the dynamic time interval threshold every time a new sub-data stream is divided, if it is determined that the currently received data packet belongs to a new sub-data stream, that is, if the arrival time interval between the currently received data packet and the previous data packet in the same data stream is greater than or equal to the current dynamic time interval threshold, the arrival time interval between the currently received data packet and the previous data packet in the same data stream is set to not participate in the determination of the dynamic time interval threshold.

[0072] It should be noted that in this example, when determining the average arrival time interval of historical data packets, time intervals that are not included in the dynamic time interval threshold need to be excluded.

[0073] For example, assuming the number of historical data packets in the data stream is greater than or equal to N0, and two time intervals are set not to participate in the determination of the dynamic time interval threshold (let's say ΔT1 and ΔT2), then the average arrival time interval of the latest N0 historical data packets is as follows:

[0074] Where t1 is the arrival time of the latest historical data packet among the latest N0 historical data packets. This represents the arrival time of the earliest historical data packet among the latest N0 historical data packets.

[0075] In this embodiment, for any data stream, the dynamic time interval threshold can be determined based on the average arrival time interval of historical data packets of the data stream, and the threshold parameter;

[0076] The threshold parameter is determined based on the length of the cache queue.

[0077] For example, in order to improve the rationality of the dynamic time interval threshold setting, the threshold parameter can be determined based on the length of the buffer queue, and the dynamic time interval threshold of the data stream can be determined based on the threshold parameter and the average arrival time interval of the historical data packets of the data stream.

[0078] For example, assuming the threshold parameter is σ, T avr Let σT be the average arrival time interval of historical data packets. Then the dynamic time interval threshold can be:avr .

[0079] In one example, the threshold parameter is greater than or equal to the maximum length of the send buffer queue. In this case, when the next data packet arrives, the previous data packet has a high probability of having been sent. This can effectively reduce the overlap between different sub-data streams and reduce the probability of out-of-order data packets.

[0080] For example, suppose there are two buffer queues (let's call them queue 1 and queue 2). Queue 1 has a larger buffer, which can hold 9 packets, while queue 2 has a smaller buffer, which can hold 6 packets. When it is detected that the packets before and after belong to different sub-data streams, the arrival time interval between the packets of the two sub-data streams, that is, the arrival time interval between the first packet of the latest sub-data stream and the last packet of the previous sub-data stream, must be greater than the dynamic time interval threshold σT. avr Therefore, if the last packet of a sub-data stream enters queue 1 or queue 2 for processing, packets of a new sub-data stream must wait for at least σT. avr When the time arrives, since the threshold parameter is greater than or equal to the maximum length of the sending buffer queue (in terms of data packets), by the time the data packets of the new sub-data stream enter the queue, the data packets that were previously buffered in the queue and waiting to be processed have most likely already been processed. In this case, there is basically no possibility that the data packets of the later sub-data stream will be assigned to the shorter queue 2, and that the data packets of the later sub-data stream will run in front of the data packets of the earlier sub-data stream. In other words, the data packets between the two sub-data streams do not overlap, thereby reducing the probability of out-of-order delivery.

[0081] In another example, the threshold parameter is set to half the maximum length of the send buffer queue.

[0082] For example, if the threshold parameter is too large, most data packets may be divided into the same sub-data stream, which may lead to insufficient network bandwidth utilization and congestion. If the threshold parameter is too small, the probability of out-of-order data packets will increase. Therefore, the threshold parameter can be set to half the maximum length of the sending buffer queue, which can reduce the probability of out-of-order data packets and reduce the probability of insufficient network bandwidth utilization and congestion.

[0083] It should be noted that, in the embodiments of this application, the value of the threshold parameter is not limited to the above-mentioned value, and can also be other empirical values, which can be flexibly set according to the actual needs of the scenario.

[0084] This concludes the explanation of how to determine the dynamic time interval threshold.

[0085] The following describes the implementation process of determining the forwarding path for sub-data streams using the flowchart shown in Figure 3:

[0086] Referring to Figure 3, Figure 3 is a schematic diagram of the implementation process for determining the forwarding path for a sub-data stream according to an embodiment of this application.

[0087] As shown in Figure 3, taking the new sub-data stream determined in step 103 as an example, the process of determining the forwarding path for this new sub-data stream may include:

[0088] Step 301: Determine the queuing time for each exit queue.

[0089] In this embodiment, an exit queue can be allocated to a new sub-data stream based on the queuing time of each exit queue, so as to determine the forwarding path of the new sub-data stream.

[0090] In one example, please refer to Figure 4, which is a schematic diagram of the implementation process for determining the queuing time of each exit queue provided in an embodiment of this application.

[0091] As shown in Figure 4, the process for determining the queuing time of each exit queue can include:

[0092] Step 401: For any egress queue, determine the average processing time of a single data packet for that egress queue.

[0093] Step 402: Determine the queuing time of the exit queue based on the average processing time of a single data packet in the exit queue and the queue length of the exit queue.

[0094] For example, the queuing time of the outgoing queue can be determined based on the average processing time of a single data packet in the outgoing queue and the queue length of the outgoing queue.

[0095] For example, for any exit queue, the queuing time of that exit queue can be:

[0096] Among them, tp i This refers to the queuing time for the exit queue. L represents the average processing time for a single data packet in this outgoing queue. i This is the queue length of the exit queue.

[0097] As an example, determining the average processing time for a single packet in the outgoing queue can include:

[0098] The average processing time per data packet in the egress queue is determined based on the accumulated processing time of the egress queue and the accumulated number of data packets processed in the egress queue.

[0099] For example, the processing time and number of data packets for each egress queue can be accumulated separately. Then, for any egress queue, the average processing time of a single data packet for that egress queue can be determined based on the accumulated processing time and the accumulated number of data packets for that egress queue.

[0100] For example, for any egress queue, the average processing time for a single packet in that egress queue can be:

[0101] Among them, T s N represents the cumulative packet processing time for this egress queue. i This represents the cumulative number of packets processed in the exit queue.

[0102] In another example, determining the queuing time for each exit queue can include:

[0103] For any egress queue, the queuing time for that egress queue is determined based on the bandwidth allocated to that egress queue and the buffer size occupied by the packets in that egress queue.

[0104] For example, the queuing time of the egress queue can also be determined based on the bandwidth allocated to the egress queue and the buffer size occupied by the data packets in the egress queue.

[0105] For example, for any exit queue, the queuing time of that exit queue can be determined in the following way:

[0106] Among them, C i B represents the buffer size occupied by the data packets in this outbound queue. i The bandwidth allocated to this exit queue is the bandwidth assigned to the exit corresponding to this exit queue.

[0107] Step 302: Based on the queuing time of each exit queue, determine the forwarding path corresponding to the exit queue with the shortest queuing time as the forwarding path of the new sub-data stream.

[0108] For example, given that the queuing time of each exit queue is determined, the forwarding path corresponding to the exit queue with the shortest queuing time can be determined as the forwarding path of the new sub-data stream.

[0109] For example, suppose there are K candidate exit queues, and the queuing times of each exit queue are tp1, tp2, ..., tp... K Then the minimum queuing time for each exit queue can be determined: min{tp1,…,tp i ,…,tp KThe forwarding path corresponding to the exit queue with the minimum queuing time is determined as the forwarding path for the new sub-data stream.

[0110] This concludes the explanation of the implementation process for determining the forwarding path for sub-data streams.

[0111] As can be seen, in this embodiment, the adaptive threshold value can adaptively adjust the dynamic time interval threshold for dividing the data stream into sub-data streams based on changes in the flow rate and velocity of the ingress data stream. When the burst flow rate and velocity are relatively large, the dynamic time interval threshold for sub-data stream division decreases accordingly; when the burst flow rate and velocity are relatively small, the dynamic time interval threshold for sub-data stream division increases accordingly. This allows the present solution to adaptively divide the data streams based on their own characteristics, resulting in more reasonable and uniform sub-data stream division, and effectively reducing the problems caused by using a fixed time interval threshold for sub-data stream division.

[0112] The electronic device provided in the embodiments of this application is described below:

[0113] Referring to Figure 5, which is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application, the electronic device includes a processor and a machine-readable storage medium; the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.

[0114] Specifically, the processor executes machine-executable instructions to: determine the arrival time interval of the current data packet based on the arrival time of the currently received data packet and the arrival time of the previous data packet in the same data stream, when the currently received data packet is not the first data packet in the data stream;

[0115] If the arrival time interval of the current data packet is less than the dynamic time interval threshold, it is determined that the currently received data packet belongs to the same sub-data stream as the previous data packet in the same data stream, and the currently received data packet is forwarded according to the forwarding path of the sub-data stream; wherein, for any data stream, the dynamic time interval threshold is determined based on the average arrival time interval of the historical data packets of the data stream.

[0116] If the arrival time interval of the current data packet is greater than or equal to the dynamic time interval threshold, it is determined that the currently received data packet belongs to a new sub-data stream, a forwarding path is determined for the new sub-data stream, and the currently received data packet is forwarded according to the determined forwarding path.

[0117] In one example, for any data stream, if the number of historical data packets in the data stream is less than N0, the dynamic time interval threshold is determined based on the average arrival time interval of all historical data packets in the data stream; N0 > 1.

[0118] If the number of historical data packets in the data stream is greater than or equal to N0, the dynamic time interval threshold is determined based on the average arrival time interval of the latest N0 historical data packets in the data stream.

[0119] In one example, when the number of historical data packets in the data stream is greater than N0, the average arrival time interval of the latest N0 historical data packets of the data stream is determined in the following way:

[0120] Among them, T avr2 T is the average arrival time interval of the latest N0 historical data packets of this data stream. avr1 t is the average arrival time interval of the most recent N0 historical data packets of this data stream, as determined in the last analysis. A t represents the arrival time of the latest historical data packet in this data stream. B This represents the arrival time of the next newest historical data packet in this data stream.

[0121] In one example, for any data stream, if the number of historical data packets of the latest sub-data stream is less than N0, the dynamic time interval threshold is determined based on the average arrival time interval of all historical data packets of the latest sub-data stream.

[0122] If the number of historical data packets of the latest sub-data stream of the data stream is greater than or equal to N0, the dynamic time interval threshold is determined based on the average arrival time interval of the latest N0 historical data packets of the latest sub-data stream.

[0123] In one example, if it is determined that the currently received data packet belongs to a new sub-data stream, the arrival time interval between the currently received data packet and the previous data packet in the same data stream is set to not participate in the determination of the dynamic time interval threshold.

[0124] In one example, for any data stream, the dynamic time interval threshold is determined based on the average arrival time interval of historical data packets in that data stream, and a threshold parameter;

[0125] The threshold parameter is determined based on the length of the send buffer queue.

[0126] In one example, the threshold parameter is greater than or equal to the maximum length of the send buffer queue; or, the threshold parameter is half the maximum length of the send buffer queue.

[0127] In one example, the processor executes machine-executable instructions to: determine the queuing time for each exit queue;

[0128] Based on the queuing time of each exit queue, the forwarding path corresponding to the exit queue with the shortest queuing time is determined as the forwarding path of the new sub-data stream.

[0129] In one example, the processor achieves this by executing machine-executable instructions: for any given egress queue, determining the average processing time for a single packet in that egress queue;

[0130] The queuing time of the exit queue is determined based on the average processing time of a single data packet in the exit queue and the queue length of the exit queue.

[0131] In one example, the processor executes machine-executable instructions to determine the average processing time per packet in the egress queue based on the accumulated packet processing time of the egress queue and the accumulated number of packets processed in the egress queue.

[0132] In one example, the processor executes machine-executable instructions to determine the queuing time for any egress queue based on the bandwidth allocated to that egress queue and the buffer size occupied by the packets in that egress queue.

[0133] Based on the same application concept as the above method, this application embodiment also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the method disclosed in the above examples of this application.

[0134] For example, the aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For instance, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0135] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0136] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0137] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A data stream transmission method, characterized in that, include: If the currently received data packet is not the first data packet in the data stream, the arrival time interval of the current data packet is determined based on the arrival time of the currently received data packet and the arrival time of the previous data packet in the same data stream. If the arrival time interval of the current data packet is less than the dynamic time interval threshold, it is determined that the currently received data packet belongs to the same sub-data stream as the previous data packet in the same data stream, and the currently received data packet is forwarded according to the forwarding path of the sub-data stream; wherein, for any data stream, the dynamic time interval threshold is determined based on the average arrival time interval of the historical data packets of the data stream. If the arrival time interval of the current data packet is greater than or equal to the dynamic time interval threshold, it is determined that the currently received data packet belongs to a new sub-data stream, a forwarding path is determined for the new sub-data stream, and the currently received data packet is forwarded according to the determined forwarding path.

2. The method according to claim 1, characterized in that, For any data stream, if the number of historical data packets in the data stream is less than N0, the dynamic time interval threshold is determined based on the average arrival time interval of all historical data packets in the data stream; N0 > 1. If the number of historical data packets in the data stream is greater than or equal to N0, the dynamic time interval threshold is determined based on the average arrival time interval of the latest N0 historical data packets in the data stream.

3. The method according to claim 2, characterized in that, When the number of historical data packets in the data stream is greater than N0, the average arrival time interval of the latest N0 historical data packets in the data stream is determined in the following way: Among them, T avr2 T is the average arrival time interval of the latest N0 historical data packets of this data stream. avr1 t is the average arrival time interval of the most recent N0 historical data packets of this data stream, as determined in the last analysis. A t represents the arrival time of the latest historical data packet in this data stream. B This represents the arrival time of the next newest historical data packet in this data stream.

4. The method according to claim 2, characterized in that, For any data stream, if the number of historical data packets of the latest sub-data stream is less than N0, the dynamic time interval threshold is determined based on the average arrival time interval of all historical data packets of the latest sub-data stream. If the number of historical data packets in the latest sub-data stream of the data stream is greater than or equal to N0, the dynamic time interval threshold is determined based on the average arrival time interval of the latest N0 historical data packets of the latest sub-data stream.

5. The method according to claim 2, characterized in that, If it is determined that the currently received data packet belongs to a new sub-data stream, the arrival time interval between the currently received data packet and the previous data packet in the same data stream is set to not participate in the determination of the dynamic time interval threshold.

6. The method according to claim 1, characterized in that, For any data stream, the dynamic time interval threshold is determined based on the average arrival time interval of historical data packets in that data stream, and the threshold parameter; The threshold parameter is determined based on the length of the sending buffer queue.

7. The method according to claim 6, characterized in that, The threshold parameter is greater than or equal to the maximum length of the send buffer queue; or, the threshold parameter is half the maximum length of the send buffer queue.

8. The method according to claim 1, characterized in that, Determining the forwarding path for this new sub-data stream includes: Determine the queuing time for each exit queue; Based on the queuing time of each exit queue, the forwarding path corresponding to the exit queue with the shortest queuing time is determined as the forwarding path of the new sub-data stream.

9. The method according to claim 8, characterized in that, Determining the queuing time for each exit queue includes: For any egress queue, determine the average processing time for a single packet in that egress queue; The queuing time of the exit queue is determined based on the average processing time of a single data packet in the exit queue and the queue length of the exit queue. The determination of the average processing time for a single data packet in the outgoing queue includes: The average processing time per data packet in the egress queue is determined based on the accumulated processing time of the egress queue and the accumulated number of data packets processed in the egress queue.

10. The method according to claim 8, characterized in that, Determining the queuing time for each exit queue includes: For any egress queue, the queuing time for that egress queue is determined based on the bandwidth allocated to that egress queue and the buffer size occupied by the packets in that egress queue.

11. An electronic device, characterized in that, The electronic device includes: a processor and a machine-readable storage medium; The machine-readable storage medium stores machine-executable instructions that can be executed by the processor; The processor is configured to execute machine-executable instructions to implement the method of any one of claims 1-10.

12. A non-transitory machine-readable storage medium, characterized in that, The non-transitory machine-readable storage medium stores instructions that cause a processor to implement the method of any one of claims 1-10.