Single UDP (User Datagram Protocol) channel data transmission system capable of bearing multiple service ports

By adopting a single UDP channel data transmission system that can carry multiple service ports in a symmetric network environment, TCP direct connection access between the client and the server is realized, which solves the problem of difficulty in realizing TCP direct connection access in a symmetric network environment, and improves data transmission efficiency and bandwidth utilization.

CN120017732APending Publication Date: 2025-05-16SUZHOU GOLD MANTIS EXHIBITION DESIGN ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510153464.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In a symmetric network environment, it is difficult to achieve TCP direct access between clients and servers, resulting in low data transmission efficiency and bandwidth utilization, and symmetric NAT devices cannot penetrate.

Method used

A single UDP channel data transmission system that can carry multiple service ports is adopted. UDP data packets with status words are sent to the server through the client. After the server parses, the TCP connection between the local network and the server is established, and the local network TCP channel is bound to the client TCP connection channel.

Benefits of technology

It realizes TCP direct connection access capability between the client and the server, improves data transmission efficiency and bandwidth utilization, and solves the problem of symmetric NAT devices being unable to penetrate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017732A_ABST
    Figure CN120017732A_ABST
Patent Text Reader

Abstract

The invention discloses a single UDP (User Datagram Protocol) channel data transmission system capable of bearing a plurality of service ports, which comprises a client for sending an udp (User Datagram Protocol) data packet comprising a status word to a server; the server is used for analyzing the udp data packet; wherein the client uses a status word to mark connection information, generates an udp data packet and transmits the udp data packet to the server through an udp channel, and the status word is used for distinguishing three states of connection establishment, data transmission and connection disconnection in a tcp access process; and after the udp data packet is decoded by the server side, the remote client side id and the tcp channel of the local network to be accessed are obtained, tcp connection between the local network and the server is established, and the local network tcp channel and the client side tcp connection channel are bound. Compared with the prior art, the problem that tcp direct connection access between the client and the server is difficult to realize in a symmetric network environment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of port mapping services, and in particular to a single UDP channel data transmission system capable of carrying multiple service ports. Background Art

[0002] In the existing network environment, it is often necessary to transfer massive amounts of data between different networks, including remote file sharing, web service access, etc. Due to the shortage of public network address resources, data can only be transferred between different LANs through server transit. However, the bandwidth of the transit server is very limited, which seriously affects the bandwidth utilization of data transmission.

[0003] Currently, UDP hole punching technology realizes point-to-point communication of UDP ports, but UDP hole punching is very difficult in a symmetric network environment and cannot well implement port mapping services. Summary of the invention

[0004] The purpose of the present invention is to provide a single UDP channel data transmission system that can carry multiple service ports, so as to solve the problem that it is difficult to realize TCP direct connection access between a client and a server in a symmetric network environment.

[0005] In order to achieve the above object, the present invention adopts the following technical solution: a single UDP channel data transmission system capable of carrying multiple service ports, comprising:

[0006] The client is used to send a UDP data packet including a status word to the server;

[0007] Server, which is used to parse UDP data packets;

[0008] The client uses the status word to mark the connection information, generates a UDP data packet and transmits it to the server through the UDP channel. The status word is used to distinguish the three states of connection establishment, data transmission, and connection disconnection during the TCP access process.

[0009] After decoding the UDP data packet, the server obtains the remote client ID and the TCP channel of the local network to be accessed, establishes a TCP connection between the local network and the server, and binds the local network TCP channel to the client TCP connection channel.

[0010] As a further description of the above technical solution:

[0011] The status word is the leading byte of the UDP data packet.

[0012] As a further description of the above technical solution:

[0013] The UDP data packet also includes the web service sequence number, remote client ID, TCP channel number and TCP transmission status word.

[0014] As a further description of the above technical solution:

[0015] The information transmission and reception between the client and the server is realized by encapsulating and sending the kcp protocol.

[0016] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0017] 1. In the present invention, based on the carrying function of multiple TCP / Web services on a single UDP port, the intranet host service is opened to the outside world through the CS mode. Only one hole needs to be punched between the client and the server, which greatly improves the data transmission efficiency and bandwidth utilization, and solves the problem that the symmetric NAT device cannot be penetrated.

[0018] 2. In the present invention, encapsulation of multiple TCP / web service ports is implemented, remote clients connected to server ports are encoded, the carrying function of multiple web services under a single UDP channel is realized, and TCP direct connection access capability between client and server is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 The figure is a data transmission diagram of a single UDP channel data transmission system that can carry multiple service ports. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0022] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] Example 1

