Network congestion early warning method and device, communication equipment and storage medium

By adding timestamps and queue length information to long-distance switches, network congestion is monitored in real time, and packet loss caused by long-distance network feedback delay is solved, and accurate and timely congestion warning and feedback are achieved.

CN120455367APending Publication Date: 2025-08-08CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510544624.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In hyper-large-scale data center networks and distributed intelligent computing center networks, the existing technology cannot promptly warn of packet loss caused by delayed feedback in long-distance networks, resulting in increased latency and sudden increase in packet loss rate.

Method used

By adding message arrival, forwarding and sending timestamps to long-distance switches, and combining message queue length change information, network congestion situations can be monitored in real time and network congestion information will be sent in a timely manner to provide early warnings.

Benefits of technology

It realizes accurate and timely warning of long-distance network congestion, shortens feedback time, reduces network packet loss rate, and reduces the requirements for the caching capabilities of interconnected devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455367A_ABST
    Figure CN120455367A_ABST
Patent Text Reader

Abstract

The invention relates to a network congestion early warning method and device, communication equipment and a storage medium. The method is applied to a first long-distance switch in a long-distance internet, and comprises the following steps: after a service message sent by a second long-distance switch interconnected with the first long-distance switch is received, adding a message arrival timestamp to the service message according to the message receiving time of the service message, and adding the service message to a message queue; wherein the service message carries a message sending timestamp; adding a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next hop device; and sending network congestion information to the second long-distance switch under the condition of determining that network congestion occurs according to the message sending timestamp, the message arrival timestamp, the message forwarding timestamp and the length change information of the message queue. By adopting the method, early warning can be accurately and timely performed on long-distance network congestion, and the problem of slow long-distance network congestion feedback is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and in particular to a network congestion warning method, apparatus, communication equipment, and storage medium. Background Art

[0002] In scenarios such as hyperscale data center networks and distributed intelligent computing center networks, network failures, whether due to link problems or server performance degradation, can reduce overall effective throughput and lead to network congestion. If congestion occurs on long-distance links between data centers, long feedback delays and the limited cache capacity of intermediate network devices can prevent all in-transit data packets from being accommodated, ultimately leading to packet loss.

[0003] However, in traditional network congestion warning mechanisms, warnings are usually issued after network congestion occurs, resulting in a lag in congestion feedback response, which in turn leads to untimely congestion control, resulting in increased latency and a sudden increase in packet loss rate, affecting user experience. Summary of the Invention

[0004] Based on this, it is necessary to provide a network congestion warning method, device, communication equipment and storage medium to address the above technical problems, which can accurately and timely warn of long-distance network congestion and effectively solve the problem of slow feedback of long-distance network congestion.

[0005] In a first aspect, the present application provides a network congestion warning method, applied to a first long-distance switch in a long-distance internet network, comprising:

[0006] After receiving a service message sent by a second long-distance switch interconnected with the first long-distance switch, adding a message arrival timestamp to the service message according to the message reception time of the service message, and adding the service message to the message queue; wherein the service message carries the message sending timestamp;

[0007] Adding a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next hop device;

[0008] When it is determined that network congestion occurs according to the message sending timestamp, the message arrival timestamp, the message forwarding timestamp and the message queue length change information, network congestion information is sent to the second long-distance switch.

[0009] In one embodiment, determining that network congestion occurs based on the message sending timestamp, the message arrival timestamp, the message forwarding timestamp, and the length change information of the message queue includes:

[0010] Determining a message transmission time based on a difference between the message arrival timestamp and the message sending timestamp;

[0011] Determining a message processing time based on a difference between the message forwarding timestamp and the message arrival timestamp;

[0012] It is determined that network congestion occurs according to the message transmission time, the message processing time and the length change information of the message queue.

[0013] In one embodiment, determining that network congestion occurs based on the message transmission time, the message processing time, and the change in the length of the message queue includes:

[0014] Determining a queue length change value according to the message queue length change information;

[0015] Determine a transmission time difference according to a difference between the message transmission time and a reference transmission time;

[0016] Determining a processing time difference based on a difference between the message processing time and a benchmark processing time;

[0017] determining a congestion index according to the queue length change value, the transmission time difference, and the processing time difference;

[0018] If the congestion index is greater than a preset index threshold, it is determined that network congestion occurs.

[0019] In one embodiment, the method further comprises:

[0020] receiving a network detection instruction sent by a network control device in the long-distance internet network;

[0021] In response to the network detection instruction, sending network detection information to a programmable switch interconnected with the first long-distance switch in the long-distance interconnection network, so that the programmable switch interconnected with the first long-distance switch performs network detection and sends a network detection result to the network control device; and

[0022] performing network detection according to the received network detection information sent by the programmable switch interconnected with the first long-distance switch, and sending the network detection result to the network control device;

[0023] Receive identity confirmation information sent by the network control device; wherein the identity confirmation information is determined by the network control device according to the received network detection result, and the identity confirmation information is used to point to a second long-distance switch interconnected with the first long-distance switch.

[0024] In one embodiment, the identity confirmation information includes a benchmark transmission time and a benchmark processing time;

[0025] The reference transmission time is determined by the network control device according to the interconnection link transmission time in the target detection result; the reference processing time is determined by the network control device according to the test message processing time in the target detection result;

[0026] The target detection result is a network detection result obtained by performing network detection on the first long-distance switch and the second long-distance switch.

[0027] In one embodiment, the identity confirmation information is sent by the network control device when it is determined that the first long-distance switch and the second long-distance switch meet the long-distance condition based on the target detection result;

[0028] The long distance condition is that the interconnection link transmission time in the target detection result is greater than a transmission time threshold, or the test message processing time in the target detection result is greater than a processing time threshold;

[0029] The target detection result is a network detection result obtained by performing network detection on the first long-distance switch and the second long-distance switch.

[0030] In a second aspect, the present application provides a network congestion warning method, which is applied to a second long-distance switch in a long-distance internetwork, comprising:

[0031] In the case where there is a service message forwarding task, if it is determined that the next-hop device of the service message is the first long-distance switch interconnected with the second long-distance switch, adding a message sending timestamp to the service message according to the sending time of the service message to the first long-distance switch;

[0032] sending the service message carrying the message sending timestamp to the first long-distance switch, so that the first long-distance switch adds the service message to a message queue, and, if it is determined that network congestion occurs based on the message sending timestamp, the message receiving time of the service message, the message forwarding time of forwarding the service message to the next-hop device of the first long-distance switch, and the message queue length change information, sending network congestion information to the second long-distance switch;

[0033] Receive network congestion information sent by the first long-distance switch.

[0034] In a third aspect, the present application further provides a network congestion warning device, configured in a first long-distance switch in a long-distance internet network, comprising:

[0035] a message receiving module, configured to, upon receiving a service message sent by a second long-distance switch interconnected with the first long-distance switch, add a message arrival timestamp to the service message according to a message reception time of the service message, and add the service message to a message queue; wherein the service message carries a message sending timestamp;

[0036] A first adding module is used to add a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next hop device;

[0037] The congestion warning module is configured to send network congestion information to the second long-distance switch when it is determined that network congestion occurs based on the message sending timestamp, the message arrival timestamp, the message forwarding timestamp and the message queue length change information.

[0038] In a fourth aspect, the present application further provides a network congestion warning device, configured in a second long-distance switch in a long-distance internet network, comprising:

[0039] a second adding module configured to, when there is a service message forwarding task, add a message sending timestamp to the service message based on a sending time of the service message to the first long-distance switch if it is determined that the next-hop device of the service message is the first long-distance switch interconnected with the second long-distance switch;

[0040] a message forwarding module, configured to send the service message carrying the message sending timestamp to the first long-distance switch, so that the first long-distance switch adds the service message to a message queue, and, if network congestion is determined to have occurred based on the message sending timestamp, a message reception time of the service message, a message forwarding time for forwarding the service message to a next-hop device of the first long-distance switch, and message queue length change information, send network congestion information to the second long-distance switch;

[0041] The information receiving module is configured to receive the network congestion information sent by the first long-distance switch.

[0042] In a fifth aspect, the present application further provides a communication device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the first and second aspects are implemented.

[0043] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first and second aspects above.

[0044] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the first and second aspects above.

[0045] The above-mentioned network congestion warning method, device, communication equipment and storage medium, after the first long-distance switch receives a business message sent by the second long-distance switch interconnected with the first long-distance switch, accurately adds a message arrival timestamp to the business message according to the message reception time of the business message, adds the business message to the message queue, and accurately adds a message forwarding timestamp to the business message according to the message forwarding time of forwarding the business message to the next-hop device; further, by introducing the message sending timestamp, message arrival timestamp, message forwarding timestamp and message queue length change information, it is equivalent to comprehensively considering the accumulation situation of the current receiving queue of the first long-distance switch and the change of the message processing time, thereby realizing accurate prediction of network congestion, effectively shortening the feedback time of congestion control under long-distance links, reducing the network packet loss rate, and also reducing the requirements for the cache capacity of the interconnected devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1A A schematic diagram of a traditional congestion control feedback mechanism provided by an embodiment;

[0048] Figure 1B A diagram showing an application environment of a network congestion warning method in one embodiment;

[0049] Figure 2A 1 is a flow chart of a network congestion warning method according to an embodiment;

[0050] Figure 2B Schematic diagram of a fast congestion feedback mechanism of a network congestion warning method in one embodiment;

[0051] Figure 3 1 is a flow chart of determining network congestion in one embodiment;

[0052] Figure 4 A schematic diagram of a process for predicting network congestion in one embodiment;

[0053] Figure 5 A schematic diagram of a process for determining identity confirmation information in one embodiment;

[0054] Figure 6 A flowchart of a network congestion warning method according to another embodiment;

[0055] Figure 7A An application scenario diagram provided in one embodiment;

[0056] Figure 7B A schematic diagram of a network congestion warning process for a first long-distance switch and a second long-distance switch provided in one embodiment;

[0057] Figure 8 Schematic diagram of a flow chart of a network congestion warning method in another embodiment;

[0058] Figure 9 This is a structural block diagram of a network congestion warning device in one embodiment;

[0059] Figure 10 is a structural block diagram of a network congestion warning device in another embodiment;

[0060] Figure 11 FIG. 4 is a diagram showing the internal structure of a communication device in one embodiment. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0062] In scenarios such as hyperscale data center networks and distributed intelligent computing center networks, network failures, whether due to link problems or server performance degradation, will lead to a reduction in the overall effective throughput, thereby causing network congestion. However, the impact will vary depending on where the congestion occurs. When congestion occurs inside a data center, the congestion feedback link is shorter, so it can respond quickly to suppress congestion. On the contrary, if congestion occurs on long-distance links between data centers, due to the longer feedback delay and the limited cache capacity of intermediate network devices, it is impossible to accommodate all data packets in transit, which may eventually lead to data packet loss, such as Figure 1A The figure shows the traditional congestion control feedback mechanism.

