Data communication systems, methods, apparatus, computer equipment, and readable storage media
By detecting the target operator's line fault at the request initiator and selecting a backup operator's line for data relay, encapsulation, and restoration, the problem of data transmission interruption caused by the target operator's line fault is solved, and data transmission continuity is achieved under fault conditions.
Patent Information
- Application Number
- CN202510715987.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-05-30
AI Technical Summary
In high-performance, high-reliability service scenarios, a failure in the target operator's line can lead to inaccessibility, impacting the user experience.
The system detects faults in the target operator's line by initiating a request, selects an alternate operator's line for data relay, repackages and restores the data, and uses the data relay to transmit the data on the target operator's line.
When the target operator's line fails, data transmission continues through backup operator lines and data relay methods, thus resolving the data transmission interruption problem caused by line failure.
Smart Images

Figure CN120223625B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data communication system, method, apparatus, computer equipment, and readable storage medium. Background Technology
[0002] In high-performance, high-reliability service scenarios, multi-line servers are often used. Under normal circumstances, multiple network cards and multiple IP (Internet Protocol) configurations are configured to correspond to different carrier lines. For performance and cost considerations, when a client communicates with different servers, it will select the IP configuration of the same carrier as the source address to initiate the request based on the carrier information of the server.
[0003] However, in real-world scenarios, network equipment and carrier lines inevitably encounter various problems, such as line cutovers by a particular carrier, which can render a specific line connecting to the server unavailable at a certain time or for a specific period. This results in the inability to access services from that carrier during the corresponding time period, impacting the user experience. Summary of the Invention
[0004] Therefore, it is necessary to provide a data communication system, method, apparatus, computer equipment, and readable storage medium that can ensure data transmission by the target operator is not affected when the target operator's link is faulty, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a data communication system, including a request initiator, a data relay, and a request receiver corresponding to a target operator; both the request initiator and the data relay support multiple operator lines, and the operator lines supported by the request initiator and the data relay are the same.
[0006] When the request initiator detects a fault in the supported target operator's line, it selects a relay operator line from other operator lines supported by the request initiator, re-encapsulates the message to be sent to the request receiver via the target operator line to obtain a relay message, and sends the relay message to the data relay end via the relay operator line.
[0007] The data relay is used to restore the received relay message to obtain the restored message; and sends the restored message to the requesting receiver through the target operator's line supported by the data relay.
[0008] The requesting receiver is used to return the return message corresponding to the restoration message to the data relay end through the target operator line between itself and the data relay end;
[0009] The data relay end is used to re-encapsulate the return message to obtain the return relay message, and then send the return relay message to the request initiator through the return operator line.
[0010] In one embodiment, the message to be sent includes: a request IP address segment, a request TCP segment, and a request data segment; the request initiator is further configured to:
[0011] A relay TCP segment is generated based on the relay operator's line; the request IP address segment of the message to be sent is encapsulated into the option field of the relay TCP segment to obtain the relay pseudo TCP header; the relay source IP address and relay destination IP address of the relay operator's line are obtained to form a relay IP address segment; the relay source MAC address and relay destination MAC address of the relay operator's line are obtained to form a relay MAC address segment; the relay MAC address segment, relay IP address segment, request pseudo TCP header, request TCP segment, and request data segment are encapsulated into a relay message.
[0012] In one embodiment, the requested IP address range includes: a requested destination IP address; and a data relay, further configured to:
[0013] Obtain the requested destination IP address from the option field of the relay pseudo TCP header, and obtain the relay sending IP address corresponding to the target operator of the data relay end; strip the relay pseudo TCP header from the relay message, modify the source IP address of the relay message to the IP address corresponding to the target operator of the data relay end, and modify the destination IP address of the relay message to the requested destination IP address, forming a restoration message.
[0014] In one embodiment, the request IP address range further includes: a request source IP address; and a data relay, further configured to:
[0015] Obtain the request source IP address and request destination IP address from the option field of the relay pseudo TCP header; obtain the relay source IP address and relay destination IP address from the IP address range of the relayed packet; establish a mapping relationship based on the request source IP address, relay source IP address, relay destination IP address, relay sending IP address, and request destination IP address.
[0016] In one embodiment, the return message includes: a return IP address segment, a return TCP segment, and a return data segment; the data relay is further used for:
[0017] Based on the mapping relationship, the corresponding backhaul operator line for the backhaul packet is determined; the two ends of the backhaul operator line are the data relay end and the request initiator to which the backhaul packet should return; a backhaul relay TCP segment is generated based on the backhaul operator line; and the backhaul IP address segment is encapsulated into the option field of the backhaul relay TCP segment to obtain the backhaul relay pseudo TCP header; the backhaul relay source IP address and backhaul relay destination IP address of the backhaul operator line are obtained to form a backhaul relay IP address segment; the backhaul relay source MAC address and backhaul relay destination MAC address of the backhaul operator line are obtained to form a backhaul relay MAC address segment; the backhaul relay MAC address segment, backhaul relay IP address segment, backhaul relay pseudo TCP header, backhaul TCP segment, and backhaul data segment are encapsulated into a backhaul relay packet.
[0018] Secondly, this application also provides a data communication method, applied to a request initiator in a data communication system, comprising:
[0019] If a fault is detected in the supported target operator's line, a relay operator line is selected from other operator lines supported by the request initiator; the message to be sent that needs to be sent to the request receiver via the target operator line is re-encapsulated to obtain a relay message;
[0020] The relay message is sent to the data relay end via the relay operator line; to instruct the data relay end to restore the received relay message and obtain the restored message; the restored message is sent to the requesting receiver via the target operator line supported by the data relay end; to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay end via the target operator line supported by the data relay end; to instruct the data relay end to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator via the return operator line.
[0021] Thirdly, this application also provides a data communication method applied to a data relay terminal in a data communication system, comprising:
[0022] Receive relay messages from the request initiator; the relay message is obtained by the request initiator selecting a relay operator line from other operator lines supported by the request initiator when the target operator line is detected to be faulty, and re-encapsulating the message to be sent to the request receiver through the target operator line.
[0023] The received relay message is restored to obtain a restored message; the restored message is sent to the requesting receiver through the target operator line supported by the data relay terminal; so as to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay terminal through the target operator line supported by the data relay terminal.
[0024] Receive the return message from the requesting receiver; re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator through the return operator line.
[0025] Fourthly, this application also provides a data communication device, including a request initiation module, a data relay module, and a request receiving module corresponding to the target operator; both the request initiation module and the data relay module support multiple operator lines, and the operator lines supported by the request initiation module and the data relay module are the same.
[0026] The request initiation module is used to select a relay operator line from other operator lines supported by the request initiation module when a fault is detected in the supported target operator line. The message to be sent is re-encapsulated to obtain a relay message. The relay message is then sent to the data relay module through the relay operator line.
[0027] The data relay module is used to restore the received relay messages to obtain restored messages; and to send the restored messages to the request receiving module through the target operator's lines supported by the data relay module.
[0028] The request receiving module is used to return the return message corresponding to the restoration message to the data relay module through the target operator's line supported by the data relay module;
[0029] The data relay module is also used to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiation module through the return operator line.
[0030] Fifthly, this application also provides a computer device applied to the request initiating end in the first aspect, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0031] If a fault is detected in the supported target operator's line, a relay operator line is selected from other operator lines supported by the request initiator; the message to be sent that needs to be sent to the request receiver via the target operator line is re-encapsulated to obtain a relay message;
[0032] The relay message is sent to the data relay end via the relay operator line; to instruct the data relay end to restore the received relay message and obtain the restored message; the restored message is sent to the requesting receiver via the target operator line supported by the data relay end; to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay end via the target operator line supported by the data relay end; to instruct the data relay end to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator via the return operator line.
[0033] Sixthly, this application also provides a computer device applied to the data transfer terminal in the first aspect, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0034] Receive relay messages from the request initiator; the relay message is obtained by the request initiator selecting a relay operator line from other operator lines supported by the request initiator when the target operator line is detected to be faulty, and re-encapsulating the message to be sent to the request receiver through the target operator line.
[0035] The received relay message is restored to obtain a restored message; the restored message is sent to the requesting receiver through the target operator line supported by the data relay terminal; so as to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay terminal through the target operator line supported by the data relay terminal.
[0036] Receive the return message from the requesting receiver; re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator through the return operator line.
[0037] In a seventh aspect, this application also provides a readable storage medium for use at the request initiating end in the first aspect, having stored thereon a computer program that, when executed by a processor, performs the following steps:
[0038] If a fault is detected in the supported target operator's line, a relay operator line is selected from other operator lines supported by the request initiator; the message to be sent that needs to be sent to the request receiver via the target operator line is re-encapsulated to obtain a relay message;
[0039] The relay message is sent to the data relay end via the relay operator line; to instruct the data relay end to restore the received relay message and obtain the restored message; the restored message is sent to the requesting receiver via the target operator line supported by the data relay end; to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay end via the target operator line supported by the data relay end; to instruct the data relay end to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator via the return operator line.
[0040] Eighthly, this application also provides a readable storage medium for use in the data transfer terminal of the first aspect, having stored thereon a computer program that, when executed by a processor, performs the following steps:
[0041] Receive relay messages from the request initiator; the relay message is obtained by the request initiator selecting a relay operator line from other operator lines supported by the request initiator when the target operator line is detected to be faulty, and re-encapsulating the message to be sent to the request receiver through the target operator line.
[0042] The received relay message is restored to obtain a restored message; the restored message is sent to the requesting receiver through the target operator line supported by the data relay terminal; so as to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay terminal through the target operator line supported by the data relay terminal.
[0043] Receive the return message from the requesting receiver; re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator through the return operator line.
[0044] The aforementioned data communication system, method, apparatus, computer equipment, and readable storage medium include a request initiator, a data relay, and a request receiver corresponding to the target operator. Both the request initiator and the data relay support multiple operator lines, and the operator lines supported by the request initiator and the data relay are the same. When a fault is detected in the supported target operator line, the request initiator selects a relay operator line from other operator lines supported by the request initiator, re-encapsulates the message to be sent to the request receiver via the target operator line to obtain a relay message, and sends the relay message to the data relay via the relay operator line. The data relay performs restoration processing on the received relay message to obtain a restored message; it sends the restored message to the request receiver via the target operator line supported by the data relay. The request receiver returns a return message corresponding to the restored message to the data relay via the target operator line between itself and the data relay. The data relay re-encapsulates the return message to obtain a return relay message and sends the return relay message to the request initiator via the return operator line. When the target operator's line fails, using the backup operator's line and transmitting data via data relay can solve the problem of data transmission failure when the operator's line fails. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is an application environment diagram of a data communication system in one embodiment;
[0047] Figure 2 This is a schematic diagram of the operation of a data communication system in one embodiment;
[0048] Figure 3 This is a schematic diagram of the structure of the message to be sent and the relay message in one embodiment;
[0049] Figure 4 This is a flowchart illustrating the application of a data communication method to the request initiator in one embodiment.
[0050] Figure 5 This is a flowchart illustrating the application of a data communication method to a data relay terminal in one embodiment;
[0051] Figure 6 This is a structural block diagram of a data communication device in one embodiment;
[0052] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, a further detailed description is provided below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit the scope of this application.
[0054] The data communication system provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the request initiator 102 communicates with the data relay 104 through multiple operator lines. Either the request initiator 102 or the data relay 104 communicates with the request receiver 106 through the target operator line corresponding to the request receiver. The data communication system includes the request initiator 102, the data relay 104, and the request receiver 106 corresponding to the target operator. Both the request initiator 102 and the data relay 104 support multiple operator lines, and the operator lines supported by the request initiator 102 and the data relay 104 are the same. When the request initiator 102 detects a fault in the supported target operator line, it selects a relay operator line from other operator lines supported by the request initiator 102, and re-encapsulates the message to be sent to the request receiver 106 through the target operator line to obtain a relay message. The relay message is sent to the data relay terminal 104 via the relay operator line; the data relay terminal 104 is used to restore the received relay message to obtain a restored message; the restored message is sent to the request receiving terminal 106 via the target operator line supported by the data relay terminal; the request receiving terminal 106 is used to return the return message corresponding to the restored message to the data relay terminal via the target operator line supported by the data relay terminal; the data relay terminal 104 is used to re-encapsulate the return message to obtain a return relay message, and send the return relay message to the request initiating terminal 102 via the return operator line.
[0055] In one exemplary embodiment, such as Figure 2 As shown, a data communication system is provided, including a request initiator 102, a data relay 104, and a request receiver 106 corresponding to the target operator; both the request initiator and the data relay support multiple operator lines, and the operator lines supported by the request initiator and the data relay are the same.
[0056] When the request initiator detects a fault in the supported target operator's line, it selects a relay operator line from other operator lines supported by the request initiator, re-encapsulates the message to be sent to the request receiver via the target operator line to obtain a relay message, and sends the relay message to the data relay end via the relay operator line.
[0057] In this process, the request initiator typically communicates directly with the request receiver. The request receiver only supports one type of carrier line, i.e., the target carrier line. Both the request initiator and the data relay end support multiple carrier lines. Therefore, when the target carrier line supported by the request initiator fails, data cannot be sent to the request receiver. Instead, data must be sent to the data relay end via other carrier lines, and then from the data relay end to the target carrier line corresponding to the target carrier line. The relay carrier line is any other carrier line originating from the request initiator and ending at the data relay end.
[0058] Optionally, a target operator line failure could be caused by a malfunction in the network interface card (NIC) of the target operator on the request initiator, preventing data transmission through that NIC. Meanwhile, the NICs of the second and third operators are functioning normally. Both the request initiator and the request receiver are multi-line servers, each with IP configurations for the first, second, and third operators, meaning they support all three lines. The request receiver, however, is only associated with the first operator and only has its IP configuration, thus supporting only the first operator's lines. The relay operator line is used when the target operator line fails (i.e., when the first operator line between the request initiator and the request receiver fails). In this case, the request initiator selects the nearest multi-line server as a data relay, using the second operator's line (originating from the request initiator and ending at the relay) as the relay operator line for communication.
[0059] For example, if the request initiator detects a failure in the first operator line that is communicating with the request receiver, it selects the nearest multi-line server as a data relay, uses the second operator line between itself and the data relay as the relay operator line, re-encapsulates the message to be sent to the request receiver via the first operator line to obtain the relay message, and sends the relay message to the data relay via the relay operator line.
[0060] The data relay is used to restore the received relay message to obtain the restored message; the restored message is then sent to the requesting receiver through the target operator's line supported by the data relay.
[0061] The relay message's `option` field contains a relay identifier, indicating that the message requires relaying. After the data relay end performs restoration processing, it establishes a mapping relationship based on the message information, facilitating the subsequent forwarding of return messages from the requesting receiver to the requesting initiator. Since the requesting receiver only supports the first carrier's line, the data relay end sends the restored message to the requesting receiver via the first carrier's line between itself and the requesting receiver.
[0062] For example, the data relay is used to restore the received relay message to obtain a restored message; and send the restored message to the requesting receiver through the first operator line supported by the data relay.
[0063] The requesting receiver is used to return the return message corresponding to the restoration message to the data relay end through the target operator line between itself and the data relay end.
[0064] The process of requesting the receiving end to send a return message to the data relay end is a normal communication process, without any operations such as re-encapsulating the message.
[0065] For example, the requesting receiver is used to return a return message corresponding to the restoration message to the data relay end through the first operator line between itself and the data relay end.
[0066] The data relay end is used to re-encapsulate the return message to obtain the return relay message, and then send the return relay message to the request initiator through the return operator line.
[0067] The data relay end re-encapsulates the return message in the same way that the request receiving end re-encapsulates the message to be sent. The origin of the return operator line is the data relay end, and the destination is the second operator line of the request initiating end. The lines are the same as the relay operator line, but the origin and destination are reversed.
[0068] For example, the data relay end is used to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator through the return operator line.
[0069] The aforementioned data communication system, method, apparatus, computer equipment, and readable storage medium include a request initiator, a data relay, and a request receiver corresponding to the target operator. Both the request initiator and the data relay support multiple operator lines, and the operator lines supported by the request initiator and the data relay are the same. When a fault is detected in the supported target operator line, the request initiator selects a relay operator line from other operator lines supported by the request initiator, re-encapsulates the message to be sent to the request receiver via the target operator line to obtain a relay message, and sends the relay message to the data relay via the relay operator line. The data relay performs restoration processing on the received relay message to obtain a restored message; it sends the restored message to the request receiver via the target operator line supported by the data relay. The request receiver returns a return message corresponding to the restored message to the data relay via the target operator line between itself and the data relay. The data relay re-encapsulates the return message to obtain a return relay message and sends the return relay message to the request initiator via the return operator line. When the target operator's line fails, using the backup operator's line and transmitting data via data relay can solve the problem of data transmission failure when the operator's line fails.
[0070] In an exemplary embodiment, the message to be sent includes: a request IP address segment, a request TCP segment, and a request data segment; the request initiator is further configured to:
[0071] A relay TCP segment is generated based on the relay operator's line; the request IP address segment of the message to be sent is encapsulated into the option field of the relay TCP segment to obtain the relay pseudo TCP header; the relay source IP address and relay destination IP address of the relay operator's line are obtained to form a relay IP address segment; the relay source MAC address and relay destination MAC address of the relay operator's line are obtained to form a relay MAC address segment; the relay MAC address segment, relay IP address segment, request pseudo TCP header, request TCP segment, and request data segment are encapsulated into a relay message.
[0072] The message to be sent also includes: a request MAC address range; the request initiator and data relay are multi-line servers, with the first, second, and third operators each having their own IP addresses at both ends, and each operator communicating through their respective IP addresses; the request receiver is each operator's own server, possessing only its own operator-specific IP address. Therefore, when a fault occurs at the request initiator, causing a failure in the target operator's line for communication with the request receiver, the IP address range of the message to be sent needs to be converted to the IP address range of another operator, thus being sent to the relay server through the other operator's line; the message is then sent to the request receiver through the target operator's line, which is functioning normally at the relay server.
[0073] Optional, such as Figure 3 As shown, the message to be sent includes: a request MAC address segment, a request IP address segment, a request TCP segment, and a request data segment. The relay message includes: a relay MAC address segment, a relay IP address segment, a request pseudo-TCP header, a request TCP segment, and a request data segment. The request MAC address segment includes the request source MAC address and the request destination MAC address; the request source MAC address is the MAC address of the request initiating end, and the request destination MAC address is the MAC address of the request receiving end. The request IP address segment includes the request source IP address and the request destination IP address; the request source IP address is the IP address of the first operator at the request initiating end, and the request destination IP address is the IP address of the first operator at the request receiving end. The relay source MAC address is the MAC address of the request initiating end, which is equal to the request source MAC address; the relay destination MAC address is the MAC address of the data relay end. The source IP address of the relay operator's line is the IP address of the second operator at the request initiating end, and the destination IP address is the IP address of the second operator at the data relay end. Therefore, the source IP address of the relayed message is the IP address of the second operator at the request initiating end, and the destination IP address is the IP address of the second operator at the data relay end, thus enabling the relayed message to be sent to the data relay end via the relay operator's line. The option field is an optional part of the TCP segment, used to provide additional control information and extended functions. In this application, the request IP address segment is encapsulated in the option field of the relayed message TCP segment. The relay identifier value of the option field can be 253, indicating that the message is a relayed message.
[0074] The MAC address (Media Access Control Address) is the physical address. The IP address (Internet Protocol Address) is used to distinguish different ISPs on different multi-line servers. TCP is the Transmission Control Protocol, which includes fields such as source port number, destination port number, sequence number, acknowledgment number, data offset, reserved bits, control bits, window size, checksum, and urgent pointer. These fields carry various control and status information about data transmission. For example, the source and destination port numbers identify the application processes sending and receiving data, the sequence number and acknowledgment number ensure ordered transmission and reliable reception of data, and the control bits control the establishment and teardown of TCP connections and the mode of data transmission.
[0075] For example, a relay TCP segment is generated based on the relay operator's line. The option field of the relay TCP segment includes a relay identifier. The relay identifier is used to determine whether the packet is sent through a relay process. The request IP address segment of the packet to be sent is encapsulated into the option field of the relay TCP segment to obtain the relay pseudo TCP header. The relay source IP address and relay destination IP address of the relay operator's line are obtained to form a relay IP address segment. The MAC address of the request initiator is used as the relay source MAC address, and the MAC address of the data relayer is used as the relay destination MAC address to form a relay MAC address segment. The relay MAC address segment, relay IP address segment, request pseudo TCP header, request TCP segment, and request data segment are encapsulated into a relay packet.
[0076] In this embodiment, when the target operator's line fails at the request initiator, the message to be sent is re-encapsulated into a relay message, which is then sent to the data relay end via the relay operator's line. The data relay end then sends the message to the request receiver, effectively ensuring that the message corresponding to the target operator can still be sent during the period when the target operator's line fails at the request receiver.
[0077] In one exemplary embodiment, the requested IP address range includes: a requested destination IP address; and a data relay end, further configured to:
[0078] Obtain the requested destination IP address from the option field of the relay pseudo TCP header, and obtain the relay sending IP address corresponding to the target operator of the data relay end; strip the relay pseudo TCP header from the relay message, modify the source IP address of the relay message to the IP address corresponding to the target operator of the data relay end, and modify the destination IP address of the relay message to the requested destination IP address, forming a restoration message.
[0079] The destination IP address is the IP address of the requesting end, and the relaying IP address is the IP address of the first operator at the data relay end.
[0080] For example, the MAC address of the relay source in the relay packet is modified to the MAC address of the data relay end, and the MAC address of the relay destination in the relay packet is modified to the MAC address of the requesting receiver; the request destination IP address is obtained from the option field of the relay pseudo TCP header, and the IP address of the first operator on the data relay end is obtained as the relay sending IP address; the relay source IP address in the relay packet is modified to the relay sending IP address, and the relay destination IP address in the relay packet is modified to the request destination IP address; the relay pseudo TCP header in the relay packet is stripped to form a restored packet.
[0081] In this embodiment, by performing a restoration operation on the relay message to obtain the restored message, the relay server can send the message to the requesting receiver, thus realizing a complete message sending process in the event of a line failure of the target operator.
[0082] In one exemplary embodiment, the request IP address range further includes: the request source IP address; and the data relay end is further used for:
[0083] Obtain the request source IP address and request destination IP address from the option field of the relay pseudo TCP header; obtain the relay source IP address and relay destination IP address from the IP address range of the relayed packet; establish a mapping relationship based on the request source IP address, relay source IP address, relay destination IP address, relay sending IP address, and request destination IP address.
[0084] For example, the request source IP address and request destination IP address are obtained from the option field of the relay pseudo TCP header; the relay source IP address and relay destination IP address are obtained from the IP address segment of the relay packet; and the line transmission relationship is established based on the request source IP address (the IP address of the first operator at the request initiating end), the relay source IP address (the IP address of the second operator at the request initiating end), the relay destination IP address (the IP address of the second operator at the data relay end), the relay sending IP address (the IP address of the first operator at the data relay end), and the request destination IP address (the IP address of the request receiving end).
[0085] In this embodiment, by establishing a line transmission relationship, it is convenient for the subsequent data relay end to return the return message to the request initiator.
[0086] In one exemplary embodiment, the return packet includes: a return IP address segment, a return TCP segment, and a return data segment; the data relay end is further used for:
[0087] Based on the mapping relationship, the corresponding backhaul operator line for the backhaul packet is determined; the two ends of the backhaul operator line are the data relay end and the request initiator to which the backhaul packet should return; a backhaul relay TCP segment is generated based on the backhaul operator line; and the backhaul IP address segment is encapsulated into the option field of the backhaul relay TCP segment to obtain the backhaul relay pseudo TCP header; the backhaul relay source IP address and backhaul relay destination IP address of the backhaul operator line are obtained to form a backhaul relay IP address segment; the backhaul relay source MAC address and backhaul relay destination MAC address of the backhaul operator line are obtained to form a backhaul relay MAC address segment; the backhaul relay MAC address segment, backhaul relay IP address segment, backhaul relay pseudo TCP header, backhaul TCP segment, and backhaul data segment are encapsulated into a backhaul relay packet.
[0088] The return message also includes the return MAC address range.
[0089] For example, based on the mapping relationship, the backhaul operator line corresponding to the backhaul packet is determined; the two ends of the backhaul operator line are the data relay end and the request initiating end to which the backhaul packet should return; a backhaul relay TCP segment is generated based on the backhaul operator line; and the backhaul IP address segment is encapsulated into the option field of the backhaul relay TCP segment to obtain the backhaul relay pseudo TCP header; the backhaul relay source IP address and backhaul relay destination IP address of the backhaul operator line are obtained to form a backhaul relay IP address segment; the backhaul relay source MAC address and backhaul relay destination MAC address of the relay operator line are obtained to form a backhaul relay MAC address segment; the backhaul relay MAC address segment, backhaul relay IP address segment, backhaul relay pseudo TCP header, backhaul TCP segment, and backhaul data segment are encapsulated into a backhaul relay packet.
[0090] In this embodiment, by re-encapsulating the return message and sending it to the request initiator, a message return process is realized, ensuring that the message from the request receiver can be returned to the request initiator normally.
[0091] In one exemplary embodiment, such as Figure 4 As shown, a data communication method is provided, which is applied to... Figure 1 Taking request initiator 102 as an example, the explanation includes:
[0092] Step 402: If a fault is detected in the supported target operator's line, a relay operator line is selected from other operator lines supported by the request initiator; the message to be sent to the request receiver via the target operator's line is re-encapsulated to obtain a relay message.
[0093] Step 404: The relay message is sent to the data relay end via the relay operator line to instruct the data relay end to restore the received relay message and obtain a restored message; the restored message is sent to the requesting receiver via the target operator line supported by the data relay end to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay end via the target operator line supported by the data relay end; the data relay end is instructed to re-encapsulate the return message to obtain a return relay message and send the return relay message to the request initiator via the return operator line.
[0094] The aforementioned data communication system, method, apparatus, computer equipment, and readable storage medium include: upon detecting a failure of a supported target operator's line, selecting a relay operator line from other operator lines supported by the request initiator; re-encapsulating a message to be sent to the requesting receiver via the target operator line to obtain a relay message; sending the relay message via the relay operator line to a data relay end; instructing the data relay end to restore the received relay message to obtain a restored message; sending the restored message to the requesting receiver via the target operator line supported by the data relay end; instructing the requesting receiver to return a return message corresponding to the restored message to the data relay end via the target operator line supported by the data relay end; and instructing the data relay end to re-encapsulate the return message to obtain a return relay message, and sending the return relay message to the request initiator via the return operator line. When the target operator's line fails, using a backup operator's line and transmitting data via data relay can solve the problem of data transmission failure when the operator's line fails.
[0095] In one exemplary embodiment, such as Figure 5 As shown, a data communication method is provided, which is applied to... Figure 1 Taking the data relay terminal 104 in the middle as an example, the explanation includes:
[0096] Step 502: Receive a relay message from the request initiator. The relay message is obtained by selecting a relay operator line from other operator lines supported by the request initiator when the request initiator detects a fault in the supported target operator line, and re-encapsulating the message to be sent to the request receiver through the target operator line.
[0097] Step 504: The received relay message is restored to obtain a restored message; the restored message is sent to the requesting receiver through the target operator line supported by the data relay terminal; so as to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay terminal through the target operator line supported by the data relay terminal.
[0098] Step 506: Receive the return message from the requesting receiver; re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator through the return operator line.
[0099] The aforementioned data communication system, method, apparatus, computer equipment, and readable storage medium include: receiving a relay message from a request initiator; the relay message is obtained by the request initiator selecting a relay operator line from other operator lines supported by the request initiator when the target operator line is detected to be faulty, and re-encapsulating the message to be sent to the request receiver via the target operator line; restoring the received relay message to obtain a restored message; sending the restored message to the request receiver via the target operator line supported by the data relay terminal; instructing the request receiver to return a return message corresponding to the restored message to the data relay terminal via the target operator line supported by the data relay terminal; receiving a return message from the request receiver; re-encapsulating the return message to obtain a return relay message, and sending the return relay message to the request initiator via the return operator line. When the target operator line fails, using a backup operator line and transmitting data via data relay can solve the problem of data transmission failure when the operator line fails.
[0100] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0101] In one exemplary embodiment, such as Figure 6 As shown, a data communication device is provided, including: a request initiation module 601, a data relay module 602, and a request receiving module 603 corresponding to the target operator; both the request initiation module and the data relay module support multiple operator lines, and the operator lines supported by the request initiation module and the data relay module are the same; wherein:
[0102] The request initiation module is used to select a relay operator line from other operator lines supported by the request initiation module when a fault is detected in the supported target operator line. The message to be sent is re-encapsulated to obtain a relay message. The relay message is then sent to the data relay module through the relay operator line.
[0103] The data relay module is used to restore the received relay messages to obtain restored messages; and to send the restored messages to the request receiving module through the target operator's lines supported by the data relay module.
[0104] The request receiving module is used to return the return message corresponding to the restoration message to the data relay module through the target operator's line supported by the data relay module;
[0105] The data relay module is also used to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiation module through the return operator line.
[0106] In one embodiment, the message to be sent includes: a request IP address segment, a request TCP segment, and a request data segment; the request initiation module is further configured to:
[0107] A relay TCP segment is generated based on the relay operator's line; the request IP address segment of the message to be sent is encapsulated into the option field of the relay TCP segment to obtain the relay pseudo TCP header; the relay source IP address and relay destination IP address of the relay operator's line are obtained to form a relay IP address segment; the relay source MAC address and relay destination MAC address of the relay operator's line are obtained to form a relay MAC address segment; the relay MAC address segment, relay IP address segment, request pseudo TCP header, request TCP segment, and request data segment are encapsulated into a relay message.
[0108] In one embodiment, the requested IP address range includes: a requested destination IP address; the data relay module is further configured to:
[0109] Obtain the requested destination IP address from the option field of the relay pseudo TCP header, and obtain the relay sending IP address corresponding to the target operator of the data relay end; strip the relay pseudo TCP header from the relay message, modify the source IP address of the relay message to the IP address corresponding to the target operator of the data relay end, and modify the destination IP address of the relay message to the requested destination IP address, forming a restoration message.
[0110] In one embodiment, the request IP address range further includes: the request source IP address; the data relay module is also used for:
[0111] Obtain the request source IP address and request destination IP address from the option field of the relay pseudo TCP header; obtain the relay source IP address and relay destination IP address from the IP address range of the relayed packet; establish a mapping relationship based on the request source IP address, relay source IP address, relay destination IP address, relay sending IP address, and request destination IP address.
[0112] In one embodiment, the return message includes: a return IP address segment, a return TCP segment, and a return data segment; the data relay module is further configured to:
[0113] Based on the mapping relationship, the corresponding backhaul operator line for the backhaul packet is determined; the two ends of the backhaul operator line are the data relay end and the request initiator to which the backhaul packet should return; a backhaul relay TCP segment is generated based on the backhaul operator line; and the backhaul IP address segment is encapsulated into the option field of the backhaul relay TCP segment to obtain the backhaul relay pseudo TCP header; the backhaul relay source IP address and backhaul relay destination IP address of the backhaul operator line are obtained to form a backhaul relay IP address segment; the backhaul relay source MAC address and backhaul relay destination MAC address of the backhaul operator line are obtained to form a backhaul relay MAC address segment; the backhaul relay MAC address segment, backhaul relay IP address segment, backhaul relay pseudo TCP header, backhaul TCP segment, and backhaul data segment are encapsulated into a backhaul relay packet.
[0114] Each module in the aforementioned data communication device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0115] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The database stores messages. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection.
[0116] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0117] In one exemplary embodiment, a computer device is provided for a request initiating end of a data communication system, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0118] If a fault is detected in the supported target operator's line, a relay operator line is selected from other operator lines supported by the request initiator; the message to be sent that needs to be sent to the request receiver via the target operator line is re-encapsulated to obtain a relay message;
[0119] The relay message is sent to the data relay end via the relay operator line; to instruct the data relay end to restore the received relay message and obtain the restored message; the restored message is sent to the requesting receiver via the target operator line supported by the data relay end; to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay end via the target operator line supported by the data relay end; to instruct the data relay end to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator via the return operator line.
[0120] In one exemplary embodiment, a computer device is provided for use as a data relay terminal in a data communication system, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0121] Receive relay messages from the request initiator; the relay message is obtained by the request initiator selecting a relay operator line from other operator lines supported by the request initiator when the target operator line is detected to be faulty, and re-encapsulating the message to be sent to the request receiver through the target operator line.
[0122] The received relay message is restored to obtain a restored message; the restored message is sent to the requesting receiver through the target operator line supported by the data relay terminal; so as to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay terminal through the target operator line supported by the data relay terminal.
[0123] Receive the return message from the requesting receiver; re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator through the return operator line.
[0124] In one exemplary embodiment, a readable storage medium is provided for use at the request initiating end of a data communication system, wherein a computer program is stored thereon, and when executed by a processor, the computer program performs the following steps:
[0125] If a fault is detected in the supported target operator's line, a relay operator line is selected from other operator lines supported by the request initiator; the message to be sent that needs to be sent to the request receiver via the target operator line is re-encapsulated to obtain a relay message;
[0126] The relay message is sent to the data relay end via the relay operator line; to instruct the data relay end to restore the received relay message and obtain the restored message; the restored message is sent to the requesting receiver via the target operator line supported by the data relay end; to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay end via the target operator line supported by the data relay end; to instruct the data relay end to re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator via the return operator line.
[0127] In one exemplary embodiment, a readable storage medium is provided for use as a data relay in a data communication system, wherein a computer program is stored thereon, and when executed by a processor, the computer program performs the following steps:
[0128] Receive relay messages from the request initiator; the relay message is obtained by the request initiator selecting a relay operator line from other operator lines supported by the request initiator when the target operator line is detected to be faulty, and re-encapsulating the message to be sent to the request receiver through the target operator line.
[0129] The received relay message is restored to obtain a restored message; the restored message is sent to the requesting receiver through the target operator line supported by the data relay terminal; so as to instruct the requesting receiver to return the return message corresponding to the restored message to the data relay terminal through the target operator line supported by the data relay terminal.
[0130] Receive the return message from the requesting receiver; re-encapsulate the return message to obtain the return relay message, and send the return relay message to the request initiator through the return operator line.
[0131] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0132] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0133] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data communication system, characterized by The request initiation end, the data transfer end and the request receiving end corresponding to the target operator are included; the request initiation end and the data transfer end support multiple operator lines, and the request initiation end and the data transfer end support the same operator lines; The request initiation end is configured to select a transfer operator line from other operator lines supported by the request initiation end in the case that the supported target operator line fails, re-encapsulate a to-be-sent message to be sent to the request receiving end through the target operator line to obtain a transfer message, and send the transfer message to the data transfer end through the transfer operator line. The data transfer end is configured to restore the received transfer message to obtain a restored message. The request receiving end is configured to return a backhaul message corresponding to the restored message to the data transfer end through the target operator line between the request receiving end and the data transfer end. The data transfer end is configured to re-encapsulate the backhaul message to obtain a backhaul transfer message, and send the backhaul transfer message to the request initiation end through a backhaul operator line. The to-be-sent message includes a request IP address segment, a request TCP segment and a request data segment; re-encapsulating the to-be-sent message to obtain a transfer message includes: generating a transfer TCP segment based on the transfer operator line, wherein the option field of the transfer TCP segment includes a transfer identifier; the transfer identifier is used to determine whether the message is a message sent through a transfer process; encapsulating the request IP address segment of the to-be-sent message into the option field of the transfer TCP segment to obtain a transfer pseudo-TCP header; obtaining a transfer source IP address and a transfer destination IP address of the transfer operator line to form a transfer IP address segment; taking the MAC address of the request initiation end as a transfer source MAC address and taking the MAC address of the data transfer end as a transfer destination MAC address to form a transfer MAC address segment; and encapsulating the transfer MAC address segment, the transfer IP address segment, the transfer pseudo-TCP header, the request TCP segment and the request data segment into the transfer message. The request IP address segment includes a request destination IP address; the data transfer end is further configured to: obtain the request destination IP address from the option field of the transfer pseudo-TCP header and obtain a transfer sending IP address corresponding to the target operator of the data transfer end; 2. The system of claim 1, wherein, strip the transfer pseudo-TCP header in the transfer message, modify the source IP address of the transfer message to the IP address corresponding to the target operator of the data transfer end, and modify the destination IP address of the transfer message to the request destination IP address to form a restored message. The request IP address segment further includes a request source IP address; the data transfer end is further configured to: obtain the request source IP address and the request destination IP address from the option field of the transfer pseudo-TCP header; 3. The system of claim 2, wherein, obtaining a transit source IP address and a transit destination IP address from the transit message IP address segment; establishing a mapping relationship based on the request source IP address, the transit source IP address, the transit destination IP address, the transit sending IP address and the request destination IP address.
4. The system of claim 3, wherein, The backhaul message includes a backhaul IP address segment, a backhaul TCP segment and a backhaul data segment; the data transit end is further configured to: determine a transit operator line corresponding to the backhaul message based on the mapping relationship; the two ends of the transit operator line are respectively the data transit end and the request initiation end to which the backhaul message should be returned; generate a backhaul transit TCP segment based on the transit operator line; encapsulate the backhaul IP address segment into an option field of the backhaul transit TCP segment to obtain a backhaul transit pseudo TCP header; obtain a backhaul transit source IP address and a backhaul transit destination IP address of the transit operator line to form a backhaul transit IP address segment; obtain a backhaul transit source MAC address and a backhaul transit destination MAC address of the transit operator line to form a backhaul transit MAC address segment; encapsulate the backhaul transit MAC address segment, the backhaul transit IP address segment, the backhaul transit pseudo TCP header, the backhaul TCP segment and the backhaul data segment into a backhaul transit message.
5. A data communication method characterized by, The request initiation end applied to the data communication system of any one of claims 1-4, the method comprising: selecting a transit operator line from other operator lines supported by the request initiation end in the case of detecting a failure of a target operator line supported; re-encapsulating a to-be-sent message to be sent to the request receiving end through the target operator line to obtain a transit message; sending the transit message to the data transit end through the transit operator line; instructing the data transit end to restore the received transit message to obtain a restored message; sending the restored message to the request receiving end through the target operator line supported by the data transit end; instructing the request receiving end to return a backhaul message corresponding to the restored message to the data transit end through the target operator line supported by the data transit end; instructing the data transit end to re-encapsulate the backhaul message to obtain a backhaul transit message, and sending the backhaul transit message to the request initiation end through the backhaul operator line; The to-be-sent message includes a request IP address segment, a request TCP segment and a request data segment; re-encapsulating the to-be-sent message to obtain a transit message comprises: generating a transit TCP segment based on the transit operator line, the transit TCP segment including a transit identifier in an option field of the transit TCP segment, the transit identifier being used to determine whether the message is a message sent through a transit process; encapsulating a request IP address segment of the to-be-sent message into the option field of the transit TCP segment to obtain a transit pseudo TCP header; obtaining a transit source IP address and a transit destination IP address of the transit operator line to form a transit IP address segment; taking a MAC address of the request initiation end as a transit source MAC address and taking a MAC address of the data transit end as a transit destination MAC address to form a transit MAC address segment; and encapsulating the transit MAC address segment, the transit IP address segment, the transit pseudo TCP header, the request TCP segment, and the request data segment into a transit message.
6. A data communication method characterized by comprising: The method applied to the data communication system of any one of claims 1-4, the method comprising: receiving a transit message from the request initiation end; the transit message being obtained by re-encapsulating a to-be-sent message that needs to be sent to the request receiving end through a target operator line supported by the request initiation end, in a case where the request initiation end detects that the target operator line supported by the request initiation end is faulty; restoring the received transit message to obtain a restored message; and sending the restored message to the request receiving end through a target operator line supported by the data transit end, to instruct the request receiving end to return a backhaul message corresponding to the restored message to the data transit end through the target operator line supported by the data transit end; receiving a backhaul message from the request receiving end; and re-encapsulating the backhaul message to obtain a backhaul transit message, and sending the backhaul transit message to the request initiation end through a backhaul operator line; the to-be-sent message including a request IP address segment, a request TCP segment, and a request data segment; and re-encapsulating the to-be-sent message to obtain a transit message, including: generating a transit TCP segment based on the transit operator line, the transit TCP segment including a transit identifier in an option field of the transit TCP segment, the transit identifier being used to determine whether the message is a message sent through a transit process; encapsulating a request IP address segment of the to-be-sent message into the option field of the transit TCP segment to obtain a transit pseudo TCP header; obtaining a transit source IP address and a transit destination IP address of the transit operator line to form a transit IP address segment; taking a MAC address of the request initiation end as a transit source MAC address and taking a MAC address of the data transit end as a transit destination MAC address to form a transit MAC address segment; and encapsulating the transit MAC address segment, the transit IP address segment, the transit pseudo TCP header, the request TCP segment, and the request data segment into a transit message.
7. A data communication device, characterized by The request initiation module, the data transfer module and the request receiving module corresponding to the target operator are included; the request initiation module and the data transfer module support multiple operator lines, and the request initiation module and the data transfer module support the same operator lines; The request initiation module is configured to, in the case of detecting that the supported target operator line is faulty, select a transfer operator line from other operator lines supported by the request initiation module, re-encapsulate a to-be-sent message that needs to be sent to the request receiving module through the target operator line to obtain a transfer message, and send the transfer message to the data transfer module through the transfer operator line. The data transfer module is configured to perform restoration processing on the received transfer message to obtain a restored message. The request receiving module is configured to return a backhaul message corresponding to the restored message to the data transfer module through the target operator line supported by the data transfer module. The data transfer module is further configured to re-encapsulate the backhaul message to obtain a backhaul transfer message, and send the backhaul transfer message to the request initiation module through a backhaul operator line. The to-be-sent message includes a request IP address segment, a request TCP segment and a request data segment; re-encapsulating the to-be-sent message to obtain the transfer message includes: generating a transfer TCP segment based on the transfer operator line, wherein the transfer TCP segment includes a transfer identifier in an option field; the transfer identifier is used to determine whether the message is a message sent through a transfer process; encapsulating the request IP address segment of the to-be-sent message into the option field of the transfer TCP segment to obtain a transfer pseudo-TCP header; obtaining a transfer source IP address and a transfer destination IP address of the transfer operator line to form a transfer IP address segment; taking a MAC address of the request initiation end as a transfer source MAC address and taking a MAC address of the data transfer end as a transfer destination MAC address to form a transfer MAC address segment; and encapsulating the transfer MAC address segment, the transfer IP address segment, the transfer pseudo-TCP header, the request TCP segment and the request data segment into the transfer message. The processor executes the computer program to implement the method in any one of claims 5 or 6. The computer program is executed by the processor to implement the method in any one of claims 5 or 6.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, 9. A readable storage medium, having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
Data transmission method and device, equipment, storage medium and program product
CN119211114A