Link switching method, system and apparatus
By constructing user data packets and updating header information on the end-side device, proactive rerouting by the end-side device is achieved, which solves the problem of slow link failure response in large-scale networks and realizes rapid fault recovery and high availability.
Patent Information
- Application Number
- PCT/IB2025/055737
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-26
- Filing Date
- 2025-06-04
- Publication Date
- 2026-03-05
AI Technical Summary
Existing technologies struggle to quickly respond to and recover from link failures caused by misconfiguration, software defects, or other reasons in large-scale networks, thus impacting network transmission performance.
Configure a rerouting module on the end device. By constructing user data packets and updating header information, the end device can actively reroute, select the target communication link for data packet transmission, and avoid relying on the server.
It enables rapid response and recovery of data packet transmission in the event of link failure, providing high availability assurance for large-scale networks.
Smart Images

Figure IB2025055737_05032026_PF_FP_ABST
Abstract
Description
Link switching methods, systems, and devices
[0002] Cross-reference
[0004] This disclosure claims priority to Chinese Patent Publication No. 202411177918.3, filed on August 26, 2024, entitled “Link Switching Method, System and Apparatus”, the entire contents of which are incorporated herein by reference.
[0006] Technical Field
[0008] This disclosure relates to the field of communication technology, and in particular to link switching methods, systems, and apparatus.
[0010] Background Technology
[0012] With the development of internet technology, large-scale networks typically carry various sensitive services such as cloud computing, gaming, finance, and AI training and inference. Ensuring high network availability has become a critical issue. In existing technologies, device or link failures are inevitable in large-scale networks. To avoid the impact of these failures, detection technologies are often used to quickly detect network faults. However, this process mostly relies on upper-layer protocols or maintenance personnel for fault recovery and bypass. Furthermore, link switching schemes based on routing protocols can also bypass faults, but they struggle to cover various faults caused by misconfiguration, software defects, and abnormal interactions in large-scale networks, and they cannot provide a rapid global response. This significantly impacts network transmission performance, thus necessitating an effective solution to address these problems.
[0014] Summary of the Invention
[0016] In view of this, the present disclosure provides a link switching method. One or more embodiments of the present disclosure also relate to a link switching system, a link switching device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0018] According to a first aspect of the present disclosure, a link switching method is provided, applied to an end-side device, comprising: acquiring a transmission data packet of a target service, and invoking a rerouting module to construct a user data packet containing the transmission data packet; selecting a communication link according to the user header information of the user data packet, and using the communication link to send the user data packet to the server of the target service;
[0020] In the event of an abnormal communication link, the rerouting module is invoked to update the header information of the data packets to be sent in the communication link;
[0022] Based on the updated header information, the communication link is switched to the target communication link, and the data packet to be sent is sent to the server using the target communication link.
[0024] According to a second aspect of the present disclosure, a link switching system is provided, the link switching system including a processing module and a rerouting module, comprising:
[0026] The processing module is configured to acquire the transmission data packet of the target service and send it to the rerouting module; the rerouting module is configured to construct a user data packet containing the transmission data packet and feed it back to the processing module.
[0028] The processing module is configured to select a communication link based on the user header information of the user data packet, and use the communication link to send the user data packet to the server of the target service; in the event of an abnormal communication link, the data packet to be sent in the communication link is sent to the rerouting module.
[0030] The rerouting module is configured to update the header information of the data packet to be sent and feed back the data packet to be sent with the updated header information to the processing module.
[0032] The processing module is configured to switch the communication link to the target communication link based on the updated header information, and use the target communication link to send the data packet to be sent to the server.
[0034] According to a third aspect of the present disclosure, a link switching apparatus is provided, applied to an end-side device, comprising: an acquisition unit configured to acquire a transmission data packet of a target service and invoke a rerouting module to construct a user data packet containing the transmission data packet;
[0036] The selection unit is configured to select a communication link based on the user header information of the user data packet, and use the communication link to send the user data packet to the server of the target service.
[0038] The update unit is configured to call the rerouting module to update the header information of the data packets to be sent in the communication link in the event of an anomaly in the communication link.
[0040] The sending unit is configured to switch the communication link to the target communication link based on the updated header information, and use the target communication link to send the data packet to be sent to the server.
[0042] According to a fourth aspect of the present disclosure, a computing device is provided, comprising:
[0044] Memory and processor;
[0046] The memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described link switching method.
[0048] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer-executable instructions that, when executed by a processor, implement the steps of the link switching method described above.
[0050] According to a sixth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the link switching method described above.
[0052] The link switching method provided in this embodiment enables proactive rerouting by the end-side device, achieving faster fault response and recovery globally. After the end-side device obtains the transmission data packet of the target service, it calls the rerouting module configured on the end-side device to construct a user data packet containing the transmission data packet; the user data packet and the transmission data packet are of different types. Based on this, a communication link can be selected using the user header information of the user data packet, and the user data packet is sent to the server of the target service via the communication link to complete the transmission of the associated target service data packet. Furthermore, if a communication link anomaly is detected, the rerouting module can be called to update the header information of the data packet to be sent in the communication link. This allows the end-side device to proactively perform rerouting after updating the header information of the data packet to be sent, thereby enabling the communication link to be switched to the target communication link based on the updated header information, and the data packet to be sent to the server via the target communication link. This achieves faster response to link failures and recovery of data packet transmission without relying on the server, providing high availability assurance for large-scale networks.
[0054] Attached Figure Description
[0056] Figure 1 is a schematic diagram of a link switching method provided in an embodiment of this disclosure;
[0058] Figure 2 is a flowchart of a link switching method provided in an embodiment of this disclosure;
[0060] Figure 3 is a schematic diagram of the link switching process in a link switching method provided in an embodiment of the present disclosure; Figure 4 is a flowchart of the processing procedure of a link switching method provided in an embodiment of the present disclosure;
[0062] Figure 5 is a schematic diagram of a link switching system according to an embodiment of the present disclosure; Figure 6 is a schematic diagram of a link switching device according to an embodiment of the present disclosure;
[0064] Figure 7 is a structural block diagram of a computing device provided in an embodiment of this disclosure.
[0066] Detailed Implementation
[0068] Numerous specific details are set forth in the following description to provide a full understanding of this disclosure. However, this disclosure can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this disclosure. Therefore, this disclosure is not limited to the specific implementations disclosed below.
[0070] The terminology used in one or more embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this disclosure. The singular forms “a,” “the,” and “the” used in one or more embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this disclosure refers to and includes any or all possible combinations of one or more associated listed items.
[0072] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second, and similarly, second may also be referred to as first, without departing from the scope of one or more embodiments of this disclosure. Depending on the context, the word “if” as used herein may be interpreted as “when”, “at that time”, or “in response to a determination.”
[0074] Furthermore, 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, stored data, displayed data, etc.) involved in one or more embodiments of this disclosure are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0076] First, the terms and nouns used in one or more embodiments of this disclosure will be explained.
[0078] ECMP hashing: Equal-cost multipath routing, can calculate the hash result based on the data packet header information and select the path.
[0080] RTO: Retransmission Time Out, a TCP protocol mechanism that determines if a data transmission timeout exceeds this period and a retransmission operation is required.
[0082] TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol.
[0084] UDP: User Datagram Protocol is a transport layer protocol that operates in the OSI (Open Systems Interconnection) model. It uses IP as its underlying protocol and provides applications with a fewer protocol mechanisms to send messages to other programs.
[0086] This disclosure provides a link switching method, and also relates to a link switching system, a link switching device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0088] In practical applications, solutions such as Fast Reroute require pre-preparing backup links for critical nodes and links, and these backup links are prone to overload. While global routing and traffic engineering can perform traffic scheduling on a global scale, they require transmitting topology updates across the entire network or adjusting transmission link weights based on traffic characteristics. In large-scale networks with numerous routing entries, their response time can reach the minute level. Therefore, an effective solution is urgently needed to address these issues.
[0090] Referring to the schematic diagram in Figure 1, the link switching method provided in this embodiment, in order to enable proactive rerouting by the end-side device and achieve faster fault response and recovery globally, can construct a user data packet containing the transmission data packet by calling the rerouting module configured on the end-side device after obtaining the transmission data packet of the target service; and the user data packet and the transmission data packet are of different types. Based on this, a communication link can be selected by combining the user header information of the user data packet, and the user data packet can be sent to the server of the target service using the communication link to complete the transmission of the associated target service data packet. Furthermore, if a communication link anomaly is detected, the rerouting module can be called to update the header information of the data packet to be sent in the communication link; after the end-side device completes the update of the header information of the data packet to be sent, the end-side device can proactively complete the rerouting, thereby enabling the communication link to be switched to the target communication link based on the updated header information, and the data packet to be sent to the server using the target communication link. This achieves faster response to link failures and recovery of data packet transmission without relying on the server, providing high availability assurance for large-scale networks.
[0092] Referring to Figure 2, Figure 2 shows a flowchart of a link switching method according to an embodiment of the present disclosure. The method is applied to an end-side device and specifically includes the following steps.
[0094] Step S202: Obtain the transmission data packet of the target service, and call the rerouting module to construct a user data packet containing the transmission data packet.
[0096] The link switching method provided in this embodiment is applied to the end-side device. It is configured to enable the end-side device to actively trigger a rerouting operation through the rerouting module in the event of a link failure, thereby selecting a new link for data packet transmission. This ensures rapid detection and response to the fault, preventing the fault from persisting for an extended period and affecting data packet transmission, which in turn affects the operation of the target service.
[0098] Specifically, the target service refers to a service running on the endpoint device. It needs to transmit data packets with the server to provide corresponding service content to the user. The target service can be related to services such as cloud computing, gaming, finance, and AI training and inference. For example, if the target service is a gaming service, transmitting game-related data packets between the client and the game server allows the client to display game screenshots for the user to play. Alternatively, if the target service is an AI training and inference service, transmitting model parameter data packets between the client and the server providing the AI training service allows the server to train a target model (such as an image recognition model, text model, question-answering model, etc.) according to the client's needs and deploy it to the client for use. In practical applications, the target service can be any type of service with network transmission requirements; this embodiment does not impose any limitations.
[0100] Correspondingly, the transmission data packet specifically refers to the data packet that the target service needs to send to the server during the runtime phase; it can be understood as a TCP data packet associated with the target service. Correspondingly, the rerouting module specifically refers to a module configured on the end-side device to encapsulate all transmission data packets with a layer of user data packets, and can define header information for the data packets, thereby enabling the end-side device to actively detect link failures and quickly switch links. Correspondingly, the user data packet specifically refers to the data packet obtained after encapsulating the transmission data packet; it can be a UDP data packet.
[0102] Therefore, to enable proactive rerouting by the end-device and achieve faster fault response and recovery globally, after the end-device obtains the transmission data packet of the target service, it can invoke the rerouting module configured on the end-device to construct a user data packet containing the transmission data packet; and the user data packet is of a different type than the transmission data packet. Based on this, a communication link can be selected using the user header information of the user data packet, and the user data packet can be sent to the server of the target service using this communication link to complete the transmission of the associated target service data packet. Furthermore, if a communication link anomaly is detected, the rerouting module can be invoked to update the header information of the data packet to be sent in the communication link; this allows the end-device to proactively perform rerouting after updating the header information of the data packet to be sent, thereby enabling the switching of the communication link to the target communication link based on the updated header information, and the use of the target communication link to send the data packet to be sent to the server.
[0104] Furthermore, considering that once the end-side device and the server establish a network connection, a unique transmission link is identified, and in the event of a link failure, retransmission alone cannot escape the fault, and redundant links in the network are not fully utilized, a user data packet can be encapsulated outside the transmission data packet before transmission to ensure that the end-side device can initiate a link switching operation in the event of a link failure. In this embodiment, the specific implementation is as follows:
[0106] The system acquires the transmission data packet of the target service and determines the transmission header information of the transmission data packet; it extracts the source address information and destination address information from the transmission header information, calls the rerouting module to determine the source port information, and determines the preset destination port information; based on the source address information, the destination address information, the source port information, and the destination port information, it constructs a user data packet containing the transmission data packet; wherein, the source address information and the destination address information in the transmission header information are the same as the user source address information and the user destination address information in the user header information; the source port information is obtained by the rerouting module by querying a pre-stored source port maintenance table.
[0108] Specifically, the transmission header information refers to the message header information corresponding to the transmitted data packet, which includes the source address information (source IP, sIP), destination address information (destination IP, dIP), source port information (sport), destination port information (dport), and protocol number associated with the transmitted data packet. Correspondingly, the preset destination port information specifically refers to a uniformly set specified port, such as 251, which can be set according to actual needs, and this embodiment does not impose any limitations on it.
[0110] Based on this, after obtaining the transmission data packet associated with the target service, in order to support the rerouting operation when the end device detects a link anomaly, the transmission header information of the transmission data packet can be determined first. At this time, the source address information and destination address information can be extracted from the transmission header information and used directly as the source address and destination address of the user data packet to be encapsulated. At the same time, in order to specify the communication link to complete the transmission of the data packet, the rerouting module can be called to randomly determine the source port information and determine the preset destination port information.
[0112] Based on this, a user data packet encapsulated with the transmitted data packet can be constructed using the source address information, destination address information, source port information, and destination port information. This allows the transmitted data packet to be sent to the server subsequently. Furthermore, the source and destination address information in the transmission header is identical to the user source and destination address information in the user header; simultaneously, the source port information is randomly obtained by the rerouting module from a pre-stored source port maintenance table.
[0114] In other words, to support rerouting on the end-side device when the link fails, a rerouting module (Reroute module) can be inserted into the Linux kernel on the end side. This module can encapsulate a UDP packet around all TCP packets associated with the target service, and the source IP and destination IP in the header of the encapsulated UDP packet are identical to those in the inner TCP packet. Furthermore, the source port is randomly assigned by the rerouting module, while the destination port can be uniformly set to a specified port. This allows data packets to be sent to the server by transmitting UDP packets containing TCP packets, ensuring the target service can function normally.
[0116] This embodiment uses AI training and inference service as an example to illustrate the link switching method. Descriptions of other scenarios can refer to the same or corresponding descriptions in this embodiment, and no limitations are made here. Specifically, the end-side device pre-configures the Reroute module. When the end-side device sends TCP packets (encapsulating initial model parameters) to the server using the model training service, the source IP and destination IP can be extracted from the header of the TCP packet to be sent. Simultaneously, the Reroute module is called to randomly specify the source port, and the destination port can be uniformly set to 251. Based on this, a UDP packet is encapsulated outside the TCP packet for subsequent transmission to the server, enabling the server to complete the training of the specified model based on the initial model parameters provided by the end-side device.
[0118] In summary, by calling the rerouting module to encapsulate a user data packet on top of the transmitted data packet, it is possible to update the header of the user data packet by adjusting the source port in the event of a link failure. This allows for the selection of a new link for data packet transmission, avoiding the need for more fault recovery time and thus preventing service disruptions.
[0120] Step S204: Select a communication link based on the user header information of the user data packet, and use the communication link to send the user data packet to the server of the target service.
[0122] Specifically, after the rerouting module encapsulates the transmitted data packet with a user data packet, in order to successfully send the user data packet containing the transmitted data packet to the target service's server for processing, a communication link can be selected based on the user header information of the user data packet. This communication link is then used to send the user data packet to the target service's server. In other words, the transmitted data packet associated with the target service will be re-encapsulated according to the above logic, and then all data packets will be sent to the server via the currently selected communication link. Here, the communication link specifically refers to the link between the end-side device selected based on the user header information and the server that connects to transmit data packets.
[0124] Furthermore, when selecting a communication link to transmit user data packets, this can be achieved in the following way:
[0126] Extract the user header information of the user data packet; perform a hash calculation on the user header information to obtain the user hash value; select a communication link according to the user hash value, and execute the step of sending the user data packet to the server of the target service using the communication link.
[0128] Specifically, the user header information refers to the message header corresponding to the user data packet, which includes the source port, destination port, source IP, destination IP, and protocol number associated with the user data packet. Correspondingly, the user hash value refers to the hash value obtained by performing an ECMP hash operation on the message header information, which matches a communication link.
[0130] Based on this, after obtaining the user data packet, the user header information of the user data packet can be extracted; and the user header information can be hashed using ECMP hash to obtain the user hash value; at this time, a communication link can be selected according to the user hash value, and it can be used as the communication connection between the end device and the server, and the steps of sending the user data packet to the target service server using the communication link can continue.
[0132] Following the previous example, after obtaining the UDP packet containing TCP packets, we can extract the header information of the UDP packet {sIP, sport, dIP, dport, protocol number}. Then, we use ECMP hashing to perform a hash operation on the header information to obtain the hash value Hashl. Next, we select the communication link a in Figure 3 according to the hash value Hashl and use it as the communication connection between the end device and the server. Then, we use communication link a to send the UDP packet containing TCP packets to the server, so that the server can train the target model based on the initial model parameters encapsulated in the packet.
[0134] In summary, by performing hash operations on the header information of user data packets to select communication links, it is possible to switch links by adjusting the source port of user data packets when a link is abnormal. This allows for rapid repair of link failures without affecting the operation of the target service.
[0136] Step S206: In the event of an abnormal communication link, the rerouting module is invoked to update the header information of the data packets to be sent in the communication link.
[0138] Specifically, after selecting the communication link as described above, all subsequent data packets can be sent through the communication link. During this stage, network fluctuations or equipment failures can cause data packets to fail to reach the server. Typically, a retransmission mechanism is used to avoid packet loss; however, this operation is affected by link recovery. If link recovery fails, data packet transmission will also fail.
[0140] Therefore, to ensure the target service continues to operate normally and data packets continue to be sent from the endpoint to the server in this situation, the endpoint can actively reroute, i.e., actively switch to other communication links. Since data packet transmission is accomplished by encapsulating user data packets, in the event of a communication link failure, the rerouting module can be invoked to update the header information of the data packets to be sent in the communication link. After the header information is updated, a new link can be selected based on the updated header information, thereby retransmitting the data packets to the server and quickly resolving the problem of data packet transmission failure due to link failure.
[0142] Specifically, the data packet to be sent refers to a data packet that is related to the user data packet and needs to be transmitted to the server through the communication link. For example, if the target service has n TCP data packets, during the data packet transmission to the server, each TCP data packet will be encapsulated with a UDP data packet through the above process before being sent to the server through the specified communication link. During the transmission process, if the link fails, m (mVn) data packets out of the n data packets will fail to reach the server through the failed link. These data packets can be considered as the data packets to be sent, and the data packets to be sent are UDP data packets obtained by re-encapsulation through the rerouting module. Correspondingly, the header information is the message header corresponding to the data packet to be sent.
[0144] In practice, since the data packets sent to the server are user data packets that are re-encapsulated from the transmitted data packets, congestion management strategies can be used to detect link anomalies, thereby triggering the rerouting module to switch links. In this embodiment, the specific implementation is as follows:
[0146] The communication link is subjected to congestion detection and timeout retransmission detection according to the preset congestion management strategy; if the congestion detection or timeout retransmission detection fails, the communication link is determined to be abnormal, and the step of calling the rerouting module to update the header information of the data packets to be sent in the communication link is executed.
[0148] Specifically, the congestion management strategy refers to the TCP congestion management mechanism. Based on this, when transmitting user data packets through a communication link, the TCP congestion management mechanism can be used to perform congestion detection and timeout retransmission detection on the communication link. If either congestion detection or timeout retransmission detection fails, it indicates that the communication link is abnormal. Therefore, the step of calling the rerouting module to update the header information of the data packets to be sent in the communication link can be executed to achieve proactive rerouting by the end-side device.
[0150] In summary, by employing a congestion management mechanism to detect communication link anomalies, problems can be quickly identified at the moment of link failure, enabling rapid response and subsequent link switching to avoid impacting service operation.
[0152] Furthermore, when the rerouting module updates the header information of the data packet to be sent in the communication link, considering that the data packet to be sent also belongs to the user data packet type, it is a data packet obtained by re-encapsulating the transmitted data packet. The source IP and destination IP in its message information are the same as those of the transmitted data packet, and the source port is randomly assigned by the rerouting module. Therefore, by updating the source port information in the header information, the switching to the new link can be completed after the header information is updated. In this embodiment, the specific implementation method is as follows:
[0154] Identify the data packet to be sent in the communication link and obtain the header information of the data packet to be sent; determine the source port information to be updated in the header information, and call the rerouting module to update the source port information to be updated as an update of the header information.
[0156] Specifically, the source port information to be updated refers to the source port corresponding to the data packet to be sent. Based on this, after a communication link failure, to ensure that data packets can continue to be transmitted to the server, the data packets to be sent in the communication link can be identified, and their header information can be obtained. Based on this, the source port information to be updated can be determined from the header information, and the rerouting module can be invoked to update the source port information, which will then be used as the header information update. This allows for subsequent link switching operations to be completed by combining the new header information.
[0158] In summary, by updating the source port information in the header of the data packet to be sent, the header information of the data packet to be sent can be updated without affecting other header information. This allows the end device to reselect the link, ensuring that the data packet can be successfully sent to the server.
[0160] Furthermore, to avoid the source port remaining unchanged before and after the rerouting module switches source ports, thus affecting the link switching operation, a table recording source port information can be maintained on the end-side device. This allows the new source port information to be read and used when switching source port information. In this embodiment, the specific implementation is as follows:
[0162] The user source port information is determined from the user header information, and a pre-stored source port maintenance table is loaded; the rerouting module is called to query the source port maintenance table, and candidate source port information different from the user source port information is determined based on the query result; the rerouting module is called to update the source port information to be updated to the candidate source port information.
[0164] Specifically, user source port information refers to the source port information in the header of user data packets. Correspondingly, the source port maintenance table is a table cached by the end device to record the source port information corresponding to currently used UDP data packets. Furthermore, candidate source port information refers to source port information that differs from the user source port information.
[0166] Based on this, when switching source port information, the user's source port information can be determined first in the user header information, and a pre-stored source port maintenance table can be loaded. At this time, the rerouting module can be called to query the source port maintenance table, thereby determining the candidate source port information that is different from the user's source port information based on the query results. Then, the rerouting module can be called to update the source port information to be updated to the candidate source port information, thus realizing the update of the header information corresponding to the data packet to be sent, so as to facilitate the selection of a new communication link for subsequent use.
[0168] Continuing with the previous example, after determining communication link a, the end device continuously sends UDP packets (encapsulated with TCP packets) related to the model training service to the server via communication link a. At some point, thanks to TCP's congestion management mechanism, if congestion is detected on communication link a, unsent UDP packets will be unable to reach the server, thus affecting model training operations. Therefore, we can first determine the UDP packets that have not yet been sent, and simultaneously determine the source port information in the header of these unsent UDP packets. Based on this, we can query a table recording the currently used outer source ports, and then randomly generate a target source port that is different from the source port information in the header of the unsent UDP packets. At this time, the header information of the unsent UDP packets will be updated to {sIP, target port, dIP, dport, protocol number}, and subsequently, a new link can be selected according to this header information to complete the transmission of the remaining UDP packets.
[0170] In summary, by caching the source port maintenance table on the end-side device, the end-side device can select different candidate source port information when updating packet information to complete the update, thereby enabling link switching.
[0172] Step S208: Based on the updated header information, switch the communication link to the target communication link, and use the target communication link to send the data packet to be sent to the server.
[0174] Specifically, after the rerouting module updates the header information of the data packet to be sent, furthermore, since the selection of the communication link is based on the header information, a new communication link can be selected based on the updated header information. This allows the communication link to be switched to the target communication link, facilitating the subsequent transmission of the data packet to the server using the target communication link. The target communication link specifically refers to the new communication link selected based on the updated header information.
[0176] Furthermore, during link switching, the process actually involves performing a new hash calculation based on the updated header information and then selecting a new link. In this embodiment, the specific implementation is as follows:
[0178] The updated header information is hashed to obtain an updated hash value; a target communication link is selected according to the updated hash value, the communication link is updated to the target communication link, and the data packet to be sent is sent to the server using the target communication link.
[0180] Based on this, after obtaining the updated header information, a hash calculation can be performed on the updated header information to obtain the updated hash value. Then, by selecting the target communication link according to the updated hash value, the abnormal communication link can be updated to the target communication link, and the step of sending the data packet to be sent to the server using the target communication link can be executed.
[0182] It should be noted that the process of calculating the updated hash value is similar to the process of calculating the user hash value described above. The same or corresponding descriptions can be found in the descriptions in the above embodiments, and this embodiment does not make any limitations here.
[0184] Following the previous example, the header information of the unsent UDP packets is updated to {sIP, target port, dIP, dport, protocol number}. The header information can be rehashed using ECMP hashing to obtain the hash value Hash2. Then, communication link b is selected based on Hash2 and used as the communication connection between the end device and the server. Afterwards, communication link a can be switched to communication link b, as shown in Figure 3. UDP packets can then be sent to the server using communication link b, enabling the server to train the target model based on the initial model parameters encapsulated in the packets.
[0186] The link switching method provided in this embodiment enables proactive rerouting by the end-side device, achieving faster fault response and recovery globally. After the end-side device obtains the transmission data packet of the target service, it calls the rerouting module configured on the end-side device to construct a user data packet containing the transmission data packet; the user data packet and the transmission data packet are of different types. Based on this, a communication link can be selected using the user header information of the user data packet, and the user data packet is sent to the server of the target service via the communication link to complete the transmission of the associated target service data packet. Furthermore, if a communication link anomaly is detected, the rerouting module can be called to update the header information of the data packet to be sent in the communication link. This allows the end-side device to proactively perform rerouting after updating the header information of the data packet to be sent, thereby enabling the communication link to be switched to the target communication link based on the updated header information, and the data packet to be sent to the server via the target communication link. This achieves faster response to link failures and recovery of data packet transmission without relying on the server, providing high availability assurance for large-scale networks.
[0188] The following description, in conjunction with Figure 4, uses the application of the link switching method provided in this disclosure in a game scenario as an example to further illustrate the link switching method. Figure 4 shows a flowchart of the processing procedure of a link switching method provided in an embodiment of this disclosure, specifically including the following steps.
[0190] Step S402: Obtain the transmission data packet of the game service and determine the transmission header information of the transmission data packet.
[0192] Step S404: Extract source address information and destination address information from the transmission header information, call the rerouting module to determine source port information, and determine the preset destination port information.
[0194] Step S406: Based on the source address information, destination address information, source port information, and destination port information, construct a user data packet containing the transmitted data packet.
[0196] Step S408: Extract the user header information of the user data packet, perform hash calculation on the user header information, and obtain the user hash value.
[0198] Step S410: Select a communication link according to the user hash value, and use the communication link to send the user data packet to the game server.
[0200] Step S412: In the event of a communication link failure, determine the data packets to be sent in the communication link and obtain the header information of the data packets to be sent.
[0202] Step S414: Determine the source port information to be updated in the header information, and call the rerouting module to update the source port information to be updated as an update of the header information.
[0204] Step S416: Perform hash calculation on the updated header information to obtain the updated hash value, and select the target communication link according to the updated hash value.
[0206] Step S418: Update the communication link to the target communication link, and use the target communication link to send the data packet to be sent to the game server.
[0208] In summary, to enable proactive rerouting by the end-device and achieve faster fault response and recovery globally, after the end-device obtains the transmission data packet of the target service, it can invoke the rerouting module configured on the end-device to construct a user data packet containing the transmission data packet; and the user data packet and the transmission data packet should be of different types. Based on this, a communication link can be selected using the user header information of the user data packet, and the user data packet can be sent to the server of the target service using this communication link to complete the transmission of the associated target service data packet. Furthermore, if a communication link anomaly is detected, the rerouting module can be invoked to update the header information of the data packet to be sent in the communication link. This allows the end-device to proactively perform rerouting after updating the header information of the data packet to be sent, thereby enabling the switching of the communication link to the target communication link based on the updated header information, and the use of the target communication link to send the data packet to be sent to the server. This achieves faster response to link failures and recovery of data packet transmission without relying on the server, providing high availability assurance for large-scale networks.
[0210] Corresponding to the above method embodiments, this disclosure also provides a link switching system embodiment. Figure 5 shows a schematic diagram of the structure of a link switching system provided in one embodiment of this disclosure. As shown in Figure 5, the link switching system 500 includes a processing module 510 and a rerouting module 520, including:
[0212] The processing module 510 is configured to acquire the transmission data packet of the target service and send it to the rerouting module; the rerouting module 520 is configured to construct a user data packet containing the transmission data packet and feed it back to the processing module.
[0214] The processing module 510 is configured to select a communication link based on the user header information of the user data packet, and use the communication link to send the user data packet to the server of the target service; in the event of an abnormal communication link, the data packet to be sent in the communication link is sent to the rerouting module.
[0216] The rerouting module 520 is configured to update the header information of the data packet to be sent and feed back the data packet to be sent with the updated header information to the processing module;
[0218] The processing module 510 is configured to switch the communication link to the target communication link based on the updated header information, and use the target communication link to send the data packet to be sent to the server.
[0220] In an optional embodiment, obtaining the transmission data packet of the target service and invoking the rerouting module to construct a user data packet containing the transmission data packet includes:
[0222] Obtain the transmission data packet of the target service and determine the transmission header information of the transmission data packet; extract the source address information and destination address information from the transmission header information, call the rerouting module to determine the source port information, and determine the preset destination port information; based on the source address information, the destination address information, the source port information, and the destination port information, construct a user data packet containing the transmission data packet.
[0224] In an optional embodiment, the step of selecting a communication link based on the user header information of the user data packet, and using the communication link to send the user data packet to the server of the target service, includes:
[0226] Extract the user header information of the user data packet; perform a hash calculation on the user header information to obtain the user hash value; select a communication link according to the user hash value, and execute the step of sending the user data packet to the server of the target service using the communication link.
[0228] In an optional embodiment, the step of invoking the rerouting module to update the header information of the data packets to be sent in the communication link includes:
[0230] Identify the data packet to be sent in the communication link and obtain the header information of the data packet to be sent; determine the source port information to be updated in the header information, and call the rerouting module to update the source port information to be updated as an update of the header information.
[0232] In an optional embodiment, the step of invoking the rerouting module to update the source port information to be updated includes:
[0234] The user source port information is determined from the user header information, and a pre-stored source port maintenance table is loaded; the rerouting module is called to query the source port maintenance table, and candidate source port information different from the user source port information is determined based on the query result; the rerouting module is called to update the source port information to be updated to the candidate source port information.
[0236] In an optional embodiment, switching the communication link to a target communication link based on the updated header information, and using the target communication link to send the data packet to be sent to the server, includes:
[0238] The updated header information is hashed to obtain an updated hash value; a target communication link is selected according to the updated hash value, the communication link is updated to the target communication link, and the data packet to be sent is sent to the server using the target communication link.
[0240] In an optional embodiment, the source address information and the destination address information in the transmission header information are the same as the user source address information and the user destination address information in the user header information; the source port information is obtained by the rerouting module from a pre-stored source port maintenance table.
[0242] In an optional embodiment, before the step of calling the rerouting module to update the header information of the data packets to be sent in the communication link in the event of an abnormal communication link, the method further includes: performing congestion detection and timeout retransmission detection on the communication link according to a preset congestion management strategy; if the congestion detection or timeout retransmission detection fails, determining that the communication link is abnormal, and executing the step of calling the rerouting module to update the header information of the data packets to be sent in the communication link.
[0244] The above is an illustrative scheme of a link switching system according to this embodiment. It should be noted that the technical solution of this link switching system and the technical solution of the link switching method described above belong to the same concept. For details not described in detail in the technical solution of the link switching system, please refer to the description of the technical solution of the link switching method described above.
[0246] Corresponding to the above method embodiments, this disclosure also provides a link switching device embodiment. Figure 6 shows a schematic diagram of the structure of a link switching device provided in one embodiment of this disclosure. As shown in Figure 6, the device is applied to an end-side device and includes:
[0248] The acquisition unit 602 is configured to acquire the transmission data packet of the target service and call the rerouting module to construct a user data packet containing the transmission data packet;
[0250] Selection unit 604 is configured to select a communication link based on the user header information of the user data packet, and use the communication link to send the user data packet to the server of the target service;
[0252] The update unit 606 is configured to call the rerouting module to update the header information of the data packets to be sent in the communication link when the communication link is abnormal.
[0254] The sending unit 608 is configured to switch the communication link to the target communication link based on the updated header information, and use the target communication link to send the data packet to be sent to the server.
[0256] In an optional embodiment, the acquisition unit 602 is further configured to:
[0258] Obtain the transmission data packet of the target service and determine the transmission header information of the transmission data packet; extract the source address information and destination address information from the transmission header information, call the rerouting module to determine the source port information, and determine the preset destination port information; based on the source address information, the destination address information, the source port information, and the destination port information, construct a user data packet containing the transmission data packet.
[0260] In an optional embodiment, the selection unit 604 is further configured to:
[0262] Extract the user header information of the user data packet; perform a hash calculation on the user header information to obtain the user hash value; select a communication link according to the user hash value, and execute the step of sending the user data packet to the server of the target service using the communication link.
[0264] In an optional embodiment, the update unit 606 is further configured to:
[0266] Identify the data packet to be sent in the communication link and obtain the header information of the data packet to be sent; determine the source port information to be updated in the header information, and call the rerouting module to update the source port information to be updated as an update of the header information.
[0268] In an optional embodiment, the update unit 606 is further configured to:
[0270] The user source port information is determined from the user header information, and a pre-stored source port maintenance table is loaded; the rerouting module is called to query the source port maintenance table, and candidate source port information different from the user source port information is determined based on the query result; the rerouting module is called to update the source port information to be updated to the candidate source port information.
[0272] In an optional embodiment, the transmitting unit 608 is further configured to:
[0274] The updated header information is hashed to obtain an updated hash value; a target communication link is selected according to the updated hash value, the communication link is updated to the target communication link, and the data packet to be sent is sent to the server using the target communication link.
[0276] In an optional embodiment, the source address information and the destination address information in the transmission header information are the same as the user source address information and the user destination address information in the user header information; the source port information is obtained by the rerouting module from a pre-stored source port maintenance table.
[0278] In an optional embodiment, the apparatus further includes:
[0280] The detection module is configured to perform congestion detection and timeout retransmission detection on the communication link according to a preset congestion management strategy; if the congestion detection or timeout retransmission detection fails, the communication link is determined to be abnormal, and the step of calling the rerouting module to update the header information of the data packets to be sent in the communication link is executed.
[0282] The above is a schematic scheme of a link switching device according to this embodiment. It should be noted that the technical solution of this link switching device and the technical solution of the link switching method described above belong to the same concept. For details not described in detail in the technical solution of the link switching device, please refer to the description of the technical solution of the link switching method described above.
[0284] Figure 7 shows a structural block diagram of a computing device 700 according to an embodiment of the present disclosure. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is configured to store data.
[0286] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a network interface controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0288] In one embodiment of this disclosure, the aforementioned components of the computing device 700, as well as other components not shown in FIG. 7, may be interconnected, for example, via a bus. It should be understood that the block diagram of the computing device shown in FIG. 7 is merely for illustrative purposes and is not intended to limit the scope of this disclosure. Those skilled in the art can add or replace other components as needed.
[0290] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 700 can also be a mobile or stationary server.
[0292] The processor 720 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the link switching method described above.
[0294] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the link switching method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the link switching method described above.
[0296] An embodiment of this disclosure also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the link switching method described above.
[0298] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the link switching method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the link switching method described above.
[0300] An embodiment of this disclosure also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described link switching method.
[0302] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the aforementioned link switching method belong to the same concept. Details not described in detail in the computer program's technical solution can be found in the description of the technical solution of the aforementioned link switching method.
[0304] An embodiment of this disclosure also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described link switching method.
[0306] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the link switching method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the link switching method described above.
[0308] The foregoing has described specific embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0310] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0312] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this disclosure are not limited to the described order of actions, because according to the embodiments of this disclosure, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this disclosure are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this disclosure.
[0314] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0316] The preferred embodiments disclosed above are merely illustrative of this disclosure. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments of this disclosure. These embodiments are selected and specifically described in this disclosure to better explain the principles and practical applications of the embodiments of this disclosure, thereby enabling those skilled in the art to better understand and utilize this disclosure. This disclosure is limited only by the claims and their full scope and equivalents.
[0318] Industrial applicability
[0320] The link switching method provided in this embodiment enables proactive rerouting by the end-side device, achieving faster fault response and recovery globally. After the end-side device obtains the transmission data packet of the target service, it calls the rerouting module configured on the end-side device to construct a user data packet containing the transmission data packet; the user data packet and the transmission data packet are of different types. Based on this, a communication link can be selected using the user header information of the user data packet, and the user data packet is sent to the server of the target service via the communication link to complete the transmission of the associated target service data packet. Furthermore, if a communication link anomaly is detected, the rerouting module can be called to update the header information of the data packet to be sent in the communication link. This allows the end-side device to proactively perform rerouting after updating the header information of the data packet to be sent, thereby enabling the communication link to be switched to the target communication link based on the updated header information, and the data packet to be sent to the server via the target communication link. This achieves faster response to link failures and recovery of data packet transmission without relying on the server, providing high availability assurance for large-scale networks.
Claims
Claims 1. A link switching method, applied to an end-side device, comprising: Obtain the transmission data packets of the target service, and call the rerouting module to construct a user data packet containing the transmission data packets; A communication link is selected based on the user header information of the user data packet, and the user data packet is sent to the server of the target service using the communication link; In the event of an abnormal communication link, the rerouting module is invoked to update the header information of the data packets to be sent in the communication link; Based on the updated header information, the communication link is switched to the target communication link, and the data packet to be sent is sent to the server using the target communication link.
2. The link switching method according to claim 1, wherein obtaining the transmission data packet of the target service and invoking the rerouting module to construct a user data packet containing the transmission data packet includes: Obtain the transmission data packets of the target service and determine the transmission header information of the transmission data packets; Extract source address information and destination address information from the transmission header information, call the rerouting module to determine source port information, and determine the preset destination port information; Based on the source address information, the destination address information, the source port information, and the destination port information, a user data packet containing the transmitted data packet is constructed.
3. The link switching method according to claim 1, wherein selecting a communication link based on the user header information of the user data packet and sending the user data packet to the server of the target service using the communication link comprises: Extract the user header information from the user data packet; Perform a hash calculation on the user header information to obtain the user hash value; Select a communication link according to the user hash value, and execute the step of sending the user data packet to the server of the target service using the communication link.
4. The link switching method according to claim 1, wherein calling the rerouting module to update the header information of the data packet to be sent in the communication link includes: Identify the data packets to be sent in the communication link and obtain the header information of the data packets to be sent; The source port information to be updated is determined from the header information, and the rerouting module is invoked to update the source port information to be updated, which is then used as an update to the header information.
5. The link switching method according to claim 4, wherein invoking the rerouting module to update the source port information to be updated includes: The user source port information is determined from the user header information, and the pre-stored source port maintenance table is loaded. The rerouting module is invoked to query the source port maintenance table, and candidate source port information that is different from the user's source port information is determined based on the query result. The rerouting module is invoked to update the source port information to be updated to the candidate source port information.
6. The link switching method according to claim 1, wherein switching the communication link to a target communication link based on the updated header information, and sending the data packet to be sent to the server using the target communication link, comprises: Perform a hash calculation on the updated header information to obtain the updated hash value; Select the target communication link according to the updated hash value, update the communication link to the target communication link, and Perform the step of sending the data packet to be sent to the server using the target communication link.
7. The link switching method according to claim 2, wherein the source address information and the destination address information in the transmission header information are the same as the user source address information and the user destination address information in the user header information; the source port information is obtained by the rerouting module from a pre-stored source port maintenance table.
8. The link switching method according to any one of claims 1-7, further comprising, before the step of calling the rerouting module to update the header information of the data packet to be sent in the communication link in the event of an abnormal communication link: The communication link is congestion detected and timeout retransmission detected according to the preset congestion management strategy; If congestion detection or timeout retransmission detection fails, the communication link is determined to be abnormal, and the step of calling the rerouting module to update the header information of the data packets to be sent in the communication link is executed.
9. A link switching system, the link switching system comprising a processing module and a rerouting module, comprising: The processing module is configured to acquire the transmission data packets of the target service and send them to the rerouting module; The rerouting module is configured to construct a user data packet containing the transmitted data packet and feed it back to the processing module; The processing module is configured to select a communication link based on the user header information of the user data packet, and use the communication link to send the user data packet to the server of the target service; in the event of an abnormal communication link, the data packet to be sent in the communication link is sent to the rerouting module. The rerouting module is configured to update the header information of the data packet to be sent and feed back the data packet to be sent with the updated header information to the processing module. The processing module is configured to switch the communication link to the target communication link based on the updated header information, and use the target communication link to send the data packet to be sent to the server.
10. A link switching device, applied to end-side equipment, comprising: The acquisition unit is configured to acquire the transmission data packets of the target service and call the rerouting module to construct a user data packet containing the transmission data packets; The selection unit is configured to select a communication link based on the user header information of the user data packet, and use the communication link to send the user data packet to the server of the target service. The update unit is configured to call the rerouting module to update the header information of the data packets to be sent in the communication link when the communication link is abnormal. The sending unit is configured to switch the communication link to the target communication link based on the updated header information, and use the target communication link to send the data packet to be sent to the server.
11. A computing device, comprising: Memory and processor; The memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 8.
12. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.
13. A computer program product, comprising a computer program or instructions, which, when executed by a processor... The steps for implementing the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data packet transmission method and device, equipment, storage medium and program product
CN116980344A
Data center network fault rerouting method and device, electronic equipment and medium
CN118075195A
Data processing method and device, computer equipment and readable storage medium
CN118101606A