[0024] See also Figure 1 The present invention provides a technical solution: a single UDP channel data transmission system capable of carrying multiple service ports, comprising:

[0025] The client is used to send a UDP data packet including a status word to the server;

[0026] Server, which is used to parse UDP data packets;

[0027] The client uses the status word to mark the connection information, generates a UDP data packet and transmits it to the server through the UDP channel. The status word is used to distinguish the three states of connection establishment, data transmission, and connection disconnection during the TCP access process.

[0028] After decoding the UDP data packet, the server obtains the remote client ID and the TCP channel of the local network to be accessed, establishes a TCP connection between the local network and the server, and binds the local network TCP channel to the client TCP connection channel.

[0029] A complete TCP access process includes three steps: connection establishment, data transmission, and connection disconnection. The client marks these three states with different status words. After the client sends the complete UDP data packet with some leading bytes to the server, the server establishes a TCP connection between the local network and the server, and binds the local network TCP channel with the client TCP connection channel to realize the data transmission function of the TCP channel between the two places. Based on the bearing function of multiple TCP / web services for a single UDP port, the intranet host service is opened to the outside world through the CS mode. Only one hole needs to be punched between the client and the server, which greatly improves the data transmission efficiency and bandwidth utilization, and solves the problem of symmetric NAT devices being unable to penetrate.

[0030] For example, the server opens port 5900 for vnc remote desktop and port 445 for file sharing service;

[0031] The client listens to local ports 5901 and 4450, which are used to forward access to the server's vnc desktop and file sharing services, respectively.

[0032] The working principle is as follows: When the client 5901 receives a local link request, it encapsulates the necessary local information, including the client number, TCP channel number (5901), and status word (establishing a connection request 00), and finally sends it to the server. The server decodes and analyzes the connection request type:

[0033] 1) Request to establish a connection

[0034] Establish a TCP connection between the local TCP and the service port (5900), and send the connection status back to the client, and the client will then proceed to the next step of data transmission;

[0035] 2) Request data transfer

[0036] Find the local TCP connection bound to the TCP channel number and send the data to the 5900 server;

[0037] 3) Request to disconnect

[0038] Find the local TCP connection bound to the TCP channel number, disconnect the TCP connection, and send the status back to the client.

[0039] By encapsulating multiple TCP / web service ports, the remote client connected to the server port is encoded to realize the carrying function of multiple web services under a single UDP channel, and the TCP direct access capability between the client and the server is realized. The UDP hole punching technology realized by this technology can map multiple local TCP / web services to the client network, realize point-to-point service calls, maximize the use of the network bandwidth of both parties, overcome the problems of NAT gateway port restrictions, save the cost of setting up the public network, and have good economic benefits.

[0040] Example 2

[0041] Based on the above embodiment, this embodiment further provides the following improved technical solution: the status word is the leading byte of the UDP data packet. The UDP data packet also includes the web service sequence number, the remote client ID, the TCP channel number and the TCP transmission status word.

[0042] A leading byte is added to a complete UDP data packet to distinguish different web service serial numbers, remote client numbers, TCP channel numbers, TCP transmission status words and other information, so that the server can parse it and realize TCP direct access between the client and the server.

[0043] Example 3

[0044] This embodiment further makes the following improved technical solution on the basis of the above embodiment: the information transmission and reception between the client and the server is implemented by encapsulating and sending the kcp protocol, so that the udp transmission is fast and reliable.

[0045] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A single UDP channel data transmission system capable of carrying multiple service ports, characterized in that: include: The client is used to send a UDP data packet including a status word to the server; Server, which is used to parse UDP data packets; The client uses the status word to mark the connection information, generates a UDP data packet and transmits it to the server through the UDP channel. The status word is used to distinguish the three states of connection establishment, data transmission, and connection disconnection during the TCP access process. After decoding the UDP data packet, the server obtains the remote client ID and the TCP channel of the local network to be accessed, establishes a TCP connection between the local network and the server, and binds the local network TCP channel to the client TCP connection channel.

2. A single UDP channel data transmission system capable of carrying multiple service ports according to claim 1, characterized in that: The status word is the leading byte of the UDP data packet.

3. A single UDP channel data transmission system capable of carrying multiple service ports according to claim 2, characterized in that: The UDP data packet also includes a web service sequence number, a remote client ID, a TCP channel number and a TCP transmission status word.

4. A single UDP channel data transmission system capable of carrying multiple service ports according to claim 1, characterized in that: The information transmission and reception between the client and the server is realized by encapsulating and sending the kcp protocol.