Message processing method and system, and device, medium and product

By obtaining the RTT between forwarding devices and selecting low-latency ports to generate a forwarding table, the problem of link latency affecting transmission efficiency in communication networks is solved, thus achieving efficient and reliable data transmission.

WO2026138917A1PCT designated stage Publication Date: 2026-07-02CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD +1

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
Filing Date
2025-12-24
Publication Date
2026-07-02

Smart Images

  • Figure CN2025145340_02072026_PF_FP_ABST
    Figure CN2025145340_02072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a message processing method and system, and a device, a medium and a product, wherein the method is applied in a network communication process. The method comprises: first acquiring a round-trip time between an alternative port in a first forwarding device and a second forwarding device; then, on the basis of the round-trip time, selecting a target port available in the first forwarding device; and finally, on the basis of transmission link information including the target port, generating a forwarding table in the first forwarding device, wherein the forwarding table is used for forwarding a data message to be processed to the second forwarding device. Since a port with a low round-trip time is chosen, a transmission link selected from among the forwarding table is also low-delay, thereby ensuring the data transmission efficiency. In the process of generating the forwarding table on the basis of the round-trip time, a faulty transmission link between the first forwarding device and the second forwarding device can be filtered out, such that all transmission links in the forwarding table are available. Even if the transmission link is faulty, the use of the forwarding table cannot affect the normal forwarding of a message.
Need to check novelty before this filing date? Find Prior Art

Description

Message processing methods, systems, equipment, media and products

[0001] This disclosure claims priority to Chinese Patent Application No. 202411921577.6, filed with the China Patent Office on December 24, 2024, entitled “Message Processing Method, System, Apparatus, Media and Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This disclosure relates to the field of network communications, and more particularly to a message processing method, system, device, medium, and product. Background Technology

[0003] Various forwarding devices in a communication network enable the transmission of messages between different networks or subnets, ensuring that users can access the services provided by service providers. Specifically, forwarding devices can query transmission link information in their local forwarding tables and use the query results to transmit messages.

[0004] In practice, the latency of the transmission link between forwarding devices obviously affects the packet transmission efficiency, thereby impacting the user experience of the service and potentially even causing the service to become unusable. Therefore, ensuring efficient packet transmission becomes a pressing issue. Summary of the Invention

[0005] In view of this, embodiments of the present disclosure provide a message processing method, system, device, medium, and product to ensure the efficiency of message transmission.

[0006] In a first aspect, embodiments of this disclosure provide a message processing method, including:

[0007] Obtain the round-trip time between the alternative ports in the first forwarding device and the second forwarding device;

[0008] Based on the round-trip time, the target port is determined from the candidate ports;

[0009] A forwarding table is generated in the first forwarding device based on the transmission link information containing the target port, so as to send the data packet to be processed to the second forwarding device using the forwarding table.

[0010] In a second aspect, embodiments of this disclosure provide a message processing system, including: a first forwarding device and a second forwarding device;

[0011] The first forwarding device is configured to obtain the round-trip time between the candidate ports in the first forwarding device and the second forwarding device respectively; determine the target port from the candidate ports according to the round-trip time; and generate a forwarding table in the first forwarding device according to the link information containing the target port.

[0012] The second forwarding device is used to receive the data packets to be processed sent by the first forwarding device using the forwarding table.

[0013] Thirdly, embodiments of this disclosure provide an electronic device including a processor and a memory, wherein the memory stores one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the message processing method described in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication systems.

[0014] Fourthly, embodiments of this disclosure provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, enables the processor to at least implement the message processing method as described in the first aspect.

[0015] Fifthly, embodiments of this disclosure provide a computer program product, the computer program product including a computer program or instructions, which, when executed by a processor, cause the processor to implement the message processing method as described in the first aspect above.

[0016] The message processing method provided in this embodiment first obtains the round-trip time (RTT) between the candidate ports in the first forwarding device and the second forwarding device. Then, it selects an available target port in the first forwarding device based on this RTT. Finally, it generates a forwarding table in the first forwarding device based on the transmission link information including the target port. The first forwarding device can use the aforementioned forwarding table to forward the data packets to be processed to the second forwarding device.

[0017] As can be seen, the above method selects ports and generates a forwarding table based on round-trip time (RTT). Since ports with low RTTs are selected, the transmission links chosen from the forwarding table also have low latency, thus ensuring data transmission efficiency. Furthermore, since obtaining the RTT means that the transmission link between the port and the second forwarding device is not faulty, the process of generating the forwarding table actually includes a link fault detection process. That is, during the process of generating the forwarding table based on RTT, faulty transmission links between the first and second forwarding devices can be filtered out, ensuring that all transmission links in the forwarding table are usable. Therefore, even if a transmission link fails, using the above forwarding table will not affect the normal forwarding of packets. Moreover, using RTT can directly detect link faults without relying on other devices on the transmission link. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 is a flowchart of a message processing method provided in an embodiment of this disclosure;

[0020] Figure 2 is a flowchart of an RTT determination method provided in an embodiment of this disclosure;

[0021] Figure 3a is a schematic diagram of the relationship between an interface, a port group, and ports provided in an embodiment of this disclosure;

[0022] Figure 3b is a schematic diagram illustrating the relationship between an interface, alternative ports, and a target port provided in an embodiment of this disclosure;

[0023] Figure 3c is a schematic diagram showing the relationship between another interface, alternative ports and target ports provided in an embodiment of this disclosure;

[0024] Figure 4 is a flowchart of a method for determining a time delay interval provided in an embodiment of this disclosure;

[0025] Figure 5 is a schematic diagram of the structure of a probe message provided in an embodiment of this disclosure;

[0026] Figure 6a is a schematic diagram of a process for alternating updating and using multiple forwarding tables according to an embodiment of this disclosure;

[0027] Figure 6b is a schematic diagram of another process for alternating updating and using multiple forwarding tables provided in an embodiment of this disclosure;

[0028] Figure 7 is a schematic diagram of the structure of a message processing system provided in an embodiment of this disclosure;

[0029] Figure 8 is a schematic diagram of another message processing system provided in an embodiment of this disclosure;

[0030] Figure 9 is a schematic diagram of the structure of a message processing device provided in an embodiment of this disclosure;

[0031] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0033] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The singular forms “a,” “the,” and “the” used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.

[0034] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0035] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to identification.” Similarly, depending on the context, the phrases “if determination” or “if identification (of the condition or event of the statement)” can be interpreted as “when determination” or “in response to determination” or “when identification (of the condition or event of the statement)” or “in response to identification (of the condition or event of the statement).”

[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0037] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.

