WO2022002215A1 - 传输数据的方法和装置 - Google Patents

传输数据的方法和装置 Download PDF

Info

Publication number
WO2022002215A1
WO2022002215A1 PCT/CN2021/104079 CN2021104079W WO2022002215A1 WO 2022002215 A1 WO2022002215 A1 WO 2022002215A1 CN 2021104079 W CN2021104079 W CN 2021104079W WO 2022002215 A1 WO2022002215 A1 WO 2022002215A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
tcp
channel
network entry
option
Prior art date
Application number
PCT/CN2021/104079
Other languages
English (en)
French (fr)
Inventor
梁乾灯
康娇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022002215A1 publication Critical patent/WO2022002215A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/19Flow control; Congestion control at layers above the network layer
    • H04L47/193Flow control; Congestion control at layers above the network layer at the transport layer, e.g. TCP related
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Definitions

  • the present application relates to the field of communications, and more particularly to a method and apparatus for transmitting data in the field of communications.
  • Multipath Transmission Control Protocol is a transmission protocol that transmits concurrently through multiple paths. Multiple sub-channels of an MPTCP session can be established through MPTCP, so that transmission control protocol (transmission control protocol, TCP) packets of an MPTCP session can be transmitted through multiple sub-channels.
  • TCP transmission control protocol
  • the client can control the transmission of data traffic on multiple sub-channels according to local policies.
  • the server expects the receiving end to control the transmission of data traffic on multiple sub-channels according to the policy of the server, such as during congestion or switching operations.
  • the server expects the client to transmit data traffic according to the server's expectations.
  • the server can send the TCP options for sub-stream rate limiting to the client on the current sub-channel.
  • the data traffic on the sub-channel is rate-limited, but this will easily cause packet loss and poor transmission performance, or it may be possible to switch the data traffic on the current sub-channel to one or more other sub-channels. If there are multiple sub-channels, The client can select a sub-channel from multiple sub-channels to transmit the switched data traffic according to the local policy, so the client still cannot select the sub-channel according to the network entry expected by the server, and thus cannot meet the needs of the server for active navigation.
  • the embodiments of the present application provide a data transmission method and apparatus, which can improve transmission performance. It can also meet the needs of active navigation on the server side.
  • a first aspect provides a method for transmitting data, wherein a first device receives a first transmission control protocol TCP option sent by a second device through a first subchannel, the first TCP option includes an identifier of a target network entry, the The identifier of the target network portal is used to identify the target network portal where the second device provides services to the first device;
  • the first device determines a second sub-channel according to the identifier of the target network entry in the first TCP option
  • the first device switches the data to be transmitted on the first subchannel to the second subchannel for transmission to the second device.
  • the second device may be a server
  • the first device may be a client.
  • the client can switch the data on the first sub-channel receiving the first TCP option to the identifier of the target network entry expected by the server.
  • the transmission on the corresponding second sub-channel for example, in the case of congestion or switching of operators, can avoid data loss on the first sub-channel, and can also meet the active navigation requirements of the server.
  • the method is applied in an MPTCP scenario.
  • the first subchannel and the second subchannel may be two subchannels corresponding to one MPTCP session.
  • the first device may be a server
  • the second device may be a client.
  • the server may switch the data on the first sub-channel receiving the first TCP option to the identifier of the target network entry expected by the client.
  • the transmission on the corresponding second sub-channel for example, in the case of congestion or switching of operators, can avoid data loss on the first sub-channel, and can also meet the needs of the client for active navigation.
  • the first device may send a TCP data packet or a TCP control packet to the second device, where the TCP data packet or the TCP control packet carries the first TCP option.
  • the header of the TCP data packet or the header of the TCP control packet may carry the first TCP option.
  • the data to be transmitted on the first subchannel may be data of a certain application initiated by the first device.
  • the first device switching the data to be transmitted on the first subchannel to the second subchannel for transmission to the second device includes: the first device switching the data to be transmitted on the first subchannel
  • the data generates a first TCP data packet according to the encapsulation format of the second sub-channel and the sequence number criterion and sends it to the second device.
  • the encapsulation formats of the TCP data packets on the first sub-channel and the second sub-channel may be different or the same, which is not limited in this application.
  • the first TCP option includes a first field and a second field
  • the first field takes a first value
  • the second field is used to carry the target network entry
  • the first value is used to indicate that the identifier of the target network entry carried by the second field is used to determine the second sub-channel.
  • the method further includes: the first device determines, according to the first value of the first field, the identifier of the target network portal carried by the second field for determining the target network entry. the second sub-channel.
  • the first value may be specified by the protocol or preset.
  • the positions of the first field and the second field in the first TCP option are preset fixed positions, and the protocol may specify the positions of the first field and the second field in the first TCP option.
  • the first device and the second device can determine the location of the first field and the second field according to the protocol specification.
  • the target network entry corresponds to one or more sub-channels; wherein, the first device determines the second sub-channel according to the identifier of the target network entry in the first TCP option,
  • the method includes: determining, by the first device, the second sub-channel in the one or more sub-channels according to a local policy.
  • the sub-channel is the second sub-channel; if the identifier of the target network entry corresponds to multiple sub-channels, the first device can select from the multiple sub-channels according to the local policy One sub-channel acts as the second sub-channel.
  • the first device receiving the first TCP option sent by the second device through the first subchannel includes: the first device receiving the second device through the first subchannel The sent second TCP data packet, where the second TCP data packet includes the first TCP option.
  • the packet header of the second TCP data packet carries the first TCP option
  • the packet body of the second TCP data packet includes a data part
  • the data part corresponds to the application fed back by the server when the client initiates an application.
  • the first device receiving the first TCP option sent by the second device through the first subchannel includes: the first device receiving the second device through the first subchannel The sent first TCP control packet, where the first TCP control packet includes the first TCP option.
  • the first TCP control packet may be a TCP control packet sent by any server to the client, such as a response packet or a keep-alive packet of a TCP data packet.
  • the method further includes: the first device The first sub-channel is maintained undisconnected.
  • the client and the server can maintain the first sub-channel from being disconnected, the client and the server can send a TCP keep-alive message through the first sub-channel.
  • the subsequent data that is switched to the second sub-channel and originally transmitted on the first sub-channel needs to be switched back to the first sub-channel, it can be quickly switched back to the first sub-channel, avoiding the need for the client and the server to re-establish Delay caused by the first sub-channel.
  • the method further includes: the first device receives a second TCP control packet from the second device on the first subchannel, the second TCP control packet
  • the document includes a second TCP option, the second TCP option is used to revoke the first TCP option;
  • the first device continues to transmit a third TCP data packet on the first sub-channel according to the second TCP option, where the third TCP data packet is TCP data to be transmitted on the first sub-channel message.
  • the second device determines that it does not need to switch the data on the first sub-channel to the second sub-channel, and needs to change the data of the first sub-channel to the second sub-channel.
  • the second device can send a second TCP control packet on the first sub-channel, and the second TCP option included in the second TCP control packet is used to The data transmitted on the channel is switched back to the first sub-channel, so that the flexibility of navigation can be improved.
  • the format of the second TCP option is the same as that of the first TCP option
  • the value of the third field in the second TCP option is a second value
  • the second The value is used to indicate revocation of the first TCP option.
  • the formats of the first TCP option and the second TCP option may also be different, which are not limited in this application.
  • the first field of the first TCP option and the third field of the second TCP option may be the same field or different fields, which are not limited in this application.
  • the method further includes: the first device deletes, by the first device, navigation information corresponding to the identifier of the target network entry, where the navigation information is the first device according to the identification of the target network entry.
  • the generated information for determining the second sub-channel is identified.
  • the navigation information required by the first device to switch the data to be transmitted on the first sub-channel to the second sub-channel is deleted, which can save the storage of navigation information. s expenses.
  • the The method also includes:
  • the first device deletes the navigation information corresponding to the identifier of the target network entry and the configuration information of the first sub-channel, where the navigation information is generated by the first device according to the identifier of the target network entry for Information of the second subchannel is determined.
  • the configuration information of the first subchannel may be information that identifies the first subchannel and/or configures information such as resources occupied by the first subchannel.
  • the first device can delete the navigation information and the configuration information of the first subchannel and release resources, thereby saving overhead.
  • a method for transmitting data comprising: a second device determining an identifier of a target network portal, where the identifier of the target network portal is used to identify a target for which the second device provides services to the first device network entry; the second device generates a first transmission control protocol TCP option, where the first TCP option includes an identifier of the target network entry; the second device sends the first device through the first sub-channel a TCP option, the identifier of the target network entry in the first TCP option is used by the first device to determine the second sub-channel; the second device receives data from the second sub-channel on the second sub-channel A first TCP data packet of a device, where the data part of the first TCP data packet is the data part to be transmitted on the first sub-channel.
  • the method further includes:
  • the second device determines a source network entry, the source network entry is a network entry for the second device to provide services to the first device, and the source network entry corresponds to one or more sub-channels;
  • the second device determines the first subchannel among the one or more subchannels.
  • the first TCP option includes a first field and a second field, the first field takes a first value, and the second field is used to carry the target network entry The first value is used to indicate that the identifier of the target network entry carried by the second field is used by the first device to determine the second sub-channel.
  • the second device sends the first TCP option to the first device through the first subchannel, including:
  • the first device sends a second TCP data packet to the second device through the first subchannel, where the second TCP data packet includes the first TCP option;
  • the first device sends a first TCP control packet to the second device through the first subchannel, where the first TCP control packet includes the first TCP option.
  • the method further includes:
  • the second device sends a second TCP control packet to the first device on the first subchannel, where the second TCP control packet includes a second TCP option, and the second TCP option is used to cancel the first TCP option.
  • the format of the second TCP option is the same as that of the first TCP option
  • the value of the third field in the second TCP option is a second value
  • the second The value is used to indicate revocation of the first TCP option.
  • the The method also includes:
  • the second device deletes the configuration information of the first subchannel.
  • the present application provides an apparatus, the apparatus is included in an electronic device, and the apparatus has a function of implementing the above aspects and the behavior of the electronic device in possible implementations of the above aspects.
  • the functions can be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above functions. For example, a display module or unit, a detection module or unit, a processing module or unit, and the like.
  • the present application provides an electronic device, comprising: one or more processors; a memory; a plurality of application programs; and one or more computer programs. Wherein, one or more computer programs are stored in the memory, the one or more computer programs comprising instructions. When the instructions are executed by the electronic device, the electronic device is caused to perform the method of transmitting data in any of the possible implementations of any of the above aspects.
  • the electronic device may further include: a touch display screen and/or a camera, wherein the touch display screen includes a touch-sensitive surface and a display;
  • the present application provides an electronic device including one or more processors and one or more memories.
  • the one or more memories are coupled to the one or more processors for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform A method for transmitting data in any possible implementation of any one of the above aspects.
  • the present application provides a computer-readable storage medium, including computer instructions, which, when the computer instructions are executed on an electronic device, enable the electronic device to execute any of the possible methods for securely accessing data in any of the foregoing aspects.
  • the present application provides a computer program product that, when the computer program product runs on an electronic device, enables the electronic device to perform any of the possible data transmission methods in any of the above aspects.
  • FIG. 1 is a system framework diagram provided by an embodiment of the present application.
  • FIG. 2 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a method for transmitting data provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a format of a first TCP option provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a sub-channel between a client and a server provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another method for transmitting data provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a format of an ADD-ADDR option provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram after the assignment of the first TCP option provided by the embodiment of the present application.
  • FIG. 9 is a schematic diagram of a format of a TCP acknowledgment message provided by an embodiment of the present application after assignment.
  • FIG. 10 is a schematic diagram of revoking the first TCP option provided by an embodiment of the present application.
  • FIG. 1 shows a system framework diagram provided by an embodiment of the present application.
  • the client and the server can establish a sub-stream through the three-way handshake, and so on, multiple sub-streams can be established, the server and the client can transmit TCP packets by establishing multiple sub-streams, and the server and the client can close the sub-stream through the four-way handshake. flow.
  • the server can be called the sender, and the client is called the receiver; if the client sends a TCP packet to the server, the client is called the sender, and the server is called the receiver. Receiving end.
  • the client may refer to user equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device.
  • the terminal device may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with a transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, an industrial control (industrial) terminal device Wireless terminals in control), wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety Terminals, wireless terminals in smart cities, wireless terminals in smart homes, wearable devices, in-vehicle devices, etc.
  • the server can also be called a server.
  • the server can serve the client.
  • the server can provide resources to the server and save client data.
  • FIG. 2 is a schematic structural diagram of an example of an electronic device 200 provided by an embodiment of the present application.
  • the electronic device 200 may be a client or a server, and the electronic device 200 may include a processor 210, a memory 220, a communication module 230, and the like.
  • the processor 210 may include one or more processing units, and the memory 220 is used to store program codes and data. In this embodiment of the present application, the processor 210 can execute the computer-executed instructions stored in the memory 220 to control and manage the actions of the electronic device 200 .
  • the communication module 230 may be used for communication between various internal modules of the electronic device 200, or communication between the electronic device 200 and other external electronic devices, and the like.
  • the communication module 230 may include an interface or the like, such as a USB interface, and the USB interface may be an interface conforming to the USB standard specification, specifically a Mini USB interface, a Micro USB interface, USB Type C interface, etc.
  • the USB interface can be used to connect a charger to charge the electronic device 200, and can also be used to transmit data between the electronic device 200 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the communication module 230 may include an audio device, a radio frequency circuit, a Bluetooth chip, a wireless fidelity (Wi-Fi) chip, a near-field communication (NFC) module, etc. way to realize the interaction between the electronic device 300 and other electronic devices.
  • a radio frequency circuit e.g., a Bluetooth chip, a wireless fidelity (Wi-Fi) chip, a near-field communication (NFC) module, etc.
  • the electronic device 200 may further include a display screen 240, and the display screen 240 may display images or videos, etc. in the human-computer interaction interface.
  • the electronic device 200 may further include peripheral devices 250, such as a mouse, a keyboard, a speaker, a microphone, and the like.
  • peripheral devices 250 such as a mouse, a keyboard, a speaker, a microphone, and the like.
  • the embodiment of the present application does not specifically limit the structure of the electronic device 200 .
  • the electronic device 200 may further include more or less components than those shown, or some components are combined, or some components are separated, or different components are arranged.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • Multiple sub-channels established by the client and the server are bound to an existing MPTCP session, and the client can select any sub-channel for TCP packet transmission.
  • the client can select a sub-channel to transmit TCP packets according to local policies, but after the client selects the sub-stream for sending TCP packets, the server does not know it.
  • the client chooses which sub-channel to send TCP packets. In other words, this method can control the sending of TCP packets according to the local policy for the client, but there is no way for the server to actively guide the client to follow the policy of the server. Send TCP packets.
  • the server when the server needs to add network portals according to network planning, the server hopes to schedule TCP packets from some sub-channels from the client to the newly added network portals.
  • the server cannot actively guide the client to direct the TCP packets.
  • the server needs to adjust the traffic of the network entry according to the change of the operator's tariff, hoping to switch the TCP packets transmitted on some sub-channels to the sub-channel expected by the server.
  • the server can send the TCP options for sub-stream rate limiting to the client on the current sub-channel.
  • the data traffic on the sub-channel is rate-limited, but this may result in packet loss and poor transmission performance, or it may be possible to switch the data traffic on the current sub-channel to one or more other sub-channels. If there are multiple sub-channels, The client can select a sub-channel on multiple sub-channels to transmit the switched data traffic according to the local policy, so the client still cannot select the sub-channel according to the network entry expected by the server, and thus cannot meet the needs of the server for active navigation.
  • Sub-channel can also be called sub-stream or sub-link
  • sub-channel is a bidirectional channel
  • one sub-stream corresponds to one TCP connection
  • the client and server can establish a sub-stream through three-way handshake.
  • the client and server can release a substream through the four-way handshake.
  • a subchannel can be identified by a quintuple of source IP address, destination IP address, source port, destination port and protocol type.
  • a source address identifier (identity, ID) and a destination address identifier the source IP address and/or the source port can be mapped to the source address identifier, and the destination IP address and/or the destination port can be mapped to the destination address identifier.
  • the source address identifier (source IP address and/or source port) and the destination address identifier (destination IP address and/or destination port) have relative concepts. For example, if the client sends a TCP packet to the server, taking the client as a reference, the source IP address is the client's IP address, and the source port is the client's port.
  • the source address identifier is the client's ID
  • the destination IP address is the IP address of the server
  • the destination port is the IP address of the server
  • the destination address is identified as the ID of the server.
  • the source IP is the IP address of the server
  • the source port is the port of the server
  • the source address is identified as the ID of the server
  • the destination IP is The address is the IP address of the client
  • the destination port is the IP address of the client
  • the destination address identifier is the ID of the client.
  • MPTCP session one MPTCP session corresponds to multiple sub-channels, that is, the client and the server can transmit the data traffic of one MPTCP session through multiple sub-channels, and the data traffic of one MPTCP session is also called the TCP message of the MPTCP session.
  • TCP option the TCP packet header includes a TCP option, and a TCP option has a specific physical meaning.
  • the TCP option that the server can send to the client is the first TCP option, and the first TCP option uses In order to provide the client with the identifier of the target network portal, the client switches the sub-channel according to the first TCP option.
  • ADD-ADDR option the ADD-ADDR option is used to advertise the address
  • the ADD-ADDR option is also a TCP option
  • the TCP packet header can include the ADD-ADDR option.
  • TCP packets include TCP data packets and TCP control packets. TCP data packets are used to transmit data corresponding to an application.
  • a TCP control packet can be a response packet of a TCP data packet
  • the TCP control message may also be a TCP keep-alive message
  • the TCP control message may also be a response message for a connection establishment request.
  • the method 300 for transmitting data provided by the embodiment of the present application is described below with reference to FIG. 3.
  • the method 300 takes the client sending a TCP packet to the server as an example.
  • the server may also send a TCP packet to the client. To avoid repeating the description, This is not described in detail in this embodiment of the present application.
  • the server and the client establish multiple sub-channels.
  • the multiple sub-channels are multiple sub-channels corresponding to one MPTCP session.
  • Different sub-channels correspond to different network portals of the server and/or different network portals of the client.
  • the client has two network portals, namely 4G and WiFi
  • the server has two network portals of the operator, which are Mobile and China Unicom
  • a sub-channel can be established between the client's 4G network entry and the server's mobile network entry
  • a sub-channel can be established between the client's 4G network entry and the server's Unicom network entry.
  • the client's WiFi network entry and service A sub-channel can be established between the mobile network portals of the client
  • a sub-channel can be established between the 4G network portal of the client and the Unicom network portal of the server.
  • the network portals of the servers corresponding to different sub-channels may be the same, or the network portals of the clients corresponding to different sub-channels may be the same, which is not limited in this embodiment of the present application.
  • the server may notify the client of the destination address identifier (or the destination IP address and the destination port) of each sub-channel through the third TCP option, and the destination address identifier at this time is based on the client. For example, after the server and the client establish the first sub-channel, the server can advertise the destination address identifiers of other sub-channels to the client through the ADD-ADDR option, and the third TCP option includes the ADD-ADDR option.
  • multiple sub-channels in S310 may be established once, and S320-S380 may be performed multiple times.
  • the multiple sub-channels in S310 may be dynamically changed, and when there is a need to establish a sub-channel, a sub-channel may be established.
  • the server determines the target network entry.
  • the target network entry is a network entry that the server expects to provide services to the client, the target network entry may correspond to one or more sub-channels, and the network entries of the one or more sub-channels are all target network entries. If the server determines the target network entry, the server expects the data traffic on the specified sub-channel (the first sub-channel below) to be switched to the sub-channel corresponding to the identifier of the target network entry.
  • the identifier of the target network entry may be allocated by the server, for example, the identifier of the target network entry may be the address ID of the target network entry.
  • the server can also determine the source network entry.
  • the source network entry is the network entry that the server is currently providing services to the client.
  • the source network entry may correspond to one or more sub-channels, and the network entries of the one or more sub-channels are all source network entries.
  • the server determines the target network entry and the source network entry, the server expects that the data transmitted on the sub-channel corresponding to the source network entry needs to be switched to the sub-channel corresponding to the target network entry.
  • the server-side detection tool detects the network quality of multiple network portals. For example, network key performance indicators (KPIs) such as packet loss rate, delay, and jitter can be used to detect the network of multiple network portals. quality.
  • KPIs network key performance indicators
  • the server determines that it can switch the data traffic on the network portal with the worse network KPI to the network portal with better network KPI, so as to avoid the failure of the network portal with the worse network KPI.
  • the network entry with better network KPI is the target network entry
  • the network entry with relatively poor network KPI is the source network entry.
  • Scenario 2 A new network entry is deployed. Due to the increase in data traffic, in order to avoid congestion and improve transmission reliability, a new network entry can be added to divert the data traffic on the existing network entry.
  • the new network entry is The target network entry, for example, the server operator is using mobile as the server network entry. Due to the increase in data traffic, the telecommunication network entry can be added, then the telecommunication network entry is the target network entry, and the server operator uses the target network entry. The ID is sent to the server. Or the tariff of the existing network entry is higher, and the tariff of the new network entry is lower, then the data traffic on the existing network entry can be shunted to the new network entry, and the existing network entry is the source network entry.
  • the new network entry is the target network entry.
  • the network entry of the server is operator A. Since the tariff of operator A is too high, the tariff of operator B is relatively low.
  • the server operator can offload some or all of the data traffic of operator A's network entry to B.
  • the operator's network portal On the operator's network portal, at this time, the operator's network portal is the target network portal, and the operator's network portal is the source network portal.
  • the server sends the identifier of the target network portal to the server.
  • Scenario 3 value-added services, multiple network portals can target different types of users, and some users do not have high requirements for network speed, then the traffic of these users can be on the network portals with general network KPIs, and some users have requirements for network speed. For example, for VIP users, the data traffic of these users can be switched to the network portal with better network KPI.
  • the network portal with better network KPI is the target network portal, and the network portal with general KPI is the source network portal.
  • the server generates a first TCP option.
  • the first TCP option includes a first field and a second field, the first field takes a value of the first value, the second field is used to carry the identifier of the target network entry, and the first value is used to indicate the second field.
  • the identifier of the target network entry carried by the bearer is used by the first device to determine the second sub-channel.
  • the format of the first TCP option generated by the server may be as shown in FIG. 4 , where the type (Kind) represents the type of the first TCP option, the type is fixed at 30, and 30 indicates that the first TCP option is the TCP of MPTCP option; Length (Length) is the length of the first TCP option, such as the total length can be 4 bytes; subtype indicates that the first TCP option is a subflow navigation option (subflow navigation option), and the value of the subtype can be specified by the protocol The value of , can be specified according to the protocol, which is not limited in this embodiment of the application; the second field carries the identifier of the target network entry, which can also be called an address ID, which is used to carry the target network determined by the server in S320.
  • the identifier of the entry; B is used to indicate whether the first sub-channel is the main link or the backup link. For example, when B is 1, it means that the current first sub-channel sending the first TCP option is a backup link, and when B is 0, it means sending The current first sub-channel of the first TCP option is the main link.
  • B refers to the definition of the MP_PRIO option
  • E means confirmation, if E is 1, it means that it has been received, usually, in the following example 1
  • the first TCP option in the header of the first TCP response packet may include E; R is the first field, for example, the first value of R is 0 to announce the first TCP option; r is a reserved bit, which is 0 by default.
  • the server determines the first sub-channel.
  • the first subchannel can be understood in two ways:
  • the server can determine the source network entry according to the operator's policy, the first sub-channel is a sub-channel among one or more sub-channels corresponding to the source network entry, for example, the first sub-channel is the network in the above S320 scenario 1 Any sub-channel corresponding to the network entry with poor KPI; for example, the first sub-channel is any sub-channel corresponding to the existing network entry in the second scenario in S320; for example, the first sub-channel is the above-mentioned S320 Any sub-channel corresponding to the general network entry of the KPI in Scenario 3.
  • one or more sub-channels corresponding to the source network entry may be sub-channels corresponding to different multiple MPTCP sessions, and different MPTCP sessions may correspond to different clients.
  • the server can guide different MPTCP sessions of different clients.
  • the data traffic is switched to the target network entry expected by the server in batches.
  • the source network entry corresponds to 5 sub-channels, wherein the MPTCP session 1 of client 1 corresponds to 2 sub-channels, and the MPTCP session 2 of client 2 corresponds to 3 sub-channels.
  • the two sub-channels respectively send the first TCP option to the client 1, and respectively send the first TCP option to the client 2 on the three sub-channels corresponding to the MPTCP session 2.
  • the server can guide different clients to switch the data traffic of the source network entry to the target network entry in batches.
  • the first sub-channel may be one of the two sub-channels corresponding to the MPTCP session 1 of the client 1.
  • the client is client 1.
  • the first sub-channel may also be one of the three sub-channels corresponding to the MPTCP session 2 of the client 2 .
  • Other sub-channels are similar to the first channel, and will not be described in detail in order to avoid redundant description.
  • one or more sub-channels corresponding to the source network entry may be sub-channels corresponding to an MPTCP session, so that the server can guide the client to switch the data traffic of an MPTCP session to the target network entry expected by the server.
  • the first sub-channel in this embodiment of the present application may be one of one or more sub-channels corresponding to an MPTCP session, and other sub-channels are similar to the first sub-channel, and are not described in detail to avoid repetition.
  • the first sub-channel is a sub-channel randomly selected by the server, and the server may not determine the source network entry at this time.
  • sequence of S330 and S340 is not limited, and S330 may be before or after S340, which is not limited in this embodiment of the present application.
  • the server sends a first TCP packet to the client through the first sub-channel, the first TCP packet includes the first TCP option, and the client receives the first TCP packet through the first sub-channel, and the first TCP packet includes the first TCP option.
  • the TCP options include the identification of the target network entry.
  • the first sub-channel is the sub-channel to be switched, and the identifier of the target network entry is used by the client to determine the second sub-channel.
  • the first TCP packet may be the second TCP data packet or the first TCP control packet.
  • the following example describes:
  • Example 1 the client and the server have established the first sub-channel, the server can send a second TCP data packet to the client through the first sub-channel, and the packet header of the second TCP data packet carries the first TCP
  • the message body of the second TCP data message includes a data part, the data part is the data corresponding to the application fed back by the server when the client initiates an application, and the first TCP message is the second TCP datagram at this time Arts.
  • Example 2 the client and the server have established the first sub-channel, the server can send the first TCP control packet to the client, the first TCP control packet includes the first TCP option, and the first TCP control packet can be is a TCP control packet sent by any server to the client, such as a response packet or a keep-alive packet of a TCP data packet, etc., which are not limited in this embodiment of the present application.
  • the first TCP packet is the first TCP packet. control message.
  • the client obtains the first TCP option in the first TCP packet, and determines the identifier of the target network entry carried by the second field according to the first value of the first field in the first TCP option, which is used to determine the second sub-channel . And the client can obtain the identifier of the target network entry in the first TCP option.
  • the client parses the header of the first TCP packet, obtains the first TCP option, parses the first field and the second field in the first TCP option, and determines the first field according to the first value of the first field.
  • the TCP option is to announce the first TCP option, for example, the first value of R in the first field in FIG. 4 is 0, which is also referred to as the first TCP option to announce the sub-flow navigation option.
  • the client determines the second sub-channel according to the identifier of the target network portal.
  • each of the multiple sub-channels established in S310 has a corresponding destination address identifier and a source address identifier.
  • the client identifies the destination address in the multiple sub-channels as the identification of the target network entry as the candidate sub-channel to be switched to, and the number of the to-be-selected sub-channels may be one or more. In other words, the client can only determine the network entry of the server side of the sub-channel to be switched to according to the identifier of the target network entry.
  • One of the sub-channels is determined as the second sub-channel.
  • the local policy may be a round-trip delay (round-trip time, RTT) scheduling algorithm or other algorithms, which are not limited in this embodiment of the present application.
  • the client can determine the navigation information corresponding to the identifier of the target network entry, and the client can save the navigation information.
  • the navigation information is used by the client to determine the second sub-channel.
  • the navigation information may be a quintuple of one or more sub-channels to be selected corresponding to the identifier of the target network entry.
  • the client can lock the second sub-channel according to the quintuple of the sub-channel to be selected; if there are multiple sub-channels to be selected, the client can lock the second sub-channel according to the quintuple of the sub-channel to be selected and the preset criteria (for example, RRT scheduling algorithm) to lock the second sub-channel among the plurality of sub-channels.
  • the navigation information may also be other information used to determine the second sub-channel, which is not limited in this embodiment of the present application.
  • the client can use the navigation information to navigate a TCP data packet (such as the first TCP data packet described below) to the second sub-channel.
  • sub-flow 1 there are three sub-flows, namely, sub-flow 1, sub-flow 2.
  • Subflow 3 taking the client as a reference, the network entry address of subflow 1 is IP1, the network entry address of subflow 2 is IP2, and the network entry address of subflow 3 is IP3.
  • the client can use routing rules to route the TCP data packets of an MPTCP session to IP1, IP2, and IP3 respectively.
  • the target network entry in the options is identified as IP1, then the client can redirect the first TCP data message sent to IP3 to IP1 according to the navigation information corresponding to the target network entry identification (subflow 1 is the aforementioned second subchannel). ), the redirection of IP3 to IP1 can be understood as the fact that the first TCP data packet is routed to IP3 first and then to IP1.
  • the client can save the sub-channel to be selected corresponding to the identifier of the target network entry, and if there are multiple sub-channels to be selected, the client can determine the second sub-channel among the saved multiple sub-channels to be selected according to the local policy. subchannel.
  • the second sub-channel is the first sub-channel,
  • the identifier of the target network entry in the first TCP option received on the first sub-channel is the destination address identifier of the first sub-channel, there is no need to switch the sub-channel and continue on the first sub-channel Transmission of TCP data packets.
  • the client switches the data to be transmitted on the first sub-channel to the second sub-channel for transmission to the server, and the server can receive the first TCP data packet from the first device on the second sub-channel.
  • the data part of the first TCP data packet is the data to be transmitted on the first sub-channel.
  • the client encapsulates the data to be transmitted on the first sub-channel into first TCP data according to the packet encapsulation format and sequence number rules of the second sub-channel.
  • the message is sent to the server.
  • the first TCP data packet may include one or more TCP data packets.
  • the client can switch the data on the first sub-channel receiving the first TCP option to the second sub-channel corresponding to the identifier of the target network entry expected by the server for transmission, which can realize precise switching and satisfy the navigation of the server. Require.
  • the client communicates with the server through Wifi and a cellular network (eg, 5G or long term evolution (LTE) network).
  • Ethernet and Wifi establish four sub-channels, namely ⁇ IP1, IP3>, ⁇ IP2, IP3>, ⁇ IP1, IP4>, ⁇ IP2, IP4>, where ⁇ IP1, IP3> is the first sub-channel.
  • the server deploys the 5G network, and the server can switch the data traffic on the sub-channel ⁇ IP2, IP4> to the destination address IP5 corresponding to the 5G network.
  • the target network entry is IP5.
  • Method 600 is described below in conjunction with FIG. 6 .
  • S610 the server determines to switch the data traffic on the sub-channel ⁇ IP2, IP4> to IP5.
  • S610 can also be equivalent to S320 and S310, and the identifier of the target network entrance is determined according to the scenario requirements, that is, the identifier of IP5.
  • the server determines the network quality of the sub-channel network entry IP3 and IP4 and finds that the quality of the IP4 network entry is relatively poor, and the server has deployed a 5G network, then the server determines to switch the data traffic on the sub-channel ⁇ IP2, IP4> to IP5.
  • ⁇ IP2, IP4> is the aforementioned first sub-channel. If the server determines that the source network entry is IP4, and the sub-channel whose source network entry is IP4 includes ⁇ IP1, IP4>, ⁇ IP2, IP4>, then ⁇ IP2, IP4> is a sub-channel in which the network entry is IP4, corresponding to the above-mentioned method 1 of S340; if the server does not determine that the source network entry is IP4, then ⁇ IP2, IP4> is a sub-channel randomly selected by the server, Corresponding to the second mode of S340.
  • the server and the client establish a sub-channel ⁇ IP2, IP5>, specifically, the sub-channel ⁇ IP2, IP5> may be established through a three-way handshake.
  • the server can advertise the IP5 address to the client through the ADD-ADDR option (also called the third TCP option), for example, it can pass the first sub-channel ⁇ IP1, IP3 > Carry the ADD-ADDR option in the header of TCP control packet 1 and advertise it to the client, or pass the ADD-ADDR option through other sub-channels ⁇ IP2, IP3>, ⁇ IP1, IP4>, ⁇ IP2, IP4>
  • the ADDR option is carried in the header of TCP control packet 1 and advertised to the client.
  • the format of the ADD-ADDR option is shown in Figure 7.
  • the type (Kind) indicates that the ADD-ADDR option is an MPTCP option, such as 30; the length (Length) is the length of the ADD-ADDR option, such as 16; subtype Indicates that the ADD-ADDR option is used to advertise address identification, such as 3; rsv is a reserved bit, usually 0; E indicates whether the ADD-ADDR option is an advertised address option or is used to confirm reception, for example, E is 0 to indicate ADD-ADDR The option is the confirmation option, which is used to determine whether it is received.
  • E is 1, which means that the ADD-ADDR option is used to determine the reception;
  • the destination address identifier is the address identifier of IP5, for example, it can be represented by 20;
  • the destination address is assigned by the server to IP5 For example, 20 can be used to represent the IP5 destination address identifier;
  • truncated (truncated) HMAC (8 bytes) represents the encrypted hashed MPTCP session identifier. If E is 0, the truncated HMAC is 8 bytes. If E is 1, it indicates that the field of the truncated HMAC is not carried.
  • the client After receiving the ADD-ADDR option carried in the TCP control packet 1, the client sends a TCP control packet 2 confirming the receipt of the ADD-ADDR option to the server.
  • the header of the TCP control packet 2 carries the ADD-ADDR option
  • the format of the ADD-ADDR option carried in the packet of TCP control packet 1 is the same as that of the ADD-ADDR option carried in the packet of TCP control packet 2.
  • the difference is that the ADD-ADDR option carried in the packet of TCP control packet 2 E in the ADDR option is 1.
  • the server generates the first TCP option, and specifically for S630, refer to S330.
  • the format of the first TCP option as shown in FIG. 4 can be specifically assigned, as shown in FIG. 8 after assignment, the assignment of the subtype is pending, for example, it can be 0xe, and 20 is the destination address identifier of the IP, that is, the target The identifier of the network entry, and other parameters refer to the description in Figure 4.
  • the server sends a first TCP packet to the client through the sub-channel ⁇ IP2, IP4> (that is, the first sub-channel), the first TCP packet includes the first TCP option, and the client passes the sub-channel ⁇ IP2, IP4> Receive the first TCP packet, and the first TCP option is the value shown in FIG. 8 .
  • the sub-channel ⁇ IP2, IP4> in the method 600 may be a sub-channel randomly selected by the server, and the server may not determine the sub-channel ⁇ IP2, IP4> in the method 600 at this time.
  • the client obtains the first TCP option in the first TCP packet. For example, if the first TCP option R in FIG. 8 is 0, then the first TCP option is the advertised sub-flow navigation option, and 20 in the acquired first TCP option is the identifier of IP5 advertised in S620.
  • the client when it receives the first TCP packet, it may send to the server a TCP acknowledgment packet confirming that the first TCP packet has been received, where the TCP acknowledgment packet includes a TCP option that is different from the first TCP option. If E is 1, the others are the same as the first TCP option.
  • the TCP options included in the TCP confirmation message are shown in Figure 9.
  • the client determines that the sub-channel ⁇ IP2, IP5> is the second sub-channel according to 20 in the first TCP option.
  • the client switches the data to be transmitted on the sub-channel ⁇ IP2, IP4> to the sub-channel ⁇ IP2, IP5> for transmission.
  • the method 600 describes is to establish a second sub-channel ( ⁇ IP2, IP5>) and directly switch the data traffic on the first sub-channel ( ⁇ IP2, IP4>) to the second sub-channel ( ⁇ IP2, IP4>).
  • IP5> it is not necessary to establish the second sub-channel, the second sub-channel is already established, and the client determines the second sub-channel in the established sub-channel according to the first TCP option, in other words, you can There is no S620, and ⁇ IP2, IP5> are sub-channels that have been established. In order to avoid redundant description, the embodiments of the present application will not describe in detail.
  • the server sends the first TCP option to one client
  • the server can send the first TCP option to multiple clients
  • the server can The channel sends the same first TCP option to the client.
  • each client receives the first TCP option, it determines one or more sub-channels to be switched to according to the identifier of the target network entry.
  • the sub-channel to be finally switched to is determined.
  • multiple clients can switch the TCP data packets to be transmitted on the sub-channel receiving the first TCP option to the one identified by the identifier of the target network entry expected by the server.
  • large-scale scheduling can be realized, so that the navigation efficiency can be improved.
  • the client switches the data to be transmitted in the first sub-channel to the second sub-channel, and after the client performs S370 or S680, the first sub-channel can be disconnected or the client can be disconnected.
  • the first sub-channel can be maintained not to be disconnected, and two cases of disconnection and non-disconnection are described below.
  • the client and the server can send a TCP keep-alive message through the first sub-channel when the first sub-channel is not disconnected. In this way, when the subsequent data that is switched to the second sub-channel and originally transmitted on the first sub-channel needs to be switched back to the first sub-channel, it can be quickly switched back to the first sub-channel, avoiding the need for the client and the server to re-establish Delay caused by the first sub-channel.
  • the server after performing S380 or S670, if the server continues to send the first TCP option to the client on the second sub-channel, the identifier of the target network entry included in the first TCP option at this time is the first sub-channel
  • the destination address identifier of the channel in this case, the client is used as a reference
  • the client can switch the data to be sent on the second sub-channel that was originally sent on the first sub-channel back to the first sub-channel. Saves the time required to re-establish the first sub-channel.
  • the server can revoke the first TCP option in the above method 300 or 600. Specifically, in some scenarios, the server does not need to connect the client to the first subchannel. The data to be sent is switched to the second sub-channel, and the server can revoke the first TCP option.
  • the following description takes method 300 as an example. Specifically, as shown in FIG. 10 , the revocation process is shown in method 1000 in FIG. 10 . :
  • the server determines to cancel the first TCP option.
  • the server detects that the network quality of the target network entry becomes worse, and after the server executes the method 300, the server may determine to cancel the first TCP option.
  • the server after the server has executed the method 300, it determines whether the first TCP data packet switched to the second sub-channel in the method 300 is stable, and if it is not stable, Then it can be determined to revoke the first TCP option.
  • the server can determine to revoke the first TCP option.
  • the revocation of the first TCP option mentioned in the embodiment of the present application can be understood as switching the data on the second sub-channel to be switched back to the first sub-channel.
  • the server generates a second TCP option.
  • the second TCP option is used to revoke the first TCP option
  • the second value of the third field in the second TCP option is used to indicate to revoke the first TCP option.
  • the first TCP option and the second TCP option are discussed below in two cases.
  • the first field of the first TCP option and the third field of the second TCP option are the same field.
  • different values of the first same field represent different physical meanings.
  • the first value of the first field of the first TCP option indicates that the first TCP option is a notification sub-flow navigation option
  • the second value of the third field (the first field) of the third TCP option indicates that the third TCP option
  • the option is used to cancel the first TCP option.
  • the first TCP option and the third TCP option are the same except for the value of the first field, and the values of these fields are the same.
  • the third field is R in FIG.
  • the second value of R is 1, indicating that the first TCP option is revoked, and the format of the second TCP option is the same as that of the first TCP option, as shown in FIG. 4 .
  • the difference between the first TCP option and the second TCP option is that, for example, the first value of the first field R in the first TCP option is 0, and the second value of the third field R in the second TCP option is 0. If it is 1, other fields of the first TCP option and the second TCP option in FIG. 4 are exactly the same, for example, the identifier of the target network entry is also the same.
  • the first field of the first TCP option and the third field of the second TCP option are different fields.
  • different fields in the two TCP options can be used to indicate different physical meanings.
  • the first value of the first field of the first TCP option indicates that the first TCP option is an advertisement sub-flow navigation option
  • the second value of the third field of the third TCP option indicates that the third TCP option is used to cancel the first
  • the values of other fields are the same, and the values of other fields are the same.
  • the first value and the second value may be different, so that the physical meaning of different TCP options can be indicated by different values of different fields.
  • the first value and the second value may also be the same, so that the same value of different fields can be used to indicate the physical meaning of different TCPU options.
  • the first field of the first TCP option is R in Figure 4
  • the first value of R is 0,
  • the third field of the second TCP option is R' in Figure 4
  • the second value of R' is replaced by R'.
  • a value of 1 indicates that the first TCP option is withdrawn, and the values of other fields (such as the second field) of the second TCP option are the same as the values of other fields (such as the second field) of the first TCP option in FIG. 4
  • the identity of the target network portal is also the same.
  • the server sends a second TCP control packet to the client on the first sub-channel, and the client receives the second TCP control packet sent by the server on the first sub-channel, where the second TCP control packet includes the second TCP control packet.
  • TCP options the server sends a second TCP control packet to the client on the first sub-channel, and the client receives the second TCP control packet sent by the server on the first sub-channel, where the second TCP control packet includes the second TCP control packet.
  • the client obtains the second TCP option in the second TCP control packet, and determines, according to the second value of the third field, that the second TCP option is to cancel the first TCP option.
  • the client can obtain the identifier of the target network entry in the second field in the second TCP option.
  • the client can determine to revoke the first TCP option; for another example, for the second case of S1020 above , if the second value of R' is 1, the client can determine to revoke the first TCP option.
  • the client parses the header of the second TCP packet, obtains the second TCP option, and parses the third field and the second field in the second TCP option, and the client determines according to the second value of the third field Revocation of the first TCP option, in other words, the client revokes switching to the data of the target network entry carried in the second field, also referred to as the revocation of the sub-flow navigation option for the second TCP option.
  • the client continues to transmit the third TCP data packet on the first sub-channel according to the second TCP option, the third TCP data packet is the TCP data packet to be transmitted on the first sub-channel, and the third TCP data packet It is generated according to the encapsulation format and sequence number criteria on the first sub-channel.
  • S1050 can be understood as directly continuing the transmission on the first subchannel without redirecting the data originally transmitted in the first subchannel to the second subchannel.
  • sub-flow 1 the network entry address of sub-flow 1
  • IP2 the network entry address of sub-flow 2
  • IP3 the network entry address of sub-flow 3
  • the client can use the routing rules to route the TCP data packets of an MPTCP session to IP1, IP2, and IP3 respectively.
  • the target network entry identifier in the options is IP1
  • the client can redirect the first TCP data packet sent to IP3 to IP1 according to the navigation information corresponding to the target network entry identifier (subflow 1 is the aforementioned second subchannel) , the redirection of IP3 to IP1 can be understood as the fact that the first TCP data packet is routed to IP3 first and then to IP1.
  • the server continues to send the second TCP option to the client on substream 3, and the target network entry identifier in the second TCP option is still IP1, then the target network entry will continue to send the third TCP data packet to IP3. IP3, no need to redirect to IP1 again.
  • the client determines that the navigation information needs to be deleted and resources are released.
  • sequence before S1050 and S1060 is not limited, and S1050 may be performed before or after S1060, or at the same time, which is not limited in this embodiment of the present application.
  • the method 1000 needs to be executed if the first TCP option needs to be revoked, and if the first TCP option does not need to be revoked in some scenarios, the method 1000 does not need to be executed.
  • the first TCP option revoked in method 1000 is the first TCP option in method 300 and method 600.
  • the server generates the first TCP option, then in method 1000, the server determines to cancel the first TCP option.
  • a TCP option If the client generates the first TCP option, the client determines to revoke the first TCP option.
  • the specific implementation process is similar to that of the method 1000. To avoid repetition, the embodiment of the present application will not describe in detail.
  • the client actively disconnects the first sub-channel, and after the client actively initiates four waves to cancel the first sub-channel, the client can delete the relevant configuration information of the first sub-channel, or delete the navigation information in the aforementioned S360.
  • the server also needs to delete the configuration information related to the first sub-channel.
  • the server After the server actively disconnects the first sub-channel, and after the server actively initiates four waves to cancel the first sub-channel, the server needs to delete the configuration information related to the first sub-channel.
  • the client may delete the relevant configuration information of the first sub-channel, and may also delete the navigation information in the foregoing S360.
  • the first sub-channel is passively disconnected.
  • the client and the server cannot receive the TCP keep-alive message on the first channel within the preset time period, it is possible that the first sub-channel is faulty due to a network failure, and the service
  • the terminal deletes the relevant configuration information of the first sub-channel, and the server deletes the relevant configuration information of the first sub-channel and the navigation information in S360.
  • the first sub-channel needs to be disconnected in some scenarios, and the first sub-channel does not need to be disconnected in some scenarios, which is not limited in this embodiment of the present application.
  • the first TCP option includes the identifier of the target network entry as an example.
  • the first TCP option may also include the identification of the source network exit, and the identification of the source network exit may be the source address identification of the sub-channel.
  • the data traffic on multiple sub-channels is switched to one or more sub-channels, which is not limited in this embodiment of the present application.
  • the first TCP option may also include IP2 and IP5, where IP2 is the identification of the source network exit, and IP5 is the identification of the target network entrance.
  • the first TCP option can be sent on the sub-channel ⁇ IP2, IP4>
  • the client After the client receives the first TCP option, it switches the data traffic whose source network exit is IP2 to the sub-channel ⁇ IP2, IP5>, that is, switches the data traffic on the sub-channel ⁇ IP2, IP3> and ⁇ IP2, IP4> to ⁇ IP2, IP5> on the subchannel.
  • the client sends the first TCP data packet to the server as an example for description
  • the server can also send the first TCP data packet to the client
  • the client can determine Identify the target network entry and generate the first TCP option, and send a TCP message carrying the first TCP option to the server, so that the client can guide the server to send the first TCP data to the client's desired On the second sub-channel, in order to avoid redundant description, this embodiment of the present application does not limit this.
  • one of the devices can be used as the sender to send the first TCP data packet, and the other device can be used as the receiver to receive the first TCP data packet to guide the sender of the first TCP data packet to send the first TCP data packet.
  • the data traffic is directed to the network portal expected by the receiving end, and the embodiments of the present application do not make any restrictions on the specific equipment of the transmitting end and the receiving end.
  • the format of the first TCP option is only described by way of example, and the format of the first TCP option is not limited in the embodiment of the present application.
  • the client sends a TCP data packet on which sub-channel of multiple sub-channels corresponding to an MPTCP session, and the TCP data packet is based on the encapsulation format and sequence of the sub-channel. generated, the sequence number criterion of each subchannel needs to follow the sequence number criterion of the MPTCP session.
  • the formats of the first TCP option, the second TCP option, and the ADD_ADDR option in the embodiments of the present application are only described as examples, and the present application does not have any restrictions on the format of each option, and each field in each option The positional relationship and length between them are also not limited, and each option may include more or less fields mentioned in the embodiments of this application, which are not limited in this application.
  • the client and the server can be divided into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • the client and the server provided in this embodiment are used to execute the above method for transmitting TCP packets, so the same effect as the above implementation method can be achieved.
  • the client and the server may respectively include a processing module, a storage module and a communication module.
  • the processing module may be used to control and manage the actions of the client and the server, for example, may be used to support the electronic device to perform the steps performed by the processing unit.
  • the storage module can be used to support the client and the server to execute stored program codes and data.
  • the communication module can be used to support the communication between the client and the server and other devices.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the electronic device involved in this embodiment may be a device having the structure shown in FIG. 2 .
  • This embodiment also provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned related method steps to realize the above-mentioned embodiments. Methods of securely accessing data.
  • This embodiment also provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the method for securely accessing data in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the method for securely accessing data in the foregoing method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

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

