WO2020140729A1 - 数据传输方法、装置、计算机可读介质及电子设备 - Google Patents

数据传输方法、装置、计算机可读介质及电子设备 Download PDF

Info

Publication number
WO2020140729A1
WO2020140729A1 PCT/CN2019/125125 CN2019125125W WO2020140729A1 WO 2020140729 A1 WO2020140729 A1 WO 2020140729A1 CN 2019125125 W CN2019125125 W CN 2019125125W WO 2020140729 A1 WO2020140729 A1 WO 2020140729A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
data
channel
address information
sent
Prior art date
Application number
PCT/CN2019/125125
Other languages
English (en)
French (fr)
Inventor
孙飞虎
张丹
郝晶晶
宁斌晖
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to JP2021515152A priority Critical patent/JP7154399B2/ja
Priority to EP19908065.6A priority patent/EP3907955A4/en
Publication of WO2020140729A1 publication Critical patent/WO2020140729A1/zh
Priority to US17/229,699 priority patent/US12126530B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/04Protocols specially adapted for terminals or networks with limited capabilities; specially adapted for terminal portability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
    • H04L1/0017Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy where the mode-switching is based on Quality of Service requirement
    • H04L1/0018Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy where the mode-switching is based on Quality of Service requirement based on latency requirement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1006Server selection for load balancing with static server selection, e.g. the same server being selected for a specific client
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • H04W28/086Load balancing or load distribution among access entities
    • H04W28/0861Load balancing or load distribution among access entities between base stations
    • H04W28/0865Load balancing or load distribution among access entities between base stations of different Radio Access Technologies [RATs], e.g. LTE or WiFi
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • H04W28/086Load balancing or load distribution among access entities
    • H04W28/0866Load balancing or load distribution among access entities between wireless and wire-based access points, e.g. via LTE and via DSL connected access points
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • H04W28/0875Load balancing or load distribution to or through Device to Device [D2D] links, e.g. direct-mode links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0289Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release
    • H04W76/38Connection release triggered by timers