[0038] Based on the introduction in the background art, before describing in detail the content provided in the various embodiments of this disclosure, the background of using the following embodiments of this disclosure can be described in more detail.

[0039] Users generate messages while using services provided by service providers. These messages, called data packets, can represent data streams. Through transmission links between different forwarding devices in a communication network, data packets can be transmitted between different networks or subnets to ensure the normal operation of the service. Service providers can provide services through applications or cloud services. Data packets generated by different services can belong to different data streams, and the content of the data packets varies depending on the service. For example, when the service is cloud gaming, the data packets may include game data; when the service is cloud computing, the data packets may include calculation results.

[0040] The first forwarding device and the second forwarding device can be two adjacent devices on any transmission link in a communication network that are transmitting data. Even if the transmission link between them fails, the methods or systems provided in the following embodiments of this disclosure can still ensure the normal transmission of data packets. Optionally, the cause of the transmission link failure may include a port failure of the first forwarding device, or it may include failures of other devices on the transmission link.

[0041] The devices located at both ends of the transmission link can be referred to as the source device and the destination device, respectively, and the remaining devices on the transmission link can be referred to as intermediate devices. Optionally, in one case, the first forwarding device can be the source device on the transmission link, and the second forwarding device can be an intermediate device on the transmission link. In another case, both the first and second forwarding devices can be intermediate devices on the transmission link. Yet another case, the first forwarding device can be an intermediate device on the transmission link, and the second forwarding device can be the destination device on the transmission link.

[0042] The following detailed description of some embodiments of this disclosure is provided in conjunction with the accompanying drawings. Where there is no conflict between the embodiments, the following embodiments and features can be combined with each other. Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.

[0043] Figure 1 is a flowchart of a message processing method provided in an embodiment of this disclosure. The method provided in this embodiment can be executed by a first forwarding device in a communication network. As shown in Figure 1, the method may include the following steps:

[0044] S101, obtain the RTT between the alternative ports in the first forwarding device and the second forwarding device respectively.

[0045] Message transmission can occur between the first and second forwarding devices. More specifically, these messages can be sent from the backup port of the first forwarding device to the second forwarding device. Optionally, these messages can be data packets generated by users during service usage, or probe packets transmitted between the first and second forwarding devices specifically for detecting link failures. The first forwarding device can then use historical data packets or probe packets to determine the RTT between the backup port and the second forwarding device. The historical data packets can be data packets forwarded to the second forwarding device via the backup port of the first forwarding device within a historical time period. Optionally, the historical time period can be any period prior to the current time, and the historical time period can be in the range of seconds, such as 10 seconds.

[0046] The RTT (Round-Trip Time) between the alternative ports and the second forwarding device, as mentioned in the embodiments of this disclosure, refers to the total time required for a message to be sent from any of the alternative ports included in the first forwarding device, transmitted to the second forwarding device via the transmission link mapped to that port, for the second forwarding device to respond to the message, and for the response result to be returned to the first forwarding device by the second forwarding device. For any port in the first forwarding device, the hash result of the port number maps that port to a corresponding transmission link. It is readily understood that a smaller RTT indicates lower transmission link latency.

[0047] Based on the meaning of RTT described above, when the first forwarding device obtains the RTT based on historical data packets, the specific process can be as follows: For historical data packets sent from the backup ports of the first forwarding device, the first forwarding device can obtain the sending time of the historical data packet and the time when it receives the response result of the historical data packet from the second forwarding device, and determine the RTT between the backup ports and the second forwarding device based on the sending time of the historical data packet and the receiving time of the response result. It can be seen that one RTT corresponds to one port. The specific process by which the first forwarding device obtains the RTT using probe packets can be described in detail in the embodiment shown in Figure 2 below.

[0048] It is easy to understand that if the first forwarding device can obtain the RTT, it means that the port corresponding to the RTT and the transmission link mapped to the port have not failed. Therefore, the process of the first forwarding device obtaining the RTT actually includes the fault detection process of the transmission link.

[0049] Optionally, the first forwarding device and the second forwarding device can belong to different clusters, and each cluster can be provided by a service provider. Optionally, the forwarding devices in a cluster can include any device with packet forwarding function in a communication network, such as a switch, gateway, or router. Optionally, the forwarding devices in a cluster can be physical devices or virtual devices. Any forwarding device in any cluster can transmit packets with any forwarding device in other clusters. The embodiments of this disclosure are illustrated using the packet transmission process between a first forwarding device in one cluster and a second forwarding device in another cluster as an example.

[0050] S102, determine the target port from the candidate ports according to the RTT.

[0051] Then, the first forwarding device can select a target port from the candidate ports based on the RTT obtained in step S101. Optionally, the first forwarding device can filter out RTTs less than or equal to a preset threshold from the RTTs obtained in step S101, and the port corresponding to the selected RTT can be determined as the target port. Optionally, the preset threshold can usually be set to a small value; therefore, the transmission link mapped to the target port selected in the above manner has low latency.

[0052] S103, a forwarding table in the first forwarding device is generated based on the transmission link information including the target port. The forwarding table is used to send the data packet to be processed to the second forwarding device, and the transmission link information in the forwarding table corresponds to the transmission link between the first forwarding device and the second forwarding device.

[0053] Finally, the first forwarding device can generate a forwarding table locally, which can record transmission link information including the aforementioned target ports. When a data packet to be processed is obtained after the forwarding table is generated, the first forwarding device can use this forwarding table to forward the data packet to the second forwarding device.

[0054] Specifically, since the transmission links in the forwarding table are all low-latency, the first forwarding device may optionally send the message to be processed from any port in the target port and transmit it to the second forwarding device via the transmission link mapped to that port.

[0055] In practice, the first forwarding device and the second forwarding device can transmit data packets belonging to different data streams. Therefore, the data packets to be processed forwarded by the forwarding table and the historical data packets used in step S101 can belong to the same or different data streams.

[0056] In this embodiment, the RTT (Round-Trip Time) between the candidate ports in the first forwarding device and the second forwarding device is obtained. Then, based on this RTT, an available target port in the first forwarding device is selected. Finally, a forwarding table in the first forwarding device is generated based on the transmission link information including the target port. The first forwarding device can use this forwarding table to forward the data packets to be processed to the second forwarding device.

[0057] As can be seen, the above method selects ports and generates a forwarding table based on round-trip time (RTT). Since ports with low RTTs are selected, the transmission links chosen from the forwarding table also have low latency, thus ensuring efficient data transmission. Furthermore, since obtaining the RTT means that the transmission link between the port and the second forwarding device is not faulty, the forwarding table generation process actually includes a link fault detection process. Therefore, even if the transmission link between the first and second forwarding devices fails, the faulty transmission link can be filtered out during the RTT-based forwarding table generation process. This ensures that all transmission links in the forwarding table are usable and will not affect the normal forwarding of packets.

