CN114285792A - Data transmission method, device, equipment and storage medium based on redundant link - Google Patents

Data transmission method, device, equipment and storage medium based on redundant link Download PDF

Info

Publication number
CN114285792A
CN114285792A CN202111566539.XA CN202111566539A CN114285792A CN 114285792 A CN114285792 A CN 114285792A CN 202111566539 A CN202111566539 A CN 202111566539A CN 114285792 A CN114285792 A CN 114285792A
Authority
CN
China
Prior art keywords
link
redundant
data transmission
connection
manager
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111566539.XA
Other languages
Chinese (zh)
Inventor
颜家财
田晶昌
曾庆军
张科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongtu Science And Technology Yichang Co ltd
Original Assignee
Dongtu Science And Technology Yichang Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongtu Science And Technology Yichang Co ltd filed Critical Dongtu Science And Technology Yichang Co ltd
Priority to CN202111566539.XA priority Critical patent/CN114285792A/en
Publication of CN114285792A publication Critical patent/CN114285792A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a data transmission method, a device, equipment and a storage medium based on a redundant link, wherein the method comprises the following steps: setting a link manager in communication connection with a client, establishing a plurality of TCP links in communication connection with a server through the link manager, and taking the TCP link with the shortest connection time as a main link and other TCP links as redundant links; and executing data transmission between the client and the server through the main link, and when the main link has transmission failure, selecting one redundant link through the link manager to continuously execute the data transmission. The method and the device shorten the reconnection time in the data communication process, and effectively avoid the data loss problem caused by communication interruption.

Description

Data transmission method, device, equipment and storage medium based on redundant link
Technical Field
The present application relates to the field of network transmission technologies, and in particular, to a data transmission method and apparatus based on a redundant link, a device, and a storage medium.
Background
The existing Transmission Control Protocol (TCP) is a connection-oriented service, and each data Transmission must go through three processes of establishing a connection, transmitting data and terminating a connection.
The process of establishing the connection of the TCP link comprises the following steps: the host A (client) sends a data segment containing a synchronous sequence number (SYN) zone bit to the host B (server) and requests the host B to establish connection; after receiving the request of the host A, the host B responds to the host A by a data segment with an Acknowledgement (ACK) and a synchronous sequence number (SYN) zone bit; after receiving the data segment, host a sends a confirmation response to confirm that the data segment of host B has been received. After the connection is established, data transmission may begin at this point. The process of terminating the connection is as follows: after the host A finishes data transmission, setting the control FIN to 1 and providing a request for stopping TCP connection; the host B responds to the FIN after receiving the FIN, confirms that the TCP connection in the direction is closed, and sets ACK to be 1; the host B puts forward a reverse direction closing request again, and the FIN is set to be 1; the host A confirms the request of the host B, sets the ACK to 1 and finishes the closing in both directions.
Based on the TCP link, the prior art generally adopts a client-server single link mode, and when the client establishes a connection with the server according to the connection establishment process, a single link is established. At this time, the client may send data to the server, and the server may also send data to the client. When the client-server link needs to be disconnected normally, the disconnection process is performed according to the above termination connection process. When the link is abnormal, the server or the client needs to wait for a timeout time and then perform corresponding disconnection operation. For an application scene needing long connection, after the application scene is disconnected, the connection between the client and the server needs to be reestablished through the connection establishment process, communication interruption can occur in the connection process, and data are lost.
Disclosure of Invention
In view of this, the present application provides a data transmission method, device, apparatus, and storage medium based on a redundant link, which shortens the reconnection time in the data communication process, and effectively avoids the data loss problem caused by communication interruption.
In a first aspect, the present application provides a data transmission method based on a redundant link, including:
setting a link manager in communication connection with a client, establishing a plurality of TCP links in communication connection with a server through the link manager, and taking the TCP link with the shortest connection time as a main link and other TCP links as redundant links;
and executing data transmission between the client and the server through the main link, and when the main link has transmission failure, selecting one redundant link through the link manager to continuously execute the data transmission.
According to the method, the link manager is arranged between the client and the server to serve as an intermediate layer, the link manager can be communicated with the client, then a plurality of TCP links with the server are established through the link manager, one TCP link with the shortest connection time is selected to serve as a main link to execute data transmission between the client and the server, other TCP links serve as redundant links, and when transmission failure occurs in the main link, the main link can be switched to the redundant links to continue executing data transmission. Therefore, the reconnection time in the data communication process can be shortened, and the problem of data loss caused by communication link interruption is solved.
Optionally, the selecting, by the link manager, one redundant link to continue performing the data transmission includes:
sending a detection frame to the redundant links through the link manager, and respectively acquiring the response time of each redundant link;
and selecting the redundant link with the shortest response time to continue executing the data transmission.
Therefore, when the transmission failure occurs in the main link, the link manager can send the detection frame to the multiple redundant links at the moment, and record the response time of each redundant link, so as to ensure the data transmission speed, the redundant link with the shortest response time can be selected to continue to execute the data transmission between the client and the server.
Optionally, when the main link performs the data transmission, the method further includes:
and detecting the redundant link at regular time through the link manager, and ensuring the connection of the redundant link in a connection reestablishment mode when the redundant link has a connection fault.
Therefore, when the main link performs data transmission between the client and the server, the link manager needs to detect the redundant links at regular time, and when detecting that one or more of the multiple redundant links have a connection fault, the link manager can reestablish the connection of the one or more redundant links to ensure that the connection of all the redundant links is normal, or when detecting that one or more of the multiple redundant links have a connection fault but at least one redundant link is still connected normally, the redundant link with the connection fault can be temporarily not reconnected, and the remaining redundant links are still detected continuously by the link manager. The connection of the redundant link is maintained by adopting a timing detection and reconnection mode, so that when the transmission fault occurs to the main link, the redundant link which is normally connected can be switched.
Optionally, after the selecting a redundant link by the link manager to continue performing the data transmission, the method further includes:
detecting the main link through the link manager, and if the main link responds, using the main link as a redundant link; if no response exists, the connection is terminated, the connection is reestablished after a period of time, and the main link which is reconnected is used as a redundant link.
Therefore, when a transmission fault occurs in the main link, the main link is switched to the redundant link to continue to execute data transmission between the client and the server, at this time, a detection frame is sent to the main link through the link manager to detect whether the main link has a response, if the main link has a response, the main link can be used as the redundant link for next switching, if the main link does not have a response, the socket can be closed, the connection between the main link and the server is terminated, the connection is reestablished after a period of time, and the reconnected main link is used as the redundant link for next switching.
Optionally, the establishing, by the link manager, a plurality of TCP links communicatively connected to the server includes:
and establishing a plurality of virtual IPs through the link manager, respectively establishing a TCP link between each virtual IP and the server, and recording the time for establishing connection between each virtual IP and the server.
Therefore, a TCP link between each virtual IP and the server can be established by setting a plurality of virtual IPs.
Optionally, after the selecting a redundant link by the link manager to continue performing the data transmission, the method further includes:
and terminating the connection of the main link, reestablishing the connection after a period of time, and selecting the reconnected main link by the link manager to continuously execute the data transmission.
Therefore, after the main link fails in transmission and is switched to the redundant link to continue to perform data transmission, the link manager can directly terminate the connection of the main link, reestablish the connection of the main link after a period of time, detect the response time of the reconnected main link, and reselect the main link to continue to perform data transmission between the client and the server if the response time is shorter than the response time of the redundant link currently performing data transmission.
Optionally, the transmission failure includes: the transmission times out.
In a second aspect, the present application provides a data transmission apparatus based on a redundant link, including:
the system comprises an establishing module, a link manager, a server and a server, wherein the establishing module is used for setting the link manager in communication connection with a client, establishing a plurality of TCP links in communication connection with the server through the link manager, and taking the TCP link with the shortest connection time as a main link and other TCP links as redundant links;
and the selection module is used for executing data transmission between the client and the server through the main link, and when the main link has transmission failure, one redundant link is selected through the link manager to continuously execute the data transmission.
By the above, the present apparatus, by providing the link manager as an intermediate layer between the client and the server, the link manager can communicate with the client, then establish a plurality of TCP links with the server through the link manager, and select one TCP link with the shortest connection time as a main link to perform data transmission between the client and the server, and the other TCP links as redundant links, and when a transmission failure occurs in the main link, switch to the redundant link to continue to perform data transmission. Therefore, the reconnection time in the data communication process can be shortened, and the problem of data loss caused by communication link interruption is solved.
In a third aspect, the present application provides a computing device comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the redundant link based data transmission method described above.
In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which when executed by a computer implements the above-mentioned redundancy link-based data transmission method.
These and other aspects of the present application will be more readily apparent from the following description of the embodiment(s).
Drawings
Fig. 1 is a flowchart of a data transmission method based on a redundant link according to an embodiment of the present application;
fig. 2 is a schematic diagram of a plurality of TCP links provided in an embodiment of the present application;
fig. 3 is a block diagram of a data transmission apparatus based on redundant links according to an embodiment of the present application;
fig. 4 is a block diagram of a computing device according to an embodiment of the present application.
It should be understood that the dimensions and forms of the various blocks in the block diagrams described above are for reference only and should not be construed as exclusive of the embodiments of the present application. The relative positions and the inclusion relations among the blocks shown in the structural schematic diagram are only used for schematically representing the structural associations among the blocks, and do not limit the physical connection manner of the embodiment of the application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, in the method for transmitting data based on a redundant link, a plurality of TCP links are established between a client and a server to form a main link and a redundant link, so that the reconnection time of the client and the server during data communication is shortened, and the data loss problem caused by communication interruption is effectively avoided. The method may be implemented by software or a program, and as shown in fig. 1, the data transmission method based on the redundant link includes:
s10: setting a link manager in communication connection with a client, establishing a plurality of TCP links in communication connection with a server through the link manager, and taking the TCP link with the shortest connection time as a main link and other TCP links as redundant links;
as shown in fig. 2, in this embodiment, by setting a Link Manager (Link Manager) as an intermediate layer between the client and the server, the Link Manager may exist in a network device between the client and the server, where the network device may be a switch, a router, or other processors for communication, and the Link Manager may be a specific module in the network device, and may also be a protocol layer or a protocol thread in the network device. The link manager can communicate with the client, then a plurality of virtual IPs are established through the link manager, TCP links between each virtual IP and the server are respectively established, and the connection establishing time between each virtual IP and the server is recorded on the assumption that the established TCP links are respectively an A link, a B link and a C link. And selecting one TCP link (assumed as link A) with the shortest connection time as a main link for executing data transmission between the client and the server, and using the other TCP links (link B and link C) as redundant links, and switching by the link manager when the main link fails so as to continuously execute the data transmission between the client and the server.
The establishing process of the TCP link may include: the link manager sends a data segment containing a synchronous sequence number (SYN) zone bit to the server through each virtual IP respectively and requests the server to establish connection; after receiving the request of virtual IP, the server uses a data segment with Acknowledgement (ACK) and synchronous sequence number (SYN) flag bit to respond to virtual IP; after receiving the data segment, the virtual IP sends a confirmation response to confirm that the data segment of the server is received. Thereby establishing a TCP link between each virtual IP and the server.
S20: and executing data transmission between the client and the server through the main link, and when the main link has transmission failure, selecting one redundant link through the link manager to continuously execute the data transmission.
In this embodiment, when the primary link performs data transmission between the client and the server, the redundant links may be detected periodically by the link manager, when it is detected that one or more redundant links have a connection failure, the connection of the one or more redundant links is reestablished by the link manager, so as to ensure that the connections of all redundant links are normal, or, according to the response time of each redundant link measured before, if the response time of the redundant link with the connection failure is lower than that of the other redundant links with normal connections, the redundant link with the shortest response time may be reestablished by the link manager, or, when it is detected that one or more redundant links have a connection failure, if at least one redundant link is still in a normal connection state, the redundant link with the connection failure may not be reconnected temporarily, any remaining redundant links continue to be detected by the link manager. In this embodiment, the connection of each redundant link is maintained by using the timing detection and reconnection, so that when a transmission failure occurs in the main link, a redundant link with a normal connection can be switched. When a transmission failure occurs in the main link (for example, transmission is overtime), the link manager can send a detection frame to the redundant links, respectively acquire the response time of each redundant link, and select the redundant link with the shortest response time to continue to execute the data transmission.
After the link manager selects one redundant link to continue executing the data transmission, a main link with transmission failure can be detected through the link manager, and if the link manager responds, the main link is used as the redundant link; if no response exists, closing the socket, terminating the connection between the main link and the server, reestablishing the connection after waiting for a period of time, and taking the reconnected main link as a redundant link for the next switching.
Referring to the link a, the link B, and the link C established in the above embodiment, the following describes in detail the switching process of the active/standby links:
assuming that the link A is a main link and is executing data transmission between the client and the server, and if the link A is overtime in data transmission, the link manager needs to be informed that the data transmission of the link A is overtime;
after receiving the notification that the data transmission of the link A is overtime, the link manager simultaneously sends detection frames to the link B and the link C, records the response time of the link B and the link C, switches the link B into a main link if the response time Tb is less than Tc, and transmits the application data between the client and the server through the link B;
after the switching of the B link is completed, the A link can be detected through the link manager, and if the A link responds, the A link is used as a redundant link to carry out timing detection. If no response is found within a certain time, closing the socket of the link A, waiting for a certain time, initiating three-way handshake to reconnect the link A until connection is established, and performing timing detection by using the link A as a redundant link.
In some embodiments, after the main link is switched to the redundant link to continue to perform data transmission when a transmission failure occurs in the main link, the link manager may directly terminate the connection of the main link, reestablish the connection between the main link and the server after a period of time, detect a response time of the reconnected main link, and if the response time is shorter than the response time of the redundant link currently performing data transmission, reselect the main link to continue to perform data transmission between the client and the server. In other embodiments, the reconnected main link can be selected again to continue to perform data transmission between the client and the server when the transmission failure occurs in the redundant link currently performing data transmission.
In summary, in the present embodiment, by setting a link manager as an intermediate layer between a client and a server, the link manager may communicate with the client, and then establish a plurality of TCP links with the server through the link manager, and select one TCP link with the shortest connection time as a main link to perform data transmission between the client and the server, and the other TCP links as redundant links, and when a transmission failure occurs in the main link, switch to the redundant links to continue to perform data transmission. Therefore, the reconnection time in the data communication process can be shortened, and the problem of data loss caused by communication link interruption is solved.
As shown in fig. 3, the present application provides a data transmission apparatus based on a redundant link, which may be used to implement any step of the data transmission method based on a redundant link and its optional embodiments. As shown in fig. 3, the redundant link-based data transmission apparatus 200 includes an establishing module 210, a selecting module 220;
the establishing module 210 is configured to execute step S10 of the data transmission method based on the redundant link, and is specifically configured to set a link manager in communication connection with the client, establish a plurality of TCP links in communication connection with the server through the link manager, and use the TCP link with the shortest connection time as a main link and the other TCP links as redundant links; the selecting module 220 is configured to execute step S20 of the data transmission method based on the redundant link, specifically, to execute data transmission between the client and the server through the main link, and when a transmission failure occurs in the main link, select one redundant link through the link manager to continue executing the data transmission.
It should be understood that the data transmission device in the embodiment of the present application may be implemented by software, for example, by a computer program or instructions with the above functions, and the corresponding computer program or instructions may be stored in a memory inside the terminal, and the corresponding computer program or instructions inside the memory may be read by the processor to implement the above functions. Alternatively, the data transmission device according to the embodiment of the present application may be implemented by hardware. Alternatively, the data transmission device in the embodiment of the present application may also be implemented by a combination of a processor and a software module.
It should be understood that, for details of processing of devices or modules in the embodiments of the present application, reference may be made to relevant expressions of the embodiments and relevant extended embodiments shown in fig. 1 to fig. 2, and details of the embodiments of the present application will not be repeated.
Fig. 4 is a schematic structural diagram of a computing device 1000 provided in an embodiment of the present application. The computing device 1000 includes: a processor 1010, a memory 1020, a communication interface 1030, and a bus 1040.
It is to be appreciated that the communication interface 1030 in the computing device 1000 illustrated in FIG. 4 may be utilized to communicate with other devices.
The processor 1010 may be coupled to the memory 1020. The memory 1020 may be used to store the program codes and data. Therefore, the memory 1020 may be a memory unit inside the processor 1010, an external memory unit independent from the processor 1010, or a component including a memory unit inside the processor 1010 and an external memory unit independent from the processor 1010.
Optionally, computing device 1000 may also include a bus 1040. The memory 1020 and the communication interface 1030 may be connected to the processor 1010 through a bus 1040. The bus 1040 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1040 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in FIG. 4, but it is not intended that there be only one bus or one type of bus.
It should be understood that, in the embodiment of the present application, the processor 1010 may adopt a Central Processing Unit (CPU). The processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Or the processor 1010 adopts one or more integrated circuits for executing related programs to implement the technical solutions provided in the embodiments of the present application.
The memory 1020 may include both read-only memory and random access memory, and provides instructions and data to the processor 1010. A portion of processor 1010 may also include non-volatile random access memory. For example, processor 1010 may also store device type information.
When the computing device 1000 is running, the processor 1010 executes the computer-executable instructions in the memory 1020 to perform the operational steps of the above-described method.
It should be understood that the computing device 1000 according to the embodiment of the present application may correspond to a corresponding main body in executing the method according to the embodiments of the present application, and the above and other operations and/or functions of each module in the computing device 1000 are respectively for implementing corresponding flows of each method of the embodiment, and are not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The present embodiments also provide a computer-readable storage medium, on which a computer program is stored, where the computer program is used to execute, when executed by a processor, the above-mentioned data transmission method based on redundant links, where the method includes at least one of the solutions described in the above-mentioned embodiments.
The computer storage media of the embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that the embodiments described in this application are only a part of the embodiments of the present application, and not all embodiments. The components of the embodiments of the present application, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the above detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
The terms "first, second, third and the like" or "module a, module B, module C and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, it being understood that specific orders or sequences may be interchanged where permissible to effect embodiments of the present application in other than those illustrated or described herein.
In the above description, reference numbers indicating steps, such as steps S10 and S20, do not necessarily indicate that the steps are performed, and may include intermediate steps or be replaced by other steps, and the order of the preceding and following steps may be interchanged or performed simultaneously, where permitted.
The term "comprising" as used in the specification and claims should not be construed as being limited to the contents listed thereafter; it does not exclude other elements or steps. It should therefore be interpreted as specifying the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps or components, and groups thereof. Thus, the expression "an apparatus comprising the devices a and B" should not be limited to an apparatus consisting of only the components a and B.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may. Furthermore, in the various embodiments of the present application, unless otherwise specified or logically conflicting, terms and/or descriptions between different embodiments have consistency and may be mutually referenced, and technical features in different embodiments may be combined to form new embodiments according to their inherent logical relationships.
It should be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention.

Claims (10)

1. A data transmission method based on a redundant link is characterized by comprising the following steps:
setting a link manager in communication connection with a client, establishing a plurality of TCP links in communication connection with a server through the link manager, and taking the TCP link with the shortest connection time as a main link and other TCP links as redundant links;
and executing data transmission between the client and the server through the main link, and when the main link has transmission failure, selecting one redundant link through the link manager to continuously execute the data transmission.
2. The method of claim 1, wherein said selecting a redundant link by said link manager to continue performing said data transmission comprises:
sending a detection frame to the redundant links through the link manager, and respectively acquiring the response time of each redundant link;
and selecting the redundant link with the shortest response time to continue executing the data transmission.
3. The method of claim 1, wherein when the primary link performs the data transmission, further comprising:
and detecting the redundant link at regular time through the link manager, and ensuring the connection of the redundant link in a connection reestablishment mode when the redundant link has a connection fault.
4. The method of claim 1, wherein after the selecting a redundant link by the link manager to continue the data transmission, further comprising:
detecting the main link through the link manager, and if the main link responds, using the main link as a redundant link; if no response exists, the connection of the main link is terminated, the connection of the main link is reestablished after waiting for a period of time, and the main link which is reconnected is used as a redundant link.
5. The method of claim 1, wherein establishing, by the link manager, a plurality of TCP links communicatively coupled to a server comprises:
and establishing a plurality of virtual IPs through the link manager, respectively establishing a TCP link between each virtual IP and the server, and recording the time for establishing connection between each virtual IP and the server.
6. The method of claim 1, wherein after the selecting a redundant link by the link manager to continue the data transmission, further comprising:
and terminating the connection of the main link, reestablishing the connection after a period of time, and selecting the reconnected main link by the link manager to continuously execute the data transmission.
7. The method of claim 1, wherein the transmission failure comprises: the transmission times out.
8. A data transmission apparatus based on redundant links, comprising:
the system comprises an establishing module, a link manager, a server and a server, wherein the establishing module is used for setting the link manager in communication connection with a client, establishing a plurality of TCP links in communication connection with the server through the link manager, and taking the TCP link with the shortest connection time as a main link and other TCP links as redundant links;
and the selection module is used for executing data transmission between the client and the server through the main link, and when the main link has transmission failure, one redundant link is selected through the link manager to continuously execute the data transmission.
9. A computing device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method for redundant link based data transmission of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a computer, carries out a method for data transmission based on redundant links according to any one of claims 1 to 7.
CN202111566539.XA 2021-12-20 2021-12-20 Data transmission method, device, equipment and storage medium based on redundant link Pending CN114285792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111566539.XA CN114285792A (en) 2021-12-20 2021-12-20 Data transmission method, device, equipment and storage medium based on redundant link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111566539.XA CN114285792A (en) 2021-12-20 2021-12-20 Data transmission method, device, equipment and storage medium based on redundant link

Publications (1)

Publication Number Publication Date
CN114285792A true CN114285792A (en) 2022-04-05

Family

ID=80873304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111566539.XA Pending CN114285792A (en) 2021-12-20 2021-12-20 Data transmission method, device, equipment and storage medium based on redundant link

Country Status (1)

Country Link
CN (1) CN114285792A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893428A (en) * 2005-11-29 2007-01-10 华为技术有限公司 Bearing system and method for media network gate control protocol
US20160099830A1 (en) * 2014-10-01 2016-04-07 Allied Telesis Holdings Kabushiki Kaisha Data rerouting and caching through redundant network
CN111726406A (en) * 2020-06-16 2020-09-29 杭州涂鸦信息技术有限公司 Data transmission method and related equipment
CN112333800A (en) * 2020-11-13 2021-02-05 Oppo广东移动通信有限公司 Network switching method and device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893428A (en) * 2005-11-29 2007-01-10 华为技术有限公司 Bearing system and method for media network gate control protocol
US20160099830A1 (en) * 2014-10-01 2016-04-07 Allied Telesis Holdings Kabushiki Kaisha Data rerouting and caching through redundant network
CN111726406A (en) * 2020-06-16 2020-09-29 杭州涂鸦信息技术有限公司 Data transmission method and related equipment
CN112333800A (en) * 2020-11-13 2021-02-05 Oppo广东移动通信有限公司 Network switching method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US10348616B2 (en) Packet transmission method and apparatus, and interconnect interface
US9632884B2 (en) Maintaining computer system operability
CN102629225B (en) Dual-controller disk array, storage system and data storage path switching method
CN110750393B (en) Method, device, medium and equipment for avoiding network service double-machine hot standby brain cracking
US7565567B2 (en) Highly available computing platform
JP6431197B2 (en) Snapshot processing methods and associated devices
CN105072029A (en) Redundant link design method and system of active-active storage system
US11240100B2 (en) Using an out-of-band network to reconfigure a bus interface port
CN115550291B (en) Switch reset system and method, storage medium, and electronic device
CN104601523A (en) Data transmitting method and device
CN103530215B (en) A kind of self checking method of internal integrated circuit main frame, device and main frame
CN110505220A (en) Support the method, apparatus and communication terminal of the two-node cluster hot backup of OPC protocol realization
US9749825B2 (en) Connection-oriented messaging and signaling in mobile heath networks
WO2017000096A1 (en) Link recovery method and network device
WO2022160308A1 (en) Data access method and apparatus, and storage medium
CN109327383A (en) A kind of fault handling method and equipment
CN108512753A (en) The method and device that message is transmitted in a kind of cluster file system
CN114285792A (en) Data transmission method, device, equipment and storage medium based on redundant link
WO2018054109A1 (en) Port setting method, device, and system
JPH09205438A (en) Line interface device in atm switchboard station
CN114880266B (en) Fault processing method and device, computer equipment and storage medium
CN101256519A (en) Isomerization multicore system as well as serial port control automatic switch method based on said system
JP6134720B2 (en) Connection method
JP3917467B2 (en) Power system monitoring control system and program
WO2022062347A1 (en) Data transmission method and apparatus, and electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220405