WO2020259459A1 - 一种通信方法以及相关设备 - Google Patents

一种通信方法以及相关设备 Download PDF

Info

Publication number
WO2020259459A1
WO2020259459A1 PCT/CN2020/097569 CN2020097569W WO2020259459A1 WO 2020259459 A1 WO2020259459 A1 WO 2020259459A1 CN 2020097569 W CN2020097569 W CN 2020097569W WO 2020259459 A1 WO2020259459 A1 WO 2020259459A1
Authority
WO
WIPO (PCT)
Prior art keywords
cone
network information
symmetric
message
mapping relationship
Prior art date
Application number
PCT/CN2020/097569
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 华为技术有限公司
Priority to EP20830956.7A priority Critical patent/EP3962030A4/en
Priority to JP2021576477A priority patent/JP7401564B2/ja
Priority to US17/615,324 priority patent/US20220224670A1/en
Publication of WO2020259459A1 publication Critical patent/WO2020259459A1/zh

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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2517Translation of Internet protocol [IP] addresses using port numbers
    • 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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • H04L61/2575NAT traversal using address mapping retrieval, e.g. simple traversal of user datagram protocol through session traversal utilities for NAT [STUN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W60/00Affiliation to network, e.g. registration; Terminating affiliation with the network, e.g. de-registration
    • H04W60/04Affiliation to network, e.g. registration; Terminating affiliation with the network, e.g. de-registration using triggered events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/12Setup of transport tunnels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • 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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2514Translation of Internet protocol [IP] addresses between local and global IP addresses
    • 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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • H04L61/2567NAT traversal for reachability, e.g. inquiring the address of a correspondent behind a NAT server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4535Network directories; Name-to-address mapping using an address exchange platform which sets up a session between two nodes, e.g. rendezvous servers, session initiation protocols [SIP] registrars or H.323 gatekeepers

Definitions

  • This application relates to the field of communication, and in particular to a communication method and related equipment.
  • IPv4 Internet Protocol Version 4
  • IP address translation network address translation
  • NAT network address translation
  • NAT traversal scenarios there are four scenarios: full cone NAT, restricted cone NAT, port restricted cone NAT, and symmetric NAT.
  • the port-restricted cone NAT device and the symmetric NAT device need to use the traversal using relays around NAT (TURN) technology.
  • the data exchange between the port-restricted cone NAT device and the symmetric NAT device requires data forwarding through the server.
  • the embodiment of the present application provides a communication method and related equipment.
  • a symmetrical device listens to N local public ports, and when a hole punching message from a cone-shaped device is received in these N local public ports, it sends to the cone-shaped device A response message, where the response message carries the first network information mapping relationship, and the cone device can establish a communication connection with the symmetric device according to the first network information mapping relationship.
  • Cone devices can directly communicate with symmetrical devices, eliminating the need for servers that function as data relays, and reducing the cost of deploying servers.
  • an embodiment of the present application provides a communication method.
  • the method includes: a symmetric device listens to N local public ports, where N is a natural number greater than 1; when the symmetric device receives hole punching in N local public ports When sending a message, the symmetrical device sends a response message to the cone-shaped device according to the hole-punching message, so that the symmetrical device and the cone-shaped device establish a communication connection.
  • the hole-punching message comes from the cone-shaped device, and the response message carries the first network.
  • Information mapping relationship includes the first public Internet Protocol IP address of the symmetric device and the first public port number of the symmetric device.
  • the symmetric device monitors N local public ports, and when receiving a hole punching message from the cone-shaped device in these N local public ports, it sends a response message to the cone-shaped device.
  • the response message is Carrying the first network information mapping relationship, the cone-shaped device can establish a communication connection with the symmetric device according to the first network information mapping relationship.
  • Cone devices can directly communicate with symmetrical devices, eliminating the need for servers that function as data relays, and reducing the cost of deploying servers.
  • the symmetric device before the symmetric device monitors the N local public ports, it may further include:
  • the symmetric device sends the first link establishment request message to the signaling server.
  • the first link establishment request message carries the first network information. Since the first link establishment request message carries the first network information, the signaling server A network information determines the cone-shaped device, and sends the second network information mapping relationship to the cone-shaped device.
  • the second network information mapping relationship includes the second public IP address of the symmetric device and the second public port number of the symmetric device.
  • the first network information includes the user identification number ID of the cone device, the media access control address MAC address of the cone device, or the user name of the cone device.
  • the signaling server sends the second network information mapping relationship to the cone-shaped device, and provides the cone-shaped device with the address and port number of the symmetrical device, so that the cone-shaped device can send the hole punching message.
  • the symmetric device before the symmetric device sends the link establishment request message to the signaling server, it may further include:
  • the symmetric device sends a first registration message to the signaling server.
  • the first registration message carries the second network information mapping relationship, and the second network information mapping relationship includes the second network information.
  • the second network information includes the user identification number ID of the symmetric device, the MAC address of the media access control address of the symmetric device, or the user name of the symmetric device.
  • the symmetric device sends the first registration message to the signaling server, and the first registration message includes the second network information mapping relationship, so that the signaling server can send the second network information mapping relationship of the symmetric device to the cone device, which is convenient for tapping Type devices send hole punching packets.
  • an embodiment of the present application provides a communication method.
  • the method includes: a cone-shaped device sends a hole punching message to M public ports of a symmetric device, where M is a natural number greater than 1;
  • the cone device establishes a communication connection with the symmetric device according to the response message, where the response message is a message sent by the symmetric device according to the hole punching message, and the response message carries the first network information mapping relationship.
  • the first network information mapping relationship includes the first public Internet Protocol IP address of the symmetric device and the first public port number of the symmetric device.
  • the symmetric device monitors N local public ports, and when receiving a hole punching message from the cone-shaped device in these N local public ports, it sends a response message to the cone-shaped device.
  • the response message is Carrying the first network information mapping relationship, the cone-shaped device can establish a communication connection with the symmetric device according to the first network information mapping relationship.
  • Cone devices can directly communicate with symmetrical devices, eliminating the need for servers that function as data relays, and reducing the cost of deploying servers.
  • the cone device before the cone device sends the hole punching message to the M public ports of the symmetric device, it may further include:
  • the cone device receives the second network information mapping relationship, where the second network information mapping relationship is sent by the signaling server to the cone device according to the first link establishment request message, and the first link establishment request message comes from the symmetric device.
  • the second network information mapping relationship includes the second public IP address of the symmetric device and the second public port number of the symmetric device.
  • the cone device before the cone device sends the hole punching message to the M public ports of the symmetric device, it may further include:
  • the cone device sends a second link establishment request message to the signaling server, and the second link establishment request message carries the second network information, so that the signaling server sends the second network information mapping to the cone device according to the second network information Relationship; the cone device receives the second network information mapping relationship.
  • the cone device initiates a communication request to the symmetric device, the cone device sends a second link establishment request message to the signaling server, and the signaling server sends the second network information mapping to the cone device according to the second link establishment request message relationship.
  • the cone device sends a hole punching message to the symmetric device according to the second network information mapping relationship.
  • the cone-shaped device sends a hole punching message to the M public ports of the symmetric device, which specifically includes:
  • the cone-shaped device sends a hole punching message to the M public ports of the symmetric device according to the second network information mapping relationship.
  • the method before the cone device receives the second network information mapping relationship, the method further includes:
  • the cone device sends a second registration message to the signaling server, and the second registration message carries the first network information. So that the signaling server can store the first network information related to the cone-shaped device.
  • embodiments of the present application provide a computer device, which may include: a processor and a memory; an input/output (I/O) interface, a processor, and a memory, the memory storing program instructions; the The processor is configured to execute the program instructions stored in the memory, so that the computer device executes the communication method according to any one of the foregoing first aspect and the first aspect.
  • a computer device which may include: a processor and a memory; an input/output (I/O) interface, a processor, and a memory, the memory storing program instructions; the The processor is configured to execute the program instructions stored in the memory, so that the computer device executes the communication method according to any one of the foregoing first aspect and the first aspect.
  • an embodiment of the present application provides a computer device.
  • the computer device may include: a processor and a memory; an input/output (I/O) interface, a processor, and a memory, where program instructions are stored;
  • the processor is configured to execute program instructions stored in the memory, so that the computer device executes the communication method according to any one of the foregoing second aspect and the second aspect.
  • the fifth aspect of the present application provides a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on a computer device, the computer device can execute any one of the first aspect and the first aspect as described above.
  • a possible way of communication method is provided.
  • the sixth aspect of the present application provides a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer device, the computer device can execute any one of the second aspect and the second aspect as described above. A possible way to achieve the communication method.
  • the seventh aspect of the present application provides a computer program product containing instructions, which, when run on a computer, enables the computer to execute the communication method of the first aspect or any one of the possible implementation manners of the first aspect.
  • the eighth aspect of the present application provides a computer program product containing instructions, which when running on a computer, enables the computer to execute the communication method of the second aspect or any one of the possible implementation manners of the second aspect.
  • a ninth aspect of the present application provides a chip system, which includes a processor, configured to support a message forwarding device to implement the above-mentioned first aspect or any one of the possible implementations of the first aspect.
  • the chip system also includes a memory and a memory for storing program instructions and data necessary for the message forwarding device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • a tenth aspect of the present application provides a chip system, which includes a processor, and is configured to support a message processing device to implement the above-mentioned second aspect or any one of the possible implementations of the second aspect.
  • the chip system also includes a memory, and the memory is used to store the necessary program instructions and data of the message processing device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • the symmetric device listens to N local public ports, and when it receives a hole punching message from the cone-shaped device in these N local public ports, it sends a response message to the cone-shaped device, and the response message carries the first network information Mapping relationship, the cone device can establish a communication connection with the symmetric device according to the first network information mapping relationship.
  • Cone devices can directly communicate with symmetrical devices, eliminating the need for servers that function as data relays, and reducing the cost of deploying servers.
  • FIG. 1 is a schematic diagram of a network structure provided by an embodiment of the application.
  • FIG. 2 is a schematic diagram of communication between a cone-shaped device and a symmetrical device in an embodiment of the application;
  • FIG. 3 is a schematic diagram of an embodiment of a communication method in an embodiment of this application.
  • FIG. 4 is a schematic diagram of an embodiment of a communication method in an embodiment of the application.
  • FIG. 5 is a schematic diagram of an embodiment of a symmetric device in an embodiment of the application.
  • Figure 6 is a schematic diagram of an embodiment of a cone-shaped device in an embodiment of the application.
  • Fig. 7 is a schematic diagram of the hardware structure of a communication device in an embodiment of the present application.
  • the embodiment of the application provides a communication method and related equipment.
  • a symmetrical device listens to N local public ports, and when receiving a hole punching message from a cone-shaped device in these N local public ports, it replies to the cone-shaped device A response message, where the response message carries the first network information mapping relationship, and the cone device can establish a communication connection with the symmetric device according to the first network information mapping relationship.
  • Cone devices can directly communicate with symmetrical devices, eliminating the need for servers that function as data relays, and reducing the cost of deploying servers.
  • NAT Network address translation
  • IP Internet protocol
  • FIG. 1 is a schematic diagram of a network structure provided by an embodiment of this application.
  • Both the user host 1 and the user host 2 in FIG. 1 are devices that apply NAT technology, and are called NAT devices (or NAT hosts).
  • the private address of user host 1 is: 192.168.1.2; the private port is 4096, and the message carrying the network information of user host 1 is processed by the network address translation device (or called After the NAT gateway), the message carries the public IP address of user host 1: 202.20.65.4; the public port is 4097.
  • the destination of the message is user host 2, and the specific address is the public IP address of user host 2: 202.20.65.5; the public port is 4099.
  • the public IP address of user host 2 is also generated by the network address translation device connected to user host 2. Specifically, the network address translation device generates user host according to the private address of user host 2 192.168.1.3; private port 4098 2’s public IP address: 202.20.65.5; public port is 4099.
  • NAT traversal scenarios can be divided into the following 4 categories, iAddr is a private address, iPort is a private port; eAddr is a public IP address, ePort is a public port; hAddr is a public IP address of a specific device, and hPort is a public port of a specific device.
  • All request messages sent from the same source private address and source port number will be mapped to the same source public IP address and source port number, and any external host can pass this mapped source public IP address and source The port number sends packets to this intranet host.
  • Restricted cone NAT restricted cone nat
  • Port restricted cone NAT port restricted cone nat
  • restricted cone NAT It is similar to restricted cone NAT, except that it includes the port number.
  • an external host with a source private address X and source port P wants to send a message to an internal host, the internal host must have previously sent a message to the host with the private address X and source port P Text.
  • All requests sent from the same source private address and source port number to a specific destination public IP address and destination port number will be mapped to the same source public IP address and source port number. If the same host uses the same source private address and source port number to send packets, but to different destinations (destination public IP address and/or destination port number are different), the symmetric NAT device will use different mappings. In addition, only the external host that receives the message can in turn send the message to the internal host.
  • FIG. 2 is a schematic diagram of the communication between the cone-shaped device and the symmetrical device in the embodiment of the application.
  • a wireless access point accesses the Internet through a wired broadband network and provides access to the Internet for various terminal devices. Since wired broadband networks are mainly port-limited cones, the Internet is used through wireless access points Service terminal equipment (user equipment, UE) may also be referred to as cone type equipment.
  • UE user equipment
  • a base station accesses the Internet through a mobile network
  • the mobile network may be a fourth-generation mobile communication network (4G) or a fifth-generation mobile communication network (5G). Since mobile networks are mainly symmetrical, terminal devices that use Internet services through base stations can also be called symmetrical devices.
  • the instant messaging software in the symmetrical device needs to send a message to the instant messaging software in the cone-shaped device; or the instant messaging software in the cone-shaped device needs to send a message to the symmetrical device
  • the solution proposed in this application can be used to establish a communication connection.
  • symmetrical devices and cone-shaped devices can include mobile phones, tablet computers, notebook computers, handheld computers, personal digital assistants (PDA), portable media players (PMP), navigation Devices, wearable devices, and other mobile terminals, as well as fixed terminals such as digital TVs and desktop computers.
  • PDA personal digital assistants
  • PMP portable media players
  • navigation Devices wearable devices
  • fixed terminals such as digital TVs and desktop computers.
  • the symmetric device monitors the local N local public ports, and N is a natural number greater than 1.
  • N is a natural number greater than 1.
  • a response message is sent to the cone-shaped device, and the cone-shaped device establishes a communication connection with the symmetric device according to the response message.
  • the messages monitored by the symmetrical device on the local public port are sent by the cone-shaped device in a certain message port interval of the symmetrical device, randomly selected M public ports, that is, the cone-shaped device sends to the M public ports of the symmetrical device Send a message, which is called a hole punch message.
  • the symmetric device listens to N local public ports, and when it receives a hole punching message from the cone-shaped device in these N local public ports, it sends a response message to the cone-shaped device, and the response message carries the first network information Mapping relationship, the cone device can establish a communication connection with the symmetric device according to the first network information mapping relationship.
  • Cone devices can directly communicate with symmetrical devices, eliminating the need for servers that function as data relays, and reducing the cost of deploying servers.
  • FIG. 3 is a schematic diagram of an embodiment of a communication method in an embodiment of the present application.
  • an embodiment of the communication method provided by the embodiment of the present application includes:
  • the symmetric device sends a first registration message to the signaling server.
  • the first registration message carries a second network information mapping relationship, and the second network information mapping relationship includes second network information.
  • the second network information mapping relationship and the second network information are included in the header of the first registration message.
  • the second network information mapping relationship includes the second public IP address of the symmetric device and the second public port number of the symmetric device.
  • the second network information includes the identity document (ID) of the symmetric device, the media access control address (MAC) of the symmetric device, or the user name of the symmetric device.
  • the second network information mapping relationship includes the public IP address of the symmetric device: 202.20.65.4; the public port of the symmetric device is 4097.
  • the second network information includes the user identification number of the symmetric device: 13400000000; the MAC address of the symmetric device: 00-23-24-AD-1B-1B; the user name of the symmetric device: zhangsan, etc.
  • the signaling server After receiving the first registration message, the signaling server associates the second network information mapping relationship and the second network information with the symmetric device, and stores them.
  • the cone-shaped device sends a second registration message to the signaling server.
  • the second registration message carries first network information.
  • the first network information includes the identity document of the cone-shaped device. ID), the media access control address (MAC) of the cone-shaped device, or the user name of the cone-shaped device.
  • the user identification number of the cone-shaped device 13500000000
  • the MAC address of the cone-shaped device 00-23-24-AD-1C-1C
  • the user name of the cone-shaped device lisi, etc.
  • the second registration message also carries the public IP address and public port of the cone-shaped device.
  • the signaling server After receiving the second registration message, the signaling server associates the first network information with the cone-shaped device and stores it.
  • step 101 is performed first, then step 102, or step 102 is performed first, then step 101, or simultaneously. Step 101 and step 102.
  • the symmetric device when a symmetric device initiates a communication request to a cone device, the symmetric device first needs to send a first link establishment request message to the signaling server, and the first link establishment request message comes from the symmetric device. Therefore, the signaling server can search and obtain the mapping relationship of the second network information stored locally in the signaling server according to the first link establishment request message.
  • the signaling server finds the mapping relationship of the second network information stored locally, since the first link establishment request message also carries the first network information, for example, the user name "lisi" of the cone-shaped device .
  • the signaling server searches for the public IP address and public port of the cone-shaped device according to the first network information, and uses the public IP address and the public port of the cone-shaped device to send the second network information mapping relationship to the cone-shaped device.
  • the second network information mapping relationship includes: the second public IP address of the symmetric device and the second public port number of the symmetric device.
  • the cone-shaped device after the cone-shaped device receives the second network information mapping relationship sent from the signaling server, according to the second network information mapping relationship, it directly sends a hole punching message to the M public ports of the symmetric device, where M It is a natural number greater than 1.
  • the cone-shaped device selects the second public IP address of the symmetric device as the destination address, selects M ports from 65511 ports between 1024 and 66535 as the destination port number, and sends M hole punching messages to it. For example, Table 1.
  • the port range from 1024 to 66535 is the port range reserved in advance for cone-shaped devices and symmetrical devices.
  • the port range from 1024 to 66535 is only an example, and it can also be a port range from 2048 to 66535. Other port intervals are not limited here.
  • the symmetric device starts to monitor the local public port after step 101.
  • N local public ports are arbitrarily selected for monitoring in the port range of the port number 1024 to 66535, where N is a natural number greater than 1.
  • These 10 local public ports are 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 7000.
  • the N local ports monitored by the symmetric device can be either regularly distributed N port numbers or randomly distributed N port numbers, which are not limited here.
  • the port range from 1024 to 66535 is specified in advance for cone-shaped equipment and symmetrical equipment.
  • the port range from 1024 to 66535 is only an example. It can also be from 2048 to Other port intervals such as the 66535 port interval are not limited here.
  • the symmetric device After the symmetric device receives the hole punching message on the monitored N local ports, it sends a response message to the cone device.
  • the response message carries the first network information mapping relationship, specifically including The first public Internet Protocol IP address of the symmetric device and the first public port number of the symmetric device.
  • the cone-shaped device after the cone-shaped device receives the response message from the symmetric device, it obtains the first public IP address and the first public port number of the symmetric device according to the first network information mapping relationship carried in the response message.
  • the cone-shaped device can establish a communication connection by sending a message to the first public address and the first public port number of the symmetric device.
  • the signaling server receives the registration message of the symmetric device and the cone device, and the signaling server is used to send the network information mapping relationship of the symmetric device to the cone device, so that the cone device can send the hole punching message.
  • the symmetric device listens to the hole punching message on the local public port, it sends a response message to the cone device.
  • the response message carries the public IP address and public port number that the symmetric device can successfully receive the message.
  • the cone device receives The response message can break through the limitation of the symmetric device (symmetric NAT) and successfully establish a communication connection with the symmetric device.
  • Cone devices can communicate directly with symmetric devices, and the signaling server only serves as an address exchange, eliminating the need for servers that function as data relays and reducing the cost of deploying servers.
  • another embodiment of the communication method provided by the embodiment of the present application includes:
  • the cone device when the cone device initiates a communication request to the symmetric device, the cone device first needs to send a second link establishment request message to the signaling server.
  • the second link establishment request message carries the second network information, for example
  • the user name of the symmetrical device is "zhangsan". Therefore, the signaling server can search and obtain the mapping relationship of the second network information stored locally in the signaling server according to the second link establishment request message.
  • the signaling server After the signaling server finds the mapping relationship of the second network information stored locally, since the second link establishment request message comes from the cone-shaped device, the signaling server will use the second link establishment request message according to the The message header learns the public IP address and the public port of the cone device, and uses the public IP address and public port of the cone device to send the second network information mapping relationship to the cone device.
  • the second network information mapping relationship includes: the second public IP address of the symmetric device and the second public port number of the symmetric device.
  • the signaling server receives the registration message of the symmetric device and the cone device, and the signaling server is used to send the network information mapping relationship of the symmetric device to the cone device, so that the cone device can send the hole punching message.
  • the symmetric device listens to the hole punching message on the local public port, it sends a response message to the cone device.
  • the response message carries the public IP address and public port number that the symmetric device can successfully receive the message.
  • the cone device receives The response message can break through the limitation of the symmetric device (symmetric NAT) and successfully establish a communication connection with the symmetric device.
  • Cone devices can communicate directly with symmetric devices, and the signaling server only serves as an address exchange, eliminating the need for servers that function as data relays and reducing the cost of deploying servers.
  • a symmetric device is used to monitor N local public ports, where N is a natural number greater than 1, and the cone-shaped device randomly selects M public ports to send hole punching messages, M is a natural number greater than 1, and the selection interval between M and N is the port Take the port range from 2048 to 66535 as an example, which shows that the success rate of NAT traversal in this solution is relatively high. Specifically:
  • the probability that M ports are not monitored by the symmetric device is:
  • A is the probability that the M ports are not monitored by the N ports of the symmetric device.
  • the probability of N ports monitored by M ports on a symmetric device that is, the probability of NAT traversal (or port prediction success rate) is:
  • B is the success rate of NAT traversal.
  • the above-mentioned main interaction perspective introduces the solutions provided in the embodiments of the present application.
  • the above-mentioned symmetrical device and the cone-shaped device include hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiment of this application can divide the symmetrical device and the cone-shaped device into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the symmetrical device 50 includes:
  • the receiving module 501 is configured to monitor N local public ports, where N is a natural number greater than 1;
  • the sending module 502 is used for when the receiving module 501 receives the hole punching message in N local public ports, the sending module 502 sends a response message to the cone-shaped device according to the hole punching message, so that the symmetrical device 50 and the cone-shaped device A communication connection is established, where the hole punching message comes from a cone-shaped device, and the response message carries the first network information mapping relationship.
  • the symmetric device 50 includes:
  • the sending module 502 is further configured to send a first link establishment request message to the signaling server.
  • the first link establishment request message carries first network information, so that the signaling server sends the first network information to the cone-shaped device according to the first network information. 2. Network information mapping relationship.
  • the symmetric device 50 includes:
  • the sending module 502 is further configured to send the symmetric device 50 to the signaling server a first registration message, where the first registration message carries a second network information mapping relationship, and the second network information mapping relationship includes the second network information.
  • the receiving module can be realized by a receiver or a receiving circuit or an input interface
  • the sending module can be realized by a transmitter or a sending circuit or an output interface
  • FIG. 6, is a schematic diagram of an embodiment of the cone-shaped device in the embodiment of the application.
  • the cone type device 60 includes:
  • the sending module 601 is used to send hole punching messages to M public ports of the symmetric device, where M is a natural number greater than 1;
  • the processing module 602 is configured to establish a communication connection with the symmetric device according to the response message, where the response message is a message sent by the symmetric device according to the hole punching message, and the response message carries the first network information mapping relationship.
  • the cone-shaped device 60 includes:
  • the receiving module 603 is configured to receive a second network information mapping relationship, where the second network information mapping relationship is sent by the signaling server to the cone device 60 according to the first link establishment request message, and the first link establishment request message comes from Symmetrical equipment.
  • the cone-shaped device 60 includes:
  • the sending module 601 is further configured to send a second link establishment request message to the signaling server, and the second link establishment request message carries second network information, so that the signaling server sends to the cone device 60 according to the second network information
  • the second network information mapping relationship ;
  • the receiving module 603 is further configured to receive the second network information mapping relationship.
  • the cone-shaped device 60 includes:
  • the sending module 601 is specifically configured to send a hole punching message to M public ports of the symmetric device according to the second network information mapping relationship.
  • the cone-shaped device 60 includes:
  • the sending module 601 is further configured to send a second registration message to the signaling server, where the second registration message carries the first network information.
  • the processing module may be realized by a processor
  • the receiving module may be realized by a receiver or a receiving circuit or an input interface
  • the sending module may be realized by a transmitter or a sending circuit or an output interface.
  • Fig. 7 is a schematic diagram of the hardware structure of a communication device in an embodiment of the present application. As shown in Fig. 7, the communication device may include:
  • the communication device includes at least one processor 701, a communication line 707, a memory 703, and at least one communication interface 704.
  • the processor 701 can be a general-purpose central processing unit (central processing unit, CPU), microprocessor, application-specific integrated circuit (server IC), or one or more programs for controlling the execution of the program of this application Integrated circuits.
  • CPU central processing unit
  • server IC application-specific integrated circuit
  • the communication line 707 may include a path to transmit information between the aforementioned components.
  • the communication interface 704 uses any device such as a transceiver for communication with other devices or communication networks, such as Ethernet.
  • the memory 703 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
  • ROM read-only memory
  • RAM random access memory
  • the dynamic storage device, the memory can exist independently, and is connected to the processor through the communication line 707.
  • the memory can also be integrated with the processor.
  • the memory 703 is used to store computer-executed instructions for executing the solution of the present application, and the processor 701 controls the execution.
  • the processor 701 is configured to execute computer-executable instructions stored in the memory 703, so as to implement the communication method provided in the foregoing embodiment of the present application.
  • the computer-executable instructions in the embodiments of the present application may also be referred to as application program code, which is not specifically limited in the embodiments of the present application.
  • the communication device may include multiple processors, for example, the processor 701 and the processor 702 in FIG. 7.
  • processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • the communication device may further include an output device 705 and an input device 706.
  • the output device 705 communicates with the processor 701, and can display information in a variety of ways.
  • the input device 706 communicates with the processor 701, and can receive user input in various ways.
  • the input device 706 may be a mouse, a touch screen device, a sensor device, or the like.
  • the aforementioned communication device may be a general-purpose device or a dedicated device.
  • the communication device may be a desktop computer, a portable computer, a network server, a wireless terminal device, an embedded device, or a device with a similar structure in FIG. 7.
  • the embodiment of the application does not limit the type of communication device.
  • the disclosed device and method may be implemented in other ways.
  • the embodiments of the symmetrical device and the cone-shaped device described above are only illustrative.
  • the division of units is only a logical function division.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, modules or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .

Landscapes

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

Abstract

本申请实施例公开了一种通信方法以及相关设备,包括:对称设备监听N个本地公有端口,其中,N为大于1的自然数;当对称设备在N个本地公有端口中接收打洞报文时,对称设备根据打洞报文向锥型设备发送响应报文,以使得对称设备与锥型设备建立通信连接,其中,打洞报文来自锥型设备,响应报文携带第一网络信息映射关系。锥型设备可以与对称设备直接通信,省去了起数据中继作用的服务器,减小部署服务器的耗费。

Description

一种通信方法以及相关设备
本申请要求在2019年6月24日提交中国国家知识产权局、申请号为201910549545.0的中国专利申请的优先权,发明名称为“一种通信方法以及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种通信方法以及相关设备。
背景技术
智能设备的使用深入大家的日常生活,人们已经越来越无法离开智能设备,设备所处的网络环境非常复杂,当前为了解决网际协议版本4(internet protocol version 4,IPv4)公网网际协议地址(internet protocol address,IP address)的不足,引入了网络地址转换技术(network address translation,NAT),NAT技术又称地址代理,提供私有地址和公有IP地址之间的转换,支持内网和公网之间的通信。然而NAT技术带来便利的同时,NAT解决IP地址紧缺问题的同时带来了NAT穿越问题。
按照NAT穿越场景分类,一共存在:完全锥型NAT、受限锥型NAT、端口受限锥型NAT以及对称型NAT这四种场景。其中,对于端口受限锥型NAT的设备与对称型NAT的设备需要使用通过转发方式穿越NAT(Traversal Using Relays around NAT,TURN)技术。
TURN技术中,端口受限锥型NAT的设备与对称型NAT的设备之间的数据交互,需要通过服务器进行数据转发。端口受限锥型NAT的设备与对称型NAT的设备之间交互的数据量越大时,对需要执行数据转发的服务器的带宽要求也越大,因此增加部署服务器的耗费。
发明内容
本申请实施例提供了一种通信方法以及相关设备,对称设备监听N个本地公有端口,当在这N个本地公有端口中接收到来自锥型设备的打洞报文时,向锥型设备发送响应报文,该响应报文中携带第一网络信息映射关系,锥型设备可以根据该第一网络信息映射关系与对称设备建立通信连接。锥型设备可以与对称设备直接通信,省去了起数据中继作用的服务器,减小部署服务器的耗费。
有鉴于此,本申请实施例提供如下方案:
第一方面,本申请实施例提供了一种通信方法,该方法包括:对称设备监听N个本地公有端口,其中,N为大于1的自然数;当对称设备在N个本地公有端口中接收打洞报文时,对称设备根据打洞报文向锥型设备发送响应报文,以使得对称设备与锥型设备建立通信连接,其中,打洞报文来自锥型设备,响应报文携带第一网络信息映射关系。第一网络信息映射关系包括对称设备的第一公有网际互联协议IP地址以及对称设备的第一公有端口号。
本申请实施例中对称设备监听N个本地公有端口,当在这N个本地公有端口中接收到来自锥型设备的打洞报文时,向锥型设备发送响应报文,该响应报文中携带第一网络信息映射关系,锥型设备可以根据该第一网络信息映射关系与对称设备建立通信连接。锥型设备可以与对称设备直接通信,省去了起数据中继作用的服务器,减小部署服务器的耗费。
可选地,在第一方面的一种可能的实现方式中,对称设备监听N个本地公有端口之前,还可以包括:
对称设备向信令服务器发送第一建链请求报文,第一建链请求报文中携带第一网络信息,由于第一建链请求报文中携带第一网络信息,因此信令服务器根据第一网络信息确定锥型设备,并向锥型设备发送第二网络信息映射关系。第二网络信息映射关系包括对称设备的第二公有IP地址以及对称设备的第二公有端口号。第一网络信息包括锥型设备的用户身份识别号ID、锥型设备的媒体访问控制地址MAC地址或锥型设备的用户名。信令服务器向锥型设备发送第二网络信息映射关系,为锥型设备提供对称设备的地址与端口号,便于锥型设备发送打洞报文。
可选地,在第一方面的一种可能的实现方式中,对称设备向信令服务器发送建链请求报文之前,还可以包括:
对称设备向信令服务器发送第一注册报文,第一注册报文携带第二网络信息映射关系,第二网络信息映射关系中包括第二网络信息。第二网络信息包括对称设备的用户身份识别号ID、对称设备的媒体访问控制地址MAC地址或对称设备的用户名。对称设备通过向信令服务器发送第一注册报文,第一注册报文中包括第二网络信息映射关系,使得信令服务器可以向锥型设备发送对称设备的第二网络信息映射关系,便于锥型设备发送打洞报文。
第二方面,本申请实施例提供了一种通信方法,该方法包括:锥型设备向对称设备的M个公有端口发送打洞报文,其中,M为大于1的自然数;
锥型设备根据响应报文与对称设备建立通信连接,其中,响应报文为对称设备根据打洞报文发送的报文,响应报文携带第一网络信息映射关系。第一网络信息映射关系包括对称设备的第一公有网际互联协议IP地址以及对称设备的第一公有端口号。
本申请实施例中对称设备监听N个本地公有端口,当在这N个本地公有端口中接收到来自锥型设备的打洞报文时,向锥型设备发送响应报文,该响应报文中携带第一网络信息映射关系,锥型设备可以根据该第一网络信息映射关系与对称设备建立通信连接。锥型设备可以与对称设备直接通信,省去了起数据中继作用的服务器,减小部署服务器的耗费。
可选地,在第二方面的一种可能的实现方式中,锥型设备向对称设备的M个公有端口发送打洞报文之前,还可以包括:
锥型设备接收第二网络信息映射关系,其中,第二网络信息映射关系为信令服务器根据第一建链请求报文向锥型设备发送的,第一建链请求报文来自对称设备。第二网络信息映射关系包括对称设备的第二公有IP地址以及对称设备的第二公有端口号。当对称设备向锥型设备发起通信请求时,对称设备向信令服务器发送第一建链请求报文,信令服务器根据该第一建链请求报文向锥型设备发送第二网络信息映射关系。锥型设备根据第二网络信息映射关系向对称设备发送打洞报文。
可选地,在第二方面的一种可能的实现方式中,锥型设备向对称设备的M个公有端口发送打洞报文之前,还可以包括:
锥型设备向信令服务器发送第二建链请求报文,第二建链请求报文中携带第二网络信息,以使得信令服务器根据第二网络信息向锥型设备发送第二网络信息映射关系;锥型设备接收第二网络信息映射关系。当锥型设备向对称设备发起通信请求时,锥型设备向信令服务器发送第二建链请求报文,信令服务器根据该第二建链请求报文向锥型设备发送第二网络信息映射关系。锥型设备根据第二网络信息映射关系向对称设备发送打洞报文。
可选地,在第二方面的一种可能的实现方式中,锥型设备向对称设备的M个公有端口发送打洞报文,具体包括:
锥型设备根据第二网络信息映射关系向对称设备的M个公有端口发送打洞报文。
可选地,在第二方面的一种可能的实现方式中,锥型设备接收第二网络信息映射关系之前,方法还包括:
锥型设备向信令服务器发送第二注册报文,第二注册报文携带第一网络信息。以便信令服务器可以存储与锥型设备相关的第一网络信息。
第三方面,本申请实施例提供了一种计算机设备,该计算机设备可以包括:处理器和存储器;输入/输出(I/O)接口、处理器和存储器,该存储器中存储有程序指令;该处理器用于执行存储器中存储的程序指令,以使该计算机设备执行如上述第一方面、第一方面任意一种可能实现方式的通信方法。
第四方面,本申请实施例提供了一种计算机设备,该计算机设备可以包括:处理器和存储器;输入/输出(I/O)接口、处理器和存储器,该存储器中存储有程序指令;该处理器用于执行存储器中存储的程序指令,以使该计算机设备执行如上述第二方面、第二方面任意一种可能实现方式的通信方法。
本申请第五方面提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机设备上运行时,使得计算机设备可以如执行上述第一方面、第一方面任意一种可能实现方式的通信方法。
本申请第六方面提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机设备上运行时,使得计算机设备可以如执行上述第二方面、第二方面任一种可能的实现方式的通信方法。
本申请第七方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面或第一方面任意一种可能实现方式的通信方法。
本申请第八方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第二方面或第二方面任意一种可能实现方式的通信方法。
本申请第九方面提供一种芯片系统,该芯片系统包括处理器,用于支持报文转发装置实现上述第一方面或第一方面任意一种可能的实现方式中所涉及的功能。在一种可能的设计中,芯片系统还包括存储器,存储器,用于保存报文转发装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
本申请第十方面提供一种芯片系统,该芯片系统包括处理器,用于支持报文处理装置实现上述第二方面或第二方面任意一种可能的实现方式中所涉及的功能。在一种可能的设 计中,芯片系统还包括存储器,存储器,用于保存报文处理装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第三方面、第五方面、第七方面、第九方面中任一种实现方式所带来的技术效果可参见第一方面中不同实现方式所带来的技术效果,此处不再赘述。
其中,第四方面、第六方面、第八方面、第十方面中任一种实现方式所带来的技术效果可参见第二方面中不同实现方式所带来的技术效果,此处不再赘述。
从以上技术方案可以看出,本申请实施例具有以下优点:
对称设备监听N个本地公有端口,当在这N个本地公有端口中接收到来自锥型设备的打洞报文时,向锥型设备发送响应报文,该响应报文中携带第一网络信息映射关系,锥型设备可以根据该第一网络信息映射关系与对称设备建立通信连接。锥型设备可以与对称设备直接通信,省去了起数据中继作用的服务器,减小部署服务器的耗费。
附图说明
图1为本申请实施例提供的一种网络结构示意图;
图2为本申请实施例中锥型设备与对称设备之间通信的示意图;
图3为本申请实施例中一种通信方法的实施例示意图;
图4为本申请实施例中一种通信方法的实施例示意图;
图5为本申请实施例中对称设备的一种实施例示意图;
图6为本申请实施例中锥型设备的一种实施例示意图;
图7是本申请实施例中的通信装置的硬件结构一个示意图。
具体实施方式
本申请实施例提供了一种通信方法以及相关设备,对称设备监听N个本地公有端口,当在这N个本地公有端口中接收到来自锥型设备的打洞报文时,向锥型设备回复响应报文,该响应报文中携带第一网络信息映射关系,锥型设备可以根据该第一网络信息映射关系与对称设备建立通信连接。锥型设备可以与对称设备直接通信,省去了起数据中继作用的服务器,减小部署服务器的耗费。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为了方便理解,首先对本申请实施例中涉及的概念进行简要说明:
网络地址转换技术(network address translation,NAT):NAT是一个因特网工程任务组(internet engineering task force,IETF)标准,允许一个整体机构以一个公有IP 地址(internet protocol,IP)出现在互联网上。顾名思义,它是一种把内部的私有地址(IP地址)翻译成合法公有IP地址的技术。因此,NAT能够有效的解决公有IP地址不足的问题。应用NAT技术的设备之间通信,称为NAT穿越(NAT traversal)。
请参阅图1,图1为本申请实施例提供的一种网络结构示意图。图1中的用户主机1与用户主机2均为应用NAT技术的设备,称为NAT设备(或称为NAT主机)。以用户主机1向用户主机2发送报文为例,用户主机1的私有地址为:192.168.1.2;私有端口为4096,携带有用户主机1网络信息的报文经过网络地址转换设备处理(或称为NAT网关)后,报文中携带用户主机1的公有IP地址:202.20.65.4;公有端口为4097。该报文的目的地为用户主机2,具体的地址为用户主机2的公有IP地址:202.20.65.5;公有端口为4099。而用户主机2的公有IP地址,同样是与用户主机2连接的网络地址转换设备生成的,具体的,该网络地址转换设备根据用户主机2的私有地址192.168.1.3;私有端口4098,生成用户主机2的公有IP地址:202.20.65.5;公有端口为4099。
常见的NAT穿越场景可以分为下列4类,iAddr为私有地址,iPort为私有端口;eAddr为公有IP地址,ePort为公有端口;hAddr为特定设备的公有IP地址,hPort为特定设备的公有端口。
1.完全锥型NAT(full cone nat):
所有从同一个源私有地址和源端口号发送过来的请求报文都会被映射成同一个源公有IP地址和源端口号,并且任何一个外网主机都可以通过这个映射的源公有IP地址和源端口号向这台内网主机发送报文。
其特点为:一旦内部主机端口对(iAddr:iPort)被NAT网关映射到(eAddr:ePort),所有后续的(iAddr:iPort)报文都会被转换为(eAddr:ePort);任何一个外部主机发送到(eAddr:ePort)的报文将会被转换后发到(iAddr:iPort)。
2.限制锥型NAT(restricted cone nat):
也是所有从同一个源私有地址和源端口号发送过来的请求报文都会被映射成同一个源公有IP地址和源端口号。与完全锥型NAT不同的是,外网主机只能够向先前已经向它发送过报文的内网主机发送报文。
其特点为:一旦内部主机端口对(iAddr:iPort)被映射到(eAddr:ePort),所有后续的(iAddr:iPort)报文都会被转换为(eAddr:ePort);只有(iAddr:iPort)向特定的外部主机hAddr发送过数据,主机hAddr从任意端口发送到(eAddr:ePort)的报文将会被转发到(iAddr:iPort)。
3.端口限制锥型NAT(port restricted cone nat):
与限制锥型NAT很相似,只不过它包括端口号。也就是说,一台源私有地址X和源端口P的外网主机想给内网主机发送报文,必须是这台内网主机先前已经给这个私有地址X和源端口P的主机发送过报文。
其特点为:一旦内部主机端口对(iAddr:iPort)被映射到(eAddr:ePort),所有后续的(iAddr:iPort)报文都会被转换为(eAddr:ePort);只有(iAddr:iPort)向特定的外部主机端口对(hAddr:hPort)发送过数据,由(hAddr:hPort)发送到(eAddr:ePort)的报文将会被转发到(iAddr:iPort)。
4.对称NAT(symmetric nat):
所有从同一个源私有地址和源端口号发送到一个特定的目的公有IP地址和目的端口号的请求,都会被映射到同一个源公有IP地址和源端口号。如果同一台主机使用相同的源私有地址和源端口号发送报文,但是发往不同的目的地(目的公有IP地址和/或目的端口号不同),对称NAT设备将会使用不同的映射。此外,只有接收报文的外网主机才可以反过来向内网主机发送报文。
首先对本申请实施例中的通信方法进行示意说明,如图2所示,图2为本申请实施例中锥型设备与对称设备之间通信的示意图。
无线接入点(access point,AP)通过有线宽带网络接入互联网,并为各类终端设备提供接入互联网业务,由于有线宽带网络主要为端口受限锥型,因此通过无线接入点使用互联网业务的终端设备(user equipment,UE)还可以称为锥型设备。
基站(base station,BS)通过移动网络接入互联网,该移动网络可以为第四代移动通信网络(4G),也可以为第五代移动通信网络(5G)。由于移动网络主要为对称型,因此通过基站使用互联网业务的终端设备还可以称为对称设备。
当对称设备与锥型设备之间需要建立通信连接时,例如对称设备中的即时通讯软件,需要向锥型设备中的即时通讯软件发送消息;或锥型设备中的即时通讯软件需要向对称设备中的即时通讯软件发送消息时,可使用本申请提出的方案建立通信连接。
需要说明的是,对称设备与锥型设备,可以包括诸如手机、平板电脑、笔记本电脑、掌上电脑、个人数字助理(personal digital assistant,PDA)、便携式媒体播放器(portable media player,PMP)、导航装置、可穿戴设备、等移动终端,以及诸如数字电视、台式计算机等固定终端。
在本申请实施例中,对称设备监听本地的N个本地公有端口,N为大于1的自然数。当在N个本地公有端口中,监听到来自锥型设备的报文时,向锥型设备发送响应报文,锥型设备根据该响应报文与对称设备建立通信连接。对称设备在本地的公有端口监听到的报文,是由锥型设备在对称设备一定的报文端口区间,任意选取的M个公有端口发送的,即锥型设备向对称设备的M个公有端口发送报文,该报文称为打洞报文。对称设备监听N个本地公有端口,当在这N个本地公有端口中接收到来自锥型设备的打洞报文时,向锥型设备发送响应报文,该响应报文中携带第一网络信息映射关系,锥型设备可以根据该第一网络信息映射关系与对称设备建立通信连接。锥型设备可以与对称设备直接通信,省去了起数据中继作用的服务器,减小部署服务器的耗费。
下面以实施例的方式,对本申请技术方案做进一步的说明,请参阅图3,图3为本申请实施例中一种通信方法的实施例示意图。
如图3所示,本申请实施例提供的通信方法的一个实施例包括:
101、发送第一注册报文。
本实施例中,对称设备向信令服务器发送第一注册报文,该第一注册报文中携带第二网络信息映射关系,该第二网络信息映射关系包括第二网络信息。该第二网络信息映射关系以及第二网络信息包含于第一注册报文的报文头部。具体的,第二网络信息映射关系包括对称设备的第二公有IP地址以及对称设备的第二公有端口号。第二网络信息包括对称 设备的用户身份识别号(identity document,ID)、对称设备的媒体访问控制地址(media access control address,MAC)或对称设备的用户名。例如:第二网络信息映射关系包括对称设备的公有IP地址:202.20.65.4;对称设备的公有端口为4097。第二网络信息包括对称设备的用户身份识别号:13400000000;对称设备的MAC地址:00-23-24-AD-1B-1B;对称设备的用户名:zhangsan等。
信令服务器接收到该第一注册报文后,将该第二网络信息映射关系、该第二网络信息与该对称设备关联起来,并储存。
102、发送第二注册报文。
本实施例中,锥型设备向信令服务器发送第二注册报文,该第二注册报文中携带第一网络信息,该第一网络信息包括锥型设备的用户身份识别号(identity document,ID)、锥型设备的媒体访问控制地址(media access control address,MAC)或锥型设备的用户名。例如:锥型设备的用户身份识别号:13500000000;锥型设备的MAC地址:00-23-24-AD-1C-1C;锥型设备的用户名:lisi等。第二注册报文中还携带有锥型设备的公有IP地址与公有端口。
信令服务器接收到该第二注册报文后,将第一网络信息与该锥型设备关联起来,并储存。
需要说明的是,此处不对步骤101与步骤102之间先后关系进行限定,既可以是先执行步骤101,后执行步骤102、也可以先执行步骤102,后执行步骤101、还可以是同时执行步骤101与步骤102。
103、发送第一建链请求报文。
本实施例中,对称设备向锥型设备发起通信请求时,首先对称设备需要先向信令服务器发送第一建链请求报文,该第一建链请求报文来自对称设备。因此信令服务器可以根据该第一建链请求报文,查找得到存储于信令服务器本地的第二网络信息映射关系。
104、发送第二网络信息映射关系。
本实施例中,当信令服务器查找到存储于本地的第二网络信息映射关系后,由于该第一建链请求报文中还携带第一网络信息,例如锥型设备的用户名“lisi”。信令服务器根据第一网络信息查找锥型设备的公有IP地址与公有端口,并使用该锥型设备的公有IP地址与公有端口向锥型设备发送第二网络信息映射关系。该第二网络信息映射关系包括:对称设备的第二公有IP地址以及对称设备的第二公有端口号。
105、发送打洞报文。
本实施例中,锥型设备接收到来自信令服务器发送的第二网络信息映射关系后,根据该第二网络信息映射关系,直接向对称设备的M个公有端口发送打洞报文,其中M为大于1的自然数。
具体的:锥型设备选择对称设备的第二公有IP地址作为目的地址,在端口号1024至66535之间的65511个端口中选择M个端口作为目的端口号,向发送M个打洞报文。例如表1。
报文 目的地址 目的端口号 源地址 源端口号
第一个打洞报文 202.20.65.4 2000 202.20.65.5 1500
第二个打洞报文 202.20.65.4 2200 202.20.65.5 1500
第三个打洞报文 202.20.65.4 2500 202.20.65.5 1500
··· ··· ··· ··· ···
第M个打洞报文 202.20.65.4 25500 202.20.65.5 1500
表1
需要说明的是,端口号1024至66535端口区间为锥型设备与对称设备提前预留的端口区间,端口号1024至66535端口区间仅为一种示例说明,还可以是端口号2048至66535端口区间等其它端口区间,此处不作限定。
106、监听本地公有端口。
本实施例中,对称设备在步骤101后开始监听本地的公有端口。具体的,在本地公有端口号为端口号1024至66535端口区间中任意选择N个本地公有端口进行监听,N为大于1的自然数。例如,在端口号1024至66535端口区间选择10个本地公有端口进行监听,这10个本地公有端口分别为2000、2500、3000、3500、4000、4500、5000、5500、6000、7000。需要说明的是,对称设备所监听的N个本地端口,既可以是按规律分布的N个端口号,也可以是随机分布的N个端口号,此处不作限定。
需要说明的是,端口号1024至66535端口区间为锥型设备与对称设备提前规定的,预留的端口区间,端口号1024至66535端口区间仅为一种示例说明,还可以是端口号2048至66535端口区间等其它端口区间,此处不作限定。
107、发送响应报文。
本实施例中,当对称设备在所监听的N个本地端口接收到打洞报文后,向锥型设备发送响应报文,该响应报文中携带第一网络信息映射关系,具体的,包括对称设备的第一公有网际互联协议IP地址以及对称设备的第一公有端口号。
108、建立通信连接。
本实施例中,锥型设备收到来自对称设备的响应报文后,根据该响应报文中携带的第一网络信息映射关系,得到对称设备的第一公有IP地址以及第一公有端口号,锥型设备可通过向对称设备的第一公有地址以及第一公有端口号发送报文,建立通信连接。
本申请实施例中,信令服务器接收对称设备与锥型设备的注册报文,信令服务器用于向锥型设备发送对称设备的网络信息映射关系,以便于锥型设备发送打洞报文。当对称设备在本地公有端口监听到打洞报文时,向锥型设备发送响应报文,该响应报文携带对称设备可成功接收报文的公有IP地址与公有端口号,锥型设备通过接收响应报文,可突破对称设备(对称NAT)的限制,成功与对称设备建立通信连接。锥型设备可以与对称设备直接通信,信令服务器仅做交换地址作用,省去了起数据中继作用的服务器,减小部署服务器的耗费。
如图4所示,本申请实施例提供的通信方法的另一个实施例包括:
201、发送第一注册报文。
本实施例中,与前述步骤101类似,此处不再赘述。
202、发送第二注册报文。
本实施例中,与前述步骤102类似,此处不再赘述。
203、发送第二建链请求报文。
本实施例中,锥型设备向对称设备发起通信请求时,首先锥型设备需要先向信令服务器发送第二建链请求报文,该第二建链请求报文携带第二网络信息,例如对称设备的用户名“zhangsan”。因此信令服务器可以根据该第二建链请求报文,查找得到存储于信令服务器本地的第二网络信息映射关系。
204、发送第二网络信息映射关系。
本实施例中,当信令服务器查找到存储于本地的第二网络信息映射关系后,由于该第二建链请求报文来自锥型设备,信令服务器根据该第二建链请求报文的报文头获知锥型设备的公有IP地址与公有端口,并使用该锥型设备的公有IP地址与公有端口向锥型设备发送第二网络信息映射关系。该第二网络信息映射关系包括:对称设备的第二公有IP地址以及对称设备的第二公有端口号。
205、发送打洞报文。
本实施例中,与前述步骤105类似,此处不再赘述。
206、监听本地公有端口。
本实施例中,与前述步骤106类似,此处不再赘述。
207、发送响应报文。
本实施例中,与前述步骤107类似,此处不再赘述。
208、建立通信连接。
本实施例中,与前述步骤108类似,此处不再赘述。
本申请实施例中,信令服务器接收对称设备与锥型设备的注册报文,信令服务器用于向锥型设备发送对称设备的网络信息映射关系,以便于锥型设备发送打洞报文。当对称设备在本地公有端口监听到打洞报文时,向锥型设备发送响应报文,该响应报文携带对称设备可成功接收报文的公有IP地址与公有端口号,锥型设备通过接收响应报文,可突破对称设备(对称NAT)的限制,成功与对称设备建立通信连接。锥型设备可以与对称设备直接通信,信令服务器仅做交换地址作用,省去了起数据中继作用的服务器,减小部署服务器的耗费。
进一步的,以对称设备监听N个本地公有端口,N为大于1的自然数,锥型设备随机选择M个公有端口发送打洞报文,M为大于1的自然数,M与N的选择区间为端口号2048至66535端口区间为例,说明本方案NAT穿越的成功率较高,具体的:
由于M与N的选择区间为端口号2048至66535端口区间,该端口区间中共计63487个端口,因此M个端口不在对称设备监听的N个端口的概率为:
Figure PCTCN2020097569-appb-000001
其中,A为M个端口不在对称设备监听的N个端口的概率。
M个端口在对称设备监听的N个端口的概率,即NAT穿越概率(或称为端口预测成功率)为:
Figure PCTCN2020097569-appb-000002
其中,B为NAT穿越成功率。
通过代入多组M与N计算可得,本方案提出的该通信方法,NAT穿越成功率较高。例如:N=400,M=500时,NAT穿越成功率为95.8%;N=100,M=500时,NAT穿越成功率为54.6%。需要说明的是,此处仅做示例性说明,不对具体的M与N进行限定。
上述主要交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,上述对称设备和锥型设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对对称设备和锥型设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
下面对本申请中的对称设备进行详细描述,请参阅图5,图5为本申请实施例中对称设备的一种实施例示意图。对称设备50包括:
接收模块501,用于监听N个本地公有端口,其中,N为大于1的自然数;
发送模块502,用于当接收模块501在N个本地公有端口中接收打洞报文时,发送模块502根据打洞报文向锥型设备发送响应报文,以使得对称设备50与锥型设备建立通信连接,其中,打洞报文来自锥型设备,响应报文携带第一网络信息映射关系。
在本申请的一些实施例中,对称设备50包括:
发送模块502,还用于向信令服务器发送第一建链请求报文,第一建链请求报文中携带第一网络信息,以使得信令服务器根据第一网络信息向锥型设备发送第二网络信息映射关系。
在本申请的一些实施例中,对称设备50包括:
发送模块502,还用于对称设备50向信令服务器发送第一注册报文,第一注册报文携带第二网络信息映射关系,第二网络信息映射关系中包括第二网络信息。
以上实施例中,接收模块,可以由接收器或接收电路或输入接口实现,发送模块,可以由发送器或发送电路或输出接口实现。
下面对本申请中的锥型设备进行详细描述,请参阅图6,图6为本申请实施例中锥型设备的一种实施例示意图。锥型设备60包括:
发送模块601,用于向对称设备的M个公有端口发送打洞报文,其中,M为大于1的自然数;
处理模块602,用于根据响应报文与对称设备建立通信连接,其中,响应报文为对称 设备根据打洞报文发送的报文,响应报文携带第一网络信息映射关系。
在本申请的一些实施例中,锥型设备60包括:
接收模块603,用于接收第二网络信息映射关系,其中,第二网络信息映射关系为信令服务器根据第一建链请求报文向锥型设备60发送的,第一建链请求报文来自对称设备。
在本申请的一些实施例中,锥型设备60包括:
发送模块601,还用于向信令服务器发送第二建链请求报文,第二建链请求报文中携带第二网络信息,以使得信令服务器根据第二网络信息向锥型设备60发送第二网络信息映射关系;
接收模块603,还用于接收第二网络信息映射关系。
在本申请的一些实施例中,锥型设备60包括:
发送模块601,具体用于根据第二网络信息映射关系向对称设备的M个公有端口发送打洞报文。
在本申请的一些实施例中,锥型设备60包括:
发送模块601,还用于向信令服务器发送第二注册报文,第二注册报文携带第一网络信息。
以上实施例中,处理模块可以由处理器实现,接收模块,可以由接收器或接收电路或输入接口实现,发送模块,可以由发送器或发送电路或输出接口实现。
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其带来的技术效果与本申请方法实施例相同,具体内容可参见本申请前述所示的方法实施例中的叙述,此处不再赘述。
上面从模块化功能实体的角度对本申请实施例中的对称设备和锥型设备进行描述,下面从硬件处理的角度对本申请实施例中的对称设备和锥型设备进行描述。图7是本申请实施例中的通信装置的硬件结构一个示意图。如图7所示,该通信装置可以包括:
该通信装置包括至少一个处理器701,通信线路707,存储器703以及至少一个通信接口704。
处理器701可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,服务器IC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信线路707可包括一通路,在上述组件之间传送信息。
通信接口704,使用任何收发器一类的装置,用于与其他装置或通信网络通信,如以太网等。
存储器703可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储装置,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储装置,存储器可以是独立存在,通过通信线路707与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器703用于存储执行本申请方案的计算机执行指令,并由处理器701来控制执行。处理器701用于执行存储器703中存储的计算机执行指令,从而实现本申请上述 实施例提供的通信方法。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
在具体实现中,作为一种实施例,通信装置可以包括多个处理器,例如图7中的处理器701和处理器702。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个装置、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,通信装置还可以包括输出装置705和输入装置706。输出装置705和处理器701通信,可以以多种方式来显示信息。输入装置706和处理器701通信,可以以多种方式接收用户的输入。例如,输入装置706可以是鼠标、触摸屏装置或传感装置等。
上述的通信装置可以是一个通用装置或者是一个专用装置。在具体实现中,通信装置可以是台式机、便携式电脑、网络服务器、无线终端装置、嵌入式装置或有图7中类似结构的装置。本申请实施例不限定通信装置的类型。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的对称设备和锥型设备、单元以及模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的对称设备和锥型设备的实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介 质。
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种通信方法,其特征在于,包括:
    对称设备监听N个本地公有端口,其中,所述N为大于1的自然数;
    当所述对称设备在所述N个本地公有端口中接收打洞报文时,
    所述对称设备根据所述打洞报文向锥型设备发送响应报文,以使得所述对称设备与所述锥型设备建立通信连接,其中,所述打洞报文来自所述锥型设备,所述响应报文携带第一网络信息映射关系。
  2. 根据权利要求1所述的方法,其特征在于,所述对称设备监听所述N个本地公有端口之前,所述方法还包括:
    所述对称设备向信令服务器发送第一建链请求报文,所述第一建链请求报文中携带所述第一网络信息,以使得所述信令服务器根据所述第一网络信息向所述锥型设备发送第二网络信息映射关系。
  3. 根据权利要求2所述的方法,其特征在于,所述对称设备向信令服务器发送所述第一建链请求报文之前,所述方法还包括:
    所述对称设备向所述信令服务器发送第一注册报文,所述第一注册报文携带所述第二网络信息映射关系,所述第二网络信息映射关系中包括第二网络信息。
  4. 根据权利要求3所述的方法,其特征在于,所述第一网络信息映射关系包括所述对称设备的第一公有网际互联协议IP地址以及所述对称设备的第一公有端口号。
  5. 根据权利要求4所述的方法,其特征在于,所述第二网络信息映射关系包括所述对称设备的第二公有IP地址以及所述对称设备的第二公有端口号。
  6. 根据权利要求5所述的方法,其特征在于,所述第一网络信息包括所述锥型设备的用户身份识别号ID、所述锥型设备的媒体访问控制地址MAC地址或所述锥型设备的用户名。
  7. 根据权利要求6所述的方法,其特征在于,所述第二网络信息包括所述对称设备的用户身份识别号ID、所述对称设备的媒体访问控制地址MAC地址或所述对称设备的用户名。
  8. 一种通信方法,其特征在于,包括:
    锥型设备向对称设备的M个公有端口发送打洞报文,其中,所述M为大于1的自然数;
    所述锥型设备根据响应报文与所述对称设备建立通信连接,其中,所述响应报文为所述对称设备根据所述打洞报文发送的报文,所述响应报文携带第一网络信息映射关系。
  9. 根据权利要求8所述的方法,其特征在于,所述锥型设备向所述对称设备的所述M个公有端口发送所述打洞报文之前,所述方法还包括:
    所述锥型设备接收第二网络信息映射关系,其中,所述第二网络信息映射关系为信令服务器根据第一建链请求报文向所述锥型设备发送的,所述第一建链请求报文来自所述对称设备。
  10. 根据权利要求8所述的方法,其特征在于,所述锥型设备向所述对称设备的所述M个公有端口发送所述打洞报文之前,所述方法还包括:
    所述锥型设备向信令服务器发送第二建链请求报文,所述第二建链请求报文中携带第二网络信息,以使得所述信令服务器根据所述第二网络信息向所述锥型设备发送所述第二 网络信息映射关系;
    所述锥型设备接收所述第二网络信息映射关系。
  11. 根据权利要求9-10中任一项所述的方法,其特征在于,所述锥型设备向所述对称设备的所述M个公有端口发送所述打洞报文,包括:
    所述锥型设备根据所述第二网络信息映射关系向所述对称设备的所述M个公有端口发送所述打洞报文。
  12. 根据权利要求11所述的方法,其特征在于,所述锥型设备接收所述第二网络信息映射关系之前,所述方法还包括:
    所述锥型设备向所述信令服务器发送第二注册报文,所述第二注册报文携带所述第一网络信息。
  13. 根据权利要求12所述的方法,其特征在于,所述第一网络信息映射关系包括所述对称设备的第一公有网际互联协议IP地址以及所述对称设备的第一公有端口号。
  14. 根据权利要求13所述的方法,其特征在于,所述第二网络信息映射关系包括所述对称设备的第二公有IP地址以及所述对称设备的第二公有端口号。
  15. 根据权利要求14所述的方法,其特征在于,所述第一网络信息包括所述锥型设备的用户身份识别号ID、所述锥型设备的媒体访问控制地址MAC地址或所述锥型设备的用户名。
  16. 根据权利要求15所述的方法,其特征在于,所述第二网络信息包括所述对称设备的用户身份识别号ID、所述对称设备的媒体访问控制地址MAC地址或所述对称设备的用户名。
  17. 一种计算机设备,其特征在于,所述计算机设备包括:输入/输出(I/O)接口、处理器和存储器,
    所述存储器中存储有程序指令;
    所述处理器用于执行存储器中存储的程序指令,执行如权利要求1至7中任一所述的方法。
  18. 一种计算机设备,其特征在于,所述计算机设备包括:输入/输出(I/O)接口、处理器和存储器,
    所述存储器中存储有程序指令;
    所述处理器用于执行存储器中存储的程序指令,执行如权利要求8至16中任一所述的方法。
  19. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在计算机设备上运行时,使得所述计算机设备执行如权利要求1至7中任一项所述的方法。
  20. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在计算机设备上运行时,使得所述计算机设备执行如权利要求8至16中任一项所述的方法。