[0058] Based on the embodiment shown in Figure 1, optionally, for the first forwarding device, which manifests as a physical device, the aforementioned logic for generating the forwarding table and the logic for forwarding data packets can be implemented by a programmable network switching chip in the first forwarding device. Optionally, the network switching chip can be implemented using a Programming Protocol-Independent Packet Processors (P4) language. Furthermore, this hardware network switching chip makes the first forwarding device more suitable for forwarding large data flows.

[0059] Furthermore, the technical effects achieved by the methods and systems provided in the embodiments of this disclosure can also be understood in conjunction with the following:

[0060] 1. When the source and second forwarding devices are deployed in wide area networks (WANs) or metropolitan area networks (MANs) with wide coverage and high transmission traffic, packets will pass through equipment from different vendors and networks from different operators during their transmission from the first to the second forwarding device. In this case, if Segment Routing Traffic Engineering (SRTE) technology is used for fault detection of the transmission link, it is necessary to utilize the network topology information collected by each device in the transmission link.

[0061] As shown in the embodiment in Figure 1, the first forwarding device can directly use RTT to detect link faults without relying on other devices in the transmission link, thereby reducing the difficulty of link fault detection and making it easier for the first forwarding device to select a fault-free, low-latency transmission link to transmit the data packets to be processed.

[0062] Optionally, the first and second forwarding devices mentioned in the embodiments of this disclosure can be devices provided by the service provider. Therefore, by using the methods and systems provided in this disclosure, the service provider can have the ability to select low-latency transmission links in real time.

[0063] 2. The forwarding table used in the data packet forwarding process is located on the data plane of the first forwarding device. This forwarding table is generated directly by the first forwarding device using data plane data. It is not issued by the decision center in the communication network, nor does it require the control plane of the first forwarding device to issue data. Omitting the issuance process obviously improves the efficiency of forwarding table generation.

[0064] 3. As can be seen from the description in the embodiment shown in Figure 1, the forwarding table is generated based on RTT. In practice, RTT is second-level data, which can shorten the time required for the first forwarding device to obtain RTT, thereby further improving the efficiency of forwarding table generation, so that the time taken to generate the forwarding table is also in the second level.

[0065] 4. Optionally, using the methods or systems provided in the embodiments of this disclosure, the first forwarding device can also periodically generate a forwarding table. When a transmission link between the first forwarding device and the second forwarding device fails within the current generation period of the forwarding table, since the forwarding table can be generated within seconds, the first forwarding device can also remove the faulty link from the forwarding table corresponding to the previous generation period within seconds, and then add the fault-recovered or other non-faulty, low-latency transmission links to the forwarding table to obtain the forwarding table corresponding to the current generation period, that is, to achieve link escape within seconds.

[0066] For the periodic generation of the forwarding table, optionally, when the next generation cycle of the forwarding table is reached, the first forwarding device can first clear the forwarding table corresponding to the current generation cycle, and then regenerate the forwarding table corresponding to the next generation cycle in accordance with the method provided in the above embodiments.

[0067] The embodiment shown in Figure 1 illustrates the process of determining the RTT between the port of the first forwarding device and the second forwarding device based on historical data packets. The specific process of the first forwarding device determining the RTT based on probe packets can be found in the embodiment shown in Figure 2 below.

[0068] Figure 2 is a flowchart of an RTT determination method provided in an embodiment of this disclosure, which is also an optional specific implementation of step S101. As shown in Figure 2, the method may include the following steps:

[0069] S201, obtain the sending time of the probe message and the receiving time of the response message. The probe message is sent using different ports among the alternative ports, and the response message is obtained by the second forwarding device after responding to the probe message.

[0070] S202, determine the RTT between different ports and the second forwarding device based on the sending time and receiving time.

[0071] The first forwarding device can acquire probe packets and send them out from different ports of the backup ports. The second forwarding device, upon acquiring a probe packet, can respond to it to receive a response packet, which can then be sent back to the first forwarding device. The first forwarding device can then obtain the time difference between the transmission time of the probe packet from the backup port and the reception time of the response packet; this time difference is the RTT (Round-Trip Time) between the backup port and the second forwarding device.

[0072] Optionally, probe messages can be generated periodically, and the first forwarding device can also periodically generate a forwarding table based on the periodically generated probe messages, with the length of the forwarding table generation period being equal to the length of the probe period. Optionally, probe messages can be generated by the first forwarding device or generated and sent to the first forwarding device by a decision center in the communication network.

[0073] In this embodiment, the first forwarding device can use probe packets to achieve RTT statistics.

[0074] Optionally, to ensure the accuracy of RTT calculation, the first and second forwarding devices can also synchronize their clocks using a Network Time Protocol (NTP) server as the standard.

[0075] Optionally, the first forwarding device in the embodiments of this disclosure may include at least one interface, and any interface may include multiple groups of ports. The ports in each group of ports have connected port numbers, and the number of ports in different groups of ports is the same. A schematic relationship between the interface and port groups can be shown in Figure 3a. The values ​​in Figure 3a represent the port numbers. As shown in Figure 3a, each interface includes 3 groups of ports, and each group of ports can contain 16 ports. However, it should be noted that Figure 3a is only an illustration, and this solution does not limit the number of port groups contained in an interface, nor does it limit the number of ports in a group of ports.

[0076] Based on Figure 3a, the relationship between the interface, alternative ports, and target ports can be further described below.

[0077] Optionally, the alternative ports of the first forwarding device can be a preset number of ports randomly selected from all ports of the first forwarding device. That is, the alternative ports can be ports distributed in different port groups. Optionally, the alternative ports can also be at least one complete set of ports under all interfaces of the first forwarding device.

[0078] In practice, the first forwarding device can transmit packets with forwarding devices in different clusters. Considering the accuracy of packet transmission, the alternative ports can be at least one complete set of ports under the target interface corresponding to the cluster to which the second forwarding device belongs. Optionally, the target interface can be some interfaces in the first forwarding device, and the number of target interfaces can be at least one. Assuming the target interfaces are interface 1 and interface 2, the alternative ports can be at least one set of ports under interface 1 and interface 2.