Abstract

本申请提供了一种传输数据的方法和装置。第一设备通过第一子通道接收来自第二设备的第一TCP选项,根据第一TCP选项将第一子通道上的待传输数据切换到第二子通道,可以避免第一子通道上的数据丢失,也能满足第二设备主动导航的需求。该传输数据的方法和装置可以应用于MPTCP场景中。

Description

传输数据的方法和装置
本申请要求于2020年07月03日提交国家知识产权局、申请号为202010639154.0、申请名称为“传输数据的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,并且更具体地涉及通信领域中的传输数据的方法和装置。
背景技术
多路径传输控制协议(multipath transmission control protocol,MPTCP)是通过多个路径并发传输的传输协议。通过MPTCP可以建立一个MPTCP会话的多个子通道,这样,可以通过多个子通道传输一个MPTCP会话的传输控制协议(transmission control protocol,TCP)报文。通常情况下,客户端可以根据本地策略控制多个子通道上数据流量的传输,在一些场景中,服务端期望接收端按照服务端的策略控制多个子通道上数据流量的传输,例如在拥塞或者切换运营商场景下,服务端期望客户端按照服务端的期望传输数据流量。现有技术中,服务端可以在当前子通道上向客户端发送用于子流限速的TCP选项,客户端接收到用于子流限速的TCP选项时,客户端对接收TCP选项的当前子通道上的数据流量进行限速,但是这样会容易丢包,传输性能较差,或者有可能将当前子通道上的数据流量切换到其他的一个或多个子通道上,若存在多个子通道,客户端可以根据本地策略在多个子通道中选择一个子通道传输切换后的数据流量,这样客户端仍然无法按照服务端期望的网络入口来选择子通道,从而无法满足服务端主动导航的需求。
发明内容
本申请实施例提供了一种传输数据的方法和装置,能够提高传输性能。也能满足服务端主动导航的需求。
第一方面,提供了一种传输数据的方法,第一设备通过第一子通道接收第二设备发送的第一传输控制协议TCP选项,所述第一TCP选项包括目标网络入口的标识,所述目标网络入口的标识用于标识所述第二设备向所述第一设备提供服务的目标网络入口;
所述第一设备根据所述第一TCP选项中的所述目标网络入口的标识确定第二子通道;
所述第一设备将所述第一子通道上的待传输数据切换到所述第二子通道上向所述第二设备传输。
上述方案中,第二设备可以是服务端,第一设备可以是客户端,这样,客户端可以将接收第一TCP选项的第一子通道上的数据切换到服务端期望的目标网络入口的标识对应的第二子通道上传输,例如在拥塞或者切换运营商场景下,可以避免第一子通 道上的数据丢失,也能满足服务端的主动导航需求。
可选地,该方法应用于MPTCP场景中。
可选地,第一子通道和第二子通道可以是一个MPTCP会话对应的两个子通道。
可选地,第一设备可以是服务端,第二设备可以是客户端,这样,服务端可以将接收第一TCP选项的第一子通道上的数据切换到客户端期望的目标网络入口的标识对应的第二子通通道上传输,例如在拥塞或者切换运营商场景下,可以避免第一子通通道上的数据丢失,也能满足客户端主动导航的需求。
可选地,第一设备可以向第二设备发送TCP数据报文或者TCP控制报文,TCP数据报文或者TCP控制报文携带第一TCP选项。具体地,TCP数据报文的报文头或者TCP控制报文的报文头可以携带第一TCP选项。
可选地,所述第一子通道上的待传输数据可以是第一设备发起的某一个应用的数据。
其中,所述第一设备将所述第一子通道上的待传输数据切换到所述第二子通道上向所述第二设备传输,包括:第一设备将第一子通道上的待传输数据按照第二子通道的封装格式和序列号准则生成第一TCP数据报文向第二设备发送。
可选地,第一子通道和第二子通道上的TCP数据报文的封装格式可以不同,也可以相同,本申请不予限制。
在一种可能的实现方式中,所述第一TCP选项包括第一字段和第二字段,所述第一字段取值为第一取值,所述第二字段用于承载所述目标网络入口的标识,所述第一取值用于指示所述第二字段承载的所述目标网络入口的标识用于确定所述第二子通道,在所述第一设备根据所述目标网络入口的标识确定第二子通道之前,所述方法还包括:所述第一设备根据所述第一字段的所述第一取值确定所述第二字段承载的所述目标网络入口的标识用于确定所述第二子通道。
例如,第一取值可以是协议规定的或者是预设的。
可选地,第一字段和第二字段在第一TCP选项中的位置为预设的固定位置,协议可以规定第一字段和第二字段在第一TCP选项中的位置,这样,第一设备和第二设备能够根据协议规定确定第一字段和第二字段的位置。
在一种可能的实现方式中,所述目标网络入口对应一个或多个子通道;其中,所述第一设备根据所述第一TCP选项中的所述目标网络入口的标识确定第二子通道,包括:所述第一设备根据本地策略在所述一个或多个子通道中确定所述第二子通道。
在上述方案中,若目标网络入口的标识对应一个子通道,则该子通道为第二子通道;若目标网络入口的标识对应多个子通道,第一设备可以根据本地策略在多个子通道中选择一个子通道作为第二子通道。
在一种可能的实现方式中,所述第一设备通过第一子通道接收第二设备发送的第一TCP选项,包括:所述第一设备通过所述第一子通道接收所述第二设备发送的第二TCP数据报文,所述第二TCP数据报文包括所述第一TCP选项。
例如,第二TCP数据报文的报文头携带第一TCP选项,第二TCP数据报文的报文体包括数据部分,该数据部分为客户端发起某个应用时,服务端反馈的该应用对应的数据。
在一种可能的实现方式中,所述第一设备通过第一子通道接收第二设备发送的第一TCP选项,包括:所述第一设备通过所述第一子通道接收所述第二设备发送的第一TCP控制报文,所述第一TCP控制报文包括所述第一TCP选项。
例如,第一TCP控制报文可以是任何一个服务端向客户端发送的TCP控制报文,例如TCP数据报文的应答报文或者保活报文等。
在一种可能的实现方式中,在所述第一设备将所述第一子通道上的待传输的数据切换到所述第二子通道上之后,所述方法还包括:所述第一设备维持所述第一子通道不断开。客户端和服务端可以维持第一子通道不断开时,客户端和服务端可以通过第一子通道发送TCP保活报文。这样,当切换至第二子通道上的原本在第一子通道上传输的后续数据需要切换回第一子通道时,能够迅速切换回至第一子通道,避免客户端和服务端需要重新建立第一子通道所带来的时延。
在一种可能的实现方式中,所述方法还包括:所述第一设备在所述第一子通道上接收来自所述第二设备的第二TCP控制报文,所述第二TCP控制报文包括第二TCP选项,所述第二TCP选项用于撤销所述第一TCP选项;
所述第一设备根据所述第二TCP选项在所述第一子通道上继续传输第三TCP数据报文,所述第三TCP数据报文为所述第一子通道上待传输的TCP数据报文。
在上述方案中,第二设备发送了第一TCP选项之后,在一些场景中,第二设备确定不需要将第一子通道上的数据切换到第二子通道,则需要将第一子通道的数据切换回来,则第二设备可以在第一子通道上发送第二TCP控制报文,第二TCP控制报文包括的第二TCP选项用于将在第二子通道传输的原本在第一子通道上传输的数据切换回第一子通道,这样,可以提高导航的灵活性。
在一种可能的实现方式中,所述第二TCP选项与所述第一TCP选项的格式相同,所述第二TCP选项中的第三字段的取值为第二取值,所述第二取值用于指示撤销所述第一TCP选项。
可选地,除了所述第一TCP选项的所述第一字段和所述第二TCP选项的所述第三字段之外,所述第一TCP选项和所述第二TCP选项的其他字段相同以及所述其他字段的取值也相同。
在上述方案中,若第一TCP选项与第二TCP选项的格式相同,可以简化设计。
可选地,第一TCP选项与第二TCP选项的格式也可以不同,本申请不予限制。
可选地,第一TCP选项的所述第一字段和所述第二TCP选项的所述第三字段可以为同一字段或者不同的字段,本申请不予限制。
在一种可能的实现方式中,所述方法还包括:所述第一设备删除所述目标网络入口的标识对应的导航信息,所述导航信息为所述第一设备根据所述目标网络入口的标识生成的用于确定所述第二子通道的信息。
在上述方案中,若维持所述第一子通道不断开,第一设备在将第一子通道上待传输的数据切换到第二子通道上所需要的导航信息删除,这样可以节省存储导航信息的开销。
在一种可能的实现方式中,在所述第一设备将所述第一子通道上的待传输的数据切换到所述第二子通道上之后,若所述第一子通道断开,所述方法还包括:
所述第一设备删除所述目标网络入口的标识对应的导航信息和所述第一子通道的配置信息,所述导航信息为所述第一设备根据所述目标网络入口的标识生成的用于确定所述第二子通道的信息。
可选地,第一子通道的配置信息可以为标识第一子通道的信息和/或配置第一子通道所占的资源等信息。
在上述方案中,若第一子通道断开,则第一设备可以删除导航信息以及第一子通道的配置信息并释放资源,从而可以节省开销。
第二方面,提供了一种传输数据的方法,包括:第二设备确定目标网络入口的标识,所述目标网络入口的标识用于标识所述第二设备向所述第一设备提供服务的目标网络入口;所述第二设备生成第一传输控制协议TCP选项,所述第一TCP选项包括所述目标网络入口的标识;所述第二设备通过第一子通道向第一设备发送所述第一TCP选项,所述第一TCP选项中的所述目标网络入口的标识用于所述第一设备确定第二子通道;所述第二设备在所述第二子通道上接收来自所述第一设备的第一TCP数据报文,所述第一TCP数据报文的数据部分为所述第一子通道上待传输的数据部分。
在一种可能的实现方式中,所述方法还包括:
所述第二设备确定源网络入口,所述源网络入口为所述第二设备向所述第一设备提供服务的网络入口,所述源网络入口对应一个或多个子通道;
所述第二设备在所述一个或多个子通道中确定所述第一子通道。
在一种可能的实现方式中,所述第一TCP选项包括第一字段和第二字段,所述第一字段取值为第一取值,所述第二字段用于承载所述目标网络入口的标识,所述第一取值用于指示所述第二字段承载的所述目标网络入口的标识用于所述第一设备确定所述第二子通道。
在一种可能的实现方式中,所述第二设备通过第一子通道向第一设备发送所述第一TCP选项,包括:
所述第一设备通过所述第一子通道向所述第二设备发送第二TCP数据报文,所述第二TCP数据报文包括所述第一TCP选项;或者
所述第一设备通过所述第一子通道向所述第二设备发送第一TCP控制报文,所述第一TCP控制报文包括所述第一TCP选项。
在一种可能的实现方式中,在所述第一设备将所述第一子通道上的待传输的第一TCP数据报文切换到所述第二子通道上之后,所述第一子通道不断开,所述方法还包括:
所述第二设备在所述第一子通道上向所述第一设备发送第二TCP控制报文,所述第二TCP控制报文包括第二TCP选项,所述第二TCP选项用于撤销所述第一TCP选项。
在一种可能的实现方式中,所述第二TCP选项与所述第一TCP选项的格式相同,所述第二TCP选项中的第三字段的取值为第二取值,所述第二取值用于指示撤销所述第一TCP选项。
可选地,除了所述第一TCP选项的所述第一字段和所述第二TCP选项的所述第三字段之外,所述第一TCP选项和所述第二TCP选项的其他字段相同以及所述其他 字段的取值也相同。
在一种可能的实现方式中,在所述第二设备在所述第二子通道上接收来自所述第一设备的第一TCP数据报文之后,若所述第一子通道断开,所述方法还包括:
所述第二设备删除所述第一子通道的配置信息。
第三方面,本申请提供了一种装置,该装置包含在电子设备中,该装置具有实现上述各方面及上述各方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,显示模块或单元、检测模块或单元、处理模块或单元等。
第四方面,本申请提供了一种电子设备,包括:一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被电子设备执行时,使得电子设备执行上述任一方面任一项可能的实现中的传输数据的方法。
可选地,该电子设备还可以包括:触摸显示屏和/或摄像头,其中,触摸显示屏包括触敏表面和显示器;
第五方面,本申请提供了一种电子设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一方面任一项可能的实现中的传输数据的方法。
第六方面,本申请提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的安全访问数据的方法。
第七方面,本申请提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的传输数据的方法。
附图说明
图1是本申请实施例提供的系统框架图。
图2是本申请实施例提供的电子设备的示意性框图。
图3是本申请实施例提供的传输数据的方法示意图。
图4是本申请实施例提供的第一TCP选项的格式示意图。
图5是本申请实施例提供的客户端与服务端之间的子通道示意图。
图6是本申请实施例提供的另一传输数据的方法示意图。
图7是本申请实施例提供的ADD-ADDR选项的格式示意图。
图8是本申请实施例提供的第一TCP选项赋值后的示意图。
图9是本申请实施例提供的TCP确认报文赋值后的格式示意图。
图10是本申请实施例提供的撤销第一TCP选项的示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
MPTCP传输能够充分利用带宽资源,并且能够调度多路径上的数据流量传输,从 而可以控制拥塞,MPTCP也能解决重传的问题。如图1所示为本申请实施例提供的系统框架图。客户端和服务端可以通过三次握手建立一个子流,依次类推可以建立多个子流,服务端和客户端可以通过建立多个子流传输TCP报文,服务端和客户端可以通过四次握手关闭子流。其中,若服务端向客户端发送TCP报文,服务端可以称为发送端,客户端称为接收端;若客户端向服务端发送TCP报文,客户端称为发送端,服务端称为接收端。
其中,客户端可以指用户设备(user equipment,UE)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。例如,终端设备可以是手机(mobile phone)、平板电脑(Pad)、带收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、可穿戴设备、车载设备等。
服务端,也可以称为服务器,服务端可以是为客户端服务的,服务端可以向服务端提供资源以及保存客户端数据等。
示例性的,图2是本申请实施例提供的一例电子设备200的结构示意图。电子设备200可以是客户端或服务端,电子设备200可以是包括处理器210、存储器220和通信模块230等。
其中,处理器210可以包括一个或多个处理单元,存储器220用于存储程序代码和数据。在本申请实施例中,处理器210可执行存储器220存储的计算机执行指令,用于对电子设备200的动作进行控制管理。
通信模块230可以用于电子设备200的各个内部模块之间的通信、或者电子设备200和其他外部电子设备之间的通信等。示例性的,如果电子设备200通过有线连接的方式和其他电子设备通信,通信模块230可以包括接口等,例如USB接口,USB接口可以是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口可以用于连接充电器为电子设备200充电,也可以用于电子设备200与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
或者,通信模块230可以包括音频器件、射频电路、蓝牙芯片、无线保真(wireless fidelity,Wi-Fi)芯片、近距离无线通讯技术(near-field communication,NFC)模块等,可以通过多种不同的方式实现电子设备300与其他电子设备之间的交互。
可选地,电子设备200还可以包括显示屏240,显示屏240可以显示人机交互界面中的图像或视频等。
可选地,电子设备200还可以包括外设设备250,例如鼠标、键盘、扬声器、麦克风等。
应理解,除了图2中列举的各种部件或者模块之外,本申请实施例对电子设备200的结构不做具体限定。在本申请另一些实施例中,电子设备200还可以包括比图示更 多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
客户端和服务端建立的多个子通道绑定到一个已有的MPTCP会话上的,客户端可以选择任意的子通道进行TCP报文的传输。客户端在选择子通道进行TCP报文的传输的过程中,可以根据本地策略选择一个子通道进行TCP报文的传输,但是客户端选择了发送TCP报文的子流之后,服务端并不知道客户端选择了哪个子通道发送TCP报文,换句话说,这种方式对于客户端来讲是可以根据本地策略控制TCP报文的发送,但是对于服务端没办法主动引导客户端按照服务端的策略发送TCP报文。例如,服务端根据网络规划需要增加网络入口时,服务端希望将来自客户端的一些子通道上的TCP报文调度到新增加的网络入口上,服务端没办法主动引导客户端将TCP报文引导到新增加的网络入口上;又例如,服务端需要根据运营商的资费变化,调整网络入口的流量,希望将一些子通道上传输的TCP报文切换到服务端期望的子通道上,服务端没办法主动引导客户端切换TCP报文到服务端期望的子流上。现有技术中,服务端可以在当前子通道上向客户端发送用于子流限速的TCP选项,客户端接收到用于子流限速的TCP选项时,客户端对接收TCP选项的当前子通道上的数据流量进行限速,但是这样可能会丢包,传输性能较差,或者有可能将当前子通道上的数据流量切换到其他的一个或多个子通道上,若存在多个子通道,客户端可以根据本地策略在多个子通道上选择一个子通道传输切换的数据流量,这样客户端仍然无法按照服务端期望的网络入口来选择子通道,从而无法满足服务端主动导航的需求。
下面对本申请实施例用到术语进行解释。
1、子通道,子通道也可以称为子流或者子链路,子通道为双向通道,一个子流对应一个TCP连接,客户端和服务端可以通过三次握手建立一个子流。客户端和服务端可以通过四次握手解除一个子流。可以用五元组源IP地址,目的IP地址,源端口,目的端口和协议类型标识一个子通道。
2、源地址标识(identity,ID)和目的地址标识,源IP地址和/或源端口可以映射为源地址标识,目的IP地址和/或目标端口可以映射为目的地址标识。本申请实施例中的,源地址标识(源IP地址和/或源端口)和目的地址标识(目的IP地址和/或目标端口)具有相对的概念。例如,若客户端向服务端发送TCP报文,以客户端为参考,则源IP地址为客户端的IP地址,源端口为客户端的端口,相应的,源地址标识为客户端的ID,目的IP地址为服务端的IP地址,目的端口为服务端的IP地址,相应的,目的地址标识为服务端的ID。又例如,若服务端向客户端向发送TCP报文,以服务端为参考,则源IP为服务端的IP地址,源端口为服务端的端口,相应的,源地址标识为服务端的ID,目的IP地址为客户端的IP地址,目的端口为客户端的IP地址,相应的,目的地址标识为客户端的ID。
3、MPTCP会话,一个MPTCP会话对应多个子通道,即客户端和服务端可以通过多个子通道传输一个MPTCP会话的数据流量,一个MPTCP会话的数据流量也称为该MPTCP会话的TCP报文。
4、TCP选项,TCP报文头包括TCP选项,一个TCP选项具有特定的物理意义,在本申请实施例中,服务端可以向客户端发送的TCP选项为第一TCP选项,第一TCP 选项用于为客户端提供目标网络入口的标识,客户端根据第一TCP选项切换子通道。
5、ADD-ADDR选项,ADD-ADDR选项用于通告地址,ADD-ADDR选项也属于TCP选项,TCP报文头可以包括ADD-ADDR选项。
6、TCP报文,TCP报文包括TCP数据报文和TCP控制报文,TCP数据报文用于传输某一应用对应的数据,例如TCP控制报文可以为TCP数据报文的应答报文、TCP控制报文也可以为TCP的保活报文、TCP控制报文也可以是建立连接请求的应答报文。
下面结合图3描述本申请实施例提供的传输数据的方法300,方法300以客户端给服务端发送TCP报文为例,当然,服务端也可以向客户端发送TCP报文,为了避免赘述,本申请实施例对此不详细描述。
S310,服务端和客户端建立多个子通道。该多个子通道为一个MPTCP会话对应的多个子通道。
不同的子通道对应服务端不同的网络入口和/或对应客户端不同的网络入口,例如,客户端有两个网络入口分别为4G和WiFi,服务端有两个运营商的网络入口,分别为移动和联通,则客户端的4G网络入口与服务端的移动网络入口之间可以建立一个子通道,客户端的4G网络入口与服务端的联通网络入口之间可以建立一个子通道,客户端的WiFi网络入口与服务端的移动网络入口之间可以建立一个子通道,客户端的4G网络入口与服务端的联通网络入口可以建立一个子通道。当然,不同的子通道对应的服务端的网络入口可以相同,或者不同的子通道对应的客户端的网络入口可以相同,本申请实施例对此不作限制。
在S310的建立子通道的过程中,服务器可以向客户端通过第三TCP选项通告每个子通道的目的地址标识(或者通告目的IP地址和目标端口),此时的目的地址标识以客户端为参考,例如,在服务端与客户端建立首个子通道之后,服务端可以将其他子通道的目的地址标识通过ADD-ADDR选项通告给客户端,第三TCP选项包括ADD-ADDR选项。
可选地,S310中的多个子通道可以建立一次,执行多次S320-S380。或者S310中的多个子通道可以是动态变化的,当有建立子通道的需求时,可以建立一个子通道。
S320,在不同的场景下,服务端确定目标网络入口。
其中,目标网络入口为服务端期望给客户端提供服务的网络入口,目标网络入口可以对应一个或多个子通道,该一个或多个子通道的网络入口都为目标网络入口。若服务端确定目标网络入口,则服务端期望指定的子通道(下面的第一子通道)上的数据流量切换到目标网络入口的标识对应的子通道上。
可选地,目标网络入口的标识可以是服务端分配的,例如,目标网络入口的标识可以是目标网络入口的地址ID。
可选地,服务端还可以确定源网络入口。其中,源网络入口为服务端当前正在给客户端提供服务的网络入口。源网络入口可以对应一个或多个子通道,该一个或多个子通道的网络入口都为源网络入口。换句话说,若服务端确定目标网络入口和源网络入口,则服务端期望源网络入口对应的子通道上传输的数据需要切换到目标网络入口对应的子通道上。
具体地,下面举例描述S320中的三个可能的场景:
场景一,故障预防,服务端的检测工具检测多个网络入口的网络质量,例如,可以利用丢包率、时延和抖动等网络关键绩效指标(key performance indicators,KPI)检测多个网络入口的网络质量。当服务端检测到网络KPI变差时,服务端确定可以将网络KPI变差的网络入口上的数据流量切换到网络KPI比较好的网络入口上,从而可以避免网络KPI变差的网络入口出现故障,此时网络KPI比较好的网络入口即为目标网络入口,网络KPI比较差的网络入口为源网络入口。
场景二,部署新的网络入口,由于数据流量的增加,为了避免造成拥塞,提高传输的可靠性,可以增加新的网络入口来分流已经存在的网络入口上的数据流量,新的网络入口即为目标网络入口,例如,服务端运营商正在使用移动作为服务端的网络入口,由于数据流量增加,则可以增加电信网络入口,则电信网络入口即为目标网络入口,服务端运营商将目标网络入口的标识发送给服务端。或者已经存在的网络入口的资费较高,新的网络入口的资费较低,则可以将已经存在的网络入口上的数据流量分流到新的网络入口上,已经存在的网络入口为源网络入口,新的网络入口为目标网络入口。例如,服务端的网络入口为A运营商,由于A运营商的资费太贵,B运营商的资费相对较低,服务端运营商则可以将部分或全部A运营商网络入口的数据流量分流到B运营商网络入口上,此时B运营商网络入口即为目标网络入口,A运营商网络入口即为源网络入口服务端运营商将目标网络入口的标识发送给服务端。
场景三,增值服务,多个网络入口可以针对不同类型的用户,有的用户对网速要求不高,则这些用户的流量可以在网络KPI一般的网络入口上,有的用户对网速的要求高,例如是VIP用户,则可以将这些用户的数据流量切换到网络KPI较好的网络入口上,网络KPI较好的网络入口即为目标网络入口,KPI一般的网络入口为源网络入口。
需要说明的是,在场景一和场景三中,目标网络入口和源网络入口对应的子通道已经通过S310建立好了;在场景二中,源网络入口对应的子通道已经通过S310建立好了,需要增加新的网络入口作为目标网络入口,则需要新建立子通道,建立的方式与S310相同。
S330,服务端生成第一TCP选项。
可选地,第一TCP选项包括第一字段和第二字段,第一字段取值为第一取值,第二字段用于承载目标网络入口的标识,第一取值用于指示第二字段承载的目标网络入口的标识用于所述第一设备确定所述第二子通道。
具体地,服务端生成的第一TCP选项的格式可以如图4所示,其中,类别(Kind)表示第一TCP选项的类别,类别固定为30,30表示该第一TCP选项为MPTCP的TCP选项;长度(Length)为第一TCP选项的长度,如总长度可以为4字节;子类型表示该第一TCP选项为子流导航选项(subflow navigation option),子类型的值可以是协议规定的值,具体可以根据协议规定,本申请实施例对此不作限定;第二字段承载目标网络入口的标识,也可以称为地址标识(Address ID),用于承载S320中服务端确定的目标网络入口的标识;B用于指示第一子通道是主链路还是备份链路,例如B为1表示发送第一TCP选项的当前第一子通道为备份(backup)链路,B为0表示发送第一TCP选项的当前第一子通道为主链路,具体地,B的定义参考MP_PRIO选项的 定义;E表示确认,如E为1,表示已经收到,通常情况下,在下面的例一的第一TCP应答报文的报文头中第一TCP选项可以包括E;R为第一字段,例如R的第一取值0表示通告第一TCP选项;r为保留位,默认为0。
S340,服务端确定第一子通道。
可以对第一子通道有两种理解方式:
方式一,服务端可以根据运营商的策略确定源网络入口,第一子通道为源网络入口对应的一个或多个子通道中的一个子通道,例如第一子通道为上述S320中场景一的网络KPI比较差的网络入口对应的任何一个子通道;又例如第一子通道为上述S320中的场景二中的已经存在的网络入口对应的任何一个子通道;再例如第一子通道为上述S320中的场景三中的KPI一般的网络入口对应的任何一个子通道。
可选地,源网络入口对应一个或多个子通道可以是不同的多个MPTCP会话对应的子通道,不同的MPTCP会话可以对应不同的客户端,这样,服务端可以引导不同客户端的不同MPTCP会话的数据流量整批切换到服务端期望的目标网络入口上。举例来说,源网络入口对应5个子通道,其中客户端1的MPTCP会话1对应2个子通道,客户端2的MPTCP会话2对应3个子通道,服务端可以在执行S350时,在MPTCP会话1对应2个子通道分别向客户端1发送第一TCP选项,在MPTCP会话2对应的3个子通道上分别向客户端2发送第一TCP选项。这样服务端可以引导不同客户端将源网络入口的数据流量到成批切换到目标网络入口。在本申请实施例中,仅以一个子通道第一子通道为例描述,例如第一子通道可以是客户端1的MPTCP会话1对应的2个子通道中的一个子通道,此时方法300中的客户端即为客户端1。又例如,第一子通道也可以是客户端2的MPTCP会话2对应的3个子通道中的一个子通道。其他子通道与第一通道类似,为了避免赘述不详细描述。
可选地,源网络入口对应的一个或多个子通道可以是一个MPTCP会话对应的子通道,这样,服务端可以引导客户端将一个MPTCP会话的数据流量切换到服务端期望的目标网络入口上。本申请实施例中的第一子通道可以是一个MPTCP会话对应的一个或多个子通道中的一个子通道,其他的子通道与第一子通道类似,为了避免赘述,不详细描述。
方式二,第一子通道为服务端随机选择的一个子通道,此时服务端可以不确定源网络入口。
可以理解的是,S330和S340的顺序没有任何限定,S330可以在S340之前或者之后,本申请实施例对此不作限制。
S350,服务端通过第一子通道向客户端发送第一TCP报文,所述第一TCP报文包括第一TCP选项,客户端通过第一子通道接收所述第一TCP报文,第一TCP选项包括目标网络入口的标识。第一子通道即为待切换的子通道,目标网络入口的标识用于客户端确定第二子通道。
在S350中,第一TCP报文可以是第二TCP数据报文也可以是第一TCP控制报文。下面举例描述:
例一,客户端与服务端已经建立好了第一子通道,服务端可以通过第一子通道向客户端发送第二TCP数据报文,第二TCP数据报文的报文头携带第一TCP选项,第 二TCP数据报文的报文体包括数据部分,该数据部分为客户端发起某个应用时,服务端反馈的该应用对应的数据,此时第一TCP报文为第二TCP数据报文。
例二,客户端与服务端已经建立好了第一子通道,服务端可以向客户端发送第一TCP控制报文,第一TCP控制报文包括第一TCP选项,第一TCP控制报文可以是任何一个服务端向客户端发送的TCP控制报文,例如TCP数据报文的应答报文或者保活报文等,本申请实施例不予限制,此时第一TCP报文为第一TCP控制报文。
S360,客户端获取第一TCP报文中的第一TCP选项,根据第一TCP选项中的第一字段的第一取值确定第二字段承载的目标网络入口的标识用于确定第二子通道。并且客户端可以获取第一TCP选项中的目标网络入口的标识。
具体地,客户端解析第一TCP报文的报文头,获取第一TCP选项,并解析第一TCP选项中的第一字段和第二字段,根据第一字段的第一取值确定第一TCP选项为通告第一TCP选项,例如图4中的第一字段的R的第一取值为0,也称为第一TCP选项为通告子流导航选项。
S370,客户端根据目标网络入口的标识确定第二子通道。
其中,S310建立的多个子通道中每个子通道都存在对应的目的地址标识以及源地址标识。客户端将多个子通道中目的地址标识为目标网络入口的标识的确定为待切换至的待选子通道,待选子通道可以是一个或多个。换句话说,客户端只能根据目标网络入口的标识确定待切换至的待选子通道的服务端的网络入口,若待选子通道为多个,则客户端可以根据本地策略在多个待选子通道中确定一个作为第二子通道,例如本地策略可以为往返时延(round-trip time,RTT)调度算法或者为其他的算法,本申请实施例对此不作限定。
可选地,客户端可以确定目标网络入口的标识对应的导航信息,客户端可以保存导航信息。具体地,导航信息用于客户端确定第二子通道,例如,导航信息可以为目标网络入口的标识对应的一个或多个待选子通道的五元组,若存在一个待选子通道,客户端可以根据该待选子通道的五元组锁定第二子通道;若存在多个待选子通道,客户端可以根据多个待选子通道的五元组以及预设准则(例如为RRT调度算法)在多个子通道中锁定第二子通道。导航信息还可以是其他的用于确定第二子通道的信息,本申请实施例对此不作限定。又例如,客户端可以利用导航信息将TCP数据报文(例如下述的第一TCP数据报文)导航到第二子通道,举例来说,存在三条子流,分别为子流1,子流2,子流3,以客户端为参考,子流1的网络入口地址为IP1,子流2的网络入口地址为IP2,子流3的网络入口地址为IP3。客户端可以利用路由规则可以将一个MPTCP会话的TCP数据报文分别路由到IP1、IP2、IP3,服务端在子流3(即为前述的第一子通道)上向客户端发送的第一TCP选项中的目标网络入口标识为IP1,则客户端可以根据目标网络入口标识对应的导航信息可以将发往IP3的第一TCP数据报文重定向到IP1(子流1为前述的第二子通道),IP3重定向到IP1可以理解为第一TCP数据报文首先被路由到IP3然后才路由到IP1。
可选地,客户端可以保存与目标网络入口的标识对应的待选子通道,若待选子通道为多个,则客户端可以根据本地策略在保存的多个待选子通道中确定第二子通道。
可以理解的是,若目标网络入口的标识为第一子通道的目的地址标识(此时第一 子通道的目的地址标识以客户端为参考),则第二子通道即为第一子通道,换句话说,当在第一子通道上接收到的第一TCP选项中的目标网络入口的标识为第一子通道的目的地址标识时,则不需要切换子通道,继续在第一子通道上传输TCP数据报文。
S380,客户端将第一子通道上待传输的数据切换到第二子通道上向服务端传输,服务端可以在第二子通道上接收来自第一设备的第一TCP数据报文。第一TCP数据报文的数据部分为所述第一子通道上待传输的数据。
具体地,不同子通道的报文封装格式不同,序列号规则不同,客户端将第一子通道上待传输的数据按照第二子通道的报文封装格式以及序列号规则封装成第一TCP数据报文向服务端发送。可选地,第一TCP数据报文可以包括一个或多个TCP数据报文。
这样,客户端可以将接收第一TCP选项的第一子通道上的数据切换到服务端期望的目标网络入口的标识对应的第二子通道上传输,可以实现精确切换,也能满足服务端的导航要求。
为了更好的说明方法300,下面结合图5至图9进行举例描述,如图5所示,客户端通过Wifi和蜂窝网络(例如5G或者长期演进(long term evolution,LTE)网络)与服务器的以太网(Ethernet)和Wifi建立了四条子通道,分别为<IP1,IP3>,<IP2,IP3>,<IP1,IP4>,<IP2,IP4>,其中<IP1,IP3>为首个子通道。服务端部署5G网络,服务端可以将子通道<IP2,IP4>上的数据流量切换到5G网络对应的目的地址IP5上,此时目标网络入口为IP5。下面结合图6描述方法600。
S610,服务端确定将子通道<IP2,IP4>上的数据流量切换到IP5上。换句话说,S610也可以等同于S320和S310,根据场景需求确定目标网络入口的标识,即为IP5的标识。
例如,服务端确定子通道网络入口IP3、IP4上的网络质量发现IP4网络入口的质量比较差,服务端又部署了5G网络,则服务端确定将子通道<IP2,IP4>上的数据流量切换至IP5上。
可以理解的是,<IP2,IP4>为前述的第一子通道,若服务端确定源网络入口为IP4,源网络入口为IP4的子通道包括<IP1,IP4>,<IP2,IP4>,则<IP2,IP4>为网络入口为IP4中的一个子通道,对应上述S340的方式一;若服务端没有确定源网络入口为IP4,则<IP2,IP4>为服务端随机选择的一个子通道,对应上述S340的方式二。
S620,服务端与客户端建立子通道<IP2,IP5>,具体地可以通过三次握手建立子通道<IP2,IP5>。
在S620的建立子通道<IP2,IP5>过程中,服务端可以将IP5的地址通过ADD-ADDR选项(也称为第三TCP选项)通告给客户端,如可以通过首子通道<IP1,IP3>将ADD-ADDR选项携带在TCP控制报文1的报文头中通告给客户端,也可以通过其他的子通道<IP2,IP3>,<IP1,IP4>,<IP2,IP4>将ADD-ADDR选项携带在TCP控制报文1的报文头中通告给客户端。例如,ADD-ADDR选项的格式如图7所示,类别(Kind)表示ADD-ADDR选项为MPTCP的选项,例如为30;长度(Length)为ADD-ADDR选项的长度,例如为16;子类型表示该ADD-ADDR选项用于通告地址标识,例如为3;rsv为保留位,通常为0;E表示该ADD-ADDR选项为通告地址选项还 是用于确认接收,例如E为0表示ADD-ADDR选项为确认选项,用于确定是否接收到,E为1表示ADD-ADDR选项为用于确定接收到;目的地址标识为IP5的地址标识,例如可以用20表示;目的地址为服务端为IP5分配的地址,例如可以用20表示IP5的目的地址标识;截短的(truncated)HMAC(8字节)表示加密散列的MPTCP会话标识,若E为0,则截短的HMAC为8字节,若E为1,表示不携带截短的HMAC的字段。
客户端接收到TCP控制报文1中携带的ADD-ADDR选项之后,向服务端发送确认接收到ADD-ADDR选项的TCP控制报文2,TCP控制报文2的报文头中携带ADD-ADDR选项,TCP控制报文1的报文携带的ADD-ADDR选项和TCP控制报文2的报文携带的ADD-ADDR选项的格式相同,不同点在于TCP控制报文2的报文携带的ADD-ADDR选项中的E为1。
S630,服务端生成第一TCP选项,具体地S630参见S330。在方法600中第一TCP选项如图4所述的格式可以具体赋值,如赋值后如图8所示,子类型的赋值待定例如可以为0xe,20为IP的目的地址标识,也即为目标网络入口的标识,其余参数参见图4的描述。
S640,服务端通过子通道<IP2,IP4>(也即为第一子通道)向客户端发送第一TCP报文,第一TCP报文包括第一TCP选项,客户端通过子通道<IP2,IP4>接收第一TCP报文,第一TCP选项为图8所示的值。
可以理解的是,方法600中的子通道<IP2,IP4>可以是服务端随机选择的一个子通道,此时方法600中服务端可以不确定子通道<IP2,IP4>。
具体地,S640参见S350的描述,为了避免赘述,本申请实施例不详细描述。
S650,客户端获取第一TCP报文中的第一TCP选项。例如,图8中第一TCP选项R为0,则第一TCP选项为通告子流导航选项,获取第一TCP选项中的20为S620中通告的IP5的标识。
可选地,客户端在接收到第一TCP报文时,可以向服务端发送确定接收到第一TCP报文的TCP确认报文,TCP确认报文包括的TCP选项与第一TCP选项不同的是E为1,其他的与第一TCP选项相同,TCP确认报文包括的TCP选项如图9所示。
S660,客户端根据第一TCP选项中的20确定子通道<IP2,IP5>为第二子通道。
S670,客户端将子通道<IP2,IP4>上待传输的数据切换到子通道<IP2,IP5>上传输。
需要理解的是,方法600描述的是建立第二子通道(<IP2,IP5>)并将第一子通道(<IP2,IP4>)上的数据流量直接切换到第二子通道(<IP2,IP5>)上,还可以不建立第二子通道,第二子通道是已经建立好的,客户端根据第一TCP选项在已经建立好的子通道中确定第二子通道,换句话说,可以不存在S620,<IP2,IP5>是已经建立好的子通道,为了避免赘述,本申请实施例不详细描述。
需要说明的是,方法300和方法600中,描述的是服务端向一个客户端发送第一TCP选项,服务端可以向多个客户端发送第一TCP选项,服务端可以通过每个客户端的子通道向客户端发送相同的第一TCP选项,每个客户端接收第一TCP选项之后,根据目标网络入口的标识确定一个或多个待切换至的子通道,在一个或多个待切换至 的子通道中确定最终要切换至的子通道,这样,多个客户端可以将接收第一TCP选项的子通道上待传输的TCP数据报文切换到服务端期望的目标网络入口的标识所标识的子通道上,可以实现大规模的调度,从而可以提高导航效率。
上述方法300和方法600中描述的是,客户端将第一子通道中的待传输的数据切换到第二子通道,客户端执行完S370或S680之后,第一子通道可以断开或者客户端可以维持第一子通道不断开,下面分别描述断开和不断开两种情况。
情况一,若客户端维持第一子通道不断开,维持第一子通道不断开时客户端和服务端可以通过第一子通道发送TCP保活报文。这样,当切换至第二子通道上的原本在第一子通道上传输的后续数据需要切换回第一子通道时,能够迅速切换回至第一子通道,避免客户端和服务端需要重新建立第一子通道所带来的时延。具体地,当在执行完S380或者S670之后,若服务端继续在第二子通道上向客户端继续发送第一TCP选项,则此时第一TCP选项包括的目标网络入口的标识为第一子通道的目的地址标识(此时以客户端为参考),则客户端可以将第二子通道上待发送的原本要在第一子通道上发送的数据切换回至第一子通道,这样,可以节省需要重新建立第一子通道的时长。
此外,若客户端维持第一子通道不断开服务端可以撤销上述方法300或方法600中的第一TCP选项,具体地,服务端在一些场景中,不需要将客户端在第一子通道上待发送的数据切换至第二子通道了,服务端可以撤销第一TCP选项,下面描述以方法300为例,具体地,如图10所示,撤销的过程如图10中的方法1000所示:
S1010,服务端确定撤销第一TCP选项。
例如,在S320的场景一的故障预防的中,服务端检测到目标网络入口的网络质量变的更差,服务端在执行完方法300之后,服务端可以确定撤销第一TCP选项。
又例如,在S320的场景二的部署新的网络入口中,服务端在执行完方法300之后,确定方法300中切换到第二子通道上的第一TCP数据报文是否稳定,若不稳定,则可以确定撤销第一TCP选项。
再例如,在S320的场景三的增值服务中,如果VIP用户变为了普通用户,则可以将这些用户的数据,则服务端可以确定撤销第一TCP选项。
需要说明的是,本申请实施例提到的撤销第一TCP选项可以理解为将切换到第二子通道上数据切换回第一子通道。
S1020,服务端生成第二TCP选项。
其中,第二TCP选项用于撤销第一TCP选项,第二TCP选项中的第三字段的第二取值用于指示撤销所述第一TCP选项。
下面分两中情况讨论第一TCP选项和第二TCP选项。
情况一,第一TCP选项的第一字段与第二TCP选项的第三字段为同一字段,此时,第同一字段的不同取值表示不同的物理意义。具体地,第一TCP选项的第一字段的第一取值表示第一TCP选项为通告子流导航选项,第三TCP选项的第三字段(第一字段)的第二取值表示第三TCP选项用于撤销第一TCP选项,第一TCP选项与第三TCP选项除了第一字段的取值不同之外,其他字段都相同,并且这些字段的取值都相同。例如,第三字段为图4中的R,R的第二取值为1表示撤销所述第一TCP选项,第二TCP选项的格式与第一TCP选项的格式相同,都为图4所示的格式,第一TCP选项 与第二TCP选项的区别在于,例如第一TCP选项中第一字段R的第一取值为为0,第二TCP选项中的第三字段R的第二取值为1,图4中第一TCP选项与第二TCP选项的其他字段的完全相同,例如,目标网络入口的标识也相同。
情况二,第一TCP选项的第一字段与第二TCP选项的第三字段为不同的字段,此时可以利用两个TCP选项中的不同的字段指示不同的物理意义。具体地,第一TCP选项的第一字段的第一取值表示第一TCP选项为通告子流导航选项,第三TCP选项的第三字段的第二取值表示第三TCP选项用于撤销第一TCP选项,除了第一TCP选项的第一字段和第二TCP选项的第三字段之外,其他字段的取值都相同,并且其他字段的取值都相同。可选地,第一取值和第二取值可以不同,这样,可以利用不同字段的不同取值指示不同TCP选项的物理意义。可选地,第一取值和第二取值也可以相同,这样可以利用不同字段的相同取值指示不同TCPU选项的物理意义。例如,第一TCP选项的第一字段为图4中的R,R的第一取值为0,第二TCP选项的第三字段图4中的R替换为R’,R’的第二取值为1表示撤销所述第一TCP选项,第二TCP选项的其他的字段(如第二字段)的取值与图4第一TCP选项的其他字段(如第二字段)的取值相同,例如,目标网络入口的标识也相同。
S1030,服务端在第一子通道上向客户端发送第二TCP控制报文,客户端在第一子通道上接收服务端发送的第二TCP控制报文,第二TCP控制报文包括第二TCP选项。
S1040,客户端获取第二TCP控制报文中的第二TCP选项,根据第三字段的第二取值确定第二TCP选项为撤销第一TCP选项。客户端可以获取第二TCP选项中第二字段的目标网络入口的标识。
例如若针对上述S1020的情况一,图4中的第三字段(第一字段)R的第二取值为1,客户端可以确定撤销第一TCP选项;又例如,若针对上述S1020的情况二,若R’的第二取值为1,客户端可以确定撤销第一TCP选项。
具体地,客户端解析第二TCP报文的报文头,获取第二TCP选项,并解析第二TCP选项中的第三字段和第二字段,客户端根据第三字段的第二取值确定撤销第一TCP选项,换句话说,客户端撤销切换到第二字段承载的目标网络入口的数据,也称为第二TCP选项为撤销子流导航选项。
S1050,客户端根据第二TCP选项在第一子通道上继续传输第三TCP数据报文,第三TCP数据报文为第一子通道上待传输的TCP数据报文,第三TCP数据报文是按照第一子通道上封装格式和序列号准则生成的。
可以将S1050理解为,不用将原本在第一子通道传输数据再重定向到第二子通道而是直接在第一子通道上继续传输。例如,存在三条子流,分别为子流1,子流2,子流3,以客户端为参考,子流1的网络入口地址为IP1,子流2的网络入口地址为IP2,子流3的网络入口地址为IP3。客户端可以利用路由规则可以将一个MPTCP会话的TCP数据报文分别路由到IP1、IP2、IP3,服务端在子流3(即为前述的第一子通道)上向客户端发送的第一TCP选项中的目标网络入口标识为IP1,则客户端根据目标网络入口标识对应的导航信息可以将发往IP3的第一TCP数据报文重定向到IP1(子流1为前述的第二子通道),IP3重定向到IP1可以理解为第一TCP数据报文首先被路由 到IP3然后才路由到IP1。服务端继续在子流3上向客户端发送第二TCP选项,第二TCP选项中的目标网络入口标识仍然为IP1,则目标网络入口将发往IP3的第三TCP数据报文继续在发往IP3,不需要再重定向到IP1。
S1060,若客户端保存了目标网络入口的标识对应的导航信息,客户端确定需要将导航信息删除,释放资源。
可以理解的是,S1050与S1060之前的顺序不作任何限制,S1050可以在S1060之前或者之后,或者同时进行,本申请实施例对此不作限制。
需要说明的是,在一些场景中需要撤销第一TCP选项则需要执行方法1000,在一些场景中不需要撤销第一TCP选项,则不需要执行方法1000。
需要说明的是,方法1000撤销的第一TCP选项为方法300和方法600中的第一TCP选项,方法300和方法600中是服务端生成第一TCP选项,则方法1000中服务端确定撤销第一TCP选项,若客户端生成第一TCP选项,则客户端确定撤销第一TCP选项,具体实现过程与方法1000类似,为了避免赘述,本申请实施例不详细描述。
情况二,第一子通道断开。分三种情况讨论:
a)客户端主动断开第一子通道,客户端主动发起四次挥手解除第一子通道之后,客户端可以删除第一子通道的相关配置信息,也可以删除前述S360中的导航信息。当然,服务端也需要删除第一子通道相关的配置信息。
b)服务端主动断开第一子通道,服务端主动发起四次挥手解除第一子通道之后,服务端需要删除第一子通道相关的配置信息。客户端可以删除第一子通道的相关配置信息,也可以删除前述S360中的导航信息。
c)第一子通道被动断开,当客户端和服务端在预设时长内在第一通道上接收不到TCP保活报文,则有可能由于网络故障导致第一子通道故障了,则服务端删除第一子通道的相关配置信息,服务端删除第一子通道的相关配置信息和S360中的导航信息。
需要说明的是,在一些场景中第一子通道需要断开,在一些场景中不需要断开第一子通道,本申请实施例对此不作限制。
可以理解的是,本申请实施例中,都是以第一TCP选项包括目标网络入口的标识为例描述,这样,每执行一次本申请实施例提供的方法可以将一个子通道(第一子通道)上的数据流量切换到另外一个子通道(第二子通道)上,第一TCP选项还可以包括源网络出口的标识,源网络出口的标识可以为子通道的源地址标识,这样,可以将多个子通道上的数据流量切换到一个或多个子通道上,本申请实施例不予限制。例如图5中,第一TCP选项还可以包括IP2和IP5,IP2为源网络出口的标识,IP5为目标网络入口的标识,这样,可以在子通道<IP2,IP4>上发送第一TCP选项,客户端接收到第一TCP选项之后,将源网络出口为IP2的数据流量都切换到子通道<IP2,IP5>上,即将子通道<IP2,IP3>和<IP2,IP4>上的数据流量切换到子通道上<IP2,IP5>。
也可以理解的是,本申请实施例中,都是以客户端向服务端发送第一TCP数据报文为例描述,服务端也可以向客户端发送第一TCP数据报文,客户端可以确定目标网络入口的标识并生成第一TCP选项,并向服务端发送携带第一TCP选项的TCP报文,这样,客户端可以引导服务端按照客户端的期望将第一TCP数据发送到客户端期望的第二子通道上,为了避免赘述本申请实施例对此不作限制。此外,任何两个设备,其 中一个设备可以作为发送第一TCP数据报文的发送端,另外一个设备可以作为接收第一TCP数据报文的接收端引导发送第一TCP数据报文的发送端将数据流量引导在接收端期望的网络入口上,本申请实施例对发送端和接收端具体为什么设备不作任何限定。
需要说明的是,本申请实施例中,第一TCP选项的格式只是举例描述,本申请实施例对第一TCP选项的格式不作限定。
需要说明的是,本申请实施例中,客户端在一个MPTCP会话对应的多个子通道的哪个子通道上发送的TCP数据报文,则该TCP数据报文是按照该子通道的封装格式和序列号生成的,每子通道的序列号准则需要遵循该MPTCP会话的序列号准则。
需要说明的是,本申请实施例中的第一TCP选项、第二TCP选项和ADD_ADDR选项的格式仅仅是举例描述,本申请对每个选项的格式没有任何限制,并且每个选项中的各个字段之间的位置关系以及长度也不限定,各个选项可以包括本申请实施例中提到的更多或者更少的字段,本申请不予限制。
本实施例可以根据上述方法示例对客户端和服务端进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的客户端和服务端,用于执行上述传输TCP报文的方法,因此可以达到与上述实现方法相同的效果。在采用集成的单元的情况下,客户端和服务端分别可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对客户端和服务端的动作进行控制管理,例如,可以用于支持电子设备执行处理单元执行的步骤。存储模块可以用于支持客户端和服务端执行存储程序代码和数据等。通信模块,可以用于支持客户端和服务端与其他设备的通信。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备可以为具有图2所示结构的设备。
本实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的安全访问数据的方法。
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的安全访问数据的方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块, 该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的安全访问数据的方法。
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (22)

  1. 一种传输数据的方法,其特征在于,包括:
    第一设备通过第一子通道接收第二设备发送的第一传输控制协议TCP选项,所述第一TCP选项包括目标网络入口的标识,所述目标网络入口的标识用于标识所述第二设备向所述第一设备提供服务的目标网络入口;
    所述第一设备根据所述第一TCP选项中的所述目标网络入口的标识确定第二子通道;
    所述第一设备将所述第一子通道上的待传输数据切换到所述第二子通道上向所述第二设备传输。
  2. 根据权利要求1所述的方法,其特征在于,所述第一TCP选项包括第一字段和第二字段,所述第一字段取值为第一取值,所述第二字段用于承载所述目标网络入口的标识,所述第一取值用于指示所述第二字段承载的所述目标网络入口的标识用于确定所述第二子通道,在所述第一设备根据所述目标网络入口的标识确定第二子通道之前,所述方法还包括:
    所述第一设备根据所述第一字段的所述第一取值确定所述第二字段承载的所述目标网络入口的标识用于确定所述第二子通道。
  3. 根据权利要求1或2所述的方法,其特征在于,所述目标网络入口对应一个或多个子通道;
    其中,所述第一设备根据所述第一TCP选项中的所述目标网络入口的标识确定第二子通道,包括:
    所述第一设备根据本地策略在所述一个或多个子通道中确定所述第二子通道。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一设备通过第一子通道接收第二设备发送的第一TCP选项,包括:
    所述第一设备通过所述第一子通道接收所述第二设备发送的第二TCP数据报文,所述第二TCP数据报文包括所述第一TCP选项;或者
    所述第一设备通过所述第一子通道接收所述第二设备发送的第一TCP控制报文,所述第一TCP控制报文包括所述第一TCP选项。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,在所述第一设备将所述第一子通道上的待传输的数据切换到所述第二子通道上之后,所述方法还包括:
    所述第一设备维持所述第一子通道不断开。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    所述第一设备在所述第一子通道上接收来自所述第二设备的第二TCP控制报文,所述第二TCP控制报文包括第二TCP选项,所述第二TCP选项用于撤销所述第一TCP选项;
    所述第一设备根据所述第二TCP选项在所述第一子通道上继续传输第三TCP数据报文,所述第三TCP数据报文为所述第一子通道上待传输的TCP数据报文。
  7. 根据权利要求6所述的方法,其特征在于,所述第二TCP选项与所述第一TCP选项的格式相同,所述第二TCP选项中的第三字段的取值为第二取值,所述第二取值用于指示撤销所述第一TCP选项。
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    所述第一设备删除所述目标网络入口的标识对应的导航信息,所述导航信息为所述第一设备根据所述目标网络入口的标识生成的用于确定所述第二子通道的信息。
  9. 根据权利要求1至4中任一项所述的方法,其特征在于,在所述第一设备将所述第一子通道上的待传输的数据切换到所述第二子通道上之后,若所述第一子通道断开,所述方法还包括:
    所述第一设备删除所述目标网络入口的标识对应的导航信息和所述第一子通道的配置信息,所述导航信息为所述第一设备根据所述目标网络入口的标识生成的用于确定所述第二子通道的信息。
  10. 一种传输数据的方法,其特征在于,包括:
    第二设备确定目标网络入口的标识,所述目标网络入口的标识用于标识所述第二设备向第一设备提供服务的目标网络入口;
    所述第二设备生成第一传输控制协议TCP选项,所述第一TCP选项包括所述目标网络入口的标识;
    所述第二设备通过第一子通道向第一设备发送所述第一TCP选项,所述第一TCP选项中的所述目标网络入口的标识用于所述第一设备确定第二子通道;
    所述第二设备在所述第二子通道上接收来自所述第一设备的第一TCP数据报文,所述第一TCP数据报文的数据部分为所述第一子通道上待传输的数据部分。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    所述第二设备确定源网络入口,所述源网络入口为所述第二设备向所述第一设备提供服务的网络入口,所述源网络入口对应一个或多个子通道;
    所述第二设备在所述一个或多个子通道中确定所述第一子通道。
  12. 根据权利要求10或11所述的方法,其特征在于,所述第一TCP选项包括第一字段和第二字段,所述第一字段取值为第一取值,所述第二字段用于承载所述目标网络入口的标识,所述第一取值用于指示所述第二字段承载的所述目标网络入口的标识用于所述第一设备确定所述第二子通道。
  13. 根据权利要求10至12中任一项所述的方法,其特征在于,所述第二设备通过第一子通道向第一设备发送所述第一TCP选项,包括:
    所述第一设备通过所述第一子通道向所述第二设备发送第二TCP数据报文,所述第二TCP数据报文包括所述第一TCP选项;或者
    所述第一设备通过所述第一子通道向所述第二设备发送第一TCP控制报文,所述第一TCP控制报文包括所述第一TCP选项。
  14. 根据权利要求10至13中任一项所述的方法,其特征在于,在所述第一设备将所述第一子通道上的待传输的第一TCP数据报文切换到所述第二子通道上之后,若所述第一子通道不断开,所述方法还包括:
    所述第二设备在所述第一子通道上向所述第一设备发送第二TCP控制报文,所述第二TCP控制报文包括第二TCP选项,所述第二TCP选项用于撤销所述第一TCP选项。
  15. 根据权利要求14所述的方法,其特征在于,所述第二TCP选项与所述第一TCP 选项的格式相同,所述第二TCP选项中的第三字段的取值为第二取值,所述第二取值用于指示撤销所述第一TCP选项。
  16. 根据权利要求10至13中任一项所述的方法,其特征在于,在所述第二设备在所述第二子通道上接收来自所述第一设备的第一TCP数据报文之后,若所述第一子通道断开,所述方法还包括:
    所述第二设备删除所述第一子通道的配置信息。
  17. 一种电子设备,其特征在于,包括:一个或多个处理器;存储器;安装有多个应用程序的模块;以及一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,当所述一个或者多个程序被所述处理器执行时,使得所述电子设备执行如权利要求1至9中任一项所述的方法。
  18. 一种电子设备,其特征在于,包括:一个或多个处理器;存储器;安装有多个应用程序的模块;以及一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,当所述一个或者多个程序被所述处理器执行时,使得所述电子设备执行如权利要求10至16中任一项所述的方法。
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至9中任一项所述的方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求10至16中任一项所述的方法。
  21. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至9中任一项所述的方法。
  22. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求10至16中任一项所述的方法。
