CN109451596B - Data transmission method and related device - Google Patents

Data transmission method and related device Download PDF

Info

Publication number
CN109451596B
CN109451596B CN201811269401.1A CN201811269401A CN109451596B CN 109451596 B CN109451596 B CN 109451596B CN 201811269401 A CN201811269401 A CN 201811269401A CN 109451596 B CN109451596 B CN 109451596B
Authority
CN
China
Prior art keywords
wireless communication
communication link
message
data packet
server
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.)
Active
Application number
CN201811269401.1A
Other languages
Chinese (zh)
Other versions
CN109451596A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811269401.1A priority Critical patent/CN109451596B/en
Publication of CN109451596A publication Critical patent/CN109451596A/en
Application granted granted Critical
Publication of CN109451596B publication Critical patent/CN109451596B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • H04W76/16Involving different core network technologies, e.g. a packet-switched [PS] bearer in combination with a circuit-switched [CS] bearer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a data transmission method and a related device, which are applied to electronic equipment, wherein the electronic equipment enables a plurality of wireless communication links, and the method comprises the following steps: acquiring a first data packet to be sent; when the first data packet is detected to be sent for the first time, a first message is sent to a server through a first wireless communication link in the multiple wireless communication links, and a second message is sent to the server through a second wireless communication link, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP); when a third message from the server is received, determining a wireless communication link corresponding to the third message, and sending the first data packet through a network interface of the corresponding wireless communication link, where the third message is used to indicate that the server receives the first message or the second message. The present application facilitates link optimization in link aggregation.

Description