[0079] Continuing with the example above, when the candidate ports are all ports under interface 1 and interface 2, another optional method for selecting the target port is as follows: After obtaining the RTT between the candidate ports and the second forwarding device based on historical data packets or probe packets, the first forwarding device can select ports from at least one group of ports whose RTT is less than or equal to a preset threshold to determine the target ports. In this case, at least one port in a group can be selected as the target port. The relationship between the candidate ports and the target ports in this situation can be shown in Figure 3b. As shown in Figure 3b, the target ports are represented by rectangles with diagonal lines, and these selected target ports can be written into the forwarding table.

[0080] Another alternative target port selection method involves the first forwarding device filtering ports from at least one group to select the minimum RTT (Round-Trip Time). In this case, one port within each group can be selected as the target port. The relationship between the candidate ports and the target port in this scenario is illustrated in Figure 3c. As shown in Figure 3c, the target port is represented by a rectangle with a diagonal line. Furthermore, the more ports in a port group, the smaller the RTT can be selected.

[0081] Regardless of whether the backup ports of the source forwarding device are a complete set of ports or ports scattered across different port groups, after the first forwarding device obtains the RTT between the backup ports and the second forwarding device based on historical data packets or probe packets, there is another optional method for selecting the target port. The first forwarding device can obtain the target delay interval between the first forwarding device and the second forwarding device. The first forwarding device can filter out the target port from the candidate ports based on whether the RTT between the backup ports and the second forwarding device falls within the target delay interval. Specifically, for any port among the backup ports, if the RTT between that port and the second forwarding device falls within the target delay interval, then that port is determined as the target port.

[0082] Optionally, the relationship between the target port and the candidate port selected using the target delay interval can be shown in Figure 3b or Figure 3c.

[0083] In this embodiment, the candidate ports of the first forwarding device can be at least one complete group of ports, or ports scattered across different port groups. Depending on the composition of the candidate ports, the first forwarding device can use a preset threshold or delay interval to select the destination port.

[0084] The process of determining the target delay interval between the first forwarding device and the second forwarding device will be further described below. Figure 4 is a flowchart of a delay interval determination method provided by an embodiment of this disclosure. As shown in Figure 4, the method may include the following steps:

[0085] S301, obtain the type of the data stream to which the historical data packets belong, and the link quality of the different transmission links between the first forwarding device and the second forwarding device.

[0086] During the forwarding of historical data packets, the type of data stream to which the historical data packet belongs, as well as the link quality of the different transmission links between the first forwarding device and the second forwarding device, can also be obtained.

[0087] Optionally, the data stream to which the historical data packets belong can include static data streams with low latency requirements, or real-time data streams with low latency requirements, such as audio data streams, game data streams, etc.

[0088] Optionally, link quality can be characterized by metrics such as signal strength and link performance. Link strength can be further characterized by metrics such as Received Signal Strength Indication (RSSI) and Signal-to-Noise Ratio (SNR). Link performance can be further characterized by metrics such as Bit Error Rate (BER), Packet Reception Rate (PRR), and Probability of Successful Packet Reception (PSPR).

[0089] S302, determine the reference length of the delay interval based on the link quality.

[0090] S303 determines a target delay interval with a reference length based on the RTT between the alternative port and the second forwarding device, and the type of data stream.

[0091] Then, the reference length of the delay interval can be determined based on the link quality and the type of data stream to which the historical data packets belong. Optionally, the stronger the signal strength of the transmission link and the better the link performance, the smaller the reference length of the delay interval.

[0092] Finally, an initial delay interval can be determined based on the maximum and minimum RTT values ​​between the alternative ports and the second forwarding device. Then, the initial delay interval is truncated according to the reference length determined above to obtain a target delay interval with the reference length. Optionally, the data stream type of the historical data packets can have a preset correspondence with the truncation position of the initial delay interval, and the lower the required delay for the data stream type, the earlier the truncation position.

[0093] For example, if the maximum and minimum RTT values ​​are 50 milliseconds and 70 milliseconds respectively, then the initial latency interval is [50 milliseconds, 70 milliseconds]. If the historical data packet belongs to a real-time data stream, and the truncation position corresponding to this type of data stream is 25%, then the final target latency interval obtained is [50 milliseconds, 55 milliseconds]. If the historical data packet belongs to a static data stream, and the truncation position corresponding to this type of data stream is 50%, then the final target latency interval obtained is [50 milliseconds, 60 milliseconds].

[0094] It should be noted that the delay interval determination method provided in this embodiment can be executed by the first forwarding device, or it can be executed by the central decision-making device in the communication network and then sent to the first forwarding device. Furthermore, regardless of who determines the target delay interval, the target delay interval can also be synchronously transmitted to the second forwarding device.

[0095] In this embodiment, a suitable latency range can be determined by combining factors such as data stream type and link quality to ensure the accuracy of forwarding generation.

[0096] Optionally, to ensure that the transmission link mapped to the selected target port has low latency, the second forwarding device can use a response rule table to determine whether to send a response message to the first forwarding device when the current probe period arrives. Optionally, Table 1 below is an illustrative response rule table provided in an embodiment of this disclosure.

[0097] Table 1:

[0098] In Table 1 above, Src_identify is the address of the cluster where the first forwarding device is located, Dst_identify is the address of the cluster where the second forwarding device is located, and Maximum Latency is the maximum latency. Optionally, the data in the response rule table can be stored in key-value pairs, and the addresses of the first and second forwarding devices can be stored as keys, while the maximum latency can be stored as values.

[0099] The specific usage process of the response rule table can be described as follows: In the current probe cycle, after receiving the probe message, the second forwarding device can calculate the time difference between the sending time and the receiving time of the probe message. If this time difference is greater than the maximum delay in the table, it indicates that the transmission link transmitting the probe message has high latency and will not be recorded in the forwarding table. Therefore, the second forwarding device can choose not to respond to the probe message, and the port used to send the probe message will not receive the response message, and the port will not be selected as the target port by the first forwarding device.

[0100] The maximum latency in the detection rule table is the maximum value corresponding to the latency interval between the first and second forwarding devices calculated in the previous detection cycle. Furthermore, the latency intervals in different detection cycles can be determined according to the method shown in the embodiment of Figure 4 above.

[0101] In this embodiment, the second forwarding device can compare the time difference and maximum latency using a local response rule table. Based on the comparison result, the first forwarding device can determine whether to respond to the probe packet. For probe packets that do not receive a response, the port used by the first forwarding device to send the probe packet will not receive a response packet. Therefore, the first forwarding device will not identify the port that did not receive a response packet as the target port. Thus, it can be guaranteed that the transmission link mapped to the target port selected by the first forwarding device has low latency.

