IP Library Granted Patent US 11,271,892
Granted Patent B2
US 11,271,892 · App. 16/932,585 · Granted Mar 8, 2022

Network communication method and system, device, and storage medium

Inventors: Zhihao Shang (Shenzhen, CN); Jia Li (Shenzhen, CN); Huanxin Liu (Shenzhen, CN); Hongfei Zhou (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
H04L61/103H04L9/0637H04L12/4641H04L12/66H04L69/22H04L2209/38
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,271,892
App. No.
16/932,585
Granted
Mar 8, 2022
Kind
B2
Abstract

This application discloses a network communication method applied to a network communication system including a first network device in a first private network, a second network device in a second private network and a gateway device coupling the first private network to the second private network. The first network device receives a first data packet transmitted from a terminal to a target blockchain node, and acquires an actual network address of the target blockchain node; and generates a second data packet according to the first data packet and the actual network address, and transmits the second data packet to a virtual network address of the second network device in the second private network, so that the operation overheads generated when the gateway device generates virtual network addresses for blockchain nodes can be reduced, thereby saving a storage space of the gateway device.

Claims (76)

1. A network communication method, applied to a network communication system including a first network device in a first private network, a second network device in a second private network and a gateway device coupling the first private network to the second private network, the method comprising:

receiving, by the first network device, a first data packet transmitted from a terminal in the first private network to a target blockchain node in the second private network;

acquiring, by the first network device, an actual network address of the target blockchain node, the actual network address being an intranet address of the target blockchain node in the second private network, further including:

acquiring, by the first network device, a mapping port number carried in the first data packet; and

searching, by the first network device, a first mapping relationship between a respective mapping port number and a respective actual network address of a blockchain node, to obtain an actual network address corresponding to the mapping port number as the actual network address of the target blockchain node;

generating, by the first network device, a second data packet according to the first data packet and the actual network address, the second data packet carrying the first data packet and the actual network address; and

transmitting, by the first network device, the second data packet to a virtual network address of the second network device in the second private network, the virtual network address being used for the gateway device to forward a received data packet including the second data packet to the second network device.

2. The method according to claim 1 , wherein the generating, by the first network device, a second data packet according to the first data packet and the actual network address comprises:

generating, by the first network device, a redirection packet header carrying the actual network address; and

adding, by the first network device, the redirection packet header to the first data packet, to obtain the second data packet.

3. The method according to claim 1 , wherein the receiving, by the first network device, the first data packet transmitted to the target blockchain node in the second private network comprises:

receiving, by the first network device, the first data packet in a process of listening to the mapping port corresponding to the target blockchain node by the first network device.

4. The method according to claim 3 , further comprising:

before receiving, by the first network device, a first data packet transmitted to a target blockchain node in a second private network:

receiving, by the first network device, a mapping port number corresponding to the blockchain node in a blockchain system;

using, by the first network device, a port corresponding to the mapping port number in the first network device as the mapping port corresponding to the blockchain node; and

starting, by the first network device, to listen to the port corresponding to the mapping port number.

5. The method according to claim 1 , further comprising:

receiving, by the second network device, the second data packet from the gateway device;

acquiring, by the second network device, the actual network address from the second data packet; and

transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node.

6. The method according to claim 5 , wherein the acquiring, by the second network device, the actual network address from the second data packet comprises:

parsing, by the second network device, a redirection packet header in the second data packet, to obtain the actual network address carried in the redirection packet header.

7. The method according to claim 5 , wherein the transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node comprises:

transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node in a case that the terminal in the first private network has the right to access the target blockchain node.

8. The method according to claim 7 , further comprising:

before transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node:

acquiring, by the second network device, a user identifier carried in the second data packet;

searching, by the second network device, a second mapping relationship between a user identifier and a blockchain node, to obtain at least one blockchain node corresponding to the user identifier; and

determining, by the second network device, that the terminal in the first private network has the right to access the target blockchain node in a case that the target blockchain node belongs to the at least one blockchain node.

9. A network communication system, comprising a first network device in a first private network, a second network device in a second private network, and a gateway device coupling the first private network to the second private network, wherein the first network device, the second network device, and the gateway device are configured to perform a plurality of operations including:

receiving, by the first network device, a first data packet transmitted from a terminal in the first private network to a target blockchain node in the second private network;

acquiring, by the first network device, an actual network address of the target blockchain node, the actual network address being an intranet address of the target blockchain node in the second private network, further including:

acquiring, by the first network device, a mapping port number carried in the first data packet; and

searching, by the first network device, a first mapping relationship between a respective mapping port number and a respective actual network address of a blockchain node, to obtain an actual network address corresponding to the mapping port number as the actual network address of the target blockchain node;

generating, by the first network device, a second data packet according to the first data packet and the actual network address, the second data packet carrying the first data packet and the actual network address; and

transmitting, by the first network device, the second data packet to a virtual network address of the second network device in the second private network, the virtual network address being used for the gateway device to forward a received data packet including the second data packet to the second network device.

10. The network communication system according to claim 9 , wherein the generating, by the first network device, a second data packet according to the first data packet and the actual network address comprises:

generating, by the first network device, a redirection packet header carrying the actual network address; and

adding, by the first network device, the redirection packet header to the first data packet, to obtain the second data packet.

11. The network communication system according to claim 9 , wherein the receiving, by the first network device, the first data packet transmitted to the target blockchain node in the second private network comprises:

receiving, by the first network device, the first data packet in a process of listening to the mapping port corresponding to the target blockchain node by the first network device.

12. The network communication system according to claim 11 , wherein the plurality of operations further comprise:

before receiving, by the first network device, a first data packet transmitted to a target blockchain node in a second private network:

receiving, by the first network device, a mapping port number corresponding to the blockchain node in a blockchain system;

using, by the first network device, a port corresponding to the mapping port number in the first network device as the mapping port corresponding to the blockchain node; and

starting, by the first network device, to listen to the port corresponding to the mapping port number.

13. The network communication system according to claim 9 , wherein the plurality of operations further comprise:

receiving, by the second network device, the second data packet from the gateway device;

acquiring, by the second network device, the actual network address from the second data packet; and

transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node.

14. The network communication system according to claim 13 , wherein the acquiring, by the second network device, the actual network address from the second data packet comprises:

parsing, by the second network device, a redirection packet header in the second data packet, to obtain the actual network address carried in the redirection packet header.

15. The network communication system according to claim 13 , wherein the transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node comprises:

transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node in a case that the terminal in the first private network has the right to access the target blockchain node.

16. The network communication system according to claim 15 , wherein the plurality of operations further comprise:

before transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node:

acquiring, by the second network device, a user identifier carried in the second data packet;

searching, by the second network device, a second mapping relationship between a user identifier and a blockchain node, to obtain at least one blockchain node corresponding to the user identifier; and

determining, by the second network device, that the terminal in the first private network has the right to access the target blockchain node in a case that the target blockchain node belongs to the at least one blockchain node.

17. A non-transitory computer-readable storage medium, storing at least one instruction, the instruction being loaded and executed by a network communication system comprising a first network device in a first private network, a second network device in a second private network, and a gateway device coupling the first private network to the second private network, wherein the first network device, the second network device, and the gateway device are configured to perform a plurality of operations including:

receiving, by the first network device, a first data packet transmitted from a terminal in the first private network to a target blockchain node in the second private network;

acquiring, by the first network device, an actual network address of the target blockchain node, the actual network address being an intranet address of the target blockchain node in the second private network, further including:

acquiring, by the first network device, a mapping port number carried in the first data packet; and

searching, by the first network device, a first mapping relationship between a respective mapping port number and a respective actual network address of a blockchain node, to obtain an actual network address corresponding to the mapping port number as the actual network address of the target blockchain node;

generating, by the first network device, a second data packet according to the first data packet and the actual network address, the second data packet carrying the first data packet and the actual network address; and

transmitting, by the first network device, the second data packet to a virtual network address of the second network device in the second private network, the virtual network address being used for the gateway device to forward a received data packet including the second data packet to the second network device.

18. The non-transitory computer-readable storage medium according to claim 17 , wherein the plurality of operations further comprise:

receiving, by the second network device, the second data packet from the gateway device;

acquiring, by the second network device, the actual network address from the second data packet; and

transmitting, by the second network device, the second data packet to the actual network address of the target blockchain node.

19. The non-transitory computer-readable storage medium according to claim 17 , wherein the generating, by the first network device, a second data packet according to the first data packet and the actual network address comprises:

generating, by the first network device, a redirection packet header carrying the actual network address; and

adding, by the first network device, the redirection packet header to the first data packet, to obtain the second data packet.

20. The non-transitory computer-readable storage medium according to claim 17 , wherein the receiving, by the first network device, the first data packet transmitted to the target blockchain node in the second private network comprises:

receiving, by the first network device, the first data packet in a process of listening to the mapping port corresponding to the target blockchain node by the first network device.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2020
From: SHANG, ZHIHAO; LI, JIA; LIU, HUANXIN; ZHOU, HONGFEI
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 054016/0712 →
Priority Claims (1)
CN 201810362776.6 · Apr 20, 2018 · national
Continuity (2)
Continuation PCTCN2019078547 · Mar 18, 2019
Related Publication 20200351235A1 · Nov 5, 2020