Data transmission method and related device
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a data transmission method and a related apparatus.
Background
With the development of mobile communication technology, the demand of users for data communication is increasing, and when data transmission is performed on an intelligent terminal in the market at present, data is generally sent in a cellular mobile network communication mode or a Wi-Fi communication mode, and the intelligent terminal needs to compete for wireless link resources with other devices in the same area, so that the demand of users on surfing the internet is difficult to meet.
Disclosure of Invention
The embodiment of the application provides a data transmission method and a related device, so as to improve the stability and reliability of data transmission and improve the transmission efficiency.
In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to an electronic device, where the electronic device enables multiple wireless communication links, and the method includes:
acquiring a first data packet to be sent;
when the first data packet is detected to be sent for the first time, a first message is sent to a server through a first wireless communication link in the multiple wireless communication links, and a second message is sent to the server through a second wireless communication link, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP);
when a third message from the server is received, determining a wireless communication link corresponding to the third message, and sending the first data packet through a network interface of the corresponding wireless communication link, where the third message is used to indicate that the server receives the first message or the second message.
In a second aspect, an embodiment of the present application provides a data transmission apparatus, which is applied to an electronic device, and includes a processing unit and a communication unit, wherein,
the processing unit is used for acquiring a first data packet to be sent through the communication unit; when detecting that the first data packet is sent for the first time, sending a first message to a server through a first wireless communication link in the plurality of wireless communication links by the communication unit, and sending a second message to the server through a second wireless communication link by the communication unit, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP); and when a third message from the server is received through the communication unit, determining a wireless communication link corresponding to the third message, and sending the first data packet through a network interface of the corresponding wireless communication link, where the third message is used to indicate that the server receives the first message or the second message.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in this embodiment of the application, an electronic device first obtains a first data packet to be sent, and then, when it is detected that the first data packet is sent for the first time, sends a first packet to a server through a first wireless communication link in a plurality of wireless communication links, and sends a second packet to the server through a second wireless communication link, where the first packet and the second packet are synchronization sequence number SYN packets in a transmission control protocol TCP, and finally, when a third packet from the server is received, determines a wireless communication link corresponding to the third packet, and sends the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet. Because the electronic equipment can simultaneously send the first message to the server through the first wireless communication link and send the second message through the second wireless communication link, when receiving the third message from the server, the server can determine whether the first message or the second message is received first, so that the first wireless communication link or the second wireless communication link is selected to send the first data packet, the optimization of the wireless communication link is realized according to the rule of preferentially replying the preferential use, and the efficiency of data packet transmission is favorably improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
Fig. 1 is a diagram of an example system architecture of a wireless communication system in which an electronic device according to an embodiment of the present application is located;
fig. 2A is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 2B is a diagram of a reference example of message transmission according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another data transmission method provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of another data transmission method provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of a data transmission apparatus according to an embodiment of the present disclosure.
Detailed description of the invention
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.
The following are detailed below.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device according to the embodiment of the present application may be an electronic device with data transmission capability, and the electronic device may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like.
The following describes embodiments of the present application in detail.
Link aggregation refers to enabling a device to use two or more ports to access the internet at the same time, for example, a mobile phone uses Wi-Fi and LTE to access the network at the same time through link aggregation. an android network system, when Wi-Fi is enabled, may result in unavailability of a data network (connectivity Service network scoring mechanism results in disconnection of the data network), and link aggregation requires at least two or more available networks, so a prerequisite of a Service-Level Agreement (abbreviated as SLA) is to make Wi-Fi and the data network coexist. As shown in fig. 1, an electronic device 101 may be connected to a data network 103, which is a communication network for transmitting data traffic; Wi-Fi 102, a technology that allows an electronic device to connect to a wireless local area network, typically using the 2.4G UHF or 5G SHF ISM radio frequency bands; bluetooth 104, a wireless technology standard, may also be connected, enabling short-range data exchange (using UHF radio waves in the ISM band of 2.4-2.485 GHz) between fixed devices, mobile devices and building personal area networks, etc.
Referring to fig. 2A, fig. 2A is a schematic flowchart of a data transmission method applied to an electronic device according to an embodiment of the present application. The data transmission method comprises the following steps:
s201, the electronic equipment acquires a first data packet to be sent.
S202, when detecting that the first data packet is sent for the first time, the electronic device sends a first message to a server through a first wireless communication link in the multiple wireless communication links, and sends a second message to the server through a second wireless communication link, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP).
When sending a data packet to a network, the electronic device needs to acquire the right to access the network first, and after the three-way handshake of the transport layer is successful, the electronic device can send the first data packet to the server. In the prior art, an electronic device first sends a synchronization sequence number (SYN) message to a server through WIFI or a data network, and then sends an ACK message to the server when receiving the SYN and Acknowledgement Character (ACK) messages from the server, that is, three-way handshaking is completed, so that transmission of a data packet can be performed.
In the application, when it is detected that the first data packet is sent for the first time, a first message may be sent to the server through the first wireless communication link, and a second message may be sent to the server through the second wireless communication link, where the first message and the second message are SYN messages in a Transmission Control Protocol (TCP), and the first message may be copied to obtain the second message.
S203, when receiving a third packet from the server, the electronic device determines a wireless communication link corresponding to the third packet, and sends the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet.
When the electronic device receives a third message from the server, that is, it indicates that the server receives the first message or the second message, the wireless communication link corresponding to the third message may be determined, and the first data packet is sent through the network interface of the corresponding wireless communication link, where the corresponding wireless communication link is the first wireless communication link or the second wireless communication link, and the third message is a SYN + ACK message in a transmission control protocol TCP.
For example, the corresponding wireless communication link is a first wireless communication link, which indicates that although the first wireless communication link and the second wireless communication link simultaneously transmit SYN messages to the server, the server transmits a third message through the first wireless communication link, that is, the server first receives the first message and responds to the electronic device, and the second wireless communication link may not successfully transmit the second message or has a slower transmission speed, so that the first wireless communication link may be more suitable for transmitting the first data packet than the second wireless communication link, and thus, the three-way handshake between the electronic device and the server may be continued through the first wireless communication link, and the first data packet may be transmitted through the first wireless communication link after the TCP connection is successfully established.
It can be seen that, in this embodiment of the application, an electronic device first obtains a first data packet to be sent, and then, when it is detected that the first data packet is sent for the first time, sends a first packet to a server through a first wireless communication link in a plurality of wireless communication links, and sends a second packet to the server through a second wireless communication link, where the first packet and the second packet are synchronization sequence number SYN packets in a transmission control protocol TCP, and finally, when a third packet from the server is received, determines a wireless communication link corresponding to the third packet, and sends the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet. Because the electronic equipment can simultaneously send the first message to the server through the first wireless communication link and send the second message through the second wireless communication link, when receiving the third message from the server, the server can determine whether the first message or the second message is received first, so that the first wireless communication link or the second wireless communication link is selected to send the first data packet.
In one possible example, the determining a wireless communication link corresponding to the third packet and sending the first data packet through a network interface of the corresponding wireless communication link includes: determining that a wireless communication link for transmitting the third message is a first wireless communication link; marking the first data packet according to a first link identification of the first wireless communication link; and selecting a network interface of the first wireless communication link according to the first link identification to send the first data packet.
The server receives the first message sent by the first wireless communication link, and then replies a third message to the electronic device, or the server receives the second message sent by the second wireless communication link, and then replies the third message by the second wireless communication link.
If the wireless communication link for transmitting the third packet is determined to be the first wireless communication link, the first data packet may be sent after the network interface of the first wireless communication link is selected according to the first link identifier after the first data packet is marked according to the first link identifier of the first wireless link. The link identification is used to label the wireless communication link.
Wherein the server transmits the third message to the electronic device only through the first wireless communication link after receiving the first message transmitted through the first wireless communication link, thereby responding to the first message without any response even when receiving the second message transmitted through the second wireless communication link.
As can be seen, in this example, after receiving the third packet sent by the server through the first wireless communication link, the electronic device completes the second handshake in the TCP protocol, so that it can be determined that the data transmission quality of the first wireless communication link is better than that of the second wireless communication link.
In one possible example, the determining a wireless communication link corresponding to the third packet and sending the first data packet through a network interface of the corresponding wireless communication link includes: determining a wireless communication link for transmitting the third message as a second wireless communication link; marking the first data packet according to a second link identification of the second wireless communication link; and selecting the network interface of the second wireless communication link according to the second link identification to send the first data packet.
If the wireless communication link for transmitting the third packet is determined to be the second wireless communication link, the first data packet may be sent after the network interface of the second wireless communication link is selected according to the second link identifier after the first data packet is marked according to the second link identifier of the second wireless link.
Wherein the server transmits the third message to the electronic device only through the second wireless communication link after receiving the first message transmitted through the second wireless communication link, thereby responding to the first message without any response even if the first message transmitted through the first wireless communication link is received.
As can be seen, in this example, after receiving the third packet sent by the server through the second wireless communication link, the electronic device completes the second handshake in the TCP protocol, so that it can be determined that the data transmission quality of the second wireless communication link is better than the data transmission quality of the first wireless communication link.
In one possible example, after determining the wireless communication link corresponding to the third packet, the method further includes: sending a fourth message to the server through the corresponding wireless communication link, wherein the fourth message is used for indicating the electronic equipment to receive the third message; and after the server receives the fourth message, determining to transmit the first data packet through the network interface of the corresponding wireless communication link.
After the wireless communication link corresponding to the third message is determined, the electronic device also sends a fourth message to the server through the corresponding wireless communication link, so that the server is informed of receiving the third message sent by the server, at this time, three-way handshake in the TCP protocol is completed, and the electronic device can access the server through the corresponding wireless communication link.
For example, as shown in fig. 2B, the electronic device simultaneously sends a first message and a second message to the server through the first wireless communication link and the second wireless communication link, the server sends a third message to the electronic device through the first wireless communication link after receiving the first message, and the electronic device sends a fourth message to the server through the first wireless communication link after receiving the third message, so that three-way handshake is completed.
As can be seen, in this example, the electronic device sends the fourth packet to the server through the wireless communication link corresponding to the third packet, so that three-way handshake in the TCP protocol is completed, and after the server receives the fourth packet, it is determined that the first data packet is sent through the network interface of the corresponding wireless communication link.
In one possible example, the method further comprises: if the first data packet is detected not to be sent for the first time, acquiring a link identification of the first data packet; when the link identification is detected to be a first link identification, determining that a wireless communication link for sending the first data packet for the first time is a first wireless communication link; and selecting a second link identification of a second wireless communication link to mark the first data packet, and selecting a network interface of the second wireless communication link to send the first data packet according to the second link identification, wherein the second wireless communication link is a wireless communication link except the first wireless communication link.
The situation that the electronic device detects that the first data packet is not sent for the first time means that the electronic device sends a SYN message to the server, but does not get a response from the server, which may be caused by poor channel quality of a wireless communication link sending the first data packet for the first time. In this case, the electronic device may select a wireless communication link other than the wireless communication link according to a wireless module provided in the electronic device.
The link identifier of the first data packet is obtained, when the link identifier is detected to be the first link identifier, it is determined that the first data packet is transmitted for the first time through the first wireless communication link, at this time, a second link identifier of a second wireless communication link needs to be selected to mark the first data packet, and the first data packet is transmitted through the second wireless communication link, where the second wireless communication link is a wireless communication link other than the first wireless communication link.
In this example, after the first data packet is failed to be transmitted through the first wireless communication link, the second wireless communication link is selected to transmit the first data packet, the second link identifier of the second wireless communication link is selected to mark the first data packet, and the network interface of the second wireless communication link is selected according to the second link identifier to transmit the first data packet, so that the success rate of data transmission can be improved.
In one possible example, the first communication link is a WIFI wireless communication link and the second communication link is a long term evolution LTE wireless communication link.
It can be seen that, in this example, when electronic device and server handshake for the first time, WIFI wireless communication link and LTE wireless communication link can handshake for the first time simultaneously, and through the preferred link, confirm that it transmits first data packet through which communication link, be favorable to improving data transmission's stability.
In one possible example, the first data packet is a data packet generated by the local terminal of the electronic device; or, the first data packet is a data packet to be forwarded and received by the electronic device.
Therefore, the electronic equipment can not only transmit the data packet generated by the equipment, but also forward the data packet, so that the diversity of data transmission tasks is ensured.
Referring to fig. 3, fig. 3 is a schematic flowchart of a data transmission method according to an embodiment of the present application, and the method is applied to an electronic device, where the electronic device enables multiple wireless communication links. As shown in the figure, the data transmission method includes:
s301, the electronic equipment acquires a first data packet to be sent.
S302, when detecting that the first data packet is sent for the first time, the electronic device sends a first message to a server through a first wireless communication link in the multiple wireless communication links, and sends a second message to the server through a second wireless communication link, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP).
S303, when receiving a third packet from the server, the electronic device determines that a wireless communication link transmitting the third packet is a first wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet.
S304, the electronic device marks the first data packet according to the first link identification of the first wireless communication link.
S305, the electronic device selects a network interface of the first wireless communication link according to the first link identifier to send the first data packet.
It can be seen that, in this embodiment of the application, an electronic device first obtains a first data packet to be sent, and then, when it is detected that the first data packet is sent for the first time, sends a first packet to a server through a first wireless communication link in a plurality of wireless communication links, and sends a second packet to the server through a second wireless communication link, where the first packet and the second packet are synchronization sequence number SYN packets in a transmission control protocol TCP, and finally, when a third packet from the server is received, determines a wireless communication link corresponding to the third packet, and sends the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet. Because the electronic equipment can simultaneously send the first message to the server through the first wireless communication link and send the second message through the second wireless communication link, when receiving the third message from the server, the server can determine whether the first message or the second message is received first, so that the first wireless communication link or the second wireless communication link is selected to send the first data packet.
In addition, after receiving the third message sent by the server through the first wireless communication link, the electronic device completes the second handshake in the TCP protocol, so that it can be determined that the data transmission quality of the first wireless communication link is better than that of the second wireless communication link.
Referring to fig. 4, fig. 4 is a schematic flowchart of a data transmission method provided in an embodiment of the present application, and the method is applied to an electronic device, where the electronic device enables multiple wireless communication links, consistent with the embodiments shown in fig. 2A and fig. 3. As shown in the figure, the data transmission method includes:
s401, the electronic equipment acquires a first data packet to be sent.
S402, when detecting that the first data packet is sent for the first time, the electronic device sends a first message to a server through a first wireless communication link in the multiple wireless communication links, and sends a second message to the server through a second wireless communication link, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP).
S403, when receiving a third packet from the server, the electronic device determines that a wireless communication link transmitting the third packet is a first wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet.
S404, the electronic device sends a fourth message to the server through the first wireless communication link, wherein the fourth message is used for indicating the electronic device to receive the third message.
S405, after the server receives the fourth packet, the electronic device marks the first data packet according to the first link identifier of the first wireless communication link.
S406, the electronic device selects a network interface of the first wireless communication link according to the first link identifier to send the first data packet.
It can be seen that, in this embodiment of the application, an electronic device first obtains a first data packet to be sent, and then, when it is detected that the first data packet is sent for the first time, sends a first packet to a server through a first wireless communication link in a plurality of wireless communication links, and sends a second packet to the server through a second wireless communication link, where the first packet and the second packet are synchronization sequence number SYN packets in a transmission control protocol TCP, and finally, when a third packet from the server is received, determines a wireless communication link corresponding to the third packet, and sends the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet. Because the electronic equipment can simultaneously send the first message to the server through the first wireless communication link and send the second message through the second wireless communication link, when receiving the third message from the server, the server can determine whether the first message or the second message is received first, so that the first wireless communication link or the second wireless communication link is selected to send the first data packet.
In addition, after receiving the third message sent by the server through the first wireless communication link, the electronic device completes the second handshake in the TCP protocol, so that it can be determined that the data transmission quality of the first wireless communication link is better than that of the second wireless communication link.
In addition, the electronic device sends a fourth message to the server through the wireless communication link corresponding to the third message, so that three-way handshake in the TCP protocol is completed, and after the server receives the fourth message, it is determined that the first data packet is sent through the network interface of the corresponding wireless communication link.
Consistent with the embodiments shown in fig. 2A, fig. 3, and fig. 4, please refer to fig. 5, fig. 5 is a schematic structural diagram of an electronic device 500 provided in an embodiment of the present application, where the electronic device 500 runs one or more application programs and an operating system, as shown, the electronic device 500 includes a processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the processor 510, and the one or more programs 521 include instructions for performing the following steps;
acquiring a first data packet to be sent;
when the first data packet is detected to be sent for the first time, a first message is sent to a server through a first wireless communication link in the multiple wireless communication links, and a second message is sent to the server through a second wireless communication link, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP);
when a third message from the server is received, determining a wireless communication link corresponding to the third message, and sending the first data packet through a network interface of the corresponding wireless communication link, where the third message is used to indicate that the server receives the first message or the second message.
It can be seen that, in this embodiment of the application, an electronic device first obtains a first data packet to be sent, and then, when it is detected that the first data packet is sent for the first time, sends a first packet to a server through a first wireless communication link in a plurality of wireless communication links, and sends a second packet to the server through a second wireless communication link, where the first packet and the second packet are synchronization sequence number SYN packets in a transmission control protocol TCP, and finally, when a third packet from the server is received, determines a wireless communication link corresponding to the third packet, and sends the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet. Because the electronic equipment can simultaneously send the first message to the server through the first wireless communication link and send the second message through the second wireless communication link, when receiving the third message from the server, the server can determine whether the first message or the second message is received first, so that the first wireless communication link or the second wireless communication link is selected to send the first data packet.
In one possible example, in the aspect of determining the wireless communication link corresponding to the third packet, and sending the first data packet through the network interface of the corresponding wireless communication link, the instructions in the program are specifically configured to perform the following operations: determining that a wireless communication link for transmitting the third message is a first wireless communication link; marking the first data packet according to a first link identification of the first wireless communication link; and selecting a network interface of the first wireless communication link according to the first link identification to send the first data packet.
In one possible example, in the aspect of determining the wireless communication link corresponding to the third packet, and sending the first data packet through the network interface of the corresponding wireless communication link, the instructions in the program are specifically configured to perform the following operations: determining a wireless communication link for transmitting the third message as a second wireless communication link; marking the first data packet according to a second link identification of the second wireless communication link; and selecting the network interface of the second wireless communication link according to the second link identification to send the first data packet.
In a possible example, after determining the wireless communication link corresponding to the third packet, the instructions in the program are specifically configured to perform the following operations: sending a fourth message to the server through the corresponding wireless communication link, wherein the fourth message is used for indicating the electronic equipment to receive the third message; and after the server receives the fourth message, determining to transmit the first data packet through the network interface of the corresponding wireless communication link.
In one possible example, the instructions in the program are specifically for performing the following: if the first data packet is detected not to be sent for the first time, acquiring a link identification of the first data packet; when the link identification is detected to be a first link identification, determining that a wireless communication link for sending the first data packet for the first time is a first wireless communication link; and selecting a second link identification of a second wireless communication link to mark the first data packet, and selecting a network interface of the second wireless communication link to send the first data packet according to the second link identification, wherein the second wireless communication link is a wireless communication link except the first wireless communication link.
In one possible example, the first communication link is a WIFI wireless communication link and the second communication link is a long term evolution LTE wireless communication link.
In one possible example, the first data packet is a data packet generated by the local terminal of the electronic device; or, the first data packet is a data packet to be forwarded and received by the electronic device.
The above embodiments mainly introduce the scheme of the embodiments of the present application from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a block diagram of functional units of a data transmission device 600 according to an embodiment of the present application. The data transmission apparatus 600 is applied to an electronic device, and comprises a processing unit 602 and a communication unit 603, wherein,
the processing unit 602 is configured to obtain a first data packet to be sent through the communication unit 603; when detecting that the first data packet is sent for the first time, sending a first message to a server through the communication unit 603 to a first wireless communication link in the multiple wireless communication links, and sending a second message to the server through the communication unit 603 to a second wireless communication link, where the first message and the second message are SYN messages in a Transmission Control Protocol (TCP); and when receiving a third packet from the server through the communication unit 603, determining a wireless communication link corresponding to the third packet, and sending the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet.
The data transmission apparatus 600 may further include a storage unit 601 for storing program codes and data of the electronic device. The processing unit 602 may be a processor, the communication unit 603 may be a touch display screen or a transceiver, and the storage unit 601 may be a memory.
It can be seen that, in this embodiment of the application, an electronic device first obtains a first data packet to be sent, and then, when it is detected that the first data packet is sent for the first time, sends a first packet to a server through a first wireless communication link in a plurality of wireless communication links, and sends a second packet to the server through a second wireless communication link, where the first packet and the second packet are synchronization sequence number SYN packets in a transmission control protocol TCP, and finally, when a third packet from the server is received, determines a wireless communication link corresponding to the third packet, and sends the first data packet through a network interface of the corresponding wireless communication link, where the third packet is used to indicate that the server receives the first packet or the second packet. Because the electronic equipment can simultaneously send the first message to the server through the first wireless communication link and send the second message through the second wireless communication link, when receiving the third message from the server, the server can determine whether the first message or the second message is received first, so that the first wireless communication link or the second wireless communication link is selected to send the first data packet.
In a possible example, in the aspect of determining a wireless communication link corresponding to the third packet and sending the first data packet through a network interface of the corresponding wireless communication link, the processing unit 602 is specifically configured to: determining that a wireless communication link for transmitting the third message is a first wireless communication link; and for marking the first data packet according to a first link identification of the first wireless communication link; and a network interface for selecting the first wireless communication link according to the first link identification to transmit the first data packet.
In a possible example, in the aspect that at least one neighboring device of the multiple neighboring devices is selected according to the feedback information, and the target data is obtained from the at least one neighboring device, the processing unit 602 is specifically configured to: determining a wireless communication link for transmitting the third message as a second wireless communication link; and for marking the first data packet in accordance with a second link identification of the second wireless communication link; and the network interface used for selecting the second wireless communication link according to the second link identification is used for sending the first data packet.
In a possible example, after determining the wireless communication link corresponding to the third packet, the processing unit 602 is specifically configured to: sending a fourth message to the server through the corresponding wireless communication link, wherein the fourth message is used for indicating the electronic equipment to receive the third message; and the server is used for determining to send the first data packet through the network interface of the corresponding wireless communication link after receiving the fourth message.
In one possible example, the processing unit 602 is specifically configured to: if the first data packet is detected not to be sent for the first time, acquiring a link identification of the first data packet; and the wireless communication link used for sending the first data packet for the first time is determined as a first wireless communication link when the link identifier is detected as a first link identifier; and marking the first data packet by a second link identification used for selecting a second wireless communication link, and selecting a network interface of the second wireless communication link according to the second link identification to send the first data packet, wherein the second wireless communication link is a wireless communication link except the first wireless communication link.
In one possible example, the first communication link is a WIFI wireless communication link and the second communication link is a long term evolution LTE wireless communication link.
In one possible example, the first data packet is a data packet generated by the local terminal of the electronic device; or, the first data packet is a data packet to be forwarded and received by the electronic device.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, 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 of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. A data transmission method applied to an electronic device, the electronic device enabling a plurality of wireless communication links, the method comprising:
acquiring a first data packet to be sent;
when the first data packet is detected to be sent for the first time, a first message is sent to a server through a first wireless communication link in the multiple wireless communication links, and a second message is sent to the server through a second wireless communication link, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP);
when a third message from the server is received, determining a wireless communication link corresponding to the third message, and sending the first data packet through a network interface of the corresponding wireless communication link, where the third message is used to indicate that the server receives the first message or the second message; the server replies the third message to the electronic device after receiving the first message or the second message sent by the electronic device, and if receiving the first message sent by the first wireless communication link, the server replies the third message by the first wireless communication link, or if receiving the second message sent by the second wireless communication link, the server replies the third message by the second wireless communication link; the server transmitting the third message to the electronic device only through the first wireless communication link after receiving the first message transmitted through the first wireless communication link, thereby responding to the first message without any response even if receiving the second message transmitted through the second wireless communication link;
the method further comprises the following steps:
if the first data packet is detected not to be sent for the first time, acquiring a link identification of the first data packet; the condition that the electronic device detects that the first data packet is not sent for the first time means that the electronic device sends a SYN message to the server but does not get a response from the server, and the electronic device selects other wireless communication links except the wireless communication link for sending the first data packet for the first time according to a wireless module of the electronic device;
when the link identification is detected to be a first link identification, determining that a wireless communication link for sending the first data packet for the first time is a first wireless communication link;
and selecting a second link identification of a second wireless communication link to mark the first data packet, and selecting a network interface of the second wireless communication link to send the first data packet according to the second link identification, wherein the second wireless communication link is a wireless communication link except the first wireless communication link.
2. The method of claim 1, wherein the determining the wireless communication link corresponding to the third packet and sending the first packet through the network interface of the corresponding wireless communication link comprises:
determining that a wireless communication link for transmitting the third message is a first wireless communication link;
marking the first data packet according to a first link identification of the first wireless communication link;
and selecting a network interface of the first wireless communication link according to the first link identification to send the first data packet.
3. The method of claim 1, wherein the determining the wireless communication link corresponding to the third packet and sending the first packet through the network interface of the corresponding wireless communication link comprises:
determining a wireless communication link for transmitting the third message as a second wireless communication link;
marking the first data packet according to a second link identification of the second wireless communication link;
and selecting the network interface of the second wireless communication link according to the second link identification to send the first data packet.
4. The method according to any of claims 1-3, after determining the wireless communication link corresponding to the third packet, the method further comprising:
sending a fourth message to the server through the corresponding wireless communication link, wherein the fourth message is used for indicating the electronic equipment to receive the third message;
and after the server receives the fourth message, determining to transmit the first data packet through the network interface of the corresponding wireless communication link.
5. The method of claim 1, wherein the first wireless communication link is a WIFI wireless communication link and the second wireless communication link is a long term evolution LTE wireless communication link.
6. The method according to claim 1, wherein the first data packet is a data packet generated locally by the electronic device; alternatively, the first and second electrodes may be,
the first data packet is a data packet to be forwarded and received by the electronic equipment.
7. A data transmission arrangement for an electronic device enabling a plurality of wireless communication links, the data transmission arrangement comprising a processing unit and a communication unit, wherein,
the processing unit is used for acquiring a first data packet to be sent through the communication unit; when detecting that the first data packet is sent for the first time, sending a first message to a server through a first wireless communication link in the plurality of wireless communication links by the communication unit, and sending a second message to the server through a second wireless communication link by the communication unit, wherein the first message and the second message are synchronization sequence number (SYN) messages in a Transmission Control Protocol (TCP); when a third message from the server is received through the communication unit, determining a wireless communication link corresponding to the third message, and sending the first data packet through a network interface of the corresponding wireless communication link, where the third message is used to indicate that the server receives the first message or the second message; the server replies the third message to the electronic device after receiving the first message or the second message sent by the electronic device, and if receiving the first message sent by the first wireless communication link, the server replies the third message by the first wireless communication link, or if receiving the second message sent by the second wireless communication link, the server replies the third message by the second wireless communication link; the server transmitting the third message to the electronic device only through the first wireless communication link after receiving the first message transmitted through the first wireless communication link, thereby responding to the first message without any response even if receiving the second message transmitted through the second wireless communication link;
the processing unit is further configured to obtain a link identifier of the first data packet if it is detected that the first data packet is not sent for the first time; the condition that the electronic device detects that the first data packet is not sent for the first time means that the electronic device sends a SYN message to the server but does not get a response from the server, and the electronic device selects other wireless communication links except the wireless communication link for sending the first data packet for the first time according to a wireless module of the electronic device; when the link identification is detected to be a first link identification, determining that a wireless communication link for sending the first data packet for the first time is a first wireless communication link; and selecting a second link identification of a second wireless communication link to mark the first data packet, and selecting a network interface of the second wireless communication link according to the second link identification to transmit the first data packet, wherein the second wireless communication link is a wireless communication link except the first wireless communication link.
8. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-6.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-6.
CN201811269401.1A 2018-10-29 2018-10-29 Data transmission method and related device Active CN109451596B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811269401.1A CN109451596B (en) 2018-10-29 2018-10-29 Data transmission method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811269401.1A CN109451596B (en) 2018-10-29 2018-10-29 Data transmission method and related device

