The invention relates to a split application of a data forwarding device based on a virtual host, which has the application number of 201911020063.2, the application date of 2019, 10 and 24 and the application type of invention.
Background
The existing communication mode only supporting a single network interface cannot meet the requirements of high bandwidth and high data volume. Compared with a mode that a TCP protocol utilizes a single network path to transmit data in a traditional network, the parallel multi-path transmission technology can utilize a plurality of network paths to transmit data simultaneously, and is an effective means for improving data transmission rate and reducing data transmission delay fluctuation. The parallel multiplexing is to realize the parallel transmission of data by utilizing multiple network interfaces of the host. With the reduction of the cost of access equipment and the diversification of network access technologies (such as ADSL, LAN, WIFI, GRPS, 3G, LTE, etc.), it is a research hotspot at the present stage to utilize multiple network interfaces of a communication terminal to realize the parallel transmission of data on multiple paths and improve the network efficiency. The parallel multiplexing supports multiple paths to transmit data simultaneously, so that the method has the characteristics of high fault tolerance, high reliability, high throughput and high safety. The advantages of the method determine the wide application prospect in the aspects of emergency communication, multiparty meeting and the like.
Currently, there are technologies for implementing parallel data transmission in the application layer, the transport layer, and the network layer. The transport layer maintains more end-to-end path information including packet loss rate, time delay and throughput, and is independent of the application layer and the network layer, so that the flow control of the whole connection and the congestion control decoupling of a single path can be performed, and the method has obvious advantages. The existing connection between TCP and UDP only supports one transmission path, and can not meet the requirement of parallel multi-path transmission. The MPTCP protocol is therefore proposed for the transport layer. MPTCP is an extension of TCP, published by IEFT in 2013. MPTCP technology allows data to be transmitted over multiple sub-streams during a connection, thereby increasing the available bandwidth for data transmission. MPTCP technology has found good application in wireless network environments. For example, a WiFi interface and a mobile network are used to increase data throughput and solve vertical handover problems at the application layer.
The MPTCP protocol needs to be deployed and then can implement its design function. The deployment of the MPTCP protocol includes three essential requirements: 1. the server system provider must implement MPTCP and install it into the server. 2. At least one client must have multi-homed capabilities, i.e. the server system allows the end-user to connect to the internet through different internet interfaces. 3. Other server systems also need to be gradually MPTCP compatible. The MPTCP protocol is difficult to deploy because it requires the client and server systems to provide support separately.
For example, patent document CN108075987A discloses a multipath data transmission method and device, in which at least two multipath data substreams are established between a multipath proxy client and a multipath proxy gateway through a first internet protocol IP address, and multipath data substream data transmission is performed. And establishing a TCP link and performing TCP data transmission between the multipath proxy gateway and an application server to be accessed by the multipath proxy client according to the first IP addresses of at least two multipath data sub-flows established between the multipath proxy client and the multipath proxy gateway. The MPTCP multi-path data transmission is realized based on the IP address information of the multi-path proxy client through the multi-path proxy client and the proxy of the multi-path proxy gateway. The invention adopts the form of a proxy server to provide multipath connection service between communication hosts which do not support MPTCP protocol, and in order to improve the security and realize the statistics and control of terminal flow, the multipath proxy server establishes TCP connection with an application server to be accessed by the multipath proxy client based on the IP address information of the multipath proxy client, but MPTCP is positioned below an application layer and above the IP layer, and the original TCP layer is replaced, so that MPTCP needs kernel support; and the MPTCP can change transmission paths and terminals during the session, which is difficult to ensure the transmission security and easy to be invaded. Accordingly, the present invention is directed to provide a data forwarding apparatus capable of implementing multiplexing for a multi-client scenario without any modification of a client or server program, and optimizing network transmission performance by reusing a proxy server bandwidth.
Furthermore, on the one hand, due to the differences in understanding to the person skilled in the art; on the other hand, since the inventor has studied a lot of documents and patents when making the present invention, but the space is not limited to the details and contents listed in the above, however, the present invention is by no means free of the features of the prior art, but the present invention has been provided with all the features of the prior art, and the applicant reserves the right to increase the related prior art in the background.
Disclosure of Invention
The word "module" as used herein describes any type of hardware, software, or combination of hardware and software that is capable of performing the functions associated with the "module".
In view of the deficiency of the prior art, the present invention provides a virtual host based data forwarding apparatus, which at least includes: the client can access the server system in a network access mode; the server system can carry out data transmission with the client in a multi-communication connection establishing mode; the data forwarding device further comprises a first multi-path data transmitter capable of establishing a data path capable of transmitting the user data packet with the client and a second multi-path data transmitter capable of establishing a data path capable of transmitting the user data packet with the server system, wherein in the case that data is forwarded to the second multi-path data transmitter via the first multi-path data transmitter, the first multi-path data transmitter is capable of generating a first virtual server space having at least one first virtual hub, the second multi-path data transmitter is capable of generating a second virtual server space having at least one second virtual hub, and data to be forwarded by the first multi-path data transmitter is capable of being transmitted to the first virtual server space in a manner of being converted into a data frame of a specific type via the first virtual hub, the first virtual server space can acquire the data frame in a packet capturing mode, so that a user data packet contained in the data frame can be prevented when entering a corresponding protocol stack of the first virtual server space; the second virtual hub is capable of restoring the data frame to the particular type that matches the first virtual hub if the data frame is transmitted from the first virtual server space to the second virtual server space via a static multipath connection between a first multipath data transmitter and a second multipath data transmitter. After the TCP connection is split, the first multipath data transmitter 1 may quickly establish a connection with the client 3 by responding to a connection request of the client 3 in advance. The second multipath data transmitter 2 may buffer the data in the form of pre-downloaded data, and compared with the way in which the server system 4 directly sends the data to the client 3, the way may maximize the utilization of the bandwidth between the first multipath data transmitter 1 and the second multipath data transmitter 2, thereby improving the transmission performance. Meanwhile, when the first multipath data transmitter and the second multipath data transmitter communicate with each other, the user data does not need to be transmitted as they are, so that various further optimizations can be performed, for example, data can be encrypted to improve security; data is compressed to further improve transmission efficiency; data are transmitted by using codes with error correction so as to improve the reliability and stability of transmission. The second multipath data transmitter and/or the second multipath data transmitter may also buffer frequently requested data to quickly serve the client.
According to a preferred embodiment, the first multipath data transmitter and the second multipath data transmitter are able to establish static multipath data connections with each other on the basis of their respective communication modules, wherein each static multipath data connection is able to select the data transmission protocol used by itself, and the first multipath data transmitter and the second multipath data transmitter are able to communicate with each other via the static multipath data connection after the static multipath data connection has been established.
According to a preferred embodiment, the forwarding of data to the second multipath data transmitter via the first multipath data transmitter comprises at least the following steps: the first multipath data transmitter generating at least one of the first virtual server spaces upon establishing a data connection with the client; in the case where the client sends a data packet to a remote end via the first multipath data transmitter, the first multipath data transmitter is capable of forwarding the data packet to the first virtual hub, so that data forwarded to the first virtual server space is a data frame of a specific type.
According to a preferred embodiment, the forwarding of data to the second multipath data transmitter via the first multipath data transmitter further comprises the steps of: the first virtual server space acquires the data frame in a packet capturing mode; under the condition that the first virtual server space processes and forwards the user data packet contained in the data frame, the first virtual server space is configured to be capable of preventing the user data packet contained in the data frame from entering a corresponding protocol stack of the first virtual server space; instructing, by the first virtual server space, a first multipath data transmitter to send the user data packet to a second multipath data transmitter over the static multipath data connection.
According to a preferred embodiment, the second multipath data transmitter is configured to: receiving data from the first multipath data transmitter based on the static multipath data connection, wherein the second virtual server space is configured to recover the received data to obtain a user data packet; the recovered user data packets can be encapsulated into a data frame of a specific type via the second virtual hub of the second multipath data transmitter, and the second multipath data transmitter is instructed by the second virtual server space to forward the data frame of the specific type to the server system.
According to a preferred embodiment, the step of acquiring the data frame by the first virtual server space in a packet capturing manner at least comprises the following steps: data packets containing data that can be processed by each application and data from a plurality of users arrive at the communication module from outside the first multipath data transmitter; the communication module forwards the TCP data packet to a third virtual hub outside the first virtual server space, and the third virtual hub forwards the TCP data packet to the first virtual hub in the first virtual server space; a first multipath data transmitter obtains the TCP packet at the first virtual hub, wherein the TCP packet is capable of being dropped by the first multipath data transmitter prior to entering a kernel protocol stack.
According to a preferred embodiment, each of the first multipath data transmitter and the second multipath data transmitter comprises at least a packet intercepting module, a user connection manager and a offloading policy manager, wherein: the data packet intercepting module is configured to be an original socket so as to acquire data packets from a plurality of users/servers, and identifies the users according to data packet headers; the user connection manager is configured to cache data from the data packet intercepting module and send the data; the offload policy manager is configured to manage the manner in which each user uses the multiplexed connection.
The invention also provides a data forwarding method, which at least comprises the following steps: configuring a client capable of accessing a server system in a network access manner; configuring a server system capable of carrying out data transmission with the client in a communication connection establishment mode; configuring a first multipath data transmitter capable of establishing a data path capable of transmitting user data packets with the client; configuring a second multi-path data transmitter capable of establishing a data path capable of transmitting user data packets with the server system, the first multi-path data transmitter capable of generating a first virtual server space having at least one first virtual hub and the second multi-path data transmitter capable of generating a second virtual server space having at least one second virtual hub, in the case where data is forwarded to the second multi-path data transmitter via the first multi-path data transmitter, wherein: data to be forwarded by the first multipath data transmitter is configured to be transmitted to the first virtual server space in a manner of being converted into a data frame of a specific type by the first virtual hub, wherein the first virtual server space is configured to acquire the data frame in a packet capturing manner, so that a user data packet contained in the data frame can be prevented from entering a corresponding protocol stack of the first virtual server space; the second virtual hub is configured to restore the data frame to the particular type matching the first virtual hub if a static multipath connection between a transmitter and a second multipath data transmitter is transmitted from the first virtual server space to the second virtual server space while the data frame is passing through the first multipath data.
According to a preferred embodiment, the data forwarding method further includes the following steps: the first multipath data transmitter and the second multipath data transmitter are configured to be able to establish static multipath data connections with each other based on their respective communication modules, wherein each static multipath data connection is able to select the data transmission protocol used by itself, and after a static multipath data connection is established, the first multipath data transmitter and the second multipath data transmitter communicate with each other via the static multipath data connection; the data of the client is configured to be capable of a first-stage forwarding via a first multi-path data transmitter, and a second multi-path data transmitter is configured to receive the data from the first multi-path data transmitter for a second-stage forwarding of the data, wherein the first-stage forwarding at least comprises the following steps: the first multipath data transmitter generates at least one first virtual server space when establishing data connection with the client, and in the case that the client sends a data packet to a far end through the first multipath data transmitter, the first multipath data transmitter can forward the data packet to the first virtual hub, so that data forwarded to the first virtual server space are data frames of a specific type; the first virtual server space acquires the data frame in a packet capturing mode, and under the condition that the first virtual server space processes and forwards the user data packet contained in the data frame, the first virtual server space is configured to be a corresponding protocol stack capable of preventing the user data packet contained in the data frame from entering the first virtual server space; instructing, by the first virtual server space, a first multipath data transmitter to send the user data packet to a second multipath data transmitter over the static multipath data connection.
According to a preferred embodiment, said second level of forwarding comprises at least the following steps: receiving data from the first multipath data transmitter based on the static multipath data connection, wherein the second virtual server space is configured to recover the received data to obtain a user data packet; the recovered user data packets can be encapsulated into a data frame of a specific type via the second virtual hub of the second multipath data transmitter, and the second multipath data transmitter is instructed by the second virtual server space to forward the data frame of the specific type to the server system.
The invention has the beneficial technical effects that: after the division of the TCP connection is applied, the first multipath data transmitter may quickly establish a connection with the client by responding to a connection request of the client in advance. The second multi-path data transmitter can cache the data in the form of pre-downloaded data, and compared with the mode that the server system directly sends the data to the client, the mode can maximize the utilization of the bandwidth between the first multi-path data transmitter and the second multi-path data transmitter, and the transmission performance is improved. Meanwhile, when the first multipath data transmitter and the second multipath data transmitter communicate with each other, the user data does not need to be transmitted as they are, and therefore, various further optimizations can be performed.
Detailed Description
The following detailed description is made with reference to the accompanying drawings.
Example 1
As shown in fig. 1, the present invention provides a data forwarding apparatus, which includes at least a first multipath data transmitter 1 and a second multipath data transmitter 2. The first multipath data transmitter 1 is configured to be able to establish a data path with several clients 3 which is able to transmit user data packets. The second multipath data transmitter 2 is capable of establishing a data path with several server systems 4, which is capable of transmitting user data packets. A multipath connection can be established between the first multipath data transmitter 1 and the second multipath data transmitter 2. The data path capable of transmitting the user data packet means that the data transmission between the client 3 and the first multipath data transmitter 1 can be performed by using a single network path based on the TCP protocol. A multipath transmission connection refers to a plurality of data transmission connections established on different network paths between the first multipath data transmitter 1 and the second multipath data transmitter 2, wherein the type of transmission protocol used by a single connection is not limited and is not necessarily the same as that of other connections. The data packet of the client 3 can be transmitted to the server system 4 through the first multipath data transmitter 1 and the second multipath data transmitter 2 in sequence. Or the data packet of the server system 4 can be transmitted to the client 3 through the second multi-path data transmitter 2 and the first multi-path data transmitter 1 in sequence. By deploying the second multipath data transmitter 2 on the server system 4, a multiplexing function can be added to the server system without modifying the program of the server system. By arranging the first multipath data transmitter 1 and the second multipath data transmitter 2, at least the following technical effects can be achieved: the present invention can divide the TCP connection between the server system 4 and the client 3 into three segments by providing the first multipath data transmitter 1 and the second multipath data transmitter 2. Namely, the connection between the client 3 and the first multipath data transmitter 1, the connection between the first multipath data transmitter 1 and the second multipath data transmitter 2, and the connection between the second multipath data transmitter 2 and the server system 4. In contrast to the way in which the server system 4 communicates with the client 3 directly via a TCP connection, the division of the TCP connection enables the client's request data to be processed by the first multipath data transmitter 1 and sent to the second multipath data transmitter 2. The second multipath data transmitter 2 processes the data transmitted from the first multipath data transmitter 1 and recovers the original data of the user, and transmits the data to the server system 4. The server system 4 sends data to the user in the reverse flow. After the TCP connection is split, the first multipath data transmitter 1 may quickly establish a connection with the client 3 by responding to a connection request of the client 3 in advance. The second multipath data transmitter 2 may buffer the data in the form of pre-downloaded data, and compared with the way in which the server system 4 directly sends the data to the client 3, the way may maximize the utilization of the bandwidth between the first multipath data transmitter 1 and the second multipath data transmitter 2, thereby improving the transmission performance. Meanwhile, when the first multipath data transmitter and the second multipath data transmitter communicate with each other, the user data does not need to be transmitted as they are, so that various further optimizations can be performed, for example, data can be encrypted to improve security; data is compressed to further improve transmission efficiency; data are transmitted by using codes with error correction so as to improve the reliability and stability of transmission. The second multipath data transmitter and/or the second multipath data transmitter may also buffer frequently requested data to quickly serve the client. In addition, the first multipath data transmitter 1 of the present invention needs to deploy the original ip forwarding path between the client and the server to work normally. The second multipath data transmitter 2 may not be deployed on the original ip forwarding path between the client and the server, and may also work normally.
Preferably, the first multipath data transmitter 1 and the second multipath data transmitter 2 are respectively deployed at different positions so as to be respectively used with the client 3 and the server system 4 with different functions, so that different use functions can be realized. For example, when the first multipath data transmitter 1 is deployed on a device such as an on-board or on-board Wi-Fi controller used in a public place to provide a network service to a client, the first multipath data transmitter 1 can provide a network access function based on multipath transmission to a plurality of clients. When the second multi-path data transmitter 2 is deployed in the backbone network of the CDN provider, the second multi-path data transmitter 2 can improve the efficiency of accessing the data included in the CDN by the client based on the multi-path transmission connection. In the case where the second multipath data transmitter 2 is deployed in a specific intranet, an effect similar to that of VPN can be obtained, that is, when an external device accesses data in the intranet, a transmission efficiency gain provided by multipath transmission can be obtained. Preferably, the data forwarding apparatus can include a plurality of first multipath data transmitters 1 and a plurality of second multipath data transmitters 2. The backbone network can be formed by deploying a plurality of first multipath data transmitters 1 and a plurality of second multipath data transmitters 2, and then the nearest first multipath data transmitter 1 and/or second multipath data transmitter 2 are/is selected for service according to different positions of the client 3 and the server system so as to provide the performance of the data forwarding device. For example, in practical applications, the first multipath data transmitter 1 may be deployed at various network border nodes proximate to the user, such as a Wi-Fi controller provided in a high-speed rail or other public place. The deployment strategy of the deployment location of the first multipath data transmitter 1 is: deployments may be made if a deployer owns multiple paths to access the network, which may mean that it owns services provided by multiple network service providers (ISPs), while providing network services using the multiple paths may achieve higher performance or lower rates than if the user directly accessed the network. The second multi-path data transmitter 2 may be deployed at each large CDN and each large cloud service provider. The deployment strategy of the second multipath data transmitter 2 is: should be as close as possible to the actual server location. The purpose of deploying a plurality of first multipath data transmitters 1 is to make user data, when transmitted in a conventional routing manner, pass through the first multipath data transmitters 1 without fail so as to be intercepted. The second multipath data transmitters 2 are deployed for the purpose of optimizing the performance, that is, the sum of the delays between the user and the first multipath data transmitter 1, between the first multipath data transmitter 1 and the second multipath data transmitter 2, and between the second multipath data transmitter 2 and the server can be minimized by selecting the positions of the second multipath data transmitters 2. After the deployment, assuming that the user uses two network applications with servers at address a and address B in different public places, respectively, the user can enjoy the multi-path data transmission service in different places due to the deployment of the plurality of first multi-path data transmitters 1; and because a plurality of second multipath data transmitters 2 are deployed, a user can select the second multipath data transmitter 2 deployed at the address A when using the network application of which the server is located at the address A, and select the second multipath data transmitter 2 deployed at the address B when using the network application of which the server is located at the address B, so that the user can obtain the highest performance when using two different applications. That is, if only deployed at address a, a delay in the transmission of address a to address B occurs when accessing the server at address B, and vice versa.
Preferably, the client 3 and server system 4 can be specific software processes located above the application layer. For example, the client 3 can be a process corresponding to, for example, QQ software, wechat software, or shopping mall software installed on a mobile phone. When the first multipath data transmitter is deployed on equipment held by a network user, such as a mobile phone, the data forwarding device can simultaneously communicate by utilizing a plurality of cellular network equipment and Wi-Fi network equipment on the mobile phone, so that the internet surfing quality of the network user is improved.
Preferably, as shown in fig. 2, the operation principle of the data transfer device of the present invention will be discussed in detail for easy understanding. For example, the raw socket 10 is used to intercept data sent by a user to a server or data sent by a server to a user. The relationship between the original socket 10 and the kernel protocol stack 12 is: the original socket 10 is a packet interception interface opened to the user space by the kernel protocol stack 12, and the packet interception function can be realized by calling the interface. The relationship between the original socket 10 and the packet capture module 5 is that the packet capture module 5 calls the original socket interface 11 to obtain packets from multiple users/servers, and identifies the users according to the packet heads of the packets. The user connection manager 6 is used for buffering the data from the packet intercepting module 5 and sending the data. The offloading policy manager 7 is used to manage the manner in which each user uses the multicast connection, such as the priority of the user when using the multicast connection, the allocation manner of the user's data to each of the multicast connections, and the like. The context data source 9, which may be either a kernel or a user space, provides data that is available to the scalable various scheduling algorithms 8. The scheduling algorithm 8 decides the transport connection to which the user connection manager 6 should send the user data by reading the offloading policy for each user connection and the data provided by the context data source 9. Preferably, the raw socket, raw socket interface 11 and kernel protocol stack are all located in kernel 14. The packet interception module, the user connection manager, the offload policy manager and the scheduling algorithm are all located in the user space 13.
Example 2
This embodiment is a further improvement of embodiment 1, and repeated contents are not described again.
The invention also provides a data forwarding method, which at least comprises the following steps:
s1: the first multipath data transmitter 1 generates at least one first virtual server space with at least one first virtual hub and the second multipath data transmitter 2 generates at least one second virtual server space with at least one second virtual hub.
Specifically, the data forwarding device of the present invention creates a virtual host during operation and operates therein, and the configuration change on the physical host is limited to sending the user data to the virtual host where the data forwarding device is located and sending the data from the data forwarding device to the user, thereby minimizing possible configuration conflicts of the data forwarding device. Meanwhile, when the data forwarding device runs in the virtual host, configuration change of the data forwarding device with potential risk cannot be carried out on the entity host, so that potential safety risk is reduced.
Preferably, the first virtual server space and the second virtual server space refer to: a set of a protocol stack generated by a device such as a gateway simply using software and a network device belonging to the protocol stack; for other communication objects, the first virtual server space and the second virtual server space are provided with independent network cards, memories and processors.
S2: the first multipath data transmitter 1 and the second multipath data transmitter 2 are able to establish a static multipath data connection between each other on the basis of their respective communication modules, wherein each static multipath data connection is able to select the data transmission protocol used by itself, and after the static multipath data connection is established, the first multipath data transmitter 1 and the second multipath data transmitter 2 are able to communicate with each other only via the static multipath data connection.
Specifically, the static multipath data connection means that after the first multipath data transmitter 1 and the second multipath data transmitter 2 establish a connection in a handshake manner, the first multipath data transmitter 1 only communicates with the second multipath data transmitter 2, and the second multipath data transmitter 2 also only communicates with the first multipath data transmitter 1. That is, each static multipath data connection is formed only by one pair of the first multipath data transmitter 1 and the second multipath data transmitter 2. The static multipath data connection can be dynamically changed according to actual conditions, that is, the static multipath data connection does not need to be completely established in advance, and the static multipath data connection can be restarted, added or deleted according to actual conditions in subsequent processes.
S3: the data of the client 3 is forwarded via the first multipath data transmitter 1 in a first stage. The method specifically comprises the following steps:
s30: the client 3 establishes a data connection with a first multipath data transmitter 1, at least one first virtual server space being generated on the first multipath data transmitter 1.
S31: in the case where the client 3 sends a data packet to the remote end via the first multipath data transmitter 1, the first multipath data transmitter 1 can forward the data packet to the first virtual hub supported by the kernel of the first virtual server space, so that the data forwarded to the first virtual server space are all data frames of a specific type.
Specifically, the data packet may be a TCP/IP protocol data packet. The first virtual hub may be a virtual ethernet card. The data frames of a particular type may be ethernet frames. When the first multipath data transmitter 1 forwards the data packet to the virtual network card supported by the kernel, the kernel automatically completes protocol conversion without an additional module, so that the compatibility is improved, and the programming difficulty is greatly reduced; this means that the first virtual server space always gets data in the same format, without the need to identify various protocols and deal with various complex data formats; meanwhile, the data packets not belonging to the client are still processed by the first multipath data transmitter 1 in a predetermined manner, and for example, the first multipath data transmitter 1 may still have other functions such as transmitting control information for accounting. Therefore, the data forwarding apparatus of the present invention is convenient to deploy, and does not interfere with the existing function of the first multipath data transmitter 1.
Preferably, when the client 3 sends a data packet to the remote end via the first multipath data transmitter 1, the data packet can be classified. Namely, the packet classification means that the first multipath data transmitter 1 or a firewall disposed thereon classifies the received packet before the packet is sent to the first virtual server space. The classification is based on at least whether the data packet is a TCP/IP protocol data packet or whether the client 3 is connected to the first multipath data transmitter, i.e. whether the client 3 sending the data packet is directly served by the first multipath data transmitter. And then the TCP/IP protocol data packet contained in the Ethernet frame is discarded by the first virtual server space before entering the TCP/IP protocol stack, so that the TCP/IP protocol stack of the first virtual server space does not respond to the TCP/IP protocol data packet contained in the Ethernet frame. The data is processed by replacing a TCP/IP protocol stack, and the data is forwarded by the first virtual server space, so that the conflict can be avoided.
Preferably, the ethernet frame refers to a data packet over an ethernet link. The start of an ethernet frame consists of a preamble and a frame start. The start portion is followed by an ethernet header specifying the destination address and source address with the MAC address. In the middle of an ethernet frame is the packet that the frame carries, including the other protocol headers. The end of the ethernet frame is a 32-bit redundancy check code to verify that the data transmission is corrupted.
Preferably, the TCP/IP protocol stack is a summation of a series of network protocols, and is a core framework for constituting network communication, and defines how electronic devices are connected to the internet and how data is transmitted between them. The TCP/IP protocol stack is a model of a stack in a similar data structure, and has many layers, each layer bearing different functions and having different protocols. A protocol stack can be understood as a four-layer model: application layer, transport layer, network layer, link layer. The application layer is provided with a plurality of user-oriented application-related protocols which relate to the analysis and processing of data, so that the conversion between user information and data flow is realized; the transport layer is responsible for performing conversion between data streams and data segments and is a management layer of data information; the network layer is involved in contacting other hosts, encapsulating data and finding a proper path to send or receive information in; the link layer is mainly a series of interfaces for realizing corresponding functions, and is the lowest layer of a protocol stack. The user information is gradually packaged from the application layer to the bottom, and when the user information is transmitted to another host, the package is opened step by step from the bottom to the top, and finally the user information is analyzed and restored. In the above process, each protocol in the protocol stack ensures the realization of the transmission process and the safety of data.
S32: and acquiring a data frame by the first virtual server space in a packet capturing mode, processing and forwarding a user data packet contained in the data frame by the first virtual server space, and simultaneously preventing the user data packet contained in the data frame from entering a corresponding protocol stack of the first virtual server space, wherein the first virtual server space instructs the first multipath data transmitter to transmit the user data packet acquired from the data frame to the second multipath data transmitter through a static multipath data connection.
Specifically, as shown in fig. 3, the process of packet capture and interception of user data includes the following steps: s100: a data packet containing data that can be processed by each application and containing data from a plurality of users arrives at the communication module 20 from outside the proxy server. S110: the first multipath data transmitter 1 or the second multipath data transmitter 2 forwards the TCP data packet to the third virtual hub 19 by deploying the Linux firewall rule and the policy routing rule on the communication module 20, and the other non-TCP data packets are not affected and are processed by the kernel protocol stack 12 in a predetermined manner. S120: the third virtual hub 19 automatically forwards the data to the first virtual hub 17 within the first virtual server space 15 or to the second virtual hub 18 of the second virtual server space 16. S130: the first multipath data transmitter 1 or the second multipath data transmitter 2 obtains the data packet at the first virtual hub 17 or the second virtual hub 18. S140: the Linux firewall rules are configured such that data packets are discarded after being read by the first multipath data transmitter 1 or the second multipath data transmitter 2 before entering the kernel protocol stack. Packet capture refers to copying rather than transferring packets. Therefore, the data forwarding device after packet capture obtains a copy of the data packet, and the original data packet must be discarded, otherwise, the original data packet still enters the kernel protocol stack.
Preferably, as shown in fig. 4, the data transmission process is as follows: s200: the first multipath data transmitter 1 or the second multipath data transmitter 2 transmits a packet on the first virtual hub or the second virtual hub. S210: the packet will be automatically forwarded to a third virtual hub 19 outside the first virtual server space or the second virtual server space. S220: the first multipath data transmitter 1 or the second multipath data transmitter 2 forwards the data to the communication module 20 by configuring the routing rule on the host where the first virtual server space or the second virtual server space is located, and the data is sent out by the communication module 20. Preferably, the host in which the first virtual server space or the second virtual server space is located may be a physical machine or a virtual machine, so that the communication module is only referred to as the first multipath data transmitter 1 or the second multipath data transmitter 2, and the communication module may be virtual in reality.
Preferably, when intercepting data, sending TCP data to the first virtual server space 15 where the data forwarding device is located by using policy routing, and reasonably configuring the first virtual server space so that the kernel protocol stack 12 therein discards all input data; and simultaneously capturing packets on the first virtual hub in the first virtual server space to achieve the purpose of intercepting data. Specifically, the kernel protocol stack 12 belongs to the kernel protocol stack of the first multipath data transmitter 1, and the kernel protocol stack in the first virtual server space is completely the same as the kernel protocol stack in the code plane of the first multipath data transmitter 1, so that the first multipath data transmitter 1 and the kernel protocol stack 12 in the first virtual server space belong to two different copies. When sending data, the data forwarding device sends a packet on the second virtual hub, and sends the data to the communication module through a reasonably configured route and transmits the data to the user. Through the configuration mode, the data forwarding device can be compatible with communication modules of various systems without modifying programs.
Preferably, the acquiring of the data frame by the first virtual server space in the packet capturing manner may be understood as: sniffing all data packets passing through the network card of the first virtual server space, for example, on the data link layer; in other words, the first virtual server space replicates and stores all data packets on the data link layer that pass through the network card of the first virtual server space. The user data packets contained in the data frame are prevented from entering the corresponding protocol stack of the first virtual server space, so that the same data is prevented from being subjected to secondary error processing by the corresponding protocol stack.
S4: the second multipath data transmitter 2 receives data from the first multipath data transmitter 1 to effect a second stage of forwarding of the data. The method specifically comprises the following steps:
s40: the second multipath data transmitter 2 receives data from the first multipath data transmitter 1 over a static multipath data connection, wherein the second virtual server space generated by the second multipath data transmitter 2 is configured to recover the received data to obtain user data packets.
S41: the recovered user data packets are encapsulated by the second virtual server space on the second multipath data transmitter 2 as a particular type of data frame via a second virtual hub supported by the kernel of the second multipath data transmitter and instructed by the second virtual server space to forward the particular type of data frame to the server system 4.
Example 3
Preferably, the present invention further provides a data offloading model, which is defined by at least a connection sequence scheduling algorithm, a data sequence scheduling algorithm, and a transmission path scheduling algorithm. The connection order scheduling algorithm is an algorithm for scheduling a data transmission order of each user connection. The data sequence scheduling algorithm is an algorithm for scheduling data transmission sequences in the same connection. A transmission path scheduling algorithm is an algorithm for shunting data onto a certain transmission path/paths. Specifically, in practical application, the connection sequence scheduling algorithm is often applied when the system needs to serve multiple users, a policy that each user sends data in turn may be used to ensure fairness among users, or a policy that "when the user has data to send, all other users wait" may be used for a certain user to ensure data transmission quality of certain privileged users, and the like. For example, for connection #1, connection #2, and connection #3, each connection corresponds to at least one user. And then different data transmission of different users can be realized through each connection. The connection order scheduling algorithm may be configured to implement the transmission of data in such a manner that connection #1, connection #2, and connection #3 are sequentially executed. Meanwhile, the connection order scheduling algorithm may also be configured to prioritize execution of connection #3 to satisfy the privileged user using the connection. The data sequence scheduling algorithm is often applied when changing the transmission sequence of user data to obtain performance improvement, for example, data that has never reached the opposite end after being transmitted on a certain transmission connection may be retransmitted on other connections, and at this time, the sequence of transmitting data needs to be changed so that the data that needs to be retransmitted is transmitted first. The transmission path scheduling is an important way to improve the efficiency of user data transmission on the multiple transmission connections, for example, a path with higher transmission performance and lower load can be selected for transmission by obtaining historical data such as transmission performance, load and the like on each transmission connection.
It should be noted that the above-mentioned embodiments are exemplary, and that those skilled in the art, having benefit of the present disclosure, may devise various arrangements that are within the scope of the present disclosure and that fall within the scope of the invention. It should be understood by those skilled in the art that the present specification and figures are illustrative only and are not limiting upon the claims. The scope of the invention is defined by the claims and their equivalents.