CN110535959B - Method and device for transmitting data and computer readable storage medium - Google Patents

Method and device for transmitting data and computer readable storage medium Download PDF

Info

Publication number
CN110535959B
CN110535959B CN201910825497.3A CN201910825497A CN110535959B CN 110535959 B CN110535959 B CN 110535959B CN 201910825497 A CN201910825497 A CN 201910825497A CN 110535959 B CN110535959 B CN 110535959B
Authority
CN
China
Prior art keywords
proxy node
target
tcp long
data
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910825497.3A
Other languages
Chinese (zh)
Other versions
CN110535959A (en
Inventor
李淼
赵东
杨攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Yunzhong Rongxin Network Technology Co ltd
Original Assignee
Beijing Yunzhong Rongxin Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Yunzhong Rongxin Network Technology Co ltd filed Critical Beijing Yunzhong Rongxin Network Technology Co ltd
Priority to CN201910825497.3A priority Critical patent/CN110535959B/en
Publication of CN110535959A publication Critical patent/CN110535959A/en
Application granted granted Critical
Publication of CN110535959B publication Critical patent/CN110535959B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application provides a method, a device and a computer readable storage medium for transmitting data, wherein the method comprises the following steps: the method comprises the steps that a first proxy node receives transmission data sent by user equipment, wherein the transmission data comprise a first identifier, and the first identifier is used for identifying a target data center for receiving the transmission data; the first agent node determines a target agent node according to the first identifier; the first proxy node sends transmission data to the target proxy node through one or more TCP long connections in at least one TCP long connection between the first proxy node and the target proxy node, so that the target proxy node sends the transmission data to the target data center. According to the embodiment of the application, the existing link between the first agent node and the second agent node is multiplexed to carry out data transmission, so that the steps of handshaking between the first agent node and the second agent node are reduced, and the time used in the whole process of data transmission can be shortened.

Description

Method and device for transmitting data and computer readable storage medium
Technical Field
The present application relates to computer communication technologies, and in particular, to a method, an apparatus, and a computer-readable storage medium for transmitting data.
Background
When the ue is far away from the data center (e.g., more than 1500 km away, etc.), the data may be transmitted with a relatively large delay. Meanwhile, in the process of data Transmission, there are many physical forwarding devices through which data passes, and packet loss is likely to occur during the process, especially when TCP (Transmission Control Protocol) is used, multiple data retransmissions may be performed.
At present, in order to speed up data transmission and improve transmission quality, users transmit data in a manner of building a network proxy. That is, a proxy node is established in a region close to a user, and when the user equipment transmits data, the user equipment sends the data to the proxy node first, and then forwards the data to the data center through the proxy node.
In the process of implementing the present invention, the inventor finds that due to the connection-oriented protocol such as TCP, the steps cannot be lacked in each communication process. Therefore, the time consumption of the whole data transmission process is not reduced in the data transmission process of the above prior art scheme. That is, at least, the prior art has a problem that the time consumed in the whole process of data transmission is long in the process of data transmission.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, and a computer-readable storage medium for transmitting data, so as to achieve the effect of shortening the data transmission time.
In a first aspect, an embodiment of the present application provides a method for transmitting data, where the method is applied to a data transmission system, and the data transmission system includes a user equipment, a first proxy node, at least one second proxy node, and at least one data center, where at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the method includes: the method comprises the steps that a first proxy node receives transmission data sent by user equipment, wherein the transmission data comprise a first identifier, and the first identifier is used for identifying a target data center for receiving the transmission data; the first agent node determines a target agent node according to the first identifier, wherein the target agent node is a second agent node associated with the target data center; the first proxy node sends transmission data to the target proxy node through one or more TCP long connections in at least one TCP long connection between the first proxy node and the target proxy node, so that the target proxy node sends the transmission data to the target data center.
Therefore, according to the embodiment of the application, a first proxy node and a second proxy node are deployed between user equipment and a data center, wherein at least one Transmission Control Protocol (TCP) long connection is established between the first proxy node and the second proxy node. Therefore, in the process of sending data by the user equipment, the existing link between the first proxy node and the second proxy node is multiplexed to carry out data transmission, so that the steps of handshaking between the first proxy node and the second proxy node are reduced, and the time used in the whole process of data transmission can be shortened.
In one possible embodiment, the first proxy node sending transmission data to the target proxy node over one or more of the at least one long TCP connection with the target proxy node, comprises: the first proxy node acquires a second identifier, wherein the second identifier is used for identifying the state of each TCP long connection in at least one TCP long connection between the first proxy node and the target proxy node, and the state comprises an idle state or a busy state; the first proxy node selects one or more TCP long connections in an idle state from at least one TCP long connection between the first proxy node and the target proxy node according to the second identifier; the first proxy node sends transmission data to the target proxy node through one or more TCP long connections in an idle state.
Therefore, the TCP long connection in the idle state is selected through the second identifier, and the effect of quickly selecting the TCP long connection is achieved.
In one possible embodiment, when the number of TCP long connections required by the first proxy node is greater than the number of TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node, the method further comprises: the first proxy node creates a new long TCP connection between the first proxy node and the target proxy node.
Therefore, the embodiment of the application meets the requirement of the first proxy node by creating a new long TCP connection.
In one possible embodiment, the method further comprises: when the idle time of a first TCP long connection in at least one TCP long connection between the first proxy node and the target proxy node exceeds the preset time, the first TCP long connection is disconnected by the first proxy node.
Therefore, the TCP long connection with the idle time exceeding the preset time is disconnected, so that the resource can be released.
In a second aspect, the present embodiment provides a method for transmitting data, where the method is applied to a data transmission system, and the data transmission system includes a user equipment, a first proxy node, at least one second proxy node, and at least one data center, where at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the method includes: the method comprises the steps that a target proxy node receives transmission data sent by a first proxy node, wherein the transmission data are transmitted through one or more TCP long connections in at least one TCP long connection between the target proxy node and the first proxy node, the transmission data comprise a first identifier, the first identifier is used for identifying a target data center for receiving the transmission data, and the target proxy node is a second proxy node associated with the target data center; the target agent node determines a target data center according to the first identification; and the target agent node sends the transmission data to the target data center.
In one possible embodiment, one or more of the at least one TCP long connections between the target proxy node and the first proxy node are idle TCP long connections; the second identifier is used for identifying the state of each TCP long connection in the at least one TCP long connection between the first proxy node and the target proxy node, and the state comprises an idle state or a busy state.
In one possible embodiment, when the number of TCP long connections required by the first proxy node is greater than the number of TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node, the method further comprises: the target proxy node creates a new long TCP connection between the target proxy node and the first proxy node.
In one possible embodiment, the method further comprises: and when the idle time of a first TCP long connection in at least one TCP long connection between the target proxy node and the first proxy node exceeds the preset time, the second proxy node disconnects the first TCP long connection.
In a third aspect, an embodiment of the present application provides an apparatus for transmitting data, where the apparatus is applied to a first proxy node in a data transmission system, the data transmission system includes a user equipment, the first proxy node, at least one second proxy node, and at least one data center, where at least one TCP long connection is established between the first proxy node and each second proxy node in the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the apparatus includes: the first receiving module is used for receiving transmission data sent by user equipment, wherein the transmission data comprise a first identifier, and the first identifier is used for identifying a target data center for receiving the transmission data; the first determining module is used for determining a target agent node according to the first identifier, wherein the target agent node is a second agent node associated with the target data center; and the first sending module is used for sending the transmission data to the target proxy node through one or more TCP long connections in at least one TCP long connection with the target proxy node so that the target proxy node sends the transmission data to the target data center.
In a fourth aspect, an embodiment of the present application provides an apparatus for transmitting data, where the apparatus is applied to a target data center in a data transmission system, the data transmission system includes a user equipment, a first proxy node, at least one second proxy node, and at least one data center, where at least one TCP long connection is established between the first proxy node and each second proxy node in the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the apparatus includes: the second receiving module is used for receiving transmission data sent by the first proxy node, wherein the transmission data are transmitted through one or more TCP long connections in at least one TCP long connection between the target proxy node and the first proxy node, the transmission data comprise a first identifier, the first identifier is used for identifying a target data center for receiving the transmission data, and the target proxy node is a second proxy node associated with the target data center; the second determining module is used for determining the target data center according to the first identifier; and the second sending module is used for sending the transmission data to the target data center.
In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the method according to the first aspect or any optional implementation manner of the first aspect.
In a sixth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the method according to the second aspect or any optional implementation manner of the second aspect.
In a seventh aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the method of the first aspect or any of the alternative implementations of the first aspect.
In an eighth aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the method of the second aspect or any of the alternative implementations of the second aspect.
In order to make the aforementioned objects, features and advantages of the present embodiments more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 illustrates a schematic diagram of a data transmission system to which embodiments of the present application are applicable;
fig. 2 is a flowchart of a method for transmitting data according to an embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating an apparatus for transmitting data according to an embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating another apparatus for transmitting data according to an embodiment of the present application;
fig. 5 is a block diagram of the apparatus in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
In order to ensure the reliability of the TCP link, a dedicated network line is generally used, and the quality and the bandwidth of the physical link used for transmission are ensured through the dedicated network line. However, the access node of the dedicated network is generally fixed, and the applicable scenario is generally from a fixed area (e.g. a bank) to a designated data center, which limits the geographical range used by the user.
At present, in order to expand the geographical range used by the user, a network agent is built to expand the geographical range used by the user. The network agent mode is that an agent node is built in a region close to a user, when the user equipment transmits data, the user equipment firstly transmits the data to the agent node, and then the data are forwarded to a data center through the agent node.
However, the TCP protocol may undergo a handshake (e.g., three-way handshake) before transmitting data, and the data transmission is performed after the handshake is successful, and the receiving end (e.g., proxy node or data center) sends an acknowledgement after receiving the data, and a data transmission requires at least 5 round trips regardless of the connection being closed. That is, in the prior art, although the geographical range of the user is enlarged by building the network agent, the steps of the network agent cannot be lacked in each communication process, and the time consumption of the whole process of data transmission is not reduced.
Therefore, how to shorten the data transmission time without changing the TCP interaction logic is a problem to be solved by the present application.
In view of the problems of the prior solutions, embodiments of the present application cleverly provide a method, an apparatus, and a computer-readable storage medium for transmitting data by deploying a first proxy node and a second proxy node between a user equipment and a data center, wherein at least one long TCP connection is established between the first proxy node and the second proxy node. Therefore, in the process of sending data by the first proxy node, the data transmission is carried out by multiplexing the existing link between the first proxy node and the second proxy node, so that the steps of handshaking between the first proxy node and the second proxy node are reduced, and the time used in the whole process of data transmission can be shortened.
To facilitate understanding of the embodiments of the present application, some terms in the embodiments of the present application are first explained herein as follows:
the term "first proxy node" may denote an acceleration node physically located close to the area where the user equipment is located. That is to say, the first proxy node in the embodiment of the present application may implement accelerated transmission of data sent by the user equipment in the area corresponding to the first proxy node.
In addition, a first proxy node may be associated with an area, i.e., an area may be provided with a first proxy node.
For example, a region level area (e.g., beijing) may be provided with a first proxy node, and embodiments of the present application are not limited thereto.
It should be understood that the size of the area corresponding to the first proxy node may be set according to actual requirements, and the embodiment of the present application is not limited thereto.
The name "second proxy node" may represent a route forwarding node that is physically located close to the data center. That is to say, the second proxy node in the embodiment of the present application may not only implement accelerated transmission of data sent by the user equipment in the area corresponding to the first proxy node, but also forward the data sent by the first proxy node to the data center.
Further, one second proxy node may be connected with each of the at least one data center, and one data center may be connected with one second proxy node.
For example, one second agent node may be connected to each of five data centers, and each of five data centers may be connected to only the second agent node, and embodiments of the present application are not limited thereto.
The term "TCP short connection" may refer to a connection established when both communication parties have data interaction, and disconnected after data transmission is completed. The user equipment in the embodiment of the application can send data to the first proxy node through the TCP short connection, and the second proxy node can send data to the data center through the TCP short connection.
The term "TCP long connection" may be that after a connection is initiated, the device remains connected to another device before requesting to close the connection, essentially maintaining the communication pipe, and then multiplexing it. That is to say, the TCP long connection in this embodiment refers to that before transmission data sent by the user equipment is transmitted between the first proxy node and the second proxy node, it has completed a handshake process, so that the first proxy node can directly send the transmission data to the second proxy node after receiving the transmission data sent by the user equipment, thereby saving time consumed for creating a connection. In addition, after the first proxy node finishes transmitting the transmission data sent by the user equipment, the TCP long connection can be kept for the next use.
The term "first identifier" may identify a target data center that receives transmission data sent by the user equipment. For example, the first identifier may identify an address of the target data center, and the embodiment of the present application is not limited thereto.
The term "second identifier" may identify a state of each of at least one long TCP connection between the first proxy node and the second proxy node. The states include an idle state and a busy state, the idle state may indicate that the TCP long connection may perform data transmission, and the busy state may identify that the TCP long connection may perform data transmission. That is, the idle state indicates that the TCP long connection is in a usable state, and the busy state indicates that the TCP long connection is in an unusable state.
For example, the second identifier may identify that a first TCP long connection of the at least one TCP long connection between the first proxy node and the second proxy node is in an idle state, where the first TCP long connection is one of the at least one TCP long connection, and the embodiment of the present application is not limited thereto.
Referring to fig. 1, fig. 1 is a schematic diagram of a data transmission system 100 to which an embodiment of the present application is applicable. Specifically, the data transmission system 100 includes at least a user equipment 110, a first proxy node 120, a second proxy node 130, and a data center 140.
The user equipment 110 may be a terminal device for use by a user. For example, the user device 110 may be a mobile phone, a tablet computer, a laptop portable computer, or a desktop computer. That is, the specific type of the user equipment 110 may be selected according to the actual needs of the user, and the embodiment of the present application is not limited thereto.
In addition, the user device 110 is equipped with communication capabilities, and may run a browser or other application capable of loading and displaying web pages. For example, the application program may be an application program of an instant messaging class (e.g., weChat) or an application program of a mailbox (e.g., QQ mailbox), and the embodiment of the present application is not limited thereto.
The first proxy node 120 may be one server, a server cluster composed of at least two servers, or a cloud computing center. The server cluster may be centralized or distributed (for example, the first proxy node 120 may be a distributed system). That is, the specific type of the first proxy node 120 may be selected according to actual requirements, and the embodiment of the present application is not limited thereto.
The second proxy node 130 may also be a server, a server cluster composed of at least two servers, or a cloud computing center. The server cluster may be centralized or distributed (e.g., the second proxy node 130 may be a distributed system). That is, the specific type of the first proxy node 120 may be selected according to actual requirements, and the embodiment of the present application is not limited thereto.
The data center 140 may be one server, may also be a server cluster composed of at least two servers, and may also be a cloud computing center. The server cluster may be centralized or distributed (for example, the data center 140 may be a distributed system). That is, the specific type of the data center 140 may also be selected according to actual needs, and the embodiment of the present application is not limited thereto.
In the embodiment of the present application, when the user sends transmission data to the data center 140 through the user equipment 110, the user equipment 110 may establish a TCP connection with the first proxy node 120 through a three-way handshake. After the user equipment 110 and the first proxy node 120 establish the TCP connection, the user equipment 110 may send the transmission data to the first proxy node 120. That is, the user equipment 110 sends the transmission data to the first proxy node 120 through the TCP short connection.
Furthermore, the three-way handshake process between the user equipment 110 and the first proxy node 120 is: the user equipment 110 transmits a SYN (synchronization Sequence number) packet to the first proxy node 120; the first proxy node 120 must Acknowledge SYN of the user equipment 110 when receiving the SYN packet, and simultaneously sends an SYN packet, that is, an acknowledgement character (SYN + ACK); the user equipment 110 receives the SYN + ACK packet of the first proxy node 120, and sends an ACK packet to the first proxy node 120, and the ACK packet is sent out, and the user equipment 110 and the first proxy node 120 enter a TCP connection state, and the three-way handshake is completed. Correspondingly, the procedure of the three-way handshake between other devices in the embodiment of the present application is similar to the procedure of the three-way handshake described above, and will not be described one by one subsequently, and specific reference may be made to the relevant description here.
After the first proxy node 120 receives the transmission data sent by the user equipment 110, the first proxy node 120 may determine, through the first identifier in the transmission data, that the target data center receiving the transmission data is the data center 140. Subsequently, after the first proxy node 120 determines the data center 140, the first proxy node 120 may determine a second proxy node corresponding to the data center 140 as the second proxy node 130. The first proxy node 120 may send the transmission data directly to the second proxy node 130 over a TCP long connection with the second proxy node 130, where no handshake is required between the first proxy node 120 and the second proxy node 130.
Since there may be a plurality of data centers connected to the second proxy node 130, after the second proxy node 130 receives the transmission data, the second proxy node 130 may also determine, as the data center 140, a target data center for receiving the transmission data according to the first identifier in the transmission data. The second proxy node 130 may establish a TCP connection with the data center 140 through a three-way handshake. After the second proxy node 130 establishes a TCP connection with the data center 140, the second proxy node 130 sends the transmission data directly to the data center 140. That is, the second proxy node 130 sends the transmission data to the data center 140 through the TCP short connection.
It should be noted that the method and apparatus for transmitting data provided in the embodiment of the present invention may be further extended to other suitable data transmission systems, and are not limited to the data transmission system 100 shown in fig. 1. Although only 1 user device, 1 first proxy node 120, 1 second proxy node 130 and 1 data center 140 are shown in fig. 1, it should be understood by those skilled in the art that the data transmission system 100 may include more or less user devices, first proxy nodes, second proxy nodes and data centers in the process of practical application.
That is, the numbers of the user equipment 110, the first proxy node 120, the second proxy node 130 and the data center 140 in the data transmission system 100 may be set according to actual needs, and the embodiment of the present application is not limited thereto.
It should be noted that the number of the first proxy nodes, the number of the second proxy nodes, and the number of the data centers may be plural. Therefore, for the convenience of understanding the embodiment of the present application, only a first proxy node corresponding to a user equipment, a target data center receiving transmission data sent by a user equipment, and a second proxy node associated with a target center are shown in fig. 2. That is, the embodiment of the present application is described by taking an example in which a user equipment in an area transmits transmission data to a target data center.
Referring to fig. 2, fig. 2 is a flowchart of a method for transmitting data according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes:
step S210, the ue sends transmission data to the first proxy node, where the transmission data includes the first identifier.
It should be understood that the first proxy node may also be referred to as an edge node, and the embodiments of the present application are not limited thereto.
Specifically, in the process of sending data to the first proxy node by the user equipment, the first proxy node serving the area where the current user equipment is located needs to be determined first. After determining the first proxy node, the user equipment may establish a TCP connection with the first proxy node through a handshake process. After the first proxy node establishes a TCP connection with the user equipment, the user equipment sends transmission data to the first proxy node.
That is, the user equipment and the first proxy node perform data transmission through the TCP short connection established between the user equipment and the first proxy node.
It should be understood that, in this embodiment of the present application, the user equipment may also send the transmission data to the first proxy node in other manners, and this embodiment of the present application is not limited to the user equipment sending the transmission data to the first proxy node through a TCP connection (which may also be referred to as a TCP short connection). For example, the user equipment may send the transmission data to the first proxy node over a wireless network (e.g., a 5G network, a WLAN network, etc.). The following description is only given by taking an example that the user equipment sends transmission data to the first proxy node through a TCP connection, but the embodiment of the present application is not limited thereto.
Similarly, data transmission between the target proxy node and the target data center may also be performed in various manners, for example, data transmission may be performed through a TCP connection, a wireless network, and the like, and the data transmission between the target proxy node and the target data center through the TCP connection is only described as an example, but the embodiment of the present application is not limited thereto.
It should be understood that the manner of determining the first proxy node serving the area where the user equipment is located may be set according to actual requirements, and the embodiment of the present application is not limited thereto.
Optionally, when the moving range of the user equipment is in a certain area, the user equipment may store in advance an address of the first proxy node corresponding to the area, so that when the user equipment needs to send data to the target data center, the user equipment may determine the first proxy node by using the address of the first proxy node stored locally.
Alternatively, the user equipment may determine the address of the first proxy node through a DNS (Domain Name System) service.
For example, the DNS service may calculate the area where the user equipment is located by using the IP address of the user equipment, and since the area where the user equipment is located has one corresponding first proxy node, the first proxy node serving the area where the user equipment is located can be determined.
Step S220, the first proxy node receives transmission data sent by the user equipment.
In step S230, the first proxy node determines a target proxy node according to the first identifier in the transmission data, where the target proxy node is a second proxy node associated with the target data center.
It should be understood that the second proxy node may also be referred to as a routing node, and the embodiments of the present application are not limited thereto.
Specifically, since there may be a plurality of data centers, the first proxy node determines a target data center for receiving the transmission data sent by the user equipment according to the first identifier in the transmission data. Since each data center has a corresponding second agent node, the first agent node can indirectly determine the target agent node by querying the second agent node associated with the target data center.
It should be understood that the determination manner of the target agent node may be set according to actual requirements, as long as it is ensured that the target agent node corresponding to the target data center can be finally determined, and the embodiment of the present application is not limited to this.
Optionally, the first proxy node may store a mapping file in which at least mapping relationships among the first identifiers, addresses of a plurality of data centers corresponding to the first identifiers, and addresses of a plurality of second proxy nodes corresponding to the addresses of the plurality of data centers are recorded.
In the case where the transmission data is sent via multiple data packets, the first proxy node may query the mapping file via the first identifier in the first data packet to determine the target proxy node. Subsequently, after the first proxy node receives the other data packets, the first proxy node may directly send the other data packets to the determined target proxy node. That is, the first proxy node only needs to determine the target proxy node through the first data packet, and for other subsequently received data packets, the first proxy node does not need to perform the process of determining the target proxy node one by one.
It should be understood that, although the embodiment of the present application is described in a manner that the first proxy node stores the mapping file, it should be understood by a person skilled in the art that the mapping file may also be stored in another server, and the first proxy node may determine the target proxy node by means of information interaction with the other server, and the embodiment of the present application is not limited to this.
Optionally, the first identifier in the transmission data sent by the user equipment may record an address of the target data center and/or an address of the target proxy center. The first agent node can directly determine the target data center and/or the target agent center by reading the first identifier.
In step S240, the first proxy node sends transmission data to the target proxy node through one or more TCP long connections of the at least one TCP long connection with the target proxy node.
It should be understood that the number of TCP long connections established between the first proxy node and each of the at least one second proxy node may be set according to actual requirements, and the embodiments of the present application are not limited thereto.
For example, after the first proxy node boots up, the first proxy node may establish 20 TCP long connections with each of the at least one second proxy node.
It should also be understood that one or more TCP long connections may send the same transmission data or send different transmission data, which is not limited in this embodiment of the present application.
For example, in the case that the transmission data includes N packets, the first proxy node may send N packets of the same transmission data to the second proxy node together through N long TCP connections, that is, one long TCP connection sends one packet, where N is a positive integer greater than or equal to 2.
Specifically, after the first proxy node determines the target proxy node, the first proxy node may determine, by using the second identifier, a state of each TCP long connection in the at least one TCP long connection between the first proxy node and the target proxy node, so that the first proxy node may determine the number of TCP long connections in an idle state in the at least one TCP long connection between the first proxy node and the target proxy node.
The first proxy node may determine how to send the transmission data by comparing the number of TCP long connections required by the first proxy node with the number of TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node.
If the number of the TCP long connections required by the first proxy node is less than or equal to the number of the idle TCP long connections in at least one TCP long connection between the first proxy node and the target proxy node, the first proxy node can select the required number of TCP long connections from the idle TCP long connections in at least one TCP long connection between the first proxy node and the target proxy node to transmit data.
For example, at a certain time point, the first proxy node needs to send transmission data of 5 users to the target proxy node, and the number of TCP long connections needed by the first proxy node is 5. And the number of the TCP long connections in the idle state in the at least one TCP long connection between the first proxy node and the target proxy node is 6, and then the first proxy node can select 5 TCP long connections from the 6 TCP long connections in the idle state to transmit data.
In addition, if the number of the TCP long connections required by the first proxy node is greater than the number of the TCP long connections in the idle state in at least one TCP long connection between the first proxy node and the target proxy node, the first proxy node may create a new TCP long connection between the first proxy node and the target proxy node, thereby satisfying the requirement of the user for data transmission.
For example, at a certain point in time, the first proxy node needs 8 long TCP connections. And the number of the TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node is 6, so that the first proxy node needs to innovate 2 new TCP long connections between the first proxy node and the second proxy node, thereby meeting the requirement of a user for data transmission.
It should be understood that when creating a new long TCP connection, the first proxy node and the target proxy node also need to be implemented through a handshake process. Therefore, the embodiment of the application can enable the first proxy node and the target proxy node to always keep the long connection of the TCP which is not less than the preset number (for example, 20 or the like), so that the general requirements of users can be met.
In addition, although the first proxy node in the embodiment of the present application may create a new TCP long connection, after a certain number of TCP long connections are created, a system crash may be caused by excessive use of resources. Therefore, the embodiment of the application can realize the protection of the system by setting the maximum number of the TCP long connections between the first proxy node and each second proxy node.
It should be understood that the maximum number here may be set according to actual requirements, and the embodiments of the present application are not limited thereto.
For example, a maximum of 2000 TCP long connections are established between the first proxy node and the target proxy node, and when the established TCP long connections between the first proxy node and the target proxy node reach 2000 TCP long connections, the first proxy node cannot create new TCP long connections any more. The first proxy node may place the request for the currently transmitted data in a queue to wait for the long TCP connection to be released. When the TCP long connection is in the idle state, the first proxy node can transmit data through the TCP long connection in the idle state.
It should be understood that, although described above with the first proxy node creating a new long TCP connection, those skilled in the art will appreciate that the process of creating a new long TCP connection by the first proxy node can also be regarded as the process of creating a new long TCP connection by the second proxy node, since the process of creating is implemented by both parties.
In addition, when the idle time of a first TCP long connection in at least one TCP long connection between the first proxy node and the second proxy node exceeds the preset time, the first proxy node disconnects the first TCP long connection.
It should be understood that the preset time may be set according to actual requirements, and the embodiment of the present application is not limited thereto.
For example, the second proxy node may determine the idle time of each TCP long connection by the time each TCP long connection identified in the second identification is continuously idle, and the second proxy node may disconnect TCP long connections having idle times exceeding 3 minutes.
It should be understood that, although the above description is made in terms of the first proxy node disconnecting the long TCP connection, those skilled in the art should understand that, since the disconnection process is implemented by disconnecting both parties, the process of disconnecting the long TCP connection by the first proxy node can also be regarded as the process of disconnecting the long TCP connection by the second proxy node.
In step S250, the target proxy node receives transmission data sent by the first proxy node, where the transmission data is transmitted through one or more TCP long connections of at least one TCP long connection between the target proxy node and the first proxy node.
And step S260, the target agent node determines a target data center according to the first identifier.
Specifically, since there may be multiple data centers connected to the target proxy node, the target proxy node may determine, according to the first identifier in the transmission data, the target data center that receives the transmission data sent by the user equipment.
It should be understood that the determining manner of the target data center may be set according to actual requirements, as long as it is ensured that the target data center that receives the transmission data sent by the user equipment can be determined finally, and the embodiment of the present application is not limited thereto.
Optionally, the second proxy node may store therein a mapping file in which at least the first identifier and addresses of a plurality of data centers corresponding to the plurality of first identifiers are recorded.
In the case where the transmission data is sent via multiple data packets, the second proxy node may query the mapping file via the first identifier in the first data packet to determine the destination data. Subsequently, after the second proxy node receives other data packets of the same transmission data, the second proxy node may directly send the other data packets to the target data center. That is, the second proxy node only needs to determine the target data center through the first data packet, and for other subsequently received data packets, the second proxy node does not need to perform the process of determining the target data centers one by one.
It should be understood that the mapping file stored in the first proxy node and the mapping file stored in each second proxy node may be the same or different, and the embodiment of the present application is not limited thereto.
For example, the mapping file stored in the first proxy node and the mapping file stored in each second proxy node are not the same, and the mapping file stored in the first proxy node and the mapping file stored in the second proxy node are different in that: the mapping file stored in the first proxy node records the mapping relation between the data center and the second proxy node.
It should also be understood that, although the embodiment of the present application is described in a manner that the second proxy node stores the mapping file, it should be understood by those skilled in the art that the mapping file may also be stored in another server, and the second proxy node may determine the target data center by way of information interaction with the other server, and the embodiment of the present application is not limited thereto.
Optionally, the first identifier in the transmission data sent by the user equipment may record an address of the target data center. The second proxy node can directly determine the target data center by reading the first identifier.
Step S270, the target agent node sends transmission data to the target data center.
Specifically, after the target proxy node determines the target data center, the target proxy node may establish a TCP connection with the first proxy node through a handshake process. After the second proxy node establishes a TCP connection with the target data center, the second proxy node may send the transmission data to the target data center.
That is, the target agent node and the target data center implement data transmission through the TCP short connection established between the target agent node and the target data center.
Step S280, the target data center receives transmission data sent by the target proxy node.
Specifically, since the number of the servers included in the target data center may be multiple, after the target data center receives the transmission data sent by the target proxy node, the target data center may send the transmission data to the corresponding server.
It should be understood that, although the embodiment of the present application shows the process of data transmission through step S210 to step S280, step S200 (not shown) may be further included before step S210.
Step S200 is a process of deploying the data transmission system. Wherein the process of deploying the data transmission system comprises: deploying a node close to a user according to the area, and recording as a first proxy node; a node deployed close to the data center is marked as a second proxy node; after the first proxy node is started, the first proxy node may establish a preset number (e.g., 20) of TCP long connections with each routing node.
It should also be understood that, although the embodiment of the present application is described above by taking the example of the user terminal sending the transmission data to the data center as an example, a person skilled in the art should understand that the data transmission system of the embodiment of the present application is also applicable to a user equipment sending the transmission data to another user equipment.
For example, a data transmission system includes: the system comprises a user device A, a user device B, a first proxy node A, a first proxy node B and a second proxy node, wherein the first proxy node A is a node close to the user device A, the first proxy node B is a node close to the user device B, and the second proxy node is respectively provided with at least one TCP long connection with the first proxy node A and the first proxy node B. The user equipment A sends the transmission data of the user equipment A to the second proxy node through the first proxy node A, and the second proxy node sends the transmission data of the user equipment A to the first proxy node B. Subsequently, the first proxy node B may send the transmission data of the user equipment a to the user equipment B, and since the TCP long connection established among the first proxy node a, the first proxy node B, and the second proxy node can shorten the data transmission time, the user experience is improved, which is not limited in this embodiment of the present application.
Therefore, according to the embodiment of the application, a first proxy node and a second proxy node are deployed between user equipment and a data center, wherein at least one Transmission Control Protocol (TCP) long connection is established between the first proxy node and the second proxy node. Therefore, in the process of sending data by the user equipment, the existing link between the first proxy node and the second proxy node is multiplexed to carry out data transmission, so that the steps of handshaking between the first proxy node and the second proxy node are reduced, and the time used in the whole process of data transmission can be shortened.
It should be understood that the above-described method of transmitting data is only exemplary, and those skilled in the art can make various modifications according to the above-described method.
Referring to fig. 3, fig. 3 shows a schematic structural diagram of an apparatus 300 for transmitting data according to an embodiment of the present application, it should be understood that the apparatus 300 corresponds to the first proxy node side in the embodiment of the method in fig. 2, and is capable of performing various steps related to the first proxy node side in the embodiment of the method, and specific functions of the apparatus 300 may be referred to the description above, and detailed descriptions are appropriately omitted here to avoid repetition. The device 300 includes at least one software functional module that can be stored in a memory in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the device 300. Specifically, the apparatus 300 is applied to a first proxy node in a data transmission system, where the data transmission system includes a user equipment, the first proxy node, at least one second proxy node, and at least one data center, where at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the apparatus 300 includes:
a first receiving module 310, configured to receive transmission data sent by a user equipment, where the transmission data includes a first identifier, and the first identifier is used to identify a target data center that receives the transmission data;
a first determining module 320, configured to determine a target agent node according to the first identifier, where the target agent node is a second agent node associated with the target data center;
the first sending module 330 is configured to send the transmission data to the target proxy node through one or more TCP long connections of the at least one TCP long connection with the target proxy node, so that the target proxy node sends the transmission data to the target data center.
In one possible embodiment, the obtaining module (not shown) is configured to obtain a second identifier, where the second identifier is configured to identify a status of each TCP long connection in at least one TCP long connection between the first proxy node and the target proxy node, and the status includes an idle status or a busy status; a selecting module (not shown) for selecting one or more TCP long connections in an idle state from the at least one TCP long connection between the first proxy node and the target proxy node according to the second identifier; the first sending module 330 is further configured to send transmission data to the target proxy node through one or more TCP long connections in an idle state.
In one possible embodiment, when the number of required TCP long connections for the first proxy node is greater than the number of TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node, a first creating module (not shown) is configured to create a new TCP long connection between the first proxy node and the target proxy node.
In one possible embodiment, the first disconnection module (not shown) is configured to disconnect the first TCP long connection by the first proxy node when an idle time of the first TCP long connection in the at least one TCP long connection between the first proxy node and the target proxy node exceeds a preset time.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method, and redundant description is not repeated here.
Referring to fig. 4, fig. 4 shows a schematic structural diagram of an apparatus 400 for transmitting data according to an embodiment of the present application, and it should be understood that the apparatus 400 corresponds to the second proxy node side in the method embodiment of fig. 2, and is capable of executing various steps related to the second proxy node side in the method embodiment, and specific functions of the apparatus 400 may refer to the description above, and detailed descriptions are appropriately omitted here to avoid repetition. The device 400 includes at least one software functional module that can be stored in a memory in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the device 400. Specifically, the apparatus 400 is applied to a target data center in a data transmission system, where the data transmission system includes a user equipment, a first proxy node, at least one second proxy node, and at least one data center, where at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the apparatus 400 includes:
a second receiving module 410, configured to receive transmission data sent by the first proxy node, where the transmission data is transmitted through one or more TCP long connections in at least one TCP long connection between the target proxy node and the first proxy node, the transmission data includes a first identifier, the first identifier is used to identify a target data center that receives the transmission data, and the target proxy node is a second proxy node associated with the target data center;
a second determining module 420, configured to determine a target data center according to the first identifier;
and a second sending module 430, configured to send the transmission data to the target data center.
In one possible embodiment, one or more of the at least one TCP long connections between the target proxy node and the first proxy node are idle TCP long connections; the first proxy node obtains one or more TCP long connections in an idle state in at least one TCP long connection between the target proxy node and the first proxy node through a second identifier, the second identifier is used for identifying the state of each TCP long connection in the at least one TCP long connection between the first proxy node and the target proxy node, and the state comprises an idle state or a busy state.
In one possible embodiment, when the number of TCP long connections required by the first proxy node is greater than the number of TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node, a second creating module (not shown) is used for creating a new TCP long connection between the target proxy node and the first proxy node.
In one possible embodiment, the second disconnection module (not shown) is configured to disconnect the first TCP long connection by the second proxy node when an idle time of the first TCP long connection of the at least one TCP long connection between the target proxy node and the first proxy node exceeds a preset time.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method, and will not be described in too much detail herein.
The present application further provides an apparatus, which may be disposed in a first proxy node or in a second proxy node.
Fig. 5 is a block diagram of an apparatus 500 in the embodiment of the present application, as shown in fig. 5. Apparatus 500 may include a processor 510, a communication interface 520, a memory 530, and at least one communication bus 540. Wherein the communication bus 540 is used for realizing direct connection communication of these components. The communication interface 520 of the device in the embodiment of the present application is used for performing signaling or data communication with other node devices. Processor 510 may be an integrated circuit chip having signal processing capabilities. The Processor 510 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 510 may be any conventional processor or the like.
The Memory 530 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 530 stores computer readable instructions, which when executed by the processor 510, the apparatus 500 can perform the steps of the corresponding apparatus side in the embodiment of the method of fig. 2. For example, in the case where the apparatus 500 is provided in a first proxy node, the memory 530 stores therein computer-readable instructions, and when the computer-readable instructions are executed by the processor 510, the apparatus 500 may perform the steps of the first proxy node side in the embodiment of fig. 2 described above.
The apparatus 500 may further include a memory controller, an input-output unit, an audio unit, a display unit.
The memory 530, the memory controller, the processor 510, the peripheral interface, the input/output unit, the audio unit, and the display unit are electrically connected to each other directly or indirectly, so as to implement data transmission or interaction. For example, these elements may be electrically coupled to each other via one or more communication buses 540. The processor 510 is used to execute executable modules stored in the memory 530, such as software functional modules or computer programs included in the apparatus 500.
The input and output unit is used for providing input data for a user to realize the interaction of the user and the server (or the local terminal). The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
The audio unit provides an audio interface to the user, which may include one or more microphones, one or more speakers, and audio circuitry.
The display unit provides an interactive interface (e.g. a user interface) between the electronic device and a user or for displaying image data to a user reference. In this embodiment, the display unit may be a liquid crystal display or a touch display. In the case of a touch display, the display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. The support of single-point and multi-point touch operations means that the touch display can sense touch operations simultaneously generated from one or more positions on the touch display, and the sensed touch operations are sent to the processor for calculation and processing.
The input and output unit is used for providing input data for a user to realize the interaction between the user and the processing terminal. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 5 is merely illustrative and that the apparatus 500 may include more or fewer components than shown in fig. 5 or may have a different configuration than shown in fig. 5. The components shown in fig. 5 may be implemented in hardware, software, or a combination thereof.
The present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any of the alternative implementations on the first proxy node side of fig. 2.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any of the alternative implementations on the second proxy node side of fig. 2.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the system described above may refer to the corresponding process in the foregoing method, and redundant description is not repeated here.
It should be noted that, in this specification, each embodiment is described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same as and similar to each other in each embodiment may be referred to. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (6)

1. A method for transmitting data, the method being applied to a data transmission system, the data transmission system including a user equipment, a first proxy node, at least one second proxy node, and at least one data center, wherein at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the method comprising:
the first proxy node receives transmission data sent by the user equipment through a first TCP short connection, wherein the transmission data comprises a first identifier, the first identifier is used for identifying a target data center for receiving the transmission data, and the user equipment determines the address of the first proxy node through a Domain Name System (DNS);
the first agent node determines a target agent node according to the first identifier, wherein the target agent node is a second agent node associated with the target data center;
the first proxy node sends the transmission data to the target proxy node through a plurality of TCP long connections in at least one TCP long connection with the target proxy node, so that the target proxy node sends the transmission data to the target data center through a second TCP short connection;
the first proxy node sending the transmission data to the target proxy node through a plurality of TCP long connections in at least one TCP long connection with the target proxy node, including:
the first proxy node acquires a second identifier, wherein the second identifier is used for identifying the state of each TCP long connection in at least one TCP long connection between the first proxy node and the target proxy node, and the state comprises an idle state or a busy state;
the first proxy node selects a plurality of TCP long connections in an idle state from at least one TCP long connection between the first proxy node and the target proxy node according to the second identification;
the first proxy node sends the transmission data to the target proxy node through the plurality of TCP long connections in the idle state;
when the number of required TCP long connections of the first proxy node is larger than the number of idle TCP long connections in at least one TCP long connection between the first proxy node and the target proxy node, the method further comprises:
the first proxy node creates a new TCP long connection between the first proxy node and the target proxy node, wherein the number of the TCP long connections between the first proxy node and the target proxy node meets a set maximum number;
if the number of the TCP long connections established between the first proxy node and the target proxy node reaches the maximum number, the current request for transmitting the data is placed in a queue, and when the TCP long connection in the idle state exists, the first proxy node transmits the transmission data to the target proxy node through the TCP long connection in the idle state.
2. The method of claim 1, further comprising:
when the idle time of a first TCP long connection in at least one TCP long connection between the first proxy node and the target proxy node exceeds the preset time, the first TCP long connection is disconnected by the first proxy node.
3. A method for transmitting data, the method being applied to a data transmission system, the data transmission system including a user equipment, a first proxy node, at least one second proxy node, and at least one data center, wherein at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the method comprising:
a target proxy node receives transmission data sent by the first proxy node, wherein the transmission data is transmitted through a plurality of TCP long connections in at least one TCP long connection between the target proxy node and the first proxy node, the transmission data is sent to the first proxy node by the user equipment through a first TCP short connection, the transmission data comprises a first identifier, the first identifier is used for identifying a target data center for receiving the transmission data, the target proxy node is a second proxy node associated with the target data center, and the user equipment determines the address of the first proxy node through a Domain Name System (DNS);
the target agent node determines the target data center according to the first identification;
the target proxy node sends the transmission data to the target data center through a second TCP short connection;
a plurality of TCP long connections in at least one TCP long connection between the target proxy node and the first proxy node are idle TCP long connections in at least one TCP long connection between the target proxy node and the first proxy node;
the method comprises the steps that a plurality of TCP long connections in an idle state in at least one TCP long connection between a target agent node and a first agent node are obtained by the first agent node through a second identifier, the second identifier is used for identifying the state of each TCP long connection in the at least one TCP long connection between the first agent node and the target agent node, and the state comprises an idle state or a busy state;
when the number of required TCP long connections of the first proxy node is larger than the number of idle TCP long connections in at least one TCP long connection between the first proxy node and the target proxy node, the method further comprises:
the target proxy node creating a new TCP long connection between the target proxy node and the first proxy node, wherein the number of TCP long connections between the first proxy node and the target proxy node meets a set maximum number;
if the number of the TCP long connections established between the first proxy node and the target proxy node reaches the maximum number, the current request for transmitting the data is placed in a queue, and when the TCP long connection in the idle state exists, the first proxy node transmits the transmission data to the target proxy node through the TCP long connection in the idle state.
4. An apparatus for transmitting data, the apparatus being applied to a first proxy node in a data transmission system, the data transmission system including a user equipment, the first proxy node, at least one second proxy node, and at least one data center, wherein at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one of the at least one second proxy node, and each second proxy node is connected to one or more data centers, the apparatus comprising:
a first receiving module, configured to receive, through a first TCP short connection, transmission data sent by the user equipment, where the transmission data includes a first identifier, where the first identifier is used to identify a target data center that receives the transmission data, and the user equipment determines, through a domain name system DNS, an address of the first proxy node;
a first determining module, configured to determine a target agent node according to the first identifier, where the target agent node is a second agent node associated with the target data center;
a first sending module, configured to send the transmission data to the target proxy node through multiple TCP long connections in at least one TCP long connection with the target proxy node, so that the target proxy node sends the transmission data to the target data center through a second TCP short connection;
the first sending module is specifically configured to:
the first proxy node acquires a second identifier, wherein the second identifier is used for identifying the state of each TCP long connection in at least one TCP long connection between the first proxy node and the target proxy node, and the state comprises an idle state or a busy state;
the first proxy node selects a plurality of TCP long connections in an idle state from at least one TCP long connection between the first proxy node and the target proxy node according to the second identification;
the first proxy node sends the transmission data to the target proxy node through the plurality of TCP long connections in the idle state;
when the number of TCP long connections required by the first proxy node is greater than the number of TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node, the first sending module is specifically configured to:
the first proxy node creates a new TCP long connection between the first proxy node and the target proxy node, wherein the number of the TCP long connections between the first proxy node and the target proxy node meets a set maximum number;
if the number of the TCP long connections established between the first proxy node and the target proxy node reaches the maximum number, the current request for transmitting the data is placed in a queue, and when the TCP long connection in the idle state exists, the first proxy node transmits the transmission data to the target proxy node through the TCP long connection in the idle state.
5. An apparatus for transmitting data, wherein the apparatus is applied to a target data center in a data transmission system, the data transmission system includes a user equipment, a first proxy node, at least one second proxy node, and at least one data center, wherein at least one TCP long connection is established between the first proxy node and each of the at least one second proxy node, each data center is connected to one second proxy node, and each second proxy node is connected to one or more data centers, the apparatus comprising:
a second receiving module, configured to receive transmission data sent by the first proxy node, where the transmission data is transmitted through multiple TCP long connections in at least one TCP long connection between the target proxy node and the first proxy node, and the transmission data is sent to the first proxy node by the user equipment through a first TCP short connection, where the transmission data includes a first identifier, the first identifier is used to identify a target data center that receives the transmission data, the target proxy node is a second proxy node associated with the target data center, and the user equipment determines an address of the first proxy node through a domain name system DNS;
the second determining module is used for determining the target data center according to the first identifier;
the second sending module is used for sending the transmission data to the target data center through a second TCP short connection;
wherein a plurality of TCP long connections in the at least one TCP long connection between the target proxy node and the first proxy node are idle TCP long connections in the at least one TCP long connection between the target proxy node and the first proxy node;
the method comprises the steps that a plurality of TCP long connections in an idle state in at least one TCP long connection between a target agent node and a first agent node are obtained by the first agent node through a second identifier, the second identifier is used for identifying the state of each TCP long connection in the at least one TCP long connection between the first agent node and the target agent node, and the state comprises an idle state or a busy state;
when the number of TCP long connections required by the first proxy node is greater than the number of TCP long connections in an idle state in at least one TCP long connection between the first proxy node and the target proxy node, the second sending module is specifically configured to:
the target proxy node creating a new TCP long connection between the target proxy node and the first proxy node, wherein the number of TCP long connections between the first proxy node and the target proxy node meets a set maximum number;
if the number of the TCP long connections established between the first proxy node and the target proxy node reaches the maximum number, the current request for transmitting the data is placed in a queue, and when the TCP long connection in the idle state exists, the first proxy node transmits the transmission data to the target proxy node through the TCP long connection in the idle state.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of transmitting data according to any one of claims 1 to 4.
CN201910825497.3A 2019-08-30 2019-08-30 Method and device for transmitting data and computer readable storage medium Active CN110535959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910825497.3A CN110535959B (en) 2019-08-30 2019-08-30 Method and device for transmitting data and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910825497.3A CN110535959B (en) 2019-08-30 2019-08-30 Method and device for transmitting data and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110535959A CN110535959A (en) 2019-12-03
CN110535959B true CN110535959B (en) 2023-02-24

Family

ID=68666173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910825497.3A Active CN110535959B (en) 2019-08-30 2019-08-30 Method and device for transmitting data and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110535959B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040007B (en) * 2021-11-02 2024-04-16 北京华云安信息技术有限公司 Method and device for data transmission between multiple nodes
CN114356426A (en) * 2022-01-05 2022-04-15 中国建设银行股份有限公司 Agent technology-based system initialization method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270472A (en) * 2014-10-24 2015-01-07 杭州高达软件系统股份有限公司 Remote service invocation method, device and system
CN104754003A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 Data transmission method and system
CN105471760A (en) * 2014-09-12 2016-04-06 华为技术有限公司 Routing method, load balancing device and data communication system
CN107332880A (en) * 2017-06-05 2017-11-07 深圳市酷开网络科技有限公司 Method, device and computer-readable recording medium that information is pushed
CN108667903A (en) * 2018-04-03 2018-10-16 新华三技术有限公司 Data transmission method for uplink, device and storage medium
CN109474687A (en) * 2018-11-23 2019-03-15 杭州数梦工场科技有限公司 A kind of methods, devices and systems of different private internetwork communications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104754003A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 Data transmission method and system
CN105471760A (en) * 2014-09-12 2016-04-06 华为技术有限公司 Routing method, load balancing device and data communication system
CN104270472A (en) * 2014-10-24 2015-01-07 杭州高达软件系统股份有限公司 Remote service invocation method, device and system
CN107332880A (en) * 2017-06-05 2017-11-07 深圳市酷开网络科技有限公司 Method, device and computer-readable recording medium that information is pushed
CN108667903A (en) * 2018-04-03 2018-10-16 新华三技术有限公司 Data transmission method for uplink, device and storage medium
CN109474687A (en) * 2018-11-23 2019-03-15 杭州数梦工场科技有限公司 A kind of methods, devices and systems of different private internetwork communications

Also Published As

Publication number Publication date
CN110535959A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN108075934B (en) Network quality monitoring method, device and system
EP3577952B1 (en) Method and system for selection of an access and mobility management function in an access network environment
EP2898420B1 (en) A data-sharing method, terminal, server, and system
EP3836515B1 (en) Communication method and communication device for reducing complexity in processing of service instances.
US9392081B2 (en) Method and device for sending requests
US20180109456A1 (en) System, method, and device for network load balance processing
CN103457973A (en) Image uploading method and system, image uploading client terminal and network server
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
WO2020253531A1 (en) Communication method and apparatus, entity and storage medium
KR20150013860A (en) Clientless cloud computing
WO2013104172A1 (en) Method for realizing load balancing, dns server, and client
CN108632307B (en) Session connection establishing method and SMF entity
TW201132083A (en) Group owner selection with crossing requests
CN109561054B (en) Data transmission method, controller and access device
EP3214816A1 (en) Method, gateway and system for synchronizing virtual machine location information between data center gateways
CN110535959B (en) Method and device for transmitting data and computer readable storage medium
EP4117314A1 (en) Connection establishment method and communication device and system
JP2020506629A (en) Routing method and apparatus
WO2020119699A1 (en) Resource publishing method and apparatus in internet of things, device, and storage medium
WO2019015040A1 (en) Signal strength based frequency point selection method and internet of things terminal
US11122131B1 (en) Edge cloud resource location using enhanced DNS service
WO2022067830A1 (en) Application context migration method and device
CN106559303B (en) Method, access concentrator and medium for layer 2 tunneling protocol
US20140089430A1 (en) Data-sharing method, terminal, server, and system
US9609684B2 (en) Apparatus and method for transmitting/receiving data in mobile content network

Legal Events

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