Publications (2)

Publication Number Publication Date
CN109451596A CN109451596A (en) 2019-03-08
CN109451596B true CN109451596B (en) 2021-03-09

Family

ID=65548845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811269401.1A Active CN109451596B (en) 2018-10-29 2018-10-29 Data transmission method and related device

Country Status (1)

Country Link
CN (1) CN109451596B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542836B (en) * 2021-07-06 2023-05-16 腾讯科技(深圳)有限公司 Remote control method and device, electronic equipment and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369987A (en) * 2007-08-16 2009-02-18 阿里巴巴集团控股有限公司 Method and apparatus for establishing communication channel
CN105704759A (en) * 2011-05-27 2016-06-22 上海华为技术有限公司 Data stream transmission method and network equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530194A (en) * 2014-09-29 2016-04-27 中国电信股份有限公司 Method and system for controlling message forwarding on the basis of quality sensing
CN105827747A (en) * 2016-04-28 2016-08-03 深圳市先河***技术有限公司 Website access method, client and server within local area network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369987A (en) * 2007-08-16 2009-02-18 阿里巴巴集团控股有限公司 Method and apparatus for establishing communication channel
CN105704759A (en) * 2011-05-27 2016-06-22 上海华为技术有限公司 Data stream transmission method and network equipment