Definitions

  • the present application relates to the field of computers and communication technologies, and in particular, to a data transmission method, device, computer-readable medium, and electronic equipment.
  • Wi-Fi Wireless Fidelity
  • Mobile communication networks such as 3G/4G/5G are less susceptible to interference due to the narrower spectrum, but data transmission needs to pass through the operator’s access layer, which in turn will result in higher latency, and will also be affected by the deployment and Capacity causes high latency and congestion problems.
  • An embodiment of the present application provides a data transmission method, which is executed by a server and includes: receiving a first data packet sent by a first device through multiple data channels; parsing the first data packet to obtain address information of the first device And aggregate the first data packet according to the data packet header of the first data packet to obtain a second data packet; replace the source address information of the second data packet with specified address information to obtain third data Packet; send the third data packet to a second device, wherein the second device is a device that the first device needs to access.
  • An embodiment of the present application provides a data transmission apparatus, including: a receiving unit, configured to receive a first data packet sent by a first device through multiple data channels; a first processing unit, configured to parse the first data packet to obtain The address information of the first device, and performing aggregation processing on the first data packet according to the data packet header of the first data packet to obtain a second data packet; a second processing unit is used to convert the second data The source address information of the packet is replaced with the specified address information to obtain a third data packet; a sending unit is used to send the third data packet to a second device, where the second device is the first device that needs access device of.
  • An embodiment of the present application further provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, the data transmission method as described in the foregoing embodiment is implemented.
  • An embodiment of the present application also provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, when the one or more programs are used by the one or more processors When executed, the one or more processors are caused to implement the data transmission method as described in the above embodiments.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied;
  • FIG. 2 schematically shows a flowchart of a data transmission method according to an embodiment of the present application
  • FIG. 3 schematically shows a flowchart of a data transmission method according to an embodiment of the present application
  • FIG. 4 schematically shows a flowchart of determining a fourth data packet that needs to be sent to a first device from data packets sent by a second device according to an embodiment of the present application
  • FIG. 5 shows a schematic structural diagram of a dual-channel communication system according to an embodiment of the present application
  • FIG. 6 shows a schematic structural diagram of a dual-channel communication system according to an embodiment of the present application.
  • FIG. 8 shows a schematic diagram of adding a dual-channel header to an ip packet by a dual-channel client according to an embodiment of the present application
  • FIG. 9 schematically shows a flowchart of processing a received data packet by a dual-channel client according to an embodiment of the present application
  • FIG. 10 schematically shows a flowchart of interaction between a dual-channel proxy server and an application server according to an embodiment of the present application
  • FIG. 11 schematically shows an interaction flowchart between a dual-channel proxy server and a dual-channel load balancing server according to an embodiment of the present application
  • FIG. 12 shows a schematic diagram of a dual-channel system composed of a wireless local area network channel and a wired channel according to an embodiment of the present application
  • FIG. 13 shows a schematic diagram of a dual-channel system composed of a wireless local area network channel and a Bluetooth channel according to an embodiment of the present application
  • FIG. 15 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
  • Example embodiments will now be described more fully with reference to the drawings.
  • the example embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein; on the contrary, providing these embodiments makes the application more comprehensive and complete, and fully conveys the concept of the example embodiments For those skilled in the art.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
  • the system architecture may include a terminal device 101, a multi-channel proxy server 102, and an application server 103.
  • the multi-channel proxy server 102 is used to aggregate the data sent by the terminal device 101 through multiple data channels and send it to the application server 103, and is used to return the data sent by the application server 103 to the terminal device 101 through multiple data channels.
  • the terminal device 101 may be one or more of a smart phone, a tablet computer and a portable computer, and may also be a desktop computer or the like.
  • terminal devices 101, multi-channel proxy servers 102, and application servers 103 in FIG. 1 are only schematic. According to implementation requirements, there may be any number of terminal devices 101, multi-channel proxy server 102, and application server 103.
  • the application server 103 may be a game server.
  • the game server may be a single server or a server cluster composed of multiple servers.
  • the multi-channel proxy server 102 may send the smart phone to the smart phone after receiving the link data sent by the smart phone Assign a virtual port, and then associate the virtual port with the real address information of the smartphone, and record the VIP (Virtual IP) of the application server accessed by the smartphone.
  • VIP Virtual IP
  • the multi-channel proxy server 102 When the multi-channel proxy server 102 receives the application service data packets sent by the smartphone through multiple data channels, it performs aggregation processing (such as deduplication processing), and then replaces the source address information of the application service data packets after deduplication processing with multiple The address information (including the aforementioned virtual port) of the channel proxy server 102 is further sent to the application server 103.
  • the above multiple data channels may include a wireless local area network channel such as a Wi-Fi channel and a mobile communication channel such as a 4G channel.
  • the multi-channel proxy server 102 After the multi-channel proxy server 102 receives the data packet sent by the application server 103, it filters out the data packets that need to be sent to the smartphone according to the source address information of the data packet and the previously recorded VIP information, and then according to the recorded virtual port and The real address information of the smart phone modifies the destination address information of the filtered data packet to the real address information of the smart phone, and then can be sent to the smart phone through multiple data channels.
  • the technical solutions of the embodiments of the present application can jointly transmit data packets through multiple data channels to ensure the transmission stability of the data packets, effectively solve the problems of high packet loss rate and high delay during data transmission, and can achieve full
  • the multi-channel data transmission process of the stack meets the business needs in various communication scenarios.
  • FIG. 2 schematically shows a flowchart of a data transmission method according to an embodiment of the present application.
  • the data transmission method may be executed by a server, and the server may be a proxy server, for example, may be the multi-channel shown in FIG. 1 Proxy server 102.
  • the data transmission method includes at least steps S210 to S240, which are described in detail as follows:
  • step S210 a first data packet sent by a first device through multiple data channels is received.
  • the multiple data channels may include two or more of the following data channels: Wi-Fi channel, Bluetooth channel, wired channel, mobile communication network (such as 3G/4G/5G, etc.) Data channel etc.
  • the data packets sent by the first device through multiple data channels may be identical; or a data channel may send a full amount of data packets, and other data channels send a non-full amount of data packets (such as every 5 Only two data packets are sent, etc.); it is also possible to send incomplete data packets by multiple data channels separately, so that the receiver can perform aggregation processing to obtain a complete data packet.
  • the first data packet sent by the first device may be a TCP (Transmission Control Protocol) data packet, or a UDP (User Datagram Protocol, user datagram protocol) data packet, Or it can be an IP packet.
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol, user datagram protocol
  • a data message for resetting the connection is sent to the first device to ensure that the first device can reestablish the connection with the multi-channel proxy server as soon as possible.
  • the multi-channel proxy server when the multi-channel proxy server receives a data packet (such as a fin message) that disconnects the TCP connection sent by the first device, it can delete the stored data with the first device after a predetermined period of time Related information (such as address information of the first device, information of the virtual port allocated to the first device, address information that the first device needs to access, etc.).
  • a data packet such as a fin message
  • Related information such as address information of the first device, information of the virtual port allocated to the first device, address information that the first device needs to access, etc.
  • step S220 the first data packet is parsed to obtain the address information of the first device, and the first data packet is aggregated according to the data packet header of the first data packet to obtain a second data packet.
  • the address information of the first device may include an intranet IP (Internet Protocol) address and intranet port information of the first device.
  • intranet IP Internet Protocol
  • the aggregation processing of the first data packet according to the data packet header of the first data packet may be deduplication processing and/or integration processing of the data packet sent by the first device through multiple data channels, In order to get the full and non-duplicate data packets. For example, according to the packet sequence number in the data packet header of the first data packet, deduplication processing (such as deleting a data packet with a repeated packet sequence number) and/or integration processing (such as integrating data packets with different packet sequence numbers).
  • step S230 the source address information of the second data packet is replaced with designated address information to obtain a third data packet.
  • the specified address information may include the IP address of the multi-channel proxy server and virtual port information allocated by the multi-channel proxy server to the first device.
  • the multi-channel proxy server may store the virtual port information in association with the real address information of the first device, and when receiving data packets sent by other devices, the multi-channel proxy server may The virtual port information included in the data packet determines whether the data packet is a data packet sent to the first device.
  • step S240 the third data packet is sent to the second device.
  • the second device may be a device that the first device needs to access, such as an application server.
  • the first data packet sent by the first device may be parsed to obtain address information that the first device needs to access, and then the second device may be determined according to the address information that the first device needs to access.
  • the address information to be accessed by the first device may be a VIP of the application server, where one VIP of the application server corresponds to one first device.
  • the multi-channel proxy server may also set the maximum segment length of the data packet sent by the second device. For example, by setting the mss field of the TCP message protocol to set the maximum message segment length.
  • the technical solution of the embodiment shown in FIG. 2 enables the transmission of data packets through multiple data channels to ensure the transmission stability of the data packets, effectively solving the problems of high packet loss rate and high delay in the data transmission process, and the aggregation process It can also ensure that the second device does not need to receive the same data repeatedly, and realizes the multi-data channel transmission process of the second device without perception.
  • the source address information of the second data packet is replaced with the specified address information (such as the address information of the proxy server) and sent to the second device, no matter which communication method is adopted between the first device and the multi-channel proxy server, All data channels can be transmitted, which realizes the full-stack multi-channel data transmission process and meets the business needs in various communication scenarios.
  • FIG. 3 schematically shows a flowchart of a data transmission method according to an embodiment of the present application.
  • the data transmission method may be executed by a server, which may be shown in FIG. 1
  • the data transmission method includes at least steps S310 to S330, which are described in detail as follows:
  • step S310 a fourth data packet that needs to be sent to the first device is determined from the data packets sent by the second device.
  • the fourth data packet may be an IP data packet, that is, the second device may directly send the IP data packet to the multi-channel proxy server, and thus may seamlessly support multi-channel transmission of the full-stack network.
  • the multi-channel proxy server may parse the first data packet to obtain address information that the first device needs to access, and then store the address information.
  • the fourth data packet that needs to be sent to the first device may be determined based on the stored address information that the first device needs to access.
  • FIG. 4 is a flowchart of determining a fourth data packet that needs to be sent to the first device from the data packets sent by the second device in the embodiment of the present application. As shown in Fig. 4, it specifically includes the following steps:
  • Step S410 Determine the source address information of the data packet sent by the second device.
  • the source address information of the data packet can be obtained by parsing the data packet sent by the second device.
  • the source address information of the data packet sent by the second device may be the virtual address information of the application server.
  • Step S420 according to the address information that the first device needs to access, filter out the data packets that match the source address information and the address information that the first device needs to access from the data packets sent by the second device,
  • the filtered data packet is used as the fourth data packet.
  • not all data packets sent by the second device are to be sent to the first device, but the source address information of the data packet to be sent to the first device and the data packet sent by the first device
  • the destination address information is the same, so you can filter out the data packets that match the source address information and the address information that the first device needs to access from the data packets sent by the second device, and use this as the data that needs to be sent to the first device
  • the fourth data packet not all data packets sent by the second device are to be sent to the first device, but the source address information of the data packet to be sent to the first device and the data packet sent by the first device The destination address information is the same, so you can filter out the data packets that match the source address information and the address information that the first device needs to access from the data packets sent by the second device, and use this as the data that needs to be sent to the first device The fourth data packet.
  • step S320 the destination address information of the fourth data packet is replaced with the address information of the first device to obtain a fifth data packet.
  • the multi-channel proxy server may allocate a virtual port to the first device in advance, and then associate and store the virtual port allocated to the first device with the address information of the first device.
  • the destination address information of the fourth data packet includes the IP address of the multi-channel proxy server and the virtual port information allocated by the multi-channel proxy server to the first device, so that the virtual port information can be used from the stored virtual port and address information.
  • the address information of the first device is queried out in the association relationship, and then the destination address information of the fourth data packet is replaced with the address information of the first device.
  • the address information of the first device may include the intranet address and intranet port of the first device.
  • step S330 the fifth data packet is sent to the first device.
  • the fifth data packet may be sent to the first device through multiple data channels to ensure the transmission stability of the data packet, thereby solving the problem of high packet loss rate and high delay during data transmission problem.
  • the first device may also perform aggregation processing.
  • the aggregation processing may be deduplication processing and/or integration of the data packets received by the first device through multiple data channels. Process to get full and non-repetitive data packets.
  • the first device may also be used to transmit the data channel information of the first data packet to the multi-channel proxy server.
  • the specific sending method may be real-time sending, periodic sending, and sending when changes occur Wait, after the multi-channel proxy server receives the data channel information, it can store it, and then the multi-channel proxy server can send the fifth data packet to the first device according to the latest stored data channel information to the fifth The data packet is sent to the first device to ensure that the multi-channel proxy server can know and can use the latest data channel information to send the data packet to the first device.
  • the multi-channel proxy server may also determine the data used by the first device when sending the data packet based on the reception of the first data packet sent by the first device or the reception of other data packets The network status of the channel, such as delay, congestion, etc., and then when the multi-channel proxy server sends the fifth data packet to the first device, it can be based on the network status of the data channel used by the first device when sending the data packet Pros and cons, choose one or more data channels to send the fifth data packet to the first device.
  • the fifth data packet can be transmitted only through the data channel with better network status, which can reduce the occupation of the data channel and the consumption of traffic; when multiple data channels When all of the network conditions are poor, the fifth data packet can be transmitted through multiple data channels, thereby ensuring the transmission stability of the data packet, and avoiding the problems of high packet loss rate and high delay during data transmission.
  • determining the network state of the data channel used by the first device when sending the data packet may be based on the first moment when the data packet sent by the first device is received and the data packet sent by the first device At the second moment included in it, the delay of the data packet sent by the first device is calculated, and then the network status of the data channel used by the first device to send the data packet is determined according to the delay of the data packet sent by the first device.
  • the delay of the data packet sent by the first device is greater, it means that the network state of the data channel used by the first device to send the data packet is worse; if the delay of the data packet sent by the first device is smaller, then the The better the network status of the data channel used by a device to send data packets.
  • the second time is determined according to the time when the first device sends the data packet and the clock synchronization compensation value between the proxy server and the first device.
  • the multi-channel proxy server may also receive the reception of the first data packet transmitted to the first device fed back by the first device to determine the data used by the first device when receiving the data packet The network status of the channel, such as delay, congestion, etc., and then the multi-channel proxy server can send the fifth data packet to the first device according to the network status of the data channel used by the first device when receiving the data packet Pros and cons, choose one or more data channels to send the fifth data packet to the first device.
  • the fifth data packet can be transmitted only through the data channel with better network status, which can reduce the occupation of the data channel and the consumption of traffic; when multiple data channels When all of the network conditions are poor, the fifth data packet can be transmitted through multiple data channels, thereby ensuring the transmission stability of the data packet, and avoiding the problems of high packet loss rate and high delay during data transmission.
  • the multi-channel proxy server may also determine the data used by the first device when sending the data packet based on the reception of the first data packet sent by the first device or the reception of other data packets The network status of the channel, and then send the network status of the data channel used by the first device when sending the data packet to the first device, so that the first device selects the data channel used when sending the data packet again according to the network status .
  • the first device can send data packets to the multi-channel proxy server only through the data channel with better network status when sending the data packet again, which can reduce the number of data channels.
  • the first device can send data packets to the multi-channel proxy server through multiple data channels when sending the data packets again, which can ensure the data packets Transmission stability, to avoid the problem of high packet loss rate and high delay during data transmission.
  • the first device may also determine the network status of the data channel used by the first device when receiving the data packet based on the reception of the first data packet sent by the multi-channel proxy server, and then The network state selects the data channel used when sending data packets. For example, when the network status of a data channel is good, the first device can only send data packets to the proxy server through the data channel with a good network status, which can reduce the occupation of the data channel and the consumption of traffic; When the network status of multiple data channels is poor, the first device can send data packets to the proxy server through multiple data channels, which can ensure the transmission stability of the data packets and avoid high packet loss rates and The problem of high latency.
  • the following uses the first device as a dual-channel client, the proxy server as a dual-channel proxy server (that is, the following description uses data transmission through two data channels as an example), and the second device as an application server as an example.
  • the implementation details of the technical solution are elaborated:
  • a dual-channel communication system mainly includes: a user terminal 51, a dual-channel load balancing server 502, a dual-channel proxy server 503, and an application server 504.
  • the user terminal 51 is provided with an application client 505, a network card 506, and a dual-channel client 501.
  • the dual-channel client 501 communicates with the application client 505 through the network card.
  • the application client 505 and the dual-channel client 501 can send tcp messages and udp messages.
  • the dual-channel client 501 receives the udp message sent by the application client 505, it can be sent to the dual-channel load balancing server 502 through dual channels (such as Wi-Fi channel and 4G channel), and then the dual-channel load balancing server 502 Forwarded to the dual-channel proxy server 503, the dual-channel proxy server 503 deduplicates the received udp message and forwards it to the application server 504.
  • dual channels such as Wi-Fi channel and 4G channel
  • the udp message can be sent to the dual channel through the dual channel (such as Wi-Fi channel and 4G channel)
  • the load balancing server 502 is then forwarded by the dual channel load balancing server 502 to the dual channel client 501, and the dual channel client 501 deduplicates the received udp message and forwards it to the application client 505 through the network card.
  • the dual-channel client 501 after the dual-channel client 501 intercepts the syn message of tcp from the network card 506 (syn message indicates a connection establishment message), the dual-channel client 501 immediately communicates with the application according to the destination address information The server 504 establishes a tcp link. After the tcp link is established, the dual-channel client 501 sends the tcp ack+syn message (the ack+syn message indicates the message confirming the connection establishment) to the application client 505 through the network card 506, and the subsequent tcp link establishment process is continued.
  • bridge fd1 communication with the application client 505
  • fd2 communication with the application server 504
  • the uplink tcp message is forwarded, and the downlink tcp message sent by the application server 504 to the application client 505 is forwarded.
  • a dual-channel communication system mainly includes: a user terminal 61, a dual-channel load balancing server 602 (dual-channel load balancing Server 602a and dual channel load balancing server 602b), dual channel proxy server 603 and application server 604.
  • the user terminal 61 is provided with an application client 605, a network card 606, and a dual-channel client 601.
  • the number of dual-channel load balancing servers 602 shown in FIG. 6 is only an example. In other embodiments of the present application, any number of dual-channel load balancing servers may be provided, or dual-channel loads may not be provided Balance server.
  • the dual-channel proxy server 603 when receiving the fin packet of the tcp link sent by a dual-channel client 601, marks the tcp link status of the dual-channel client 601 as the fin status, and After finOutTime (default 10 seconds), delete the tcp link information from the client information module 6031.
  • the finOutTime timeout period is used to ensure that the 4 wave of tcp links can be ended normally.
  • a dual-channel proxy server 603 when a dual-channel proxy server 603 creates a tcp link of a dual-channel client, it will determine whether the first tcp message of the tcp link is a three-way handshake syn message, and if so, establish The tcp link information is stored in the client information module 6031; if not, the rst message is returned to the dual-channel client to interrupt the illegal tcp link to ensure that the dual-channel client can quickly rebuild the tcp link.
  • the dual-channel client 601 can set the value of the mss field of the tcp message protocol when receiving the syn message of the tcp link sent by the application client 605 to ensure the data sent by the application server 604
  • the packets are all within the controllable length range (tcp message length takes the minimum value of mss value and sending window value) to prevent buffer overflow and affect transmission efficiency problems caused by excessive data packets.
  • the dual-channel proxy server 603 when receiving the syn+ack message of the tcp link returned by the application server 604, the dual-channel proxy server 603 sets the mss field of the tcp message protocol to ensure the data sent by the application client The packets are all within the controllable length to prevent buffer overflow and affect transmission efficiency problems caused by excessive data packets.
  • the dual-channel proxy server 603 can respectively turn off the following options for network card optimization: GRO (Generic Receive Offloading), TSO (TCP Segmentation Offload, TCP segmentation), GSO (Generic Segmentation) Offload, universal segmentation), LRO (Large, Receive, Offload, large reception), to ensure that the mss value setting of the tcp link takes effect.
  • GRO Generic Receive Offloading
  • TSO TCP Segmentation Offload, TCP segmentation
  • GSO Generic Segmentation
  • LRO Large, Receive, Offload, large reception
  • a virtual network card 607 is created (the virtual network card communicates with the application client through the physical network card in the mobile phone), and two threads (ie, an upstream thread and a downstream thread are established) Thread), at the same time, two udp socket links can be established and bound to wireless channels such as Wi-Fi channels and fourth-generation mobile communication (referred to as 4G) channels.
  • the dual-channel client 601 requests the cloud control server according to the corresponding application service configuration and delivers the IP address of the application server 604. According to this IP address, an iptables filtering strategy is set, and the IP packet sent by the application client 605 is intercepted and forwarded to the virtual network card 607 through the network card 606.
  • the dual-channel client 601 may add a dual-channel header to form a “dual-channel header +
  • the dual-channel upstream message in the format of "application service IP message" can then be sent based on the udp protocol and through two channels of a wireless local area network channel such as Wi-Fi and a mobile communication channel such as a 4G channel.
  • the dual-channel client 601 when the dual-channel client 601 sends through the dual channel, it can be sent to the dual-channel load balancing server 602 first, and then forwarded by the dual-channel load balancing server 602 to the dual channel
  • the uplink thread of the proxy server 603 is further de-duplicated by the dual-channel proxy server 603 and forwarded to the application server 604.
  • the dual-channel client 601 can also be directly sent to the dual-channel proxy server 603 when sending through the dual-channel, and then the dual-channel proxy server 603 performs deduplication processing Forward to the application server 604.
  • the protocol field of the dual-channel uplink message sent by the dual-channel client 601 may be as follows:
  • uint8_t type //Type, the channel number or packet type of the current upstream packet
  • the dual-channel client 601 after receiving the dual-channel downlink message in the format of “dual-channel header + application service IP message” sent through the dual channel, the dual-channel client 601 passes Re-logic performs de-duplication processing on the received dual-channel downlink packets and removes the header of the dual-channel downlink packets, and directly sends the IP message stored in the data field to the virtual network card 607 to facilitate virtual
  • the network card 607 sends the application service IP message to the application client 605 through the network card 606.
  • the application service IP message may be a game IP message.
  • the protocol field of the dual-channel downlink packet received by the dual-channel client 601 may be as follows:
  • the dual-channel downlink message received by the dual-channel client 601 may be a downlink thread where the application server 604 sends the application service IP packet to the dual-channel proxy server 603 , And then generated by the dual-channel proxy server 603 after adding the dual-channel header. After the dual-channel proxy server 603 generates the dual-channel downlink message, it sends it to the dual-channel load balancing server 602, and then the dual-channel load balancing server 602 forwards it to the dual-channel client 601.
  • the dual-channel proxy server 603 after the dual-channel proxy server 603 generates the dual-channel downlink message, it can be directly sent to the dual-channel client 601. Then, the dual-channel client 601 performs deduplication processing, and after removing the header of the dual-channel downlink message, directly sends the IP message stored in the data field to the application client 605.
  • the application server may be a game server.
  • the interaction process between the dual-channel proxy server and the application server includes the following steps:
  • Step S1001 the dual-channel proxy server receives the dual-channel client (which can directly receive the data packet sent by the dual-channel client or indirectly received by the load balancing server) the uplink data packet sent by the dual channel.
  • step S1002 the dual-channel proxy server removes the received dual-channel header and internal communication header and deduplicates them, and then masquerades the address and port in the IP packet and sends it to the application server.
  • the dual-channel proxy server after receiving the uplink data packet sent by the dual-channel client, the dual-channel proxy server will include the real address information (including the intranet IP) of the dual-channel client included in the header of the uplink data packet. And intranet port) are recorded in the client information module, and a virtual local port is assigned to the dual-channel client through the virtual port pool module.
  • the VIP information module is updated according to the address of the application server to be accessed by the upstream data packet, and the VIP of the application server to be accessed is added to the module.
  • the dual-channel proxy server can identify the client IP message sent from the 4G and Wi-Fi channel according to the unique identifier of the client contained in the header of the upstream data packet, and perform deduplication deal with.
  • the dual-channel proxy server disguises the address and port information in the IP packet mainly by disguising the address information in the upstream IP packet after deduplication processing as the address information of the machine (including dual-channel The IP address of the proxy server and the virtual port assigned to the dual-channel client), and then recalculate the checksum field in the header of the ip, tcp, or udp message, and send it to the application server through the raw socket (RawSocket) thread.
  • Step 1003 the downstream thread of the dual-channel proxy server creates a rawSocket to receive the IP message, and then filters the IP message according to the source address (srcAddr) of the IP message through the IP information of the application server recorded in the VIP information module to obtain the need to send IP packets to the dual-channel client.
  • the link information is found from the client information module according to the destination port (dstPort) in the IP message, that is, the real address information of the dual-channel client is found.
  • the dual-channel client can send the channel information of the data packet to the dual-channel proxy server in real time to facilitate the proxy server to switch channels, which can ensure that when the 4G or Wi-Fi channel is abnormally switched,
  • the proxy server can update the channel information corresponding to the client at the first time.
  • Step S1004 the dual-channel proxy server adds the dual-channel downlink header and dual-channel back-end internal protocol header before applying the service downlink IP packet according to the latest Wi-Fi and 4G channel information sent by the dual-channel client.
  • the channel is sent to the dual channel client.
  • the dual-channel proxy server can send the processed data packets to the dual-channel client based on the udp protocol.
  • the dual-channel proxy server may also send the application service IP packet with the dual-channel header and dual-channel back-end internal header first to the dual-channel load balancing server. Then the dual-channel load balancing server removes the internal header of the dual-channel backend and sends it to the dual-channel client.
  • the dual-channel proxy server can periodically clear the channel information of the dual-channel client (which can be triggered by the timing task module shown in FIG. 6), such as there is no dual-channel client within the timeout period When the data passes through the dual-channel proxy server, the thread and channel information data of the dual-channel client is cleared.
  • the dual-channel proxy server can transparently forward the IP packets between the dual-channel client and the application server (the IP packets of the dual-channel client come from the application client), it can support the udp protocol and The multi-channel data transmission of the full-stack network protocol of the tcp protocol avoids that the tcp link that communicates with the application server cannot be established in time due to the poor network between the dual-channel client and the application server, which will invert the application client The establishment of the tcp link of the terminal communication fails, causing the tcp link to continuously reconnect, and the user experience will be relatively poor.
  • the clock synchronization between the dual-channel client and the dual-channel proxy server is as follows:
  • the dual-channel client requests the dual-channel proxy server's timestamp from the dual-channel proxy server (for example, 10 requests can be requested at intervals of 500 ms each), and records the return delay of each dual-channel proxy server. Average delay avgDelay between client and dual-channel proxy server;
  • the dual-channel client records the time stamp svrTime of the dual-channel proxy server returned by the last request to the dual-channel proxy server and the localStartTime of the dual-channel client time at this time;
  • the dual-channel proxy server determines the current stutter level of the Wi-Fi channel based on the delay of the upstream packet (the current time of the dual-channel proxy server-CStime) to formulate 4G Channel sending rules, for example, when the Wi-Fi channel has a good network status, the 4G channel may not send packets or not send packets in full to save users' downstream traffic.
  • the dual-channel proxy server can also receive the delay of the downlink packet fed back by the dual-channel client, and then determine the current lag level of the Wi-Fi channel to formulate a 4G channel packet sending rule.
  • the dual-channel client determines the current lag level of the Wi-Fi channel based on the delay of the downlink packet (the current time of the dual-channel client-Stime), and thereby formulates the 4G channel packet sending rules, such as the network status of the Wi-Fi channel When it is better, the 4G channel may not send packets or not send packets in full to save users' upstream traffic.
  • the dual-channel client can also receive the delay of the upstream packet fed back by the dual-channel proxy server, and then determine the current lag level of the Wi-Fi channel to formulate a 4G channel packet sending rule.
  • the dual channels may also be Wireless channel and wired channel
  • wireless channel can be Wi-Fi channel
  • wired channel can be connected to the network through OTG (On-The-Go) line to network cable; or as shown in Figure 13, dual channel can also be wireless channel and
  • the Bluetooth channel and the wireless channel may be Wi-Fi channels.
  • the Bluetooth channel is connected to the network through a Bluetooth network sharing device.
  • the Bluetooth network sharing device may be a dedicated sharing device, or may be a mobile phone Bluetooth network hotspot or a computer hotspot.
  • the dual channel can also be a wired channel and a Bluetooth channel, or a wired channel and a 4G channel, a Bluetooth channel and a 4G channel, and so on.
  • data transmission may also be achieved through three or more channels, where these data channels may include Wi-Fi channels, Bluetooth channels, wired channels, and mobile communication networks (such as 3G/4G /5G, etc.) data channels, etc.
  • data channels may include Wi-Fi channels, Bluetooth channels, wired channels, and mobile communication networks (such as 3G/4G /5G, etc.) data channels, etc.
  • the multi-channel data transmission solution of the embodiment of the present application is flexible, and most services can be accessed at zero cost without any changes and adaptations of the services, and can support all types of services and applications, such as game services.
  • a network failure occurs in one of the data channels, the user is completely unaware, and can effectively prevent more than 70% of the client's network stalls, especially when the Wi-Fi network is more complex, the effect is more significant.
  • it can prevent most Wi-Fi wireless interference situations, and perfectly solves the problems of tcp link and dual-channel acceleration.
  • FIG. 14 schematically shows a block diagram of a data transmission device according to an embodiment of the present application.
  • a data transmission device 1400 includes: a receiving unit 1402, a first processing unit 1404, a second processing unit 1406, and a sending unit 1408.
  • the receiving unit 1402 is used to receive the first data packet sent by the first device through multiple data channels; the first processing unit 1404 is used to parse the first data packet to obtain the address information of the first device, and according to the The data packet header of the first data packet performs aggregation processing on the first data packet to obtain a second data packet; the second processing unit 1406 is configured to replace the source address information of the second data packet with specified address information to obtain The third data packet; the sending unit 1408 is used to send the third data packet to a second device, where the second device is a device that the first device needs to access.
  • the data transmission device 1400 further includes: a first determining unit, configured to determine a fourth data packet that needs to be sent to the first device from the data packets sent by the second device;
  • the second processing unit 1406 is further used to replace the destination address information of the fourth data packet with the address information of the first device to obtain a fifth data packet;
  • the sending unit 1408 is also used to The fifth data packet is sent to the first device.
  • the data transmission device 1400 further includes: a first storage unit; wherein, the first processing unit 1404 is further configured to parse the first data packet to obtain an address that the first device needs to access Information, the second device is determined according to address information that the first device needs to access; the first storage unit is configured to store address information that the first device needs to access.
  • the first determining unit is configured to: determine the source address information of the data packet sent by the second device; according to the address information that the first device needs to access, from the second A data packet matching the source address information and the address information that the first device needs to access is filtered out of the data packets sent by the device, and the filtered data packet is used as the fourth data packet.
  • the data transmission apparatus 1400 further includes: an allocation unit for allocating a virtual port to the first device; and a second storage unit for allocating the address information of the first device to the The virtual port allocated by the first device is associated and stored, wherein the specified address information includes the virtual port allocated to the first device.
  • the second processing unit 1406 is further configured to: before replacing the destination address information of the fourth data packet with the address information of the first device, Obtain the stored address information of the first device by using the virtual port information included in the destination address information.
  • the receiving unit 1402 is further configured to receive and store data channel information sent by the first device to transmit the first data packet; the sending unit 1408 is configured to: according to the stored Send the fifth data packet to the first device with the latest data channel information.
  • the data transmission device 1400 further includes: a second determining unit, configured to determine that the first device is sending a data packet based on the reception of the first data packet sent by the first device The network status of the data channel used at the time; the sending unit 1408 is configured to select one or more data channels according to the network status of the data channel used by the first device when sending the data packet.
  • the fifth data packet is sent to the first device.
  • the second determining unit is configured to: according to the first moment when the data packet sent by the first device is received and the second time contained in the data packet sent by the first device Time, the delay of the data packet sent by the first device is calculated, wherein the second time is the time according to which the first device sends the data packet, and the clock between the proxy server and the first device The synchronization compensation value is determined; according to the delay of the data packet sent by the first device, the network status of the data channel used by the first device to send the data packet is determined.
  • the data transmission apparatus 1400 further includes: a third determining unit, configured to receive the feedback of the first data packet transmitted to the first device fed back by the first device to determine The network state of the data channel used by the first device when receiving the data packet; the sending unit 1408 is configured to: according to the quality of the network state of the data channel used by the first device when receiving the data packet, Select one or more data channels to send the fifth data packet to the first device.
  • a third determining unit configured to receive the feedback of the first data packet transmitted to the first device fed back by the first device to determine The network state of the data channel used by the first device when receiving the data packet
  • the sending unit 1408 is configured to: according to the quality of the network state of the data channel used by the first device when receiving the data packet, Select one or more data channels to send the fifth data packet to the first device.
  • the data transmission apparatus 1400 further includes: a fourth determining unit, configured to determine that the first device is sending a data packet based on the reception of the first data packet sent by the first device The network status of the data channel used at the time; the sending unit 1408 is further configured to send the network status of the data channel used by the first device when sending the data packet to the first device, so that the first A device selects the data channel used when sending the data packet again according to the network status.
  • a fourth determining unit configured to determine that the first device is sending a data packet based on the reception of the first data packet sent by the first device The network status of the data channel used at the time
  • the sending unit 1408 is further configured to send the network status of the data channel used by the first device when sending the data packet to the first device, so that the first A device selects the data channel used when sending the data packet again according to the network status.
  • the data transmission apparatus 1400 further includes: a third processing unit, configured to delete the storage after a predetermined length of time has elapsed when receiving the data packet sent by the first device to disconnect the TCP connection Information related to the first device; and/or during the establishment of a TCP connection with the first device, if the received first TCP data packet sent by the first device is not to establish a TCP connection Data packet, send a data packet to reset the connection to the first device; and/or set the maximum segment length of the data packet sent by the second device.
  • a third processing unit configured to delete the storage after a predetermined length of time has elapsed when receiving the data packet sent by the first device to disconnect the TCP connection Information related to the first device; and/or during the establishment of a TCP connection with the first device, if the received first TCP data packet sent by the first device is not to establish a TCP connection Data packet, send a data packet to reset the connection to the first device; and/or set the maximum segment length of the data packet sent by the second device.
  • FIG. 15 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
  • the computer system 1500 includes a central processing unit (Central Processing Unit, CPU) 1501, which can be loaded into a random portion from the storage section 1508 according to a program stored in a read-only memory (Read-Only Memory, ROM) 1502.
  • the program in the RAM (Access Random) 1503 is accessed to perform various appropriate actions and processes, for example, the method described in the above embodiment.
  • RAM 1503 various programs and data required for system operation are also stored.
  • the CPU 1501, ROM 1502, and RAM 1503 are connected to each other through a bus 1504.
  • An input/output (Input/Output, I/O) interface 1505 is also connected to the bus 1504.
  • the following components are connected to the I/O interface 1505: input section 1506 including keyboard, mouse, etc.; including output section 1507 such as cathode ray tube (Cathode Ray Tube, CRT), liquid crystal display (Liquid Crystal Display, LCD), etc. and speakers A storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN (Local Area Network) card, modem, etc.
  • the communication section 1509 performs communication processing via a network such as the Internet.
  • the driver 1510 is also connected to the I/O interface 1505 as needed.
  • a removable medium 1511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1510 as necessary, so that the computer program read out therefrom is installed into the storage portion 1508 as needed.
  • the process described below with reference to the flowchart may be implemented as a computer software program.
  • the embodiments of the present application include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication section 1509, and/or installed from the removable medium 1511.
  • CPU central processing unit
  • the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above.
  • Computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Erasable Programmable Read Only Memory (EPROM), flash memory, optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable of the above The combination.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in the baseband or as part of the carrier wave, in which the computer-readable program code is carried.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more for implementing a specified logical function Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may actually be executed in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and a combination of blocks in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a prescribed function or operation, or can be used It is realized by a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present application may be implemented in software or hardware, and the described units may also be provided in a processor. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the present application also provides a computer-readable medium, which may be included in the electronic device described in the foregoing embodiments; or may exist alone without being assembled into the electronic device in.
  • the computer-readable medium carries one or more programs. When the one or more programs are executed by one of the electronic devices, the electronic device causes the electronic device to implement the method described in the foregoing embodiments.
  • the example embodiments described here can be implemented by software, or can be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to enable a computing device (which may be a personal computer, server, touch terminal, or network device, etc.) to perform the method according to the embodiments of the present application.
  • a computing device which may be a personal computer, server, touch terminal, or network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请的实施例提供了一种数据传输方法、装置、计算机可读介质及电子设备。该数据传输方法由服务器执行,包括:接收第一设备通过多个数据通道发送的第一数据包;解析所述第一数据包得到所述第一设备的地址信息,并根据所述第一数据包的数据包头对所述第一数据包进行聚合处理,得到第二数据包;将所述第二数据包的源地址信息更换为指定地址信息,得到第三数据包;将所述第三数据包发送至第二设备,其中,所述第二设备为所述第一设备需要访问的设备。