[0102] Optionally, the format of the probe message can be as shown in Figure 5. The meaning of each part of the probe message is explained below from the inside out. As shown in Figure 5, the payload is the payload of the tunnel message. Specifically, the payload may include the probe sequence number, the time the first forwarding device sends the probe message (Local Timestamp), the time the second forwarding device receives the probe message (Remote Timestamp), the packet type, the number of the interface used to send the probe message (Egress port), the table identifier (index), and the number of the transmission link used to send the probe message (Up port). The packet type may include a probe message (Request) and a response message (Reply). The Inner IP Header is the source IP address in the inner 5-tuple information. The Vxlan Header is the Vxlan header, the Sport is the source port number in the outer 5-tuple information, and the Dport is the destination port number in the outer 5-tuple information. The source IP address in the outer 5-tuple information may include the IP header and an IP header outside the IP header (UPD Header). The outer 5-tuple information provides identification information for the probe message at the network and transport layers. The Ethernet Header, the header of the Ethernet frame, provides the address information of the probe message at the data link layer.

[0103] In practice, the five-tuple information in the data packet to be processed may include IP address, destination IP address, source port number, destination port number, and the protocol used. These items are all variable. Therefore, when performing hash calculation on the five-tuple information to select a low-latency transmission link for this data packet to be processed, it will greatly increase the computational burden of link selection.

[0104] To address the aforementioned issues, the data packets can be further encapsulated. Specifically, the data packets to be processed mentioned in the above embodiments can be unencapsulated raw packets. Upon receiving the raw packets, the first forwarding device can encapsulate them. The encapsulated tunnel packet can include outer 5-tuple information and inner 5-tuple information. The inner 5-tuple corresponds to the transmission protocol of the unencapsulated raw packet, while the outer 5-tuple corresponds to the tunneling protocol. Furthermore, with the source IP address and destination IP address in the outer 5-tuple information fixed, the destination port number and the protocol used are also immutable; the only variable item is the source port number.

[0105] Therefore, after the forwarding table is generated, when the first forwarding device obtains the original packet, it can first use the tunneling protocol to encapsulate the outer 5-tuple information outside the original packet to obtain the tunnel packet. Since the source IP address and destination IP address in the outer 5-tuple information of the tunnel packet are fixed, the variable item in the tunnel packet's 5-tuple information includes the source port number. Therefore, after the first forwarding device performs a hash calculation on the source port number in the tunnel packet, it can select a low-latency transmission link based on the calculation result, thereby reducing computational pressure. Here, the original packet can be an unencapsulated, unprocessed data packet.

[0106] Alternatively, the communication network including the first forwarding device and the second forwarding device can be specifically a cloud data center network. Such networks are multi-tenant, and in order to ensure the security and privacy of data between different tenants, tunnel packets are often used for transmission. Therefore, the process of encapsulating the original packet into a tunnel packet in this solution will not add extra pressure to the packet processing system.

[0107] In this embodiment, after the original message is encapsulated, a low-latency transmission link can be selected from the forwarding table using the encapsulated tunnel message.

[0108] Based on the above embodiments, regarding the format of the probe message, it should be noted that although Figure 5 shows that the probe message can contain outer 5-tuple information and memory 5-tuple information, optionally, the probe message can also contain only one 5-tuple information. That is, the probe message can contain the outer 5-tuple information shown in Figure 5, but not the inner 5-tuple information shown in Figure 5. In summary, the requirement that the probe message in the various embodiments of this disclosure satisfies can be that the 5-tuple information contained in the probe message and used in the process of generating the forwarding table is consistent with the outer 5-tuple information of the tunnel message obtained after encapsulating the data packet. However, the various embodiments of this disclosure do not limit whether the probe message has other 5-tuple information.

[0109] Furthermore, regardless of whether the first forwarding device generates the forwarding table using historical data packets or probe packets, and regardless of whether the historical data packets or probe packets used in the forwarding table generation process are encapsulated, and regardless of whether the data packets to be processed forwarded using the forwarding table are encapsulated, in order to ensure that the data packets to be processed can also be forwarded normally during the forwarding table generation process, the first forwarding device can generate and use multiple forwarding tables locally alternately. That is, during the generation of a forwarding table, if the first forwarding device receives a data packet to be processed, it can use other forwarding tables to forward the data packet to be processed.

[0110] Multiple forwarding tables can be generated within different generation periods. More specifically, when the first forwarding device generates a forwarding table based on probe messages, different forwarding tables are generated based on probe messages within different probe periods. Furthermore, any one of the multiple forwarding tables can be generated according to the methods provided in the above embodiments, thereby ensuring that the transmission links in these multiple forwarding tables are all available and have low latency.

[0111] Assuming the first forwarding device locally contains a first forwarding table and a second forwarding table generated in different generation cycles, and the forwarding table is generated based on historical data packets, the alternating generation and use process of the forwarding table can also be understood in conjunction with Figure 6a. As shown in (1) of Figure 6a, ① indicates that within the current generation cycle of the forwarding table, the first forwarding device can calculate the RTT based on historical data packets and further generate the first forwarding table. ② indicates that simultaneously with ①, the first forwarding device can use the second forwarding table to forward the received data packets to be processed to the second forwarding device. As shown in (2) of Figure 6a, ③ indicates that within the next generation cycle of the forwarding table, the first forwarding device can calculate the RTT based on historical data packets and further generate the second forwarding table, which is to update the second forwarding table used in ②. ④ indicates that simultaneously with ③, the first forwarding device can use the first forwarding table generated in ① to forward the received data packets to be processed to the second forwarding device. Among them, the generation time of the historical data packets used in ① can be earlier than the historical data packets used in ③.

[0112] Similarly, when the first forwarding device generates the forwarding table based on the probe message, the alternating generation and use process of the forwarding table can also be understood in conjunction with Figure 6b. As shown in (1) of Figure 6b, ⑤ indicates that in the current generation cycle of the forwarding table, the first forwarding device can acquire and send probe messages to the second forwarding device. ⑥ indicates that the first forwarding device can also acquire response messages from probe messages from the second forwarding device, and calculate the RTT based on the sending time of the probe message and the receiving time of the response message to generate the first forwarding table. ⑦ indicates that at the same time as ⑥, the first forwarding device can use the second forwarding table to forward the received data packets to be processed to the second forwarding device. As shown in (2) of Figure 6b, ⑧ indicates that in the next generation cycle of the forwarding table, the first forwarding device can acquire and send probe messages. ⑨ indicates that the first forwarding device can also acquire response messages from probe messages from the second forwarding device, and calculate the RTT based on the sending time of the probe message and the receiving time of the response message to generate the second forwarding table, which is to update the second forwarding table used in ⑦. ⑩ indicates that simultaneously with ⑨, the first forwarding device can use the first forwarding table generated at ⑥ to forward the received data packet to be processed to the second forwarding device. The probes used in ⑤ and ⑧ can be generated within different probe cycles.