PCT/CN2021/104079 2020-07-03 2021-07-01 传输数据的方法和装置 WO2022002215A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010639154.0 2020-07-03
CN202010639154.0A CN113965516B (zh) 2020-07-03 2020-07-03 传输数据的方法和装置

Publications (1)

Publication Number Publication Date
WO2022002215A1 true WO2022002215A1 (zh) 2022-01-06

Family

ID=79315116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/104079 WO2022002215A1 (zh) 2020-07-03 2021-07-01 传输数据的方法和装置

Country Status (2)

Country Link
CN (1) CN113965516B (zh)
WO (1) WO2022002215A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598739A (zh) * 2022-02-28 2022-06-07 阿里巴巴(中国)有限公司 基于云应用的通信通道的处理方法、装置及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015168909A1 (zh) * 2014-05-08 2015-11-12 华为技术有限公司 数据传输控制节点、通信系统及数据传输管理方法
CN105474598A (zh) * 2013-08-29 2016-04-06 瑞典爱立信有限公司 Mptcp调度
CN107078972A (zh) * 2014-03-31 2017-08-18 三星电子株式会社 用于在支持多路径传输控制协议的通信网络中提供服务的装置和方法
CN111213401A (zh) * 2017-08-18 2020-05-29 诺基亚技术有限公司 用于无线混合接入网络的业务分布控制

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109921988B (zh) * 2014-07-21 2021-08-03 华为技术有限公司 链路控制节点、链路控制方法及通信系统
US20230144074A1 (en) * 2018-10-11 2023-05-11 Nokia Technologies Oy Active mode traffic steering and switching between cellular and non-cellular systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105474598A (zh) * 2013-08-29 2016-04-06 瑞典爱立信有限公司 Mptcp调度
CN107078972A (zh) * 2014-03-31 2017-08-18 三星电子株式会社 用于在支持多路径传输控制协议的通信网络中提供服务的装置和方法
WO2015168909A1 (zh) * 2014-05-08 2015-11-12 华为技术有限公司 数据传输控制节点、通信系统及数据传输管理方法
CN111213401A (zh) * 2017-08-18 2020-05-29 诺基亚技术有限公司 用于无线混合接入网络的业务分布控制

