CN103441996A - Method and system for transmitting files in concurrent mode - Google Patents

Method and system for transmitting files in concurrent mode Download PDF

Info

Publication number
CN103441996A
CN103441996A CN2013103604649A CN201310360464A CN103441996A CN 103441996 A CN103441996 A CN 103441996A CN 2013103604649 A CN2013103604649 A CN 2013103604649A CN 201310360464 A CN201310360464 A CN 201310360464A CN 103441996 A CN103441996 A CN 103441996A
Authority
CN
China
Prior art keywords
mobile phone
packet
wifi
address
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013103604649A
Other languages
Chinese (zh)
Other versions
CN103441996B (en
Inventor
刘文斌
李烨
刘兆坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN201310360464.9A priority Critical patent/CN103441996B/en
Publication of CN103441996A publication Critical patent/CN103441996A/en
Application granted granted Critical
Publication of CN103441996B publication Critical patent/CN103441996B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a system and method for transmitting files in a concurrent mode. The system comprises a mobile phone and a server and is characterized in that the 3G function and the WiFi data connecting function of the mobile phone can be turned on at the same time, 3G-WiFi dual standby is achieved, an IPIP tunnel is established between the mobile phone and the server; the mobile phone sends a network service access request with a 3G uplink, the server receives and processes the request, data packs are sent to a 3G channel and a WiFi channel, and the mobile phone receives the data packs at a 3G interface and a WiFi interface.

Description

The method and system of concurrent transmission file
Technical field
The present invention relates to concurrent transmission method and system, can be applied in the concurrent transmission of mobile phone federated service device, particularly android mobile phone associating Linux server concurrent transmission file.
Background technology
Along with the application development of the Internet, the cellphone subscriber increases day by day to the demand of bandwidth.Simultaneously, be accompanied by the development of 3GPP and non-3GPP access technology, the WiFi technology has obtained greatly universal, and multiple communication technology 3GPP, WLAN also are stored in a lot of areas.
Current smart mobile phone is all supported two network interface card functions as the android mobile phone, but android mobile phone operating system acquiescence only allows a kind of data to connect simultaneously, carries out Operational Visit, when WiFi connects, can't open 3G; When 3G connects, WiFi can't enable.The zone more than needed in the multiple communication technology, caused the wasting of resources.When the user carries out the contour band width service of download file, any connection works independently and also can't meet high-speed requirement.
Because mobile phone is only supported single connection, there is no the concurrent transmission scheme of complete maturation on therefore current mobile phone, existing concurrent transmission method multiaspect is to the PC equipment with having multi-network interface.The multi-path transmission control protocol MPTCP proposed as IETF can realize the multiplexing of TCP, has improved link utilization.But the method enables successfully to be transferred to the android mobile phone, and the communicating pair protocol stack all adds the support of this agreement, but increase the complexity of handset processes packet in the way that application layer and transport layer are added the MPTCP layer, strengthened expense.
As a kind of transfer control protocol SCTP grown up on TCP, UDP basis, the multi-homed host of one of its numerous characteristics can be supported multi-path transmission, only, in the situation that main path lost efficacy, just can enable backup path transmission data, improve the reliability of session.But only on single-pathway, carry out transfer of data, still can't take full advantage of the network bandwidth resources of mulitpath, throughput that also can't fine raising end-to-end communication.
By the modification of the active-standby path mechanism in the standard Stream Control Transmission Protocol, can make mulitpath simultaneously for transfer of data, can see the example with the service end success concurrent transmission with single (or two) network interface card at the pc client with Dual-Ethernet card in the recent period.If but the method is transferred to the android mobile phone, former single network environment change is 3G and Wlan, two paths are present in heterogeneous networks its propagation delay time, and different (Wlan is lower, 3G is higher), can cause data packet disorder to reach receiving terminal, when the delay difference is larger, may cause receiving terminal to send repeatedly gap report to transmitting terminal, transmitting terminal is thought and packet loss is occurred and carry out unnecessary re-transmission.The data packet sequencing work of standard Stream Control Transmission Protocol only supports multithread to connect, and for revising the active-standby path mechanism example of sctp agreement later, need to the out of order packet received, be reordered in application layer, has increased complexity.
Summary of the invention
The technical problem that the present invention will solve is to provide a kind of smart mobile phone as the method for android mobile phone federated service device as Linux server concurrent transmission file, it is characterized in that, revise the cell phone system source code and support 3G, the WiFi interface is two to be treated, mobile phone connects and obtains file from server by a TCP, after mobile phone passes through the success of 3G single file and server three-way handshake, the file data bag that server will send in the kernel intercepting, to packet modify the encapsulation after, from originally being back to mobile phone 3G single face, change into and be sent to mobile phone WiFi, on two interfaces of 3G.Wherein, set certain packet shunting rule, according to packet header, tunnel packing rule, the partial data bag is carried out to new packet encapsulation, make it pass through Wlan link (being tunnel) and be back to mobile phone; The remainder data bag of server response mobile phone is not done change, still by 3G, is back to mobile phone.Tunnel one end is based upon on the server Ethernet interface, and the other end is based upon on mobile phone Wlan interface, and file data will be back to mobile phone from WiFi, two passages of 3G like this, realizes descending concurrent transmission.
Do not change original five-tuple sign that comprises the TCP connection of mobile phone 3G IP address before and after file transfer, this still belongs to a TCP connection of initiating in 3G network in essence, although the partial data bag is by the transmission of Wlan network inner tunnel, see that from the TCP layer lower floor realizes transparent.For the MPTCP method, realize that multi-path transmission need add new protocol layer support, the present invention does not do any change to the original ICP/IP protocol stack of mobile phone, has greatly simplified implementation method.
Because transmitting procedure has connected by same TCP, the packet that mobile phone two network interfaces are received all is delivered to the TCP layer after treatment, sequence number in this layer data bag and confirmation number can independently be sorted to the bag of not receiving in order, the sequence of the Stream Control Transmission Protocol active-standby path mechanism example of revising is operated in application layer and completes, the present invention can remove complicated sequence work from, reduce the workload in application layer, increased the flexibility of invention.
The loading condition at that time according to heterogeneous networks, capable of regulating server side packet shunt ratio, can maximum utilize the bandwidth resources of different networks, makes the connection speed of download file reach maximization, improves user's experience.For realizing the present invention's purpose, be achieved by the following technical solutions:
A kind of method of concurrent transmission file is characterized in that: comprise the steps:
Step (1) is opened mobile phone 3G and WiFi data linkage function simultaneously, realizes that 3G and WiFi pair is treated;
Step (2) is set up the IPIP tunnel between mobile phone and server;
Step (3), used the up initiation of 3G socket to connect, the Transmit message download request;
Step (4), server receives and processes the file download request, and by Packet Generation, to 3G and two passages of wifi, mobile phone is received packet on 3G interface and WiFi interface.
The method of concurrent transmission file as above, is characterized in that above-mentioned steps (1) comprises the steps:
(1.1) revise mobile phone operating system framework source code, according to the existing network type, add a kind of new network connection type TYPE_WIFI_OFFLOAD;
(1.2) in the ConnectivityService constructed fuction, add TYPE_WIFI_OFFLOAD type network tracker, afterwards the operation of this network type is all passed through to corresponding tracker and carry out.
(1.3) ConnectivityService.handleConnectivityChange adds the special processing to TYPE_WIFI_OFFLOAD, deletion belongs to the default route of WiFi, be the default route that the 3G data connect to guarantee only to exist, realize only using 3G to send upstream data;
(1.4) the system default priority network is WiFi, and for preventing that the WiFi link causes the 3G link connection not gone up when initial, in ConnectivityService, newly-increased method setNetworkPreferenceEx, change priority network into 3G;
(1.5) newly-increased method: the setType of WifiManager, WifiService and NetworkInfo, for revising NetworkStateTracker.mNetworkInfo.mNetworkType, to guarantee that the follow-up data for the TYPE_WIFI_OFFLOAD type connect, when 3G connects, start WiFi, ConnectivityService.handleConnect no longer enters the teardown flow process, thereby realizes two treating.
The method of concurrent transmission file as above, is characterized in that above-mentioned steps (2) comprises the steps: to add the support of mobile phone tunnelling function, and between mobile phone WiFi interface and server Ethernet card, the IPIP tunnel is set up in configuration.
The method of concurrent transmission file as above, it is characterized in that above-mentioned steps (3) comprises the steps: operating file transmission service end, client-side program, mobile phone client program, source IP address, source port by binding are used the up initiation of 3G socket to connect to purpose IP address, the destination interface of server appointment, the Transmit message download request.
The method of concurrent transmission file as above, it is characterized in that above-mentioned steps (4) comprises the steps: that server loads kernel module, receive and process the file download request, functions of modules comprises: intercepting is back to the packet of mobile phone, shunted, revised, the operation such as encapsulation, by Packet Generation to two passage; Kernel module realizes specifically comprising following part:
(4.1), use netfilter at kernel NF_IP_LOCAL_OUT place registration Hook Function, make each packet from the machine process filter, process through this Hook Function before leaving local host.
(4.2), add filter condition in Hook Function, comprising: source IP address, IP wrap packaged transport layer protocol, source port information, abandon the packet that does not meet filter condition, the packet of intercepting server response mobile phone.
(4.3), the three-way handshake connected for TCP of letting pass, the TCP that waves for four times control message, still by the 3G link, return.
(4.4), set certain shunt ratio, for needs, send to the packet on the 3G link, the clearance packet, packet continues normal message to be processed and returns by the 3G link, and mobile phone is received packet on the 3G interface;
(4.5), according to shunt ratio, for needs, send to the packet on the Wlan link, modification purpose IP address, destination interface are that mobile phone carries out mobile phone 3G interface IP address, the port that the file download client is bound;
(4.6), for the packet of revising, need recalculate respectively verification and, comprise TCP payload verification and, IP head check and and whole IP payload verification and;
(4.7), after the internal layer packet is revised, by Packet Generation to Microsoft Loopback Adapter equipment tun, this equipment can be to the outer IPIP head of packet encapsulation, according to the information in the configured tunneling technique order fill the IPIP head, source IP address, packet is back to mobile phone WiFi interface by Wlan link route.
A kind of system of concurrent transmission file, comprise mobile phone and server, it is characterized in that:
The 3G of mobile phone and WiFi data linkage function are opened simultaneously, realize that 3G and WiFi pair is treated;
Set up the IPIP tunnel between mobile phone and server;
Mobile phone uses the up initiation of 3G socket to connect, the Transmit message download request;
Server receives and processes the file download request, and by Packet Generation, to 3G and two passages of wifi, mobile phone is received packet on 3G interface and WiFi interface.
The system of concurrent transmission file as above is characterized in that:
(1.1) revise the mobile phone operating system source code, according to the existing network type, add a kind of new network connection type TYPE_WIFI_OFFLOAD;
(1.2) in the ConnectivityService constructed fuction, add TYPE_WIFI_OFFLOAD type network tracker, afterwards the operation of this network type is all passed through to corresponding tracker and carry out;
(1.3) ConnectivityService.handleConnectivityChange adds the special processing to TYPE_WIFI_OFFLOAD, deletion belongs to the default route of WiFi, be the default route that the 3G data connect to guarantee only to exist, realize only using 3G to send upstream data;
(1.4) the system default priority network is WiFi, and for preventing that the WiFi link causes the 3G link connection not gone up when initial, in ConnectivityService, newly-increased method setNetworkPreferenceEx, change priority network into 3G;
(1.5) newly-increased method: the setType of WifiManager, WifiService and NetworkInfo, for revising NetworkStateTracker.mNetworkInfo.mNetworkType, to guarantee that the follow-up data for the TYPE_WIFI_OFFLOAD type connect, when 3G connects, start WiFi, ConnectivityService.handleConnect no longer enters the teardown flow process, thereby realizes two treating.
The system of concurrent transmission file as above is characterized in that: add the support of mobile phone tunnelling function, between mobile phone WiFi interface and server Ethernet card, the IPIP tunnel is set up in configuration.
The system of concurrent transmission file as above, it is characterized in that: operating file transmission service end, client-side program, mobile phone client program, source IP address, source port by binding are used the up initiation of 3G socket to connect to purpose IP address, the destination interface of server appointment, the Transmit message download request.
The system of concurrent transmission file as above, it is characterized in that: server loads kernel module, receives and process the file download request, and functions of modules comprises: intercepting is back to the packet of mobile phone, shunted, revised, the operation such as encapsulation, by Packet Generation to two passage; Kernel module realizes specifically comprising following part:
(4.1), use netfilter at kernel NF_IP_LOCAL_OUT place registration Hook Function, make each packet from the machine process filter, process through this Hook Function before leaving local host.
(4.2), add filter condition in Hook Function, comprising: source IP address, IP wrap packaged transport layer protocol, source port information, abandon the packet that does not meet filter condition, the packet of intercepting server response mobile phone.
(4.3), the three-way handshake connected for TCP of letting pass, the TCP that waves for four times control message, still by the 3G link, return.
(4.4), set certain shunt ratio, for needs, send to the packet on the 3G link, the clearance packet, packet continues normal message to be processed and returns by the 3G link, and mobile phone is received packet on the 3G interface;
(4.5), according to shunt ratio, for needs, send to the packet on the Wlan link, modification purpose IP address, destination interface are that mobile phone carries out mobile phone 3G interface IP address, the port that the file download client is bound;
(4.6), for the packet of revising, need recalculate respectively verification and, comprise TCP payload verification and, IP head check and and whole IP payload verification and;
(4.7), after the internal layer packet is revised, by Packet Generation to Microsoft Loopback Adapter equipment tun, this equipment can be to the outer IPIP head of packet encapsulation, according to the information in the configured tunneling technique order fill the IPIP head, source IP address, packet is back to mobile phone WiFi interface by Wlan link route.
The accompanying drawing explanation
Fig. 1 is network topological diagram of the present invention;
Fig. 2 is tunnel packet structure chart of the present invention;
Fig. 3 is server data bag process chart of the present invention;
Fig. 4 is packet shunting principle figure of the present invention.
Embodiment
Below will be described in detail the preferred embodiments of the present invention.
The smart mobile phone federated service device concurrent transmission method of the present embodiment launches in the network environment as Fig. 1.Below Fig. 1 network topology is done to concise and to the point description (wherein mobile phone be take the android mobile phone as example, and server be take the Linux server as example).
Amended Android mobile phone can access Internet network: 3G, WiFi by two kinds of modes simultaneously.After access network, NodeB is by private IP address of DHCP dynamic assignment to 3G interface rmnet0, and the rmnet0 address is assumed to 10.65.34.111 herein; WiFi interface eth0 sets up Wlan by static assigned ip address with wireless router and is connected, and the eth0 address is made as 192.168.1.102 herein.Server configuring static address is 192.168.1.105, with mobile phone WiFi equipment in same local area network (LAN).For making mobile phone 3G interface have access to server by Internet, it is the DMZ main frame that server with 192.168.1.105 address is set in local area network (LAN) on router, mobile phone uses the up request that is wireless router outer net wlan address 202.120.222.69 by destination address of 3G to visit server, server responds after receiving the mobile phone business request, through module, shunt, revise, encapsulation, after transmission processing, the partial data bag is delivered to the 3G link, all the other are delivered to the wlan link, mobile phone rmnet0, the eth0 interface is collected successively after packet is delivered to same ICP/IP protocol stack processing and is saved as complete file, thereby complete the complete procedure of down direction concurrent transmission.
Below introduce embodiment specific implementation process in Fig. 1 network environment of mobile phone federated service device concurrent transmission method of the present invention.
Step (1) is opened mobile phone 3G and WiFi data linkage function simultaneously, realizes that 3G and WiFi pair is treated; Revise android mobile phone operating system framework layer source code as follows:
(1.1),, according to the existing network type, ConnectivityManager adds a kind of new network connection type TYPE_WIFI_OFFLOAD;
(1.2), in the ConnectivityService constructed fuction, add TYPE_WIFI_OFFLOAD type network tracker, afterwards the operation of this network type is all passed through to corresponding tracker and carry out.
(1.3), ConnectivityService.handleConnectivityChange adds the special processing to TYPE_WIFI_OFFLOAD, deletion belongs to the default route of WiFi, to guarantee only there is Mobile(, be 3G) default route that data connect, realize only using 3G to send upstream data;
(1.4), the system default priority network is WiFi, and for preventing that the WiFi link causes the 3G link connection not gone up when initial, in ConnectivityService, newly-increased method setNetworkPreferenceEx, change priority network into 3G;
(1.5), WifiManager, WifiService and NetworkInfo increase method: setType newly, for revising NetworkStateTracker.mNetworkInfo.mNetworkType, to guarantee that the follow-up data for the TYPE_WIFI_OFFLOAD type connect, when 3G connects, start WiFi, ConnectivityService.handleConnect no longer enters the teardown flow process, thereby realizes two treating;
After Codes Revised, after being compiled brush machine success, it is TYPE_WIFI_OFFLOAD that network type is set, and successively opens that mobile phone 3G data connect, WiFi data connecting valve, can see that mobile phone interface two network icons light successively, realizes two treating.Mobile phone is connected to PC by the USB line, uses adb shell instrument to enter the mobile phone debugging mode, input ip route order checks that routing table is:
10.65.34.97dev?rmnet0
10.65.34.96/27dev?rmnet0src10.65.34.111
192.168.1.0/24dev?eth0src192.168.1.102
default?via10.65.34.97dev?rmnet0
Deducibility: the equipment that the Packet Generation that the purpose network address is 10.65.34.96/27 is 10.65.34.111 to source address send by rmnet0 equipment; The equipment that the Packet Generation that the purpose network address is 192.168.1.0/24 is 192.168.1.102 to source address, send by eth0 equipment; The purpose network address is not all at the packet of above-mentioned scope, the rmnet0 equipment by the default route appointment sends, as the rmnet0 equipment of the destination address packet that is the outer net address 202.120.222.69 of wireless router by the default route appointment sends, realized the mono-up initiation file download request of use 3G.
And utility command " ping-I eth0202.120.222.69 " or " ping-I rmnet0202.120.222.69 " confirm the smoothness that two network interfaces of mobile phone are working properly and arrive the server path.
Step (2), add android mobile phone tunnelling function and support, between mobile phone WiFi interface and server Ethernet card, the IPIP tunnel is set up in configuration; Itself does not support tunnel the Android mobile phone, need change CONFIG_TUN=m into by #CONFIG_TUN is not set by the .config configuration file under source code kernel file root, then obtain tun.ko tunnel module by order make modules collector, the compiling source code obtains rom, manually kernel/drivers/net/tun.ko copied under mobile phone system/lib/modules after the brush machine and configure authority, just having opened tunnelling function.
Use adb configured tunneling technique on mobile phone:
ip?tunnel?add?tun0mode?ipip?local192.168.1.102remote192.168.1.105
busybox?ifconfig?tun010.1.1.1
Use power user's configured tunneling technique on server:
ip?tunnel?add?tun0mode?ipip?local192.168.1.105remote192.168.1.102
ifconfig?tun010.1.1.2
The packet that contains the 3G private IP address can't directly transmit in the Wlan network, the essence in tunnel is for utilizing public network transmission private network packet, be about to 3G ip packet encapsulation in wifi ip grouping, grouping with WiFi IP can addressing in the Wlan network, therefore can utilize existing Wlan network to be transmitted the privately owned message of 3G, be illustrated in figure 2 the tunneling data pack arrangement after encapsulation.Select the IPIP tunnel herein, because it is the simple protocol that the IP packet is encapsulated, this agreement can only be using the IP packet as load, and without encryption, the simple implementation mode, improve treatment effeciency.Use the ifconfig order to give any IP address to newly-built Microsoft Loopback Adapter equipment tun0, as the tunnel port address, use the main purpose of this order for starting tun0.
Step (3), operating file transmission service end, client-side program, mobile phone client program is used the up initiation of 3G socket to connect by source IP address, the source port of binding to purpose IP address, the destination interface of serve end program appointment, the Transmit message download request;
Client-side program is mainly realized:
By calling the bind method of newly-built Socket object s, socket s is tied in 3GIP address 10.65.34.111 and designated ends slogan 55555, by this port numbers, come the identification data bag to belong to mobile phone client program, call the server that the connect method can be just 202.120.222.69 to the IP address, the serve end program that port numbers is 3000 is initiated connection request, the stream content that method getInputStream is read is saved in newly-built BufferedInputStream object bis, and the read method of allocating object bis will flow content and be written in file, and save as complete file.
Serve end program is mainly realized:
The socket sockfd of the newly-built type of the SOCK_STREAM in the AF_INET territory, the address structure variable my_addr of definition struct sockaddr type, filling its thresholding is AF_INET, port numbers is 3000, address is 192.168.1.105, socket sockfd is tied on this address structure, just can on 3000 ports of 192.168.1.105 address, monitor connection request, when the client initiates the request connection, function accept returns to one and connects socket new_fd, the file content that will send reads in buffering area buffer, just can the content in buffer be sent by new_fd by the send function.
Step (4), the Linux server loads kernel module, receives and process the file download request.Functions of modules comprises: intercepting is back to the packet of mobile phone, is shunted, revises, the operation such as encapsulation, by Packet Generation to two passage.Kernel module realizes specifically comprising following part: concrete handling process is as Fig. 3:
(4.1), use netfilter at kernel NF_IP_LOCAL_OUT place registration Hook Function, make each packet from the machine process filter, process through this Hook Function before leaving the local host route.
(4.2), add filter condition in Hook Function, comprising: source IP address 192.168.1.105, IP wrap packaged transport layer protocol TCP, source port number information 3000, abandon the packet that does not meet filter condition, the packet of intercepting server response mobile phone.
(4.3), let pass for the message of TCP message option syn+ack, fin+ack set simultaneously, still return by the 3G link.
In ICP/IP protocol, Transmission Control Protocol provides reliable Connection Service, adopts three-way handshake to set up a connection, comprises that client sends the syn bag, and service end sends the syn+ack bag and means to confirm, client again sends the ack bag and means the response to confirming.The passive link that service end herein connects as TCP, if after receiving the syn bag, the syn+ack bag is returned to mobile phone by the Wlan link, mobile phone still wraps by the up transmission of 3G link ack after receiving the syn+ack bag, because 3G network is understood once complete TCP connection procedure of track record, the syn+ack bag is by the Wlan link transmission, in 3G network, do not stay record, firewall integrated in 3G network only has the situation of syn and ack to this packet, can think that this is a kind of network attack, therefore ack is dropped, the unsuccessful TCP of three-way handshake connects and can't set up, file data can't transmit.Therefore clearance syn+ack message completes TCP three-way handshake in 3G network, can guarantee the normal transmission of file data.
(4.4), set certain shunt ratio, for needs, send to the packet on the 3G link, the clearance packet, packet continues normal message to be processed and returns by the 3G link, and mobile phone is received packet on the 3G interface;
As shown in Figure 4, after handling TCP connection control bag, usage counter i is counted packet, the value that often flows through a packet i adds one, when 20% use 3G link of overall data bag quantity being returned, " shunt ratio " being set is 5, by counter i and shunt ratio " 5 " complementation, if result is 0 clearance packet, use the 3G link to return; If result is not 0, packet is modified after encapsulation, use the Wlan link to return.Can understand, 3G network, after the development popularization and application, than the 2G network bandwidth, improve a lot, but, for this terminal that is applicable to this special high request of mobile device, the 3G network bandwidth still has larger gap with the Wlan network.In Fig. 4, can see, originally transmit 5 3G network unit interval of 5 packets needs, after using dual link, transmit 4 Wlan network unit interval of 5 packets needs and 1 3G network unit interval, in the situation that shunt ratio is 20%, improved 4*(Wlan network unit interval-3G network unit interval).Shunt ratio can adjust according to the real network loading condition, as when the 3G network load is idle, the Wlan offered load is when higher, improves shunt ratio, makes more packet use the 3G network transmission; When the 3G network load is higher, the Wlan offered load is when idle, reduces shunt ratio, makes packet through the Wlan Internet Transmission.Dual link has been accelerated data packet transmission speed, has improved network utilization.
(4.5), according to shunt ratio, send to the packet on the Wlan link for needs, revising purpose IP address is that mobile phone 3G private address 10.65.34.111, destination interface are 3000, and mobile phone carries out mobile phone 3G interface IP address, the port that the file download client is bound; After the TCP successful connection is set up, mobile phone ICP/IP protocol stack can identify according to five-tuple (source IP address 10.65.34.111, purpose IP address 202.120.222.69, source port number 55555, destination slogan 3000, transport layer protocol TCP) and safeguard that this TCP connects, and mobile phone is received and comprised that the first packet of this five-tuple can be delivered to these packets protocol stack and process.TCP connection request packet sends from mobile phone need be through the server of router routing forwarding arrival several times, through the repeatedly mapping of router NAT address and port mapping effect, the packet source IP address, source port number changes, must revise the purpose IP address of server response terminal packet, the destination slogan is the address port information that former mobile phone is initiated the application program binding of TCP connection, packet is after the tunnel transmission of Wlan network directly arrives mobile phone, mobile phone just can be delivered to corresponding protocol stack by packet according to the IP address, be delivered to upper level applications according to port numbers again.
(4.6), for the packet of revising, need recalculate respectively verification and, comprise TCP payload verification and, IP head check and and whole IP payload verification and;
(4.7), after the internal layer packet is revised, by Packet Generation to Microsoft Loopback Adapter equipment tun, this equipment can be to the outer IPIP head of packet encapsulation, according to the information in the configured tunneling technique order fill the IPIP head, source IP address, packet is back to mobile phone WiFi interface by Wlan link route.
Packet completes the work of addressing routing forwarding by source, purpose IP address in network.If will make packet to transmit in the Wlan network, this packets need has source, the purpose IP address that can identify in the Wlan network.The Wlan equipment of mobile phone and server are all in same local area network (LAN), will include the load of the packet of mobile phone 3G IP address as new data packets, the upper new IP head of outer encapsulation, comprise the Wlan address that can identify in local area network (LAN), be that purpose IP is made as 192.168.1.102, source IP is made as 192.168.1.105.This is also in tunnel, to use public network transmission private data bag to realize principle.

Claims (10)

1. the method for a concurrent transmission file, is characterized in that: comprise the steps:
Step (1) is opened mobile phone 3G and WiFi data linkage function simultaneously, realizes that 3G and WiFi pair is treated;
Step (2) is set up the IPIP tunnel between mobile phone and server;
Step (3), used the up initiation of 3G socket to connect, the Transmit message download request;
Step (4), server receives and processes the file download request, and by Packet Generation, to 3G and two passages of WiFi, mobile phone is received packet on 3G interface and WiFi interface.
2. the method for concurrent transmission file as claimed in claim 1, is characterized in that above-mentioned steps (1) comprises the steps:
(1.1) revise the mobile phone operating system source code, according to the existing network type, add a kind of new network connection type TYPE_WIFI_OFFLOAD;
(1.2) in the ConnectivityService constructed fuction, add TYPE_WIFI_OFFLOAD type network tracker, afterwards the operation of this network type is all passed through to corresponding tracker and carry out.
(1.3) adding the special processing to TYPE_WIFI_OFFLOAD, delete the default route that belongs to WiFi, is the default route that the 3G data connect to guarantee only to exist, and realizes only using 3G to send upstream data;
(1.4) the system default priority network is WiFi, and for preventing that the WiFi link causes the 3G link connection not gone up when initial, in ConnectivityService, newly-increased method setNetworkPreferenceEx, change priority network into 3G;
(1.5) newly-increased method: setType, for revising NetworkStateTracker.mNetworkInfo.mNetworkType, to guarantee that the follow-up data for the TYPE_WIFI_OFFLOAD type connect, when 3G connects, start WiFi, ConnectivityService.handleConnect no longer enters the teardown flow process, thereby realizes two treating.
3. the method for concurrent transmission file as claimed in claim 1 or 2, is characterized in that above-mentioned steps (2) comprises the steps: to add the support of mobile phone tunnelling function, and between mobile phone WiFi interface and server Ethernet card, the IPIP tunnel is set up in configuration.
4. the method for concurrent transmission file as claimed in claim 1 or 2, it is characterized in that above-mentioned steps (3) comprises the steps: operating file transmission service end, client-side program, mobile phone client program, source IP address, source port by binding are used the up initiation of 3G socket to connect to purpose IP address, the destination interface of server appointment, the Transmit message download request.
5. the method for concurrent transmission file as claimed in claim 1 or 2, it is characterized in that above-mentioned steps (4) comprises the steps: that server loads kernel module, receive and process the file download request, functions of modules comprises: intercepting is back to the packet of mobile phone, shunted, revised, the operation such as encapsulation, by Packet Generation to two passage; Kernel module realizes specifically comprising following part:
(4.1), use netfilter at kernel NF_IP_LOCAL_OUT place registration Hook Function, make each packet from the machine process filter, process through this Hook Function before leaving local host.
(4.2), add filter condition in Hook Function, comprising: source IP address, IP wrap packaged transport layer protocol, source port information, abandon the packet that does not meet filter condition, the packet of intercepting server response mobile phone.
(4.3), the three-way handshake connected for TCP of letting pass, the TCP that waves for four times control message, still by the 3G link, return.
(4.4), set certain shunt ratio, for needs, send to the packet on the 3G link, the clearance packet, packet continues normal message to be processed and returns by the 3G link, and mobile phone is received packet on the 3G interface;
(4.5), according to shunt ratio, for needs, send to the packet on the Wlan link, modification purpose IP address, destination interface are that mobile phone carries out mobile phone 3G interface IP address, the port that the file download client is bound;
(4.6), for the packet of revising, need recalculate respectively verification and, comprise TCP payload verification and, IP head check and and whole IP payload verification and;
(4.7), after the internal layer packet is revised, by Packet Generation to Microsoft Loopback Adapter equipment tun, this equipment can be to the outer IPIP head of packet encapsulation, according to the information in the configured tunneling technique order fill the IPIP head, source IP address, packet is back to mobile phone WiFi interface by Wlan link route.
6. the system of a concurrent transmission file, comprise mobile phone and server, it is characterized in that:
The 3G of mobile phone and WiFi data linkage function are opened simultaneously, realize that 3G and WiFi pair is treated;
Set up the IPIP tunnel between mobile phone and server;
Mobile phone uses the up initiation of 3G socket to connect, the Transmit message download request;
Server receives and processes the file download request, and by Packet Generation, to 3G and two passages of WiFi, mobile phone is received packet on 3G interface and WiFi interface.
7. the system of concurrent transmission file as claimed in claim 6 is characterized in that:
(1.1) revise the mobile phone operating system source code, according to the existing network type, add a kind of new network connection type TYPE_WIFI_OFFLOAD;
(1.2) in the ConnectivityService constructed fuction, add TYPE_WIFI_OFFLOAD type network tracker, afterwards the operation of this network type is all passed through to corresponding tracker and carry out.
(1.3) adding the special processing to TYPE_WIFI_OFFLOAD, delete the default route that belongs to WiFi, is the default route that the 3G data connect to guarantee only to exist, and realizes only using 3G to send upstream data;
(1.4) the system default priority network is WiFi, and for preventing that the WiFi link causes the 3G link connection not gone up when initial, in ConnectivityService, newly-increased method setNetworkPreferenceEx, change priority network into 3G;
(1.5) newly-increased method: setType, for revising NetworkStateTracker.mNetworkInfo.mNetworkType, to guarantee that the follow-up data for the TYPE_WIFI_OFFLOAD type connect, when 3G connects, start WiFi, ConnectivityService.handleConnect no longer enters the teardown flow process, thereby realizes two treating.
8. the system of concurrent transmission file as described as claim 6 or 7, is characterized in that: add the support of mobile phone tunnelling function, between mobile phone WiFi interface and server Ethernet card, configure and set up the IPIP tunnel.
9. the system of concurrent transmission file as described as claim 6 or 7, it is characterized in that: operating file transmission service end, client-side program, mobile phone client program, source IP address, source port by binding are used the up initiation of 3G socket to connect to purpose IP address, the destination interface of server appointment, the Transmit message download request.
10. the system of concurrent transmission file as described as claim 6 or 7, it is characterized in that: server loads kernel module, receive and process the file download request, functions of modules comprises: intercepting is back to the packet of mobile phone, shunted, revised, the operation such as encapsulation, by Packet Generation to two passage; Kernel module realizes specifically comprising following part:
(4.1), use netfilter at kernel NF_IP_LOCAL_OUT place registration Hook Function, make each packet from the machine process filter, process through this Hook Function before leaving local host.
(4.2), add filter condition in Hook Function, comprising: source IP address, IP wrap packaged transport layer protocol, source port information, abandon the packet that does not meet filter condition, the packet of intercepting server response mobile phone.
(4.3), the three-way handshake connected for TCP of letting pass, the TCP that waves for four times control message, still by the 3G link, return.
(4.4), set certain shunt ratio, for needs, send to the packet on the 3G link, the clearance packet, packet continues normal message to be processed and returns by the 3G link, and mobile phone is received packet on the 3G interface;
(4.5), according to shunt ratio, for needs, send to the packet on the Wlan link, modification purpose IP address, destination interface are that mobile phone carries out mobile phone 3G interface IP address, the port that the file download client is bound;
(4.6), for the packet of revising, need recalculate respectively verification and, comprise TCP payload verification and, IP head check and and whole IP payload verification and;
(4.7), after the internal layer packet is revised, by Packet Generation to Microsoft Loopback Adapter equipment tun, this equipment can be to the outer IPIP head of packet encapsulation, according to the information in the configured tunneling technique order fill the IPIP head, source IP address, packet is back to mobile phone WiFi interface by Wlan link route.
CN201310360464.9A 2013-08-16 2013-08-16 The method and system of concurrent transmission file Expired - Fee Related CN103441996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310360464.9A CN103441996B (en) 2013-08-16 2013-08-16 The method and system of concurrent transmission file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310360464.9A CN103441996B (en) 2013-08-16 2013-08-16 The method and system of concurrent transmission file

Publications (2)

Publication Number Publication Date
CN103441996A true CN103441996A (en) 2013-12-11
CN103441996B CN103441996B (en) 2016-09-28

Family

ID=49695661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310360464.9A Expired - Fee Related CN103441996B (en) 2013-08-16 2013-08-16 The method and system of concurrent transmission file

Country Status (1)

Country Link
CN (1) CN103441996B (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777958A (en) * 2014-01-27 2014-05-07 贝壳网际(北京)安全技术有限公司 Mobile terminal, and method and device for controlling system function through application program
CN104684107A (en) * 2015-03-24 2015-06-03 苏州大学张家港工业技术研究院 Construction method for two-channel hybrid tunnel of mobile terminals
WO2015110080A1 (en) * 2014-01-26 2015-07-30 华为技术有限公司 Data processing method, device and system
CN105119825A (en) * 2015-07-10 2015-12-02 努比亚技术有限公司 Data transmission device and data transmission method
CN105228133A (en) * 2015-07-10 2016-01-06 努比亚技术有限公司 Multi-channel data method for down loading and system
CN105430763A (en) * 2015-11-30 2016-03-23 上海斐讯数据通信技术有限公司 Data acquisition method and device synchronously used by WIFI (Wireless Fidelity) data and mobile data
CN105765578A (en) * 2013-11-26 2016-07-13 起元科技有限公司 Parallel access to data in a distributed file system
CN105939344A (en) * 2016-04-18 2016-09-14 杭州迪普科技有限公司 TCP (Transmission Control Protocol) connection establishing method and device
CN106376099A (en) * 2016-09-18 2017-02-01 惠州Tcl移动通信有限公司 Method and system for downloading files based on LTE network and WIFI network meanwhile
CN108073410A (en) * 2016-11-14 2018-05-25 安桥株式会社 Firmware update system
CN108881258A (en) * 2018-06-29 2018-11-23 张家港市鸿嘉数字科技有限公司 A kind of intelligence system for network file safe transmission
CN108966319A (en) * 2018-06-08 2018-12-07 深圳海翼智新科技有限公司 Packet transfer control method, mobile terminal and device
CN109526020A (en) * 2018-10-29 2019-03-26 Oppo广东移动通信有限公司 Data transmission method and Related product
CN109600388A (en) * 2019-01-03 2019-04-09 腾讯科技(深圳)有限公司 Data transmission method, device, computer-readable medium and electronic equipment
CN110995867A (en) * 2019-12-20 2020-04-10 上海有个机器人有限公司 Communication system for human-computer interaction and robot
CN111294864A (en) * 2018-12-10 2020-06-16 联发科技股份有限公司 Wireless communication method and related wireless device
CN111464665A (en) * 2019-01-18 2020-07-28 慧与发展有限责任合伙企业 End-to-end multi-path TCP over network gateway
CN113328995A (en) * 2021-05-06 2021-08-31 深圳市联软科技股份有限公司 Flow proxy method and system for android
CN114978643A (en) * 2022-05-13 2022-08-30 北京天融信网络安全技术有限公司 Communication method, network device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848235A (en) * 2010-04-16 2010-09-29 北京航空航天大学 Real-time multimedia data P2P transmission scheme for supporting NAT traversal
CN102244645A (en) * 2010-05-14 2011-11-16 北京快网科技有限公司 Reliable, transparent and general acceleration gateway system based on UDP protocol
CN102917472A (en) * 2011-08-01 2013-02-06 鸿富锦精密工业(深圳)有限公司 Method and system for adjustment of internet access priority

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848235A (en) * 2010-04-16 2010-09-29 北京航空航天大学 Real-time multimedia data P2P transmission scheme for supporting NAT traversal
CN102244645A (en) * 2010-05-14 2011-11-16 北京快网科技有限公司 Reliable, transparent and general acceleration gateway system based on UDP protocol
CN102917472A (en) * 2011-08-01 2013-02-06 鸿富锦精密工业(深圳)有限公司 Method and system for adjustment of internet access priority

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10776325B2 (en) 2013-11-26 2020-09-15 Ab Initio Technology Llc Parallel access to data in a distributed file system
CN105765578A (en) * 2013-11-26 2016-07-13 起元科技有限公司 Parallel access to data in a distributed file system
US11599509B2 (en) 2013-11-26 2023-03-07 Ab Initio Technology Llc Parallel access to data in a distributed file system
CN105765578B (en) * 2013-11-26 2020-04-17 起元科技有限公司 Parallel access of data in a distributed file system
US10051607B2 (en) 2014-01-26 2018-08-14 Huawei Technologies Co., Ltd. Data processing method, apparatus and system
WO2015110080A1 (en) * 2014-01-26 2015-07-30 华为技术有限公司 Data processing method, device and system
CN103777958A (en) * 2014-01-27 2014-05-07 贝壳网际(北京)安全技术有限公司 Mobile terminal, and method and device for controlling system function through application program
CN104684107A (en) * 2015-03-24 2015-06-03 苏州大学张家港工业技术研究院 Construction method for two-channel hybrid tunnel of mobile terminals
CN105119825A (en) * 2015-07-10 2015-12-02 努比亚技术有限公司 Data transmission device and data transmission method
CN105228133A (en) * 2015-07-10 2016-01-06 努比亚技术有限公司 Multi-channel data method for down loading and system
CN105430763A (en) * 2015-11-30 2016-03-23 上海斐讯数据通信技术有限公司 Data acquisition method and device synchronously used by WIFI (Wireless Fidelity) data and mobile data
CN105939344A (en) * 2016-04-18 2016-09-14 杭州迪普科技有限公司 TCP (Transmission Control Protocol) connection establishing method and device
CN106376099A (en) * 2016-09-18 2017-02-01 惠州Tcl移动通信有限公司 Method and system for downloading files based on LTE network and WIFI network meanwhile
CN108073410A (en) * 2016-11-14 2018-05-25 安桥株式会社 Firmware update system
CN108073410B (en) * 2016-11-14 2024-03-26 优质音响科技株式会社 Firmware updating system
CN108966319A (en) * 2018-06-08 2018-12-07 深圳海翼智新科技有限公司 Packet transfer control method, mobile terminal and device
CN108966319B (en) * 2018-06-08 2021-02-09 深圳海翼智新科技有限公司 Data packet transmission control method, mobile terminal and device
CN108881258A (en) * 2018-06-29 2018-11-23 张家港市鸿嘉数字科技有限公司 A kind of intelligence system for network file safe transmission
CN109526020A (en) * 2018-10-29 2019-03-26 Oppo广东移动通信有限公司 Data transmission method and Related product
CN109526020B (en) * 2018-10-29 2022-05-06 Oppo广东移动通信有限公司 Data transmission method and related product
CN111294864A (en) * 2018-12-10 2020-06-16 联发科技股份有限公司 Wireless communication method and related wireless device
CN109600388A (en) * 2019-01-03 2019-04-09 腾讯科技(深圳)有限公司 Data transmission method, device, computer-readable medium and electronic equipment
CN109600388B (en) * 2019-01-03 2021-01-15 腾讯科技(深圳)有限公司 Data transmission method and device, computer readable medium and electronic equipment
WO2020140729A1 (en) * 2019-01-03 2020-07-09 腾讯科技(深圳)有限公司 Data transmission method and apparatus, computer readable medium, and electronic device
CN111464665B (en) * 2019-01-18 2021-10-26 慧与发展有限责任合伙企业 End-to-end multi-path TCP over network gateway
CN111464665A (en) * 2019-01-18 2020-07-28 慧与发展有限责任合伙企业 End-to-end multi-path TCP over network gateway
CN110995867A (en) * 2019-12-20 2020-04-10 上海有个机器人有限公司 Communication system for human-computer interaction and robot
CN113328995A (en) * 2021-05-06 2021-08-31 深圳市联软科技股份有限公司 Flow proxy method and system for android
CN114978643A (en) * 2022-05-13 2022-08-30 北京天融信网络安全技术有限公司 Communication method, network device and storage medium
CN114978643B (en) * 2022-05-13 2023-08-29 北京天融信网络安全技术有限公司 Communication method, network equipment and storage medium

Also Published As

Publication number Publication date
CN103441996B (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN103441996A (en) Method and system for transmitting files in concurrent mode
US20230276483A1 (en) Multipath-scheduling-based relay device
EP3021528B1 (en) Gre tunnel implementation method, access device and convergence gateway
US7620015B2 (en) Method and system for seamless handover of mobile devices in heterogeneous networks
CN109076017B (en) Method for routing signals, routing device and computer-readable storage medium
CN107409121A (en) Method and arrangement for multipath business polymerization
US8514697B2 (en) Mobile broadband packet switched traffic optimization
CN102148767A (en) Network address translation (NAT)-based data routing method and device
KR102442083B1 (en) Method and system for scheduling of packets in a bundling scenario based on TCP tunnels and unique TCP information
US11824685B2 (en) Method for implementing GRE tunnel, access point and gateway
CN103236964B (en) Based on DS-Lite implementation method and the CPE access device thereof of Linux
CN106375401B (en) Communication method of electric power multimode heterogeneous fusion device supporting multi-stream convergence
EP3119057A1 (en) Packet conversion device and method for allowing transparent packet-based multipath bundling
EP2524537B1 (en) Method, network access device and mobile device for providing access to public packet networks from a local environment
EP3506716A1 (en) Method for packet exchange and related device
CN102711181A (en) Method for mobile terminal to realize network shunt by utilizing multilink
CN113543152A (en) 5G communication system, data communication method, and non-volatile storage medium
JP5621622B2 (en) Communication system, communication terminal, gateway, communication method and program
CN103368841A (en) Message forwarding method and device thereof
Tachibana et al. Implementation of a proxy-based CMT-SCTP scheme for Android smartphones
WO2014131330A1 (en) Multi-link-based data transmission method and device
RU2694025C1 (en) System for aggregation of network data in computer networks
CN114938318B (en) Cross-region peer-to-peer connection realization method based on elastic public network IP
CN107276787A (en) A kind of data communications method and system
CN117938408A (en) Method and system for implementing dynamic access control in Android device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Li Ye

Inventor after: Liu Wenbin

Inventor after: Liu Zhaokun

Inventor before: Liu Wenbin

Inventor before: Li Ye

Inventor before: Liu Zhaokun

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160928

Termination date: 20190816