[0113] In this embodiment, the setting of multiple forwarding tables allows the first forwarding device to still use other forwarding tables to forward data packets received during the generation of a forwarding table, thereby improving the blocking of data packets caused by the generation of forwarding tables.

[0114] When the first forwarding device generates a forwarding table based on probe messages, optionally, it can generate and use multiple forwarding tables alternately based on a probe rule table. Optionally, the decision center in the communication network can distribute the probe rule table to the first forwarding device. The first forwarding device can sequentially read the records in the probe rule table at different generation cycles of the forwarding table and determine whether to regenerate the forwarding table and which forwarding table to regenerate based on the content of the records.

[0115] A record in the probe rule table contains three fields: table identifier, packet type, and action. The table identifier uniquely identifies the forwarding table; the packet type can include probe packets (Request) and their response packets (Reply); and the action can include clearing the forwarding table (Set) and regenerating the cleared forwarding table (Update). Optionally, the data in the probe rule table can be stored in key-value pairs, with the table identifier and packet type stored as keys and the action as value.

[0116] Assuming that the first forwarding device may include a first forwarding table and a second forwarding table locally, Table 2 below is an illustrative detection rule table provided in an embodiment of this disclosure, with the table identifiers of the two tables being table0 and table1, respectively.

[0117] Table 2

[0118] When the first forwarding device reaches the current generation cycle of the forwarding table, it reads the first record in Table 2. This record indicates that if the first forwarding device receives a probe message, it will clear the first forwarding table. Next, the first forwarding device can also read the second record in Table 2. This record indicates that if the first forwarding device receives a response message, it will regenerate the first forwarding table. The specific generation process can be found in the relevant descriptions in the above embodiments. At the next generation cycle of the forwarding table, the first forwarding device can sequentially read the last two records in Table 2 to clear and regenerate the second forwarding table.

[0119] Alternatively, the detection rule table can also be schematically represented as shown in Table 3 below.

[0120] Table 3

[0121] When the first forwarding device reaches the current generation cycle of the forwarding table, it reads the first record in Table 3 to clear the first forwarding table upon receiving a probe message. Next, the first forwarding device can read the second record in Table 3 to regenerate the first forwarding table upon receiving a response message. At the next generation cycle of the forwarding table, the first forwarding device can sequentially read the third and fourth records in Table 3 to clear and regenerate the first forwarding table again. At yet another generation cycle of the forwarding table, the first forwarding device can sequentially read the fifth and sixth records in Table 3 to clear and regenerate the second forwarding table.

[0122] In this embodiment, according to the contents recorded in the detection rule table, the first forwarding device can generate and use multiple forwarding tables alternately, or continuously update any data table in multiple forwarding tables.

[0123] The embodiments shown in Figures 1 to 6 above have described the message processing process from a methodological perspective. Based on this, the above message processing process can also be explained from a system perspective.

[0124] Figure 7 shows a message processing system provided in an embodiment of this disclosure. As shown in Figure 7, the system may include: a first forwarding device and a second forwarding device.

[0125] The first forwarding device can obtain the RTT (Round-Trip Time) between its alternative ports and the second forwarding device, and select a target port from the alternative ports based on this RTT. The transmission links mapped to the selected target ports are all available and have low latency. Finally, the first forwarding device can generate a forwarding table based on the link information including the target port. When the first forwarding device receives a data packet to be processed, it can use this forwarding table to forward the packet to the second forwarding device.

[0126] In this embodiment, the RTT (Round-Trip Time) between the candidate ports in the first forwarding device and the second forwarding device is obtained. Then, based on this RTT, an available target port in the first forwarding device is selected. Finally, a forwarding table in the first forwarding device is generated based on the transmission link information including the target port. The first forwarding device can use this forwarding table to forward the data packets to be processed to the second forwarding device.

[0127] As can be seen, the above process selects ports and generates a forwarding table based on round-trip time (RTT). Since ports with low RTTs are selected, the transmission links chosen from the forwarding table also have low latency, thus ensuring efficient data transmission. Furthermore, since obtaining the RTT means that the transmission link between the port and the second forwarding device is not faulty, the forwarding table generation process actually includes a link fault detection process. Therefore, even if the transmission link between the first and second forwarding devices fails, the faulty transmission link can be filtered out during the RTT-based forwarding table generation process. This ensures that all transmission links in the forwarding table are usable and will not affect the normal forwarding of packets.

[0128] In addition, the contents not described in detail in this embodiment and the technical effects that can be achieved can be referred to the relevant descriptions in the embodiment shown in Figure 1, and will not be repeated here.

[0129] Optionally, the process of generating the forwarding table described above can be specifically executed by a programmable network chip configured in the first forwarding device.

[0130] Optionally, the first and second forwarding devices provided above can be devices provided by the service provider. Therefore, by using the methods and systems provided in this disclosure, the service provider can have the ability to select low-latency transmission links in real time.

[0131] Optionally, the first forwarding device may also have at least one interface, in which case the interface, port group, alternative port and target port may have different relationships, and the target port may also have different selection methods depending on the relationship. For details, please refer to the relevant descriptions in the embodiments shown in Figures 3a to 4 above, which will not be repeated here.

[0132] Figure 8 is a schematic diagram of another message processing structure provided in this embodiment of the disclosure. As shown in Figure 8, based on the system shown in Figure 7, the system may further include a decision center.

[0133] The decision center can determine the target latency range based on the RTT (Round-Trip Time) between the candidate ports obtained by the first forwarding device and the second forwarding device. This target latency range can be distributed to both the first and second forwarding devices. The first forwarding device can then select a target port based on this target latency range.

[0134] When the RTT is determined using probe messages, and this target delay interval corresponds to the current probe cycle, the second forwarding device can determine whether to send a response message to the first forwarding device when the next probe cycle arrives, based on the target delay interval.

[0135] Optionally, the process of determining the target delay interval described above can be specifically determined by the decision component in the decision center, and the specific method of determining the target delay interval can be referred to the description in the embodiment shown in Figure 4 above, which will not be repeated here.

[0136] Optionally, the decision center may also include a probing component. Specifically, the probing component may include a message transceiver subcomponent for sending probing messages and receiving response messages from the second forwarding device. These probing and response messages are used to enable the first forwarding device to obtain RTT (Round-Trip Time).