[0063] The network congestion warning method provided in the embodiment of the present application can be applied to Figure 1BIn the application environment shown, the first long-distance switch 101 is a programmable switch in a long-distance interconnection network, the second long-distance switch 102 is a programmable switch interconnected with the first long-distance switch 101 in the long-distance interconnection network, and the link between the first long-distance switch 101 and the second long-distance switch 102 is a long-distance link. The network control device 103 is a network device used to control and manage each programmable switch in the long-distance interconnection network. It should be noted that the long-distance interconnection network includes multiple programmable switches. Optionally, after the first long-distance switch 101 receives a service message sent by the second long-distance switch 102 interconnected with the first long-distance switch 101, the first long-distance switch 101 adds a message arrival timestamp to the service message according to the message reception time of the service message, and adds the service message to the message queue; wherein, the service message carries a message sending timestamp; according to the message forwarding time of forwarding the service message to the next-hop device, a message forwarding timestamp is added to the service message; when it is determined that network congestion occurs based on the message sending timestamp, the message arrival timestamp, the message forwarding timestamp and the length change information of the message queue, network congestion information is sent to the second long-distance switch 102.

[0064] In an exemplary embodiment, Figure 2A As shown, a network congestion warning method is provided, which is applied to Figure 1B Taking the first long-distance switch 101 in FIG. 1 as an example, the method specifically includes the following steps:

[0065] S201: After receiving a service message sent by a second long-distance switch interconnected with a first long-distance switch, add a message arrival timestamp to the service message according to the message reception time of the service message, and add the service message to a message queue.

[0066] The first long-distance switch is any long-distance switch in the long-distance interconnection network. The second long-distance switch is any long-distance switch in the long-distance interconnection network that is interconnected with the first long-distance switch. It should be noted that the first long-distance switch and the second long-distance switch are selected by the network control device from among the programmable switches in the long-distance interconnection network through an identity negotiation process.

[0067] For example, during the initialization phase, each programmable switch in the long-haul interconnected network initiates a network detection process to negotiate its identity. Specifically, each programmable switch sends network detection information containing a timestamp to its interconnected programmable switches. During this process, each programmable switch obtains link delay information from its interconnected programmable switches. Furthermore, each programmable switch determines whether it is a long-haul switch based on the received link delay information. If it determines that it is a long-haul switch, it initiates a fast congestion feedback mechanism.

[0068] For example, to ensure the accuracy of the identity negotiation process, a network control device can be introduced. During the initialization phase, the network control device instructs all programmable switches in the long-distance interconnected network to initiate a network detection process for identity negotiation. Specifically, each programmable switch sends network detection information containing a timestamp to the interconnected programmable switches. During this process, each programmable switch device obtains link delay information for its interconnected programmable switches and sends this link delay information to the network control device. Furthermore, the network control device can screen out interconnected long-distance switches from all programmable switches by evaluating the delay size and instruct the interconnected long-distance switches to initiate the fast congestion feedback function.

[0069] The service message carries a message sending timestamp, which is added to the service message by the second long-haul switch based on the time the service message was sent before it is sent to the first long-haul switch. The message receiving time is the time when the first long-haul switch receives the service message, and the message arrival timestamp is also the time when the first long-haul switch receives the service message.

[0070] Optionally, after receiving the service message sent by the second long-distance switch, the first long-distance switch needs to use INT technology to add a message arrival timestamp to the service message based on the message reception time of the service message to indicate the time when the service message arrived at the first long-distance switch. Further, the service message is added to the message queue.

[0071] S202: Add a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next-hop device.

[0072] The next-hop device is the next receiving end of the service message and can be a switch or a server. The message forwarding time is the time it takes for the first long-distance switch to forward the service message to the next-hop device. The message forwarding timestamp is also the time it takes for the long-distance switch to forward the service message to the next-hop device.

[0073] It should be noted that after receiving the service message, the first long-haul switch will process the service message accordingly. After processing, it will forward the service message to the next-hop device based on the service message's forwarding entry. Before forwarding the service message, the first long-haul switch will add a message forwarding timestamp to the service message based on the message forwarding time.

[0074] S203 : When it is determined that network congestion occurs based on the message sending timestamp, the message arrival timestamp, the message forwarding timestamp, and the message queue length change information, network congestion information is sent to the second long-distance switch.

[0075] The message queue length change information represents the current length change of the message queue of the first long-distance switch. The network congestion information is used to inform the second long-distance switch of impending network congestion so that the second long-distance switch can reduce the traffic speed.

[0076] Optionally, the second long-distance switch will comprehensively analyze data such as the message sending timestamp, the message arrival timestamp, the message forwarding timestamp, and the message queue length change information to analyze the current receiving queue backlog of the second long-distance switch and the change in message processing time; further, based on the analysis results, the network congestion situation is predicted, and when it is predicted that network congestion occurs, network congestion information will be sent to the second long-distance switch.

[0077] like Figure 2B As shown, this is the fast congestion feedback mechanism of the network congestion warning method provided by this application. Figure 2B The local long-haul switch in the example is the second long-haul switch, the sender of this service packet forwarding process. The remote long-haul switch is the first long-haul switch, the receiver of this service packet forwarding process. In the service packet, ETH (Ethernet) represents the Ethernet interface. IP (Internet Protocol) includes the destination and source IP addresses. UDP (User Datagram Protocol) is a connectionless transport layer protocol. The payload is the actual content of the service packet. Before sending the service packet to the remote long-haul switch, the local long-haul switch adds INT (Inband Network Telemetry) information to the packet. The INT information includes an INT identifier, an INT header, and a timestamp, which indicates when the packet was sent.

[0078] In the above-mentioned network congestion early warning method, after the first long-distance switch receives a service message sent by the second long-distance switch interconnected with the first long-distance switch, it accurately adds a message arrival timestamp to the service message according to the message reception time of the service message, adds the service message to the message queue, and accurately adds a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next-hop device; further, by introducing the message sending timestamp, message arrival timestamp, message forwarding timestamp and message queue length change information, it is equivalent to comprehensively considering the accumulation situation of the current receiving queue of the first long-distance switch and the change of the message processing time, thereby realizing accurate prediction of network congestion, effectively shortening the feedback time of congestion control under the long-distance link, reducing the network packet loss rate, and also reducing the requirements for the cache capacity of the interconnected devices.