PCT/CN2020/097569 2019-06-24 2020-06-23 一种通信方法以及相关设备 WO2020259459A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP20830956.7A EP3962030A4 (en) 2019-06-24 2020-06-23 COMMUNICATION METHOD AND ASSOCIATED DEVICE
JP2021576477A JP7401564B2 (ja) 2019-06-24 2020-06-23 通信方法及び関連デバイス
US17/615,324 US20220224670A1 (en) 2019-06-24 2020-06-23 Communication method and related device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910549545.0A CN112134826B (zh) 2019-06-24 2019-06-24 通信方法,计算机设备和计算机可读存储介质
CN201910549545.0 2019-06-24

Publications (1)

Publication Number Publication Date
WO2020259459A1 true WO2020259459A1 (zh) 2020-12-30

Family

ID=73849300

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/097569 WO2020259459A1 (zh) 2019-06-24 2020-06-23 一种通信方法以及相关设备

Country Status (5)

Country Link
US (1) US20220224670A1 (zh)
EP (1) EP3962030A4 (zh)
JP (1) JP7401564B2 (zh)
CN (2) CN112134826B (zh)
WO (1) WO2020259459A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637382B (zh) * 2021-01-06 2022-04-26 上海哔哩哔哩科技有限公司 数据发送方法及装置、建立p2p连接的方法及系统
CN113542244B (zh) * 2021-07-01 2023-08-08 京东科技控股股份有限公司 微服务调用方法、装置、服务器和系统
CN116624361B (zh) * 2023-04-11 2024-03-22 北京通嘉宏瑞科技有限公司 真空泵工作方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938532A (zh) * 2010-09-17 2011-01-05 北京神州泰岳软件股份有限公司 基于udp的穿越nat设备的方法及系统
CN101945141A (zh) * 2010-09-17 2011-01-12 北京神州泰岳软件股份有限公司 基于tcp的穿越nat设备的方法及系统
US8631155B2 (en) * 2007-06-29 2014-01-14 Microsoft Corporation Network address translation traversals for peer-to-peer networks
CN108886539A (zh) * 2016-04-11 2018-11-23 西部数据技术公司 在位于nat之后的数据存储设备之间建立连接
CN109831547A (zh) * 2019-03-14 2019-05-31 腾讯科技(深圳)有限公司 Nat穿透方法、装置、设备及存储介质

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8224985B2 (en) * 2005-10-04 2012-07-17 Sony Computer Entertainment Inc. Peer-to-peer communication traversing symmetric network address translators
CA2557550A1 (en) * 2004-03-09 2005-09-22 Clique Communications Llc System and method for peer-to-peer connection of clients behind symmetric firewalls
US8571011B2 (en) * 2004-08-13 2013-10-29 Verizon Business Global Llc Method and system for providing voice over IP managed services utilizing a centralized data store
US11184224B2 (en) * 2006-09-25 2021-11-23 Remot3.It, Inc. System, method and compute program product for accessing a device on a network
US7764691B2 (en) * 2007-03-15 2010-07-27 Microsoft Corporation Allowing IPv4 clients to communicate using teredo addresses when both clients are behind a NAT
US7693091B2 (en) * 2007-03-30 2010-04-06 Microsoft Corporation Teredo connectivity between clients behind symmetric NATs
CN101056271A (zh) * 2007-06-06 2007-10-17 杭州华三通信技术有限公司 穿越nat的方法及相应的通信终端和nat设备
TWI441493B (zh) * 2007-11-27 2014-06-11 Ind Tech Res Inst 網路位址轉換的系統與方法
KR100930037B1 (ko) * 2007-12-17 2009-12-07 한국전자통신연구원 네트워크 주소 변환 시뮬레이션 방법 및 그 시스템
CN101820382B (zh) * 2009-02-28 2013-02-27 华为技术有限公司 一种通告网络地址转换设备信息的方法、装置和系统
TWI408936B (zh) * 2009-09-02 2013-09-11 Ind Tech Res Inst 網路穿透方法及網路通訊系統
JP5273001B2 (ja) 2009-09-30 2013-08-28 ブラザー工業株式会社 通信システム、端末装置、通信方法、及び通信プログラム
CN101977249B (zh) * 2010-10-27 2013-02-13 北京易视腾科技有限公司 穿透nat设备的方法
US9119067B2 (en) * 2011-06-03 2015-08-25 Apple Inc. Embodiments of a system and method for securely managing multiple user handles across multiple data processing devices
US8958559B2 (en) * 2011-06-03 2015-02-17 Apple Inc. System and method for secure instant messaging
TWI493924B (zh) * 2013-04-10 2015-07-21 D Link Corp Through the two network devices to help complete the STUN technology network system and its methods
US20160043844A1 (en) * 2014-08-11 2016-02-11 Qualcomm Incorporated Over the top methods for aggregation of wlan carriers to lte
CN104363312B (zh) * 2014-11-14 2018-07-13 浙江宇视科技有限公司 一种简洁高效的nat打洞方法和装置
CN107580082B (zh) * 2017-09-18 2021-03-26 北京奇艺世纪科技有限公司 一种对称型nat的穿透方法及装置
CN107360275B (zh) * 2017-09-18 2021-01-22 北京奇艺世纪科技有限公司 一种对称型nat端口的预测方法及装置
CN109600449A (zh) * 2018-12-24 2019-04-09 深圳市网心科技有限公司 一种p2p穿透方法、装置、系统及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8631155B2 (en) * 2007-06-29 2014-01-14 Microsoft Corporation Network address translation traversals for peer-to-peer networks
CN101938532A (zh) * 2010-09-17 2011-01-05 北京神州泰岳软件股份有限公司 基于udp的穿越nat设备的方法及系统
CN101945141A (zh) * 2010-09-17 2011-01-12 北京神州泰岳软件股份有限公司 基于tcp的穿越nat设备的方法及系统
CN108886539A (zh) * 2016-04-11 2018-11-23 西部数据技术公司 在位于nat之后的数据存储设备之间建立连接
CN109831547A (zh) * 2019-03-14 2019-05-31 腾讯科技(深圳)有限公司 Nat穿透方法、装置、设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3962030A4