[0137] Optionally, the detection component may further include a driver program for sending response rule tables and detection rule tables to the first and second forwarding devices.

[0138] Optionally, the decision center may also include a clock synchronization server, and the probe component may further include a synchronization sub-component. The clock synchronization server can then send its own reference clock to the synchronization sub-component in the probe component. The synchronization sub-component can forward this reference clock to a first forwarding device and a second forwarding device, enabling the first and second forwarding devices to perform clock calibration based on the reference clock.

[0139] Optionally, the first forwarding device can also generate multiple forwarding tables. These multiple forwarding tables can be generated and used alternately using a probe rule table. For details, please refer to the relevant content in the embodiments shown in Figures 6a and 6b, which will not be repeated here.

[0140] In this embodiment, the collaborative work of the components in the decision center, the first forwarding device, and the second forwarding device enables the generation of a forwarding table. Furthermore, regardless of whether the transmission link between the first and second forwarding devices fails, using this forwarding table ensures that the data packets to be processed are transmitted using a low-latency transmission link.

[0141] In addition, the contents not described in detail in this embodiment and the technical effects that can be achieved can be referred to the relevant descriptions in the embodiment shown in Figure 1, and will not be repeated here.

[0142] The message processing apparatus of one or more embodiments of the present disclosure will be described in detail below. Those skilled in the art will understand that the apparatus can be configured using commercially available hardware components through the steps taught in this solution.

[0143] Figure 9 is a schematic diagram of a message processing apparatus provided in an embodiment of this disclosure. As shown in Figure 9, the apparatus may include:

[0144] The acquisition module 11 is used to acquire the round-trip delay between the alternative ports in the first forwarding device and the second forwarding device.

[0145] The port selection module 12 is used to determine the target port from the candidate ports based on the round-trip time.

[0146] The generation module 13 is used to generate a forwarding table in the first forwarding device based on the transmission link information containing the target port. The forwarding table is used to send the data packets to be processed to the second forwarding device, and the transmission link information in the forwarding table corresponds to the transmission link between the first forwarding device and the second forwarding device.

[0147] Optionally, the acquisition module 11, the port selection module 12, and the generation module 13 can be programmable network switching chips deployed in the first forwarding device.

[0148] Each interface in the first forwarding device has at least one set of ports, and the alternative ports include ports from the at least one set of ports of the target interface, which includes at least one interface in the first forwarding device.

[0149] The port selection module 12 is used to determine the target port from at least one set of ports of the target interface based on the round-trip time.

[0150] Optionally, the port selection module 12 is used to obtain the target delay interval between the first forwarding device and the second forwarding device; if the round-trip time between any port and the second forwarding device falls within the target delay interval, then any port is determined as the target port.

[0151] Optionally, the device further includes: a delay interval determination module 14, used to determine an initial delay interval based on the round-trip delay between the alternative port and the second forwarding device; and to extract a target delay interval with a reference length from the initial delay interval based on the type of data stream.

[0152] Optionally, the device further includes: a duration determination module 15, used to obtain the type of the data stream to which the historical data packet belongs, and the link quality of the different transmission links between the first forwarding device and the second forwarding device, wherein the historical data packet is transmitted between the first forwarding device and the second forwarding device using different transmission links;

[0153] The reference length of the delay interval is determined based on the link quality.

[0154] Optionally, the acquisition module 11 is used to acquire the sending time of the probe message and the receiving time of the response message. The probe message is sent through different ports in the alternative ports, and the response message is obtained by the second forwarding device after responding to the probe message.

[0155] Based on the sending and receiving times, determine the round-trip time between different ports and the second forwarding device.

[0156] Optionally, the generation module 13 is used to generate a first forwarding table based on the transmission link information including the target port. The first forwarding device also includes a second forwarding table. The first and second forwarding tables are generated based on the probe packets in different probe cycles. The second forwarding table is used to forward the data packets to be processed generated in the current probe cycle to the second forwarding device.

[0157] The probe messages transmitted between the first forwarding device and the second forwarding device contain 5-tuple information with the same format as the 5-tuple information in the tunnel message, and the data messages transmitted between the first forwarding device and the second forwarding device include tunnel messages.

[0158] Optionally, the first forwarding table is generated based on the probe messages within the current probe cycle.

[0159] The generation module 13 is used to determine the target table identifier corresponding to the next detection cycle according to the detection rule table when the next detection cycle after the current detection cycle arrives. The forwarding table with the target table identifier includes the first forwarding table or the second forwarding table.

[0160] In response to the reception of probe messages generated in the next probe cycle, the forwarding table with the target table identifier is cleared; in response to the reception of response messages of probe messages, the forwarding table with the target table identifier is regenerated.

[0161] Optionally, the device further includes an encapsulation module 16, used to encapsulate the second original message using the target port, and to send the encapsulated tunnel message using the target port.

[0162] The device shown in Figure 9 can execute the methods of the embodiments shown in Figures 1 to 6. For parts not described in detail in this embodiment, please refer to the relevant descriptions of the embodiments shown in Figures 1 to 6. The execution process and technical effects of this technical solution are described in the embodiments shown in Figures 1 to 6, and will not be repeated here.

[0163] In another possible design, the message processing methods provided in the above embodiments can be applied to an electronic device. As shown in FIG10, the electronic device may include a processor 21 and a memory 22. The memory 22 is used to store programs that support the electronic device in executing the message processing methods provided in the embodiments shown in FIG1 to FIG6, and the processor 21 is configured to execute the programs stored in the memory 22.

[0164] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 21, they can implement the steps in the message processing method provided in the embodiments shown in Figures 1 to 6 above.

[0165] Optionally, the processor 21 is also used to perform all or part of the steps in the embodiments shown in Figures 1 to 6 above.

[0166] The structure of the electronic device may also include a communication interface 23 for the electronic device to communicate with other devices or communication systems.

[0167] In addition, this disclosure provides a non-transitory machine-readable storage medium for storing computer software instructions used by the above-mentioned electronic device, which includes programs for executing the message processing methods shown in Figures 1 to 6.

[0168] Additionally, this disclosure provides a computer program product. This computer program product includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is able to implement the message processing steps or functions shown in Figures 1 to 6 above.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.

Claims

1. A method of processing a packet, wherein, Applied to the first forwarding device, including: Obtain the round-trip time between the candidate ports in the first forwarding device and the second forwarding device; Based on the round-trip time, the target port is determined from the candidate ports; A forwarding table is generated in the first forwarding device based on the transmission link information containing the target port. The forwarding table is used to send the data packets to be processed to the second forwarding device. The transmission link information in the forwarding table corresponds to the transmission link between the first forwarding device and the second forwarding device.