[0079] Optionally, in an exemplary embodiment, as Figure 3 As shown, a method for determining network congestion is provided to refine the above S203, specifically comprising the following steps:

[0080] S301 : Determine a message transmission time according to a difference between a message arrival timestamp and a message sending timestamp.

[0081] The message transmission time is the time it takes for the service message to be transmitted in the long-distance link between the second long-distance switch and the first long-distance switch, that is, the time it takes for the service message to reach the first long-distance switch from the second long-distance switch.

[0082] It can be understood that the message arrival timestamp indicates the time when the service message arrives at the first long-distance switch, and the message sending timestamp indicates the time when the service message is sent from the second long-distance switch. Therefore, the difference between the message arrival timestamp and the message sending timestamp is the time taken for the service message to reach the first long-distance switch from the second long-distance switch, which is also the message transmission time.

[0083] S302: Determine the message processing time according to the difference between the message forwarding timestamp and the message arrival timestamp.

[0084] The message processing time is the time it takes the first long-distance switch to process the service message.

[0085] It can be understood that the message arrival timestamp indicates the time when the service message arrives at the first long-distance switch, and the message forwarding timestamp indicates the time when the service message is sent from the first long-distance switch. Therefore, the difference between the message forwarding timestamp and the message arrival timestamp is the time when the first long-distance switch processes the service message, that is, the message processing time.

[0086] S303: Determine that network congestion occurs based on the message transmission time, the message processing time, and the change in the length of the message queue.

[0087] Optionally, the second long-distance switch will comprehensively analyze data such as message transmission time, message processing time, and message queue length change information to analyze the current receiving queue accumulation of the second long-distance switch and the changes in message processing time; further, based on the analysis results, the network congestion situation is predicted.

[0088] In this embodiment, by introducing the message transmission time and the message processing time, since the message transmission time can intuitively describe the time it takes for the service message to be transmitted from the second long-distance switch to the first long-distance switch, and the message processing time can intuitively describe the time it takes for the first long-distance switch to process the service message, based on the message transmission time, the message processing time, and the length change information of the message queue, network congestion can be accurately predicted.

[0089] Optionally, in one embodiment, Figure 4 As shown, a method for accurately predicting network congestion is provided to refine the above S303, specifically including the following steps:

[0090] S401: Determine a queue length change value according to message queue length change information.

[0091] The queue length change value represents a change in the length of the message queue in the first long-distance switch relative to a preset reference length value.

[0092] Optionally, in an embodiment of the present application, the message queue length change information includes a preset reference length value and a current message queue length value, and the difference between the current message queue length value and the preset reference length value can be used as the queue length change value.

[0093] S402: Determine a transmission time difference according to the difference between the message transmission time and the reference transmission time.

[0094] The transmission time difference represents the change in the message transmission time relative to the baseline transmission time, and can, to a certain extent, reflect the congestion level of the transmission link between the second long-haul switch and the first long-haul switch. The baseline transmission time is the relatively ideal transmission time for a message from the second long-haul switch to the first long-haul switch.

[0095] It can be understood that the message transmission time is the time used for the current business message transmission process, and the benchmark transmission time is the ideal message transmission time. Therefore, the difference between the message transmission time and the benchmark transmission time can, to a certain extent, characterize the gap between the current message transmission process and the ideal situation. Therefore, the difference between the message transmission time and the benchmark transmission time can be used as the transmission time difference.

[0096] S403: Determine a processing time difference according to the difference between the message processing time and the benchmark processing time.

[0097] The processing time difference represents the change in message transmission time relative to the benchmark transmission time, and to a certain extent can reflect the message processing burden of the first long-distance switch. The benchmark processing time is the relatively ideal time for the first long-distance switch to process a message.

[0098] It is understood that the message processing time is the time required by the first long-haul switch to currently process a service message, and the benchmark processing time is the ideal processing time. Therefore, the difference between the message processing time and the benchmark processing time can, to a certain extent, represent the gap between the current message processing capability of the first long-haul switch and the ideal. Therefore, the difference between the message processing time and the benchmark processing time can be used as the processing time difference.

[0099] S404 : Determine a congestion index according to the queue length change value, the transmission time difference, and the processing time difference.

[0100] Among them, the congestion index represents the probability of network congestion to a certain extent.

[0101] Optionally, the weights of queue length, transmission time, and processing time can be determined separately based on experience or experiments; or, the weights of queue length, transmission time, and processing time can be determined separately based on the degree of their impact on network congestion; further, conversion functions of queue length, transmission time, and processing time are introduced respectively to convert the queue length change value, transmission time difference, and processing time difference into standard scores.

[0102] The queue length change can be substituted into the queue length conversion function to obtain the standard score for queue length. The transmission time can be substituted into the transmission time conversion function to obtain the standard score for transmission time. The processing time can be substituted into the processing time conversion function to obtain the standard score for processing time. Furthermore, based on the weights of queue length, transmission time, and processing time, the standard score for queue length, transmission time, and processing time are weighted and summed to obtain the congestion index.

[0103] Exemplarily, the expression of the congestion index is: CI =αf LT(Δt1)+βfPT (Δt2)+γfQL (ΔQL) where α is the weight of the queue length; β is the weight of the transmission time; γ is the weight of the processing time; f LT() is the conversion function of the queue length; fPT () is the conversion function of the transmission time; fQL () is the conversion function of the processing time; Δt1 is the change value of the queue length; Δt2 is the transmission time difference; ΔQL is the processing time difference.

[0104] S405: If the congestion index is greater than the preset index threshold, it is determined that network congestion occurs.

[0105] The preset index threshold is the value of the congestion index at which network congestion occurs.

[0106] Optionally, if the congestion index is greater than a preset index threshold, it indicates that network congestion is about to occur.

[0107] In this embodiment, by introducing the transmission time difference, the processing time difference and the queue length change value, the network congestion situation can be accurately analyzed, and further, whether network congestion occurs can be accurately predicted.

[0108] Optionally, in one embodiment, Figure 5 As shown, a method for determining identity confirmation information is provided, which specifically includes the following steps:

[0109] S501: Receive a network detection instruction sent by a network control device in a long-distance internet network.

[0110] The network detection instruction is used to instruct each programmed switch in the long-distance interconnection network to perform network detection.

[0111] It should be noted that during the initialization phase, the network control device sends a network detection instruction to all programmable switches in the long-distance interconnection network. Therefore, the first long-distance switch will receive the network detection instruction sent by the network control device in the long-distance interconnection network.

[0112] S502, in response to the network detection instruction, sending network detection information to the programmable switch interconnected with the first long-distance switch in the long-distance interconnection network, so that the programmable switch interconnected with the first long-distance switch performs network detection and sends the network detection result to the network control device; and performing network detection according to the received network detection information sent by the programmable switch interconnected with the first long-distance switch, and sending the network detection result to the network control device.

[0113] Among them, the network detection information includes a sending timestamp, which is used for network detection; the network detection result obtained by the first long-distance switch and any interconnected programmable switch for network detection includes the interconnection link transmission time and the test message processing time; the interconnection link transmission information is the transmission time used by the first long-distance switch to send the network detection information to the interconnected programmable switch; the test message processing time is the time it takes for the first interconnected programmable switch to process the network detection information.

[0114] Optionally, in response to the network detection instruction, the first long-distance switch sends network detection information to all programmable switches interconnected with the first long-distance switch to perform network detection. After receiving the network detection information, any programmable switch interconnected with the first long-distance switch calculates the interconnection link transmission time based on the time of receiving the network detection information and the transmission timestamp contained in the network detection information, and determines the test message processing time based on the time it takes the programmable switch to process the network detection information. Furthermore, the programmable switch sends the interconnection link transmission time and the test message processing time as the network detection result to the network control device.

[0115] Correspondingly, the first long-distance switch will also receive network detection information sent by all programmable switches interconnected with the first long-distance switch. The first long-distance switch will also use the above process to obtain network detection results and send the network detection results to the network control device.

[0116] S503: Receive identity confirmation information sent by the network control device.

[0117] The identity confirmation information is determined by the network control device based on the received network detection result, and is used to point to the second long-distance switch interconnected with the first long-distance switch. The identity confirmation information includes a reference transmission time and a reference processing time.

[0118] Optionally, after receiving the network detection results sent by the first long-distance switch for network detection with each interconnected programmable switch, and the detection results sent by each programmable switch interconnected with the first long-distance switch for network detection with the first long-distance switch, the network control device will comprehensively perform identity negotiation on the first long-distance switch and each programmable switch interconnected with the first long-distance switch based on all network detection results.

[0119] For example, for a second long-distance switch interconnected with a first long-distance switch, if, based on the network detection result sent by the second long-distance switch and the network detection result sent by the first long-distance switch obtained by performing network detection on the second long-distance switch, it is analyzed that this pair of interconnected programmable switches is a long-distance switch, identity confirmation information directed to the second long-distance switch is sent to the first long-distance switch, and at the same time, identity confirmation information directed to the first long-distance switch is also sent to the second long-distance switch.

[0120] It can be understood that based on the above description, the identity confirmation information is sent by the network control device when it determines that the first long-distance switch and the second long-distance switch meet the long-distance conditions based on the target detection result, and the target detection result is the network detection result obtained by the first long-distance switch and the second long-distance switch performing network detection.

[0121] Furthermore, the long distance condition is that the interconnection link transmission time in the target detection result is greater than a transmission time threshold, or the test message processing time in the target detection result is greater than a processing time threshold.

[0122] It should be noted that the identity confirmation information includes the benchmark transmission time and the benchmark processing time; wherein, the benchmark transmission time is determined by the network control device based on the interconnection link transmission time in the target detection result; the benchmark processing time is determined by the network control device based on the test message processing time in the target detection result; illustratively, the interconnection link transmission time can be directly used as the benchmark transmission time, and the test message processing time can be used as the benchmark processing time.

[0123] In addition, the identity confirmation information may also include a preset reference length value.

[0124] In this embodiment, a network control device is introduced to instruct each programmable switch in the long-distance interconnection network to perform network detection, and identity negotiation is performed based on the network detection results sent by each programmable switch to screen out long-distance switches, thereby ensuring the accuracy of the determined long-distance switches.

[0125] In an exemplary embodiment, Figure 6 As shown, a network congestion warning method is provided, which is applied to Figure 1B Taking the second long-distance switch 102 in FIG. 1 as an example, the method specifically includes the following steps:

[0126] S601: When there is a service message forwarding task, if it is determined that the next-hop device of the service message is a first long-distance switch interconnected with a second long-distance switch, a message sending timestamp is added to the service message according to the sending time of the service message to the first long-distance switch.

[0127] When there is a business message forwarding task, the next-hop device of the business message can be determined according to the forwarding table entry of the business message; if the next-hop device is determined to be the first long-distance switch interconnected with the second long-distance switch, it is necessary to add a message sending timestamp to the business message based on the sending time of the business message to the first long-distance switch.

[0128] S602: Send the service message carrying the message sending timestamp to the first long-distance switch, so that the first long-distance switch adds the service message to the message queue. If network congestion is determined to occur based on the message sending timestamp, the message receiving time of the service message, the message forwarding time of forwarding the service message to the next-hop device of the first long-distance switch, and the message queue length change information, the first long-distance switch sends network congestion information to the second long-distance switch.

[0129] Optionally, a service message carrying a message sending timestamp is sent to the first long-distance switch. After receiving the service message carrying the message sending timestamp, the first long-distance switch extracts the message sending timestamp and, based on the message sending timestamp, the message reception time of the service message, the message forwarding time of forwarding the service message to the next-hop device of the first long-distance switch, and the message queue length change information, predicts network congestion. If it is predicted that network congestion occurs, the first long-distance switch sends network congestion information to the second long-distance switch.

[0130] S603: Receive network congestion information sent by the first long-distance switch.

[0131] Optionally, after receiving the network congestion information sent by the first long-distance switch, the second long-distance switch will promptly limit the network flow to avoid sending network congestion.

[0132] In this embodiment, by adding a message sending timestamp to the service message, the first long-distance switch can timely analyze the network congestion situation based on the message sending timestamp, the message receiving time of the service message, the message forwarding time of forwarding the service message to the next-hop device of the first long-distance switch, and the change in the length of the message queue. When it is determined that network congestion occurs, the network congestion information is directly sent to the second long-distance switch, which effectively shortens the feedback time of congestion control under the long-distance link, reduces the network packet loss rate, and also reduces the requirements for the cache capacity of the interconnected devices.

[0133] In order to more intuitively describe the process of the network congestion warning method provided by this application, in one embodiment, Figure 7AThe figure shows an application scenario provided by an embodiment of the present application. A GPU (Graphics Processing Unit) is a processor, including GPUA and GPUB. There are four switches between GPUA and GPUB, namely Switch 1, Switch 2, Switch 3, and Switch 4. On this basis, each switch performs network detection. For example, after Switch 2 obtains the network detection information sent by Switch 1, it calculates that the interconnection link transmission time LT0 (1-2) is 0.32ms, and the test message processing time PT0 (1-2) is 2.5us; after Switch 3 obtains the network detection information sent by Switch 2, it calculates that the interconnection link transmission time LT0 (2-3) is 1.71ms (exceeding the preset value of 1ms), and the test message processing time PT0 (2-3) is 3.1us; after Switch 4 obtains the network detection information sent by Switch 3, it calculates that the interconnection link transmission time LT0 (3-4) is 0.47ms, and the test message processing time PT0 (3-4) is 2.8us. Switches 2 and 3 are confirmed as long-haul interconnect switches, with a baseline transmission time (LT0) of 1.71ms and a baseline processing time (PT0) of 3.1us. Fast congestion feedback is enabled on both switches. This means that Switch 2 is the second-longest-haul switch, and Switch 3 is the first-longest-haul switch.

[0134] like Figure 7B The figure shows the network congestion warning process for the first and second long-distance switches provided in an embodiment of the present application. The local switch is switch 2, and the remote switch is switch 3. The local switch determines, based on the forwarding table entry, that the outgoing interface of the service message is the remote long-distance switch. The service message to be sent is stamped with the message sending timestamp ST1, inserted into the INT message, and sent to the remote long-distance switch. The remote long-distance switch receives and parses the service message, records ST1, stamps the message arrival timestamp AT1, and sends it to the data processing unit. When the remote long-distance switch removes the service message from the message queue, it records the message forwarding timestamp QT1 and then sends it to the next-hop device (switch or server). Simultaneously, a preset reference length value QL0 and length change value QL1 are obtained.

[0135] The remote long-distance switch combines ST1, AT1, QT1, QL0, and QL1 to comprehensively determine whether congestion is currently occurring. Specifically:

[0136] The baseline transmission time LT0 is 1.71ms, the baseline processing time PT0 is 3.1us, and the preset baseline length QL0 is 300MB. The packet transmission time LT1 is equal to the packet arrival timestamp AT1 minus the packet sending timestamp ST1, which is 2.16ms. The packet processing time PT1 is equal to the packet forwarding timestamp QT1 minus the packet arrival timestamp AT1, which is 10.7us. The length change QL1 is 325.76MB. Based on the above data, we can calculate the transmission time difference △t1 as follows: the packet transmission time LT1 minus the baseline transmission time LT0, which is 0.45ms. The processing time difference △t2 is equal to the packet processing time PT1 minus the packet processing time PT0, which is 7.6us. The queue length change △QL is equal to the length change QL1 minus the preset baseline length QL0, which is 25.76MB. Based on this, the congestion index can be calculated as: CI = αf LT (Δt1) + βfPT (Δt2) + γfQL (ΔQL) = 0.2 × fLT (0.45) + 0.5 × fPT (7.6) + 0.3 × fQL (25.76) = 3.62 > 2 (2 is the preset index threshold). Therefore, if the current network is congested, the remote long-haul switch will immediately send a congestion notification message to the connected local long-haul switch.

[0137] Figure 8 FIG1 is a flow chart of a network congestion early warning method in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a network congestion early warning method. Figure 8 The specific implementation process is as follows:

[0138] S801: When the second long-distance switch has a service message forwarding task, if it determines that the next-hop device of the service message is the first long-distance switch interconnected with the second long-distance switch, a message sending timestamp is added to the service message according to the sending time of the service message to the first long-distance switch.

[0139] S802: Send the service message carrying the message sending timestamp to the first long-distance switch.

[0140] S803: After receiving the service message sent by the second long-distance switch interconnected with the first long-distance switch, the first long-distance switch adds a message arrival timestamp to the service message according to the message reception time of the service message, and adds the service message to the message queue.

[0141] The service message carries a message sending timestamp.

[0142] S804: The first long-distance switch adds a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next-hop device.

[0143] S805: The first long-distance switch determines the message transmission time according to the difference between the message arrival timestamp and the message sending timestamp.

[0144] S806: The first long-distance switch determines the message processing time according to the difference between the message forwarding timestamp and the message arrival timestamp.

[0145] S807: The first long-distance switch determines a queue length change value according to the message queue length change information.