Also Published As

Publication number Publication date
JP7401564B2 (ja) 2023-12-19
JP2022537070A (ja) 2022-08-23
CN114900496B (zh) 2024-03-15
EP3962030A1 (en) 2022-03-02
EP3962030A4 (en) 2022-06-22
US20220224670A1 (en) 2022-07-14
CN114900496A (zh) 2022-08-12
CN112134826A (zh) 2020-12-25
CN112134826B (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
WO2020259459A1 (zh) 一种通信方法以及相关设备
EP3815328B1 (en) Scalable sockets for quic
CN104137518B (zh) 在面向服务架构总线上的互联网协议连接
EP2536092A1 (en) Method and device for port mapping, and communications system
WO2020248963A1 (zh) 一种建立端到端网络连接的方法、装置及网络系统
US20110113142A1 (en) Smart client routing
TWI595765B (zh) 穿透網路位置轉換器之方法及通訊裝置
KR20120059077A (ko) 다중 네트워크 환경에서의 피어-투-피어 접속 시스템 및 방법
Klauck et al. Enhanced DNS message compression-Optimizing mDNS/DNS-SD for the use in 6LoWPANs
US8861503B2 (en) Method and system for synchronizing data between mobile terminal and internet phone
CN104735073A (zh) IPv4-IPv6过渡协议调度方法和装置
US10044590B2 (en) Method of effective retaining of NAT channel service
CN114598532B (zh) 连接建立方法、装置、电子设备和存储介质
JP2013126219A (ja) 転送サーバおよび転送プログラム
CN112929277B (zh) 一种报文处理方法及装置
CN109479060A (zh) Rcs始发分叉
CN110798542A (zh) 一种获取ip地址的方法及系统
CN111953804B (zh) 一种网络数据传输的方法、装置、介质和电子设备
US11765238B1 (en) Non-translated port oversubscribing for a proxy device
US20090141693A1 (en) Technique for Achieving Connectivity between Telecommunication Stations
US11902406B2 (en) Data communication using Constrained Application Protocol over local area network
US11330074B2 (en) TCP (transmission control protocol) fast open for classification acceleration of cache misses in a network processor
TW201713087A (zh) 網路位址轉換穿透方法以及使用該方法的系統
TW201545502A (zh) 網路連線策略管理裝置及方法
WO2019093189A1 (ja) 通信システムおよび通信装置

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: 20830956

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020830956

Country of ref document: EP

Effective date: 20211126

ENP Entry into the national phase

Ref document number: 2021576477

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE