WO2019201043A1 - 网络通信方法、系统、设备及存储介质 - Google Patents

网络通信方法、系统、设备及存储介质 Download PDF

Info

Publication number
WO2019201043A1
WO2019201043A1 PCT/CN2019/078547 CN2019078547W WO2019201043A1 WO 2019201043 A1 WO2019201043 A1 WO 2019201043A1 CN 2019078547 W CN2019078547 W CN 2019078547W WO 2019201043 A1 WO2019201043 A1 WO 2019201043A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
network
blockchain node
network device
network address
Prior art date
Application number
PCT/CN2019/078547
Other languages
English (en)
French (fr)
Inventor
尚志豪
李佳
刘焕新
周洪飞
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2019201043A1 publication Critical patent/WO2019201043A1/zh
Priority to US16/932,585 priority Critical patent/US11271892B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • 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
    • H04L67/563Data redirection of data network streams
    • 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/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/663Transport layer addresses, e.g. aspects of transmission control protocol [TCP] or user datagram protocol [UDP] ports

Definitions

  • the present application relates to the field of network technologies, and in particular, to a network communication method, system, device, and storage medium.
  • VPC Virtual Private Cloud
  • users can deploy terminals in the VPC, and the service party can deploy the area in the VPC.
  • Each VPC is a relatively isolated network environment.
  • a VPC gateway is deployed between the VPCs, and devices in different VPCs can communicate with each other through the VPC gateway.
  • the blockchain node in the blockchain system is located in VPC2 as an example.
  • the VPC gateway generates a corresponding virtual network address for each blockchain node in VPC2 in advance, and stores each blockchain node.
  • the mapping between the virtual network address and the actual network address When the terminal wants to send a data packet to the blockchain node, the terminal sends a data packet to the virtual network address of the blockchain node, and the VPC gateway receives the data packet, and queries the blockchain according to the virtual network address of the blockchain node.
  • the mapping relationship between the virtual network address of the node and the actual network address obtains the actual network address of the blockchain node, and the data packet is sent to the actual network address of the blockchain node, and the blockchain node receives the data packet.
  • the embodiment of the present invention provides a network communication method, system, device, and storage medium, which can solve the technical problem that the VPC gateway consumes too much resources in the related art.
  • the technical solution is as follows:
  • a network communication method is provided, which is applied to a first network device in a first private network, where the method includes:
  • the first network device generates a second data packet according to the first data packet and the actual network address, where the second data packet carries the first data packet and the actual network address;
  • a network communication method for use in a second network device in a second private network, the method comprising:
  • the second network device Receiving, by the second network device, a second data packet of the gateway device, where the second data packet carries the first data packet sent to the target blockchain node in the second private network and the actual location of the target blockchain node a network address, where the actual network address is an intranet address of the target blockchain node in the second private network;
  • the second network device sends the second data packet to an actual network address of the target blockchain node.
  • 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;
  • the first network device is configured to receive a first data packet sent to a target blockchain node in a second private network; acquire an actual network address of the target blockchain node, where the target blockchain node The actual network address is an intranet address of the target blockchain node in the second private network; generating a second data packet according to the first data packet and the actual network address, where the second data packet carries Transmitting the first data packet and the actual network address; sending the second data packet to a virtual network address of the second network device;
  • the gateway device is configured to query, according to the virtual network address of the second network device, a third mapping relationship between the virtual network address and the actual network address, to obtain an actual network address corresponding to the virtual network address, as the The actual network address of the second network device; the second data packet is sent to the actual network address of the second network device;
  • the second network device is configured to receive a second data packet of the gateway device, obtain an actual network address of a target blockchain node from the second data packet, and send the target to the target according to the actual network address.
  • the second network packet is sent by the actual network address of the blockchain node.
  • a network communication device for use in a first network device in a first private network, the device comprising:
  • a receiving module configured to receive a first data packet sent to a target blockchain node in the second private network
  • An obtaining module configured to acquire an actual network address of the target blockchain node, where the actual network address is an intranet address of the target blockchain node in the second private network;
  • a generating module configured to generate a second data packet according to the first data packet and the actual network address, where the second data packet carries the first data packet and the actual network address;
  • a sending module configured to send, to the virtual network address of the second network device in the second private network, the second data packet, where the virtual network address is used by the gateway device to forward the received data packet to the Second network device.
  • a network communication device for use in a second network device in a second private network, the device comprising:
  • a receiving module configured to receive a second data packet of the gateway device, where the second data packet carries a first data packet of the terminal in the first private network and an actual network address of the target blockchain node in the second private network, where The actual network address is an intranet address of the target blockchain node in the second private network;
  • An obtaining module configured to obtain the actual network address from the second data packet
  • a sending module configured to send the first data packet to the target blockchain node according to the actual network address.
  • a network device comprising a processor, a memory and a transceiver, the memory storing at least one instruction loaded by the processor and executed to implement the following network communication Method: the transceiver is configured to receive a first data packet sent to a target blockchain node in a second private network; the processor is configured to acquire an actual network address of the target blockchain node, the actual network address An internal network address of the target blockchain node in the second private network; the processor is configured to generate a second data packet according to the first data packet and the actual network address, the second The data packet carries the first data packet and the actual network address; the transceiver is configured to send the second data packet to a virtual network address of a second network device in the second private network, the virtual The network address is used by the gateway device to forward the received data packet to the second network device.
  • a network device comprising a processor, a memory and a transceiver, the memory storing at least one instruction loaded by the processor and executed to implement the following network communication Method: the transceiver is configured to receive a second data packet of a gateway device, where the second data packet carries a first data packet sent to a target blockchain node in a second private network, and the target blockchain node An actual network address, where the actual network address is an intranet address of the target blockchain node in the second private network; the processor is configured to obtain the actual network address from the second data packet; The transceiver is configured to send the second data packet to an actual network address of the target blockchain node.
  • a computer readable storage medium having stored therein at least one instruction loaded by a processor and executing a network communication method of receiving a target area in a second private network a first data packet sent by the blockchain node; obtaining an actual network address of the target blockchain node, where the actual network address is an intranet address of the target blockchain node in the second private network; Generating, by the first data packet and the actual network address, a second data packet, the second data packet carrying the first data packet and the actual network address; and a second to the second private network And a virtual network address of the network device, where the second data packet is sent, where the virtual network address is used by the gateway device to forward the received data packet to the second network device.
  • a computer readable storage medium having stored therein at least one instruction loaded by a processor and executing a network communication method of receiving a second data packet of a gateway device,
  • the second data packet carries a first data packet sent to a target blockchain node in the second private network and an actual network address of the target blockchain node, where the actual network address is the target blockchain node An intranet address in the second private network; obtaining the actual network address from the second data packet; and transmitting the second data packet to an actual network address of the target blockchain node.
  • the beneficial effects of the technical solutions provided in the embodiments of the present application include at least the methods, systems, devices, and storage media provided by the embodiments of the present application.
  • the first network device adds the data packets sent to the target blockchain node.
  • the actual network address of the target block chain node sends a data packet to the virtual address of the second network device, and the data packet can be forwarded to the target block chain node through the gateway device and the second network device, and the first private network is satisfied.
  • the gateway device does not need to generate a virtual network address for each blockchain node, which greatly saves the processing resources of the gateway device and reduces the processing resources.
  • the operating overhead of the gateway device saves the storage space of the gateway device, thus ensuring the normal operation of the gateway device.
  • FIG. 1 is a schematic diagram of an implementation environment of a network communication method according to an embodiment of the present application.
  • FIG. 2 is a flowchart of a network communication method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of functions of a network device according to an embodiment of the present application.
  • FIG. 4 is a flowchart of a network communication method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a network configuration according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a network communication apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a network communication apparatus according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a network device according to an embodiment of the present application.
  • the data packet generated by the terminal in the communication process in the embodiment of the present application is referred to as a first data packet
  • the data packet generated on the basis of the first data packet combined with the actual network address of the second network device is referred to as a second data.
  • Packet, the VPC where the terminal is located is called the first private network
  • the VPC where the blockchain node is located is called the second private network
  • the mapping relationship between the mapping port of the blockchain node and the actual network address of the blockchain node The mapping relationship between the user identifier and the blockchain node
  • the mapping relationship between the virtual network address of the second network device and the actual network address is called the third mapping relationship.
  • the example is described.
  • VPC VPC
  • blockchain
  • VPC is a network environment that can be customized on demand. In a VPC, users can freely divide network segments and formulate routing policies.
  • a VPC can be a private network on the cloud.
  • the implementation of intranet communication by different devices of the same VPC may be: for any VPC, the VPC may have at least one intranet segment, in the VPC. Each device can have an intranet Internet Protocol Address (IP) in the intranet segment, and any two devices in the VPC can communicate with each other through the intranet IP, for example, Device A can communicate with the intranet IP2 of device B through the intranet IP1 of device A.
  • IP Internet Protocol Address
  • a network device may be deployed in a VPC, where the network device may be a router or a switch, and the switch may forward data packets between different devices in the same subnet in the same VPC according to a data link layer protocol;
  • the router can forward packets between devices in different subnets in the same VPC based on the network layer protocol.
  • VPC is an isolated network environment. Specifically, there is no direct communication between different VPCs, between VPCs and Ethernet (English: Internet), and between private networks other than VPCs and VPCs. Specifically, in a possible embodiment, for any device in any VPC, the data packet of the device is forwarded by the gateway device to be sent to other VPCs, Ethernets, or VPCs other than the VPC. Other private networks; similarly, for private networks other than the VPC, Ethernet, or VPC other than the VPC, packets of any of these networks are forwarded by the gateway device to be sent to the VPC.
  • the device can realize the function of tenant isolation and ensure the security of user data.
  • Blockchain It is a decentralized distributed database. It is a new application model based on peer-to-peer network (Peer to Peer, English abbreviation: P2P) network transmission, consensus mechanism, encryption algorithm and other technologies.
  • P2P peer-to-peer network
  • the blockchain stores and verifies data through a chained data structure, and the encryption algorithm ensures the security of data transmission and query, and operates the data through smart contracts.
  • the smart contract refers to the contract procedure automatically executed according to specific conditions, and is an important way to realize business logic by using the blockchain.
  • FIG. 1 is a schematic diagram of an implementation environment of a network communication method according to an embodiment of the present application, where the implementation environment includes: multiple terminals 101, a first network device 102, a gateway device 103, a second network device 104, and multiple regions.
  • Block chain node 105 Block chain node 105.
  • the plurality of terminals 101 and the first network device 102 are located inside the first private network. Each terminal 101 can communicate with a device located outside of the first private network through the first network device 102.
  • the terminal 101 when the terminal 101 is to send a data packet to a device outside the first private network, the terminal 101 may send a data packet to the first network device 102, and the first network device 102 may receive the data. A packet that forwards the packet to a device outside the first private network.
  • the device outside the first private network when a device outside the first private network wants to send a data packet to the terminal 101, the device outside the first private network may send a data packet to the first network device 102, and the first network device 102 may receive the data packet, and The data packet is forwarded to the terminal 101.
  • the plurality of blockchain nodes 105 and the second network device 104 are in a second private network, and each of the blockchain nodes 105 can communicate with devices located outside the second private network through the second network device 104.
  • the blockchain node 105 when the blockchain node 105 is to send a data packet to a device external to the second private network, the blockchain node 105 can send a data packet to the second network device 104, and second Network device 104 can receive the data packet and forward the data packet to a device external to the second private network.
  • the device external to the second private network when a device external to the second private network is to send a data packet to the block chain node 105, the device external to the second private network may send a data packet to the second network device 104, and the second network device 104 may receive the data. The packet forwards the packet to the blockchain node 105.
  • the first network device 102 and the second network device 104 can communicate with each other through the gateway device 103, thereby implementing information interaction between the first private network and the second private network.
  • the first network device 102, the second network device 104, and the gateway device 103 may each be a router, a switch, a gateway device, a firewall device, a server, etc.
  • the terminal 101 may be a personal computer, a mobile phone, a load balancer, etc.
  • the blockchain node may be A server, personal computer, laptop, or other computing-capable electronic device.
  • each device in the foregoing implementation environment may be a physical physical device or a logical virtual device, for example, a virtual machine or a container, for example, a virtual component of the cloud platform. There is no limit to this.
  • the terminal has a need to transmit data packets to the target blockchain node in VPC2 across its own VPC1.
  • the user generates a transaction through the operation terminal, and the terminal generates the account book data according to the amount of the transaction, the account, etc., and wishes to transmit the book data to the block chain node, so that the target block chain node records in the blockchain. Book data.
  • the terminal generates a data packet, which carries the accounting data in the packet body of the data packet, and sends the data packet to the blockchain node, so that the blockchain node obtains the accounting data from the data packet.
  • VPC1 and VPC2 are isolated from each other, the terminal of VPC1 cannot directly transmit the data packet to the target blockchain node of VPC2 through the intranet IP of the terminal in VPC1, and a gateway device needs to be disposed between VPC1 and VPC2.
  • the gateway device is used to open a communication channel between VPC1 and VPC2, and transmits data packets from VPC1 to VPC2.
  • the gateway device for each user, the gateway device generates a virtual network address corresponding to each blockchain node for each blockchain node associated with the user, for example, assigning a virtual IP address to each blockchain node and The virtual port number, and the virtual network addresses corresponding to different blockchain nodes are different, so that different blockchain nodes can be distinguished by different virtual network addresses. Therefore, whenever a user is added to the blockchain system, the VPC gateway generates a large number of virtual network addresses for a large number of blockchain nodes, and each time the user newly associates one or more blockchain nodes, the VPC gateway also A corresponding virtual network address is generated for each blockchain node of the new association.
  • the VPC gateway has limited processing resources and storage space. It is not convenient to contain too complicated business logic.
  • the VPC gateway generates and stores a large number of virtual network addresses, which will be normal for the VPC gateway. Running a huge challenge. Since the total number of virtual network addresses that a VPC gateway can generate is limited, and the number of virtual network addresses affects the number of blockchain nodes that the communication system can accommodate, this method can accommodate blocks that the communication system can accommodate. The number of chain nodes forms a limit.
  • the network communication method and system provided by the embodiments of the present application may be configured to deploy a first network device in the VPC1, and a second network device in the VPC2, where the gateway device generates a virtual network address for the second network device, and stores the virtual network address and
  • the mapping relationship between the actual network addresses can realize the forwarding function of the data packet without generating a virtual network address for each blockchain node, and it is not necessary to separately store the virtual network address and the actual network address for each blockchain node.
  • the terminal in the VPC1 sends a data packet to each blockchain node in the VPC2
  • the data packet may be sent to the first network device, where the first network device may add the corresponding blockchain node in the data packet.
  • the actual network address, the data packet to which the actual network address is added is sent to the virtual network address of the second network device, and the gateway device can receive the data packet according to the virtual network address of the second network device, and query the virtual network address and the actual network address.
  • mapping relationship between the two network devices is obtained, and the data packets sent to the respective blockchain nodes are forwarded to the second network device according to the actual network address of the second network device, where the second network device can Receiving data packets of each blockchain node in the second private network, each data packet can be sent to the corresponding blockchain node according to the actual network address in each data packet.
  • multipoint communication between a plurality of terminals and a plurality of blockchain nodes is converted into point-to-point communication between the first network device and the second network device.
  • the processing resources of the gateway device are greatly saved, the operation cost of the gateway device is reduced, and the storage of the gateway device is saved. Space to ensure that the gateway device is working properly.
  • the total number of users that the blockchain system can serve is increased, so that the blockchain system can simultaneously support a large number of users in the cloud, and each user can block in the cloud.
  • the chain platform develops its own blockchain-based applications.
  • the execution body of the method includes a terminal, a first network device, a second network device, a gateway device, and a target blockchain node.
  • Methods include:
  • the terminal in the first private network sends the first data packet to the first network device.
  • the terminal in the first private network When the terminal in the first private network wants to transmit data to the target blockchain node in the second private network, the terminal may generate the first data packet, and send the first data packet to the first network device, so that the first data packet is sent. Transfer to the target blockchain node by the first network device.
  • the source device of the first data packet is a terminal, and the destination device of the first data packet is a target blockchain node in the second private network.
  • the source Internet Protocol address (English full name: English protocol: IP address) and the source port number of the first data packet may be the IP address and port number of the terminal, and the destination IP address and destination of the first data packet.
  • the port number can be the IP address and port number of the target blockchain node.
  • the terminal may generate a first data packet, where the first data packet includes transaction data,
  • the transaction data may include at least one of an identification of the parties to the transaction of the transaction event, a transaction amount, and a transaction time.
  • the terminal may send the first data packet to the first network device, so that after the target blockchain node receives the second data packet generated according to the first data packet, the transaction data may be obtained from the second data packet and recorded by the blockchain.
  • the transaction data for example, the target blockchain node may generate a block according to the transaction data, and add the block to the blockchain when at least one blockchain node in the second private network passes the consensus of the block. .
  • the process of transmitting the first data packet can be implemented by means of port mapping.
  • at least one block chain node in the blockchain system may be mapped into at least one mapping port in the first network device, and each block chain node and each mapping port are in one-to-one correspondence, and different through The mapping port can distinguish different blockchain nodes, and the terminal can generate a first data packet according to the mapping port corresponding to the target blockchain node and the network address of the first network device, and send the first data packet to the first network device.
  • the destination port of the first data packet may be a mapping port corresponding to the target blockchain node, so that the first data packet passes through its destination port, and can identify that it is heavy Directed to the target blockchain node.
  • the destination address of the first data packet may be the network address of the first network device, so that the first data packet can be transmitted to the first network device through its destination address.
  • the first data packet can indicate the destination port and the destination address through the packet header, for example, the packet header can carry the destination port number and the destination IP address, the destination port number is indicated by the destination port number, and the destination IP address is indicated by the destination IP address.
  • the destination port number in the packet header of the first data packet may be the mapping port number of the mapping port corresponding to the target blockchain node, and the destination IP address may be the network address of the first network device.
  • the source IP address in the packet header of the first data packet may be the IP address of the terminal, and the source port number may be the port number of the terminal.
  • the source IP address and the source port number may indicate that the first data packet is from the terminal.
  • the terminal can distinguish the packets to be sent to different blockchain nodes by using different mapping port numbers by carrying the mapping port number of the blockchain node to which the data packet is to be sent in each data packet.
  • the data packet so that each data packet is sent to the corresponding blockchain node, finally meets the requirement of separately transmitting data packets to each blockchain node.
  • the first network device receives the first data packet of the terminal.
  • the first network device has a function of forwarding a data packet, and can receive the first data packet sent by the terminal, and forward the first data packet to the target blockchain node.
  • the first network device may pre-open the mapping port corresponding to the target blockchain node, and listen to the mapping port corresponding to the target blockchain node, and listen to the target block. In the process of mapping the port corresponding to the link node, the first data packet is received.
  • the first network device may determine the destination port of the data packet, and determine whether the destination port of the data packet is If the destination port of the data packet is the mapping port corresponding to the target block chain node, if it is determined that the first data packet to be sent to the target block chain node is received, the subsequent execution is performed.
  • the processing logic of the second data packet is generated according to the first data packet, and if the destination port of the data packet is not the mapping port corresponding to the blockchain node, other processing logic may be executed, for example, forwarding the data packet to other devices.
  • the first network device may parse the packet header of the data packet, obtain the destination port number carried in the packet header of the data packet, and determine the port corresponding to the destination port number.
  • the destination port for the packet For the process of determining whether the destination port of the data packet is a mapping port corresponding to the blockchain node, the first network device may store mapping port information, where the mapping port information includes mapping of mapping ports corresponding to each blockchain node currently listening.
  • the port number the first network device can determine whether the destination port number of the data packet belongs to the mapping port information. When the destination port number belongs to the mapping port information, determine that the destination port of the data packet is the mapping port corresponding to the blockchain node.
  • the first network device can monitor each mapping port corresponding to each blockchain node in the blockchain system, and different blockchain nodes can correspond to different mapping ports, so that the first network device can The mapping port corresponding to the first data packet identifies and distinguishes the blockchain node to which each first data packet is to be sent.
  • the manner of listening to each mapping port corresponding to each blockchain node may be the same as the manner of mapping ports corresponding to the above-mentioned listening target blockchain node.
  • the blockchain system includes N zones.
  • the block chain node can open N mapping ports and listen to the N mapping ports.
  • Each mapping port of the N mapping ports corresponds to one of the N blockchain nodes, and N is a positive integer.
  • the first network device acquires an actual network address of the target blockchain node.
  • the actual network address of the blockchain node is the intranet address of the blockchain node in the second private network, and the corresponding blockchain node can be uniquely determined in the second private network, so by carrying the blockchain in the data packet
  • the actual network address of the node forwards the data packet to the second network device, and the second network device can forward the received data packet to the corresponding blockchain node in the second private network according to the actual network address of the blockchain node .
  • the actual network address of the blockchain node may include an IP address and a port number of the blockchain node, and the IP address may be an intranet IP of the blockchain node in the second private network, and the port number may identify the blockchain.
  • the port in the node that handles the service may be carried.
  • the first network device may obtain the actual network address of the target blockchain node, and add the actual network address in the first data packet, such that the second The network device may determine, according to the actual network address in the data packet, that the destination device of the first data packet is the destination blockchain node, thereby forwarding the first data packet to the target blockchain node.
  • Obtaining the actual network address of the target blockchain node can be implemented by using the following steps 1 to 2:
  • Step 1 The first network device acquires a mapping port number carried by the first data packet.
  • the first network device may determine which mapping port the first data packet is listening to, and the mapping port is obtained. As the mapping port corresponding to the first data packet. If the first network device does not receive the data packet by using the monitoring mapping port, the first network device may determine the destination port of the first data packet, and use the destination port of the first data packet as the mapping port corresponding to the first data packet. For example, the first network device may parse the packet header of the first data packet, obtain the destination port number carried in the packet header, and determine the port corresponding to the destination port number as the mapping port of the first data packet.
  • Step 2 The first network device queries the first mapping relationship between the mapping port number of the blockchain node and the actual network address, and obtains the actual network address corresponding to the mapping port number, and targets the actual network address corresponding to the mapping port number.
  • the actual network address of the blockchain node is the first network device queries the first mapping relationship between the mapping port number of the blockchain node and the actual network address, and obtains the actual network address corresponding to the mapping port number, and targets the actual network address corresponding to the mapping port number.
  • the actual network address of the blockchain node The actual network address of the blockchain node.
  • the first mapping relationship may be referred to as a port mapping relationship, and the first mapping relationship may include a mapping port number corresponding to at least one blockchain node and an actual network address of at least one blockchain node.
  • the first mapping relationship may be stored in the operation support of the blockchain (English name: The Office of Strategic Services, English abbreviation: OSS), and the second network device may be The correspondence between the user identifier and the set of blockchain nodes is obtained in the OSS system.
  • the first network device may actively pull the first mapping relationship from the OSS system of the blockchain.
  • the first network device may send a mapping relationship request to the OSS system, and after receiving the mapping relationship request, the OSS system may generate a mapping relationship response. Sending a mapping relationship response to the first network device, where the first network device obtains the first mapping relationship from the mapping relationship response.
  • the mapping relationship response includes a first mapping relationship.
  • the blockchain OSS system can push the first mapping relationship to the first network device.
  • the OSS system can push the first mapping relationship to the first network device.
  • the second network device may also store the first mapping relationship in advance.
  • the first network device may be configured to receive the configured first mapping relationship by the first network device.
  • the first network device generates a second data packet according to the first data packet and the actual network address.
  • the second data packet carries the first data packet and the actual network address of the target blockchain node, so the second data packet not only includes the content of the first data packet itself, but also indicates the actual network address of the target blockchain node, first
  • the network device can generate the second data packet including the first data packet, and on the other hand, enable the blockchain node to receive the first data packet sent by the terminal, and on the other hand, enable the first data packet to be finally routed to the second private packet.
  • the target blockchain node in the network can generate the second data packet including the first data packet, and on the other hand, enable the blockchain node to receive the first data packet sent by the terminal, and on the other hand, enable the first data packet to be finally routed to the second private packet.
  • the first network device may add the actual network address of the target blockchain node to the first data packet, and use the first data packet after adding the actual network address as the second data packet.
  • the process of generating the second data packet may include the following steps 1 through 2:
  • Step 1 The first network device generates a redirect header that carries the actual network address.
  • the redirect header is used to redirect the second packet from the second network device to the target block chain node, and the redirect header carries the actual network address of the target block chain node.
  • the destination address in the redirect header may be the actual IP address of the target block chain node
  • the destination port number in the redirect header may be the port number of the port in the blockchain node that processes the service.
  • the content of the redirected packet header other than the destination address and the destination port number may be the same as the header of the first data packet.
  • the source IP address of the redirected packet header may be the IP address of the terminal, and the source port number may be the terminal. The port number, thereby indicating that the second packet actually came from the terminal.
  • the content of the redirected packet header other than the destination address and the destination port number may also be determined according to the information of the first network device.
  • the source IP address of the redirected packet header may be the IP address of the first network device, and the source port number may be It is the port number of the first network device, thereby indicating that the second data packet has been forwarded by the first network device.
  • Step 2 The first network device adds a redirect packet header to the first data packet to obtain a second data packet.
  • the second network device has a function of processing the data packet, and is capable of adding a redirect header to the first data packet.
  • the second network device may encapsulate the redirect packet header before the packet header of the first data packet, and combine the first data packet and the redirect packet header as the second data packet, so that the second data packet may include two Baotou, one is the header of the terminal Mr., and the other is the redirect header generated by the first network device.
  • the second network device may replace the header of the first data packet with the redirect packet header, that is, remove the header of the first data packet from the first data packet, re-encapsulate the redirect packet header, and replace the header of the packet header.
  • a data packet is used as the second data packet.
  • the packet header in the second data packet is the redirected packet header generated by the first network device.
  • the first network device can redirect the second data packet to the target blockchain node at the second network device by adding the redirect packet header, thereby forwarding to the target blockchain node, and satisfying the transmission.
  • the need for a packet can be used to redirect the second data packet to the target blockchain node at the second network device by adding the redirect packet header, thereby forwarding to the target blockchain node, and satisfying the transmission.
  • the first network device sends a second data packet to a virtual network address of the second network device.
  • the virtual network address of the second network device refers to an address allocated by the gateway device to the second network device, and may be generated by the gateway device according to the actual network address of the second network device.
  • the virtual network address of the second network device may include a virtual IP address and a virtual port number, and the virtual network address of the second network device is used by the gateway device to forward the received data packet to the second network device, that is, when When the virtual network address of the second network device sends the data packet, the data packet arrives at the gateway device, and the gateway device forwards the data packet to the second network device.
  • the first network device acquires the virtual network address of the second network device, and sends the second data packet to the virtual network address of the second network device, so that the second data packet is passed
  • the gateway device arrives at the second network device to communicate with the second network device across the network isolation between the first private network and the second private network.
  • the manner in which the first network device obtains the virtual network address of the second network device is the same as the manner in which the first mapping relationship is obtained, and details are not described herein.
  • the first network device implements the function of the forwarding proxy by using the foregoing steps.
  • the first network device may be referred to as a forwarding proxy device: the first network device proxy terminal performs a task of sending a data packet to each blockchain node, and the terminal The data packet of each blockchain node is sent to the first network device, and the actual address of each blockchain node is added by the first network device, so that the effect of sending the data packet to each blockchain node can be achieved. That is, the terminal only needs to access the first network device to meet the requirement of communicating with each blockchain node in the blockchain system.
  • the first network device may have multiple functions such as port monitoring, adding a redirect packet header, forwarding to a virtual network address, and the like, and the function of listening through the port can be
  • the first data packet is received during the process of listening to the mapping port, and by adding the function of redirecting the packet header, the actual network address to be redirected by the first data packet can be marked, and the function of forwarding to the virtual network address can forward the first data packet. Go to the second network device.
  • the gateway device receives the second data packet, and forwards the second data packet to the second network device according to the virtual network address of the second network device.
  • the gateway device may set the network address of the data received by itself to the virtual network address of the second network device, so when the first network device sends the second network address to the virtual network address of the second network device After the data packet, the gateway device can receive the second data packet.
  • the gateway device may store a third mapping relationship between the virtual network address of the second network device and the actual network address, and after receiving the second data packet, the gateway device may be configured according to the second network device. a virtual network address, querying the third mapping relationship, obtaining an actual network address of the second network device from the third mapping relationship, and sending a data packet to the actual network address of the second network device, thereby forwarding the second data packet Give the second network device.
  • the actual network address of the second network device may include an external network IP address of the second network device and a port number of the port of the second network device that receives the data packet.
  • the gateway device maps the actual network address of the second network device to a virtual network address, where the virtual network address enables access by the first network device and the terminal in the first private network, and the actual network address can be routed to the first a second network device in the second private network, the gateway device forwarding the data packet from the first private network to the second network of the second private network according to a third mapping relationship between the virtual network address and the actual network address The device, thereby opening a communication channel between the first private network and the second private network, implements a communication function across the private network.
  • the second network device receives the second data packet of the gateway device, and performs authentication on the terminal.
  • the second network device may have an authentication function, and may check whether the terminal has the right to access the target blockchain node, and when the terminal has the right to access the target blockchain node, the second network device goes to the target area.
  • the block chain node sends the second data packet, and when the terminal does not have the right to access the target blockchain node, the second network device may refuse to send the second data packet to the target blockchain node, for example, the second data packet may be discarded.
  • the failed retransmission message can be returned to the terminal through the gateway device, thereby controlling the terminal to transmit the data packet to the blockchain node.
  • the process of authenticating may be implemented based on a second mapping relationship between the user identifier and the blockchain node, that is, each user identifier only has access to the corresponding blockchain node in the second mapping relationship. Permissions without permissions to access other blockchain nodes.
  • the second mapping relationship may include at least one user identifier and a corresponding at least one blockchain node, where the second mapping relationship may be determined according to a service requirement, for example, for a user identifier registered with the accounting service, the corresponding area of the user identifier
  • a blockchain node can be one or more blockchain nodes associated with a bank.
  • the second mapping relationship can be a list, an array, or a collection, although other data structures in the programming language can also be used.
  • the process of the second network device acquiring the second mapping relationship is the same as the process of the first network device acquiring the first mapping relationship, and details are not described herein.
  • the specific process of performing authentication based on the second mapping relationship may include the following steps 1 through 4:
  • Step 1 The second network device acquires the user identifier carried in the second data packet.
  • the second network device can parse the second data packet to obtain the user identifier carried in the second data packet.
  • the second network device may parse the redirected packet header of the second data packet, and obtain the user identifier from the redirected packet header.
  • the second network device may parse the header of the first data packet in the second data packet, and obtain the user identifier from the packet header of the first data packet.
  • Step 2 The second network device obtains at least one blockchain node corresponding to the user identifier from the second mapping relationship according to the second mapping relationship between the user identifier and the blockchain node.
  • the second network device may obtain the second mapping relationship, and query the second mapping relationship by using the user identifier carried by the second data packet as an index, so as to obtain at least one blockchain node corresponding to the user identifier.
  • Step 3 The second network device determines whether the target blockchain node belongs to at least one blockchain node corresponding to the user identifier.
  • the second network device When the target blockchain node belongs to at least one blockchain node corresponding to the user identifier, the second network device performs the following step four: when the target blockchain node does not belong to at least one blockchain node corresponding to the user identifier, the second The network device performs the following step five.
  • Step 4 When the target blockchain node belongs to at least one blockchain node corresponding to the user identifier, the second network device determines that the terminal has the right to access the target blockchain node, and the authentication passes, and the second network device performs the following: Step 208.
  • Step 5 When the target blockchain node does not belong to at least one blockchain node corresponding to the user identifier, the second network device determines that the terminal does not have the right to access the target blockchain node, and the authentication fails, the second network device The second packet will be rejected from being forwarded to the target blockchain node.
  • the second network device checks the authority of the terminal to access the target blockchain node, and when the authentication passes, the data packet is forwarded to the target blockchain node, thereby ensuring communication security of the blockchain node, thereby avoiding The situation where an illegal user invades a blockchain node.
  • the second network device acquires an actual network address of the target blockchain node from the second data packet.
  • the second network device may have a function of redirecting the data packet, and respectively redirect each data packet sent to the second network device to a corresponding blockchain node in the blockchain system, then, when the second network After receiving the second data packet, the device can use the redirection function to forward the second data packet to the target blockchain node according to the actual network address of the target blockchain node in the second data packet.
  • the second network device may parse the second data packet to obtain the actual network address of the target blockchain node carried by the second data packet, thereby obtaining the foregoing step 204.
  • the actual network address added by a network device. If the first network device adds the redirect packet header in the foregoing step 204, the second network device may parse the redirect packet header in the second data packet to obtain the actual network address carried by the redirect packet header.
  • the second network device sends a second data packet to an actual network address of the target blockchain node.
  • the actual network address of the target blockchain node is the intranet address of the target blockchain node in the second private network, and the actual network address of the target blockchain node is pre-stored in the second network device and the target blockchain node.
  • the target blockchain node can be identified in the second private network. After the second network device sends the second data packet to the actual network address of the target blockchain node, the target blockchain node can receive the second data packet.
  • Implementing the first and second network devices forwards the second data packet to the target blockchain node.
  • the second network device may have a transparent transmission function, and the transparent transmission refers to transparent transmission, that is, after receiving the data packet, the data packet is not processed, but the data packet is forwarded to the destination device of the data packet. After receiving the second data packet, the second network device may forward the second data packet to the target blockchain node by using the transparent transmission function without processing the second data packet.
  • the second network device processes the second data packet, and forwards the processed second data packet to the target blockchain node.
  • the second network device may delete the redirected packet header from the second data packet, obtain the first data packet, and send the first data packet to the target blockchain node.
  • the second network device may delete the header of the first data packet from the first data packet, and send the combination of the redirected packet header and the packet body of the first data packet to the target blockchain node.
  • the weight may be The orientation packet header and the packet body of the first data packet are encapsulated, and the packet header of the encapsulated data packet is a redirect packet header, and the encapsulated data packet body is a packet body of the first data packet, and the second network device may be encapsulated The data packet is used as the processed second data packet, and the encapsulated data packet is sent to the target block chain node.
  • the second network device may modify the mapping port number of the target blockchain node in the second data packet to the actual network address of the target blockchain node, and send the modified second data packet to the target blockchain node.
  • the second network device may store a fourth mapping relationship between the mapping port number of the target blockchain node and the actual network address of the target blockchain node, and after receiving the second data packet, the second network device The mapping port number of the target blockchain node may be obtained from the second data packet, and the fourth mapping relationship is queried according to the mapping port number of the target blockchain node, and the target block corresponding to the mapping port number of the target blockchain node is obtained.
  • the actual network address of the chain node may be used to the second data packet.
  • the specific logic of the second network device for processing the second data packet may be determined according to actual service requirements, which is not limited in this embodiment.
  • the second network device can implement the function of the transparent proxy: after the second network device processes the second data packet, the target blockchain node identifies the source of the second data packet after receiving the second data packet.
  • the address is the network address of the terminal, and the destination address is its own network address, so the difference between the redirected second data packet and the data packet directly sent to itself is not perceived, that is, the target blockchain node There is no need to perceive the presence of the first network device, the second network device, and the gateway device.
  • the first network device, the second network device, and the gateway device are transparent.
  • the target blockchain node receives the second data packet according to the actual network address.
  • the target blockchain node can receive the second data packet and perform service processing according to the second data packet. For example, taking the content of the second data packet as the account data as an example, the target block chain node can parse the second data packet, obtain the account book data, record the account book data in the blockchain, and synchronize the account book data to the blockchain system. Other blockchain nodes in .
  • the first network device only needs to add the actual network address of the target blockchain node in the data packet sent to the target blockchain node, and only needs to send the data packet to the virtual address of the second network device.
  • the data packet can be forwarded to the target blockchain node through the gateway device and the second network device, and the requirements of the communication between the terminal in the first private network and each blockchain node in the second private network are respectively performed.
  • the gateway device does not need to generate a virtual network address for each blockchain node, which greatly saves the processing resources of the gateway device, reduces the running cost of the gateway device, and saves the storage space of the gateway device, thereby ensuring the normal operation of the gateway device.
  • FIG. 2 illustrates the process of information exchange between the terminal and the target blockchain node.
  • the network configuration of each device may be performed in advance, and the channel for network communication is opened through the network configuration, so that each device is already Based on the completion of the configuration, the above embodiment of FIG. 2 is implemented.
  • an implementation body of the method includes a gateway device, a blockchain OSS system, and a first network device, where the method includes the following steps:
  • the gateway device is the user identifier, and generates a virtual network address of the second network device.
  • This step describes a scenario in which a new user is registered in the blockchain system. That is, a user is registered in the blockchain system, and the blockchain node in the blockchain system is required to provide services. For example, a user registers in a financial application and requires the blockchain system associated with the financial application to record the ledger data for each transaction for the user.
  • the terminal device may generate a user identity registration request, and send a user identity registration request to the gateway device, where the gateway device may receive a user identity registration request of the terminal, where the user identity registration request is used to request the block in the manner that the gateway device obtains the registered user identifier.
  • the user identifier of the new user is registered in the chain system, and the network device can obtain the user identifier from the user identifier registration request, and determine that the user identifier is added to the blockchain system.
  • the user identifier is used to identify a user of the private network, for example, a developer, an administrator, or another user who has the right to communicate in the private network, and the user identifier may be the name of the user, the mobile phone. Number, etc.
  • the OSS system of the gateway device can detect the input operation, obtain the input user identifier, and the actual network address of the second network device, and the OSS system of the gateway device is based on the user identifier. And the user identifier registration request is generated by the actual network address of the second network device, and the user identifier registration request is sent to the gateway device, where the gateway device receives the user identifier registration request, where the user identifier may be the user's VPC identity identification number (IDentity, ID).
  • the terminal may send a user identity registration request, and the gateway device may receive the user identity registration request of the terminal.
  • the gateway device may store multiple virtual network addresses, and may select a virtual network address from the currently unoccupied virtual network addresses, and assign the virtual network address to the first Two network devices, thereby achieving the effect of generating a virtual network address for the second network device.
  • the currently unoccupied virtual network addresses may be arranged in the order of the addresses from small to large or in descending order, and the gateway device may select the first virtual network address in the currently unoccupied virtual network address as the second network. The virtual network address of the device.
  • the gateway device may send the generated virtual network address of the second network device to the OSS system of the blockchain.
  • the virtual network address of the second network device may maintain data synchronization between the gateway device and the OSS system.
  • the OSS system of the blockchain can synchronously record the virtual network address of the second network device.
  • the block chain OSS system may further determine, when the new user joins the blockchain system, the blockchain node associated with the user identifier, and record the second mapping relationship between the user identifier and the blockchain node, The recorded second mapping relationship is sent to the second network device, so that the second network device obtains the second mapping relationship, so in the foregoing step 207, the authentication process is performed according to the second mapping relationship.
  • the OSS system of the blockchain is at least one blockchain node associated with the user, and generates at least one mapping port number.
  • the OSS system of the blockchain may generate a mapping port number corresponding to the blockchain node, wherein the mapping port numbers generated for different blockchain nodes may be different, so that the first network device Packets destined for each blockchain node can be identified based on each mapped port number.
  • the OSS system of the blockchain sends the mapping port number of the at least one blockchain node and the virtual network address of the second network device to the first network device.
  • the OSS system of the blockchain can determine the private network corresponding to the user identifier, and determine the network device deployed in the private network, and send the mapping port of the blockchain node and the virtual network address of the second network device to the network device. If the user identifier is the user identifier of the first private network, the OSS system of the blockchain determines the first private network and the first network device, and the mapping port of the blockchain node and the virtual network address of the second network device. Send to the first network device.
  • the first network device only needs to listen to the user identifier by sending the mapping port of the blockchain node and the virtual network address of the second network device to the network device corresponding to the user identifier, considering the actual association between the user and the blockchain node.
  • the mapping port corresponding to the associated blockchain node can be used without listening to the mapping port corresponding to each blockchain node in the entire blockchain system, thereby reducing the number of mapped ports occupied by the first network device, saving the number
  • the processing resources and storage space of a network device reduce the operational load of the first network device listening process, thereby reducing energy consumption.
  • the first network device receives a mapping port number corresponding to the blockchain node in the blockchain system and a virtual network address of the second network device.
  • the first network device starts to listen to at least one mapping port by using a port corresponding to each mapping port number as a mapping port corresponding to the blockchain node.
  • the first network device may open a port corresponding to the port number in the local device, and use the port as a mapping port corresponding to the blockchain node, that is, allocate the port as a corresponding area.
  • the block chain node sends the port of the data packet and listens to the mapping port, so that in step 402, the data packet can be received during the listening process.
  • the mapping port number corresponding to each blockchain node in the blockchain system may also be generated by using an incremental update manner. That is, each time a blockchain node is added to the blockchain system, the OSS system of the blockchain only needs to generate a mapping port number corresponding to the newly added blockchain node, and sends a newly added zone to the first network device. The mapping port number corresponding to the blockchain node is sufficient, and it is not necessary to generate the mapping port number again for the blockchain node that has previously generated the mapped port number.
  • the first network device receives the mapping port number corresponding to the newly added blockchain node, and starts monitoring the corresponding mapping port for the newly added blockchain node.
  • the size of the blockchain system increases day by day, and the blockchain system often adds Blockchain node.
  • the OSS system of the blockchain can generate a mapping port number corresponding to each blockchain node for the user identity, and then, whenever the blockchain system is added, When the blockchain node is used, the OSS system of the blockchain identifies the user and generates a mapping port number corresponding to the newly added blockchain node.
  • the OSS system of the blockchain does not need to generate a mapping port number again for the blockchain node that has generated the mapped port number, thereby reducing the OSS of the blockchain. The amount of computation and load of the system.
  • FIG. 5 is a schematic diagram of a network configuration according to an embodiment of the present disclosure.
  • the OSS system of the gateway device After the OSS system of the gateway device generates the virtual network address of the second network device, the virtual network address of the second network device may be sent to the area.
  • An OSS system of a blockchain in which the virtual network address of the second network device is sent by the OSS system of the blockchain to the forwarding agent of each private network (ie, the first network device) and the transparent proxy of the blockchain system (ie, the second Internet equipment).
  • the method provided in this embodiment generates a corresponding mapping port for the blockchain node when the new user joins the blockchain system or the blockchain node in the old user newly associated blockchain system, and performs corresponding mapping port for each device.
  • the network configuration can open a communication channel between different private networks, so that the terminal in the first private network can send the data packet to the blockchain node in the second private network, thereby satisfying the requirement of the user accessing the blockchain node.
  • FIG. 6 is a schematic structural diagram of a network communication apparatus according to an embodiment of the present disclosure.
  • the apparatus is applied to a first network device in a first private network, where the apparatus includes: a receiving module 601, an obtaining module 602, a generating module 603, and Send module 604.
  • the receiving module 601 is configured to receive a first data packet that is sent to the target blockchain node in the second private network, and the acquiring module 602 is configured to obtain an actual network address of the target blockchain node, where the actual network address is An intranet address of the target blockchain node in the second private network; a generating module 603, configured to generate a second data packet according to the first data packet and the actual network address, where the second data packet carries the first data packet a data packet and the actual network address; the sending module 604, configured to send the second data packet to a virtual network address of the second network device in the second private network, where the virtual network address is used by the gateway device to receive The data packet is forwarded to the second network device.
  • the generating module 603 is configured to generate a redirect packet header that carries the actual network address, and add the redirect packet header to the first data packet to obtain a second data packet.
  • the obtaining module 602 is configured to obtain a mapping port number carried by the first data packet, and query a first mapping relationship between a mapping port number of the blockchain node and an actual network address, The actual network address corresponding to the mapped port number; the actual network address corresponding to the mapped port number is used as the actual network address of the target blockchain node.
  • the receiving module 601 is configured to receive the first data packet in a process of listening to a mapping port corresponding to the target blockchain node.
  • the receiving module 601 is configured to receive a mapping port number corresponding to the blockchain node in the blockchain system, and use the port corresponding to the mapping port number in the first network device as the area.
  • the mapping port corresponding to the blockchain node starts listening to the port corresponding to the mapped port number.
  • FIG. 7 is a schematic structural diagram of a network communication apparatus according to an embodiment of the present application.
  • the apparatus includes: a receiving module 701, an obtaining module 702, and a sending module 703.
  • the receiving module 701 is configured to receive a second data packet of the gateway device, where the second data packet carries a first data packet of the terminal in the first private network and an actual network address of the target blockchain node in the second private network, where the actual The network address is an intranet address of the target blockchain node in the second private network; the obtaining module 702 is configured to obtain the actual network address from the second data packet; and the sending module 703 is configured to use, according to the actual network An address, the first data packet is sent to the target blockchain node.
  • the obtaining module 702 is configured to parse the redirected packet header in the second data packet to obtain an actual network address carried by the redirected packet header.
  • the sending module 703 is configured to: when the terminal has the right to access the target blockchain node, send the second data packet to an actual network address of the target blockchain node.
  • the obtaining module 702 is configured to obtain a user identifier carried by the second data packet, where the apparatus further includes an authentication module, configured to query a second between the user identifier and the blockchain node. Mapping the relationship to obtain at least one blockchain node corresponding to the user identifier; when the target blockchain node belongs to the at least one blockchain node, determining that the terminal has the right to access the target blockchain node.
  • the network communication device provided in the above embodiment performs network communication
  • only the division of the above functional modules is illustrated.
  • the function distribution may be completed by different functional modules as needed.
  • the internal structure of at least one of the first network device and the second network device is divided into different functional modules to complete all or part of the functions described above.
  • the network communication device provided by the foregoing embodiment is in the same concept as the network communication method embodiment, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
  • the network device 800 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPUs) 801.
  • CPUs central processing units
  • the 801 is configured to control the transceiver 803 to perform the transceiving step in the above embodiment.
  • the network device may also have components such as a wired or wireless network interface and an input/output interface for input and output.
  • the network device may also include other components for implementing the functions of the device, and details are not described herein.
  • the above instructions may be loaded by a processor of the network device 800 and perform the following network communication method: the transceiver is configured to receive a first data packet sent to a target blockchain node in a second private network; the processor is configured to acquire An actual network address of the target blockchain node, where the actual network address is an intranet address of the target blockchain node in the second private network; the processor is configured to use, according to the first data packet and the actual network address, Generating a second data packet, the second data packet carrying the first data packet and the actual network address; the transceiver is configured to send the second data packet to a virtual network address of the second network device in the second private network The virtual network address is used by the gateway device to forward the received data packet to the second network device.
  • the processor is configured to generate a redirect header carrying the actual network address; adding the redirect header to the first packet to obtain a second packet.
  • the processor is configured to obtain a mapping port number carried by the first data packet, and query a first mapping relationship between a mapping port number of the blockchain node and an actual network address, to obtain the mapping port number.
  • the actual network address corresponding to the mapped port number is used as the actual network address of the target blockchain node.
  • the transceiver is configured to receive the first data packet in a process of listening to a mapping port corresponding to the target blockchain node.
  • the processor is configured to receive a mapping port number corresponding to the blockchain node in the blockchain system, and the port corresponding to the mapping port number in the first network device is used as the blockchain node corresponding to the blockchain node.
  • Map port initiates listening to the port corresponding to the mapped port number.
  • the above instructions may be loaded by a processor of the network device 800 and perform the following network communication methods:
  • the transceiver is configured to receive a second data packet of the gateway device, where the second data packet carries a first data packet sent to a target blockchain node in the second private network, and an actual network address of the target blockchain node, where The actual network address is an intranet address of the target blockchain node in the second private network; the processor is configured to obtain the actual network address from the second data packet; the transceiver is configured to the target blockchain node The actual network address is sent to the second data packet.
  • the processor is configured to parse the redirected packet header in the second data packet to obtain an actual network address carried by the redirected packet header.
  • the processor is configured to send the second data packet to an actual network address of the target blockchain node when the terminal has the right to access the target blockchain node.
  • the processor is configured to obtain a user identifier carried by the second data packet, and query a second mapping relationship between the user identifier and the blockchain node to obtain at least one blockchain corresponding to the user identifier. a node; when the target blockchain node belongs to the at least one blockchain node, determining that the terminal has the right to access the target blockchain node.
  • a computer readable storage medium such as a memory including instructions
  • the computer readable storage medium may be a read only memory (English name: read-only memory, English abbreviation: ROM ), random access memory (English full name: random access memory, English abbreviation: RAM), read-only optical disc (English full name: compact disc read-only memory, English abbreviation: CD-ROM), magnetic tape, floppy disk and optical data storage devices, etc.
  • the instructions are executable by the processor to perform the network communication methods described below:
  • Receiving a first data packet sent to a target blockchain node in the second private network acquiring an actual network address of the target blockchain node, where the actual network address is the target blockchain node in the second private network An intranet address; generating, according to the first data packet and the actual network address, a second data packet, the second data packet carrying the first data packet and the actual network address; and a second in the second private network
  • the virtual network address of the network device sends the second data packet, where the virtual network address is used by the gateway device to forward the received data packet to the second network device.
  • a computer readable storage medium such as a memory including instructions, such as ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage device, for example.
  • the instructions are executable by the processor to perform the network communication methods described below:
  • the second data packet carries a first data packet sent to a target blockchain node in the second private network and an actual network address of the target blockchain node, where the actual network address is An intranet address of the target blockchain node in the second private network; obtaining the actual network address from the second data packet; and transmitting the second data packet to an actual network address of the target blockchain node.
  • the generating the second data packet according to the first data packet and the actual network address including: generating a redirect packet header carrying the actual network address; adding the weight to the first data packet Orient the packet header to get the second data packet.
  • the obtaining the actual network address of the target blockchain node includes: obtaining a mapping port number carried by the first data packet; querying a mapping port number of the blockchain node and an actual network address The first mapping relationship between the two obtains the actual network address corresponding to the mapping port number; the actual network address corresponding to the mapping port number is used as the actual network address of the target blockchain node.
  • the receiving the first data packet sent to the target blockchain node in the second private network includes: receiving the mapping port in the process of listening to the mapping port corresponding to the target blockchain node The first packet.
  • the method before receiving the first data packet sent by the target blockchain node in the second private network, the method further includes: receiving a mapping port corresponding to the blockchain node in the blockchain system
  • the port corresponding to the mapped port number in the first network device is used as a mapping port corresponding to the blockchain node; and the port corresponding to the mapped port number is started to be monitored.
  • the obtaining the actual network address from the second data packet includes: parsing a redirect packet header in the second data packet, and obtaining an actual network address carried by the redirect packet header.
  • the sending the second data packet to an actual network address of the target blockchain node includes: when the terminal has the right to access the target blockchain node, to the target block The second network packet is sent by the actual network address of the chain node.
  • the method before the sending the second data packet to the actual network address of the target blockchain node, the method further includes: acquiring a user identifier carried by the second data packet; querying the user identifier and the area a second mapping relationship between the block chain nodes to obtain at least one blockchain node corresponding to the user identifier; when the target blockchain node belongs to the at least one blockchain node, determining that the terminal has access to the target block The permissions of the chain node.
  • the storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种网络通信方法、系统、设备及存储介质,属于网络技术领域。通过接收向目标区块链节点发送的第一数据包,获取目标区块链节点的实际网络地址;根据第一数据包以及实际网络地址,生成第二数据包,向第二网络设备的虚拟网络地址发送第二数据包,可以减轻网关设备为各个区块链节点分别生成虚拟网络地址产生的运行开销,节省了网关设备的存储空间。