[0146] S808: The first long-distance switch determines a transmission time difference according to the difference between the message transmission time and the reference transmission time.

[0147] S809: The first long-distance switch determines a processing time difference according to the difference between the message processing time and the reference processing time.

[0148] S810: The first long-distance switch determines a congestion index according to the queue length change value, the transmission time difference, and the processing time difference.

[0149] S811: If the congestion index is greater than a preset index threshold, it is determined that network congestion occurs.

[0150] S812: The first long-distance switch sends network congestion information to the second long-distance switch.

[0151] S813: After receiving the network congestion information, the second long-distance switch limits the flow of the long-distance interconnection network.

[0152] The specific process of the above S801-S813 can be found in the description of the above method embodiment. The implementation principle and technical effects are similar and will not be repeated here.

[0153] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0154] Based on the same inventive concept, embodiments of the present application also provide a network congestion warning device for implementing the aforementioned network congestion warning method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more embodiments of the network congestion warning device provided below can be found in the aforementioned limitations of the network congestion warning method and will not be further elaborated here.

[0155] In an exemplary embodiment, Figure 9 As shown, a network congestion warning device 900 is provided, which is configured in a first long-distance switch in a long-distance interconnection network, including: a message receiving module 910, a first adding module 920 and a congestion warning module 930, wherein:

[0156] The message receiving module 910 is used to add a message arrival timestamp to the business message according to the message reception time of the business message after receiving the business message sent by the second long-distance switch interconnected with the first long-distance switch, and add the business message to the message queue; wherein the business message carries the message sending timestamp.

[0157] The first adding module 920 is configured to add a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next-hop device.

[0158] The congestion warning module 930 is configured to send network congestion information to the second long-distance switch when determining that network congestion occurs based on the message sending timestamp, message arrival timestamp, message forwarding timestamp and message queue length change information.

[0159] In one embodiment, the congestion warning module 930 includes:

[0160] The first determining unit is configured to determine the message transmission time according to a difference between a message arrival timestamp and a message sending timestamp.

[0161] The second determining unit is configured to determine the message processing time according to a difference between the message forwarding timestamp and the message arrival timestamp.

[0162] The third determining unit is configured to determine that network congestion occurs according to the message transmission time, the message processing time, and the length change information of the message queue.

[0163] In one embodiment, the third determining unit includes:

[0164] The first determining subunit is configured to determine a queue length change value according to the message queue length change information.

[0165] The second determining subunit is configured to determine a transmission time difference according to a difference between the message transmission time and the reference transmission time.

[0166] The third determining subunit is configured to determine a processing time difference according to a difference between the message processing time and a reference processing time.

[0167] The fourth determining subunit is configured to determine a congestion index according to the queue length change value, the transmission time difference, and the processing time difference.

[0168] The congestion judgment subunit is configured to determine that network congestion occurs if the congestion index is greater than a preset index threshold.

[0169] In one embodiment, the third determination unit further includes an identity confirmation subunit, configured to:

[0170] Receive a network detection instruction sent by a network control device in a long-distance interconnected network; in response to the network detection instruction, send network detection information to a programmable switch interconnected with a first long-distance switch in the long-distance interconnected network, so that the programmable switch interconnected with the first long-distance switch performs network detection and sends the network detection result to the network control device; and perform network detection based on the received network detection information sent by the programmable switch interconnected with the first long-distance switch, and send the network detection result to the network control device; receive identity confirmation information sent by the network control device; wherein the identity confirmation information is determined by the network control device based on the received network detection result, and the identity confirmation information is used to point to the second long-distance switch interconnected with the first long-distance switch.

[0171] In one embodiment, the identity confirmation information includes a benchmark transmission time and a benchmark processing time; wherein the benchmark transmission time is determined by the network control device based on the interconnection link transmission time in the target detection result; the benchmark processing time is determined by the network control device based on the test message processing time in the target detection result; the target detection result is a network detection result obtained by the first long-distance switch and the second long-distance switch through network detection.

[0172] In one embodiment, the identity confirmation information is sent by the network control device when it determines, based on the target detection result, that the first long-distance switch and the second long-distance switch meet the long-distance condition; wherein the long-distance condition is that the interconnection link transmission time in the target detection result is greater than the transmission time threshold, or the test message processing time in the target detection result is greater than the processing time threshold; the target detection result is the network detection result obtained by the first long-distance switch and the second long-distance switch through network detection.

[0173] In an exemplary embodiment, Figure 10As shown, a network congestion warning device 1000 is provided, which is configured in a second long-distance switch in a long-distance interconnection network, including: a second adding module 1010, a message forwarding module 1020 and an information receiving module 1030, wherein:

[0174] The second adding module 1010 is configured to, when there is a service message forwarding task, add a message sending timestamp to the service message based on the sending time of the service message to the first long-distance switch if it is determined that the next-hop device of the service message is the first long-distance switch interconnected with the second long-distance switch.

[0175] The message forwarding module 1020 is configured to send the service message carrying the message sending timestamp to the first long-distance switch, so that the first long-distance switch adds the service message to a message queue, and, if network congestion is determined to occur based on the message sending timestamp, the message reception time of the service message, the message forwarding time for forwarding the service message to the next-hop device of the first long-distance switch, and the message queue length change information, send network congestion information to the second long-distance switch.

[0176] The information receiving module 1030 is configured to receive network congestion information sent by the first long-distance switch.

[0177] Each module in the aforementioned network congestion warning device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor within a communication device in hardware form, or may be stored in a memory within the communication device in software form, so that the processor can call and execute the corresponding operations of each module.

[0178] In an exemplary embodiment, a communication device is provided. The communication device may be a network device integrated with a programmable switch, and its internal structure diagram may be as follows: Figure 11 As shown. The communication device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the communication device is used to exchange information between the processor and an external device. The communication interface of the communication device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a network congestion warning method is implemented.