Also Published As

Publication number Publication date
CN113965516A (zh) 2022-01-21
CN113965516B (zh) 2023-10-13

Similar Documents

Publication Publication Date Title
JP7048745B2 (ja) 通信方法および関連製品
JP5642765B2 (ja) 移動性管理のための擬似配線
US20190357082A1 (en) Traffic distribution method through multi-access network in a network and network entity performing the same
WO2014074681A9 (en) Reliable multicast/broadcast for p2p communications
WO2013010420A1 (zh) 一种无线宽带通信方法,装置和系统
US10182386B2 (en) Communication method of determining suitable communication paths between devices
US10447783B2 (en) Communication method
US9949309B2 (en) Methods, computer readable mediums, and apparatuses for providing communication to a mobile device using virtual connections
WO2021135650A1 (zh) 通信方法及装置
US20160127150A1 (en) Packet processing method and device
WO2015018194A1 (zh) 一种隧道建立的方法及装置
WO2022033543A1 (zh) 一种中继通信方法及通信装置
WO2022002215A1 (zh) 传输数据的方法和装置
WO2022095048A1 (zh) 一种通信方法、装置及计算机可读存储介质
JP2016146531A (ja) 無線通信装置、無線通信システム及びプログラム
WO2020152954A1 (ja) ネットワーク配置制御装置、通信システム、および、その制御方法
KR20210055537A (ko) 무선 통신 시스템에서 로컬 프로세싱을 위한 트래픽 스티어링을 위한 방법 및 장치
CN111050368A (zh) 网络传输控制方法、装置、终端设备以及存储介质
TWI390934B (zh) 傳遞媒體獨立交接能力資訊之無線通信方法及系統
WO2022205995A1 (zh) 一种业务流处理方法、装置及系统
JPWO2019087395A1 (ja) 基地局装置、端末装置、無線通信システム及び接続設定方法
KR20190074614A (ko) 동적 터널링 기반 트래픽 전송 시스템, 그리고 이의 시그널링 방법
US20210219105A1 (en) Communications method and apparatus
WO2022056794A1 (zh) 一种通信方法及装置
KR101924053B1 (ko) 이동형 장치에서의 연결 자원 선택 방법 및 이를 위한 이동형 장치

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21832473

Country of ref document: EP

Kind code of ref document: A1