Description

网络通信方法、系统、设备及存储介质
本申请要求申请日为2018年4月20日、申请号为201810362776.6、发明名称为“网络通信方法、系统、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络技术领域,特别涉及一种网络通信方法、系统、设备及存储介质。
背景技术
随着网络技术的发展,人们可以基于云端自定义VPC(Virtual Private Cloud,私有网络),在VPC中布设和管理自己的设备,例如用户可以在VPC中布设终端,服务方可以在VPC中布设区块链节点。其中,每个VPC是一个相对隔离的网络环境,为了让不同VPC之间能相互通信,会在各个VPC之间布设VPC网关,不同VPC中的设备可以通过VPC网关进行网络通信。
以终端位于VPC1,区块链系统中各个区块链节点位于VPC2为例,VPC网关会预先为VPC2中的每个区块链节点生成对应的虚拟网络地址,并存储每个区块链节点的虚拟网络地址与实际网络地址之间的映射关系。当终端要向区块链节点发送数据包时,终端会向区块链节点的虚拟网络地址发送数据包,VPC网关会接收到数据包,根据区块链节点的虚拟网络地址,查询区块链节点的虚拟网络地址与实际网络地址之间的映射关系,得到区块链节点的实际网络地址,向区块链节点的实际网络地址发送数据包,则区块链节点会接收到数据包。
发明内容
本申请实施例提供了一种网络通信方法、系统、设备及存储介质,能够解决相关技术中VPC网关耗费资源的过多的技术问题。所述技术方案如下:
一方面,提供了一种网络通信方法,应用于第一私有网络中的第一网络设备中,所述方法包括:
所述第一网络设备接收向第二私有网络中的目标区块链节点发送的第一数据包;
所述第一网络设备获取所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
所述第一网络设备根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;
所述第一网络设备向所述第二私有网络中的第二网络设备的虚拟网络地址,发送所述第二数据包,所述虚拟网络地址用于供网关设备将接收到的数据包转发给所述第二网络设备。
另一方面,提供了一种网络通信方法,应用于第二私有网络中的第二网络设备中,所述方法包括:
所述第二网络设备接收网关设备的第二数据包,所述第二数据包携带向第二私有网络中的目标区块链节点发送的第一数据包以及所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
所述第二网络设备从所述第二数据包中获取所述实际网络地址;
所述第二网络设备向所述目标区块链节点的实际网络地址发送所述第二数据包。
另一方面,提供了一种网络通信系统,所述网络通信系统包括第一私有网络中的第一网络设备、第二私有网络中的第二网络设备以及网关设备;
所述第一网络设备,用于接收向第二私有网络中的目标区块链节点发送的第一数据包;获取所述目标区块链节点的实际网络地址,所述目标区块链节点的实际网络地址为目标区块链节点在所述第二私有网络中的内网地址;根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;向所述第二网络设备的虚拟网络地址发送所述第二数据包;
所述网关设备,用于根据所述第二网络设备的虚拟网络地址,查询虚拟网络地址与实际网络地址之间的第三映射关系,得到所述虚拟网络地址对应的实际网络地址,作为所述第二网络设备的实际网络地址;向所述第二网络设备的实际网络地址发送所述第二数据包;
所述第二网络设备,用于接收所述网关设备的第二数据包;从所述第二数据包中获取目标区块链节点的实际网络地址;根据所述实际网络地址,向所述目标区块链节点的实际网络地址发送所述第二数据包。
另一方面,提供了一种网络通信装置,应用于第一私有网络中的第一网络设备中,所述装置包括:
接收模块,用于接收向第二私有网络中的目标区块链节点发送的第一数据包;
获取模块,用于获取所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
生成模块,用于根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;
发送模块,用于向所述第二私有网络中的第二网络设备的虚拟网络地址发送所述第二数据包,所述虚拟网络地址用于供网关设备将接收到的数据包转发给所述第二网络设备。
另一方面,提供了一种网络通信装置,应用于第二私有网络中的第二网络设备中,所述装置包括:
接收模块,用于接收网关设备的第二数据包,所述第二数据包携带第一私有网络中终端的第一数据包以及第二私有网络中目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
获取模块,用于从所述第二数据包中获取所述实际网络地址;
发送模块,用于根据所述实际网络地址,向所述目标区块链节点发送所述第一数据包。
另一方面,提供了一种网络设备,所述网络设备包括处理器、存储器和收发器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现以下网络通信方法:所述收发器用于接收向第二私有网络中的目标区块链节点发送的第一数据包;所述处理器用于获取所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;所述处理器用于根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;所述收发器用于向所述第二私有网络中的第二网络设备的虚拟网络地址,发送所述第二数据包,所述虚拟网络地址用于供网关设备将接收到的数据包转发给所述第二网络设备。
另一方面,提供了一种网络设备,所述网络设备包括处理器、存储器和收发器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现以下网络通信方法: 所述收发器用于接收网关设备的第二数据包,所述第二数据包携带向第二私有网络中的目标区块链节点发送的第一数据包以及所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;所述处理器用于从所述第二数据包中获取所述实际网络地址;所述收发器用于向所述目标区块链节点的实际网络地址发送所述第二数据包。
另一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行下述网络通信方法:接收向第二私有网络中的目标区块链节点发送的第一数据包;获取所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;向所述第二私有网络中的第二网络设备的虚拟网络地址,发送所述第二数据包,所述虚拟网络地址用于供网关设备将接收到的数据包转发给所述第二网络设备。
另一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行下述网络通信方法:接收网关设备的第二数据包,所述第二数据包携带向第二私有网络中的目标区块链节点发送的第一数据包以及所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;从所述第二数据包中获取所述实际网络地址;向所述目标区块链节点的实际网络地址发送所述第二数据包。
本申请实施例提供的技术方案带来的有益效果至少包括:本申请实施例提供的方法、系统、设备及存储介质,第一网络设备通过在发往目标区块链节点的数据包中,添加目标区块链节点的实际网络地址,向第二网络设备的虚拟地址发送数据包,既能将数据包通过网关设备以及第二网络设备,转发至目标区块链节点,在满足第一私有网络中的终端与第二私有网络中各个区块链节点分别进行通信的需求的基础上,网关设备无需为各个区块链节点分别生成虚拟网络地址,极大地节省了网关设备的处理资源,减轻了网关设备的运行开销,节省了网关设备的存储空间,从而保证网关设备正常运行。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种网络通信方法的实施环境的示意图;
图2是本申请实施例提供的一种网络通信方法的流程图;
图3是本申请实施例提供的一种网络设备的功能示意图;
图4是本申请实施例提供的一种网络通信方法的流程图;
图5是本申请实施例提供的一种网络配置的示意图;
图6是本申请实施例提供的一种网络通信装置的结构示意图;
图7是本申请实施例提供的一种网络通信装置的结构示意图;
图8是本申请实施例提供的一种网络设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的 实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了区分描述,本申请实施例以通信过程中终端生成的数据包称为第一数据包,在第一数据包的基础上结合第二网络设备的实际网络地址生成的数据包称为第二数据包,终端所处的VPC称为第一私有网络,区块链节点所处的VPC称为第二私有网络,区块链节点的映射端口与区块链节点的实际网络地址之间的映射关系称为第一映射关系,用户标识与区块链节点之间的映射关系称为第二映射关系,第二网络设备的虚拟网络地址与实际网络地址之间的映射关系称为第三映射关系为例进行描述。
需要说明的是,术语“第一”、“第二”、“第三”仅用于区分描述不同的数据包、不同的私有网络以及不同的映射关系,而不能理解为指示或暗示顺序关系、相对重要性或者隐含指明所指示的技术特征的数量。
为了便于理解,首先对本申请实施例涉及的技术术语“VPC”与“区块链”进行解释:
VPC:是一种能够按需定制的网络环境,在VPC中,用户可以自由划分网段、制定路由策略。VPC可以为云上的私有网络。
同一个VPC内的不同设备可以进行内网通信。具体来说,在一种可能的实施例中,同一个VPC的不同设备进行内网通信的实现方式可以为:对于任一个VPC来说,该VPC可以具有至少一个内网网段,该VPC中的每个设备可以具有内网网段中的一个内网互联网协议地址(英语:Internet Protocol Address,IP),该VPC中的任两个设备之间可以通过彼此的内网IP进行通信,例如,设备A可以通过设备A的内网IP1与设备B的内网IP2进行通信。在一种可能的实现中,可以在VPC中部署网络设备,该网络设备可以是路由器或交换机,交换机可以基于数据链路层协议,转发同一VPC中同一子网中不同设备之间的数据包;路由器可以基于网络层协议,转发同一VPC中不同子网中设备之间的数据包。
VPC是一个隔离的网络环境。具体来说,不同VPC之间、VPC与以太网(英文:Internet)之间、VPC与VPC以外的其他私有网络之间无法直接进行通信。具体来说,在一种可能的实施例中,对于任意VPC中的任意设备来说,该设备的数据包要通过网关设备的转发,以发送至该VPC以外的其他VPC、以太网或VPC以外的其他私有网络;同理地,对于该VPC以外的其他VPC、以太网或VPC以外的其他私有网络来说,这些网络中任意设备的数据包要通过网关设备的转发,以发送至该VPC的该设备,如此可以实现租户隔离的功能,保证用户数据的安全性。
区块链:是一种去中心化的分布式数据库,是基于对等网络(英文全称:Peer to Peer,英文简称:P2P)网络传输、共识机制、加密算法等技术的新型应用模式。区块链通过链式数据结构对数据进行存储和验证,通过加密算法来保证数据传输和查询的安全,通过智能合约来操作数据。其中,该智能合约是指根据特定条件自动执行的合约程序,是利用区块链实现业务逻辑的重要途径。
图1是本申请实施例提供的一种网络通信方法的实施环境的示意图,该实施环境包括:多个终端101、第一网络设备102、网关设备103、第二网络设备104、以及多个区块链节点105。
多个终端101和第一网络设备102位于第一私有网络内部。每个终端101可以通过第一网络设备102与位于第一私有网络外部的设备进行通信。
具体来说,在一个可能的实施例中,当终端101要向第一私有网络外部的设备发送数据 包时,终端101可以向第一网络设备102发送数据包,第一网络设备102可以接收数据包,将数据包转发至第一私有网络外部的设备。同理地,当第一私有网络外部的设备要向终端101发送数据包时,第一私有网络外部的设备可以向第一网络设备102发送数据包,第一网络设备102可以接收数据包,将数据包转发至终端101。
多个区块链节点105和第二网络设备104处于第二私有网络中,每个区块链节点105可以通过第二网络设备104与位于第二私有网络外部的设备进行通信。
具体来说,在一个可能的实施例中,当区块链节点105要向第二私有网络外部的设备发送数据包时,区块链节点105可以向第二网络设备104发送数据包,第二网络设备104可以接收数据包,将数据包转发至第二私有网络外部的设备。同理地,当第二私有网络外部的设备要向区块链节点105发送数据包时,第二私有网络外部的设备可以向第二网络设备104发送数据包,第二网络设备104可以接收数据包,将数据包转发至区块链节点105。
第一网络设备102与第二网络设备104之间可以通过网关设备103进行通信,从而实现第一私有网络与第二私有网络之间的信息交互。
第一网络设备102、第二网络设备104和网关设备103均可以为路由器、交换机、网关设备、防火墙设备、服务器等,终端101可以为个人电脑、手机、负载均衡器等,区块链节点可以为服务器、个人电脑、笔记本电脑或其它具有计算能力的电子设备。需要说明的是,上述实施环境中的每个设备可以为物理上的实体设备,也可以为逻辑上的虚拟设备,例如可以为虚拟机或容器,例如为云平台的一个虚拟组成,本实施例对此不做限定。
为使本申请的优点更加清楚明白,以下结合一个示例性应用场景进行阐述:
以终端位于VPC1,目标区块链节点位于VPC2为例,终端具有跨越自身所处的VPC1,向VPC2中的目标区块链节点传输数据包的需求。例如,用户通过操作终端产生了一笔交易,终端根据这笔交易的金额、账户等生成了账本数据,希望将账本数据传输给区块链节点,以便目标区块链节点在区块链中记录账本数据。为此,终端生成了数据包,在数据包的包体中携带了账本数据,要向区块链节点发送该数据包,以便区块链节点从数据包中得到账本数据。
而由于VPC1与VPC2之间相互隔离,VPC1的终端无法通过该终端在VPC1中的内网IP,直接将数据包发送给VPC2的目标区块链节点,需要在VPC1与VPC2之间布设网关设备,网关设备用于打通VPC1与VPC2之间的通信通道,将数据包从VPC1传输至VPC2。
相关技术中,针对每个用户,网关设备要为该用户关联的每个区块链节点生成每个区块链节点对应的虚拟网络地址,例如为每个区块链节点分配一个虚拟IP地址和虚拟端口号,而不同区块链节点对应的虚拟网络地址会不同,以便通过不同的虚拟网络地址,来区分不同的区块链节点。因此,每当区块链系统中新增一个用户,VPC网关要为大量的区块链节点生成大量的虚拟网络地址,同时每当用户新关联了一个或多个区块链节点,VPC网关也要为新关联的每个区块链节点分别生成对应的虚拟网络地址。
然而,VPC网关作为云平台的一个基础组成,其处理资源和存储空间都是有限的,不便于包含过于复杂的业务逻辑,让VPC网关生成和存储海量的虚拟网络地址,会对VPC网关的正常运行产生巨大的挑战。由于一个VPC网关能够生成的虚拟网络地址的总数量是有限的,而虚拟网络地址的数量会影响到通信系统能容纳的区块链节点的数量,因此这种方式对通信系统能容纳的区块链节点的数量形成了限制。
而应用本申请实施例提供的网络通信方法以及系统,可以在VPC1中布设第一网络设备,在VPC2中布设第二网络设备,网关设备为第二网络设备生成虚拟网络地址,存储虚拟网络 地址以及实际网络地址之间的映射关系,即可实现数据包的转发功能,而无需为各个区块链节点分别生成虚拟网络地址,更无需为各个区块链节点分别存储虚拟网络地址和实际网络地址之间的映射关系。
具体地,VPC1中的终端要向VPC2中的各个区块链节点发送数据包时,均可以将数据包发送给第一网络设备,第一网络设备可以在数据包中添加对应区块链节点的实际网络地址,将添加了实际网络地址的数据包发送给第二网络设备的虚拟网络地址,网关设备能够根据第二网络设备的虚拟网络地址,接收到数据包,查询虚拟网络地址和实际网络地址之间的映射关系,得到第二网络设备的实际网络地址,根据该第二网络设备的实际网络地址,将发往各个区块链节点的数据包转发给第二网络设备,第二网络设备能够接收到第二私有网络中每个区块链节点的数据包,能够根据每个数据包中的实际网络地址,将每个数据包分别发送给对应的区块链节点。
如此,将多个终端与多个区块链节点之间的多点通信,转化为第一网络设备与第二网络设备之间的点对点通信。在满足VPC1中的各个终端与VPC2中的各个区块链节点之间进行通信的需求的基础上,极大地节省了网关设备的处理资源,减轻了网关设备的运行开销,节省了网关设备的存储空间,从而保证网关设备正常运行。进一步地,由于摆脱了网关设备资源有限的限制,提高了区块链系统能够服务的用户总数量,使得区块链系统在云端可以同时支撑大量用户的访问,每个用户可以在云端的区块链平台开发自己的基于区块链的应用。
图2是本申请实施例提供的一种网络通信方法的流程图,该方法的执行主体包括终端、第一网络设备、第二网络设备、网关设备以及目标区块链节点,参见图2,该方法包括:
201、第一私有网络中的终端向第一网络设备发送第一数据包。
当第一私有网络中的终端要向第二私有网络中的目标区块链节点传输数据时,终端可以生成第一数据包,向第一网络设备发送第一数据包,以便将第一数据包通过第一网络设备传输至目标区块链节点。其中,第一数据包的源设备为终端,第一数据包的目的设备为第二私有网络中的目标区块链节点。
具体来说,第一数据包的源互联网协议地址(英语全称:internet protocol,英语简称:IP)地址和源端口号可以是终端的IP地址和端口号,第一数据包的目的IP地址和目的端口号可以是目标区块链节点的IP地址和端口号。
在一个示例性场景中,当终端完成了交易事件,例如终端与经营实体进行了转账、产品交付、信息互通等过程后,终端可以生成第一数据包,该第一数据包包括交易数据,该交易数据可以包括交易事件的交易双方的标识、交易金额、交易时间中的至少一项。终端可以向第一网络设备发送第一数据包,以便目标区块链节点接收到根据第一数据包生成的第二数据包后,可以从第二数据包中获取交易数据,通过区块链记录该交易数据,例如,目标区块链节点可以根据交易数据生成区块,当第二私有网络中的至少一个区块链节点对该区块共识通过时,将该区块添加至区块链上。
在一种可能的设计中,发送第一数据包的过程可以采用端口映射(英语:port mapping)的方式实现。具体来说,可以预先将区块链系统中的至少一个区块链节点映射为第一网络设备中的至少一个映射端口,每个区块链节点和每个映射端口一一对应,通过不同的映射端口能够区分不同的区块链节点,终端可以根据目标区块链节点对应的映射端口以及第一网络设备的网络地址,生成第一数据包,向第一网络设备发送第一数据包。
结合端口映射的方式,针对第一数据包的传输性质,第一数据包的目的端口可以为目标 区块链节点对应的映射端口,以便第一数据包通过它的目的端口,能够标识它要重定向至目标区块链节点。另外,第一数据包的目的地址可以为第一网络设备的网络地址,以便第一数据包通过它的目的地址,能够传输至第一网络设备。
在一种可能的实现中,第一数据包可以通过包头指示目的端口以及目的地址,例如包头可以携带目的端口号以及目的IP地址,通过目的端口号指示目的端口,通过目的IP地址指示目的地址,则第一数据包的包头中的目的端口号可以为目标区块链节点对应的映射端口的映射端口号,目的IP地址可以为第一网络设备的网络地址。另外,第一数据包的包头中的源IP地址可以为终端的IP地址,源端口号可以为终端的端口号,通过源IP地址和源端口号可以指示第一数据包来自于终端。
通过端口映射的方式,终端通过在每个数据包中携带数据包待发送至的区块链节点的映射端口号,即可通过不同的映射端口号,来区分待发送至不同区块链节点的数据包,从而将每个数据包发送至对应的区块链节点,最终满足向各个区块链节点分别发送数据包的需求。
202、第一网络设备接收终端的第一数据包。
第一网络设备具有转发数据包的功能,可以接收到终端发送的第一数据包,将第一数据包转发给目标区块链节点。关于第一网络设备接收第一数据包的过程,可选地,第一网络设备可以预先开启目标区块链节点对应的映射端口,监听目标区块链节点对应的映射端口,在监听目标区块链节点对应的映射端口的过程中,接收第一数据包。
关于监听目标区块链节点对应的映射端口的具体实现方式,当第一网络设备接收到任一数据包时,第一网络设备可以确定该数据包的目的端口,判断该数据包的目的端口是否为目标区块链节点对应的映射端口,若数据包的目的端口为目标区块链节点对应的映射端口,则确定接收到了待发送给目标区块链节点的第一数据包,则后续会执行根据第一数据包生成第二数据包的处理逻辑,而若数据包的目的端口不是区块链节点对应的映射端口,则可以执行其他处理逻辑,例如将数据包转发给其他设备。
具体来说,关于第一网络设备确定数据包的目的端口的过程,第一网络设备可以解析数据包的包头,得到数据包的包头中携带的目的端口号,将该目的端口号对应的端口确定为数据包的目的端口。关于判断数据包的目的端口是否为区块链节点对应的映射端口的过程,第一网络设备可以存储映射端口信息,该映射端口信息包括当前监听的每个区块链节点对应的映射端口的映射端口号,第一网络设备可以判断数据包的目的端口号是否属于映射端口信息,当目的端口号属于该映射端口信息时,确定数据包的目的端口为区块链节点对应的映射端口。
可选地,第一网络设备可以监听区块链系统中每个区块链节点对应的每个映射端口,不同的区块链节点可以对应不同的映射端口,如此,第一网络设备能够根据各个第一数据包对应的映射端口,识别和区分各个第一数据包待发往的区块链节点。
作为示例,监听每个区块链节点对应的每个映射端口的方式可以与上述监听目标区块链节点对应的映射端口的方式同理,举例来说,假设区块链系统中包括N个区块链节点,可以开启N个映射端口,监听该N个映射端口,该N个映射端口中的每个映射端口对应N个区块链节点中的一个区块链节点,N为正整数。
203、第一网络设备获取目标区块链节点的实际网络地址。
区块链节点的实际网络地址为区块链节点在第二私有网络中的内网地址,能够在第二私有网络中唯一确定对应的区块链节点,因此通过在数据包中携带区块链节点的实际网络地址,将数据包转发至第二网络设备,第二网络设备能够根据区块链节点的实际网络地址,将接收 到的数据包转发至第二私有网络中对应的区块链节点。例如,区块链节点的实际网络地址可以包括区块链节点的IP地址和端口号,该IP地址可以为区块链节点在第二私有网络中的内网IP,端口号可以标识区块链节点中处理业务的端口。
为了让第二网络设备确定第一数据包转发给哪个区块链节点,第一网络设备可以获取目标区块链节点的实际网络地址,在第一数据包中添加实际网络地址,如此,第二网络设备可以根据数据包中的实际网络地址,确定该第一数据包的目的设备为目的区块链节点,从而将第一数据包转发至目标区块链节点。
获取目标区块链节点的实际网络地址具体可以通过以下步骤一至步骤二实现:
步骤一、第一网络设备获取第一数据包携带的映射端口号。
示例性地,若第一网络设备采用监听映射端口的方式,接收发往区块链节点的数据包,则第一网络设备可以确定第一数据包是监听哪个映射端口得到的,将这个映射端口作为第一数据包对应的映射端口。若第一网络设备未采用监听映射端口的方式接收数据包,第一网络设备可以确定第一数据包的目的端口,将第一数据包的目的端口作为第一数据包对应的映射端口。例如,第一网络设备可以解析第一数据包的包头,得到包头中携带的目的端口号,将该目的端口号对应的端口确定为第一数据包的映射端口。
步骤二、第一网络设备查询区块链节点的映射端口号与实际网络地址之间的第一映射关系,得到映射端口号对应的实际网络地址,将该映射端口号对应的实际网络地址作为目标区块链节点的实际网络地址。
第一映射关系可以称为端口映射关系,第一映射关系可以包括至少一个区块链节点对应的映射端口号以及至少一个区块链节点的实际网络地址。
关于第一网络设备得到第一映射关系的方式,第一映射关系可以在区块链的运营支撑(英文全称:The Office of Strategic Services,英文简称:OSS)系统中存储,第二网络设备可以从OSS系统中获取到用户标识与区块链节点集合之间的对应关系。例如第一网络设备可以从区块链的OSS系统主动拉取第一映射关系,作为示例,第一网络设备可以向OSS系统发送映射关系请求,OSS系统接收映射关系请求后,可以生成映射关系响应,向第一网络设备发送映射关系响应,第一网络设备从映射关系响应中获取第一映射关系。其中,该映射关系响应包括第一映射关系。又如,区块链的OSS系统可以向第一网络设备推送第一映射关系。作为示例,当第一网络设备进行初始化,在OSS系统上注册时,OSS系统可以向第一网络设备推送第一映射关系。另外,第二网络设备也可以预先存储第一映射关系。另外,也可以对第一网络设备进行配置操作,由第一网络设备接收配置的第一映射关系。
204、第一网络设备根据第一数据包以及实际网络地址,生成第二数据包。
第二数据包携带第一数据包以及目标区块链节点的实际网络地址,因此第二数据包不仅包含第一数据包本身的内容,还能指示目标区块链节点的实际网络地址,第一网络设备通过生成包含第一数据包的第二数据包,一方面,能够让区块链节点接收到终端发送的第一数据包,另一方面,能够让第一数据包最终路由至第二私有网络中的目标区块链节点。
关于生成第二数据包的过程,第一网络设备可以向第一数据包中添加目标区块链节点的实际网络地址,将添加实际网络地址后的第一数据包作为第二数据包。在一种可能的实现中,生成第二数据包的过程可以包括以下步骤一至步骤二:
步骤一、第一网络设备生成携带实际网络地址的重定向包头。
重定向包头用于将第二数据包从第二网络设备重定向至目标区块链节点,重定向包头携 带目标区块链节点的实际网络地址。例如,重定向包头中的目的地址可以为目标区块链节点的实际IP地址,重定向包头中的目的端口号可以为区块链节点中处理业务的端口的端口号。
可选地,重定向包头中除了目的地址和目的端口号以外的其他内容可以与第一数据包的包头相同,例如重定向包头的源IP地址可以为终端的IP地址,源端口号可以为终端的端口号,从而指示第二数据包实际来自于终端。另外,重定向包头中除了目的地址和目的端口号以外的其他内容也可以根据第一网络设备的信息确定,例如重定向包头的源IP地址可以为第一网络设备的IP地址,源端口号可以为第一网络设备的端口号,从而指示第二数据包经过了第一网络设备的转发。
步骤二、第一网络设备向第一数据包添加重定向包头,得到第二数据包。
第二网络设备具有对数据包进行处理的功能,能够向第一数据包添加重定向包头。例如,第二网络设备可以在第一数据包的包头之前,封装该重定向包头,将第一数据包以及重定向包头的组合作为第二数据包,如此,第二数据包中可以包括两个包头,一个是终端原先生成的包头,另一个是第一网络设备生成的重定向包头。又如,第二网络设备可以将第一数据包的包头替换为重定向包头,即将第一数据包的包头从第一数据包中去掉,重新封装上重定向包头,再将替换了包头的第一数据包作为第二数据包,如此,第二数据包中的包头即为第一网络设备生成的重定向包头。
通过上述步骤一和步骤二,第一网络设备通过添加重定向包头,能够让第二数据包在第二网络设备处重定向至目标区块链节点,从而转发给目标区块链节点,满足传输数据包的需求。
205、第一网络设备向第二网络设备的虚拟网络地址发送第二数据包。
第二网络设备的虚拟网络地址是指网关设备分配给第二网络设备的地址,可以由网关设备预先根据第二网络设备的实际网络地址生成。第二网络设备的虚拟网络地址可以包括虚拟的IP地址和虚拟的端口号,第二网络设备的虚拟网络地址用于供网关设备将接收到的数据包转发给第二网络设备,即,当向第二网络设备的虚拟网络地址发送数据包时,数据包会到达网关设备,由网关设备将数据包转发给第二网络设备。
结合第二网络设备的虚拟网络地址的功能,第一网络设备获取第二网络设备的虚拟网络地址,向该第二网络设备的虚拟网络地址发送第二数据包,即可令第二数据包通过网关设备到达第二网络设备,从而跨越了第一私有网络与第二私有网络之间的网络隔离,与第二网络设备进行通信。其中,第一网络设备获取第二网络设备的虚拟网络地址的方式与上述获取第一映射关系的方式同理,在此不做赘述。
本实施例中,第一网络设备通过上述步骤实现了转发代理的功能,第一网络设备可以称为转发代理设备:第一网络设备代理终端执行向各个区块链节点发送数据包的任务,终端只需向第一网络设备发送各个区块链节点的数据包,通过第一网络设备添加各个区块链节点的实际地址,即可达到向各个区块链节点分别发送数据包的效果。也即是,终端只需访问第一网络设备,即可满足与区块链系统中的各个区块链节点进行通信的需求。
请参见图3,其示出了第一网络设备的功能结构图,第一网络设备可以具有端口监听、增加重定向包头、转发到虚拟网络地址等多个功能,通过端口监听的功能,能够在监听映射端口的过程中接收第一数据包,通过增加重定向包头的功能,能够标记第一数据包要重定向的实际网络地址,通过转发到虚拟网络地址的功能,能够让第一数据包转发到第二网络设备。
206、网关设备接收第二数据包,根据第二网络设备的虚拟网络地址,将第二数据包转发 给第二网络设备。
关于网关设备接收第二数据包的过程,网关设备可以将自身接收数据的网络地址设置为第二网络设备的虚拟网络地址,因此当第一网络设备向第二网络设备的虚拟网络地址发送第二数据包后,网关设备能够接收到第二数据包。
关于转发第二数据包的过程,网关设备可以存储第二网络设备的虚拟网络地址与实际网络地址之间的第三映射关系,当接收到第二数据包后,网关设备可以根据第二网络设备的虚拟网络地址,查询该第三映射关系,从该第三映射关系中得到第二网络设备的实际网络地址,向该第二网络设备的实际网络地址发送数据包,从而将第二数据包转发给第二网络设备。其中,第二网络设备的实际网络地址可以包括第二网络设备的外网IP地址以及第二网络设备中接收数据包的端口的端口号。
本实施例中,网关设备将第二网络设备的实际网络地址映射为虚拟网络地址,该虚拟网络地址能让第一私有网络中的第一网络设备以及终端访问,该实际网络地址能够路由至第二私有网络中的第二网络设备,网关设备根据虚拟网络地址与实际网络地址之间的第三映射关系,即可将来自于第一私有网络的数据包转发给第二私有网络的第二网络设备,从而打通了第一私有网络与第二私有网络之间的通信通道,实现了跨私有网络的通信功能。
207、第二网络设备接收网关设备的第二数据包,对终端进行鉴权。
可选地,第二网络设备可以具有鉴权的功能,可以校验终端是否具有访问目标区块链节点的权限,当终端具有访问目标区块链节点的权限时,第二网络设备向目标区块链节点发送第二数据包,而当终端不具有访问目标区块链节点的权限时,第二网络设备可以拒绝向目标区块链节点发送第二数据包,例如可以丢弃该第二数据包,又如可以通过网关设备向终端返回失败重传消息,从而控制终端向区块链节点传输数据包的权限。
在一种可能的实现中,鉴权的过程可以基于用户标识与区块链节点之间的第二映射关系实现,即,每个用户标识仅具有访问第二映射关系中对应区块链节点的权限,而不具有访问其他区块链节点的权限。第二映射关系可以包括至少一个用户标识以及对应的至少一个区块链节点,第二映射关系可以根据业务需求确定,例如,对于注册了记账服务的用户标识来说,该用户标识对应的区块链节点可以为银行关联的一个或多个区块链节点。第二映射关系可以为一个列表、数组或集合,当然也可以采用程序语言中的其他数据结构表示。第二网络设备获取第二映射关系的过程与第一网络设备获取第一映射关系的过程同理,在此不做赘述。
基于第二映射关系进行鉴权的具体过程可以包括以下步骤一至步骤四:
步骤一、第二网络设备获取第二数据包携带的用户标识。
第二网络设备可以解析第二数据包,得到第二数据包中携带的用户标识。其中,第二网络设备可以解析第二数据包的重定向包头,从该重定向包头得到用户标识。或者,第二网络设备可以解析第二数据包中第一数据包的包头,从第一数据包的包头中得到用户标识。
步骤二、第二网络设备根据用户标识与区块链节点之间的第二映射关系,从第二映射关系中,得到用户标识对应的至少一个区块链节点。
第二网络设备可以获取第二映射关系,以第二数据包携带的用户标识为索引,查询该第二映射关系,从而得到用户标识对应的至少一个区块链节点。
步骤三、第二网络设备判断目标区块链节点是否属于用户标识对应的至少一个区块链节点。
当目标区块链节点属于用户标识对应的至少一个区块链节点时,第二网络设备执行以下 步骤四,当目标区块链节点不属于用户标识对应的至少一个区块链节点时,第二网络设备执行以下步骤五。
步骤四、当目标区块链节点属于用户标识对应的至少一个区块链节点时,第二网络设备确定终端具有访问目标区块链节点的权限,则鉴权通过,第二网络设备会执行以下步骤208。
步骤五、当目标区块链节点不属于用户标识对应的至少一个区块链节点时,第二网络设备确定终端不具有访问目标区块链节点的权限,则鉴权不通过,第二网络设备会拒绝将第二数据包转发给目标区块链节点。
本步骤中,第二网络设备通过对终端访问目标区块链节点的权限进行校验,当鉴权通过才向目标区块链节点转发数据包,能够保障区块链节点的通信安全,从而避免非法用户入侵区块链节点的情况。
208、第二网络设备从第二数据包中获取目标区块链节点的实际网络地址。
第二网络设备可以具有对数据包进行重定向的功能,能够将发送至该第二网络设备的各个数据包分别重定向至区块链系统中对应的区块链节点,那么,当第二网络设备接收第二数据包后,能够使用重定向的功能,根据第二数据包中目标区块链节点的实际网络地址,将第二数据包转发至目标区块链节点。
关于从第二数据包中获取实际网络地址的方式,第二网络设备可以解析第二数据包,得到第二数据包携带的目标区块链节点的实际网络地址,从而得到了上述步骤204中第一网络设备添加的实际网络地址。其中,若上述步骤204第一网络设备添加了重定向包头,第二网络设备可以解析第二数据包中的重定向包头,得到重定向包头携带的实际网络地址。
209、第二网络设备向目标区块链节点的实际网络地址发送第二数据包。
目标区块链节点的实际网络地址为目标区块链节点在第二私有网络中的内网地址,目标区块链节点的实际网络地址在第二网络设备以及目标区块链节点中预先存储,能够在第二私有网络中标识该目标区块链节点。第二网络设备向目标区块链节点的实际网络地址发送第二数据包后,目标区块链节点即可接收第二数据包。
关于发送第二数据包的具体实现,在此示例性地提供以下实现一和实现二:
实现一、第二网络设备将第二数据包转发给目标区块链节点。
第二网络设备可以具有透传功能,透传是指透明传输,即接收到数据包后,不处理数据包,而是将数据包转发给数据包的目的设备。第二网络设备接收到第二数据包后,可以通过透传功能,不处理该第二数据包,而将第二数据包转发给目标区块链节点。
实现二、第二网络设备对第二数据包进行处理,将处理后的第二数据包转发给目标区块链节点。
例如,第二网络设备可以从第二数据包中删除重定向包头,得到第一数据包,将第一数据包发送给目标区块链节点。
又如,第二网络设备可以从第一数据包中删除第一数据包的包头,将重定向包头以及第一数据包的包体的组合发送给目标区块链节点,作为示例,可以对重定向包头以及第一数据包的包体进行封装,封装后的数据包的包头为重定向包头,封装后的数据包的包体为第一数据包的包体,第二网络设备可以将封装后的数据包作为处理后的第二数据包,将封装后的数据包发送给目标区块链节点。
又如,第二网络设备可以将第二数据包中目标区块链节点的映射端口号修改为目标区块链节点的实际网络地址,将修改后的第二数据包发送给目标区块链节点,作为示例,第二网 络设备可以存储目标区块链节点的映射端口号与目标区块链节点的实际网络地址之间的第四映射关系,当接收到第二数据包后,第二网络设备可以从第二数据包中获取目标区块链节点的映射端口号,根据目标区块链节点的映射端口号,查询第四映射关系,得到目标区块链节点的映射端口号对应的目标区块链节点的实际网络地址。
其中,第二网络设备处理第二数据包的具体逻辑可以根据实际业务需求确定,本实施例对此不做限定。
通过这种实现方式,第二网络设备可以实现透明代理的功能:第二网络设备对第二数据包进行处理后,目标区块链节点接收到第二数据包后,识别第二数据包的源地址为终端的网络地址,目的地址为自己的网络地址,因此不会感知到经过重定向的第二数据包与向自身直接发送的数据包之间的差异,也即是,目标区块链节点无需感知第一网络设备、第二网络设备以及网关设备的存在,对于目标区块链节点来说,第一网络设备、第二网络设备以及网关设备是透明的。
210、目标区块链节点根据实际网络地址,接收第二数据包。
目标区块链节点可以接收第二数据包,根据第二数据包进行业务处理。例如,以第二数据包的内容为账本数据为例,目标区块链节点可以解析第二数据包,得到账本数据,在区块链中记录账本数据,将该账本数据同步给区块链系统中的其他区块链节点。
本实施例提供的方法,第一网络设备通过在发往目标区块链节点的数据包中,添加目标区块链节点的实际网络地址,只需向第二网络设备的虚拟地址发送数据包,既能将数据包通过网关设备以及第二网络设备,转发至目标区块链节点,在满足第一私有网络中的终端与第二私有网络中各个区块链节点分别进行通信的需求的基础上,网关设备无需为各个区块链节点分别生成虚拟网络地址,极大地节省了网关设备的处理资源,减轻了网关设备的运行开销,节省了网关设备的存储空间,从而保证网关设备正常运行。
上述图2实施例阐述了终端与目标区块链节点进行信息交互的过程,而在这一过程之前,可以预先对各个设备进行网络配置,通过网络配置打通网络通信的通道,以便各个设备在已配置完成的基础上,实现上述图2实施例。
以下通过图4实施例对网络配置的过程进行具体阐述。
图4是本申请实施例提供的一种网络配置方法的流程图,参见图4,该方法的执行主体包括网关设备、区块链的OSS系统以及第一网络设备,该方法包括以下步骤:
401、当区块链系统中注册用户标识时,网关设备为该用户标识,生成第二网络设备的虚拟网络地址。
本步骤以区块链系统中注册了新用户的场景为例进行描述,即,某一用户在区块链系统中进行了注册,要求区块链系统中的区块链节点为其提供服务,例如某一用户在金融应用中进行注册,要求金融应用关联的区块链系统为该用户记录每笔交易的账本数据。
关于网关设备获取注册的用户标识的方式,终端可以生成户标识注册请求,向网关设备发送用户标识注册请求,网关设备可以接收终端的用户标识注册请求,该用户标识注册请求用于请求在区块链系统中注册新用户的用户标识,网络设备可以从该用户标识注册请求中得到用户标识,确定该用户标识加入区块链系统。其中,用户标识用于标识私有网络的用户,例如可以用于标识私有网络的开发者、管理员,或者其他具有在私有网络中进行通信的权限的用户,该用户标识可以为用户的名称、手机号码等。
针对用户标识注册请求的触发过程,在一种可能的实现中,网关设备的OSS系统可以检 测输入操作,得到输入的用户标识以及第二网络设备的实际网络地址,网关设备的OSS系统根据用户标识以及第二网络设备的实际网络地址生成用户标识注册请求,向网关设备发送用户标识注册请求,网关设备从而接收到用户标识注册请求,其中,该用户标识可以为用户的VPC身份标识号(IDentity,ID)。在另一种可能的实现中,终端可以发送用户标识注册请求,网关设备可以接收到终端的用户标识注册请求。
关于生成虚拟网络地址的方式,在一种可能的实现中,网关设备可以存储多个虚拟网络地址,可以从当前未占用的虚拟网络地址中选择一个虚拟网络地址,将该虚拟网络地址分配给第二网络设备,从而达到为第二网络设备生成虚拟网络地址的效果。例如,当前未占用的虚拟网络地址可以按照地址从小到大的顺序或从大到小的顺序排列,网关设备可以选择当前未占用的虚拟网络地址中的第一个虚拟网络地址,作为第二网络设备的虚拟网络地址。
可选地,网关设备可以将生成的第二网络设备的虚拟网络地址发送给区块链的OSS系统,例如第二网络设备的虚拟网络地址可以在网关设备与OSS系统之间保持数据同步,当网关设备生成第二网络设备的虚拟网络地址后,区块链的OSS系统可以同步地记录第二网络设备的虚拟网络地址。
可选地,区块链的OSS系统还可以在新用户加入区块链系统时,确定该用户标识关联的区块链节点,记录用户标识与区块链节点之间的第二映射关系,将记录的第二映射关系发送给第二网络设备,以便第二网络设备得到第二映射关系,从而在上述步骤207中,根据该第二映射关系执行鉴权的过程。
402、区块链的OSS系统为用户关联的至少一个区块链节点,生成至少一个映射端口号。
对于用户关联的每个区块链节点,区块链的OSS系统可以生成该区块链节点对应的映射端口号,其中为不同区块链节点生成的映射端口号可以不同,以便第一网络设备可以根据每个映射端口号识别发往每个区块链节点的数据包。
403、区块链的OSS系统将至少一个区块链节点的映射端口号以及第二网络设备的虚拟网络地址发送给第一网络设备。
区块链的OSS系统可以确定用户标识对应的私有网络,并确定私有网络中布设的网络设备,将区块链节点的映射端口以及第二网络设备的虚拟网络地址发送给该网络设备。其中,若用户标识为第一私有网络的用户标识,则区块链的OSS系统会确定第一私有网络以及第一网络设备,将区块链节点的映射端口以及第二网络设备的虚拟网络地址发送给第一网络设备。
通过将区块链节点的映射端口以及第二网络设备的虚拟网络地址发送给用户标识对应的网络设备,考虑了用户与区块链节点之间的实际关联,第一网络设备只需监听用户标识关联的区块链节点对应的映射端口即可,而无需监听整个区块链系统中各个区块链节点对应的映射端口,从而减少了第一网络设备中占用的映射端口的数量,节约了第一网络设备的处理资源以及存储空间,同时减轻了第一网络设备监听过程的运行负载,从而减少了能量消耗。
404、第一网络设备接收区块链系统中区块链节点对应的映射端口号以及第二网络设备的虚拟网络地址。
405、第一网络设备将每个映射端口号对应的端口,作为区块链节点对应的映射端口,启动监听至少一个映射端口。
对于该至少一个端口号中的每个端口号,第一网络设备可以开启本机中该端口号对应的端口,将该端口作为对应区块链节点的映射端口,即将该端口分配为向对应区块链节点发送数据包的端口,并监听该映射端口,以便上述步骤402中可以在监听过程中接收数据包。
需要说明的是,上述仅是以采用全量更新的方式,生成区块链系统中每个区块链节点对应的映射端口号为例进行描述。在一种可能的实现中,还可以采用增量更新的方式,生成区块链系统中新增的区块链节点对应的映射端口号。即,每当区块链系统中新增了区块链节点时,区块链的OSS系统只需生成新增的区块链节点对应的映射端口号,向第一网络设备发送新增的区块链节点对应的映射端口号即可,而无需为之前已生成映射端口号的区块链节点再次生成映射端口号。相应地,第一网络设备会接收新增的区块链节点对应的映射端口号,为新增的区块链节点启动监听对应的映射端口。
在一个示例性应用场景中,随着区块链的应用范围不断深入扩展,越来越多的服务方加入区块链合约,则区块链系统的规模与日俱增,区块链系统经常会新增区块链节点。为此,每当区块链系统注册了用户标识时,区块链的OSS系统可以为该用户标识生成每个区块链节点对应的映射端口号,之后,每当区块链系统中新增了区块链节点时,则区块链的OSS系统为该用户标识,生成新增的区块链节点对应的映射端口号。
通过这种更新映射端口号的方式,第一,在区块链系统中不断增加区块链节点的情况下,能够保证已注册的用户标识不仅能向注册时区块链系统中存在的区块链节点发送数据包,还能向注册后新增的区块链节点发送数据包。第二,每当区块链系统中新增区块链节点时,区块链的OSS系统无需为已生成过映射端口号的区块链节点再次生成映射端口号,减轻了区块链的OSS系统的运算量以及负载。
请参见图5,图5是本申请实施例提供的一种网络配置的示意图,网关设备的OSS系统生成第二网络设备的虚拟网络地址以后,可以将第二网络设备的虚拟网络地址发送给区块链的OSS系统,由区块链的OSS系统将第二网络设备的虚拟网络地址发送给每个私有网络的转发代理(即第一网络设备)以及区块链系统的透明代理(即第二网络设备)。
本实施例提供的方法,在新用户加入区块链系统,或老用户新关联区块链系统中的区块链节点时,为区块链节点生成对应的映射端口,并对每个设备进行网络配置,能够打通不同私有网络之间的通信通道,以便第一私有网络中的终端能将数据包发送给第二私有网络中的区块链节点,从而满足用户访问区块链节点的需求。
图6是本申请实施例提供的一种网络通信装置的结构示意图,该装置应用于第一私有网络中的第一网络设备中,该装置包括:接收模块601、获取模块602、生成模块603以及发送模块604。
接收模块601,用于接收向第二私有网络中的目标区块链节点发送的第一数据包;获取模块602,用于获取该目标区块链节点的实际网络地址,该实际网络地址为该目标区块链节点在该第二私有网络中的内网地址;生成模块603,用于根据该第一数据包以及该实际网络地址,生成第二数据包,该第二数据包携带该第一数据包以及该实际网络地址;发送模块604,用于向该第二私有网络中的第二网络设备的虚拟网络地址发送该第二数据包,该虚拟网络地址用于供网关设备将接收到的数据包转发给该第二网络设备。
在一种可能的实现方式中,该生成模块603,用于生成携带该实际网络地址的重定向包头;向该第一数据包添加该重定向包头,得到第二数据包。
在一种可能的实现方式中,该获取模块602,用于获取该第一数据包携带的映射端口号;查询区块链节点的映射端口号与实际网络地址之间的第一映射关系,得到该映射端口号对应的实际网络地址;将该映射端口号对应的实际网络地址作为该目标区块链节点的实际网络地址。
在一种可能的实现方式中,该接收模块601,用于在监听该目标区块链节点对应的映射端口的过程中,接收该第一数据包。
在一种可能的实现方式中,该接收模块601,用于接收区块链系统中区块链节点对应的映射端口号;将该第一网络设备中该映射端口号对应的端口,作为该区块链节点对应的映射端口;启动监听该映射端口号对应的端口。
图7是本申请实施例提供的一种网络通信装置的结构示意图。参见图7,该装置包括:接收模块701、获取模块702以及发送模块703。
接收模块701,用于接收网关设备的第二数据包,该第二数据包携带第一私有网络中终端的第一数据包以及第二私有网络中目标区块链节点的实际网络地址,该实际网络地址为该目标区块链节点在该第二私有网络中的内网地址;获取模块702,用于从该第二数据包中获取该实际网络地址;发送模块703,用于根据该实际网络地址,向该目标区块链节点发送该第一数据包。
在一种可能的实现方式中,该获取模块702,用于解析该第二数据包中的重定向包头,得到该重定向包头携带的实际网络地址。
在一种可能的实现方式中,该发送模块703,用于当该终端具有访问该目标区块链节点的权限时,向该目标区块链节点的实际网络地址发送该第二数据包。
在一种可能的实现方式中,该获取模块702,用于获取该第二数据包携带的用户标识;该装置还包括鉴权模块,用于查询用户标识与区块链节点之间的第二映射关系,得到该用户标识对应的至少一个区块链节点;当该目标区块链节点属于该至少一个区块链节点时,确定该终端具有访问该目标区块链节点的权限。
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。
需要说明的是:上述实施例提供的网络通信装置在进行网络通信时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将第一网络设备、第二网络设备中的至少一项的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的网络通信装置与网络通信方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图8是本申请实施例提供的一种网络设备的结构示意图,该网络设备800可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)801、一个或一个以上的存储器802以及收发器803,其中,该存储器802中存储有至少一条指令,该至少一条指令由该处理器801加载并执行以实现上述各个方法实施例提供的方法,该处理器801用于控制收发器803执行上述实施例中的收发步骤。当然,该网络设备还可以具有有线或无线网络接口以及输入输出接口等部件,以便进行输入输出,该网络设备还可以包括其他用于实现设备功能的部件,在此不做赘述。
具体地,上述指令可以由网络设备800的处理器加载并执行以下网络通信方法:该收发器用于接收向第二私有网络中的目标区块链节点发送的第一数据包;该处理器用于获取该目标区块链节点的实际网络地址,该实际网络地址为该目标区块链节点在该第二私有网络中的内网地址;该处理器用于根据该第一数据包以及该实际网络地址,生成第二数据包,该第二数据包携带该第一数据包以及该实际网络地址;该收发器用于向该第二私有网络中的第二网络设备的虚拟网络地址,发送该第二数据包,该虚拟网络地址用于供网关设备将接收到的数 据包转发给该第二网络设备。
在一种可能的实现中,该处理器用于生成携带该实际网络地址的重定向包头;向该第一数据包添加该重定向包头,得到第二数据包。
在一种可能的实现中,该处理器用于获取该第一数据包携带的映射端口号;查询区块链节点的映射端口号与实际网络地址之间的第一映射关系,得到该映射端口号对应的实际网络地址;将该映射端口号对应的实际网络地址作为该目标区块链节点的实际网络地址。
在一种可能的实现中,该收发器用于在监听该目标区块链节点对应的映射端口的过程中,接收该第一数据包。
在一种可能的实现中,该处理器用于接收区块链系统中区块链节点对应的映射端口号;将该第一网络设备中该映射端口号对应的端口,作为该区块链节点对应的映射端口;启动监听该映射端口号对应的端口。
具体地,上述指令可以由网络设备800的处理器加载并执行以下网络通信方法:
该收发器用于接收网关设备的第二数据包,该第二数据包携带向第二私有网络中的目标区块链节点发送的第一数据包以及该目标区块链节点的实际网络地址,该实际网络地址为该目标区块链节点在该第二私有网络中的内网地址;该处理器用于从该第二数据包中获取该实际网络地址;该收发器用于向该目标区块链节点的实际网络地址发送该第二数据包。
在一种可能的实现中,该处理器用于解析该第二数据包中的重定向包头,得到该重定向包头携带的实际网络地址。
在一种可能的实现中,该处理器用于当该终端具有访问该目标区块链节点的权限时,向该目标区块链节点的实际网络地址发送该第二数据包。
在一种可能的实现中,该处理器用于获取该第二数据包携带的用户标识;查询用户标识与区块链节点之间的第二映射关系,得到该用户标识对应的至少一个区块链节点;当该目标区块链节点属于该至少一个区块链节点时,确定该终端具有访问该目标区块链节点的权限。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,例如,该计算机可读存储介质可以是只读存储器(英文全称:read-only memory,英文简称:ROM)、随机存取存储器(英文全称:random access memory,英文简称:RAM)、只读光盘(英文全称:compact disc read-only memory,英文简称:CD-ROM)、磁带、软盘和光数据存储设备等。具体来说,指令可由处理器执行以完成下述网络通信方法:
接收向第二私有网络中的目标区块链节点发送的第一数据包;获取该目标区块链节点的实际网络地址,该实际网络地址为该目标区块链节点在该第二私有网络中的内网地址;根据该第一数据包以及该实际网络地址,生成第二数据包,该第二数据包携带该第一数据包以及该实际网络地址;向该第二私有网络中的第二网络设备的虚拟网络地址,发送该第二数据包,该虚拟网络地址用于供网关设备将接收到的数据包转发给该第二网络设备。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,例如,该计算机可读存储介质可以是ROM、RAM、CD-ROM、磁带、软盘和光数据存储设备等。具体来说,指令可由处理器执行以完成下述网络通信方法:
接收网关设备的第二数据包,该第二数据包携带向第二私有网络中的目标区块链节点发送的第一数据包以及该目标区块链节点的实际网络地址,该实际网络地址为该目标区块链节点在该第二私有网络中的内网地址;从该第二数据包中获取该实际网络地址;向该目标区块链节点的实际网络地址发送该第二数据包。
在一种可能的实现方式中,该根据该第一数据包以及该实际网络地址,生成第二数据包,包括:生成携带该实际网络地址的重定向包头;向该第一数据包添加该重定向包头,得到第二数据包。
在一种可能的实现方式中,该获取该目标区块链节点的实际网络地址,包括:获取该第一数据包携带的映射端口号;查询区块链节点的映射端口号与实际网络地址之间的第一映射关系,得到该映射端口号对应的实际网络地址;将该映射端口号对应的实际网络地址作为该目标区块链节点的实际网络地址。
在一种可能的实现方式中,该接收向第二私有网络中的目标区块链节点发送的第一数据包,包括:在监听该目标区块链节点对应的映射端口的过程中,接收该第一数据包。
在一种可能的实现方式中,该接收向第二私有网络中的目标区块链节点发送的第一数据包之前,该方法还包括:接收区块链系统中区块链节点对应的映射端口号;将该第一网络设备中该映射端口号对应的端口,作为该区块链节点对应的映射端口;启动监听该映射端口号对应的端口。
在一种可能的实现方式中,该从该第二数据包中获取该实际网络地址,包括:解析该第二数据包中的重定向包头,得到该重定向包头携带的实际网络地址。
在一种可能的实现方式中,该向该目标区块链节点的实际网络地址发送该第二数据包,包括:当该终端具有访问该目标区块链节点的权限时,向该目标区块链节点的实际网络地址发送该第二数据包。
在一种可能的实现方式中,该向该目标区块链节点的实际网络地址发送该第二数据包之前,该方法还包括:获取该第二数据包携带的用户标识;查询用户标识与区块链节点之间的第二映射关系,得到该用户标识对应的至少一个区块链节点;当该目标区块链节点属于该至少一个区块链节点时,确定该终端具有访问该目标区块链节点的权限。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上该仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种网络通信方法,应用于第一私有网络中的第一网络设备中,所述方法包括:
    所述第一网络设备接收向第二私有网络中的目标区块链节点发送的第一数据包;
    所述第一网络设备获取所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
    所述第一网络设备根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;
    所述第一网络设备向所述第二私有网络中的第二网络设备的虚拟网络地址,发送所述第二数据包,所述虚拟网络地址用于供网关设备将接收到的数据包转发给所述第二网络设备。
  2. 根据权利要求1所述的方法,其中,所述第一网络设备根据所述第一数据包以及所述实际网络地址,生成第二数据包,包括:
    所述第一网络设备生成携带所述实际网络地址的重定向包头;
    所述第一网络设备向所述第一数据包添加所述重定向包头,得到第二数据包。
  3. 根据权利要求1所述的方法,其中,所述第一网络设备获取所述目标区块链节点的实际网络地址,包括:
    所述第一网络设备获取所述第一数据包携带的映射端口号;
    所述第一网络设备查询区块链节点的映射端口号与实际网络地址之间的第一映射关系,得到所述映射端口号对应的实际网络地址;
    所述第一网络设备将所述映射端口号对应的实际网络地址作为所述目标区块链节点的实际网络地址。
  4. 根据权利要求1至3任一项所述的方法,其中,所述第一网络设备接收向第二私有网络中的目标区块链节点发送的第一数据包,包括:
    在所述第一网络设备监听所述目标区块链节点对应的映射端口的过程中,所述第一网络设备接收所述第一数据包。
  5. 根据权利要求4所述的方法,其中,所述第一网络设备接收向第二私有网络中的目标区块链节点发送的第一数据包之前,所述方法还包括:
    所述第一网络设备接收区块链系统中区块链节点对应的映射端口号;
    所述第一网络设备将所述第一网络设备中所述映射端口号对应的端口,作为所述区块链节点对应的映射端口;
    所述第一网络设备启动监听所述映射端口号对应的端口。
  6. 一种网络通信方法,应用于第二私有网络中的第二网络设备中,所述方法包括:
    所述第二网络设备接收网关设备的第二数据包,所述第二数据包携带向第二私有网络中的目标区块链节点发送的第一数据包以及所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
    所述第二网络设备从所述第二数据包中获取所述实际网络地址;
    所述第二网络设备向所述目标区块链节点的实际网络地址发送所述第二数据包。
  7. 根据权利要求6所述的方法,其中,所述第二网络设备从所述第二数据包中获取所述实际网络地址,包括:
    所述第二网络设备解析所述第二数据包中的重定向包头,得到所述重定向包头携带的实际网络地址。
  8. 根据权利要求6所述的方法,其中,所述第二网络设备向所述目标区块链节点的实际网络地址发送所述第二数据包,包括:
    当所述终端具有访问所述目标区块链节点的权限时,所述第二网络设备向所述目标区块链节点的实际网络地址发送所述第二数据包。
  9. 根据权利要求8所述的方法,其中,所述第二网络设备向所述目标区块链节点的实际网络地址发送所述第二数据包之前,所述方法还包括:
    所述第二网络设备获取所述第二数据包携带的用户标识;
    所述第二网络设备查询用户标识与区块链节点之间的第二映射关系,得到所述用户标识对应的至少一个区块链节点;
    当所述目标区块链节点属于所述至少一个区块链节点时,所述第二网络设备确定所述终端具有访问所述目标区块链节点的权限。
  10. 一种网络通信系统,所述网络通信系统包括第一私有网络中的第一网络设备、第二私有网络中的第二网络设备以及网关设备;
    所述第一网络设备,用于接收向第二私有网络中的目标区块链节点发送的第一数据包;获取所述目标区块链节点的实际网络地址,所述目标区块链节点的实际网络地址为目标区块链节点在所述第二私有网络中的内网地址;根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;向所述第二网络设备的虚拟网络地址发送所述第二数据包;
    所述网关设备,用于根据所述第二网络设备的虚拟网络地址,查询虚拟网络地址与实际网络地址之间的第三映射关系,得到所述虚拟网络地址对应的实际网络地址,作为所述第二网络设备的实际网络地址;向所述第二网络设备的实际网络地址发送所述第二数据包;
    所述第二网络设备,用于接收所述网关设备的第二数据包;从所述第二数据包中获取目标区块链节点的实际网络地址;根据所述实际网络地址,向所述目标区块链节点的实际网络地址发送所述第二数据包。
  11. 一种网络设备,所述网络设备包括处理器、存储器和收发器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现以下网络通信方法:
    所述收发器用于接收向第二私有网络中的目标区块链节点发送的第一数据包;
    所述处理器用于获取所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
    所述处理器用于根据所述第一数据包以及所述实际网络地址,生成第二数据包,所述第二数据包携带所述第一数据包以及所述实际网络地址;
    所述收发器用于向所述第二私有网络中的第二网络设备的虚拟网络地址,发送所述第二数据包,所述虚拟网络地址用于供网关设备将接收到的数据包转发给所述第二网络设备。
  12. 根据权利要求11所述的网络设备,其中,所述处理器用于生成携带所述实际网络地址的重定向包头;向所述第一数据包添加所述重定向包头,得到第二数据包。
  13. 根据权利要求11所述的网络设备,其中,所述处理器用于获取所述第一数据包携带的映射端口号;查询区块链节点的映射端口号与实际网络地址之间的第一映射关系,得到所 述映射端口号对应的实际网络地址;将所述映射端口号对应的实际网络地址作为所述目标区块链节点的实际网络地址。
  14. 根据权利要求11至13任一项所述的网络设备,其中,所述收发器用于在监听所述目标区块链节点对应的映射端口的过程中,接收所述第一数据包。
  15. 根据权利要求14所述的网络设备,其中,所述处理器用于接收区块链系统中区块链节点对应的映射端口号;将所述第一网络设备中所述映射端口号对应的端口,作为所述区块链节点对应的映射端口;启动监听所述映射端口号对应的端口。
  16. 一种网络设备,所述网络设备包括处理器、存储器和收发器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现以下网络通信方法:
    所述收发器用于接收网关设备的第二数据包,所述第二数据包携带向第二私有网络中的目标区块链节点发送的第一数据包以及所述目标区块链节点的实际网络地址,所述实际网络地址为所述目标区块链节点在所述第二私有网络中的内网地址;
    所述处理器用于从所述第二数据包中获取所述实际网络地址;
    所述收发器用于向所述目标区块链节点的实际网络地址发送所述第二数据包。
  17. 根据权利要求16所述的网络设备,其中,所述处理器用于解析所述第二数据包中的重定向包头,得到所述重定向包头携带的实际网络地址。
  18. 根据权利要求16所述的网络设备,其中,所述处理器用于当所述终端具有访问所述目标区块链节点的权限时,向所述目标区块链节点的实际网络地址发送所述第二数据包。
  19. 根据权利要求18所述的网络设备,其中,所述处理器用于获取所述第二数据包携带的用户标识;查询用户标识与区块链节点之间的第二映射关系,得到所述用户标识对应的至少一个区块链节点;当所述目标区块链节点属于所述至少一个区块链节点时,确定所述终端具有访问所述目标区块链节点的权限。
  20. 一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如权利要求1至权利要求9任一项所述的网络通信方法所执行的操作。
PCT/CN2019/078547 2018-04-20 2019-03-18 网络通信方法、系统、设备及存储介质 WO2019201043A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/932,585 US11271892B2 (en) 2018-04-20 2020-07-17 Network communication method and system, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810362776.6 2018-04-20
CN201810362776.6A CN108650182B (zh) 2018-04-20 2018-04-20 网络通信方法、系统、装置、设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/932,585 Continuation US11271892B2 (en) 2018-04-20 2020-07-17 Network communication method and system, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2019201043A1 true WO2019201043A1 (zh) 2019-10-24

Family

ID=63746887

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/078547 WO2019201043A1 (zh) 2018-04-20 2019-03-18 网络通信方法、系统、设备及存储介质

Country Status (3)

Country Link
US (1) US11271892B2 (zh)
CN (2) CN108650182B (zh)
WO (1) WO2019201043A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511522A (zh) * 2020-11-24 2021-03-16 和中通信科技有限公司 探测扫描中减少内存占用的方法、装置和设备

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650182B (zh) 2018-04-20 2020-09-25 腾讯科技(深圳)有限公司 网络通信方法、系统、装置、设备及存储介质
CN109684797B (zh) * 2018-11-21 2020-10-20 众安信息技术服务有限公司 基于区块链的对抗网络生成图片的虚拟ip保护方法及系统
CN111262771B (zh) * 2018-11-30 2021-06-22 北京金山云网络技术有限公司 虚拟私有云通信系统、系统配置方法及控制器
CN110245193A (zh) * 2019-06-24 2019-09-17 中云(广州)区块链科技有限公司 基于区块链的数据分布式存入和数据检索方法
US11411771B1 (en) * 2019-06-28 2022-08-09 Amazon Technologies, Inc. Networking in provider network substrate extensions
US11431497B1 (en) 2019-06-28 2022-08-30 Amazon Technologies, Inc. Storage expansion devices for provider network substrate extensions
US11374789B2 (en) * 2019-06-28 2022-06-28 Amazon Technologies, Inc. Provider network connectivity to provider network substrate extensions
US11659058B2 (en) 2019-06-28 2023-05-23 Amazon Technologies, Inc. Provider network connectivity management for provider network substrate extensions
US11044118B1 (en) 2019-06-28 2021-06-22 Amazon Technologies, Inc. Data caching in provider network substrate extensions
CN110474884B (zh) * 2019-07-24 2024-04-23 北京百度网讯科技有限公司 以太坊网络系统及通信方法、设备及计算机可读存储介质
CN110519277B (zh) * 2019-08-29 2020-08-21 上海威尔立杰网络科技发展有限公司 一种基于单点执行合约实现控制其它系统的方法
CN112560077A (zh) * 2019-09-10 2021-03-26 北京国双科技有限公司 一种访问控制方法、装置及系统
US11606191B2 (en) * 2019-09-13 2023-03-14 At&T Intellectual Property I, L.P. Methods, systems, and devices for configuring a federated blockchain network
CN111131399B (zh) * 2019-12-03 2021-11-26 北京海益同展信息科技有限公司 一种区块链中共识节点动态增加方法及装置
CN111465001B (zh) * 2020-04-01 2023-05-02 中国联合网络通信集团有限公司 一种注册方法及装置
US11394717B2 (en) * 2020-04-03 2022-07-19 Kyndryl, Inc. Digitally secure transactions over public networks
CN113542091B (zh) * 2020-04-15 2022-07-19 阿里巴巴集团控股有限公司 通信和访问控制方法、设备、装置、系统及存储介质
CN112307445B (zh) * 2020-09-30 2021-08-10 深圳百纳维科技有限公司 一种基于区块链的身份管理方法及装置
US20220150570A1 (en) * 2020-11-06 2022-05-12 Charter Communications Operating, Llc Apparatus and methods for digital ledger-based integrated interactive digital tv applications
CN114500462A (zh) * 2020-11-12 2022-05-13 阿里巴巴集团控股有限公司 虚拟私有云网络地址分配方法、装置、电子设备及介质
CN112565475B (zh) * 2020-12-01 2023-07-11 成都精灵云科技有限公司 容器集群业务层添加新节点的ip地址分配方法
CN112738284B (zh) * 2021-04-01 2021-06-04 腾讯科技(深圳)有限公司 服务集成中的数据传输方法、装置、设备及存储介质
CN114157640B (zh) * 2022-02-10 2022-05-31 北京中宇万通科技股份有限公司 用于区块链通信系统的方法、控制器与代理装置
WO2024040512A1 (zh) * 2022-08-25 2024-02-29 华为技术有限公司 区块链的创建方法及相关装置
CN116156011B (zh) * 2023-04-18 2023-07-04 安徽中科锟铻量子工业互联网有限公司 一种应用于量子网关的通信天线
CN116708043B (zh) * 2023-08-08 2023-11-10 南京赛宁信息技术有限公司 一种网络靶场中用户流量追踪方法与系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850876A (zh) * 2017-02-28 2017-06-13 浙江宇视科技有限公司 基于相同ip地址的网络设备访问方法及装置
CN107872542A (zh) * 2016-09-27 2018-04-03 阿里巴巴集团控股有限公司 一种数据传输的方法及网络设备
CN108650182A (zh) * 2018-04-20 2018-10-12 腾讯科技(深圳)有限公司 网络通信方法、系统、装置、设备及存储介质

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8166187B2 (en) * 2009-01-28 2012-04-24 Cisco Technology, Inc. Distributed IP gateway based on sharing a MAC address and IP address concurrently between a first network switching device and a second network switching device
US8549120B2 (en) * 2010-06-28 2013-10-01 Cisco Technology, Inc. System and method for location based address assignment in the distribution of traffic in a virtual gateway
CN102387061B (zh) * 2011-10-21 2014-05-07 华为技术有限公司 虚拟私云接入虚拟专用网的方法、装置和系统
CN105262685B (zh) * 2014-07-14 2018-10-09 新华三技术有限公司 一种报文处理方法和装置
US10348556B2 (en) * 2016-06-02 2019-07-09 Alibaba Group Holding Limited Method and network infrastructure for a direct public traffic connection within a datacenter
JP2017224895A (ja) * 2016-06-13 2017-12-21 富士通株式会社 通信制御プログラム、通信制御方法及び通信制御装置
CN106559511B (zh) * 2016-10-18 2019-05-24 优刻得科技股份有限公司 云系统、云端公共服务系统及用于云系统的互访方法
CN106789367A (zh) * 2017-02-23 2017-05-31 郑州云海信息技术有限公司 一种网络系统的构建方法及装置
US11157900B2 (en) * 2017-03-24 2021-10-26 Mastercard International Incorporated Method and system for offline data transfer via machine-readable code
CN107172120B (zh) * 2017-03-27 2022-06-28 联想(北京)有限公司 信息处理方法、处理节点及网络节点
US10255342B2 (en) * 2017-04-12 2019-04-09 Vijay K. Madisetti Method and system for tuning blockchain scalability, decentralization, and security for fast and low-cost payment and transaction processing
CN107911421B (zh) * 2017-10-30 2020-05-15 上海点融信息科技有限责任公司 用于配置区块链中跨网络通信的方法、设备和计算机存储介质
US10992533B1 (en) * 2018-01-30 2021-04-27 Pure Storage, Inc. Policy based path management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872542A (zh) * 2016-09-27 2018-04-03 阿里巴巴集团控股有限公司 一种数据传输的方法及网络设备
CN106850876A (zh) * 2017-02-28 2017-06-13 浙江宇视科技有限公司 基于相同ip地址的网络设备访问方法及装置
CN108650182A (zh) * 2018-04-20 2018-10-12 腾讯科技(深圳)有限公司 网络通信方法、系统、装置、设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511522A (zh) * 2020-11-24 2021-03-16 和中通信科技有限公司 探测扫描中减少内存占用的方法、装置和设备

Also Published As

Publication number Publication date
US20200351235A1 (en) 2020-11-05
CN110351191B (zh) 2020-12-11
US11271892B2 (en) 2022-03-08
CN108650182B (zh) 2020-09-25
CN110351191A (zh) 2019-10-18
CN108650182A (zh) 2018-10-12

Similar Documents

Publication Publication Date Title
WO2019201043A1 (zh) 网络通信方法、系统、设备及存储介质
CN112470436B (zh) 用于提供多云连通性的系统、方法、以及计算机可读介质
US11362986B2 (en) Resolution of domain name requests in heterogeneous network environments
CN112511611B (zh) 节点集群的通信方法、装置、系统及电子设备
US6941366B2 (en) Methods, systems and computer program products for transferring security processing between processors in a cluster computing environment
US8972475B2 (en) Network secure communications in a cluster computing environment
US7146432B2 (en) Methods, systems and computer program products for providing failure recovery of network secure communications in a cluster computing environment
US8767737B2 (en) Data center network system and packet forwarding method thereof
US7426566B2 (en) Methods, systems and computer program products for security processing inbound communications in a cluster computing environment
WO2018028606A1 (zh) 转发策略配置
WO2018059284A1 (zh) 一种数据传输的方法及网络设备
CN111612466B (zh) 一种共识和资源传输方法、设备及存储介质
EP3598705B1 (en) Routing control
WO2010020151A1 (zh) 报文处理方法、装置和系统
CN107094110B (zh) 一种dhcp报文转发方法及装置
CN109151916B (zh) 移动网络业务的网络传输方法、装置和系统
US10237235B1 (en) System for network address translation
JP2017147733A (ja) DiameterシグナリングルータにおいてDiameterメッセージをルーティングするための方法、システムおよびコンピュータ読取可能媒体
WO2024067338A1 (zh) 云组网系统、安全访问方法、设备及存储介质
CN114006909A (zh) 一种私有云租户间点对点单向动态专线连接的方法及系统
CN114095507A (zh) 跨链交互方法和区块链系统
US8036218B2 (en) Technique for achieving connectivity between telecommunication stations
WO2014169439A1 (zh) 实现FCoE的方法、装置和系统
US20210051076A1 (en) A node, control system, communication control method and program
CN111541651A (zh) 一种通信方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19789130

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19789130

Country of ref document: EP

Kind code of ref document: A1