Data transmission method and device
Technical Field
The present invention relates to the field of communications, and in particular, to a data transmission method and apparatus.
Background
In current mobile applications, a user terminal device may access a wide area network by accessing a hotspot device, such as a router, a wireless gateway, and the like. The wide area network mainly comprises: a Wireless Application Protocol (WAP) network, a 3G (3rd-Generation, third Generation mobile communication technology) network, a Wireless Fidelity (WIFI) network, a wired network, etc., where the 3G and the WIFI support high-speed transmission of network data and are mainstream technologies for implementing data communication. When the 3G or WIFI is used for the internet access service, the internet access bandwidth of the user terminal device mainly depends on the bandwidth of the 3G network currently connected to the access hotspot device or the bandwidth of the currently connected WIFI network.
However, in the prior art, the access hotspot device can only transmit service data through a single network; due to the limited bandwidth of a single network, when the terminal device simultaneously initiates a plurality of data requests and obtains a large amount of data from the server, network congestion is caused, and the internet access speed of the user terminal device is low.
Disclosure of Invention
Embodiments of the present invention provide a data transmission method and apparatus, which can solve the problems in the prior art that when a user terminal device simultaneously initiates multiple data requests and obtains a large amount of data from a server, network congestion is caused and the internet access speed of the user terminal device is low.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in one aspect, an embodiment of the present invention provides a data transmission method, including:
the access hotspot equipment acquires a data request initiated by the terminal equipment;
the access hotspot equipment selects a communication network with the highest current transmission rate from at least two available communication networks as a specified network of the data request;
the access hotspot equipment establishes a data transmission link in the specified network;
and the access hotspot equipment sends the data request to a server through the data transmission link to acquire data.
On the other hand, an embodiment of the present invention further provides a data transmission apparatus, including:
a data request acquiring unit, configured to acquire a data request initiated by a terminal device;
a network allocation unit, configured to select a communication network with a highest current transmission rate from at least two available communication networks as a designated network of the data request;
a link establishing unit for establishing a data transmission link in the specified network;
and the data transmission unit is used for sending the data request to a server through the data transmission link so as to acquire data.
The data transmission method and the data transmission device provided by the embodiment of the invention can simultaneously transmit data through a plurality of available communication networks, thereby improving the internet access bandwidth of the user terminal equipment, distributing the received data transmission requirements to the communication networks with high transmission rate, and ensuring that a user obtains better internet access experience.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a data transmission method according to embodiment 1 of the present invention;
fig. 2 is a schematic flowchart of a data transmission method according to embodiment 2 of the present invention;
fig. 3 is a schematic allocation diagram of a communication network according to embodiment 2 of the present invention;
fig. 4 to 7 are schematic structural diagrams of a data transmission device according to embodiment 3 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
An embodiment of the present invention provides a data transmission method, as shown in fig. 1, the method includes:
101. the access hotspot equipment acquires a data request initiated by the terminal equipment.
It is worth to be noted that the Access hotspot device in this embodiment may be an AP (Access Point) device in a mobile communication network, and may also be other network element devices with an AP function, for example: a wireless router, a wireless gateway, etc., without limitation herein.
102. And the access hotspot equipment selects a communication network with the highest current transmission rate from at least two available communication networks as a specified network of the data request.
For convenience of understanding, the AP device is taken as an example for explanation in the present embodiment; the "available communication network" refers to a communication network in which the AP supports the network standard of the network and has the authority to use the network for data transmission, and includes but is not limited to: a GPRS (General Packet Radio Service) network, a 3G network, a 4G (4th-Generation, fourth-Generation mobile communication technology) network, a WIFI network, a WAP network, a wired network, and the like; the present embodiment is applicable to scenarios where there are at least two available communication networks.
Specifically, the AP may determine the currently available communication network by querying a network state of the AP, for example, the AP may determine whether the 3G network is an available communication network by querying a 3G wireless air interface message; and determining whether a communication network with a WIFI network available exists according to the real-time scanning result of the WIFI.
103. And the access hotspot equipment establishes a data transmission link in the specified network.
104. And the access hotspot equipment sends the data request to a server through the data transmission link to acquire data.
In this embodiment, when the access hotspot device obtains a data request initiated by the user terminal device, a communication network with the highest current transmission rate is selected from a plurality of available communication networks as a designated network of the data request, so that bandwidth resources of the plurality of available communication networks can be fully utilized under the condition of ensuring the transmission rate in this embodiment, so that the transmission bandwidth available to the user terminal device is the sum of bandwidths of the plurality of available communication networks.
According to the data transmission method provided by the embodiment of the invention, the terminal equipment can transmit data through a plurality of communication networks available to the AP equipment. By adopting the method provided by the embodiment of the invention, the internet access bandwidth of the terminal equipment is the sum of the bandwidths of a plurality of communication networks which can be used by the AP equipment, compared with the prior art, the internet access bandwidth of the user terminal equipment can be effectively improved, and the received data transmission requirement can be distributed to the communication network with high transmission rate, so that a user can obtain better internet access experience.
Example 2
An embodiment of the present invention provides a data transmission method, as shown in fig. 2, the method includes:
201. the AP device detects and determines currently available communication networks, and the available communication networks are at least two.
It should be noted that the AP device in this embodiment may also be replaced with a network element device with a specific AP function, such as a wireless router and a wireless gateway, which is not limited herein. Specifically, the "available communication network" refers to a communication network in which the AP supports the network standard of the network and has the authority to use the network for data transmission, and the communication network includes but is not limited to: GPRS network, 3G network, 4G network, WIFI network, WAP network, and wired network, etc. Among them, 3G, 4G networks include a variety of standards, for example, 3G networks include: CDMA2000(Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), WiMAX (Worldwide Interoperability for Microwave Access) 4 standards.
The communication networks of different systems are all based on a Transmission Control Protocol/Internet Protocol (TCP/IP) Protocol when service data is transmitted, and the AP device is compatible with the communication networks of different systems, so that data Transmission can be performed through a plurality of communication networks of different systems.
For convenience of understanding, the present embodiment specifically describes a typical scenario in which the currently available communication network of the AP device is a 3G network and a WIFI network, as an example. It is worth noting that in practical applications, the number of communication networks available to the AP device is not limited to two.
202. The AP device acquires a data request initiated by a TE (Terminal Equipment).
It is worth mentioning that the AP device may obtain the TE-initiated data request in at least 2 ways: 1) the AP device receives a service request from the TE, and splits the service request into at least 2 data requests.
For example: the AP device receives a web browsing request initiated by the TE, where the web browsing request includes video data, audio data, and text data, and the AP device may divide the web browsing request into 3 data requests: namely a video data request, an audio data request and a text data request.
2) The AP device receives the data request sent by the TE from the TE, i.e. the AP device directly obtains the data request from the TE.
The TE in the embodiment of the present invention is a terminal having a wireless communication function, for example: a PC (Personal Computer), a notebook Computer, a smart phone, a tablet Computer, and the like.
203. The AP equipment detects the transmission rates of the current 3G network and the current WIFI network, determines the communication network with the highest transmission rate, and takes the communication network as a specified network of the data request acquired by the AP.
For example: the AP device may determine the transmission rate based on the time interval for returning the response message by sending a ping message (or other type of traffic message) to the network server.
It is worth noting that the transmission rate of the communication network depends on the idle bandwidth, the bandwidth of the data transmission link in the 3G network depends on the bandwidth of the 3G network provided by the operator, and the bandwidth of the data transmission link in the WIFI network depends on the bandwidth provided by the WIFI hotspot. In practical applications, the TE often initiates a plurality of parallel service requests or data requests (for example, while browsing a web page, the TE initiates a file download request to download a file), and also terminates a certain service of the plurality of services currently running, so that the idle bandwidths of the 3G network and the WIFI network are changed in real time. In order to ensure the transmission rate, after acquiring the data request initiated by the TE, the AP device selects the communication network with the largest current idle bandwidth and the highest transmission rate as the designated network of the data request.
For example, taking the bandwidth provided by the 3G network as 2M and the bandwidth provided by the WIFI hotspot as 4M as an example: when the TE initiates a video data request, if the 3G network and the WIFI network are both in an idle state, the AP equipment can realize the video data request through the WIFI network; if the implementation of the video data request occupies 1M bandwidth of the WIFI network (at this time, the idle bandwidth of the WIFI network is 3M, and the idle bandwidth of the 3G network is 2M), the AP device may select the WIFI network as a designated network of a next data request when acquiring a next data request initiated by the TE.
Specifically, for clear and complete description of the network structure allocation information of the present embodiment, it is described next with taking the AP device acquiring the TE to sequentially initiate a web browsing request, a video playing request, and a file downloading request as an example:
for convenience of understanding, it is assumed herein that the bandwidth of the 3G network is 2M and the bandwidth of the WIFI network is 4M; the bandwidth occupied by the webpage browsing request, the video playing request and the file downloading request is 1M, 2M and 2M in sequence; the allocation of the communication network is as follows:
firstly, an AP receives a webpage browsing request initiated by a TE, detects that the idle bandwidth of a current 3G network is 2M and the idle bandwidth of a WIFI network is 4M, and selects the WIFI network to realize the webpage browsing request;
secondly, the AP receives a video playing request initiated by the TE, detects that the idle bandwidth of the current 3G network is 2M and the idle bandwidth of the WIFI network is 3M, and selects the WIFI network to realize the video playing request;
and thirdly, the AP receives a file downloading request initiated by the TE, detects that the idle bandwidth of the current 3G network is 2M and the idle bandwidth of the WIFI network is 1M, and selects the 3G network to realize the file downloading request.
The structure of the network allocated according to the above method is shown in fig. 3.
Further, preferably, when the AP device receives a web browsing request initiated by the TE, the AP device may divide the web browsing request into 3 data requests: namely, a video data request, an audio data request and a text data request, and sequentially allocating a network with the highest transmission rate to the 3 split data requests as a designated network of the data request, so that bandwidth resources of a plurality of communication networks can be fully utilized, and the TE can acquire a higher data transmission rate.
204. And the AP equipment establishes a data transmission link for each data request in the specified network and records link connection information established for each data request, wherein the link connection information comprises an identifier of a communication network allocated for the data request.
The link connection information can represent network information allocated by the current AP device for each data request, and is used to guide each data request to acquire service data.
It should be noted that, if different data requests are initiated by different application programs, different application programs in the TE and the external network link use different ports and the same connection handshake request, and the link connection information further records the port number corresponding to each data request.
205. The AP equipment sends the data request to the server through the data transmission link established for each data request so as to acquire data.
That is to say, by using the method provided in this embodiment, when the TE performs the internet access service, the internet access bandwidth of the TE is the sum of the bandwidths of all the communication networks supported by the AP device, the internet access speed can be significantly improved, and the user experience is effectively improved.
206. When the data transmission link established for a certain data request by the AP equipment needs to be disconnected, the AP disconnects the data transmission link established for the data request, releases the load of the link, and deletes the link connection information related to the data request.
The "a data transmission link established for a certain data request needs to be disconnected" includes, but is not limited to, the following scenarios: the data transfer corresponding to the data request has been completed or the data request is terminated by the TE.
According to the data transmission method provided by the embodiment of the invention, the TE can perform data transmission through a plurality of communication networks available to the AP equipment. By adopting the method provided by the embodiment of the invention, the TE internet access bandwidth is the sum of the bandwidths of a plurality of communication networks available for the AP equipment, and compared with the prior art, the TE internet access bandwidth can be effectively realized, so that a user can obtain better internet access experience.
Example 3
An embodiment of the present invention provides a data transmission apparatus, which can be applied to an AP device to implement the foregoing method embodiment, and as shown in fig. 4, the data transmission apparatus includes:
a data request obtaining unit 41, configured to obtain a data request initiated by a terminal device;
a network allocating unit 42, configured to select a communication network with a highest current transmission rate from at least two available communication networks as a specified network of the data request;
a link establishing unit 43 for establishing a data transmission link in the specified network;
a data transmission unit 44, configured to send the data request to the server through the data transmission link to obtain data.
Further, as shown in fig. 5, the data request obtaining unit 41 includes a splitting module 411, configured to receive a service request from a terminal device, and split the service request into at least two data requests;
optionally, as shown in fig. 6, the data request obtaining unit 41 may further include a receiving module 412, configured to receive, from a terminal device, a data request sent by the terminal device.
The data transmission apparatus according to fig. 5 or fig. 6, further, as shown in fig. 7, the data transmission apparatus further includes a network detection unit 45, and the network allocation unit 42 includes a rate detection module 421, where:
the network detection unit 45 is used for detecting and determining the currently available communication network;
the currently available communication networks comprise a General Packet Radio Service (GPRS) network, a third generation mobile communication 3G network, a fourth generation mobile communication 4G network, a wireless fidelity (WIFI) network, a Wireless Application Protocol (WAP) network and a wired network.
The rate detection module 421 is configured to detect the transmission rate of the available communication network, and determine the communication network with the highest transmission rate.
It should be noted that the data transmission apparatus provided in the embodiment of the present invention may also be applied to other network element devices having an AP function, for example: a wireless router, a wireless gateway, etc., without limitation herein.
The data transmission device provided by the embodiment of the invention can utilize a plurality of communication networks available for the current data transmission device to transmit data, and the device provided by the embodiment of the invention enables the internet bandwidth of the terminal equipment to be the sum of the bandwidths of the plurality of communication networks available for the current data transmission device.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus necessary general hardware, and certainly may also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present invention may be substantially implemented or a part of the technical solutions contributing to the prior art may be embodied in the form of a software product, which is stored in a readable storage medium, such as a floppy disk, a hard disk, or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.