Description

数据传输方法、装置、计算机可读介质及电子设备
本申请要求于2019年1月3日提交中国专利局、申请号为201910004540.X、名称为“数据传输方法、装置、计算机可读介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机及通信技术领域,具体而言,涉及一种数据传输方法、装置、计算机可读介质及电子设备。
背景
随着技术的发展,应用程序的通信过程越来越频繁,比如游戏客户端需要频繁与服务端进行通信,这类应用对网络环境的要求很高,低延迟、高稳定的特性成为这类应用的需求。
由于无线环境的复杂性及无线通信协议的特性,无线通信下不可避免会出现干扰、空口拥塞等原因造成网络抖动情况。Wi-Fi(Wireless Fidelity,无线保真)因频谱较宽更容易受到干扰,但因其网络拓扑层较少,所以延迟较低。移动通信网络(如3G/4G/5G)由于频谱较窄而不容易受到干扰,但数据传输需要经过运营商的接入层,进而会导致延迟较高,并且也会因运营商基站设备部署和容量造成高延迟和拥塞的问题。
技术内容
本申请实施例提供了一种数据传输方法,由服务器执行,包括:接收第一设备通过多个数据通道发送的第一数据包;解析所述第一数据包得到所述第一设备的地址信息,并根据所述第一数据包的数据包头对所述第一数据包进行聚合处理,得到第二数据包;将所述第二数据包的源地址信息更换为指定地址信息,得到第三数据包;将所述第三数据包发送至第二设备,其中,所述第二设备为所述第一设备需要访问的设备。
本申请实施例提供了一种数据传输装置,包括:接收单元,用于接收第一 设备通过多个数据通道发送的第一数据包;第一处理单元,用于解析所述第一数据包得到所述第一设备的地址信息,并根据所述第一数据包的数据包头对所述第一数据包进行聚合处理,得到第二数据包;第二处理单元,用于将所述第二数据包的源地址信息更换为指定地址信息,得到第三数据包;发送单元,用于将所述第三数据包发送至第二设备,其中,所述第二设备为所述第一设备需要访问的设备。
本申请实施例还提供了一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述实施例中所述的数据传输方法。
本申请实施例还提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上述实施例中所述的数据传输方法。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图;
图2示意性示出了根据本申请的一个实施例的数据传输方法的流程图;
图3示意性示出了根据本申请的一个实施例的数据传输方法的流程图;
图4示意性示出了根据本申请的一个实施例的从第二设备发送的数据包中确定出需要发送至第一设备的第四数据包的流程图;
图5示出了根据本申请的一个实施例的双通道通信系统的结构示意图;
图6示出了根据本申请的一个实施例的双通道通信系统的结构示意图;
图7示意性示出了根据本申请的一个实施例的双通道通信过程的流程图;
图8示出了根据本申请的一个实施例的双通道客户端对ip报文加装双通道包头的示意图;
图9示意性示出了根据本申请的一个实施例的双通道客户端对接收到的数据报文的处理流程图;
图10示意性示出了根据本申请的一个实施例的双通道代理服务器与应用服务器之间的交互流程图;
图11示意性示出了根据本申请的一个实施例的双通道代理服务器与双通道负载均衡服务器之间的交互流程图;
图12示出了根据本申请的一个实施例的无线局域网通道和有线通道组成的双通道系统示意图;
图13示出了根据本申请的一个实施例的无线局域网通道和蓝牙通道组成的双通道系统示意图;
图14示意性示出了根据本申请的一个实施例的数据传输装置的框图;
图15示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本申请的各方面。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有 的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图。
如图1所示,系统架构可以包括终端设备101、多通道代理服务器102和应用服务器103。多通道代理服务器102用以将终端设备101通过多个数据通道发送的数据进行聚合处理后发送至应用服务器103,并用于将应用服务器103发送的数据通过多个数据通道返回给终端设备101。
其中,所述终端设备101可以是智能手机、平板电脑以及便携式计算机中的一种或多种,也可以是台式计算机等等。
应该理解,图1中的终端设备101、多通道代理服务器102和应用服务器103的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备101、多通道代理服务器102和应用服务器103。其中,应用服务器103可以是游戏服务器,该游戏服务器可以是单个服务器,也可以是多个服务器组成的服务器集群等。
在本申请的一个实施例中,当终端设备101是智能手机(当然也可以是平板电脑或便携式计算机等)时,多通道代理服务器102在接收到智能手机发送的链接数据后,可以向智能手机分配一个虚拟端口,然后将该虚拟端口与智能手机的真实地址信息进行关联存储,同时记录智能手机访问的应用服务器的VIP(Virtual IP Address,虚拟IP地址)。当多通道代理服务器102接收到智能手机通过多个数据通道发送的应用业务数据包后进行聚合处理(比如去重处理),然后将去重处理后的应用业务数据包的源地址信息更换为多通道代理服务器102的地址信息(包括前述的虚拟端口),进而发送至应用服务器103。其中,上述多个数据通道可以包括无线局域网通道比如Wi-Fi通道和移动通信通道比如4G通道。
当多通道代理服务器102接收到应用服务器103发送的数据包之后,根据该数据包的源地址信息和之前记录的VIP信息,过滤出需要发送至智能手机的数据包,然后根据记录的虚拟端口及智能手机的真实地址信息,将过滤出的数据包的目的地址信息修改为智能手机的真实地址信息,进而可以通过多个数据通道发送至智能手机。
可见,本申请实施例的技术方案能够通过多个数据通道共同传输数据包来保证数据包的传输稳定性,有效解决了数据传输过程中的高丢包率及高延迟的问 题,并且能够实现全栈的多通道数据传输过程,满足了多种通信场景下的业务需求。
以下基于图1所示的系统架构,对本申请实施例的技术方案的实现细节进行详细阐述:
图2示意性示出了根据本申请的一个实施例的数据传输方法的流程图,该数据传输方法可以由服务器来执行,该服务器可以一个代理服务器,例如可以是图1中所示的多通道代理服务器102。参照图2所示,该数据传输方法至少包括步骤S210至步骤S240,详细介绍如下:
在步骤S210中,接收第一设备通过多个数据通道发送的第一数据包。
在本申请的一个实施例中,多个数据通道可以包括如下数据通道中的两个或两个以上:Wi-Fi通道、蓝牙通道、有线通道、移动通信网络(如3G/4G/5G等)的数据通道等。
在本申请的一个实施例中,第一设备通过多个数据通道发送的数据包可以是完全相同的;也可以由一个数据通道发送全量数据包,其它数据通道发送非全量数据包(比如每5个数据包仅发送2个等);还可以由多个数据通道分别发送非全量数据包,以便于接收方进行聚合处理得到完整的数据包。
在本申请的一个实施例中,第一设备发送的第一数据包可以是TCP(Transmission Control Protocol,传输控制协议)数据包,也可以是UDP(User Datagram Protocol,用户数据报协议)数据包,或者也可以是IP数据包。
在本申请的一个实施例中,多通道代理服务器在与第一设备建立TCP连接的过程中,若接收到的第一设备发送的第一个TCP数据报文不是建立TCP连接的数据报文(如syn报文),则向第一设备发送重置连接的数据报文(如rst报文),以确保第一设备能够尽快重建与多通道代理服务器之间的连接。
在本申请的一个实施例中,多通道代理服务器在接收到第一设备发送的断开TCP连接的数据报文(如fin报文),则在经过预定时长后可以删除存储的与第一设备相关的信息(比如第一设备的地址信息、向第一设备分配的虚拟端口的信息、第一设备需要访问的地址信息等)。
在步骤S220中,解析所述第一数据包得到所述第一设备的地址信息,并根据所述第一数据包的数据包头对所述第一数据包进行聚合处理,得到第二数据包。
在本申请的一个实施例中,第一设备的地址信息可以包括第一设备的内网IP(Internet Protocol,互联网协议)地址和内网端口信息等。
在本申请的一个实施例中,根据第一数据包的数据包头对第一数据包进行聚合处理可以是对第一设备通过多个数据通道发送的数据包进行去重处理和/或整合处理,以得到全量且不重复的数据包。比如,可以根据第一数据包的数据包头中的包序号来进行去重处理(如删除包序号重复的数据包)和/或整合处理(如将不同包序号的数据包进行整合)。
在步骤S230中,将所述第二数据包的源地址信息更换为指定地址信息,得到第三数据包。
在本申请的一个实施例中,指定地址信息可以包括多通道代理服务器的IP地址,以及多通道代理服务器向第一设备分配的虚拟端口信息。其中,多通道代理服务器在向第一设备分配虚拟端口信息之后,可以将该虚拟端口信息与第一设备的真实地址信息进行关联存储,进而在接收到其它设备发送的数据包时,可以根据该数据包中包含的虚拟端口信息来确定该数据包是否是发送至第一设备的数据包。
在步骤S240中,将所述第三数据包发送至第二设备。
在本申请的一个实施例中,第二设备可以是第一设备需要访问的设备,比如可以是应用服务器等。
在本申请的一个实施例中,可以解析第一设备发送的第一数据包得到第一设备需要访问的地址信息,然后根据第一设备需要访问的地址信息来确定第二设备。当第二设备为应用服务器的情况下,第一设备需要访问的地址信息可以是应用服务器的VIP,其中,应用服务器的一个VIP对应于一个第一设备。
在本申请的一个实施例中,多通道代理服务器还可以设置第二设备发送的数据报文的最大报文段长度。比如通过设置TCP报文协议的mss字段来设置最大报文段长度。
图2所示实施例的技术方案使得能够通过多个数据通道共同传输数据包来保证数据包的传输稳定性,有效解决了数据传输过程中的高丢包率及高延迟的问题,同时聚合处理也能够保证第二设备无需重复接收相同的数据,实现了第二设备无感知的多数据通道传输过程。此外,由于将第二数据包的源地址信息更换为 指定地址信息(如代理服务器的地址信息)后发送至第二设备,因此无论第一设备与多通道代理服务器之间采用哪种通信方式,都可以进行多数据通道的传输,实现了全栈的多通道数据传输过程,满足了多种通信场景下的业务需求。
基于图2所示实施例的技术方案,图3示意性示出了根据本申请的一个实施例的数据传输方法的流程图,该数据传输方法可以由服务器来执行,该服务器可以是图1中所示的多通道代理服务器102。参照图3所示,该数据传输方法至少包括步骤S310至步骤S330,详细介绍如下:
在步骤S310中,从所述第二设备发送的数据包中确定出需要发送至所述第一设备的第四数据包。
在本申请的一个实施例中,第四数据包可以是IP数据包,即第二设备可以直接将IP数据包发送给多通道代理服务器,进而可以无缝支持全栈网络的多通道传输。
在本申请的一个实施例中,多通道代理服务器在接收到第一设备发送的第一数据包之后,可以解析该第一数据包得到第一设备需要访问的地址信息,然后存储该地址信息。当接收到第二设备发送的数据包之后,可以基于已存储的第一设备需要访问的地址信息来确定需要发送至第一设备的第四数据包。
图4为本申请实施例中从第二设备发送的数据包中确定出需要发送至第一设备的第四数据包的流程图。如图4所示,具体包括如下步骤:
步骤S410,确定所述第二设备发送的数据包的源地址信息。
在本申请的一个实施例中,可以通过解析第二设备发送的数据包来获取该数据包的源地址信息。当第二设备为应用服务器的情况下,第二设备发送的数据包的源地址信息可以是应用服务器的虚拟地址信息。
步骤S420,根据所述第一设备需要访问的地址信息,从所述第二设备发送的数据包中过滤出所述源地址信息与所述第一设备需要访问的地址信息相匹配的数据包,将过滤出的数据包作为所述第四数据包。
在本申请的一个实施例中,第二设备发送的数据包并非都是要发送至第一设备的,但是要发送给第一设备的数据包的源地址信息与第一设备发送的数据包中的目的地址信息是相同的,因此可以从第二设备发送的数据包中过滤出源地址信息与第一设备需要访问的地址信息相匹配的数据包,并以此作为需要发送至第 一设备的第四数据包。
继续参照图3所示,在步骤S320中,将所述第四数据包的目的地址信息更换为所述第一设备的地址信息,得到第五数据包。
在本申请的一个实施例中,多通道代理服务器事先可以向第一设备分配虚拟端口,然后将向第一设备分配的虚拟端口与第一设备的地址信息进行关联存储。而第四数据包的目的地址信息包括了多通道代理服务器的IP地址和多通道代理服务器向第一设备分配的虚拟端口信息,因此可以据此虚拟端口信息从已存储的虚拟端口与地址信息的关联关系中查询出第一设备的地址信息,然后将第四数据包的目的地址信息更换为第一设备的地址信息。其中,第一设备的地址信息可以包括第一设备的内网地址和内网端口。
在步骤S330中,将所述第五数据包发送至所述第一设备。
在本申请的一个实施例中,可以将第五数据包通过多个数据通道发送至第一设备,以确保数据包的传输稳定性,进而解决数据传输过程中的高丢包率及高延迟的问题。第一设备在接收到通过多个数据通道传输的数据包之后,也可以进行聚合处理,该聚合处理可以是对第一设备通过多个数据通道接收到的数据包进行去重处理和/或整合处理,以得到全量且不重复的数据包。
在本申请的一个实施例中,第一设备还可以用于传输第一数据包的数据通道信息发送至多通道代理服务器,具体的发送方式可以是实时发送、周期性发送、在发生变化时进行发送等等,多通道代理服务器在接收到该数据通道信息之后,可以进行存储,进而多通道代理服务器在将第五数据包发送至第一设备时可以根据存储的最新的数据通道信息来将第五数据包发送至第一设备,确保多通道代理服务器能够知晓且能够采用最新的数据通道信息来向第一设备发送数据包。
在本申请的一个实施例中,多通道代理服务器还可以基于对第一设备发送的第一数据包的接收情况或者其他数据包的接收情况,确定第一设备在发送数据包时所采用的数据通道的网络状态,比如延迟情况、拥塞情况等,进而多通道代理服务器在将第五数据包发送至第一设备时,可以根据第一设备在发送数据包时所采用的数据通道的网络状态的优劣,选择一个或多个数据通道将第五数据包发送至第一设备。比如,当某个数据通道的网络状态较好时,可以仅通过该网络状态较好的数据通道来传输第五数据包,进而可以减少对数据通道的占用及流量的 消耗;当多个数据通道的网络状态都较差时,可以通过多个数据通道来传输第五数据包,进而可以保证数据包的传输稳定性,避免数据传输过程中出现高丢包率及高延迟的问题。
在本申请的一个实施例中,确定第一设备在发送数据包时所采用的数据通道的网络状态可以是根据接收到第一设备发送的数据包的第一时刻和第一设备发送的数据包中所包含的第二时刻,计算第一设备发送的数据包的延迟,然后根据第一设备发送的数据包的延迟,确定第一设备发送数据包所采用的数据通道的网络状态。其中,若第一设备发送的数据包的延迟越大,则说明第一设备发送数据包所采用的数据通道的网络状态越差;若第一设备发送的数据包的延迟越小,则说明第一设备发送数据包所采用的数据通道的网络状态越好。
在本申请的一个实施例中,上述的第二时刻为根据第一设备发送数据包的时刻,以及代理服务器与第一设备之间的时钟同步补偿值确定的。具体地,第一设备可以每隔一段时间向多通道代理服务器请求多通道代理服务器的时间戳,并记录多通道代理服务器每次的返回延迟,通过平均求得第一设备与多通道代理服务器之间的平均延迟avgDelay;然后第一设备根据记录的最后一次请求服务器返回的多通道代理服务器时间戳svrTime和此时的第一设备的时间localStartTime,计算此时的多通道代理服务器时间svrStartTime=svrTime+avgDelay/2,进而将svrStartTime–localStartTime作为多通道代理服务器与第一设备之间的时钟同步补偿值,假设第一设备发送数据包的时刻为curTime,那么上述的第二时刻即为CStime=curTime+svrStartTime-localStartTime。
在本申请的一个实施例中,多通道代理服务器还可以接收第一设备反馈的对传输至第一设备的第一数据包的接收情况,以确定第一设备在接收数据包时所采用的数据通道的网络状态,比如延迟情况、拥塞情况等,进而多通道代理服务器在将第五数据包发送至第一设备时,可以根据第一设备在接收数据包时所采用的数据通道的网络状态的优劣,选择一个或多个数据通道将第五数据包发送至第一设备。比如,当某个数据通道的网络状态较好时,可以仅通过该网络状态较好的数据通道来传输第五数据包,进而可以减少对数据通道的占用及流量的消耗;当多个数据通道的网络状态都较差时,可以通过多个数据通道来传输第五数据包,进而可以保证数据包的传输稳定性,避免数据传输过程中出现高丢包率及高延迟 的问题。
在本申请的一个实施例中,多通道代理服务器还可以基于对第一设备发送的第一数据包的接收情况或其他数据包的接收情况,确定第一设备在发送数据包时所采用的数据通道的网络状态,然后将第一设备在发送数据包时所采用的数据通道的网络状态发送至第一设备,以使第一设备根据该网络状态在再次发送数据包时选择所采用的数据通道。比如,当某个数据通道的网络状态较好时,第一设备在再次发送数据包时可以仅通过该网络状态较好的数据通道来向多通道代理服务器发送数据包,进而可以减少对数据通道的占用及流量的消耗;当多个数据通道的网络状态都较差时,第一设备在再次发送数据包时可以通过多个数据通道来向多通道代理服务器发送数据包,进而可以保证数据包的传输稳定性,避免数据传输过程中出现高丢包率及高延迟的问题。
在本申请的一个实施例中,第一设备还可以基于对多通道代理服务器发送的第一数据包的接收情况,确定第一设备在接收数据包时所采用的数据通道的网络状态,然后根据该网络状态在发送数据包时选择所采用的数据通道。比如,当某个数据通道的网络状态较好时,第一设备可以仅通过该网络状态较好的数据通道来向代理服务器发送数据包,进而可以减少对数据通道的占用及流量的消耗;当多个数据通道的网络状态都较差时,第一设备可以通过多个数据通道来向代理服务器发送数据包,进而可以保证数据包的传输稳定性,避免数据传输过程中出现高丢包率及高延迟的问题。
以下以第一设备为双通道客户端、代理服务器为双通道代理服务器(即以下以通过两个数据通道来传输数据为例进行说明)、第二设备为应用服务器为例,对本申请实施例的技术方案的实现细节进行详细阐述:
在本申请的一个实施例中,如图5所示,根据本申请的一个实施例的双通道通信系统,主要包括:用户终端51、双通道负载均衡服务器502、双通道代理服务器503和应用服务器504。其中,用户终端51中设置有应用客户端505、网卡506和双通道客户端501,双通道客户端501通过网卡与应用客户端505进行通信。
在本申请的一个实施例中,应用客户端505与双通道客户端501之间可以发送tcp报文和udp报文。当双通道客户端501接收到应用客户端505发送的udp报文之后,可以通过双通道(如Wi-Fi通道和4G通道)发送至双通道负载均衡服务器502, 然后由双通道负载均衡服务器502转发至双通道代理服务器503,双通道代理服务器503对接收到的udp报文进行去重后转发至应用服务器504。
在本申请的一个实施例中,当双通道代理服务器503接收到应用服务器504发送的udp报文之后,可以将该udp报文通过双通道(如Wi-Fi通道和4G通道)发送至双通道负载均衡服务器502,然后由双通道负载均衡服务器502转发至双通道客户端501,双通道客户端501对接收到的udp报文进行去重后通过网卡转发至应用客户端505。
在本申请的一个实施例中,双通道客户端501从网卡506截获到tcp的syn报文(syn报文表示建立连接的报文)后,双通道客户端501依据目地地址信息,立即与应用服务器504建立tcp链接。当tcp链接建立后,双通道客户端501通过网卡506向应用客户端505发送tcp的ack+syn报文(ack+syn报文表示确认建立连接的报文),继续后续tcp链接建立流程。在双通道客户端501与游戏客户端505建立完tcp虚拟链接后,桥接fd1(与应用客户端505通信)和fd2(与应用服务器504通信),然后转发应用客户端505发送给应用服务器504的上行tcp报文,并转发应用服务器504发送给应用客户端505的下行tcp报文。
基于前述问题,在本申请的一个实施例中,如图6所示,根据本申请的一个实施例的双通道通信系统,主要包括:用户终端61、双通道负载均衡服务器602(双通道负载均衡服务器602a和双通道负载均衡服务器602b)、双通道代理服务器603和应用服务器604。其中,用户终端61中设置有应用客户端605、网卡606和双通道客户端601。需要说明的是,图6中所示的双通道负载均衡服务器602的数量仅为示例,在本申请的其它实施例中,可以设置任意数量的双通道负载均衡服务器,也可以不设置双通道负载均衡服务器。
在本申请的一个实施例中,双通道代理服务器603在收到某个双通道客户端601发送的tcp链接的fin包时,将此双通道客户端601的tcp链接状态标记fin状态,并在finOutTime(默认10秒)后,将该tcp链接信息从客户端信息模块6031中删除,finOutTime超时时间是用于保证tcp链接的4次挥手可以正常结束。
在本申请的一个实施例中,双通道代理服务器603在新建某个双通道客户端的tcp链接时,会判定该tcp链接的第一个tcp报文是否是三次握手的syn报文,如是则建立tcp链接信息并存储在客户端信息模块6031;如不是,则向该双通道客户端 回复rst报文,中断该非法tcp链接,以保证双通道客户端可以快速的重建该tcp链接。
在本申请的一个实施例中,双通道客户端601在接收到应用客户端605发送的tcp链接的syn报文时,可以设置tcp报文协议的mss字段值,以保证应用服务器604发送的数据包都在可控长度范围内(tcp报文长度取mss值和发送窗口值的最小值),防止数据包过大引起缓冲溢出和影响传输效率问题。
在本申请的一个实施例中,双通道代理服务器603在接收到应用服务器604回复的tcp链接的syn+ack报文时,会设置tcp报文协议的mss字段,以保证应用客户端发送的数据包都在可控长度范围内,防止数据包过大引起缓冲溢出和影响传输效率问题。
在本申请的一个实施例中,双通道代理服务器603可以分别关闭网卡优化的以下几个选项:GRO(Generic Receive Offloading,通用接收)、TSO(TCP Segmentation Offload,TCP分段)、GSO(Generic Segmentation Offload,通用分段)、LRO(Large Receive Offload,大型接收),以保证tcp链接的mss值设置生效。
如图6和图7所示,当双通道客户端601启动后,创建虚拟网卡607(该虚拟网卡通过手机中的实体网卡与应用客户端通信),并建立两个线程(即上行线程和下行线程),同时可以建立两个udp的socket链接并绑定至无线通道例如Wi-Fi通道和第四代移动通信(简称4G)通道。
在本申请的一个实施例中,双通道客户端601依据对应的应用业务配置请求云端控制服务器,下发应用服务器604的IP地址。根据此IP地址设定iptables过滤策略,并通过网卡606截获应用客户端605发出的IP报文并转发至虚拟网卡607。
在本申请的一个实施例中,如图8所示,双通道客户端601从虚拟网卡607收到应用客户端605发送的ip报文之后,可以加装双通道包头,形成“双通道包头+应用业务IP报文”格式的双通道上行报文,然后可以基于udp协议并通过无线局域网通道例如Wi-Fi和移动通信通道例如4G通道这两个通道进行发送。
在本申请的一个实施例中,如图6所示,双通道客户端601在通过双通道发送时,可以先发送至双通道负载均衡服务器602,然后由双通道负载均衡服务器602转发至双通道代理服务器603的上行线程,进而由双通道代理服务器603进行去重处理之后转发至应用服务器604。
在本申请的一个实施例中,如图7所示,双通道客户端601在通过双通道发送时,也可以直接发送至双通道代理服务器603,然后由双通道代理服务器603进行去重处理之后转发至应用服务器604。
在本申请的一个实施例中,当应用业务为游戏业务时,双通道客户端601发送的双通道上行报文的协议字段可以如下所示:
typedef struct MutiTunnelUPHead{
uint32_t m_bussId;//游戏标识
uint8_t ver;//填入主通道标识
uint8_t type;//类型,当前上行包的通道号或包类型
uint32_t seqno;//包序号
uint32_t devKey;//手机设备唯一标识
uint8_t mutisetID;//主通道的运营商ID
}MutiTunnelUPHead;//全栈版本协议代码
在本申请的一个实施例中,如图9所示,双通道客户端601在接收到通过双通道发送的“双通道包头+应用业务IP报文”格式的双通道下行报文之后,通过去重逻辑对接收到的双通道下行报文进行去重处理,并去除双通道下行报文的包头后,直接将data(数据)字段存放的IP报文中并发送至虚拟网卡607,以便于虚拟网卡607将该应用业务IP报文通过网卡606发送至应用客户端605,该应用业务IP报文可以是游戏IP报文。
在本申请的一个实施例中,双通道客户端601接收到的双通道下行报文的协议字段可以如下所示:
typedef struct{
uint32_t seqno;//包序号
uint32_t devkey;//客户端唯一标识
char data[0];//包内容
}MutiTunnelDownHead
在本申请的一个实施例中,如图6所示,双通道客户端601接收到的双通道下行报文可以是由应用服务器604将应用业务IP报文发送至双通道代理服务器603的下行线程,然后由双通道代理服务器603加装双通道包头之后生成的。当双 通道代理服务器603生成双通道下行报文之后,将其发送至双通道负载均衡服务器602,然后由双通道负载均衡服务器602转发至双通道客户端601。
在本申请的一个实施例中,如图7所示,当双通道代理服务器603生成双通道下行报文之后,可以直接发送给双通道客户端601。然后由双通道客户端601进行去重处理,并脱去双通道下行报文的包头后,直接将data(数据)字段存放的IP报文中并发送至应用客户端605。
以下结合图10对本申请实施例中的双通道代理服务器和应用服务器之间的交互流程进行详细说明,该应用服务器可以是游戏服务器。
如图10所示,根据本申请的一个实施例的双通道代理服务器与应用服务器之间的交互流程,包括如下步骤:
步骤S1001,双通道代理服务器接收到双通道客户端(可以直接接收双通道客户端发送的数据包或者通过负载均衡服务器来间接接收)通过双通道发送的上行数据包。
步骤S1002,双通道代理服务器去除接收到的双通道包头和内部通信包头并去重,然后伪装IP报文中的地址和端口后发送至应用服务器。
在本申请的一个实施例中,双通道代理服务器在接收到双通道客户端发送的上行数据包后,会将该上行数据包的包头内包含的双通道客户端的真实地址信息(包括内网IP和内网端口)记录在客户端信息模块,并通过虚拟端口池模块为该双通道客户端分配一个虚拟的本地端口。同时,根据该上行数据包需要访问的应用服务器地址更新VIP信息模块,将其所要访问的应用服务器的VIP添加进该模块。
在本申请的一个实施例中,双通道代理服务器可以依据上行数据包的包头中所包含的客户端唯一标识,识别从4G和Wi-Fi通道发送来的客户端IP报文,并进行去重处理。
在本申请的一个实施例中,双通道代理服务器伪装IP报文中的地址和端口信息主要是将去重处理后的上行IP报文中的地址信息伪装为本机的地址信息(包括双通道代理服务器的IP地址和向双通道客户端分配的虚拟端口),然后重新计算ip、tcp或udp报文头部的checksum字段,并通过原始套接字(RawSocket)线程发送至应用服务器。
步骤1003,双通道代理服务器的下行线程创建rawSocket接收IP报文,然后通过VIP信息模块中记录的应用服务器的IP信息,依据IP报文的源地址(srcAddr)过滤IP报文,以得到需要发送至双通道客户端的IP报文。同时,依据IP报文中的目的端口(dstPort)从客户端信息模块找到该链接的信息,即找到双通道客户端的真实地址信息。然后将该双通道客户端的内网IP和内网端口伪装至应用业务下行IP报文中,并重新计算ip、tcp、或udp报文头部的checksum字段。
在本申请的一个实施例中,双通道客户端可以实时向双通道代理服务器发送数据包所在的通道信息,以方便代理服务器进行通道切换,即可保证在4G或者Wi-Fi通道异常切换时,代理服务器可以在第一时间更新客户端对应的通道信息。双通道客户端发送的通道信息可以维护在双通道协议头的ver和type字段。比如ver=1表示主通道,ver=0表示副通道;type=1表示4G通信,type=0表示Wi-Fi通信。
步骤S1004,双通道代理服务器依据双通道客户端发送的最新的Wi-Fi和4G通道的信息,在应用业务下行IP报文前加装双通道下行包头和双通道后端内部协议包头后在双通道中发送给双通道客户端。双通道代理服务器可以基于udp协议将处理后的数据报文发送至双通道客户端。
在本申请的一个实施例中,如图11所示,双通道代理服务器也可以将加装双通道包头和双通道后端内部包头后的应用业务IP报文先发送给双通道负载均衡服务器,然后由双通道负载均衡服务器去除双通道后端内部包头后发送至双通道客户端。
在本申请的一个实施例中,双通道代理服务器可以定时进行双通道客户端的通道信息的清理(可以通过图6中所示的定时任务模块来触发),如在超时时间内没有双通道客户端数据从双通道代理服务器经过,则将此双通道客户端的线程和通道信息数据进行清除。
在本申请的实施例中,由于双通道代理服务器可以透明转发双通道客户端与应用服务器之间的IP报文(双通道客户端的IP报文来自于应用客户端),因此可以支持udp协议和tcp协议的全栈网络协议的多通道数据传输,避免了由于双通道客户端与应用服务器之间的网络比较差,所造成的与应用服务器通信的tcp链接不能及时建立,进而会倒置与应用客户端通信的tcp链接建立失效,造成tcp链接不断重连,用户体验会比较差的问题。
在本申请的一个实施例中,双通道传输过程中还可以通过判断数据通道的网络状态来实现智能省流量的传输,具体过程如下:
1、双通道客户端和双通道代理服务器进行时钟同步,具体过程如下:
1)双通道客户端向双通道代理服务器请求双通道代理服务器的时间戳(比如可以请求10次,每次间隔500ms),并记录每次双通道代理服务器的返回延迟,通过平均求得双通道客户端和双通道代理服务器的平均延迟avgDelay;
2)双通道客户端记录最后一次请求双通道代理服务器返回的双通道代理服务器时间戳svrTime和此时的双通道客户端时间localStartTime;
3)双通道客户端计算此时的服务器时间svrStartTime=svrTime+avgDelay/2;
4)双通道客户端发送的每个数据包都带上当前的服务器时间即CStime=curTime-localStartTime+svrStartTime;同时,双通道代理服务器发送的每个下行包都带上双通道代理服务器的当前时间戳Stime。
2、假设通过Wi-Fi和4G通道来传输数据,双通道代理服务器依据上行包的延迟(双通道代理服务器的当前时间-CStime),判断当前Wi-Fi通道的卡顿级别,以此制定4G通道发包规则,比如在Wi-Fi通道的网络状态较好时,4G通道可以不发包或者非全量发包,以节省用户的下行流量。
在本申请的一个实施例中,双通道代理服务器也可以接收双通道客户端反馈的下行包的延迟,然后判断当前Wi-Fi通道的卡顿级别,以此制定4G通道发包规则。
3、双通道客户端依据下行包的延迟(双通道客户端的当前时间-Stime),判断当前Wi-Fi通道的卡顿级别,以此制定4G通道发包规则,比如在Wi-Fi通道的网络状态较好时,4G通道可以不发包或者非全量发包,以节省用户的上行流量。
在本申请的一个实施例中,双通道客户端也可以接收双通道代理服务器反馈的上行包的延迟,然后判断当前Wi-Fi通道的卡顿级别,以此制定4G通道发包规则。
本申请上述实施例的技术方案以Wi-Fi通道和4G通道为例对双通道的数据传输方案进行了详细阐述,在本申请的其他实施例中,如图12所示,双通道还可以是无线通道和有线通道,无线通道可以是Wi-Fi通道,有线通道可以是通过OTG(On-The-Go)线转网线接入网络;或者如图13所示,双通道还可以是无线通道 和蓝牙通道,无线通道可以是Wi-Fi通道,蓝牙通道通过蓝牙网络分享设备接入网络。其中,蓝牙网络分享设备可以是专用的分享设备,也可以是一个手机蓝牙网络热点或者电脑热点。当然,双通道还可以是有线通道和蓝牙通道、或者有线通道和4G通道、蓝牙通道和4G通道等。
此外,在本申请的其它实施例中,也可以通过三通道或更多通道来实现数据传输,其中这些数据通道可以包括Wi-Fi通道、蓝牙通道、有线通道、移动通信网络(如3G/4G/5G等)的数据通道等。
本申请实施例的多通道数据传输方案实现灵活,大多数业务可零成本接入,无须业务做任何变动和适配,并且可以支持所有类型的业务和应用,例如游戏业务。同时,在其中某个数据通道出现网络故障时,用户完全无感知,且可以有效预防70%以上的客户端网络卡顿情况,尤其在Wi-Fi网络较为复杂情况下,效果较为显著。且在赛事网络下,可预防大多数Wi-Fi无线干扰情况,完美解决了tcp链接和双通道加速的问题。
以下介绍本申请的装置实施例,可以用于执行本申请上述实施例中的数据传输方法。对于本申请装置实施例中未披露的细节,请参照本申请上述的数据传输方法的实施例。
图14示意性示出了根据本申请的一个实施例的数据传输装置的框图。
参照图14所示,根据本申请的一个实施例的数据传输装置1400,包括:接收单元1402、第一处理单元1404、第二处理单元1406和发送单元1408。
其中,接收单元1402用于接收第一设备通过多个数据通道发送的第一数据包;第一处理单元1404用于解析所述第一数据包得到所述第一设备的地址信息,并根据所述第一数据包的数据包头对所述第一数据包进行聚合处理,得到第二数据包;第二处理单元1406用于将所述第二数据包的源地址信息更换为指定地址信息,得到第三数据包;发送单元1408用于将所述第三数据包发送至第二设备,其中,所述第二设备为所述第一设备需要访问的设备。
在本申请的一个实施例中,数据传输装置1400还包括:第一确定单元,用于从所述第二设备发送的数据包中确定出需要发送至所述第一设备的第四数据包;所述第二处理单元1406还用于,将所述第四数据包的目的地址信息更换为所述第一设备的地址信息,得到第五数据包;所述发送单元1408还用于,将所述第 五数据包发送至所述第一设备。
在本申请的一个实施例中,数据传输装置1400还包括:第一存储单元;其中,所述第一处理单元1404还用于解析所述第一数据包得到所述第一设备需要访问的地址信息,根据所述第一设备需要访问的地址信息确定所述第二设备;所述第一存储单元配置为存储所述第一设备需要访问的地址信息。
在本申请的一个实施例中,所述第一确定单元配置为:确定所述第二设备发送的数据包的源地址信息;根据所述第一设备需要访问的地址信息,从所述第二设备发送的数据包中过滤出所述源地址信息与所述第一设备需要访问的地址信息相匹配的数据包,将过滤出的数据包作为所述第四数据包。
在本申请的一个实施例中,数据传输装置1400还包括:分配单元,用于向所述第一设备分配虚拟端口;第二存储单元,用于将所述第一设备的地址信息与向所述第一设备分配的虚拟端口进行关联存储,其中,所述指定地址信息包括向所述第一设备分配的虚拟端口。
在本申请的一个实施例中,第二处理单元1406还用于,在将所述第四数据包的目的地址信息更换为所述第一设备的地址信息之前,根据所述第四数据包的目的地址信息中所包含的虚拟端口的信息,获取已存储的所述第一设备的地址信息。
在本申请的一个实施例中,接收单元1402还用于接收并存储所述第一设备发送的用于传输所述第一数据包的数据通道信息;所述发送单元1408配置为:根据存储的最新的数据通道信息,将所述第五数据包发送至所述第一设备。
在本申请的一个实施例中,数据传输装置1400还包括:第二确定单元,用于基于对所述第一设备发送的第一数据包的接收情况,确定所述第一设备在发送数据包时所采用的数据通道的网络状态;所述发送单元1408配置为:根据所述第一设备在发送数据包时所采用的数据通道的网络状态的优劣,选择一个或多个数据通道将所述第五数据包发送至所述第一设备。
在本申请的一个实施例中,所述第二确定单元配置为:根据接收到所述第一设备发送的数据包的第一时刻和所述第一设备发送的数据包中所包含的第二时刻,计算所述第一设备发送的数据包的延迟,其中,所述第二时刻为根据所述第一设备发送数据包的时刻,以及所述代理服务器与所述第一设备之间的时钟同 步补偿值确定的;根据所述第一设备发送的数据包的延迟,确定所述第一设备发送数据包所采用的数据通道的网络状态。
在本申请的一个实施例中,数据传输装置1400还包括:第三确定单元,用于接收所述第一设备反馈的对传输至所述第一设备的第一数据包的接收情况,以确定所述第一设备在接收数据包时所采用的数据通道的网络状态;所述发送单元1408配置为:根据所述第一设备在接收数据包时所采用的数据通道的网络状态的优劣,选择一个或多个数据通道将所述第五数据包发送至所述第一设备。
在本申请的一个实施例中,数据传输装置1400还包括:第四确定单元,用于基于对所述第一设备发送的第一数据包的接收情况,确定所述第一设备在发送数据包时所采用的数据通道的网络状态;所述发送单元1408还用于将所述第一设备在发送数据包时所采用的数据通道的网络状态发送至所述第一设备,以使所述第一设备根据所述网络状态在再次发送数据包时选择所采用的数据通道。
在本申请的一个实施例中,数据传输装置1400还包括:第三处理单元,用于在接收到所述第一设备发送的断开TCP连接的数据报文时,在经过预定时长后删除存储的与所述第一设备相关的信息;和/或在与所述第一设备建立TCP连接的过程中,若接收到的所述第一设备发送的第一个TCP数据报文不是建立TCP连接的数据报文,则向所述第一设备发送重置连接的数据报文;和/或设置所述第二设备发送的数据报文的最大报文段长度。
图15示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
需要说明的是,图15示出的电子设备的计算机系统1500仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图15所示,计算机系统1500包括中央处理单元(Central Processing Unit,CPU)1501,其可以根据存储在只读存储器(Read-Only Memory,ROM)1502中的程序或者从存储部分1508加载到随机访问存储器(Random Access Memory,RAM)1503中的程序而执行各种适当的动作和处理,例如执行上述实施例中所述的方法。在RAM 1503中,还存储有系统操作所需的各种程序和数据。CPU 1501、ROM 1502以及RAM 1503通过总线1504彼此相连。输入/输出(Input/Output,I/O)接口1505也连接至总线1504。
以下部件连接至I/O接口1505:包括键盘、鼠标等的输入部分1506;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分1507;包括硬盘等的存储部分1508;以及包括诸如LAN(Local Area Network,局域网)卡、调制解调器等的网络接口卡的通信部分1509。通信部分1509经由诸如因特网的网络执行通信处理。驱动器1510也根据需要连接至I/O接口1505。可拆卸介质1511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1510上,以便于从其上读出的计算机程序根据需要被安装入存储部分1508。
特别地,根据本申请的实施例,下文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1509从网络上被下载和安装,和/或从可拆卸介质1511被安装。在该计算机程序被中央处理单元(CPU)1501执行时,执行本申请的系统中限定的各种功能。
需要说明的是,本申请实施例所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、 装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现上述实施例中所述的方法。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件 产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本申请实施方式的方法。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。