Also Published As

Publication number Publication date
CN109451596A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109041262B (en) Data transmission method and related device
CN109495880B (en) Data transmission method and related device
CN111836329B (en) Data transmission method and related device
CN110049505B (en) Data transmission method and related device
CN106793090B (en) The selection method and system of D2D direct communication resources
US10986523B2 (en) Method for configuring measurement gap, access network device and terminal
CN109155958B (en) Method for switching to relay node, related equipment and system
CN109743783B (en) Data transmission control method and related product
CN109274596B (en) Data transmission method and related device
JP2018504067A (en) System and method for dynamic band switching
CN109526020B (en) Data transmission method and related product
CN109560899B (en) Method and equipment for repeated transmission
CN111698755B (en) URSP rule-based application data routing method and user equipment
CN109587336B (en) Data transmission method and related device
JP2023500121A (en) Running multipath communication
CN109041078B (en) Service data transmission method and device
WO2019169959A1 (en) Data confirmation method and device
CN109451596B (en) Data transmission method and related device
CN109392018B (en) Data transmission method and related device
KR20140066692A (en) Method and apparatus of relay-initiated relay teardown operations in wireless networks
CN109803283B (en) Wireless communication method and communication equipment
EP3982684A1 (en) Signaling transmission method and device, signaling receiving method and device, storage medium, and terminal
CN110087225B (en) Message processing method and related device
US20160072668A1 (en) Service Data Offloading Method, Access Network Device, and Terminal
CN111954261B (en) Uplink Harq sending method and related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant