A traffic forwarding method and apparatus
By reporting and merging flow statistics in a large AI model network to determine flow periodicity, the problem of traffic congestion is solved, and more efficient traffic scheduling and transmission are achieved.
Patent Information
- Application Number
- CN202410864610.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-06-28
AI Technical Summary
Traffic congestion is prone to occur in large AI model networks, especially when multiple computing nodes send traffic to the same Leaf node at the same time, causing traffic collisions and congestion at the downlink port connecting the Spine node to the Leaf node.
The processor reports flow statistics through the forwarding engine, merges the flow statistics and determines the flow period information, thereby determining the flow characteristic information of the downlink port of the spine node, and publishes it to the leaf nodes so that the leaf nodes can schedule uplink data flow based on the flow characteristic information.
It reduces the probability of traffic congestion in large AI model networks, optimizes the transmission efficiency of data streams and traffic allocation, and improves the transmission efficiency of network traffic.
Smart Images

Figure CN119182720B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of AI (Artificial Intelligence) large model and network communication technology, and in particular to a traffic forwarding method and device. BACKGROUND
[0002] AI large model network refers to the computing and communication infrastructure supporting large artificial intelligence model training and operation.
[0003] The AI large model network has the characteristics of periodic fluctuations in traffic and large data traffic, so traffic collisions are prone to occur in actual networking.
[0004] For example, when multiple computing nodes simultaneously send traffic to computing nodes under the same Leaf node, traffic collisions are prone to occur at the downlink port of the Spine node connected to the Leaf node, causing traffic congestion.
[0005] How to reduce the probability of traffic congestion in the AI large model network has become a technical problem to be solved. SUMMARY
[0006] The present application provides a traffic forwarding method and device to solve the problem of traffic congestion in the existing AI large model network.
[0007] According to a first aspect of an embodiment of the present application, a traffic forwarding method is provided, comprising:
[0008] The forwarding engine reports flow statistics information to the processor if the information reporting condition is met; wherein for any piece of flow statistics information reported by the forwarding engine, the flow statistics information includes flow identification information, first packet timestamp, last packet timestamp and reporting byte number;
[0009] For flow statistics information including the same flow identification information, the processor performs merging processing on flow statistics information with interval duration satisfying the preset merging condition according to the first packet timestamp and the last packet timestamp;
[0010] The processor determines the periodic information of the flow according to the flow statistics information after merging processing; wherein the periodic information of the flow includes the periodic duration of the flow, the traffic interval duration of adjacent periods, and the traffic rate within the period;
[0011] The processor determines the flow feature information of the downlink port of the Spine node according to the periodic information of the flow, and publishes the flow feature information of the downlink port of the Spine node to the Leaf node, so that the Leaf node performs uplink data flow scheduling according to the flow feature information of the downlink port of the Spine node; wherein the flow feature information includes flow creation time and periodic information of the flow.
[0012] According to a second aspect of the embodiments of the present application, a flow forwarding device is provided, comprising: a processor and a forwarding engine; wherein:
[0013] The forwarding engine is configured to report flow statistical information to the processor if it is determined that the information reporting condition is met; wherein, for any piece of flow statistical information reported by the forwarding engine, the flow statistical information comprises flow identification information, a first packet timestamp, a last packet timestamp, and a reporting byte number;
[0014] The processor is configured to, for flow statistical information comprising the same flow identification information, perform merging processing on flow statistical information with interval duration satisfying a preset merging condition according to the first packet timestamp and the last packet timestamp;
[0015] The processor is further configured to determine periodic information of the flow according to the flow statistical information after merging processing; wherein, the periodic information of the flow comprises a periodic duration of the flow, a flow interval duration of adjacent periods, and a flow rate within a period.
[0016] The processor is further configured to determine flow characteristic information of a downstream port of the Spine node according to the periodic information of the flow, and publish the flow characteristic information of the downstream port of the Spine node to the Leaf node, so that the Leaf node performs upstream data flow scheduling according to the flow characteristic information of the downstream port of the Spine node; wherein, the flow characteristic information comprises flow creation time and the periodic information of the flow.
[0017] According to the technical solution disclosed in the present application, the forwarding engine reports flow statistical information to the processor if it is determined that the information reporting condition is met; for flow statistical information comprising the same flow identification information, the processor performs merging processing on flow statistical information with interval duration satisfying a preset merging condition according to the first packet timestamp and the last packet timestamp, and determines periodic information of the flow according to the flow statistical information after merging processing, and then the processor can determine flow characteristic information of a downstream port of the Spine node according to the periodic information of the flow, and publish the flow characteristic information of the downstream port of the Spine node to the Leaf node, so that the Leaf node performs upstream data flow scheduling according to the flow characteristic information of the downstream port of the Spine node, thereby reducing the probability of flow congestion in the AI large model network. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 A flowchart of a flow forwarding method provided by the embodiments of the present application is shown;
[0019] Figure 2 A schematic diagram of a specific application scenario provided by the embodiments of the present application is shown;
[0020] Figure 3 A structural schematic diagram of a Spine node provided by the embodiments of the present application is shown.
[0021] Figure 4 A schematic diagram of a flow rate-time curve provided for an embodiment of the present application;
[0022] Figure 5 A structural schematic diagram of a flow forwarding device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the technical personnel in the art better understand the technical solutions in the embodiments of the present application, and make the above-mentioned purposes, characteristics and advantages of the embodiments of the present application more apparent and easy to understand, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the drawings.
[0024] Please refer to Figure 1 A flowchart of a flow forwarding method provided for an embodiment of the present application, wherein the flow forwarding method can be applied to a Spine node in an AI large model network based on a Leaf-Spine network architecture, as shown in Figure 1 The flow forwarding method can include the following steps:
[0025] Step S100, the forwarding engine reports flow statistical information to the processor under the condition that the information reporting condition is met; wherein for any piece of flow statistical information reported by the forwarding engine, the flow statistical information includes flow identification information, first packet timestamp, last packet timestamp and report byte number.
[0026] In the embodiments of the present application, the forwarding engine of the Spine node can perform flow information statistics according to the forwarded flow.
[0027] The forwarding engine can report flow statistical information to the processor, such as CPU (Center Process Unit, Central Processing Unit), under the condition that the information reporting condition is met.
[0028] Wherein, any piece of flow statistical information can include but is not limited to flow identification information, first packet timestamp, last packet timestamp and report byte number, etc.
[0029] Wherein, for a flow, the first packet timestamp is the timestamp of the first packet of the flow received when reporting the flow statistical information for the first time; the last packet timestamp is the timestamp of the last packet received before reporting the flow statistical information.
[0030] When reporting the flow statistical information for the first time, the first packet timestamp is the timestamp of the first packet of the flow received after the last reporting of the flow statistical information; the last packet timestamp is the timestamp of the last packet received before reporting the flow statistical information.
[0031] Optionally, the flow identification information can include five-tuple information such as a source IP address, a destination IP address, a communication protocol, a source port number, and a destination port number, or the flow identification information can include five-tuple information and a queue pair (QP).
[0032] In step 102, for flow statistical information with the same flow identification information, the processor performs merging processing on flow statistical information with interval durations satisfying a preset merging condition according to a first packet timestamp and a last packet timestamp.
[0033] In the embodiment of the application, for flow statistical information reported by the forwarding engine, the processor can perform merging processing on flow statistical information of the same flow with interval durations satisfying a preset merging condition according to a timestamp in the flow statistical information.
[0034] For example, according to the timestamp in flow statistical information with the same flow identification information, multiple pieces of flow statistical information of the same period can be identified and merged.
[0035] In step 103, the period information of the flow is determined according to the flow statistical information after the merging processing, wherein the period information of the flow includes a period duration of the flow, a traffic interval duration of adjacent periods, and a traffic rate in a period.
[0036] In the embodiment of the application, the period information of the flow can be determined according to the flow statistical information after the merging processing, for example, a period duration of the flow, a traffic interval duration of adjacent periods, and a traffic rate in a period.
[0037] Optionally, the period duration of the flow can include a traffic sending duration and an idle duration (the idle duration is usually a calculation duration of the computing node).
[0038] That is, the traffic sending of the computing node usually has a periodicity, and generally for one period, there is a part of time for related calculation and a part of time for traffic sending.
[0039] The traffic interval duration of adjacent periods corresponds to the idle duration in the above-mentioned one period.
[0040] The traffic rate in a period can be determined according to a duration of message sending in a period and a number of bytes of messages in a period.
[0041] In step 104, the processor determines flow characteristic information of a downstream port of the spine node according to the period information of the flow, and publishes the flow characteristic information of the downstream port of the spine node to the leaf node, so that the leaf node performs upstream data flow scheduling according to the flow characteristic information of the downstream port of the spine node; wherein the flow characteristic information includes flow creation time and the period information of the flow.
[0042] In this embodiment of the invention, the processor can determine the flow forwarded through the same downlink port based on the outgoing port information of the flow locally, and determine the flow characteristic information of the downlink port of the spine node based on the periodic information of the flow forwarded through the same downlink port.
[0043] Optionally, the stream characteristic information may include the stream creation time and the stream's periodicity.
[0044] For a downlink port of a Spine node, based on the flow characteristics of that downlink port, it is possible to predict during which time periods the downlink port will send traffic, as well as information such as the flow rate.
[0045] Correspondingly, the processor can publish the flow characteristic information of the downlink port to the Leaf node through the forwarding engine. The Leaf node can schedule the uplink data flow based on the flow characteristic information of the downlink port of the Spine node. For example, it can give priority to using the downlink port with idle or existing data flow with a lower flow rate.
[0046] It can be seen that, in Figure 1 In the illustrated method flow, the forwarding engine reports flow statistics to the processor when the information reporting conditions are met. For flow statistics with the same flow identifier information, the processor merges the flow statistics with an interval duration that meets the preset merging conditions based on the timestamps of the first and last packets. The processor then determines the flow period information based on the merged flow statistics. Subsequently, the processor can determine the flow characteristic information of the downlink port of the spine node based on the flow period information and publish the flow characteristic information of the downlink port of the spine node to the leaf nodes. This enables the leaf nodes to schedule uplink data flows based on the flow characteristic information of the downlink port of the spine node, reducing the probability of traffic congestion in the AI large model network.
[0047] To enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the technical solutions provided by the embodiments of the present invention will be described below in conjunction with specific application scenarios.
[0048] Please see Figure 2 This is a schematic diagram illustrating a specific application scenario provided by an embodiment of the present invention, such as... Figure 2 As shown, in this application scenario, Spine nodes 201-202 are all connected via different ports (not in...). Figure 2 (As shown in the image) connected to Leaf nodes 301-303, with each Leaf node 301-303 connected via a different port (not shown in the image). Figure 2 (As shown in the diagram) It is connected to Spine nodes 201-202, and each Leaf node is connected to multiple computing nodes through different ports.
[0049] For example, such asFigure 2 As shown, the Leaf node 301 is connected to the computing power nodes 3011-3013 through different ports respectively, the Leaf node 302 is connected to the computing power nodes 3021-3023 through different ports respectively, and the Leaf node 303 is connected to the computing power nodes 3031-3033 through different ports respectively.
[0050] In this embodiment, the computing power node can be represented by a GPU (Graphics Processing Unit).
[0051] For example, the same Spine node can be connected to the same Leaf node through multiple downstream ports.
[0052] In this embodiment, considering that the traffic of the AI large model network has the characteristics of periodic fluctuations and large amount of traffic, the flow feature information of the downstream port can be counted based on the forwarding engine in the AI large model network, the creation time of each flow and the cycle information of the flow can be recorded. The cycle information of the flow can include the cycle duration of the flow, the traffic interval duration of adjacent cycles, and the traffic rate within the cycle.
[0053] The Spine node can publish the flow feature information of the downstream port to the Leaf node, for example, the flow feature information of the downstream port can be published to all Leaf nodes in the network through the BGP (Border Gateway Protocol) protocol.
[0054] The specific implementation of the flow feature information counting is described below.
[0055] Taking the Spine node 201 as an example, referring to Figure 3 , the Spine node 201 includes a forwarding engine 2011 and a CPU 2012.
[0056] As shown in Figure 3 , the forwarding engine 2011 can generate flow statistics information according to the traffic 300 forwarding situation. Figure 3 Only the reception of the flow 300 by the forwarding engine 2011 is shown, and the forwarding is not shown.
[0057] Optionally, it can be recorded in the form of an IPFIX (IP Flow Information Export) table, and the format can be as shown in Table 1.
[0058] Table 1
[0059]
[0060] Wherein, as shown in Table 1, the flow statistical information takes five-tuple+QP as flow identification information, and can record first packet timestamp, last packet timestamp, packet number, packet byte number, etc.
[0061] It should be noted that, in actual application, the flow identification information included in the flow statistical information can further include VLAN (Virtual Local Area Network) information, and / or VNI (Virtual Network Identifier) information, etc.; the flow information included in the flow statistical information can further include one or more of packet number, delay (Delay) related information such as maximum delay, minimum delay, average delay, jitter, etc.
[0062] For any flow, the forwarding engine 2011 can report the flow statistical information 310 to the CPU 2012 when the duration of the flow reaches a preset reporting period (which can be set according to actual needs, such as 100 ms), or when the interruption duration of the flow exceeds a preset interruption duration threshold (which can be set according to actual needs, such as 20 ms), and the schematic diagram can be as shown in Figure 3 .
[0063] Wherein, for a flow, when the time difference between the timestamps of adjacent packets of the flow does not exceed the preset interruption duration threshold, it can be determined that the flow is continuous, and thus the duration thereof can be counted; when the absolute value of the difference between the time when the packet of the flow was last received and the current time exceeds the interruption duration threshold, it can be determined that the flow is interrupted.
[0064] When the CPU 2012 receives the flow statistical information 301 reported by the forwarding engine 2011, it can query the flow statistical information history record to determine whether there is a flow statistical information history record including the same flow identification information as that included in the flow statistical information 301.
[0065] When no flow statistical information history record including the same flow identification information as that included in the flow statistical information 301 is queried, a new flow statistical information record can be generated according to the flow statistical information 301 (after the new flow statistical information record is generated, it also becomes a flow statistical information history record).
[0066] Exemplarily, the storage format of the flow statistical information history record can be as shown in Table 2:
[0067] Table 2
[0068]
[0069] Based on Table 2, the flow identification information in the flow statistics information history record is consistent with the flow identification information in the flow statistics information; Table 2 can store multiple flow statistics information history records in the form of an array, and one flow statistics information history record can correspond to one period of a flow.
[0070] For any flow statistics information history record, the first packet timestamp, the last packet timestamp, and the number of bytes of the report can be included. The elements with the same subscript in the parameter information array correspond to the same flow statistics information history record.
[0071] For example, assuming that Start timestamp[] is Start timestamp[T_S1, T_S2, T_S3] and Last timestamp[] is Last timestamp[T_L1, T_L2, T_L3], T_S1 and T_L1 are the first packet timestamp and the last packet timestamp included in the same flow statistics information history record.
[0072] In the case of querying the flow statistics information history record including the same flow identification information as the flow identification information included in the flow statistics information 301, the CPU 2012 can compare the time difference between the first packet timestamp included in the currently received flow statistics information and the last packet timestamp included in the target flow statistics information history record.
[0073] The target flow statistics information history record is the latest flow statistics information history record including the same flow identification information as the flow identification information included in the flow statistics information 301.
[0074] The latest flow statistics information history record refers to the flow statistics information history record with the minimum time difference between the last packet timestamp and the first packet timestamp included in the currently received flow statistics information.
[0075] The CPU 2012 can merge the currently received flow statistics information and the target flow statistics information history record in the case that the time difference is less than a preset time difference threshold (which can be set according to actual needs, such as 2 ms or 5 ms, etc.).
[0076] For example, assuming that the first packet timestamp in the currently received flow statistics information is CurRecord.startTime and the last packet timestamp included in the target flow statistics information history record is PreReCord.lastTime, the currently received flow statistics information and the target flow statistics information history record can be merged in the case that the time difference between CurRecord.startTime and PreReCord.lastTime is less than the preset time difference threshold.
[0077] In the case of merging the current received flow statistics information with the target flow statistics information history record, the tail packet timestamp in the merged target flow statistics information history record is the tail packet timestamp in the current received flow statistics information, and the number of bytes is the number of bytes in the current received flow statistics information added to the original number of bytes.
[0078] For example, the merging process can be represented as follows:
[0079] PreReCord.lastTime = CurRecord.lastTime
[0080] PreReCord.byte += CurRecord.byte
[0081] PreReCord.lastTime is the tail packet timestamp in the merged target flow statistics information history record, CurRecord.lastTime is the tail packet timestamp in the current received flow statistics information, and "PreReCord.byte += CurRecord.byte" means that the number of bytes in the merged target flow statistics information history record is the number of bytes in the current received flow statistics information (CurRecord.byte) added to the original number of bytes.
[0082] In the case that the time difference is greater than or equal to the preset time difference threshold, a new flow statistics information record is generated according to the current received flow statistics information.
[0083] The flow identification information, the first packet timestamp, the tail packet timestamp, and the number of bytes included in the new flow statistics information record are consistent with the relevant information in the current received flow statistics information.
[0084] For example, for any flow, the maximum number of flow statistics information history records of the flow stored in the CPU 2012 can be preset. In the case that a new flow statistics information record needs to be generated and the current flow statistics information history record reaches the maximum number, the previous flow statistics information history record can be overwritten.
[0085] In this embodiment, the CPU 2012 can determine the cycle information of the flow according to the flow statistics information history record.
[0086] For example, for flow statistics information history records including the same flow identification information, the first packet timestamp (or the tail packet timestamp) included in the flow statistics information history record can be used to sort the flow statistics information history records to determine adjacent flow statistics information history records.
[0087] The CPU 2012 can determine the period length of the flow according to the first packet timestamp in the adjacent flow statistics history records with the same flow identification information.
[0088] The CPU 2012 can determine the traffic interval length of the adjacent period according to the tail packet timestamp in the previous flow statistics history record and the first packet timestamp in the next flow statistics history record in the adjacent flow statistics history records.
[0089] The CPU 2012 can determine the traffic rate in the period according to the first packet timestamp, the tail packet timestamp, and the number of bytes in the same flow statistics history record.
[0090] For example, taking the single period information statistics as an example.
[0091] For a flow, assuming that the first packet timestamps in the two continuous flow statistics history records are T_S1 and T_S2 respectively, the time difference corresponding to T_S1 and T_S2 is the period length of the flow.
[0092] For a flow, assuming that the first packet timestamps in the two continuous flow statistics history records are T_S1 and T_S2 respectively, the time difference corresponding to T_S1 and T_S2 is the period length of the flow.
[0093] For a flow, assuming that the first packet timestamps in the two continuous flow statistics history records are T_S1 and T_S2 respectively, the time difference corresponding to T_S1 and T_S2 is the period length of the flow.
[0094] Optionally, in order to improve the accuracy of the determination of the period length of the flow, for any flow, when the number of the flow statistics history records of the flow reaches a preset number (which can be referred to as a first preset number, and can be set according to actual requirements, for example, 5), the period length of the flow can be determined according to the average value of the time difference corresponding to the first packet timestamps in the adjacent flow statistics history records in the first preset number of flow statistics history records.
[0095] For example, assuming that the five continuous flow statistics history records are R1-R5 in sequence, the time difference ΔT12 of the first packet timestamps in R1 and R2, the time difference ΔT23 of the first packet timestamps in R2 and R3, …, the time difference ΔT45 of the first packet timestamps in R4 and R5 can be determined respectively, and (ΔT12+ΔT23+ΔT34+ΔT45) / 4 is determined as the period length of the flow.
[0096] It should be noted that in the embodiments of the present application, the period length of the flow can be updated according to requirements.
[0097] For example, for a flow, when the period duration of the flow is determined in the above manner, the period duration can be updated according to the latest flow statistical information history record when k (k≥1) flow statistical information history records are added to the flow.
[0098] Similarly, when the traffic interval duration of adjacent periods is determined, the traffic interval duration of adjacent periods can also be determined according to the timestamp information in adjacent flow statistical information history records in the second preset number of flow statistical information history records when the number of flow statistical information history records of the flow reaches the preset number (which can be referred to as the second preset number, which can be set according to actual needs, such as 5).
[0099] Similarly, when the traffic rate within a period is determined, the traffic rate within a period can also be determined according to the timestamp information and the number of bytes in the report in adjacent flow statistical information history records in the third preset number of flow statistical information history records other than the latest flow statistical information history record when the number of flow statistical information history records of the flow reaches the preset number (which can be referred to as the third preset number, which can be set according to actual needs, such as 5).
[0100] It should be noted that since the first packet timestamp and the last packet timestamp within a period are required to determine the traffic rate within a period, and according to the above flow statistical information history record generation manner, the latest flow statistical information history record may not cover a complete period, therefore, when the traffic rate within a period is determined according to the flow statistical information history record, it can be determined according to the non-latest flow statistical information history record.
[0101] For example, for any flow of any downstream port, when the period information of the flow is determined in the above manner, the period within active duration of the flow can be determined according to the period duration of the flow and the traffic interval duration of adjacent periods.
[0102] For example, the difference between the period duration of the flow and the traffic interval duration of adjacent periods can be determined as the period within active duration of the flow.
[0103] For any flow of any downstream port, the traffic rate-time curve of the flow can be determined according to the period within active duration of the flow and the traffic rate within a period.
[0104] For a flow, in the traffic rate-time curve of the flow, the creation time of the flow is the base time, the traffic rate of the period within active duration of the flow is the traffic rate within a period, and the traffic rate of the remaining time other than the period within active duration is 0.
[0105] Wherein, for a flow, the flow creation time can be the time corresponding to the time stamp of the first packet of the flow.
[0106] For example, for a flow, in the case of constant flow rate, its flow rate-time curve function can be as follows:
[0107] f(t) = ((t-baseTime) % periodTime) < activeTime? rate x : 0
[0108] Wherein, t is the current time, baseTime is the base time of the flow, periodTime is the period length of the flow, activeTime is the active time length in the period of the flow; "%" is the modulus operation; rate x is the flow rate in the period.
[0109] Wherein, the flow rate-time curve corresponding to the above flow rate-time curve function can be seen in Figure 4 .
[0110] As shown in Figure 4 , the horizontal axis is the time axis, the vertical axis is the flow rate, t0 is the base time of the flow, t0-t1, t2-t3 is the active time length in the period of the flow, t1-t2 is the flow interval time length of adjacent periods.
[0111] For a downlink port, in the case of determining the flow rate-time curve of each flow of the downlink port in the above manner, the single-port flow portrait can be obtained by multi-flow superposition:
[0112]
[0113] Wherein, n is the total number of flows under a single downlink port, f i (t) is the flow rate-time curve function of the i-th flow under the downlink port.
[0114] In this embodiment, in the case that the CPU 2012 obtains the flow portrait 320 of the downlink port in the above manner, the flow portrait 320 of the downlink port can be published to the Leaf node through the forwarding engine 2011, and its schematic diagram can be as shown in Figure 3 .
[0115] In the case that the Leaf node receives the downlink port flow portrait sent by the Spine node, the uplink data flow scheduling can be performed according to the downlink port flow portrait of the Spine node, for example, the downlink port with lower flow rate of the idle or existing data flow is preferentially selected for use.
[0116] In addition, in the case that the delay information is included in the flow statistics information, the delay information can also be included in the downlink port traffic image.
[0117] Correspondingly, the Leaf node can also select the downlink port of the Spine node according to the delay information when scheduling the uplink data flow, for example, preferentially selecting the downlink port with smaller delay (such as minimum maximum delay, or minimum average delay) or minimum jitter for use.
[0118] In one example, the Leaf node can preferentially select the downlink port with lower traffic rate of the idle or existing data flow for use as the selection basis when scheduling the uplink data flow. For multiple downlink ports with the same traffic rate or a traffic rate difference not exceeding a preset threshold, the delay can be used as the selection basis.
[0119] See Figure 5 A structural schematic diagram of a traffic forwarding device provided by an embodiment of the present application, wherein the traffic forwarding device can be deployed in the Spine node of the AI large model network based on the Leaf-Spine network architecture, as shown in Figure 5 The traffic forwarding device can include a forwarding engine 510 and a processor 520; wherein:
[0120] The forwarding engine 510 is configured to report the flow statistics information to the processor 520 when it is determined that the information reporting condition is met; wherein, for any piece of flow statistics information reported by the forwarding engine, the flow statistics information includes flow identification information, first packet timestamp, last packet timestamp, and reporting byte number;
[0121] The processor 520 is configured to, for the flow statistics information with the same flow identification information, perform merging processing on the flow statistics information with interval duration satisfying a preset merging condition according to the first packet timestamp and the last packet timestamp.
[0122] The processor 520 is further configured to determine the cycle information of the flow according to the flow statistics information after the merging processing; wherein, the cycle information of the flow includes the cycle duration of the flow, the traffic interval duration of adjacent cycles, and the traffic rate within the cycle.
[0123] The processor 520 is further configured to determine the flow feature information of the downlink port of the Spine node according to the cycle information of the flow, and publish the flow feature information of the downlink port of the Spine node to the Leaf node, so that the Leaf node performs uplink data flow scheduling according to the flow feature information of the downlink port of the Spine node; wherein, the flow feature information includes the flow creation time and the cycle information of the flow.
[0124] In some embodiments, the information reporting condition meeting includes:
[0125] a duration of the same flow reaches a preset reporting period duration; or
[0126] a duration of interruption of the same flow exceeds a preset interruption duration threshold.
[0127] In some embodiments, the processor 520 performs merging processing on the flow statistical information whose interval duration satisfies a preset merging condition according to the first packet timestamp and the last packet timestamp, including:
[0128] For the currently received flow statistical information, in a case where it is determined that there is a flow statistical information history record including the same flow identification information, the processor 520 determines a time difference between the first packet timestamp included in the currently received flow statistical information and the last packet timestamp included in the target flow statistical information history record, wherein the target flow statistical information history record is the latest flow statistical information history record including the same flow identification information;
[0129] In a case where the time difference is less than a preset time difference threshold, the processor 520 merges the currently received flow statistical information and the target flow statistical information history record;
[0130] In a case where the time difference is greater than or equal to the preset time difference threshold, the processor 520 generates a new flow statistical information record according to the currently received flow statistical information.
[0131] In some embodiments, the processor 520 determines the period information of the flow according to the flow statistical information after the merging processing, including:
[0132] determining the period duration of the flow according to the first packet timestamp in the adjacent flow statistical information history records including the same flow identification information;
[0133] determining the traffic interval duration of the adjacent periods according to the last packet timestamp in the previous flow statistical information history record and the first packet timestamp in the next flow statistical information history record in the adjacent flow statistical information history records;
[0134] determining the traffic rate within the period according to the first packet timestamp, the last packet timestamp, and the reporting byte number in the same flow statistical information history record.
[0135] In some embodiments, the processor 520 determines the flow feature information of the downlink port of the spine node according to the period information of the flow, including:
[0136] For any flow of any downlink port, the processor 520 determines the active duration within the period of the flow according to the period duration of the flow and the traffic interval duration of the adjacent periods;
[0137] determining the traffic rate-time curve of the flow according to the active duration within the period of the flow and the traffic rate within the period of the flow;
[0138] According to the flow rate-time curve of each flow of the downlink port, the flow characteristic information of the downlink port is determined.
[0139] The implementation process of the functions and roles of each unit in the device is specifically described in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0140] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can be seen in the part of the method embodiment.
Claims
1. A traffic forwarding method, characterized by, The method comprises the following steps: The forwarding engine reports flow statistical information to the processor when it is determined that the information reporting condition is met; wherein, for any piece of flow statistical information reported by the forwarding engine, the flow statistical information comprises flow identification information, a first packet timestamp, a last packet timestamp, and a reporting byte number; For flow statistical information comprising the same flow identification information, the processor performs merging processing on flow statistical information with an interval duration satisfying a preset merging condition according to the first packet timestamp and the last packet timestamp; The processor determines the periodic information of the flow according to the flow statistical information after merging processing; wherein, the periodic information of the flow comprises the periodic duration of the flow, the traffic interval duration of adjacent periods, and the traffic rate within a period; The processor determines the flow feature information of the downstream port of the spine node according to the periodic information of the flow, and publishes the flow feature information of the downstream port of the spine node to the leaf node, so that the leaf node performs upstream data flow scheduling according to the flow feature information of the downstream port of the spine node; wherein, the flow feature information comprises the flow creation time and the periodic information of the flow.
2. The method of claim 1, wherein, The information reporting condition comprises: The duration of the same flow reaches a preset reporting period duration; or The interruption duration of the same flow exceeds a preset interruption duration threshold.
3. The method of claim 1, wherein, The processor performs merging processing on flow statistical information with an interval duration satisfying a preset merging condition according to the first packet timestamp and the last packet timestamp, which comprises: For the currently received flow statistical information, the processor determines the time difference between the first packet timestamp included in the currently received flow statistical information and the last packet timestamp included in the target flow statistical information historical record when it is determined that there is a flow statistical information historical record comprising the same flow identification information; wherein, the target flow statistical information historical record is the latest flow statistical information historical record comprising the same flow identification information; In the case that the time difference is less than a preset time difference threshold, the currently received flow statistical information and the target flow statistical information historical record are merged; In the case that the time difference is greater than or equal to the preset time difference threshold, a new flow statistical information record is generated according to the currently received flow statistical information.
4. The method of claim 1, wherein, The processor determines the periodic information of the flow according to the flow statistical information after merging processing, which comprises: The periodic duration of the flow is determined according to the first packet timestamp in adjacent flow statistical information historical records comprising the same flow identification information; The traffic interval duration of adjacent periods is determined according to the last packet timestamp in the previous flow statistical information historical record and the first packet timestamp in the next flow statistical information historical record in adjacent flow statistical information historical records; The traffic rate within a period is determined according to the first packet timestamp, the last packet timestamp, and the reporting byte number in the same flow statistical information historical record.
5. The method of claim 1, wherein, The processor determines the flow feature information of the downstream port of the spine node according to the periodic information of the flow, which comprises: For any flow of any downstream port, the active duration of the flow within a period is determined according to the periodic duration of the flow and the traffic interval duration of adjacent periods; The traffic rate-time curve of the flow is determined according to the active duration of the flow within a period and the traffic rate within a period. The flow feature information of the downlink port is determined according to a flow rate-time curve of each flow of the downlink port.
6. A traffic forwarding device, characterized by Comprise: A processor and a forwarding engine; wherein: The forwarding engine is configured to report flow statistical information to the processor if it is determined that the information reporting condition is met; wherein, for any piece of flow statistical information reported by the forwarding engine, the flow statistical information comprises flow identification information, a first packet timestamp, a last packet timestamp, and a reporting byte number; The processor is configured to, for flow statistical information comprising the same flow identification information, perform merging processing on flow statistical information with interval durations satisfying a preset merging condition according to the first packet timestamp and the last packet timestamp; The processor is further configured to determine periodic information of the flow according to the flow statistical information after merging processing; wherein, the periodic information of the flow comprises a periodic duration of the flow, a flow interval duration of adjacent periods, and a flow rate within a period; The processor is further configured to determine flow feature information of a downlink port of a spine node according to the periodic information of the flow, and publish the flow feature information of the downlink port of the spine node to a leaf node, so that the leaf node performs uplink data flow scheduling according to the flow feature information of the downlink port of the spine node; wherein, the flow feature information comprises flow creation time and the periodic information of the flow.
7. The apparatus of claim 6, wherein, The information reporting condition comprises: A continuous duration of the same flow reaches a preset reporting period duration; or, An interruption duration of the same flow exceeds a preset interruption duration threshold.
8. The apparatus of claim 6, wherein, The processor performs merging processing on flow statistical information with interval durations satisfying a preset merging condition according to the first packet timestamp and the last packet timestamp, comprising: For the currently received flow statistical information, if it is determined that there is a flow statistical information history record comprising the same flow identification information, determine a time difference between the first packet timestamp included in the currently received flow statistical information and the last packet timestamp included in a target flow statistical information history record; wherein, the target flow statistical information history record is the latest flow statistical information history record comprising the same flow identification information; In a case where the time difference is less than a preset time difference threshold, merge the currently received flow statistical information and the target flow statistical information history record; In a case where the time difference is greater than or equal to the preset time difference threshold, generate a new flow statistical information record according to the currently received flow statistical information.
9. The apparatus of claim 6, wherein, The processor determines the periodic information of the flow according to the flow statistical information after merging processing, comprising: Determine the periodic duration of the flow according to the first packet timestamp in adjacent flow statistical information history records comprising the same flow identification information; Determine the flow interval duration of adjacent periods according to the last packet timestamp in a previous flow statistical information history record and the first packet timestamp in a subsequent flow statistical information history record in adjacent flow statistical information history records; Determine the flow rate within a period according to the first packet timestamp, the last packet timestamp, and the reporting byte number in the same flow statistical information history record.
10. The apparatus of claim 6, wherein, The processor determines the flow feature information of the downlink port of the spine node according to the periodic information of the flow, comprising: For any flow of any downlink port, according to the period length of the flow and the traffic interval length of the adjacent period, the active length in the period of the flow is determined; According to the active length in the period of the flow and the traffic rate in the period, the traffic rate-time curve of the flow is determined; According to the traffic rate-time curves of the flows of the downlink port, the flow feature information of the downlink port is determined.
Citation Information
Patent Citations
Network congestion control method, node, system and storage medium
CN112511325A
Flow statistics method, device and system
CN116471194A