Claims (19)

  1. 一种数据传输方法,由服务器执行,包括:
    接收第一设备通过多个数据通道发送的第一数据包;
    解析所述第一数据包得到所述第一设备的地址信息,并根据所述第一数据包的数据包头对所述第一数据包进行聚合处理,得到第二数据包;
    将所述第二数据包的源地址信息更换为指定地址信息,得到第三数据包;
    将所述第三数据包发送至第二设备,其中,所述第二设备为所述第一设备需要访问的设备。
  2. 根据权利要求1所述的数据传输方法,进一步包括:
    在接收到所述第一设备通过多个数据通道发送的第一数据包之后,解析所述第一数据包得到所述第一设备需要访问的地址信息,根据所述第一设备需要访问的地址信息确定所述第二设备;
    存储所述第一设备需要访问的地址信息。
  3. 根据权利要求2所述的数据传输方法,进一步包括:
    根据所述存储的第一设备需要访问的地址信息,从所述第二设备发送的数据包中确定出需要发送至所述第一设备的第四数据包;
    将所述第四数据包的目的地址信息更换为所述第一设备的地址信息,得到第五数据包;
    将所述第五数据包通过一个或多个数据通道发送至所述第一设备。
  4. 根据权利要求3所述的数据传输方法,其中,根据所述存储的第一设备需要访问的地址信息,从所述第二设备发送的数据包中确定出需要发送至所述第一设备的第四数据包,包括:
    确定所述第二设备发送的数据包的源地址信息;
    根据所述第一设备需要访问的地址信息,从所述第二设备发送的数据包中过滤出所述源地址信息与所述第一设备需要访问的地址信息相匹配的数据包,将过滤出的数据包作为所述第四数据包。
  5. 根据权利要求3所述的数据传输方法,其中,当首次接收到所述第一设备发送的数据包时,所述数据传输方法进一步包括:
    向所述第一设备分配虚拟端口;
    将所述第一设备的地址信息与向所述第一设备分配的虚拟端口进行关联存储,其中,所述指定地址信息包括向所述第一设备分配的虚拟端口。
  6. 根据权利要求5所述的数据传输方法,其中,所述第四数据包的目的地址中包括所述虚拟端口的信息,在将所述第四数据包的目的地址信息更换为所述第一设备的地址信息之前,所述数据传输方法还包括:
    根据所述第四数据包的目的地址信息中所包含的虚拟端口的信息,获取已存储的所述第一设备的地址信息。
  7. 根据权利要求3所述的数据传输方法,进一步包括:接收并存储所述第一设备发送的用于传输所述第一数据包的数据通道信息;
    将所述第五数据包通过一个或多个数据通道发送至所述第一设备,包括:根据存储的最新的数据通道信息,将所述第五数据包发送至所述第一设备。
  8. 根据权利要求3所述的数据传输方法,进一步包括:基于对所述第一设备发送的第一数据包的接收情况,确定所述第一设备在发送第一数据包时所采用的数据通道的网络状态;
    将所述第五数据包通过一个或多个数据通道发送至所述第一设备,包括:根据所述第一设备在发送数据包时所采用的数据通道的网络状态,选择一个或多个数据通道将所述第五数据包发送至所述第一设备。
  9. 根据权利要求8所述的数据传输方法,其中,基于对所述第一设备发送的第一数据包的接收情况,确定所述第一设备在发送第一数据包时所采用的数据通道的网络状态,包括:
    根据接收到所述第一设备发送的数据包的第一时刻和所述第一设备发送的数据包中所包含的第二时刻,计算所述第一设备发送的数据包的延迟,其中,所述第二时刻为根据所述第一设备发送数据包的时刻,以及所述代理服务器与所述第一设备之间的时钟同步补偿值确定的;
    根据所述第一设备发送的数据包的延迟,确定所述第一设备发送数据包所采用的数据通道的网络状态。
  10. 根据权利要求3所述的数据传输方法,进一步包括:接收所述第一设备 反馈的对传输至所述第一设备的数据包的接收情况,以确定所述第一设备在接收数据包时所采用的数据通道的网络状态;
    将所述第五数据包通过一个或多个数据通道发送至所述第一设备,包括:根据所述第一设备在接收数据包时所采用的数据通道的网络状态,选择一个或多个数据通道将所述第五数据包发送至所述第一设备。
  11. 根据权利要求1所述的数据传输方法,进一步包括:
    基于对所述第一设备发送的第一数据包的接收情况,确定所述第一设备在发送数据包时所采用的数据通道的网络状态;
    将所述第一设备在发送数据包时所采用的数据通道的网络状态发送至所述第一设备,以使所述第一设备根据所述网络状态在再次发送数据包时选择所采用的数据通道。
  12. 根据权利要求1至11中任一项所述的数据传输方法,进一步包括:
    若接收到所述第一设备发送的断开传输控制协议TCP连接的数据报文,则在经过预定时长后删除存储的与所述第一设备相关的信息。
  13. 根据权利要求1至11中任一项所述的数据传输方法,进一步包括:在与所述第一设备建立TCP连接的过程中,若接收到的所述第一设备发送的第一个TCP数据报文不是建立TCP连接的数据报文,则向所述第一设备发送重置连接的数据报文。
  14. 一种数据传输装置,包括:
    接收单元,用于接收第一设备通过多个数据通道发送的第一数据包;
    第一处理单元,用于解析所述第一数据包得到所述第一设备的地址信息,并根据所述第一数据包的数据包头对所述第一数据包进行聚合处理,得到第二数据包;
    第二处理单元,用于将所述第二数据包的源地址信息更换为指定地址信息,得到第三数据包;
    发送单元,用于将所述第三数据包发送至第二设备,其中,所述第二设备为所述第一设备需要访问的设备。
  15. 根据权利要求14所述的装置,其中,所述装置还包括:第一存储单元;
    所述第一处理单元,还用于解析所述第一数据包得到所述第一设备需要访问的地址信息,根据所述第一设备需要访问的地址信息确定所述第二设备;
    第一存储单元,用于存储所述第一设备需要访问的地址信息。
  16. 根据权利要求15所述的装置,其中,所述装置还包括:第一确定单元,用于根据所述存储的第一设备需要访问的地址信息,从所述第二设备发送的数据包中确定出需要发送至所述第一设备的第四数据包;
    所述第二处理单元,还用于将所述第四数据包的目的地址信息更换为所述第一设备的地址信息,得到第五数据包;
    所述发送单元,还用于将所述第五数据包通过一个或多个数据通道发送至所述第一设备。
  17. 根据权利要求16所述的装置,其中,所述第一确定单元,用于确定所述第二设备发送的数据包的源地址信息;根据所述第一设备需要访问的地址信息,从所述第二设备发送的数据包中过滤出所述源地址信息与所述第一设备需要访问的地址信息相匹配的数据包,将过滤出的数据包作为所述第四数据包。
  18. 一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至13中任一项所述的数据传输方法。
  19. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至13中任一项所述的数据传输方法。
PCT/CN2019/125125 2019-01-03 2019-12-13 数据传输方法、装置、计算机可读介质及电子设备 WO2020140729A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021515152A JP7154399B2 (ja) 2019-01-03 2019-12-13 データ伝送方法、装置、コンピュータ読み取り可能な媒体および電子デバイス
EP19908065.6A EP3907955A4 (en) 2019-01-03 2019-12-13 DATA TRANSMISSION METHOD AND DEVICE, COMPUTER READABLE MEDIA AND ELECTRONIC DEVICE
US17/229,699 US12126530B2 (en) 2019-01-03 2021-04-13 Data transmission method and apparatus, computer readable medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910004540.XA CN109600388B (zh) 2019-01-03 2019-01-03 数据传输方法、装置、计算机可读介质及电子设备
CN201910004540.X 2019-01-03

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/229,699 Continuation US12126530B2 (en) 2019-01-03 2021-04-13 Data transmission method and apparatus, computer readable medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2020140729A1 true WO2020140729A1 (zh) 2020-07-09

Family

ID=65965946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/125125 WO2020140729A1 (zh) 2019-01-03 2019-12-13 数据传输方法、装置、计算机可读介质及电子设备

Country Status (4)

Country Link
EP (1) EP3907955A4 (zh)
JP (1) JP7154399B2 (zh)
CN (1) CN109600388B (zh)
WO (1) WO2020140729A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022160265A1 (zh) * 2021-01-29 2022-08-04 华为技术有限公司 通信方法和通信装置

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109600388B (zh) * 2019-01-03 2021-01-15 腾讯科技(深圳)有限公司 数据传输方法、装置、计算机可读介质及电子设备
CN110099403B (zh) * 2019-05-17 2022-07-19 腾讯科技(深圳)有限公司 一种数据传输方法、装置、设备及存储介质
CN110247955A (zh) * 2019-05-21 2019-09-17 菜鸟智能物流控股有限公司 一种无人车的通信方法和无人车
CN113518085B (zh) * 2019-07-05 2022-08-02 腾讯科技(深圳)有限公司 一种基于多通道的数据传输方法以及相关装置
CN110730102B (zh) * 2019-10-23 2022-09-20 腾讯科技(深圳)有限公司 一种网络加速方法及装置、存储介质
CN113206875B (zh) * 2021-04-27 2022-09-02 深圳市晨北科技有限公司 数据传输方法、装置及存储介质
CN114666745B (zh) * 2022-03-29 2023-07-21 杭州中天微系统有限公司 数据传输方法、节点控制方法、网络设备、网络系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102656862A (zh) * 2009-12-18 2012-09-05 高通股份有限公司 在应用层绑定/聚合多个接口
US20130237226A1 (en) * 2012-03-09 2013-09-12 Research In Motion Limited Methods to Enable Simultaneous Use of Multiple Radio Access Technologies
CN103441996A (zh) * 2013-08-16 2013-12-11 上海理工大学 并发传输文件的方法及系统
CN103493399A (zh) * 2011-06-03 2014-01-01 Sk电信有限公司 用于利用两个或更多个网络的同时数据传输服务的设备和方法
CN108809549A (zh) * 2018-04-23 2018-11-13 维沃移动通信有限公司 一种传输数据的方法及设备
CN109600388A (zh) * 2019-01-03 2019-04-09 腾讯科技(深圳)有限公司 数据传输方法、装置、计算机可读介质及电子设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010114692A (ja) 2008-11-06 2010-05-20 Nomura Research Institute Ltd データ送信システム、伝送制御装置および送信装置
JP5327864B2 (ja) 2009-09-04 2013-10-30 独立行政法人情報通信研究機構 通信ネットワークシステム及びネットワーク通信方法
JP5870078B2 (ja) 2012-12-11 2016-02-24 東日本電信電話株式会社 キャプチャデータ解析装置
KR101746191B1 (ko) 2014-06-27 2017-06-12 주식회사 케이티 다중 경로 통신을 위한 네트워크 장치 및 단말, 이들의 동작 방법, 그리고 동작 방법을 구현한 프로그램
FR3032852A1 (fr) 2015-02-13 2016-08-19 Orange Procede de selection de concentrateurs de connexions reseau
CN105187312B (zh) * 2015-08-12 2018-05-01 北京锐安科技有限公司 批量终端设备进行网络通信方法、装置及路由器
CN107623646B (zh) * 2017-09-06 2020-11-17 华为技术有限公司 数据流传输方法、发送设备及接收设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102656862A (zh) * 2009-12-18 2012-09-05 高通股份有限公司 在应用层绑定/聚合多个接口
CN103493399A (zh) * 2011-06-03 2014-01-01 Sk电信有限公司 用于利用两个或更多个网络的同时数据传输服务的设备和方法
US20130237226A1 (en) * 2012-03-09 2013-09-12 Research In Motion Limited Methods to Enable Simultaneous Use of Multiple Radio Access Technologies
CN103441996A (zh) * 2013-08-16 2013-12-11 上海理工大学 并发传输文件的方法及系统
CN108809549A (zh) * 2018-04-23 2018-11-13 维沃移动通信有限公司 一种传输数据的方法及设备
CN109600388A (zh) * 2019-01-03 2019-04-09 腾讯科技(深圳)有限公司 数据传输方法、装置、计算机可读介质及电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022160265A1 (zh) * 2021-01-29 2022-08-04 华为技术有限公司 通信方法和通信装置

Also Published As

Publication number Publication date
JP7154399B2 (ja) 2022-10-17
EP3907955A4 (en) 2022-02-23
JP2022501899A (ja) 2022-01-06
CN109600388A (zh) 2019-04-09
CN109600388B (zh) 2021-01-15
EP3907955A1 (en) 2021-11-10
US20210234798A1 (en) 2021-07-29

Similar Documents

Publication Publication Date Title
WO2020140729A1 (zh) 数据传输方法、装置、计算机可读介质及电子设备
EP3758412B1 (en) Multichannel data transmission method, apparatus, system and computer-readable medium
US11277313B2 (en) Data transmission method and corresponding device
JP6178523B2 (ja) 要求マネージャおよび接続マネージャの機能を実装するトランスポートアクセラレータ
US10594606B2 (en) Wired data-connection aggregation
US20120213069A1 (en) Transmission control method, transmission control system, communication device and recording medium of transmission control program
CN103828328A (zh) 移动性和多归属的内容检索应用的系统和方法
WO2023005747A1 (zh) 数据传输方法、装置及分布式存储系统
WO2020010670A1 (zh) 一种获取网络资源的方法、装置及调度服务器
US9794354B1 (en) System and method for communication between networked applications
US20150271226A1 (en) Transport accelerator implementing a multiple interface architecture
WO2022001175A1 (zh) 数据包发送的方法、装置
WO2019242638A1 (zh) 一种负载均衡方法和装置
US10432530B2 (en) System and method of providing compression technique for jitter sensitive application through multiple network links
US11503104B1 (en) Implementing a queuing system in a distributed network
US20210084100A1 (en) Packet Processing Method, Related Device, and Computer Storage Medium
CN115277806A (zh) 云桌面连接方法、装置和设备
WO2017113373A1 (zh) 一种缓存的方法及分组数据网关
WO2019168153A1 (ja) 制御装置、通信制御方法、及びプログラム
US20220286532A1 (en) Method and apparatus for obtaining shared maximum segment size mss
US12126530B2 (en) Data transmission method and apparatus, computer readable medium, and electronic device
US20140126372A1 (en) Network device, method for controlling the network device, and network system
KR101577034B1 (ko) 소프트웨어적인 네트워크 부가기능 추가가 용이한 멀티코어 기반의 toe 시스템 및 그 제어 방법
WO2024207870A1 (zh) 一种数据传输方法和相关装置
US20240171504A1 (en) Multi-path architecture for hardware offloading

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19908065

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021515152

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019908065

Country of ref document: EP

Effective date: 20210803