[0179] Those skilled in the art will understand that Figure 11 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the communication device to which the scheme of the present application is applied. The specific communication device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0180] In an exemplary embodiment, a communication device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the network congestion warning method provided in the above embodiment when executing the computer program.

[0181] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the network congestion warning method provided in the above embodiment are implemented.

[0182] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the network congestion warning method provided in the above embodiment are implemented.

[0183] It should be noted that the data involved in this application (including but not limited to data used for analysis, storage, display, etc.) are all information and data fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0184] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0185] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0186] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A network congestion early warning method, characterized in that: Applied to a first long-distance switch in a long-distance internet network, the method comprises: After receiving a service message sent by a second long-distance switch interconnected with the first long-distance switch, adding a message arrival timestamp to the service message according to the message reception time of the service message, and adding the service message to the message queue; wherein the service message carries the message sending timestamp; Adding a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next hop device; When it is determined that network congestion occurs according to the message sending timestamp, the message arrival timestamp, the message forwarding timestamp and the message queue length change information, network congestion information is sent to the second long-distance switch.

2. The method according to claim 1, characterized in that The determining, based on the message sending timestamp, the message arrival timestamp, the message forwarding timestamp, and the length change information of the message queue, that network congestion occurs includes: Determining a message transmission time based on a difference between the message arrival timestamp and the message sending timestamp; Determining a message processing time based on a difference between the message forwarding timestamp and the message arrival timestamp; It is determined that network congestion occurs according to the message transmission time, the message processing time and the length change information of the message queue.

3. The method according to claim 2, characterized in that The determining, based on the message transmission time, the message processing time, and the change in the length of the message queue, that network congestion occurs includes: Determining a queue length change value according to the message queue length change information; Determine a transmission time difference according to a difference between the message transmission time and a reference transmission time; Determining a processing time difference based on a difference between the message processing time and a benchmark processing time; determining a congestion index according to the queue length change value, the transmission time difference, and the processing time difference; If the congestion index is greater than a preset index threshold, it is determined that network congestion occurs.

4. The method according to claim 3, characterized in that The method further comprises: receiving a network detection instruction sent by a network control device in the long-distance internet network; In response to the network detection instruction, sending network detection information to a programmable switch interconnected with the first long-distance switch in the long-distance interconnection network, so that the programmable switch interconnected with the first long-distance switch performs network detection and sends a network detection result to the network control device; and performing network detection according to the received network detection information sent by the programmable switch interconnected with the first long-distance switch, and sending the network detection result to the network control device; Receive identity confirmation information sent by the network control device; wherein the identity confirmation information is determined by the network control device according to the received network detection result, and the identity confirmation information is used to point to a second long-distance switch interconnected with the first long-distance switch.

5. The method according to claim 4, characterized in that The identity confirmation information includes a benchmark transmission time and a benchmark processing time; The reference transmission time is determined by the network control device according to the interconnection link transmission time in the target detection result; the reference processing time is determined by the network control device according to the test message processing time in the target detection result; The target detection result is a network detection result obtained by performing network detection on the first long-distance switch and the second long-distance switch.

6. The method according to claim 4, characterized in that The identity confirmation information is sent by the network control device when it is determined, based on the target detection result, that the first long-distance switch and the second long-distance switch meet the long-distance condition; The long distance condition is that the interconnection link transmission time in the target detection result is greater than a transmission time threshold, or the test message processing time in the target detection result is greater than a processing time threshold; The target detection result is a network detection result obtained by performing network detection on the first long-distance switch and the second long-distance switch.

7. A network congestion early warning method, characterized in that: Applied to a second long-distance switch in a long-distance internetwork, the method comprises: In the case where there is a service message forwarding task, if it is determined that the next-hop device of the service message is the first long-distance switch interconnected with the second long-distance switch, adding a message sending timestamp to the service message according to the sending time of the service message to the first long-distance switch; sending the service message carrying the message sending timestamp to the first long-distance switch, so that the first long-distance switch adds the service message to a message queue, and, if it is determined that network congestion occurs based on the message sending timestamp, the message receiving time of the service message, the message forwarding time of forwarding the service message to the next-hop device of the first long-distance switch, and the message queue length change information, sending network congestion information to the second long-distance switch; Receive network congestion information sent by the first long-distance switch.

8. A network congestion warning device, characterized in that: A first long-distance switch configured in a long-distance internet network, the device comprising: a message receiving module, configured to, upon receiving a service message sent by a second long-distance switch interconnected with the first long-distance switch, add a message arrival timestamp to the service message according to a message reception time of the service message, and add the service message to a message queue; wherein the service message carries a message sending timestamp; A first adding module is used to add a message forwarding timestamp to the service message according to the message forwarding time of forwarding the service message to the next hop device; The congestion warning module is configured to send network congestion information to the second long-distance switch when it is determined that network congestion occurs based on the message sending timestamp, the message arrival timestamp, the message forwarding timestamp and the message queue length change information.

9. A network congestion warning device, characterized in that: A second long-distance switch configured in a long-distance internet network, the device comprising: a second adding module configured to, when there is a service message forwarding task, add a message sending timestamp to the service message based on a sending time of the service message to the first long-distance switch if it is determined that the next-hop device of the service message is the first long-distance switch interconnected with the second long-distance switch; a message forwarding module, configured to send the service message carrying the message sending timestamp to the first long-distance switch, so that the first long-distance switch adds the service message to a message queue, and, if network congestion is determined to have occurred based on the message sending timestamp, a message reception time of the service message, a message forwarding time for forwarding the service message to a next-hop device of the first long-distance switch, and message queue length change information, send network congestion information to the second long-distance switch; The information receiving module is configured to receive the network congestion information sent by the first long-distance switch.

10. A communication device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.