2. The method of claim 1, wherein, Each interface in the first forwarding device has at least one set of ports, and the alternative ports include ports from the at least one set of ports of the target interface, wherein the target interface includes at least one interface in the first forwarding device; The step of determining the target port from the candidate ports based on the round-trip time includes: The target port is determined from at least one set of ports having the target interface based on the round-trip time.

3. The method of claim 1, wherein, The step of determining the target port from the candidate ports based on the round-trip time includes: Obtain the target delay interval between the first forwarding device and the second forwarding device; If the round-trip time between any port of the first forwarding device and the second forwarding device falls within the target delay interval, then that port is determined as the target port.

4. The method of claim 3, wherein, The method further includes: The initial delay interval is determined based on the round-trip delay between the alternative port and the second forwarding device; Based on the type of data stream, the target delay interval with a reference length is extracted from the initial delay interval.

5. The method of claim 4, wherein, The method further includes: The type of the data stream to which the historical data packets belong and the link quality of the different transmission links between the first forwarding device and the second forwarding device are obtained, wherein the historical data packets are transmitted between the first forwarding device and the second forwarding device using the different transmission links; The reference length of the target delay interval is determined based on the link quality.

6. The method of any one of claims 1 to 5, wherein, The process of obtaining the round-trip time between the candidate ports in the first forwarding device and the second forwarding device includes: The sending time of the probe message and the receiving time of the response message are obtained. The probe message is sent using different ports among the alternative ports, and the response message is obtained by the second forwarding device after responding to the probe message. Based on the sending time and the receiving time, the round-trip time between the different ports and the second forwarding device is determined.

7. The method of claim 6, wherein, The probe message transmitted between the first forwarding device and the second forwarding device contains quintuple information with the same format as the quintuple information in the tunnel message.

8. The method of claim 6, wherein, The step of generating a forwarding table in the first forwarding device based on the transmission link information including the target port includes: A first forwarding table is generated in the first forwarding device based on the transmission link information containing the target port. The first forwarding device also includes a second forwarding table. The first and second forwarding tables are generated based on the probe packets in different probe cycles. The second forwarding table is used to forward the data packets to be processed generated in the current probe cycle to the second forwarding device.

9. The method of claim 8, wherein, The first forwarding table is generated based on the probe messages within the current probe cycle; After generating the first forwarding table, the method further includes: When the next detection cycle is reached after the current detection cycle, the target table identifier corresponding to the next detection cycle is determined according to the detection rule table. The forwarding table with the target table identifier includes a first forwarding table or a second forwarding table. In response to the receipt of a probe message generated in the next probe cycle, the forwarding table with the target table identifier is cleared; In response to the receipt of the response message of the probe message, a forwarding table with the target table identifier is regenerated.

10. The method of any one of claims 1 to 9, wherein, The data packets transmitted between the first forwarding device and the second forwarding device include tunnel packets; The step of forwarding the data packet to be processed to the second forwarding device using the forwarding table includes: The second original message is encapsulated using the target port; The encapsulated tunnel message is sent using the target port.

11. The method of any one of claims 1 to 9, wherein, The method is applied to a programmable network switching chip in the first forwarding device.

12. A packet processing system, wherein, include: First forwarding device and second forwarding device; The first forwarding device is used to obtain the round-trip delay between the alternative ports in the first forwarding device and the second forwarding device respectively; Based on the round-trip time, a target port is determined from the candidate ports; a forwarding table in the first forwarding device is generated based on the link information containing the target port; The second forwarding device is used to receive the data packets to be processed sent by the first forwarding device using the forwarding table.

13. The system of claim 12, wherein, The first forwarding device includes: a programmable network switching chip, configured to determine a target port from the candidate ports based on the round-trip time; and generate a forwarding table in the first forwarding device based on link information containing the target port.

14. The system of claim 12, wherein, Each interface in the first forwarding device has at least one set of ports, and the alternative ports include ports from the at least one set of ports of the target interface, wherein the target interface includes at least one interface in the first forwarding device; The first forwarding device is configured to determine the target port from at least one set of ports of the target interface based on the round-trip time.

15. The system of claim 12, wherein, The system further includes: a decision center, configured to determine a target latency interval between the first forwarding device and the second forwarding device based on the round-trip time between the alternative ports and the second forwarding device; and to send the target latency interval to the first forwarding device; The first forwarding device is configured to determine any port as the target port if the round-trip time between any port of the first forwarding device and the second forwarding device falls within the target delay interval.

16. The system of claim 15, wherein, The decision center includes a decision component for obtaining the type of the data stream to which the historical data packets belong and the link quality of the different transmission links between the first forwarding device and the second forwarding device, wherein the historical data packets are transmitted between the first forwarding device and the second forwarding device using the different transmission links; The reference length of the delay interval is determined based on the link quality. The target delay interval with the reference length is determined based on the round-trip delay between the alternative ports and the second forwarding device, and the type of the data stream.

17. The system of claim 15, wherein, The decision center includes: a detection component, used to send a detection message and a response message to the detection message to the first forwarding device; The first forwarding device is configured to forward the probe message to the second forwarding device via different ports among the alternative ports; and to determine the round-trip time between the different ports and the second forwarding device based on the sending time of the probe message and the receiving time of the response message. The second forwarding device is configured to respond to the probe message to obtain the response message; and send the response message to the probe component.

18. The system of claim 17, wherein, The target latency interval corresponds to the current detection period, and the historical latency interval corresponds to the historical detection periods preceding the current detection period. The detection component is used to send a response rule table to the second forwarding device; The second forwarding device is configured to query the historical delay interval in the response rule table in response to the reception of the probe packet within the current probe period; Determine the difference between the sending time of the probe message and the receiving time of the probe message by the second forwarding device within the current detection period; If the time difference exceeds the historical delay interval, the probe message will not be responded to.

19. The system of claim 17, wherein, The system also includes a clock synchronization server for sending a reference clock to the detection component; The detection component is used to forward the reference clock to the first forwarding device and the second forwarding device, so that the first forwarding device and the second forwarding device can perform clock calibration according to the reference clock.

20. A forwarding device, wherein, include: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor performs the message processing method as described in any one of claims 1 to 10.

21. A non-transitory machine-readable storage medium, wherein, The non-transitory machine-readable storage medium stores executable code that, when executed by a processor of an electronic device, causes the processor to perform the message processing method as described in any one of claims 1 to 11.

22. A computer program product, wherein, The computer program product includes a computer program or instructions that enable the computer program or instructions to perform the steps of the message processing method according to any one of claims 1 to 11.