WO2009114995A1 - Application-oriented name registration system and service method in multi-layer nat environment - Google Patents
Application-oriented name registration system and service method in multi-layer nat environment Download PDFInfo
- Publication number
- WO2009114995A1 WO2009114995A1 PCT/CN2009/000298 CN2009000298W WO2009114995A1 WO 2009114995 A1 WO2009114995 A1 WO 2009114995A1 CN 2009000298 W CN2009000298 W CN 2009000298W WO 2009114995 A1 WO2009114995 A1 WO 2009114995A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- user
- registration
- message
- network
- registration service
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 91
- 230000004044 response Effects 0.000 claims description 65
- 230000008569 process Effects 0.000 claims description 35
- 238000004891 communication Methods 0.000 claims description 27
- 238000013507 mapping Methods 0.000 claims description 11
- 238000003672 processing method Methods 0.000 claims description 11
- 238000013519 translation Methods 0.000 claims description 4
- 230000003993 interaction Effects 0.000 claims description 2
- 239000010410 layer Substances 0.000 description 63
- 239000003795 chemical substances by application Substances 0.000 description 17
- 239000011159 matrix material Substances 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 239000000284 extract Substances 0.000 description 11
- 238000012986 modification Methods 0.000 description 9
- 230000004048 modification Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 230000005540 biological transmission Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 2
- 238000011330 nucleic acid test Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- PBAYDYUZOSNJGU-UHFFFAOYSA-N chelidonic acid Natural products OC(=O)C1=CC(=O)C=C(C(O)=O)O1 PBAYDYUZOSNJGU-UHFFFAOYSA-N 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 239000002356 single layer Substances 0.000 description 1
- 230000005641 tunneling Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/256—NAT traversal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2521—Translation architectures other than single NAT servers
Definitions
- Multi-layer NAT environment to register the name of the application and its service method
- the invention belongs to the technical field of computer networks, in particular to a method for registering names of applications under the NAT environment. Background technique
- NAT Network Addres s Trans lator
- the NAT device provides the address translation function for the private network address of the NAT.
- the host in the private network can transparently access the external network address. Otherwise, the private network address of the host in the NAT is not routable on the external network. The host cannot directly access the host located in the private network. Therefore, a large number of services deployed in the private network, such as Web services, instant messages, and FTP services nodes, cannot be directly accessed by the external network of the private network.
- NAT Network Address Translation
- FTP service node Services on the private IP address of the NAT
- the peer-to-peer communication services (such as instant messaging, file sharing, and media transmission) deployed on the private network IP in the NAT can generally use the protocol of the RFC standard such as the ST volume, TURN, and ICE to relay through the public network service node.
- NAT tunneling, reverse join and other technologies provide services to hosts on the Internet.
- the task of the present invention is to provide a system and method for making a service in a private network visible to its external network, independent of a specific application, and providing a more reasonable access path for an external network node in a multi-layer NAT environment. .
- the multi-layer NAT environment registers a system with an application name
- the multi-layer NAT environment has a public network and at least one private network, and the private network accesses the public network through the address translation unit or Other private network
- the application-oriented name registration system includes a system terminal device for transmitting a login request and a registration service unit for receiving a login request, the registration service unit including a top-level registration service unit accessing the public network and connecting a basic registration service unit of the private network
- the registration service unit is configured to receive a login request message of the system terminal device, and record user login information of the system terminal device, where the user login information includes at least a user identifier and a system terminal used by the user The user access point of the device in the network accessed by the registration service unit and the system terminal device access point used by the system terminal device used by the user in the network accessed by the registration service unit.
- the registration service unit is further configured to perform an inquiry according to the recorded user login information, and determine a forwarding node between the system terminal devices.
- the user login point is a network address and port of the registration service unit or the system terminal device, or may be converted into a network address and a port of the registration service unit or the system terminal device.
- the query is to find the user login point with the shortest distance from the called party to the calling party NAT in all the user login points of the called party according to the user login information.
- the access point of the system terminal device is a network address and a port of the NAT device, or may be converted into a network address and an identifier of the port of the NAT device.
- the top-level registration service unit accesses the public network through the top-level service bus
- the basic registration service unit accesses the private network through the service bus
- the top-level registration service unit uses the network address of the public network for addressing
- the basic The registration service unit is addressed using the network address of the connected private network.
- the registration service unit includes: a registration service logic control unit, a basic configuration information record table, a hierarchical information record, a target registration server record, a sub-registration server record table, a user login information record table, and a user registration information record table. , message buffer and communication unit;
- the registration service logic control unit is configured to control execution of the registration service;
- the basic configuration information record table is used to record the identity of the unit, the host address of the unit, and the service port of the unit;
- the hierarchical information record is used for recording hierarchy information;
- the target registration server record Used to record the network address and port of the ancestor registration server;
- the sub-registration server record table is used to record the network address, port, identifier, and network address and port of the corresponding NAT device of the sub-registration service unit;
- the user login information record table is used for recording User identification, user login point and system terminal device access point;
- user registration information record table is used to record user account opening information;
- message buffer area is used for temporarily storing information in the received data packet and forwarding relationship record table; communication unit with top level
- the service bus device or the service bus device is connected and is responsible for transmitting and receiving data.
- the registration service logic control unit reads the unit identifier, the unit host address, the unit service port from the basic configuration information record table according to the execution requirement, reads the level information from the hierarchical information record, and reads the ancestor registration server from the target registration server record.
- the network address, the port, the network address, the port, the identifier, and the network address and port of the corresponding NAT device are read from the sub-registration server record table, and the user ID and the user login point are read from the user login information record table.
- a system terminal device access point reading the user identifier from the user registration information record table; reading from the message buffer area temporarily storing the information and the forwarding relationship in the received data packet, and reading the received data from the communication unit;
- the registration service logic control unit writes the unit identifier, the unit host address, and the unit service port to the basic configuration information record table according to the execution requirement, records the network address and port of the ancestor login server, and registers with the target registration server.
- Server record table Write the network address, port, identifier, and network address and port of the corresponding NAT device of the record sub-registration service unit, and write the user ID, the user login point, and the corresponding system terminal device access point to the user login information record table.
- the user registration information record table writes the user identifier; writes to the message buffer area to temporarily store the information in the received data packet, and forwards the relationship, and writes the data to be sent to the communication unit.
- the system terminal device includes: a terminal device control unit, a basic configuration information record table, a target registration service device record, a message buffer area, and a communication list.
- the terminal device control unit is configured to control execution of the terminal device;
- the basic configuration information record table is used to record the user identifier, the network address and port of the terminal device; and the target registration service device records the network address used to record the registration service device.
- a port the message buffer is used to temporarily store received or sent messages;
- the communication unit is used to connect to a public network or a private network;
- the terminal device control unit reads and writes information in the basic configuration information record table, the target registration service device record, and the message buffer area; and the terminal device control unit further transmits and receives data from the network through the communication unit.
- the method provided by the present invention for performing user login to the name registration system of the application under the multi-layer NAT environment includes the following steps:
- the system terminal device obtains a service entry of the basic registration service unit, and the service entry is a network address and a port or an identifier that can be converted into a network address and a port;
- the system terminal device sends a user login message to the basic registration service unit according to the service portal, where the user login message carries the user login information;
- the user login information described in this step includes at least the user identifier and the network address of the terminal device using the system. And the user login point defined by the port;
- the registration service unit records the user login information, and the registration service unit of the upper layer network forwards the user login message carrying the user login information; the user login information described in this step includes at least the user identifier;
- the registration service unit of the upper layer network After receiving the forwarded user login message, the registration service unit of the upper layer network repeats the operation of step 3) until the user login message is forwarded to the top-level registration service unit of the access public network.
- the user login point in the step 2), is a network address and a port, or may be converted into an identifier of a network address and a port; in the step 3), the user login point is a network address. And a port, or an identifier that can be translated into a network address and port; the system terminal device access point is a network address and port, or can be converted to an identifier for the network to the address and port.
- the registration service unit after receiving the user login message directly sent by the system terminal device, the registration service unit returns a response message to the system terminal device.
- an initialization step is further performed before the step 1), the initialization step is: firstly, starting a top-level registration service unit accessing the public network, and then starting the basic registration service unit of the private network to start layer by layer and Register with the name registration system to join the name registration system.
- the step 1) includes the following sub-steps:
- the system terminal device sends a service entry query message to a global service portal known to the name registration system;
- the registration service unit of the global service entry mapping determines whether it can directly serve as a service entry for providing service to the terminal device of the system. If the determination is yes, a success message is returned; if the determination is no, the system returns a redirect to the system terminal device. a message, the redirect message carries a service entry of a registration service unit of a lower layer network of a network to which the registration service unit to which the global service portal is mapped;
- the system terminal device sends a service entry query message to the registration service unit provided by the redirect message;
- the registration service unit determines whether it can directly serve as a service entry for providing service to the terminal device of the system. If the determination is yes, a success message is returned; if the determination is no, a redirect message is returned to the system terminal device, the weight
- the directed message carries a service entry of a registration service unit that accesses a lower layer network of a network to which the current registration service unit belongs;
- the global service entry is a network address and a port of a top-level registration service unit.
- step 1) includes the following sub-steps:
- the registration service unit broadcasts a broadcast message containing the local login service entry in the network to which it belongs;
- the system terminal device listens to the broadcast message to obtain a service entry.
- the registration service unit may send the broadcast message by using a registration service unit proxy.
- the processing method after the registration service unit receives the user login message includes the following steps:
- step 31 determining, according to the user login point in the message, whether the sender of the message is a lower layer registration service unit, if yes, go to step 32), if not, go to step 34);
- the user identifier in the message is used as the user identifier
- the source address and the source port point of the data packet carrying the message are used as the system terminal device access point
- the unit identifier is used as the user login point
- the user information record table stored in the unit is stored. In, go to step 38);
- the network address determines whether the user terminal is behind the NAT, if not, go to step 35), if yes, go to step 36);
- step 39 Determine whether the unit is a top-level registration service unit, if not, go to step 39); if yes, the registration process ends;
- step 33), step 33) is further performed as follows:
- the method for sending the user login message to the upper layer registration service unit is as follows:
- the user login point in the locally received user login message is replaced with the identifier of the local registration service unit, a new user login message is generated, and then the new user login message is sent to the upper registration service unit.
- the method further includes the step 5), and the step 5) is as follows:
- the registration service unit performs an inquiry according to the recorded user login information, and determines a forwarding node between the system terminal devices.
- the system terminal device sends a user login point search request message to the service portal of the name registration system, where the message includes at least the requested user identifier;
- the registration service unit searches the local user login information record table for the presence or absence of the user identifier of the requested user, and if yes, returns the user login point of the requested user; if not, the current registration service is accessed.
- the registration service unit of the upper layer network of the network to which the unit is connected forwards the user login point lookup request message;
- the registration service unit accessing the upper layer network searches the local user login information record table for the presence or absence of the requested user identifier, and if so, returns the user login point of the system terminal device of the requested user; if not, Access to the current registration service
- the registration service unit of the upper layer network of the network to which the unit is connected forwards the user login point lookup request message;
- step 53 repeating step 52) until the user login point of the requested system terminal device is obtained;
- the method for providing a forwarding service to the name registration system of the application provided by the present invention is characterized in that the registration service unit further includes a data forwarding module, and the method for providing a forwarding service includes the following steps:
- the system terminal device sends a forwarding service request message to the service portal of the name registration system, where the message includes at least the requested user identifier;
- the registration service unit searches the local user login information record table for the presence or absence of the user identifier of the requested user. If the user identifier of the requested user exists, it is determined whether the registration service unit includes a data forwarding module, such as determining that there is data.
- the forwarding module allocates and returns a network address and port that can forward data to the requesting user for the requesting user; if the user identifier of the requested user does not exist, or does not have a data forwarding module, accessing the current registered service unit
- the registration service unit of the upper layer network of the accessed network forwards the forwarding service request message;
- the registration service unit accessing the upper layer network searches for the presence of the requested user identifier in the local user login record table. If the user identifier of the requested user exists, it is determined whether the registration service unit includes a data forwarding module, such as determining There is a data forwarding module, which allocates and returns a network address and port that can forward data to the requesting user for the requesting user; if the user identifier of the requested user does not exist, or does not have a data forwarding module, the current registration is accessed.
- the registration service unit of the upper layer network to which the service unit accesses the network forwards the forwarding service request message;
- step 63 repeating step 62) until the requesting user obtains a network address and port that can forward data to the requested user;
- the present invention enables applications, services, users, etc. to be located by identification, enabling the services in the private network to be visible to its external network and independent of the specific application.
- the present invention also provides a system and method for providing a more reasonable access path for external network nodes.
- the invention utilizes the user login information saved in the system, and in the multi-layer NAT network, the system terminal device that requests the user to use finds the minimum NAT distance from the user, and can A node that forwards data to a system terminal device used by a requesting user.
- the invention can realize the delivery of the call message, thereby achieving the purpose of transmitting the connection request between the terminal devices of the system.
- applications, services, and users can be located by identification.
- Figure 1 is a schematic diagram of the same-root multi-layer NAT network
- Figure 2 is a schematic diagram of the structure of the application-oriented name registration system.
- Figure 3a is a schematic diagram of a NAT device accessing a network
- Figure 3b is a schematic diagram of the NAT device connection matrix
- Figure 4a is a schematic diagram of the structure of the registration service device
- Figure 4b is a schematic diagram of the structure of the registration service unit
- Figure 5 is the first setup process of the registration service device.
- Figure 6 is the second set up process of the registration service device
- Figure 7 is the third set up process for the registration service device.
- Figure 8 is a flow chart of the system service device requesting a local service entry from the registration service device based on the global service portal of the registration service device in the public network.
- Figure 9 is a flow chart of obtaining a local service entry by the system terminal device by listening to the service entry including the registration service device
- Figure 10 is another flow chart for the system terminal device to obtain the local service entry by listening to the service entry containing the registration service device.
- Figure 11 is a process in which the system terminal device used by the user sends user registration information (user account opening information) to the registration service device.
- Figure 12 is a process in which the system terminal device used by the user sends user login information to the registration service device.
- Figure 13 is the process of actively requesting the user to obtain the user login point of the requested user through the registration service system.
- FIG. 14 is a processing method after the registration service unit receives the "service unit registration message".
- FIG. 15 is a method for the registration service unit to register with the registration service device.
- FIG. 16 is a processing method after the registration service unit receives the "service entry inquiry message”.
- FIG. 17 is a method for the system terminal device to acquire the registration service device network address and port.
- FIG. 18 is a process for the registration service unit in the registration service device to receive "user”. Processing method after registration message
- FIG. 19 is a schematic diagram of a user sending user login information to a registration service device through a system terminal device.
- 21 is a schematic diagram of a user querying a registration service device for a user login point through a system terminal device
- Figure 22 is a schematic diagram of a registration service unit with a forwarding module
- FIG. 3 is the "forwarding service request" processing flow
- Figure 1 shows the same-root multi-layer NAT network, which is an example of the same-root multi-layer NAT network. Its characteristics are: Private network 4 through the NAT device 1 000 access to the public network 3, private network 4. Accessing the public network through the NAT device 1 000.
- the private network 4 of the private network 4 is the network controlled by the NAT device.
- the NAT device directly connected to the public network 3 is the root NAT device.
- the number of the minimum number of NAT devices that the NAT device controls from the private network to the public network 3 is the number of layers of the private network controlled by the NAT device, and the path is the shortest path from the private network controlled by the NAT device to the public network 3.
- a multi-layer NAT network can be thought of as a combination of multiple multi-rooted NAT networks. .
- Multi-layer NAT networks increase the number of users' accesses and make the relative positions of the two parties more complicated.
- the multi-layer NAT network turns the public network flat communication mode into a hierarchical communication mode.
- the typical relationship between the two parties is: (1) the two communicating parties are in the public network; (2) the communicating party is in the private network controlled by the NAT device and extended by the NAT device, and the other party is in the public network; The two communicating parties are in a private network controlled by the same NAT device; (4) the two communicating parties are in a private network controlled by different NAT devices, and the two NAT devices are connected to the public network through different root NATs; (5) communication Both parties are in a private network controlled by different NAT devices, and the two NAT devices are connected to the public network through the same root NAT.
- the network address of the NAT device refers to the network address bound to the external network interface of the NAT device.
- the NAT device NAT router external network interface can be bound to multiple network addresses. In network management, you can enumerate addresses or enumerate network segments.
- the method maps multiple network addresses to one NAT device. Ordinary users can access the network through the NAT device NAT router through the terminal (the basic function).
- the NAT device NAT router external network interface is generally bound to a network address. In the following description of the NAT device NAT router, a NAT device NAT router external network interface is only bound to one network address. Therefore, a NAT device can be represented by a network address bound to the external network interface of the NAT device. Development designers can easily find that the method described below is also applicable to NAT routers with external network interfaces bound to multiple network addresses.
- the network address of the NAT device is the network address bound to the NAT device's external network interface, or the NAT router address.
- the address can be either a public address or a private address.
- the network range controlled by the NAT device From the intranet interface of the NAT device, the network connected along the interface extends to another NAT external network interface, and the network between the two NAT devices does not exist between the two NAT devices. .
- the network cartridge is called a NAT-controlled network, or a network controlled by a NAT router.
- the NAT is the controlling NAT device of the network.
- Direct upper layer network If the external network interface of NAT device A is directly connected to the network controlled by NAT device B, the network controlled by NAT device B is the direct upper layer network of the network controlled by NAT device A; the public network is the network controlled by the root NAT device. Direct upper network.
- Direct lower layer network If the external network interface of NAT device A is directly connected to the network controlled by NAT device B, the network controlled by NAT device A is the direct lower layer network of the network controlled by NAT device B; the network controlled by the root NAT device is the public network. Directly underlying network.
- NAT path length The number of NAT devices in the reachable path from host A to B is the length of the NAT path.
- the shortest NAT path In the NAT environment, among the NAT paths of hosts A to B, the shortest NAT path is called the shortest NAT path from A to B. The number of NATs passing through is the shortest NAT path length.
- Upper-layer network The network from the direct upper-layer network of the network controlled by the current NAT device to the network controlled by each NAT device and the public network, which is the upper-layer network of the network controlled by the current NAT device.
- Lower layer network The network controlled by each NAT device from the direct network of the public network or the network directly controlled by the current NAT device, which is the lower layer network of the public network or the network controlled by the current NAT device.
- the network to which the device deployed on the public network belongs is a public network.
- the network to which the device of the network controlled by the NAT device belongs is a network controlled by the NAT device.
- the network to which the device belongs is the public network or the lower layer network of the network controlled by the current NAT device, then the device is behind the NAT.
- Parent Server The server located in the direct upper-layer network of the current NAT-controlled network is the parent server of the server in the network controlled by the current NAT device.
- Subserver A server located in the direct lower layer network of the public network or the current NAT controlled network is a subserver of the public network or the server in the current NAT controlled network.
- Ancestor server The current server and the parent server of the current server are the ancestor servers of the child servers of the current server.
- the multi-layer NAT network registers the system with the name of the application.
- a 0 is a new registration system, as shown in Figure 2.
- the system includes a registration service device 2001 and a system terminal device 6001.
- the registration service device 2001 is configured to record user registration (opening account) information, user login information, and provide user registration information and user login information query; the user uses the system terminal device 6001 to register user information with the registration service device 2001, log in to the system, and query user registration information. Query user login information.
- the invention can be used not only in the network environment in which the NAT device is built, but also in the network changing environment formed by other devices having the address translation function.
- the registration service device 2001 records the content of the user login information as: the user identifier, the user login point mapped to the public network and the related private network, and the user mapping to the public network and the related private network. System terminal access point.
- the registration service device 2001 can help the user to actively request the user to log in to the user login point of the requested user to determine the user login point with the shortest NAT path of the current communication device of the requesting user according to the user login information recorded by the system.
- the user login point in the network is the network address and port of the system terminal device used by the user; when the user is in the network controlled by the NAT device
- the user login point in the upper layer network of the network controlled by the NAT device is a network address and port for receiving the user login request message by the service unit of the network controlled by the access public network or the NAT device, or may be converted into a receiving user.
- System Terminal Access Point This access point is located on the NAT device and is generated when a user login message traverses the NAT device.
- the access point can be represented in two ways: 1) the network address and port of the NAT device; 2) the network address and port identifier that can be calculated or converted to the NAT device.
- Figure 2 shows the name registration service system.
- the name registration service system 1 0 includes: the registration service device 2001 is at least used for recording user registration information, user login information, and providing The user registration information and the user login information query, the registration service device service portal query, etc.; the top service bus 1 is used to access the registration service device to the public network 3; the service bus 2 is used to access the registration service device to the private network 4.
- the registration service device 2001 is connected to the public network 3 via the top service bus 1, and is connected to the private network 4 via the service bus 2.
- the public network 3 and the private network 4 are connected together through a NAT device connection matrix 1001.
- the system terminal device 6001 and the service device 2001 are connected to the public network 3 and the private network 4.
- FIG. 3 shows the connection mode of the NAT device connection matrix 1001.
- NAT device connection matrix The relationship between NAT devices within the 1001 is determined by the private network and the public network connected to the NAT device connection matrix 1001.
- the connection rules between the private network and the public network and the NAT device are:
- the NAT device connection matrix 1001 has at least one line 5 accessing the public network; each private network has at least one line 6 that accesses the NAT device connection matrix 1001; each private The network may not have, and there may be multiple lines 7 that are connected to the private network by the NAT device connection matrix 1001.
- b of FIG. 3 is a schematic diagram of a NAT device connection matrix 1001 connection.
- the public network 3, the private network 4, the NAT device connection matrix 1001 access to the public network line 5, the private network access the NAT device connection matrix 1001 line 6; the NAT device is connected to the matrix 1001 to access the private network line 7.
- the problem of overlapping between segments needs to be considered when deploying a multi-layer NAT network.
- the system must have the ability to discriminate and deal with overlapping problems between network segments.
- FIG. 4 shows the structure of the registration service device.
- the registration service device 2001 shown in Fig. 4a is composed of a top-level registration service unit 2011 and a plurality of basic registration service units 2021.
- the top-level registration service unit 2011 is connected to the public network 3 through the top-level service bus device 1, and is addressed using the network address of the public network;
- the basic registration service unit 2021 is connected to the private network 4 through the service bus device 2, and uses the connected private network.
- the network address is addressed.
- the registration service unit is a general term for the top-level registration service unit 2011 and the basic registration service unit 2021.
- the registration service unit 2801 is the basic functional structure of the top-level registration service unit 2011 and the basic registration service unit 2021.
- a registration service logic control unit 2100 at least includes: a registration service logic control unit 2100, a basic configuration information record table 2101, a hierarchy information record table 2102, a target registration server record table 2103, a child registration service unit record table 2104, and user login information.
- a function module such as a record table 2105, a user registration information record table 2106, a message buffer area 2109, and a communication unit 2110.
- the registration service logic control unit 2100 is configured to control the execution of the registration service;
- the basic configuration information record table 2101 is used to record the identity of the unit, the host address of the unit, and the service port of the unit;
- the hierarchical information record 2102 is used to record hierarchical information;
- the target registration server Record 2103 is used to record the network address and port of the ancestor registration server; sub-registration service
- the device record table 2104 is used to record the network address, port, identifier of the sub-registration service unit and the network address and port of the corresponding NAT device, as shown in Table la;
- the user login information record table 2105 is used to record the user ID, the user login point, and the system.
- the terminal device access point is shown in the table lb; the user registration information record table 2106 records at least the account opening information such as the user identifier of the account opening user; the message buffer area 2109 is used for temporarily storing the information in the received data packet and the forwarding relationship record table, see the table.
- the communication unit 2110 is connected to the top service bus device or the service bus device, and is responsible for transmitting and receiving data.
- the registration service logic control unit 2100 reads the unit identifier, the unit unit address, and the unit service port from the basic configuration information record table 2101 according to the execution requirement, reads the record level information from the hierarchical information record 2102, and reads from the target registration server record 2103.
- the network address and port of the registration service device are read, and the network address, port, identifier, and network address and port of the corresponding NAT device are read from the sub-registration server record table 2104, and read from the user login information record table 2105.
- the user identifier, the user login point, and the system terminal device access point are read, the user identifier is read from the user registration information record table 2106, and the information and the forwarding relationship in the temporarily stored received data packet are read from the message buffer 2109, and the communication is performed.
- the unit 2110 reads the received data; at the same time, the registration service logic control unit writes the unit identifier, the unit host address, the unit service port, and the target registration server record 2103 to the basic configuration information record table 2101 according to the execution requirement.
- Register the service device's network address To the sub-registration server record table 2104, write the network address, port, identifier, and network address and port of the corresponding NAT device of the record sub-registration service unit, and write the user ID, user login point, system to the user information record table 2105.
- the terminal device access point writes the user identifier to the user registration information record table 2106, and writes to the message buffer 2109 to temporarily save the received data packet.
- the information and forwarding relationship are written to the communication unit 21 1 0 to be sent.
- Service unit agent a special service unit. It is mainly used to expand the coverage of the service unit being served, or to provide a unified service portal to the system terminal equipment.
- the service unit agent can be deployed on the network or public network controlled by the same NAT device as the agent, or in the direct lower layer network of the network controlled by the NAT device to which the agent belongs.
- the service unit agent may broadcast the service entry of the agent or forward the message between the requester of the service device and the proxy service device.
- the network address and port that receive various messages in the service unit are hereinafter referred to as the monthly service portal.
- the system terminal device is at least configured to exchange information with the registration service device: obtaining a service entry from the registration service device, transmitting a user registration message to the registration service device, querying the registration service device for the user login point, and requesting the registration service device for the service unit having the forwarding capability .
- the terminal device includes at least the following: a terminal device control unit, a basic configuration information record table, a target registration service device record, a message buffer area, a communication unit, and the like.
- the terminal device control unit is configured to control the execution of the terminal device;
- the basic configuration information record table is used to record the user identifier, the network address of the terminal device, the port, and the like;
- the target registration service device records the network address and port used to record the registration service device.
- the message buffer is used to temporarily store received or sent messages; the communication unit is used for public or private network connections.
- the terminal device control unit reads and writes information from the basic configuration information record table, the target registration service device record, and the message buffer area.
- the terminal device control unit transmits and receives data from the network through a function module such as a communication unit.
- Data or messaging relationships are complex in multi-level NAT networks.
- the most single data or message delivery form is: without the NAT device, the system terminal device and the service unit communicate directly; after the NAT device, the system terminal device communicates with the service unit; without the NAT device, the service unit and the service unit communicate directly; After NAT equipment, service unit and service unit communication.
- the system terminal device and the service unit are data senders or message transmissions. If the data passes through the NAT device, the NAT device is a data sender or a message sender, and the NAT device receives data from the system terminal device and the service unit. Since the NAT device has a data transmission and reception relationship mapping table, the response message can be automatically forwarded.
- the registration service device stores user registration and login information. At the same time, the user registration and login information is returned for the user information finder.
- the process of registering the service unit to join the registration service device Starting by the top-level registration service unit, the registration service device is initially recognized, that is, the user information registration, the user login, the user registration and the login information inquiry service, and the service entry point inquiry service can be provided;
- the basic registration service unit in the network controlled by the root NAT device registers with the registration service device to join the system; again, the second layer NAT basic registration service unit registers with the registration service device to join the system; again, the third layer NAT basic registration service unit
- the registration service device is registered to join the system.
- the basic registration service unit sequentially joins the registration service device to provide services for the name registration service system 10 as needed.
- each registration service unit runs on a server.
- the registration service unit is composed of multiple servers, at least the existing user registration information and the content of the user login information are required, and the characteristics of the distributed system need to be expanded based on the existing information content to maintain the multi-service portal.
- the mapping relationship with the NAT device and the access relationship between the registered units When the registration service unit is composed of multiple servers, the developer is not difficult to extend the spirit of the method, and the features of the distributed system are extended in registration, login, query, and the like.
- FIG. 5 shows the process of establishing a registration service device.
- This process is an example of a registration service unit joining a registration service device.
- the registration service device 2001 performs initial recognition by the top-level registration server 201 1 installed in the public network.
- the top level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system defined method.
- the NAT device 1 01 0 directly accesses the public network and is the root NAT device.
- the registration service unit 2021 is deployed in a network controlled by the root NAT device.
- the NAT device modifies the source or destination address of the traversed data packet. The description of the modification of the data packet by the NAT device is ignored in the figure.
- the registration service unit 2021 in the network controlled by the root NAT device sends a "service unit registration message" to the top-level registration service unit 201 1; the message includes the network address, port, identity, and pre-fabricated level information of the registration service unit 2021. It indicates that the registration service unit 2021 is the first layer registration service unit, and the shortest distance of the network controlled by the belonging NAT device to the public network is 1.
- the top-level registration service unit 201 1 receives the "service unit registration message, and then, according to the network address of the data packet carrying the message and the registration service carried in the message Whether the network address of the service unit is the same, whether the message is converted by the NAT device; if the NAT device converts, extracts the hierarchical information in the registration request, if the level is greater than the current registered service unit, then in the sub-registration service unit record table Recording the network address, port, identity, and network address and port of the corresponding NAT device, and sending the message to return a registration success message; if the level of the hierarchy is less than 1 at the level of the currently registered service unit, The registration service unit record table does not have a record of the registration service unit corresponding to the NAT device, and returns a registration failure message; if the NAT device is not converted, a registration failure message is returned.
- FIG. 6 shows the process of establishing a registration service device.
- This process is an example of a registration service unit joining a registration service device.
- the top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method.
- the first NAT device 1 01 0 directly accesses the public network and is the root NAT device.
- the first registration service unit 2021 is deployed in a network controlled by the root NAT device 1000-1.
- the second NAT device 1 020 directly accesses the root NAT device 1 01 0 controlled network, and the second registration service unit 2031 is deployed in the network controlled by the second NAT device 1 020.
- the networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device.
- the NAT device modifies the passed data packet source or destination address. The description of the data packet modification by the NAT device is ignored in the figure.
- the second registration service unit 2031 in the network controlled by the second NAT device 1 020 sends a "service unit registration message" to the top-level registration service unit 201 1 , the message including the network address, port, identity of the registration service unit 2031,
- the prefabricated level information is 2, indicating that the registration service unit 2031 belongs to the shortest distance 2 of the network controlled by the NAT device 1 020 to the public network.
- the top-level registration service unit 201 1 receives the service unit registration message, and then determines whether the message passes through the NAT device according to whether the network address of the data packet carrying the message and the registration server network address carried in the registration application message are the same. Converting; if the NAT device converts, extracts the hierarchical information in the registration request, if the level difference between the level and the current registered service unit is greater than 1, the sub-registration service unit record table searches for the registration service unit corresponding to the NAT device, If the registration service unit exists, a redirect response message including the network address and port of the registration service unit corresponding to the NAT device 101 is returned to the second registration service unit 2031.
- the second registration service unit 2031 After receiving the redirect response message of the registration service device, the second registration service unit 2031 sends a "service unit registration message" to the registration service device according to the network address and port information of the registration service unit included in the message; the message includes The network address, port, and prefabricated level information of the second registration service unit 2031 is 2, indicating the shortest distance of the network controlled by the NAT device 1 020 to the public network to which the registration service unit 2031 belongs.
- the first registration service unit 2021 determines whether the message is converted by the NAT device according to whether the network address of the data packet carrying the message and the network address of the registration server carried in the registration application message are the same. If the NAT device converts, the hierarchical information in the registration request is extracted, and if the hierarchy is greater than the current registered service unit, the network address, port, and corresponding NAT of the registration service unit 2031 are recorded in the sub-registration service unit record table. The network address and port of the device 1 020 return a registration success message to the second registration service unit 2031; if the level difference between the level and the current registration service unit is greater than 1, the sub-registration service unit record table does not have the corresponding NAT device. Register the record of the service unit and return the registration failure message; if the NAT device has not been converted, return the registration failure message.
- FIG. 7 shows the registration service device assembly process.
- This process is an example of a registration service unit joining a registration service device.
- the top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method.
- the first NAT device 101 0 directly accesses the public network and is a root NAT device.
- the first registration service unit 2021 is deployed in the network controlled by the root NAT device 1010-1; the second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, the first registration service unit agent 2032 and the second registration service.
- the unit 2031 is deployed in a network controlled by the second NAT device 1 020.
- the networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device.
- the source or destination of the data packet passed by the NAT device The address is modified, and the description of the data packet modification by the NAT device is ignored in the figure.
- the first registration service unit agent 2032 broadcasts a message containing the first registration service device network address and port in the network controlled by the second NAT device 1 020.
- the second registration service unit 2031 listens for a message containing the first registration service device network address and port broadcast in the network controlled by the second NAT device 1 020.
- the second registration service unit 2031 After receiving the message including the registration service device network address and port, the second registration service unit 2031 sends a "service unit registration message" to the registration service device according to the network address and port of the registration service device provided in the message, and the message includes The network address, port, and prefabricated level information 2 of the second registration service unit 2031 indicate the shortest distance of the network controlled by the NAT device 1 020 to which the registration service unit 2031 belongs to the public network.
- the first registration service unit 2021 determines whether the message passes through the NAT device according to whether the network address of the data packet carrying the message and the registration server network address carried in the registration application message are the same; If the level information in the registration request is extracted by the NAT device, if the level is greater than the current registered service unit, the network address, the port, and the corresponding NAT device 1 of the registration service unit 2031 are recorded in the sub-registration service unit record table.
- the network address and port of 020 return a registration success message to the second registration service unit 2031; if the level difference between the level and the current registration service unit is greater than 1, the registration service unit record table does not have the registration service corresponding to the NAT device.
- the unit's record returns a registration failure message; if the NAT device is not passed, a registration failure message is returned.
- the second registration service unit agent shown in Figure 7 does not provide message forwarding. If necessary, it is not difficult for developers to develop a registration server proxy with message forwarding capabilities.
- the broadcast mode can use wired, wireless or wired and wireless, etc. depending on the network environment in which the various service agents are located.
- registration messages can be fully or partially encrypted for security reasons.
- Figure 14 is a registration service unit in the registration service device receives a "service unit registration message" Post processing method
- S1002 Whether the data packet is received, if no data packet is received, go to S1001, if the data packet is received, go to S1003;
- S1004 Determine whether it is "service unit registration message", if not, go to S1200, if yes, go to S1100;
- S1100 Determine whether the message passes through the NAT device according to the source address of the data packet carrying the message and the network address of the service unit in the message. If not, go to S1130, and if yes, go to S1120.
- S 1121 determining whether the difference between the level information of the layer and the current service unit is equal to 1, if not, transferring to S1140, if yes, to S1122;
- S1122 Record the service unit identifier, the network address, the port, the network address and port of the corresponding NAT in the sub-registration server record table,
- S1140 determining whether there is a sub-registration server in the network controlled by the NAT device corresponding to the source address of the data packet in the sub-registration server record, if not, transferring to S1130, if yes, to S1141;
- SI 141 return a redirect message containing the network address and port of the sub-registration server to the sender of the message, and return to S1001;
- S1200 discriminate whether it is a system response message, if not, go to S1300, if yes, go to S1201;
- S1201 Whether it is a failure message, if not, go to S1210, if yes, go to S1202; S1202: end
- S1210 Determine whether it is a redirect message, if not, go to S1220, if yes, go to S1211;
- S1211 trigger a redirect message processing process corresponding to the "service unit registration message", and return to S1001;
- FIG. 15 is a method of registering a registration service unit with a registration service device. In order to maintain the data transmission and reception mapping relationship in the NAT device, the registration service unit needs to perform this method periodically.
- S1801 Initialize the target registration server record as a top-level registry service unit service entry on the public network, and send a "service unit registration message" to the top-level registration service unit deployed on the public network.
- S1803 Determine whether the received information is a failure, if yes, go to S1804, if not, go to S1810;
- S1810 Determine whether the received information is successful. If yes, go to S1804. If not, go to S1820;
- S1820 Determine whether the received information is a redirect, if not, go to S1802, and if yes, go to S1821;
- S1822 Send the registration service device according to the network address and port in the redirect message.
- the network address and port of the registration service device 2001 serves as a service entry for the registration service device 2001.
- the name registration service device 2001 has different service entries for the public network and the private network.
- the service portal of the public network can be accessed by the system terminal device in the network controlled by the public network and each NAT device without special restrictions.
- This type of port is a global service entry; otherwise, the port can only be accessed by some system terminal devices. For local service entrances. After the terminal system 6001 obtains the service entry, it can make a request for registration, login, and inquiry to the registration service device 2001.
- the flowchart is an example in which the system terminal device obtains a registration service device service entry.
- the top-level registration service unit 2011 is equipped with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method.
- First NAT device 1010 Direct access to the public network, which is the root NAT device.
- the first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101; the second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, and the second basic registration service unit 2022 is deployed in the second.
- the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020.
- the networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device.
- the NAT device modifies the source or destination address of the data packet that has passed. The description of the modification of the data packet by the NAT device is ignored in the figure.
- System terminal device 6001 global service portal "Service Portal Query Message" to the registration service device;
- the top-level registration service unit 201 1 determines whether it can be executed according to logic (see Figure 16). If the return success message can be executed, if it cannot be executed, it is determined whether it can be redirected to the sub-registration service unit. , if a redirect message can be returned; (in this example, a redirect message containing the first basic registration service unit 2021 network address and port is returned)
- the system terminal device 6001 After receiving the redirect response message, the system terminal device 6001 sends a “service portal query message” to the registration service device according to the service portal of the registration service device included in the message;
- the first basic registration service unit 2021 determines whether it can be executed according to logic. If the return success message can be executed, if it cannot be executed, it is determined whether it can be redirected to the child registration service unit, if it can be returned Redirect message; (Redirect message containing the second basic registration service unit 2022 network address and port is returned in this example)
- the system terminal device 6001 sends a "service portal query message" to the registration service device according to the service portal of the registration service device included in the message; • the second basic registration service unit 2022 receives the "service portal query” After the message ", according to the logic to determine whether it can be executed, if the return success message can be executed, if it can not be executed, it is judged whether it can be redirected to the sub-registration service unit, if the redirect message can be returned, (the success response message is returned in this example)
- the system terminal device 6001 After receiving the success response message, the system terminal device 6001 stores the service entry of the registered service device included in the message in the local target registration service device record.
- the request message in Figure 8 can be sent or received via wired or / and wireless
- Figure 9 shows the flow of the local terminal entry by the system terminal device 6001 by listening to the service entry containing the registration service device.
- the flowchart is an example in which the system terminal device obtains a registration service device service entry.
- the top registration service unit 201 1 is equipped with a public network network address, The address and the port providing the service are well-known service portals within the system or can be obtained by a system defined method.
- the first NAT device 101 0 directly accesses the public network and is a root NAT device.
- the first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101 Q; the second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, and the second basic registration service unit 2022 is deployed in the second In the network controlled by the NAT device 1 020, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020.
- the networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device.
- the NAT device modifies the passed data packet source or destination address. The description of the data packet modification by the NAT device is ignored in the figure.
- the second basic registration service unit 2022 broadcasts a message containing the registration service device network address and port in the network to which the NAT is controlled;
- the system terminal device 6001 is listening for a broadcast message containing a message registering the service device network address and port;
- the system terminal device 6001 After receiving the broadcast message, the system terminal device 6001 stores the service entry of the registration service device included in the message in the record of the local target registration service device.
- the manner in which the service portal is published in the form of a broadcast as described in FIG. 9 can be replaced by means of publicity, pre-notification of the user, etc., and the system terminal device 6001 is manually configured by the user.
- FIG 10 shows the process of obtaining a local service entry by the system terminal device 6001 by listening to the service entry containing the registration service device.
- the flow chart is an example of a system terminal device obtaining a registration service device service entry.
- the top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method.
- the first NAT device 1 01 0 directly accesses the public network and is the root NAT device.
- the first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101.
- the second NAT device 1 020 directly accesses the network controlled by the root NAT device 100.
- the first basic registration service unit agent 202 3 is deployed in the network.
- the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020.
- the networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device.
- the NAT device modifies the source or destination address of the data packet that has passed. The description of the modification of the data packet by the NAT device is ignored in the figure.
- the first basic registration service unit agent 2023 broadcasts a message containing the registration service device network address and port in the network to which the NAT is controlled; • The system terminal device 6001 is listening for a broadcast message containing a message registering the service device network address and port;
- the system terminal device 6001 After receiving the broadcast message, the system terminal device 6001 stores the service entry of the registration service device included in the message in the record of the local target registration service device.
- the first registration service unit agent does not provide a message forwarding function. If necessary, it is not difficult for developers to develop a registration server proxy with message forwarding capabilities.
- the manner in which the service portal is published by broadcast in Fig. 10 can be replaced by means of publicity, advance notice to the user, and the like.
- the service client is manually configured by the user.
- Figure 16 shows the processing method after the registration service unit in the registration service device receives the "service entry inquiry message".
- S2004 Determine whether it is "service entry query message", if not, go to S2005, if yes, go to S2100;
- S2100 determining, according to the source address of the data packet carrying the message and the network address of the system terminal device in the message, whether the terminal device of the system is after the NAT, if not, then transferring to S2101, if yes, to S2200;
- S2200 Whether there is a sub-registration server in the network controlled by the NAT device corresponding to the source address of the data packet in the sub-registration server record table. If not, go to S2101, if yes, go to S2201;
- S2101 returning a success response message to the sender of the message, including the network address and port of the available registration service unit, and returning to S2001;
- Figure 17 shows how the system terminal device obtains the network address and port of the registration service device. In order to maintain the data transmission and reception mapping relationship in the NAT device, the system terminal device needs to perform the method periodically.
- S2802 Whether a broadcast message containing the service entry of the registration service device is received, if yes, go to S2806, if not, go to S2803;
- S2803 Send a "service portal query message" to a top-level registration service unit deployed on the public network, and initialize a local target registration service device record with a service portal of a top-level registration service unit deployed on the public network;
- S2805 Determine whether the received information is successful. If yes, go to S2807. If not, go to S2810.
- S2810 Determine whether the received information is a redirect, if not, go to S2804, if yes, go to S2811;
- S2811 The network address and port of the registration service device in the redirect message are stored in the local target registration service device record, and the service entry query message is sent to the registration service device according to the network address and port in the redirect message, and is returned.
- the top-level registration service unit 2011 is equipped with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method.
- the first NAT device 1010 directly accesses the public network and is a root NAT device.
- the first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 1010; the second NAT device 1020 directly accesses the network controlled by the root NAT device 1010, and the second basic registration service unit 2031 is deployed in the second NAT device 1020.
- the system terminal device 6001 is deployed in the network controlled by the second NAT device 1020; the system terminal device 6001 has obtained the service portal of the registration service device.
- the networked host and the networked device in the network controlled by the second NAT device 1020 can access the networked host and the networked device in the network controlled by the root NAT device.
- the NAT device modifies the source or destination address of the passed data packet. In this figure, the NAT device pair data is ignored. Description of group modification
- the system terminal device 6001 sends a “user registration message” to the top-level registration service unit 201 1 , where the message includes at least the user identifier and the network address of the user-used terminal; • the top-level registration service unit 201 1 registers with the user after receiving the user registration message.
- the NAT device determines whether the "user registration message" passes through the NAT device (for example, according to the carrying)
- the user registration message "the source address of the data packet and the user in the message use the network address of the terminal to determine whether the message passes through the NAT device", and if the NAT device passes, look up the sub-registration associated with the NAT device in the sub-registration server record a service unit, if the sub-registration service unit exists, returning a redirect response message including the service entry of the registration service unit; if the NAT device is not passed, or the NAT device does not have an associated registration service unit, a successful registration message is returned ; if the user is marked Presence, failed to return a reply message.
- the system terminal device After receiving the response message, the system terminal device ends the registration if it is a failure response message or a success response message. If it is a redirect response message, it sends a "user registration message" according to the registration service unit service entry in the message.
- the message includes at least User ID, the network address of the user using the terminal;
- the first registration service unit 2021 After the first registration service unit 2021 receives the user registration message, it searches for the same user identifier in the user registration information record table, and if the same user identifier does not add the user identifier and related information of the user to the user registration information record table, Determining whether the "user registration message" passes through the NAT device (for example, according to the source address of the data packet carrying the "user registration message” and the network address of the user using the terminal in the message to determine whether the message passes through the NAT device), if NAT is passed
- the device searches for a sub-registration service unit associated with the NAT device in the sub-registration server record, and if the sub-registration service unit exists, returns a redirect response message, where the message includes the service entry of the registration service unit; if not through NAT
- the device, or the NAT device does not have an associated sub-registration service unit returns a successful registration message; if the user identification exists, a failure response message is returned.
- the system terminal device After receiving the response message, the system terminal device ends the registration if it is a failure response message or a success response message. If it is a redirect response message, it sends a "user registration message" according to the registration service unit service entry in the message.
- the message includes at least User ID, the network address of the user using the terminal;
- the second registration service unit 2031 After the second registration service unit 2031 receives the user registration message, the user registration letter If the same user identifier is not found in the information record table, if the user ID and related information are not added to the user registration information record table, it is determined whether the "user registration message" passes through the NAT device (for example, according to the carrying)
- the user registration message "the source address of the data packet and the user in the message use the network address of the terminal to determine whether the message passes through the NAT device", and if the NAT device passes, look up the sub-registration associated with the NAT device in the sub-registration server record a service unit, if the sub-registration service unit exists, returning a redirect response message including the service entry of the registration service unit; if the NAT device is not passed, or the NAT device does not have an associated sub-registration service unit, the successful registration is returned Message; if the user ID exists, a failure reply message is returned.
- the system terminal device After receiving the response message, the system terminal device ends the registration if it is a failure response message or a success response message. If it is a redirect response message, it sends a "user registration message" according to the registration service unit service entry in the message.
- the message includes at least User ID, network address of the user's use terminal; Since the user registration information exists in a hierarchical manner in a multi-level NAT network, when the registration service unit receives the "user registration information query message", it can use multiple policies to query.
- first look up in the local user registration record table if the user exists, return a success message to the query requester; if the user does not exist, query the top-level registration service unit, if receiving the success message returned by the top-level registration service unit, The query requester returns a success message; if a failure message returned by the top-level registration service unit is received, a failure message is returned to the query requester.
- FIG. 1 2 shows the process in which the system terminal device used by the user sends user login information to the registration service device.
- the top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method.
- the first NAT device 101 0 directly accesses the public network and is a root NAT device.
- the first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101.
- the second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, and the second basic registration service unit 2031 is deployed in the second.
- the system terminal device 6001 In the network controlled by the NAT device 1 020, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020; the system terminal device 6001 has obtained the service portal of the registration service device. Second NAT device 1 020
- the networked host and networked device in the controlled network can access the networked host and the networked device in the network controlled by the root NAT device.
- the NAT device modifies the source or destination address of the passed data packet. The description of the modification of the data packet by the NAT device is ignored in the figure.
- the system terminal device 6001 sets the user login status to not registered, and sends a “user login message” to the registration service device according to the service portal of the locally stored registration service device, where the message includes at least a user identifier, a user login point, and the user login point.
- the network address and port of the system terminal device used by the user After receiving the user login message, the second basic registration service unit 2031 determines whether to record the user identification and related information according to logic, and decides whether to return the response message and return the response. Message; After recording the user login information, if the unit is not a top-level registration service unit, the user login message forwarded to the registration service device is recorded according to the local target registration server.
- the system terminal device After receiving the success response message, the system terminal device sets the user login status to login.
- the first basic registration service unit 2021 determines whether to record the user identification and related information according to logic, and determines whether to return the response message and return the response message; after recording the user login information, if the unit is recorded Not a top-level registration service unit, according to the local target registration server records the user login message forwarded to the registration service device,
- the top-level registration service unit 2011 After the top-level registration service unit 2011 user registration message, it is logically determined whether to record the user's identification and related information, and decide whether to return the response message and return the response message; after recording the user login information, if the unit is not the top registration service The unit records the user login message forwarded to the registration service device according to the local target registration server.
- the user needs to periodically send a user login message to the registration service device to ensure that the user status in the registration service device is online. If the registration service device does not receive a user login message for a certain user within a certain period of time, the registration service device sets the user's status to offline. If the system terminal device moves, the system terminal device needs to resend the user login message.
- S3002 Whether to receive the data packet, if no data packet is received, go to S3001, such as Received data packet, go to S3003
- S3004 Determine whether it is "user login message”. If not, go to S3005. If yes, go to S3100.
- S 3100 determining, according to the user login point in the message, whether the sender of the message is a child registration server, and if so, transferring to S3101, if not, to S3200;
- S3101 the user identifier in the message is used as the user identifier, the data packet source address and the source port carrying the message are the system terminal device access point, and the unit identifier is used as the user login point, and is stored in the user login information record table.
- S3300 is executed sequentially;
- S 3200 Find whether the user is registered in the system. If there is no registration, go to S 3290, if already registered, go to S3201,
- S 3201 Determine whether the system terminal device is behind the NAT according to the source address of the data packet carrying the message and the network address of the system terminal device used by the user in the message. If not, go to S3202, and if yes, go to S3203;
- S 3202 The user identifier in the message is used as the user identifier, and the user login point is used as the user login point, and is stored in the user login information record table;
- S3203 The user identifier in the message is used as the user identifier, the data packet source address and the source port carrying the message are the system terminal device access point, and the unit identifier is used as the user login point, and is stored in the user login information record table; S3204: return a success response message to the message sender;
- S3300 Determine whether the unit is a top-level registration server. If yes, go to S 3001, if not, go to S3301;
- S 3301 Generate a new user registration message by using the identifier of the unit instead of the user login point of the received message;
- S3302 Send a new user login message to the registration service device according to the local target registration server record, and return to S3001.
- FIG. 19 is a diagram in which a user sends user login information to a registration service device through a system terminal device.
- S3805 Determine whether it times out; if yes, go to S3809, if not, go to S3806
- S3806 judge whether it is a success message, if not, go to S3808, if yes, go to S3807
- S3807 set the terminal status to login
- S3808 Determine whether it is a failure message. If yes, go to S 3809. If not, go to S 3804. It is not difficult for the developer to improve according to the user login method described above and the user registration requirements, to complete the user registration and account opening tasks.
- FIG. 13 is a process of actively requesting a user to acquire a user login point of a requested user through a registration service system, and the process is an example of a process of acquiring a user login point of a requested user.
- the top-level registration service unit 2011 is equipped with a public network network address, which is a well-known service portal within the system or can be obtained by a system-defined method.
- the first NAT device 1010 directly accesses the public network and is the root NAT device.
- the first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 1010; the second NAT device 1020 directly accesses the network controlled by the root NAT device 1010, and the second basic registration service unit 2031 is deployed in the second NAT device 1020.
- the system terminal device 6001 is deployed in the network controlled by the second NAT device 1020; the system terminal device 6001 has obtained the service portal of the registration service device.
- the networked host and the networked device in the network controlled by the second NAT device 1020 can access the networked host and the networked device in the network controlled by the root NAT device.
- the NAT device modifies the passed data packet source or destination address. The description of the data packet modification by the NAT device is ignored in the figure.
- the system terminal device 6001 sends a "user login point lookup request message" to the registration service device according to the locally stored target registration service device record port, and the message includes at least the requested user identifier and the random serial number.
- the second registration service unit 2031 After receiving the "user login point lookup request message", the second registration service unit 2031 extracts the requested user identifier in the message, and searches in the user login information record table, if the requested user identifier exists in the user login information record table. Returning to the message sender a success message containing the current user login point of the requested user, including the pair The random sequence number in the original request message; if the requested user identifier does not exist in the user login information record table, and the service node is not the top-level registration service unit, the mapping relationship between the message and the message sender is established according to the random sequence number in the message. And saving the mapping relationship in the message buffer, and forwarding the "user login point lookup request message" to the registration service device according to the local registration server record;
- the first registration service unit 2021 After receiving the "user login point lookup request message", the first registration service unit 2021 extracts the requested user identifier in the message, and searches in the user login information record table, if the requested user identifier exists in the user login information record table. Returning a success message including the current user login point of the requested user to the message sender, where the message includes a random sequence number in the corresponding original request message; if the requested user identifier does not exist in the user login information record table, and the service node It is not the top-level registration service unit, and the mapping relationship between the message and the sender of the message is established according to the random sequence number in the message, and the mapping relationship is saved in the message buffer area, and the user login point search is forwarded to the registration service device according to the local registration server record.
- Request message
- the top-level registration service unit 201 1 After receiving the "user login point lookup request message", the top-level registration service unit 201 1 extracts the requested user identifier in the message, and searches in the user login information record table, if the requested user identifier exists in the user login information record table. Returning a success message including the current user login point of the requested user to the message sender, where the message includes a random sequence number in the corresponding original request message; if the requested user identifier does not exist in the user login information record table, and the service node Is a top-level registration service unit, and returns a failure message to the message sender, where the message includes a random sequence number in the corresponding original request message;
- the first registration service unit 2021 After receiving the response message, the first registration service unit 2021 finds the corresponding sender node lookup request message sender according to the random number in the response message, and forwards the response message to the sender.
- the second registration service unit 2022 After receiving the response message, the second registration service unit 2022 finds the corresponding sender node lookup request message sender according to the random number in the response message, and forwards the response message to the sender.
- the system terminal device 6001 After receiving the response message, the system terminal device 6001 records the user login point of the requested user in the message if it is a success response message; if it is a failure response message, it ends.
- the above process is the basic process of finding a user login point that satisfies the condition. It is not difficult for developers to extend, change, and find the above processes based on the needs of specific applications. After the user logs in, the subsequent execution process is changed. However, it does not affect the nature of the process of querying the user's login point based on the requested user ID. 20 is a processing method after the registration service unit in the registration service device receives the "user login point lookup request message"
- S4002 Whether to receive the data packet, if no data packet is received, go to S4001, if the data packet is received, go to S4003;
- S4004 Determine whether it is "user login point lookup request message", if not, go to S4005, if yes, go to S4100;
- S4101 Find the corresponding sender in the forwarding relationship list, if any, go to S4106, if not, go to S4102;
- S4103 Query whether the requested user identifier exists in the user login information record table, if yes, go to S4200, if not, go to S4104;
- S4104 Determine whether the unit is a top-level registration server, if yes, go to S4107, if not, go to S4105;
- S 4105 Establish a correspondence between the sender of the message and the message according to the random sequence in the message, and store the information in the forwarding relationship table.
- S4106 Forward a "user login point lookup request message" to the registration service device according to the local target registration server record, and return to S4001;
- S4200 returning a success message to the sender of the message, where the message includes the user login point of the requested user in the user login information record table, and returns to S4001;
- S4005 Determine whether it is a response message of "user login point lookup request message", if not, go to S4006, if yes, go to S4300;
- S4301 Find the corresponding sender in the forwarding relationship list, if any, go to S4302, if not, go to S4001;
- S4302 Forward the response message to the sender of the message corresponding to the random sequence, and delete the related items in the forwarding relationship list, and return to S4001;
- 21 is a user querying a registration service device for a user login point through a system terminal device.
- S4803 Send a “user login point lookup request message” to the registration service device according to the record of the local target registration server, where the message includes a random serial number;
- S4805 Determine whether it times out, if yes, go to S4806, if not, go to S4810;
- S4810 Determine whether the random numbers in the message are the same, if different, go to S4804;
- S4820 Whether it is a success message, if not, go to S4830, if yes , to S4821;
- S4821 extract the network address and port in the message;
- S4806 Send a "user login point lookup request message" to the registration service device according to the record of the local target registration server, and the message includes a random serial number, and returns to S4804.
- Information request message including user login point
- For "ingress query messages” include the network address and port.
- Failure response Send a message type identifier to the message.
- the messager returns a failure.
- the response message is paired.
- the redirected outgoing message is sent with a message type identifier, and the redirected message returns one of the respondent messages including the corresponding reply for the respondent.
- Register service request message type Query the registration device's network location Service entry message, address and port Return to the corresponding network
- Figure 22 is a registration service unit with a forwarding module.
- the registration service unit with the data forwarding module is an example in which the registration service device provides a forwarding service for the user.
- the data forwarding service unit 2108 is for forwarding data between system terminal devices.
- the flow of the registration service device processing the forwarding service request is as shown in FIG. 23.
- "Forwarding Service Request" submitted by the system terminal device The message includes at least: the message type, the random number, and the identifier of the requester.
- S5004 Determine whether it is "forwarding service request”. If yes, go to S5100, if not, go to S5005
- S5100 Extract the sequence number in the message, and find in the corresponding table whether the sequence number exists. If it exists, go to S5202. If it does not exist, go to S5101.
- S5101 Determine whether the service unit has a forwarding service module. If yes, go to S5102. If not, go to S5200.
- S5102 determining whether the requested identifier is in the user login information record table, if yes, go to S5103, if not, go to S5200;
- S5103 Allocating a network address and a port that can forward data to the requester according to the requester information
- S5104 Returning a success response message to the message sender, where the message includes a network address and port that can provide a forwarding service, and returns to S5001;
- S5200 Determine whether the unit is a top-level service unit. If yes, go to S5203. If not, go to S5201.
- S5201 Extract a random sequence number in the message, and establish a forwarding correspondence relationship with the message sender based on the sequence number, and store in the forwarding correspondence table;
- S5202 According to the local target registration server record, forward the "forwarding service request" to the registration service device, and return to S5001;
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
An application-oriented name registration system in multi-layer NAT environment is disclosed, including system terminal device and registration service unit which comprises top-layer registration service unit connected to public network and basic registration service unit connected to private network; the registration service unit is used to receive login request message from the system terminal device and record the user login information of the system terminal device, and the user login information includes at least the user identification, the user login point of the system terminal device used by the user in the network to which the registration service unit is connected, and the system terminal device access point of the system terminal device used by the user in the network to which the registration service unit is connected. The invention can locate the position through the identification in the multi-layer NAT network environment, and make the service in the private network visible to the external network and irrelevant to specific applications. A system and a method that provide more proper access route for the external network nodes are also disclosed.
Description
多层 NAT环境下面向应用的名字注册系统及其服务方法 技术领域 Multi-layer NAT environment to register the name of the application and its service method
本发明属于计算机网络技术领域, 特别是 NAT环境下面向应用 的名字注册方法。 背景技术 The invention belongs to the technical field of computer networks, in particular to a method for registering names of applications under the NAT environment. Background technique
1、 NAT普遍部署导致的服务访问问题 1. Service access problems caused by NAT deployment
众所周知由于 IP地址地址空间有限以及分配上的不均勾, 导致 网络地址严重缺乏, 从实际应用和部署上看, NAT ( Network Addres s Trans lator )技术是解决 IP地址不足情况下网民接入互联网的重要 方法。 随着个人信息设备的增多, 网络接入设备的普及, 网络技术的 发展,越来越多的公司、 团体和家庭希望将这些设备以网络的方式组 织在一起, 并接入互联网, 而且出于安全的考虑, 如何在网络上隐藏 高安全等级的节点是 4艮多公司面临的问题,在这种 IP地址严重缺乏、 设备组网互联需求迫切并且存在大量安全隐患的情况下,通过 NAT技 术形成的单级或者多层私网结构接入互联网在实际部署中已经越来 越普遍和流行 ( 可参考文献 Ford B, Sr i suresh P, Kegel D. Peer-to-peer communica t ion acros s network addres s trans lator s. USENIX annua l technica l Conf erence, 2005 )。 It is well known that due to the limited IP address space and the uneven distribution of the network, the network address is seriously lacking. From the perspective of practical application and deployment, NAT (Network Addres s Trans lator) technology is to solve the problem of Internet users accessing the Internet when the IP address is insufficient. Important method. With the increase of personal information devices, the popularity of network access devices, and the development of network technologies, more and more companies, groups, and families hope to organize these devices in a networked manner and access the Internet. Security considerations, how to hide high-security nodes on the network is a problem faced by more than 4 companies. In the case of such a serious lack of IP addresses, urgent need for network interconnection, and a large number of security risks, NAT technology is formed. Single-layer or multi-layer private network access to the Internet has become more and more popular and popular in actual deployment (refer to Ford B, Sr i suresh P, Kegel D. Peer-to-peer communica t ion acros s network addres s trans lator s. USENIX annua l technica l Conf erence, 2005 ).
NAT设备为 NAT下的私网地址提供地址翻译功能, 使得私网内的 主机可以透明地访问外部网络地址, 反之不可以, NAT下主机的私网 地址在外部网络中是不可路由的,外部网络主机无法直接访问位于私 网内的主机。 因而, 部署在私网内的大量服务比如 Web服务、 即时消 息、 f tp服务节点等无法直接被此私网的外部网络所直接访问。 The NAT device provides the address translation function for the private network address of the NAT. The host in the private network can transparently access the external network address. Otherwise, the private network address of the host in the NAT is not routable on the external network. The host cannot directly access the host located in the private network. Therefore, a large number of services deployed in the private network, such as Web services, instant messages, and FTP services nodes, cannot be directly accessed by the external network of the private network.
2、 现有技术的解决办法及其存在的问题 2. Prior art solutions and their problems
目前互联网上的各种服务一般都是拥有全球统一 IP 地址, 在 NAT内私网 IP地址上的服务(如 Web服务节、 FTP服务节点)一般只 在该私网内部可见,该私网外的其他主机域无法知道该服务并对其进 行访问。 而部署在 NAT内私网 IP上的对等通信服务(如即时消息、 文件共享和媒体传输等), 一般可以利用 ST冊、 TURN, ICE等 RFC标 准的协议, 通过公网服务节点中继、 NAT 穿洞、 反转联接等技术向 Internet 上主机提供服务。 不难发现, 这些实现方案都是跟具体应
用紧密相关的, 是作为一个功能模块内嵌在应用中, 而且对于和该服 务位于同根多层 NAT下的主机节点而言,也要通过公网服务节点中继 提供服务, 这显然是不合理的。 如何提供一种统一的解决办法, 使得 私网内的服务对其外部网络可见, 做到与具体应用无关, 并且为外部 网络节点提供更为合理的访问途径, 是本发明要重点解决的问题。 Currently, various services on the Internet generally have a globally uniform IP address. Services on the private IP address of the NAT (such as a Web service node and an FTP service node) are generally only visible inside the private network, and outside the private network. Other host domains cannot know about the service and access it. The peer-to-peer communication services (such as instant messaging, file sharing, and media transmission) deployed on the private network IP in the NAT can generally use the protocol of the RFC standard such as the ST volume, TURN, and ICE to relay through the public network service node. NAT tunneling, reverse join and other technologies provide services to hosts on the Internet. It is not difficult to find that these implementations are specific Closely related, it is embedded in the application as a function module, and for the host node under the same multi-layer NAT with the service, it is also required to provide services through the public network service node relay, which is obviously unreasonable. of. How to provide a unified solution, making the services in the private network visible to its external network, independent of the specific application, and providing a more reasonable access path for the external network node is a problem to be solved by the present invention.
发明内容 Summary of the invention
因此, 本发明的任务是在多层 NAT环境下, 提供一种使得私网 内的服务对其外部网络可见, 与具体应用无关, 并且为外部网络节点 提供更为合理的访问途径的系统和方法。 Therefore, the task of the present invention is to provide a system and method for making a service in a private network visible to its external network, independent of a specific application, and providing a more reasonable access path for an external network node in a multi-layer NAT environment. .
为实现上述发明目的, 本发明提供的多层 NAT环境下面向应用 的名字注册系统, 所述多层 NAT环境具有公有网络和至少一个私有 网络, 所述私有网络通过地址转换单元接入公有网络或其它私有网 络; 所述面向应用的名字注册系统包括用于发送登录请求的系统终 端设备和用于接收登录请求的注册服务单元, 所述注册服务单元包 括接入公有网络的顶层注册服务单元和接入私有网络的基本注册服 务单元; 所述注册服务单元用于接收系统终端设备的登录请求消 息,并记录该系统终端设备的用户登录信息,该用户登录信息至少包 括用户标识、用户使用的系统终端设备在所述注册服务单元接入的网 络中的用户登录点和用户使用的系统终端设备在所述注册服务单元 接入的网络中的系统终端设备访问点。 To achieve the above object, the multi-layer NAT environment provided by the present invention registers a system with an application name, the multi-layer NAT environment has a public network and at least one private network, and the private network accesses the public network through the address translation unit or Other private network; the application-oriented name registration system includes a system terminal device for transmitting a login request and a registration service unit for receiving a login request, the registration service unit including a top-level registration service unit accessing the public network and connecting a basic registration service unit of the private network; the registration service unit is configured to receive a login request message of the system terminal device, and record user login information of the system terminal device, where the user login information includes at least a user identifier and a system terminal used by the user The user access point of the device in the network accessed by the registration service unit and the system terminal device access point used by the system terminal device used by the user in the network accessed by the registration service unit.
上述技术方案中, 所述注册服务单元还用于根据所记录的所述 用户登录信息进行查询, 并在系统终端设备之间确定转发节点。 In the above technical solution, the registration service unit is further configured to perform an inquiry according to the recorded user login information, and determine a forwarding node between the system terminal devices.
上述技术方案中, 所述用户登录点为注册服务单元或系统终端 设备的网络地址和端口,或可以被转化为注册服务单元或系统终端设 备的网络地址和端口的标只。 In the above technical solution, the user login point is a network address and port of the registration service unit or the system terminal device, or may be converted into a network address and a port of the registration service unit or the system terminal device.
上述技术方案中, 所述查询是根据用户登录信息在被叫方所有 用户登录点中查找出被叫方到主叫方 NAT距离最短的用户登录点。 In the above technical solution, the query is to find the user login point with the shortest distance from the called party to the calling party NAT in all the user login points of the called party according to the user login information.
上述技术方案中, 所述系统终端设备访问点为 NAT设备的网络 地址和端口, 或可以被转换为 NAT设备的网络地址和端口的标识。 In the foregoing technical solution, the access point of the system terminal device is a network address and a port of the NAT device, or may be converted into a network address and an identifier of the port of the NAT device.
上述技术方案中, 所述顶层注册服务单元通过顶级服务总线接 入公有网络, 所述基本注册服务单元通过服务总线接入私有网络, 所述顶级注册服务单元使用公有网络的网络地址进行编址,所述基本
注册服务单元使用相连的私有网络的网络地址进行编址。 In the above technical solution, the top-level registration service unit accesses the public network through the top-level service bus, the basic registration service unit accesses the private network through the service bus, and the top-level registration service unit uses the network address of the public network for addressing, The basic The registration service unit is addressed using the network address of the connected private network.
上述技术方案中, 所述注册服务单元包括: 注册服务逻辑控制 单元、 基本配置信息记录表、 层级信息记录、 目标注册服务器记录、 子注册服务器记录表、 用户登录信息纪录表、 用户注册信息记录表、 消息緩存区和通信单元; In the above technical solution, the registration service unit includes: a registration service logic control unit, a basic configuration information record table, a hierarchical information record, a target registration server record, a sub-registration server record table, a user login information record table, and a user registration information record table. , message buffer and communication unit;
所述注册服务逻辑控制单元用于控制注册服务的执行;基本配置 信息记录表用于记录本单元标识、本单元主机地址、本单元服务端口; 层级信息记录用于记录层级信息; 目标注册服务器记录用于记录祖先 注册服务器的网络地址、端口; 子注册服务器记录表用于记录子注册 服务单元的网络地址、端口、标识及对应的 NAT设备的网络地址和端 口; 用户登录信息纪录表用于记录用户标识、 用户登录点和系统终端 设备访问点; 用户注册信息记录表用于记录用户开户信息; 消息緩存 区用于暂时保存接收到的数据分组中的信息及转发关系纪录表;通信 单元同顶级服务总线装置或服务总线装置联接, 负责收发数据。 The registration service logic control unit is configured to control execution of the registration service; the basic configuration information record table is used to record the identity of the unit, the host address of the unit, and the service port of the unit; the hierarchical information record is used for recording hierarchy information; the target registration server record Used to record the network address and port of the ancestor registration server; the sub-registration server record table is used to record the network address, port, identifier, and network address and port of the corresponding NAT device of the sub-registration service unit; the user login information record table is used for recording User identification, user login point and system terminal device access point; user registration information record table is used to record user account opening information; message buffer area is used for temporarily storing information in the received data packet and forwarding relationship record table; communication unit with top level The service bus device or the service bus device is connected and is responsible for transmitting and receiving data.
上述技术方案中, 所述注册服务单元的各组成部分的相互作用 关系如下: In the above technical solution, the interaction relationship between the components of the registration service unit is as follows:
注册服务逻辑控制单元根据执行需要从基本配置信息记录表读 取本单元标识、 本单元主机地址、 本单元服务端口, 从层级信息记录 读取层级信息,从目标注册服务器记录读取祖先注册服务器的网络地 址、 端口,从子注册服务器记录表读取记录子注册服务单元的网络地 址、 端口、 标识及对应的 NAT设备的网络地址和端口, 从用户登录信 息纪录表读取用户标识、 用户登录点、 系统终端设备访问点, 从用户 注册信息记录表中读取用户标识;从消息緩存区读取暂时保存接收到 的数据分组中的信息及转发关系,从通信单元读取收到的数据;同时, 注册服务逻辑控制单元根据执行需要向基本配置信息记录表写入本 单元标识、 本单元主机地址、 本单元服务端口, 向目标注册服务器记 录写入祖先登录服务器的网络地址、端口, 向子注册服务器记录表写 入记录子注册服务单元的网络地址、端口、标识及对应的 NAT设备的 网络地址和端口,向用户登录信息纪录表写入用户标识、用户登录点、 及对应的系统终端设备访问点,向用户注册信息记录表中写入用户标 识; 向消息緩存区写入暂时保存接收到的数据分组中的信息, 及转发 关系, 向通信单元写入需要发出的数据。 The registration service logic control unit reads the unit identifier, the unit host address, the unit service port from the basic configuration information record table according to the execution requirement, reads the level information from the hierarchical information record, and reads the ancestor registration server from the target registration server record. The network address, the port, the network address, the port, the identifier, and the network address and port of the corresponding NAT device are read from the sub-registration server record table, and the user ID and the user login point are read from the user login information record table. a system terminal device access point, reading the user identifier from the user registration information record table; reading from the message buffer area temporarily storing the information and the forwarding relationship in the received data packet, and reading the received data from the communication unit; The registration service logic control unit writes the unit identifier, the unit host address, and the unit service port to the basic configuration information record table according to the execution requirement, records the network address and port of the ancestor login server, and registers with the target registration server. Server record table Write the network address, port, identifier, and network address and port of the corresponding NAT device of the record sub-registration service unit, and write the user ID, the user login point, and the corresponding system terminal device access point to the user login information record table. The user registration information record table writes the user identifier; writes to the message buffer area to temporarily store the information in the received data packet, and forwards the relationship, and writes the data to be sent to the communication unit.
上述技术方案中, 所述系统终端设备包括: 终端设备控制单元、 基本配置信息记录表、 目标注册服务装置记录、 消息緩存区和通信单
元; 所述终端设备控制单元用于控制终端设备的执行; 基本配置信息 记录表用于记录用户标示、本终端设备的网络地址和端口; 目标注册 服务装置记录用于记录注册服务装置的网络地址和端口;消息緩存区 用于暂时存储收到或发出的消息;通信单元用于与公有网络或私有网 络连接; In the above technical solution, the system terminal device includes: a terminal device control unit, a basic configuration information record table, a target registration service device record, a message buffer area, and a communication list. The terminal device control unit is configured to control execution of the terminal device; the basic configuration information record table is used to record the user identifier, the network address and port of the terminal device; and the target registration service device records the network address used to record the registration service device. And a port; the message buffer is used to temporarily store received or sent messages; the communication unit is used to connect to a public network or a private network;
上述技术方案中, 所述终端设备控制单元在基本配置信息记录 表、 目标注册服务装置记录和消息緩存区读写信息; 终端设备控制单 元还通过通信单元从网络收发数据。 In the above technical solution, the terminal device control unit reads and writes information in the basic configuration information record table, the target registration service device record, and the message buffer area; and the terminal device control unit further transmits and receives data from the network through the communication unit.
本发明提供的利用所述多层 NAT环境下面向应用的名字注册系 统进行用户登录的方法, 包括如下步骤: The method provided by the present invention for performing user login to the name registration system of the application under the multi-layer NAT environment includes the following steps:
1 ) 系统终端设备获取基本注册服务单元的服务入口, 该服务入 口是网络地址和端口或者可以转化为网络地址和端口的标识; 1) The system terminal device obtains a service entry of the basic registration service unit, and the service entry is a network address and a port or an identifier that can be converted into a network address and a port;
2 )系统终端设备根据服务入口向基本注册服务单元发送用户登 录消息,所述用户登录消息携带用户登录信息;本步骤所述的用户登 录信息至少包括用户标识和使用所述系统终端设备的网络地址和端 口定义的用户登录点; 2) The system terminal device sends a user login message to the basic registration service unit according to the service portal, where the user login message carries the user login information; the user login information described in this step includes at least the user identifier and the network address of the terminal device using the system. And the user login point defined by the port;
3 )所述注册服务单元记录用户登录信息, 向上层网络的注册服 务单元转发携带该用户登录信息的用户登录消息; 本步骤所述的用 户登录信息至少包括用户标识; The registration service unit records the user login information, and the registration service unit of the upper layer network forwards the user login message carrying the user login information; the user login information described in this step includes at least the user identifier;
4 )所述上层网络的注册服务单元收到转发的用户登录消息后, 重复步骤 3 ) 的操作, 直至用户登录消息被转发至接入公有网络的 顶层注册服务单元。 4) After receiving the forwarded user login message, the registration service unit of the upper layer network repeats the operation of step 3) until the user login message is forwarded to the top-level registration service unit of the access public network.
上述技术方案中, 所述步骤 2 ) 中, 所述用户登录点为网络地 址和端口,或可以被转化为网络地址和端口的标识;所述步骤 3 )中, 所述用户登录点为网络地址和端口,或可以被转化为网络地址和端口 的标识; 所述系统终端设备访问点为网络地址和端口, 或可以被转化 为网给地址和端口的标识。 In the foregoing technical solution, in the step 2), the user login point is a network address and a port, or may be converted into an identifier of a network address and a port; in the step 3), the user login point is a network address. And a port, or an identifier that can be translated into a network address and port; the system terminal device access point is a network address and port, or can be converted to an identifier for the network to the address and port.
上述技术方案中, 所述步骤 3 ) 中, 所述注册服务单元在收到 系统终端设备直接发来的用户登录消息后, 向该系统终端设备返回 应答消息。 In the above technical solution, in the step 3), after receiving the user login message directly sent by the system terminal device, the registration service unit returns a response message to the system terminal device.
上述技术方案中, 在所述步骤 1 ) 前还要执行初始化步骤, 所 述初始化步骤是: 首先启动接入公有网络的顶层注册服务单元, 然 后接入私有网络的基本注册服务单元逐层启动并向所述名字注册 系统注册以加入名字注册系统。
上述技术方案中, 所述步骤 1 ) 包括如下子步骤:In the above technical solution, an initialization step is further performed before the step 1), the initialization step is: firstly, starting a top-level registration service unit accessing the public network, and then starting the basic registration service unit of the private network to start layer by layer and Register with the name registration system to join the name registration system. In the above technical solution, the step 1) includes the following sub-steps:
110) 系统终端设备向名字注册系统公知的全局服务入口发送服 务入口查询消息; 110) the system terminal device sends a service entry query message to a global service portal known to the name registration system;
111 )全局服务入口对映的注册服务单元判断是否能直接作为为 该系统终端设备提供服务的服务入口, 如果判断为是, 则返回成功消 息; 如果判断为否, 则向系统终端设备返回重定向消息, 该重定向消 息携带接入该全局服务入口对映的注册服务单元所属网络的下层网 络的注册服务单元的服务入口; 111) The registration service unit of the global service entry mapping determines whether it can directly serve as a service entry for providing service to the terminal device of the system. If the determination is yes, a success message is returned; if the determination is no, the system returns a redirect to the system terminal device. a message, the redirect message carries a service entry of a registration service unit of a lower layer network of a network to which the registration service unit to which the global service portal is mapped;
112 ) 系统终端设备向所述重定向消息提供的注册服务单元发送 服务入口查询消息; 112) the system terminal device sends a service entry query message to the registration service unit provided by the redirect message;
113)所述注册服务单元判断是否能直接作为为该系统终端设备 提供服务的服务入口, 如果判断为是, 则返回成功消息; 如果判断为 否, 则向系统终端设备返回重定向消息, 该重定向消息携带接入当前 注册服务单元所属网络的下层网络的注册服务单元的服务入口; 113) The registration service unit determines whether it can directly serve as a service entry for providing service to the terminal device of the system. If the determination is yes, a success message is returned; if the determination is no, a redirect message is returned to the system terminal device, the weight The directed message carries a service entry of a registration service unit that accesses a lower layer network of a network to which the current registration service unit belongs;
114 )不断重复步骤 112 )和 113), 直至系统终端设备接收到成 功消息, 获得最终的服务入口。 114) Repeat steps 112) and 113) until the system terminal device receives the success message to obtain the final service entry.
上述技术方案中, 所述步骤 110) 中, 所述全局服务入口是顶 层注册服务单元的网络地址和端口。 In the above technical solution, in the step 110), the global service entry is a network address and a port of a top-level registration service unit.
上述技术方案中, 所述步骤 1 ) 包括如下子步骤: In the above technical solution, the step 1) includes the following sub-steps:
120) 注册服务单元在所属网络中广播包含本地登录服务入口的 广播消息; 120) the registration service unit broadcasts a broadcast message containing the local login service entry in the network to which it belongs;
121 ) 系统终端设备监听所述广播消息, 得到服务入口。 121) The system terminal device listens to the broadcast message to obtain a service entry.
上述技术方案中, 所述步骤 120) 中, 所述注册服务单元可通 过注册服务单元代理发送所述广播消息。 In the above technical solution, in the step 120), the registration service unit may send the broadcast message by using a registration service unit proxy.
上述技术方案中, 所述步骤 3) 中, 所述注册服务单元收到用 户登录消息后的处理方法包括如下步骤: In the foregoing technical solution, in the step 3), the processing method after the registration service unit receives the user login message includes the following steps:
31 )根据消息中的用户登录点判别该消息发送者是否为下层注册 服务单元, 如果是, 转步骤 32 ), 如果不是, 转步骤 34); 31) determining, according to the user login point in the message, whether the sender of the message is a lower layer registration service unit, if yes, go to step 32), if not, go to step 34);
32 )将消息中的用户标识作为用户标识、 以携带消息的数据分组 的源地址和源端口点作为系统终端设备访问点、 将本单元 标识作为用户登录点,存储在本单元的用户信息记录表中, 转步骤 38 ) ; 32) The user identifier in the message is used as the user identifier, the source address and the source port point of the data packet carrying the message are used as the system terminal device access point, the unit identifier is used as the user login point, and the user information record table stored in the unit is stored. In, go to step 38);
34 )根据携带消息的数据分组的源地址和消息中的系统终端设备
的网络地址判别该用户终端是否在 NAT之后, 如果不是, 转步骤 35 ), 如果是, 转步骤 36 ); 34) according to the source address of the data packet carrying the message and the system terminal device in the message The network address determines whether the user terminal is behind the NAT, if not, go to step 35), if yes, go to step 36);
35 )将消息中的用户标识作为用户标识、将用户登录点作为用户 登录点,存储在本单元的用户信息记录表中;转步骤 37 ); 36 )将消息中的用户标识作为用户标识、 以携带消息的数据分组 的源地址和源端口作为系统终端设备访问点、 将本单元标 识作为用户登录点, 存储在本单元的用户信息记录表中; 37 ) 向消息发送者返回成功应答消息; 35) using the user identifier in the message as the user identifier, using the user login point as the user login point, and storing it in the user information record table of the unit; going to step 37); 36) using the user identifier in the message as the user identifier, The source address and the source port of the data packet carrying the message are used as the system terminal device access point, and the identity of the unit is used as the user login point, and is stored in the user information record table of the unit; 37) returning a success response message to the message sender;
38 ) 判别本单元是否为顶级注册服务单元, 如果不是, 转步骤 39 ) ; 如果是, 注册过程结束; 38) Determine whether the unit is a top-level registration service unit, if not, go to step 39); if yes, the registration process ends;
39 )根据本地目标登录服务器记录向上层注册服务单元发送用户 登录信息; 本次操作结束; 39) sending the user login information to the upper layer registration service unit according to the local target login server record; the operation ends;
30 ) 向消息发送者返回失败应答消息。 30) Return a failure response message to the sender of the message.
上述技术方案中, 在所述步骤 32 )和步骤 34 )之间, 还执行步 骤 33 ), 步骤 33 )如下: In the above technical solution, between the step 32) and the step 34), step 33), step 33) is further performed as follows:
判别所述用户是否可以登录, 如不可以登录, 转步骤 30 ) , 如 可以登录, 转步骤 34 )0 Determine whether the user can log in, if not, log in, go to step 30), if you can log in, go to step 34) 0
上述技术方案中, 所述步骤 39 ) 中, 向上层注册服务单元发送 用户登录消息的方法如下: In the foregoing technical solution, in the step 39), the method for sending the user login message to the upper layer registration service unit is as follows:
首先使用本注册服务单元的标识代替本地收到的用户登录消息 中的用户登录点, 生成新的用户登录消息, 然后向上层注册服务单元 发送所述新的用户登录消息。 First, the user login point in the locally received user login message is replaced with the identifier of the local registration service unit, a new user login message is generated, and then the new user login message is sent to the upper registration service unit.
上述技术方案中, 还包括步骤 5 ), 该步骤 5 )如下: In the above technical solution, the method further includes the step 5), and the step 5) is as follows:
所述注册服务单元根据所记录的所述用户登录信息进行查询, 并在系统终端设备之间确定转发节点。 The registration service unit performs an inquiry according to the recorded user login information, and determines a forwarding node between the system terminal devices.
本发明提供的利用所述的多层 NAT环境下面向应用的名字注册 系统进行用户登录点查询的方法, 其特征在于, 包括如下步骤: The method for performing a user login point query to the name registration system of the application under the multi-layer NAT environment is characterized in that the method includes the following steps:
50 )系统终端设备向名字注册系统的服务入口发送用户登录点查 找请求消息, 该消息中至少包括被请求用户标识; 50) The system terminal device sends a user login point search request message to the service portal of the name registration system, where the message includes at least the requested user identifier;
51 )注册服务单元在本地的用户登录信息记录表中查找所述被请 求用户的用户标识是否存在, 如果存在, 则返回被请求用户的用户登 录点; 如果不存在, 则向接入当前注册服务单元所接入网络的上层网 络的注册服务单元转发用户登录点查找请求消息; 51) The registration service unit searches the local user login information record table for the presence or absence of the user identifier of the requested user, and if yes, returns the user login point of the requested user; if not, the current registration service is accessed. The registration service unit of the upper layer network of the network to which the unit is connected forwards the user login point lookup request message;
52 )接入上层网络的注册服务单元在本地的用户登录信息记录表 中查找所述被请求用户标识是否存在, 如果存在, 则返回被请求用户 的系统终端设备的用户登录点; 如果不存在, 则向接入当前注册服务
单元所接入网络的上层网络的注册服务单元转发用户登录点查找请 求消息; The registration service unit accessing the upper layer network searches the local user login information record table for the presence or absence of the requested user identifier, and if so, returns the user login point of the system terminal device of the requested user; if not, Access to the current registration service The registration service unit of the upper layer network of the network to which the unit is connected forwards the user login point lookup request message;
53 ) 重复步骤 52 ), 直至获得被请求系统终端设备的用户登录 点; 53) repeating step 52) until the user login point of the requested system terminal device is obtained;
54 )当用户登录点查找请求消息转发至顶层注册服务单元后,仍 未查找到所述被请求用户的用户标识, 则返回失败应答消息。 54) After the user login point lookup request message is forwarded to the top level registration service unit, the user identification of the requested user is still not found, and a failure response message is returned.
本发明提供的所述多层 NAT环境下面向应用的名字注册系统提 供转发服务的方法, 其特征在于, 所述注册服务单元还包括数据转 发模块, 所述提供转发服务的方法包括如下步骤: The method for providing a forwarding service to the name registration system of the application provided by the present invention is characterized in that the registration service unit further includes a data forwarding module, and the method for providing a forwarding service includes the following steps:
60 )系统终端设备向名字注册系统的服务入口发送转发服务请求 消息, 该消息中至少包括被请求用户标识; 60) the system terminal device sends a forwarding service request message to the service portal of the name registration system, where the message includes at least the requested user identifier;
61 )注册服务单元在本地的用户登录信息记录表中查找所述被请 求用户的用户标识是否存在, 如果被请求用户的用户标识存在, 判断 本注册服务单元是否含有数据转发模块, 如判断有数据转发模块, 则 为请求方用户分配并返回一个可以向被请求方用户转发数据的网络 地址和端口; 如果被请求用户的用户标识不存在, 或没有数据转发模 块,则向接入当前注册服务单元所接入网络的上层网络的注册服务单 元转发所述转发服务请求消息; The registration service unit searches the local user login information record table for the presence or absence of the user identifier of the requested user. If the user identifier of the requested user exists, it is determined whether the registration service unit includes a data forwarding module, such as determining that there is data. The forwarding module allocates and returns a network address and port that can forward data to the requesting user for the requesting user; if the user identifier of the requested user does not exist, or does not have a data forwarding module, accessing the current registered service unit The registration service unit of the upper layer network of the accessed network forwards the forwarding service request message;
62 )接入上层网络的注册服务单元在本地的用户登录记录表中查 找所述被请求用户标识是否存在, 如果被请求用户的用户标识存在, 判断本注册服务单元是否含有数据转发模块, 如判断有数据转发模 块,则为请求方用户分配并返回一个可以向被请求方用户转发数据的 网络地址和端口; 如果被请求用户的用户标识不存在, 或没有数据转 发模块,则向接入当前注册服务单元所接入网络的上层网络的注册服 务单元转发所述转发服务请求消息; 62) The registration service unit accessing the upper layer network searches for the presence of the requested user identifier in the local user login record table. If the user identifier of the requested user exists, it is determined whether the registration service unit includes a data forwarding module, such as determining There is a data forwarding module, which allocates and returns a network address and port that can forward data to the requesting user for the requesting user; if the user identifier of the requested user does not exist, or does not have a data forwarding module, the current registration is accessed. The registration service unit of the upper layer network to which the service unit accesses the network forwards the forwarding service request message;
63 ) 重复步骤 62 ), 直至请求方用户获得可以向被请求方用户 转发数据的网络地址和端口; 63) repeating step 62) until the requesting user obtains a network address and port that can forward data to the requested user;
64 )转发服务请求消息转发至顶层注册服务单元后,仍未查找到 所述被请求用户的用户标识, 或没有数据转发模块, 则返回失败应答 消息。 64) After forwarding the service request message to the top-level registration service unit, if the user identifier of the requested user is not found, or there is no data forwarding module, a failure response message is returned.
本发明在多层 NAT网络环境中, 使应用、 服务、 用户等可以通 过标识被定位, 能够使得私网内的服务对其外部网络可见并且与具 体应用无关。本发明同时还为外部网络节点提供更为合理的访问途径 的系统和方法。 In the multi-layer NAT network environment, the present invention enables applications, services, users, etc. to be located by identification, enabling the services in the private network to be visible to its external network and independent of the specific application. The present invention also provides a system and method for providing a more reasonable access path for external network nodes.
本发明利用系统中保存的用户登录信息,在多层 NAT网络中,指 导请求用户使用的系统终端设备找到离请其 NAT距离最小的,能够为
其向被请求用户使用的系统终端设备转发数据的节点。 The invention utilizes the user login information saved in the system, and in the multi-layer NAT network, the system terminal device that requests the user to use finds the minimum NAT distance from the user, and can A node that forwards data to a system terminal device used by a requesting user.
本发明能够实现呼叫消息的传递, 从而达到传递系统终端设备 间连接请求的目的。 通过应用本发明, 在多层 NAT网络环境中, 使应 用、 服务、 用户可以通过标识被定位。 附图说明 The invention can realize the delivery of the call message, thereby achieving the purpose of transmitting the connection request between the terminal devices of the system. By applying the present invention, in a multi-layer NAT network environment, applications, services, and users can be located by identification. DRAWINGS
以下, 结合附图来详细说明本发明的实施例, 其中: Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, in which:
图 1是同根多层 NAT网络示意图 Figure 1 is a schematic diagram of the same-root multi-layer NAT network
图 2是面向应用的名字注册系统的结构示意图 Figure 2 is a schematic diagram of the structure of the application-oriented name registration system.
图 3a是 NAT设备接入网络的示意图 Figure 3a is a schematic diagram of a NAT device accessing a network
图 3b是 NAT设备联接矩阵示意图 Figure 3b is a schematic diagram of the NAT device connection matrix
图 4a是注册服务装置结构示意图 Figure 4a is a schematic diagram of the structure of the registration service device
图 4b是注册服务单元结构示意图 Figure 4b is a schematic diagram of the structure of the registration service unit
图 5是注册服务装置第一种组建流程 Figure 5 is the first setup process of the registration service device.
图 6是注册服务装置第二种组建流程 Figure 6 is the second set up process of the registration service device
图 7是注册服务装置第三种组建流程 Figure 7 is the third set up process for the registration service device.
图 8 是公有网络中注册服务装置全局服务入口为基础, 系统终 端设备向注册服务装置请求局部服务入口的流程图 Figure 8 is a flow chart of the system service device requesting a local service entry from the registration service device based on the global service portal of the registration service device in the public network.
图 9是通过监听包含注册服务装置服务入口,系统终端设备获取 局部服务入口的流程图 Figure 9 is a flow chart of obtaining a local service entry by the system terminal device by listening to the service entry including the registration service device
图 1 0是通过监听包含注册服务装置服务入口, 系统终端设备获 取局部服务入口的另一种流程图 Figure 10 is another flow chart for the system terminal device to obtain the local service entry by listening to the service entry containing the registration service device.
图 1 1是用户使用的系统终端设备向注册服务装置发用户注册信 息 (用户开户信息) 的过程 Figure 11 is a process in which the system terminal device used by the user sends user registration information (user account opening information) to the registration service device.
图 12是用户使用的系统终端设备向注册服务装置发用户登录信 息的过程 Figure 12 is a process in which the system terminal device used by the user sends user login information to the registration service device.
图 1 3是主动请求用户通过注册服务系统获取被请求用户的用户 登录点的过程 Figure 13 is the process of actively requesting the user to obtain the user login point of the requested user through the registration service system.
图 14是注册服务单元收到 "服务单元注册消息" 后的处理方法 图 15是注册服务单元向注册服务装置注册的方法 14 is a processing method after the registration service unit receives the "service unit registration message". FIG. 15 is a method for the registration service unit to register with the registration service device.
图 16是注册服务单元收到 "服务入口查询消息" 后的处理方法 图 17是系统终端设备获取注册服务装置网络地址和端口的方法 图 18是为注册服务装置中的注册服务单元收到 "用户注册消息" 后的处理方法
图 1 9是用户通过系统终端设备向注册服务装置发用户登录信息 的示意图 16 is a processing method after the registration service unit receives the "service entry inquiry message". FIG. 17 is a method for the system terminal device to acquire the registration service device network address and port. FIG. 18 is a process for the registration service unit in the registration service device to receive "user". Processing method after registration message FIG. 19 is a schematic diagram of a user sending user login information to a registration service device through a system terminal device.
图 20是注册服务装置中的注册服务单元收到 "用户登录点查找 请求消息" 后的处理方法 20 is a processing method after the registration service unit in the registration service device receives the "user login point lookup request message"
图 21是用户通过系统终端设备向注册服务装置查询用户登录点 的示意图 21 is a schematic diagram of a user querying a registration service device for a user login point through a system terminal device
图 22是带有转发模块的注册服务单元示意图 Figure 22 is a schematic diagram of a registration service unit with a forwarding module
图 2 3是 "转发服务请求" 处理流程 Figure 2 3 is the "forwarding service request" processing flow
具体实施方式 detailed description
1. 网络环境介绍 1. Introduction to the network environment
图 1所示为同根多层 NAT网络,该网络是同根多层 NAT网络的例 子。 其特点是: 私有网络 4通过 NAT设备 1 000接入公有网络 3、 私 有网络 4。通过 NAT设备 1 000接入公有网络 3、私有网络 4的私有网 络 4为该 NAT设备控制的网络。直接同公有网络 3相连的 NAT设备为 根 NAT设备。 各 NAT设备控制的私有网络到公有网络 3经过的最少 NAT设备的个数为该 NAT设备控制的私有网络的层数, 该路径为 NAT 设备控制的私有网络到公有网络 3的最短路径。 NAT设备控制的私有 网络到公有网络 3的层数越少, 表示层级越高。 如果两个 NAT设备控 制的私有网络各自到公有网络的最短 NAT路径中至少有一个 NAT设备 相同, 则这两个 NAT设备控制的私有网络有共同的根 NAT设备。 多层 NAT网络可以被看作是多个同根多层 NAT网络的组合。。 Figure 1 shows the same-root multi-layer NAT network, which is an example of the same-root multi-layer NAT network. Its characteristics are: Private network 4 through the NAT device 1 000 access to the public network 3, private network 4. Accessing the public network through the NAT device 1 000. The private network 4 of the private network 4 is the network controlled by the NAT device. The NAT device directly connected to the public network 3 is the root NAT device. The number of the minimum number of NAT devices that the NAT device controls from the private network to the public network 3 is the number of layers of the private network controlled by the NAT device, and the path is the shortest path from the private network controlled by the NAT device to the public network 3. The less the number of layers of the private network controlled by the NAT device to the public network 3, the higher the presentation level. If the private networks controlled by the two NAT devices each have at least one NAT device in the shortest NAT path of the public network, the private networks controlled by the two NAT devices have a common root NAT device. A multi-layer NAT network can be thought of as a combination of multiple multi-rooted NAT networks. .
多层 NAT网络在扩大用户的接入数量的同时,也使通信双方的相 对位置变得更为复杂。多层 NAT网络将公有网络扁平化通信模式变成 了层次化通信模式。多层 NAT网络环境下,通信双方典型关系为:(1 ) 通信双方在公有网络; ( 2 )通信一方在 NAT设备控制的通过 NAT设备 扩展的私有网络中, 另一方在公有网络中; ( 3 )通信双方在同一 NAT 设备控制的私有的网络中; ( 4 )通信双方在不同 NAT设备控制的私有 网络中,且这两个 NAT设备通过不同的根 NAT与公有网络的相连;( 5 ) 通信双方在不同 NAT设备控制的私有网络中,且这两个 NAT设备通过 相同的根 NAT与公有网络的相连。 Multi-layer NAT networks increase the number of users' accesses and make the relative positions of the two parties more complicated. The multi-layer NAT network turns the public network flat communication mode into a hierarchical communication mode. In a multi-layer NAT network environment, the typical relationship between the two parties is: (1) the two communicating parties are in the public network; (2) the communicating party is in the private network controlled by the NAT device and extended by the NAT device, and the other party is in the public network; The two communicating parties are in a private network controlled by the same NAT device; (4) the two communicating parties are in a private network controlled by different NAT devices, and the two NAT devices are connected to the public network through different root NATs; (5) communication Both parties are in a private network controlled by different NAT devices, and the two NAT devices are connected to the public network through the same root NAT.
NAT设备的网络地址指同 NAT设备的外网界面绑定的网络地址。 对于规模较大的私有网络, NAT设备 NAT路由器外网界面可以同多个 网络地址进行绑定。 在网络管理中, 可以通过枚举地址或枚举网段的
方式将多个网络地址映射为一个 NAT设备。 普通用户可以通过^ 端 (有基本功能) NAT设备 NAT路由器自行接入网络, 该 NAT设备 NAT 路由器外网界面一般与一个网络地址绑定。在下面对 NAT设备 NAT路 由器的描述中,一个 NAT设备 NAT路由器外网界面只与一个网络地址 绑定。 因此由于, 一个 NAT设备可以用一个同该 NAT设备的外网界面 绑定的网络地址代表。 开发设计人员不难发现, 下面描述的方法也适 用于外网界面同多个网络地址绑定的 NAT路由器。 The network address of the NAT device refers to the network address bound to the external network interface of the NAT device. For a large private network, the NAT device NAT router external network interface can be bound to multiple network addresses. In network management, you can enumerate addresses or enumerate network segments. The method maps multiple network addresses to one NAT device. Ordinary users can access the network through the NAT device NAT router through the terminal (the basic function). The NAT device NAT router external network interface is generally bound to a network address. In the following description of the NAT device NAT router, a NAT device NAT router external network interface is only bound to one network address. Therefore, a NAT device can be represented by a network address bound to the external network interface of the NAT device. Development designers can easily find that the method described below is also applicable to NAT routers with external network interfaces bound to multiple network addresses.
为了方便对多层 NAT网络的描述, 现定义如下名词。 To facilitate the description of a multi-layer NAT network, the following nouns are now defined.
NAT设备的网络地址为该 NAT设备的外网界面上绑定的网络地址, 或叫 NAT路由器地址, 该地址可以是公有地址, 也可以是私有地 址。 The network address of the NAT device is the network address bound to the NAT device's external network interface, or the NAT router address. The address can be either a public address or a private address.
NAT设备控制的网络范围: 由该 NAT设备内网界面起, 沿该界面 联接的网络延展, 到另一个 NAT外网界面止, 之间的网络, 上述两个 NAT设备间不存在另一个 NAT设备。 该网络筒称 NAT控制的网络, 或 NAT路由器控制的网络。 该 NAT为该网络的控制 NAT设备。 The network range controlled by the NAT device: From the intranet interface of the NAT device, the network connected along the interface extends to another NAT external network interface, and the network between the two NAT devices does not exist between the two NAT devices. . The network cartridge is called a NAT-controlled network, or a network controlled by a NAT router. The NAT is the controlling NAT device of the network.
直接上层网络: 如果 NAT设备 A的外网界面同 NAT设备 B控制的 网络直接相连, NAT设备 B控制的网络为 NAT设备 A控制的网络 的直接上层网络; 公有网络是根 NAT设备控制的网络的直接上层 网络。 Direct upper layer network: If the external network interface of NAT device A is directly connected to the network controlled by NAT device B, the network controlled by NAT device B is the direct upper layer network of the network controlled by NAT device A; the public network is the network controlled by the root NAT device. Direct upper network.
直接下层网络: 如果 NAT设备 A的外网界面同 NAT设备 B控制的 网络直接相连, NAT设备 A控制的网络为 NAT设备 B控制的网络 的直接下层网络; 根 NAT设备控制的网络是公有网络的直接下层 网络。 Direct lower layer network: If the external network interface of NAT device A is directly connected to the network controlled by NAT device B, the network controlled by NAT device A is the direct lower layer network of the network controlled by NAT device B; the network controlled by the root NAT device is the public network. Directly underlying network.
NAT路径长度: NAT环境下, 主机 A到 B的可达路径中经过 NAT设 备的个数为该 NAT路径的长度。 NAT path length: The number of NAT devices in the reachable path from host A to B is the length of the NAT path.
最短 NAT路径: NAT环境下, 主机 A到 B的所有 NAT路径中, NAT 路径长度最小的一条称为 A到 B的最短 NAT路径, 所经过的 NAT 个数为最短 NAT路径长度。 The shortest NAT path: In the NAT environment, among the NAT paths of hosts A to B, the shortest NAT path is called the shortest NAT path from A to B. The number of NATs passing through is the shortest NAT path length.
上层网络: 从当前 NAT设备控制的网络的直接上层网络起到公有 网络止的各 NAT设备控制的网络及公有网络, 为当前 NAT设备控 制的网络的上层网络。 Upper-layer network: The network from the direct upper-layer network of the network controlled by the current NAT device to the network controlled by each NAT device and the public network, which is the upper-layer network of the network controlled by the current NAT device.
下层网络: 从公有网络或当前 NAT设备控制的网络的直接下层网 络起的各 NAT设备控制的网络, 为公有网络或当前 NAT设备控制 的网络的下层网络 Lower layer network: The network controlled by each NAT device from the direct network of the public network or the network directly controlled by the current NAT device, which is the lower layer network of the public network or the network controlled by the current NAT device.
所属网络: 部署于公有网络的设备的所属网络为公有网络, 部署
在 NAT设备控制的网络的设备的所属网络为 NAT设备控制的网络。Network: The network to which the device deployed on the public network belongs is a public network. The network to which the device of the network controlled by the NAT device belongs is a network controlled by the NAT device.
NAT之后: 设备所属网络为公有网络或当前 NAT设备控制的网络 的下层网络, 则该设备在 NAT之后。 After NAT: The network to which the device belongs is the public network or the lower layer network of the network controlled by the current NAT device, then the device is behind the NAT.
父服务器: 位于当前 NAT控制的网络的直接上层网络中的服务器 是当前 NAT设备控制的网络中服务器的父服务器。 Parent Server: The server located in the direct upper-layer network of the current NAT-controlled network is the parent server of the server in the network controlled by the current NAT device.
子服务器: 位于公有网络或当前 NAT控制的网络的直接下层网络 中的服务器是公有网络或当前 NAT控制的网络中服 务器的子服务器。 Subserver: A server located in the direct lower layer network of the public network or the current NAT controlled network is a subserver of the public network or the server in the current NAT controlled network.
祖先服务器: 当前服务器及当前服务器的父服务器为当前服务器 的子服务器的祖先服务器。 Ancestor server: The current server and the parent server of the current server are the ancestor servers of the child servers of the current server.
2. 多层 NAT网络下面向应用的名字注册系统概述 2. Multi-layer NAT network below to the application name registration system overview
多层 NAT网络下面向应用的名字注册系统 1 0是一种新型注册系 统,如图 2所示。该系统包括注册服务装置 2001和系统终端设备 6001 两部分。 注册服务装置 2001用于记录用户注册(开户 )信息、 用户 登录信息, 提供用户注册信息及用户登录信息查询; 用户使用系统终 端设备 6001向注册服务装置 2001注册用户信息,登录系统、 查询用 户注册信息、 查询用户登录信息。 本发明不仅可用于 NAT设备组建的 网络环境, 还可以用于有地址转换功能的其它设备组建的网络换环 境。 The multi-layer NAT network registers the system with the name of the application. A 0 is a new registration system, as shown in Figure 2. The system includes a registration service device 2001 and a system terminal device 6001. The registration service device 2001 is configured to record user registration (opening account) information, user login information, and provide user registration information and user login information query; the user uses the system terminal device 6001 to register user information with the registration service device 2001, log in to the system, and query user registration information. Query user login information. The invention can be used not only in the network environment in which the NAT device is built, but also in the network changing environment formed by other devices having the address translation function.
根据多层 NAT网络的特点, 注册服务装置 2001记录用户登录信 息内容为: 用户标识、 用户在或映射到公有网络及相关私有网络中的 用户登录点、用户映射到公有网络及相关私有网络中的系统终端设备 访问点。 同时, 注册服务装置 2001可以根据系统记录的用户登录信 息,帮助主动请求用户在被请求用户的所有用户登录点中确定到请求 用户当前通讯设备 NAT路径最短的用户登录点。 用户登录点: 当用户 位于公有网络或 NAT设备控制的网络中时,用户在该网络中的用户登 录点为用户使用的系统终端设备的网络地址和端口; 当用户位于 NAT 设备控制的网络中时,用户在该 NAT设备控制的网络的上层网络中的 用户登录点为接入公有网络或 NAT设备控制的网络的服务单元用于 接收用户登录请求消息的网络地址和端口,或可以转化为接收用户登 录请求消息的网络地址和端口的服务单元的标识。系统终端设备访问 点:该访问点位于 NAT设备上,当用户登录消息穿过 NAT设备时产生。 该访问点有两种表示方式: 1 ) NAT设备的网络地址和端口; 2 ) 可以 计算得到或被转换为 NAT设备的网络地址和端口的标识。 According to the characteristics of the multi-layer NAT network, the registration service device 2001 records the content of the user login information as: the user identifier, the user login point mapped to the public network and the related private network, and the user mapping to the public network and the related private network. System terminal access point. At the same time, the registration service device 2001 can help the user to actively request the user to log in to the user login point of the requested user to determine the user login point with the shortest NAT path of the current communication device of the requesting user according to the user login information recorded by the system. User login point: When the user is in the network controlled by the public network or NAT device, the user login point in the network is the network address and port of the system terminal device used by the user; when the user is in the network controlled by the NAT device The user login point in the upper layer network of the network controlled by the NAT device is a network address and port for receiving the user login request message by the service unit of the network controlled by the access public network or the NAT device, or may be converted into a receiving user. The network address of the login request message and the identity of the service unit of the port. System Terminal Access Point: This access point is located on the NAT device and is generated when a user login message traverses the NAT device. The access point can be represented in two ways: 1) the network address and port of the NAT device; 2) the network address and port identifier that can be calculated or converted to the NAT device.
图 2所示为名字注册服务系统。名字注册服务系统 1 0包括: 注册 服务装置 2001至少用于记录用户注册信息、 用户登录信息, 提供用
户注册信息及用户登录信息查询, 注册服务装置服务入口查询等; 顶 级服务总线 1用于将注册服务装置接入公有网络 3; 服务总线 2用于 将注册服务装置接入私有网络 4。 注册服务装置 2001通过顶级服务 总线 1同公有网络 3相连, 通过服务总线 2同私有网络 4相连。 Figure 2 shows the name registration service system. The name registration service system 1 0 includes: the registration service device 2001 is at least used for recording user registration information, user login information, and providing The user registration information and the user login information query, the registration service device service portal query, etc.; the top service bus 1 is used to access the registration service device to the public network 3; the service bus 2 is used to access the registration service device to the private network 4. The registration service device 2001 is connected to the public network 3 via the top service bus 1, and is connected to the private network 4 via the service bus 2.
公有网络 3和私有网络 4通过 NAT设备联接矩阵 1001联接在一 起。 系统终端设备 6001和服务装置 2001同公有网络 3、 私有网络 4 相连。 The public network 3 and the private network 4 are connected together through a NAT device connection matrix 1001. The system terminal device 6001 and the service device 2001 are connected to the public network 3 and the private network 4.
图 3所示 NAT设备联接矩阵 1001的联接方式。 NAT设备联接矩 阵 1001内 NAT设备间的关系由与 NAT设备联接矩阵 1001联接的私有 网络和公有网络决定。 私有网络和公有网络同 NAT设备的联接规则 为: NAT设备联接矩阵 1001至少有一条接入公有网络的线路 5; 每个 私有网络至少有一条接入 NAT设备联接矩阵 1001的线路 6; 每个私 有网络可以没有, 也可以有多条由 NAT设备联接矩阵 1001向该私有 网络接入的线路 7。 以图 3的 a所示该的三级 NAT网络结构为例, 图 3的 b所示为 a的 NAT设备联接矩阵 1001联接示意图。 其中包括公 有网络 3、 私有网络 4; NAT设备联接矩阵 1001接入公有网络的线路 5 , 私有网络接入 NAT设备联接矩阵 1001的线路 6; 由 NAT设备联接 矩阵 1001接入私有网络的线路 7。 在部署多层 NAT网络时需要考虑 网段间重叠问题。 系统要有判别、 处理网段间重叠问题的能力。 Figure 3 shows the connection mode of the NAT device connection matrix 1001. NAT device connection matrix The relationship between NAT devices within the 1001 is determined by the private network and the public network connected to the NAT device connection matrix 1001. The connection rules between the private network and the public network and the NAT device are: The NAT device connection matrix 1001 has at least one line 5 accessing the public network; each private network has at least one line 6 that accesses the NAT device connection matrix 1001; each private The network may not have, and there may be multiple lines 7 that are connected to the private network by the NAT device connection matrix 1001. Taking the three-level NAT network structure shown in a of FIG. 3 as an example, b of FIG. 3 is a schematic diagram of a NAT device connection matrix 1001 connection. The public network 3, the private network 4, the NAT device connection matrix 1001 access to the public network line 5, the private network access the NAT device connection matrix 1001 line 6; the NAT device is connected to the matrix 1001 to access the private network line 7. The problem of overlapping between segments needs to be considered when deploying a multi-layer NAT network. The system must have the ability to discriminate and deal with overlapping problems between network segments.
图 4所示为注册服务装置的结构示意图。 如图 4a所示注册服务装 置 2001由顶级注册服务单元 2011和多个基本注册服务单元 2021组成。 顶级注册服务单元 2011通过顶级服务总线装置 1同公有网络 3相联接, 使用公有网络的网络地址进行编址;基本注册服务单元 2021通过服务 总线装置 2同私有网络 4相联接,使用相连的私有网络的网络地址进行 编址。 注册服务单元为顶级注册服务单元 2011和基本注册服务单元 2021的统称。注册服务单元 2801为顶级注册服务单元 2011和基本注册 服务单元 2021的基本功能结构。如图 4b所示注册服务单元 2801至少包 括: 注册服务逻辑控制单元 2100、 基本配置信息记录表 2101、 层级信 息记录表 2102、 目标注册服务器记录表 2103、子注册服务单元记录表 2104、 用户登录信息纪录表 2105、 用户注册信息记录表 2106、 消息緩 存区 2109、 通信单元 2110等功能模块。 Figure 4 shows the structure of the registration service device. The registration service device 2001 shown in Fig. 4a is composed of a top-level registration service unit 2011 and a plurality of basic registration service units 2021. The top-level registration service unit 2011 is connected to the public network 3 through the top-level service bus device 1, and is addressed using the network address of the public network; the basic registration service unit 2021 is connected to the private network 4 through the service bus device 2, and uses the connected private network. The network address is addressed. The registration service unit is a general term for the top-level registration service unit 2011 and the basic registration service unit 2021. The registration service unit 2801 is the basic functional structure of the top-level registration service unit 2011 and the basic registration service unit 2021. The registration service unit 2801 as shown in FIG. 4b at least includes: a registration service logic control unit 2100, a basic configuration information record table 2101, a hierarchy information record table 2102, a target registration server record table 2103, a child registration service unit record table 2104, and user login information. A function module such as a record table 2105, a user registration information record table 2106, a message buffer area 2109, and a communication unit 2110.
注册服务逻辑控制单元 2100用于控制注册服务的执行; 基本配 置信息记录表 2101用于记录本单元标识、 本单元主机地址、 本单元 服务端口; 层级信息记录 2102用于记录层级信息; 目标注册服务器 记录 2103用于记录祖先注册服务器的网络地址、 端口; 子注册服务
器记录表 2104用于记录子注册服务单元的网络地址、 端口、 标识及 对应的 NAT设备的网络地址、 端口, 见表 la; 用户登录信息纪录表 2105 用于记录用户标识、 用户登录点、 系统终端设备访问点, 见表 lb; 用户注册信息记录表 2106至少记录开户用户的用户标识等开户 信息; 消息緩存区 2109用于暂时保存接收到的数据分组中的信息及 转发关系纪录表, 见表 l c , 通信单元 2110同顶级服务总线装置或服 务总线装置联接、 负责收发数据。 The registration service logic control unit 2100 is configured to control the execution of the registration service; the basic configuration information record table 2101 is used to record the identity of the unit, the host address of the unit, and the service port of the unit; the hierarchical information record 2102 is used to record hierarchical information; the target registration server Record 2103 is used to record the network address and port of the ancestor registration server; sub-registration service The device record table 2104 is used to record the network address, port, identifier of the sub-registration service unit and the network address and port of the corresponding NAT device, as shown in Table la; the user login information record table 2105 is used to record the user ID, the user login point, and the system. The terminal device access point is shown in the table lb; the user registration information record table 2106 records at least the account opening information such as the user identifier of the account opening user; the message buffer area 2109 is used for temporarily storing the information in the received data packet and the forwarding relationship record table, see the table. Lc, the communication unit 2110 is connected to the top service bus device or the service bus device, and is responsible for transmitting and receiving data.
表 lb Table lb
注册服务逻辑控制单元 2100根据执行需要从基本配置信息记录 表 2101读取本单元标识、 本单元主机地址、 本单元服务端口, 从层 级信息记录 2102读取记录层级信息,从目标注册服务器记录 2103读 取注册服务装置的网络地址、 端口, 从子注册服务器记录表 2104读 取记录子注册服务单元的网络地址、端口、标识及对应的 NAT设备的 网络地址、 端口, 从用户登录信息纪录表 2105读取用户标识、 用户 登录点、 系统终端设备访问点, 从用户注册信息记录表 2106读取用 户标识, 从消息緩存区 2109读取暂时保存的接收到的数据分组中的 信息及转发关系, 从通信单元 2110读取收到的数据; 同时, 注册服 务逻辑控制单元根据执行需要向基本配置信息记录表 2101写入本单 元标识、 本单元主机地址、 本单元服务端口, 向目标注册服务器记录 2103 写入注册服务装置的网络地址、 端口, 向子注册服务器记录表 2104写入记录子注册服务单元的网络地址、 端口、 标识及对应的 NAT 设备的网络地址、 端口, 向用户信息纪录表 2105写入用户标识、 用 户登录点、 系统终端设备访问点, 向用户注册信息记录表 2106写入 用户标识, 向消息緩存区 2109写入暂时保存接收到的数据分组中的
信息及转发关系, 向通信单元 21 1 0写入需要发出的数据。 The registration service logic control unit 2100 reads the unit identifier, the unit unit address, and the unit service port from the basic configuration information record table 2101 according to the execution requirement, reads the record level information from the hierarchical information record 2102, and reads from the target registration server record 2103. The network address and port of the registration service device are read, and the network address, port, identifier, and network address and port of the corresponding NAT device are read from the sub-registration server record table 2104, and read from the user login information record table 2105. The user identifier, the user login point, and the system terminal device access point are read, the user identifier is read from the user registration information record table 2106, and the information and the forwarding relationship in the temporarily stored received data packet are read from the message buffer 2109, and the communication is performed. The unit 2110 reads the received data; at the same time, the registration service logic control unit writes the unit identifier, the unit host address, the unit service port, and the target registration server record 2103 to the basic configuration information record table 2101 according to the execution requirement. Register the service device's network address, To the sub-registration server record table 2104, write the network address, port, identifier, and network address and port of the corresponding NAT device of the record sub-registration service unit, and write the user ID, user login point, system to the user information record table 2105. The terminal device access point writes the user identifier to the user registration information record table 2106, and writes to the message buffer 2109 to temporarily save the received data packet. The information and forwarding relationship are written to the communication unit 21 1 0 to be sent.
服务单元代理,一种特殊的服务单元。 主要用于扩大被代理的服 务单元的覆盖范围、 或用于向系统终端设备提供统一的服务入口。根 据需要,服务单元代理可以与被代理者部署于同一 NAT设备控制的网 络或公有网络,也可以部署在被代理者所属 NAT设备控制的网络的直 接下层网络中。服务单元代理可以广播被代理者的服务入口, 或在服 务装置的请求者和被代理服务装置间转发消息。 Service unit agent, a special service unit. It is mainly used to expand the coverage of the service unit being served, or to provide a unified service portal to the system terminal equipment. The service unit agent can be deployed on the network or public network controlled by the same NAT device as the agent, or in the direct lower layer network of the network controlled by the NAT device to which the agent belongs. The service unit agent may broadcast the service entry of the agent or forward the message between the requester of the service device and the proxy service device.
为了方便描述, 下面将服务单元中接收各种消息的网络地址和端 口称为月良务入口。 For convenience of description, the network address and port that receive various messages in the service unit are hereinafter referred to as the monthly service portal.
系统终端设备至少用于同注册服务装置交互信息:从注册服务装 置获取服务入口、 向注册服务装置发送用户注册消息、 向注册服务装 置查询用户登录点、 向注册服务装置请求有转发能力的服务单元。 The system terminal device is at least configured to exchange information with the registration service device: obtaining a service entry from the registration service device, transmitting a user registration message to the registration service device, querying the registration service device for the user login point, and requesting the registration service device for the service unit having the forwarding capability .
终端设备至少包括如下: 终端设备控制单元、基本配置信息记录 表、 目标注册服务装置记录、 消息緩存区、 通信单元等功能模块。 终 端设备控制单元用于控制终端设备的执行;基本配置信息记录表用于 记录用户标示、 本终端设备的网络地址、 端口等信息; 目标注册服务 装置记录用于记录注册服务装置的网络地址和端口;消息緩存区用于 暂时存储收到或发出的消息; 通信单元用于公有网络或私有网络连 接。 The terminal device includes at least the following: a terminal device control unit, a basic configuration information record table, a target registration service device record, a message buffer area, a communication unit, and the like. The terminal device control unit is configured to control the execution of the terminal device; the basic configuration information record table is used to record the user identifier, the network address of the terminal device, the port, and the like; the target registration service device records the network address and port used to record the registration service device. The message buffer is used to temporarily store received or sent messages; the communication unit is used for public or private network connections.
终端设备控制单元从基本配置信息记录表、 目标注册服务装置记 录、 消息緩存区读写信息。 终端设备控制单元通过通信单元等功能模 块从网络收发数据。 The terminal device control unit reads and writes information from the basic configuration information record table, the target registration service device record, and the message buffer area. The terminal device control unit transmits and receives data from the network through a function module such as a communication unit.
在多级 NAT网络中数据或消息发送关系复杂。最筒单的数据或消 息传递形式有:不经过 NAT设备,系统终端设备和服务单元直接通讯; 经过 NAT设备, 系统终端设备和服务单元通讯; 不经过 NAT设备, 服 务单元和服务单元直接通讯; 经过 NAT设备, 服务单元和服务单元通 讯等。 在上述数据或消息传递形式下, 从数据接收者的角度看, 如果 数据在系统终端设备和服务单元、 服务单元和服务单元间直接传递, 系统终端设备、服务单元为数据发送者或叫消息发送者, 如果数据通 过 NAT设备, 该 NAT设备为数据发送者或叫消息发送者, NAT设备从 系统终端设备、 服务单元接收数据。 由于 NAT设备中有数据收发关 系对映表, 可以自动转发应答消息。 Data or messaging relationships are complex in multi-level NAT networks. The most single data or message delivery form is: without the NAT device, the system terminal device and the service unit communicate directly; after the NAT device, the system terminal device communicates with the service unit; without the NAT device, the service unit and the service unit communicate directly; After NAT equipment, service unit and service unit communication. In the above data or message delivery form, from the perspective of the data receiver, if the data is directly transferred between the system terminal device and the service unit, the service unit, and the service unit, the system terminal device and the service unit are data senders or message transmissions. If the data passes through the NAT device, the NAT device is a data sender or a message sender, and the NAT device receives data from the system terminal device and the service unit. Since the NAT device has a data transmission and reception relationship mapping table, the response message can be automatically forwarded.
3. 多层 NAT网络环境下注册服务装置构建流程及方法 3. Multi-layer NAT network environment registration service device construction process and method
多层 NAT网络环境中, 注册服务装置存储用户注册及登录信息,
同时为用户信息查询者返回用户注册及登录信息。注册服务单元加入 注册服务装置的过程: 由顶级注册服务单元启动, 完成注册服务装置 初识化, 即可以提供用户信息注册、 用户登录、 用户注册及登录信息 查询服务、 服务入口点查询服务; 其次、 根 NAT设备控制的网络中的 基本注册服务单元向注册服务装置注册加入系统; 再次、 第二层 NAT 基本注册服务单元向注册服务装置注册加入系统; 再次、 第三层 NAT 基本注册服务单元向注册服务装置注册加入系统。按上述方式,根据 需要,基本注册服务单元顺序加入注册服务装置, 为名字注册服务系 统 1 0提供服务。 公有网络中只有一个顶级注册服务单元; 每个私有 网络中只有一个基本注册服务单元。 下面对注册服务单元的描述中, 每个注册服务单元运行于一台服务器。当注册服务单元由多台服务器 构成时, 至少需要现有用户注册信息及用户登录信息的内容, 同时需 要在现有信息内容的的基础上, 针对分布式系统的特征进行扩展, 维 持多服务入口与 NAT设备间的映射关系, 及注册单元间的访问关系。 当注册服务单元由多台服务器构成时, 开发人员, 不难以本发方法的 精神实质, 针对分布式系统的特征在注册、 登录、 查询等方法上进行 扩展。 In a multi-layer NAT network environment, the registration service device stores user registration and login information. At the same time, the user registration and login information is returned for the user information finder. The process of registering the service unit to join the registration service device: Starting by the top-level registration service unit, the registration service device is initially recognized, that is, the user information registration, the user login, the user registration and the login information inquiry service, and the service entry point inquiry service can be provided; The basic registration service unit in the network controlled by the root NAT device registers with the registration service device to join the system; again, the second layer NAT basic registration service unit registers with the registration service device to join the system; again, the third layer NAT basic registration service unit The registration service device is registered to join the system. In the above manner, the basic registration service unit sequentially joins the registration service device to provide services for the name registration service system 10 as needed. There is only one top-level registration service unit in the public network; there is only one basic registration service unit in each private network. In the following description of the registration service unit, each registration service unit runs on a server. When the registration service unit is composed of multiple servers, at least the existing user registration information and the content of the user login information are required, and the characteristics of the distributed system need to be expanded based on the existing information content to maintain the multi-service portal. The mapping relationship with the NAT device and the access relationship between the registered units. When the registration service unit is composed of multiple servers, the developer is not difficult to extend the spirit of the method, and the features of the distributed system are extended in registration, login, query, and the like.
图 5为注册服务装置组建流程。该过程是注册服务单元加入注册 服务装置的例子。 注册服务装置 2001通过架设在公有网络中的顶级 注册服务器 201 1进行初识化。该顶级注册服务单元 201 1配有公有网 络网络地址, 该地址及提供服务的端口在系统内为公知服务入口, 或 可通过系统定义的方法获得。 NAT设备 1 01 0直接接入公有网络, 为 根 NAT设备。 注册服务单元 2021部署在根 NAT设备控制的网络中。 NAT 设备对经过的数据分组的源或目的地址进行修改, 该图中忽略 NAT设备对数据分组修改的描述。 Figure 5 shows the process of establishing a registration service device. This process is an example of a registration service unit joining a registration service device. The registration service device 2001 performs initial recognition by the top-level registration server 201 1 installed in the public network. The top level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system defined method. The NAT device 1 01 0 directly accesses the public network and is the root NAT device. The registration service unit 2021 is deployed in a network controlled by the root NAT device. The NAT device modifies the source or destination address of the traversed data packet. The description of the modification of the data packet by the NAT device is ignored in the figure.
• 根 NAT设备控制的网络中的注册服务单元 2021向顶级注册服 务单元 201 1发 "服务单元注册消息"; 该消息中包括注册服务 单元 2021 的网络地址、 端口、 标识、 预制层级信息为 1 , 表 明该注册服务单元 2021 为第一层注册服务单元, 及所属 NAT 设备控制的网络到公有网络的最短距离为 1。 The registration service unit 2021 in the network controlled by the root NAT device sends a "service unit registration message" to the top-level registration service unit 201 1; the message includes the network address, port, identity, and pre-fabricated level information of the registration service unit 2021. It indicates that the registration service unit 2021 is the first layer registration service unit, and the shortest distance of the network controlled by the belonging NAT device to the public network is 1.
• 顶级注册服务单元 201 1收到 "服务单元注册消息,, 后, 根据 携带该消息的数据分组的网络地址及该消息中携带的注册服
务单元网络地址是否相同, 判断该消息是否经过 NAT设备转 换; 如果经过 NAT设备转换, 提取该注册请求中的层级信息, 如果层级比当前注册服务单元大 1 , 则在子注册服务单元记录 表中记录该注册服务单元的网络地址、 端口、 标识及对应的 NAT设备的网络地址和端口, 并发送该消息者返回注册成功消 息; 如果层级与当前注册服务单元的层级的级差比 1大, 同时 子注册服务单元记录表中没有该 NAT设备对应的注册服务单 元的记录, 返回注册失败消息; 如果未经过 NAT设备转换, 返 回注册失败消息。 • The top-level registration service unit 201 1 receives the "service unit registration message, and then, according to the network address of the data packet carrying the message and the registration service carried in the message Whether the network address of the service unit is the same, whether the message is converted by the NAT device; if the NAT device converts, extracts the hierarchical information in the registration request, if the level is greater than the current registered service unit, then in the sub-registration service unit record table Recording the network address, port, identity, and network address and port of the corresponding NAT device, and sending the message to return a registration success message; if the level of the hierarchy is less than 1 at the level of the currently registered service unit, The registration service unit record table does not have a record of the registration service unit corresponding to the NAT device, and returns a registration failure message; if the NAT device is not converted, a registration failure message is returned.
图 6为注册服务装置组建流程。该过程是注册服务单元加入注册 服务装置的例子。该顶级注册服务单元 201 1配有公有网络网络地址, 该地址及提供服务的端口在系统内为公知服务入口,或可通过系统定 义的方法获得。 第一 NAT设备 1 01 0直接接入公有网络, 为根 NAT设 备。 第一注册服务单元 2021部署在根 NAT设备 1 01 0控制的网络中。 第二 NAT设备 1 020直接接入根 NAT设备 1 01 0控制的网络,第二注册 服务单元 2031部署在第二 NAT设备 1 020控制的网络中。第二 NAT设 备 1 020控制的网络中的联网主机、 联网设备可以访问根 NAT设备控 制的网络中的联网主机、 联网设备。 NAT设备对经过的数据分组源或 目的地址进行修改, 该图中忽略 NAT设备对数据分组修改的描述。 Figure 6 shows the process of establishing a registration service device. This process is an example of a registration service unit joining a registration service device. The top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method. The first NAT device 1 01 0 directly accesses the public network and is the root NAT device. The first registration service unit 2021 is deployed in a network controlled by the root NAT device 1000-1. The second NAT device 1 020 directly accesses the root NAT device 1 01 0 controlled network, and the second registration service unit 2031 is deployed in the network controlled by the second NAT device 1 020. The networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device. The NAT device modifies the passed data packet source or destination address. The description of the data packet modification by the NAT device is ignored in the figure.
• 第二 NAT设备 1 020控制的网络中的第二注册服务单元 2031向 顶级注册服务单元 201 1发 "服务单元注册消息 ", 该消息中包 括本注册服务单元 2031的网络地址、 端口、 标识、 预制层级 信息为 2 , 表明该注册服务单元 2031所属 NAT设备 1 020控制 的网络到公有网络的最短距离 2。 • The second registration service unit 2031 in the network controlled by the second NAT device 1 020 sends a "service unit registration message" to the top-level registration service unit 201 1 , the message including the network address, port, identity of the registration service unit 2031, The prefabricated level information is 2, indicating that the registration service unit 2031 belongs to the shortest distance 2 of the network controlled by the NAT device 1 020 to the public network.
• 顶级注册服务单元 201 1收到 "服务单元注册消息,, 后, 根据 携带该消息的数据分组的网络地址及该注册申请消息中携带 的注册服务器网络地址是否相同,判断该消息是否经过 NAT设 备转换; 如果经过 NAT设备转换,提取该注册请求中的层级信 息, 如果层级与当前注册服务单元的层级的级差比 1大, 则在 子注册服务单元记录表查找同 NAT设备对应的注册服务单元,
如果该注册服务单元存在, 向第二注册服务单元 2031返回包 含 NAT设备 1 01 0对应的注册服务单元的网络地址和端口的重 定向应答消息。 • The top-level registration service unit 201 1 receives the service unit registration message, and then determines whether the message passes through the NAT device according to whether the network address of the data packet carrying the message and the registration server network address carried in the registration application message are the same. Converting; if the NAT device converts, extracts the hierarchical information in the registration request, if the level difference between the level and the current registered service unit is greater than 1, the sub-registration service unit record table searches for the registration service unit corresponding to the NAT device, If the registration service unit exists, a redirect response message including the network address and port of the registration service unit corresponding to the NAT device 101 is returned to the second registration service unit 2031.
• 第二注册服务单元 2031收到注册服务装置的重定向应答消息 后, 根据消息中包括的注册服务单元的网络地址、 端口信息, 向注册服务装置发 "服务单元注册消息"; 该消息中包括第二 注册服务单元 2031 的网络地址、 端口、 预制层级信息为 2 , 表明该注册服务单元 2031所属 NAT设备 1 020控制的网络到公 有网络的最短距离。 After receiving the redirect response message of the registration service device, the second registration service unit 2031 sends a "service unit registration message" to the registration service device according to the network address and port information of the registration service unit included in the message; the message includes The network address, port, and prefabricated level information of the second registration service unit 2031 is 2, indicating the shortest distance of the network controlled by the NAT device 1 020 to the public network to which the registration service unit 2031 belongs.
• 第一注册服务单元 2021收到 "服务单元注册消息" 后, 根据 携带该消息的数据分组的网络地址及该注册申请消息中携带 的注册服务器网络地址是否相同,判断该消息是否经过 NAT设 备转换; 如果经过 NAT设备转换,提取该注册请求中的层级信 息, 如果层级比当前注册服务单元大 1 , 则在子注册服务单元 记录表中记录该注册服务单元 2031的网络地址、 端口及对应 的 NAT设备 1 020的网络地址和端口,向第二注册服务单元 2031 返回注册成功消息;如果层级与当前注册服务单元的层级的级 差比 1大,同时子注册服务单元记录表中没有该 NAT设备对应 的注册服务单元的记录, 返回注册失败消息; 如果未经过 NAT 设备转换, 返回注册失败消息。 After receiving the "service unit registration message", the first registration service unit 2021 determines whether the message is converted by the NAT device according to whether the network address of the data packet carrying the message and the network address of the registration server carried in the registration application message are the same. If the NAT device converts, the hierarchical information in the registration request is extracted, and if the hierarchy is greater than the current registered service unit, the network address, port, and corresponding NAT of the registration service unit 2031 are recorded in the sub-registration service unit record table. The network address and port of the device 1 020 return a registration success message to the second registration service unit 2031; if the level difference between the level and the current registration service unit is greater than 1, the sub-registration service unit record table does not have the corresponding NAT device. Register the record of the service unit and return the registration failure message; if the NAT device has not been converted, return the registration failure message.
图 7为注册服务装置组建流程。 该过程是注册服务单元加入 注册服务装置的例子。顶级注册服务单元 201 1配有公有网络网络 地址, 该地址及提供服务的端口在系统内为公知服务入口, 或可 通过系统定义的方法获得。第一 NAT设备 1 01 0直接接入公有网络, 为根 NAT设备。 第一注册服务单元 2021部署在根 NAT设备 1 01 0 控制的网络中; 第二 NAT设备 1 020直接接入根 NAT设备 1 01 0控 制的网络,第一注册服务单元代理 2032和第二注册服务单元 2031 部署在第二 NAT设备 1 020控制的网络中。 第二 NAT设备 1 020控 制的网络中的联网主机、 联网设备可以访问根 NAT设备控制的网 络中的联网主机、 联网设备。 NAT设备对经过的数据分组源或目
的地址进行修改, 该图中忽略 NAT设备对数据分组修改的描述。Figure 7 shows the registration service device assembly process. This process is an example of a registration service unit joining a registration service device. The top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method. The first NAT device 101 0 directly accesses the public network and is a root NAT device. The first registration service unit 2021 is deployed in the network controlled by the root NAT device 1010-1; the second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, the first registration service unit agent 2032 and the second registration service. The unit 2031 is deployed in a network controlled by the second NAT device 1 020. The networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device. The source or destination of the data packet passed by the NAT device The address is modified, and the description of the data packet modification by the NAT device is ignored in the figure.
• 第一注册服务单元代理 2032在第二 NAT设备 1 020控制的网络 中广播包含第一注册服务装置网络地址和端口的消息。 • The first registration service unit agent 2032 broadcasts a message containing the first registration service device network address and port in the network controlled by the second NAT device 1 020.
• 第二注册服务单元 2031监听第二 NAT设备 1 020控制的网络中 广播的包含第一注册服务装置网络地址和端口的消息。 • The second registration service unit 2031 listens for a message containing the first registration service device network address and port broadcast in the network controlled by the second NAT device 1 020.
• 第二注册服务单元 2031收到包含注册服务装置网络地址和端 口的消息后,根据消息中提供的注册服务装置的网络地址和端 口向注册服务装置发 "服务单元注册消息", 该消息中包括第 二注册服务单元 2031 的网络地址、 端口、 预制层级信息 2 , 表明该注册服务单元 2031所属 NAT设备 1 020控制的网络到公 有网络的最短距离。 After receiving the message including the registration service device network address and port, the second registration service unit 2031 sends a "service unit registration message" to the registration service device according to the network address and port of the registration service device provided in the message, and the message includes The network address, port, and prefabricated level information 2 of the second registration service unit 2031 indicate the shortest distance of the network controlled by the NAT device 1 020 to which the registration service unit 2031 belongs to the public network.
• 第一注册服务单元 2021收到 "服务单元注册消息" 后, 根据 携带该消息的数据分组的网络地址及该注册申请消息中携带 的注册服务器网络地址是否相同,判断该消息是否经过 NAT设 备; 如果经过 NAT设备, 提取该注册请求中的层级信息, 如果 层级比当前注册服务单元大 1 , 则在子注册服务单元记录表中 记录该注册服务单元 2031的网络地址、 端口及对应的 NAT设 备 1 020的网络地址和端口,向第二注册服务单元 2031返回注 册成功消息; 如果层级与当前注册服务单元的层级的级差比 1 大,同时子注册服务单元记录表中没有该 NAT设备对应的注册 服务单元的记录, 返回注册失败消息; 如果未经过 NAT设备, 返回注册失败消息。 After receiving the "service unit registration message", the first registration service unit 2021 determines whether the message passes through the NAT device according to whether the network address of the data packet carrying the message and the registration server network address carried in the registration application message are the same; If the level information in the registration request is extracted by the NAT device, if the level is greater than the current registered service unit, the network address, the port, and the corresponding NAT device 1 of the registration service unit 2031 are recorded in the sub-registration service unit record table. The network address and port of 020 return a registration success message to the second registration service unit 2031; if the level difference between the level and the current registration service unit is greater than 1, the registration service unit record table does not have the registration service corresponding to the NAT device. The unit's record returns a registration failure message; if the NAT device is not passed, a registration failure message is returned.
图 7 所示第二注册服务单元代理不提供消息转发功能。 如果必 要, 开发人员不难开发出有消息转发功能的注册服务器代理。 The second registration service unit agent shown in Figure 7 does not provide message forwarding. If necessary, it is not difficult for developers to develop a registration server proxy with message forwarding capabilities.
另外, 该广播方式可以根据各种服务代理所处网络环境使用有 线、 无线或有线和无线等。 In addition, the broadcast mode can use wired, wireless or wired and wireless, etc. depending on the network environment in which the various service agents are located.
此外, 开发人员不难参考图 5—图 7的实例, 在多层 NAT网络中 实现注册服务装置。 In addition, it is not difficult for developers to implement the registration service device in a multi-layer NAT network with reference to the examples in Figures 5-7.
此外, 考虑到安全性问题, 可以对注册消息进行全部加密或局部 加密。 In addition, registration messages can be fully or partially encrypted for security reasons.
图 14为注册服务装置中注册服务单元收到 "服务单元注册消息"
后的处理方法 Figure 14 is a registration service unit in the registration service device receives a "service unit registration message" Post processing method
S1000:开始 S1000: Start
S1001:等待接收数据分组 S1001: waiting to receive data packets
S1002:是否收到数据分组,如没有收到数据分组, 转 S1001, 如 收到数据分组, 转 S1003; S1002: Whether the data packet is received, if no data packet is received, go to S1001, if the data packet is received, go to S1003;
S1003:提取数据分组中的消息; S1003: extract a message in a data packet;
S1004:判别是否为 "服务单元注册消息", 如果不是, 转 S1200, 如果是, 转 S1100; S1004: Determine whether it is "service unit registration message", if not, go to S1200, if yes, go to S1100;
S1100:根据携带消息的数据分组的源地址和消息中的服务单元的 网络地址判定该消息是否经过 NAT 设备, 如果不是, 转 S1130, 如果是, 转 S1120 S1100: Determine whether the message passes through the NAT device according to the source address of the data packet carrying the message and the network address of the service unit in the message. If not, go to S1130, and if yes, go to S1120.
S 1120:提取消息中的层级信息 S 1120: Extract the hierarchical information in the message
S 1121:判别该层级与当前服务单元的层级信息的差是否等于 1 , 如果不是, 转 S1140, 如果是, 转 S1122; S 1121: determining whether the difference between the level information of the layer and the current service unit is equal to 1, if not, transferring to S1140, if yes, to S1122;
S1122:将消息中的服务单元标识、 网络地址、 端口、 对应的 NAT 的网络地址和端口记录在子注册服务器记录表中, S1122: Record the service unit identifier, the network address, the port, the network address and port of the corresponding NAT in the sub-registration server record table,
S1123:向消息发送者返回注册成功的消息,并返回 S1001; S1123: Returning the message of successful registration to the sender of the message, and returning to S1001;
S1130:向消息发送者返回注册失败的消息,并返回 S1001; S1130: Returning the message that the registration failed to the message sender, and returning to S1001;
S 1140:判别在子注册服务器记录中找和数据分组源地址相对应的 NAT设备控制的网络中是否有子注册服务器, 如果没有, 转 S1130, 如果有, 转 S1141; S1140: determining whether there is a sub-registration server in the network controlled by the NAT device corresponding to the source address of the data packet in the sub-registration server record, if not, transferring to S1130, if yes, to S1141;
SI 141:向消息发送者返回包含该子注册服务器的网络地址和端口 的重定向消息,并返回 S1001; SI 141: return a redirect message containing the network address and port of the sub-registration server to the sender of the message, and return to S1001;
S1200:判别是否为系统应答消息,如果不是,转 S1300, 如果是, 转 S1201; S1200: discriminate whether it is a system response message, if not, go to S1300, if yes, go to S1201;
S1201:是否为失败消息,如果不是,转 S1210, 如果是,转 S1202; S1202:结束 S1201: Whether it is a failure message, if not, go to S1210, if yes, go to S1202; S1202: end
S1210:判别是否为重定向消息, 如果不是, 转 S1220, 如果是, 转 S1211; S1210: Determine whether it is a redirect message, if not, go to S1220, if yes, go to S1211;
S1211:触发与 "服务单元注册消息 "对应的重定向消息处理流程, 并返回 S1001; S1211: trigger a redirect message processing process corresponding to the "service unit registration message", and return to S1001;
S1220: 是否为成功消息,如果是,转 S1221,如果不是,转 S1001; S1221: 触发与 "服务单元注册消息"对应的成功消息处理流程, 并返回 S1001;
图 15为注册服务单元向注册服务装置注册的方法。为了维持 NAT 设备中的数据收发对映关系, 注册服务单元需定期执行本方法。 S1220: whether it is a success message, if yes, go to S1221, if not, go to S1001; S1221: trigger the successful message processing flow corresponding to the "service unit registration message", and return to S1001; Figure 15 is a method of registering a registration service unit with a registration service device. In order to maintain the data transmission and reception mapping relationship in the NAT device, the registration service unit needs to perform this method periodically.
S1800:开始 S1800: Start
S1801: 将目标注册服务器记录初始化为公有网络上的顶级注 册服务单元服务入口, 向部署在公有网络上的顶级注册服务单元发 "服务单元注册消息" S1801: Initialize the target registration server record as a top-level registry service unit service entry on the public network, and send a "service unit registration message" to the top-level registration service unit deployed on the public network.
S1802:等待反馈消息的触发回复; S1802: Waiting for a trigger reply of the feedback message;
S1803:判断收到的信息是否为失败, 如果是, 转 S1804, 如果不 是, 转 S1810; S1803: Determine whether the received information is a failure, if yes, go to S1804, if not, go to S1810;
S1810:判断收到的信息是否为成功, 如果是, 转 S1804, 如果不 是, 转 S1820; ; S1810: Determine whether the received information is successful. If yes, go to S1804. If not, go to S1820;
S1820: 判断收到的信息是否为重定向, 如果不是, 转 S1802, 如果是, 转 S1821; S1820: Determine whether the received information is a redirect, if not, go to S1802, and if yes, go to S1821;
S1821: 提取重定向消息中的服务入口, 并存储在目标注册服务 器记录中; S1821: Extract a service entry in the redirect message and store it in the target registration server record;
S1822:根据重定向消息中的网络地址和端口向注册服务装置发 S1822: Send the registration service device according to the network address and port in the redirect message.
"服务单元注册消息", 并返回 S1802; "Service Unit Registration Message", and returns to S1802;
S1804:结束 S1804: End
4. 注册服务系统的基本功能 4. Basic functions of the registration service system
4. 1获取注册服务装置网络地址和端口的工作流程及处理方法 4. 1 Get the workflow and processing method of the registration service device network address and port
注册服务装置 2001的网络地址和端口作为注册服务装置 2001的 服务入口。 在多层 NAT网络环境下, 对应公有网络和私有网络, 名字 注册服务装置 2001有不同服务入口。 在公有网络的服务入口, 如无 特殊限制,可以被公有网络和各 NAT设备控制的网络中的系统终端设 备访问, 该类端口为全局服务入口; 反之, 只能被部分系统终端设备 访问的端口为局部服务入口。 终端系统 6001获得服务入口后, 才能 向注册服务装置 2001提出注册、 登录和查询等请求。 The network address and port of the registration service device 2001 serves as a service entry for the registration service device 2001. In a multi-layer NAT network environment, the name registration service device 2001 has different service entries for the public network and the private network. The service portal of the public network can be accessed by the system terminal device in the network controlled by the public network and each NAT device without special restrictions. This type of port is a global service entry; otherwise, the port can only be accessed by some system terminal devices. For local service entrances. After the terminal system 6001 obtains the service entry, it can make a request for registration, login, and inquiry to the registration service device 2001.
图 8 为以公有网络中注册服务装置全局服务入口为基础, 系统 终端设备 6001向注册服务装置 2001请求局部服务入口。该流程图是 系统终端设备获得注册服务装置服务入口的例子。顶级注册服务单元 2011 配有公有网络网络地址, 该地址及提供服务的端口在系统内为 公知服务入口, 或可通过系统定义的方法获得。 第一 NAT设备 1010
直接接入公有网络, 为根 NAT设备。 第一基本注册服务单元 2021部 署在根 NAT设备 1 01 0控制的网络中;第二 NAT设备 1 020直接接入根 NAT设备 1 01 0控制的网络, 第二基本注册服务单元 2022部署在第二 NAT设备 1 020控制的网络中, 系统终端设备 6001部署在第二 NAT设 备 1 020控制的网络中。第二 NAT设备 1 020控制的网络中的联网主机、 联网设备可以访问根 NAT设备控制的网络中的联网主机、 联网设备。 NAT设备对经过的数据分组源或目的地址进行修改, 该图中忽略 NAT 设备对数据分组修改的描述。 8 is based on the registration service device global service entry in the public network, and the system terminal device 6001 requests the local service portal from the registration service device 2001. The flowchart is an example in which the system terminal device obtains a registration service device service entry. The top-level registration service unit 2011 is equipped with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method. First NAT device 1010 Direct access to the public network, which is the root NAT device. The first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101; the second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, and the second basic registration service unit 2022 is deployed in the second. In the network controlled by the NAT device 1 020, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020. The networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device. The NAT device modifies the source or destination address of the data packet that has passed. The description of the modification of the data packet by the NAT device is ignored in the figure.
• 系统终端设备 6001向 注册服务装置全局服务入口 "服务入口查询 消息"; • System terminal device 6001 global service portal "Service Portal Query Message" to the registration service device;
• 顶级注册服务单元 201 1收到 "服务入口查询消息" 后, 根据逻辑 判断是否能够执行(见图 16 ), 如果能够执行返回成功消息, 如果 不能执行, 判断是否可以重定向到子注册服务单元, 如果可以返 回重定向消息; (本例子中返回包含第一基本注册服务单元 2021 网络地址和端口的重定向消息) • After receiving the "Service Entry Query Message", the top-level registration service unit 201 1 determines whether it can be executed according to logic (see Figure 16). If the return success message can be executed, if it cannot be executed, it is determined whether it can be redirected to the sub-registration service unit. , if a redirect message can be returned; (in this example, a redirect message containing the first basic registration service unit 2021 network address and port is returned)
• 系统终端设备 6001受到重定向应答消息后, 根据消息中包含的注 册服务装置的服务入口,向注册服务装置发"服务入口查询消息"; • After receiving the redirect response message, the system terminal device 6001 sends a “service portal query message” to the registration service device according to the service portal of the registration service device included in the message;
• 第一基本注册服务单元 2021收到 "服务入口查询消息" 后, 根据 逻辑判断是否能够执行, 如果能够执行返回成功消息, 如果不能 执行, 判断是否可以重定向到子注册服务单元, 如果可以返回重 定向消息; (本例子中返回包含第二基本注册服务单元 2022网络地 址和端口的重定向消息) • After receiving the "service entry query message", the first basic registration service unit 2021 determines whether it can be executed according to logic. If the return success message can be executed, if it cannot be executed, it is determined whether it can be redirected to the child registration service unit, if it can be returned Redirect message; (Redirect message containing the second basic registration service unit 2022 network address and port is returned in this example)
• 系统终端设备 6001受到重定向应答消息后, 根据消息中包含的注 册服务装置的服务入口,向注册服务装置发"服务入口查询消息"; • 第二基本注册服务单元 2022收到 "服务入口查询消息" 后, 根据 逻辑判断是否能够执行, 如果能够执行返回成功消息, 如果不能 执行, 判断是否可以重定向到子注册服务单元, 如果可以返回重 定向消息, (本例子中返回成功应答消息) • After receiving the redirect response message, the system terminal device 6001 sends a "service portal query message" to the registration service device according to the service portal of the registration service device included in the message; • the second basic registration service unit 2022 receives the "service portal query" After the message ", according to the logic to determine whether it can be executed, if the return success message can be executed, if it can not be executed, it is judged whether it can be redirected to the sub-registration service unit, if the redirect message can be returned, (the success response message is returned in this example)
• 系统终端设备 6001收到成功应答消息后, 将消息中包含的注册服 务装置的服务入口存储在本地目标注册服务装置记录中。 • After receiving the success response message, the system terminal device 6001 stores the service entry of the registered service device included in the message in the local target registration service device record.
图 8中的请求消息可以通过有线或 /和无线收发 The request message in Figure 8 can be sent or received via wired or / and wireless
图 9通过监听包含注册服务装置服务入口, 系统终端设备 6001获 取局部服务入口的流程。该流程图是系统终端设备获得注册服务装置 服务入口的例子。 顶级注册服务单元 201 1配有公有网络网络地址, 该
地址及提供服务的端口在系统内为公知服务入口,或可通过系统定义 的方法获得。 第一 NAT设备 1 01 0直接接入公有网络, 为根 NAT设备。 第 一基本注册服务单元 2021部署在根 NAT设备 1 01 Q控制的网络中; 第二 NAT设备 1 020直接接入根 NAT设备 1 01 0控制的网络,第二基本注册服务 单元 2022部署在第二 NAT设备 1 020控制的网络中, 系统终端设备 6001 部署在第二 NAT设备 1 020控制的网络中。第二 NAT设备 1 020控制的网络 中的联网主机、 联网设备可以访问根 NAT设备控制的网络中的联网主 机、 联网设备。 NAT设备对经过的数据分组源或目的地址进行修改, 该图中忽略 NAT设备对数据分组修改的描述。 Figure 9 shows the flow of the local terminal entry by the system terminal device 6001 by listening to the service entry containing the registration service device. The flowchart is an example in which the system terminal device obtains a registration service device service entry. The top registration service unit 201 1 is equipped with a public network network address, The address and the port providing the service are well-known service portals within the system or can be obtained by a system defined method. The first NAT device 101 0 directly accesses the public network and is a root NAT device. The first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101 Q; the second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, and the second basic registration service unit 2022 is deployed in the second In the network controlled by the NAT device 1 020, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020. The networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device. The NAT device modifies the passed data packet source or destination address. The description of the data packet modification by the NAT device is ignored in the figure.
• 第二基本注册服务单元 2022在所属 NAT控制的网络中广播包 含注册服务装置网络地址和端口的消息; • The second basic registration service unit 2022 broadcasts a message containing the registration service device network address and port in the network to which the NAT is controlled;
• 系统终端设备 6001在监听包含注册服务装置网络地址和端口 的消息的广播消息; • The system terminal device 6001 is listening for a broadcast message containing a message registering the service device network address and port;
• 系统终端设备 6001收到广播消息后,将消息中包含的注册服务 装置的服务入口存储在本地目标注册服务装置的记录中。 • After receiving the broadcast message, the system terminal device 6001 stores the service entry of the registration service device included in the message in the record of the local target registration service device.
此外,图 9中所述通过广播形式发布服务入口的方式可以使用公 示、预先告知用户等方式代替, 由用户通过人工的方式对系统终端设 备 6001进行配置。 In addition, the manner in which the service portal is published in the form of a broadcast as described in FIG. 9 can be replaced by means of publicity, pre-notification of the user, etc., and the system terminal device 6001 is manually configured by the user.
图 1 0通过监听包含注册服务装置服务入口, 系统终端设备 6001 获取局部服务入口的流程。该流程图是系统终端设备获得注册服务装 置服务入口的例子。 顶级注册服务单元 201 1配有公有网络网络地址, 该地址及提供服务的端口在系统内为公知服务入口,或可通过系统定 义的方法获得。 第一 NAT设备 1 01 0直接接入公有网络, 为根 NAT设备。 第一基本注册服务单元 2021部署在根 NAT设备 1 01 0控制的网络中; 第 二 NAT设备 1 020直接接入根 NAT设备 1 01 0控制的网络,第一基本注册服 务单元代理 202 3部署在第二 NAT设备 1 020控制的网络中, 系统终端设 备 6001部署在第二 NAT设备 1 020控制的网络中。第二 NAT设备 1 020控制 的网络中的联网主机、 联网设备可以访问根 NAT设备控制的网络中的 联网主机、 联网设备。 NAT设备对经过的数据分组源或目的地址进行 修改, 该图中忽略 NAT设备对数据分组修改的描述。 服务单元代理和 被代理服务单元间可以有私有通信接口,用于服务单元代理和被代理 服务单元间的信息交互。 Figure 10 shows the process of obtaining a local service entry by the system terminal device 6001 by listening to the service entry containing the registration service device. The flow chart is an example of a system terminal device obtaining a registration service device service entry. The top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method. The first NAT device 1 01 0 directly accesses the public network and is the root NAT device. The first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101. The second NAT device 1 020 directly accesses the network controlled by the root NAT device 100. The first basic registration service unit agent 202 3 is deployed in the network. In the network controlled by the second NAT device 1 020, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020. The networked host and the networked device in the network controlled by the second NAT device 1 020 can access the networked host and the networked device in the network controlled by the root NAT device. The NAT device modifies the source or destination address of the data packet that has passed. The description of the modification of the data packet by the NAT device is ignored in the figure. There may be a private communication interface between the service unit agent and the agent service unit for information exchange between the service unit agent and the agent service unit.
• 第一基本注册服务单元代理 2023在所属 NAT控制的网络中广播 包含注册服务装置网络地址和端口的消息;
• 系统终端设备 6001在监听包含注册服务装置网络地址和端口 的消息的广播消息; • The first basic registration service unit agent 2023 broadcasts a message containing the registration service device network address and port in the network to which the NAT is controlled; • The system terminal device 6001 is listening for a broadcast message containing a message registering the service device network address and port;
• 系统终端设备 6001收到广播消息后,将消息中包含的注册服务 装置的服务入口存储在本地目标注册服务装置的记录中。 • After receiving the broadcast message, the system terminal device 6001 stores the service entry of the registration service device included in the message in the record of the local target registration service device.
图 10第一注册服务单元代理不提供消息转发功能。 如果必要, 开发人员不难开发出有消息转发功能的注册服务器代理。 Figure 10 The first registration service unit agent does not provide a message forwarding function. If necessary, it is not difficult for developers to develop a registration server proxy with message forwarding capabilities.
另外, 在多层 NAT网络中, 开发人员不难根据本流程提出相关流 程。 流程的执行过程可以是有线或 /和无线。 In addition, in a multi-layer NAT network, it is not difficult for developers to propose related processes according to this process. The execution of the process can be wired or / and wireless.
此外, 图 10所述通过广播形式发布服务入口的方式可以使用公 示、预先告知用户等方式代替。 由用户通过人工的方式对服务客户端 进行配置。 Further, the manner in which the service portal is published by broadcast in Fig. 10 can be replaced by means of publicity, advance notice to the user, and the like. The service client is manually configured by the user.
图 16 为注册服务装置中的注册服务单元收到 "服务入口查询消 息" 后的处理方法 Figure 16 shows the processing method after the registration service unit in the registration service device receives the "service entry inquiry message".
S2000:开始 S2000: Start
S2001:等待接收数据分组 S2001: waiting to receive data packets
S2002:是否收到数据分组,如没有收到数据分组, 转 S2001, 如 收到数据分组, 转 S2003; S2002: Whether the data packet is received, if no data packet is received, go to S2001, if the data packet is received, go to S2003;
S2003:提取数据分组中的消息; S2003: extracting a message in a data packet;
S2004:判别是否为 "服务入口查询消息", 如果不是, 转 S2005, 如果是, 转 S2100; S2004: Determine whether it is "service entry query message", if not, go to S2005, if yes, go to S2100;
S2100:根据携带消息的数据分组的源地址和消息中的系统终端设 备的网络地址判别该系统终端设备是否在 NAT之后, 如果 不是, 转 S2101, 如果是, 转 S2200; S2100: determining, according to the source address of the data packet carrying the message and the network address of the system terminal device in the message, whether the terminal device of the system is after the NAT, if not, then transferring to S2101, if yes, to S2200;
S2200:子注册服务器记录表中找和数据分组源地址所对应的 NAT 设备控制的网络中是否有子注册服务器, 如果没有, 转 S2101, 如果有, 转 S2201 ; S2200: Whether there is a sub-registration server in the network controlled by the NAT device corresponding to the source address of the data packet in the sub-registration server record table. If not, go to S2101, if yes, go to S2201;
S2201:向消息发送者返回包含该子注册服务单元的网络地址和端 口的重定向消息,并返回 S2001 ; S2201: Return, to the message sender, a redirect message including the network address and port of the sub-registration service unit, and return to S2001;
S2101:向消息发送者返回成功应答消息, 消息中包括可用注册服 务单元的网络地址和端口,并返回 S2001 ; S2101: returning a success response message to the sender of the message, including the network address and port of the available registration service unit, and returning to S2001;
S2005 : 进行其它处理, 并返回 S2001; S2005: Perform other processing and return to S2001;
图 17 为系统终端设备获取注册服务装置网络地址和端口的方法。 为了维持 NAT设备中的数据收发对映关系,系统终端设备需定期执行 本方法。
S2800:开始 Figure 17 shows how the system terminal device obtains the network address and port of the registration service device. In order to maintain the data transmission and reception mapping relationship in the NAT device, the system terminal device needs to perform the method periodically. S2800: Start
S2801:监听广播消息 S2801: Listening to broadcast messages
S2802:是否收到包含注册服务装置服务入口的广播消息,如果是, 转 S2806,如果不是, 转 S2803; S2802: Whether a broadcast message containing the service entry of the registration service device is received, if yes, go to S2806, if not, go to S2803;
S2806:在本地目标注册服务装置记录中记录广播消息中的网络地 址和端口 S2806: Recording the network address and port in the broadcast message in the local target registration service device record
S2807:结束 S2807: End
S2803:向部署在公有网络上的顶级注册服务单元发"服务入口查询 消息", 并用部署在公有网络上的顶级注册服务单元的服务 入口初始化本地目标注册服务装置记录; S2803: Send a "service portal query message" to a top-level registration service unit deployed on the public network, and initialize a local target registration service device record with a service portal of a top-level registration service unit deployed on the public network;
S2804:等待回复; S2804: waiting for a reply;
S2805:判断收到的信息是否为成功,如果是,转 S2807,如果不是, 转 S2810; S2805: Determine whether the received information is successful. If yes, go to S2807. If not, go to S2810.
S2810:判断收到的信息是否为重定向, 如果不是, 转 S2804 , 如 果是, 转 S2811; S2810: Determine whether the received information is a redirect, if not, go to S2804, if yes, go to S2811;
S2811: 将重定向消息中注册服务装置的网络地址和端口存入本地 目标注册服务装置记录中,并根据重定向消息中的网络地址 和端口向注册服务装置发 "服务入口查询消息", 并返回 S2804; S2811: The network address and port of the registration service device in the redirect message are stored in the local target registration service device record, and the service entry query message is sent to the registration service device according to the network address and port in the redirect message, and is returned. S2804;
4. 2用户信息注册流程及方法 4. 2 user information registration process and method
图 11用户使用的系统终端设备向注册服务装置发用户注册信息 (用户开户信息)的过程。 该流程图是用户使用的系统终端设备向注 册服务装置发用户注册信息的例子。 顶级注册服务单元 2011配有公 有网络网络地址, 该地址及提供服务的端口在系统内为公知服务入 口, 或可通过系统定义的方法获得。 第一 NAT设备 1010直接接入公 有网络, 为根 NAT设备。 第一基本注册服务单元 2021部署在根 NAT 设备 1010控制的网络中; 第二 NAT设备 1020直接接入根 NAT设备 1010控制的网络, 第二基本注册服务单元 2031部署在第二 NAT设备 1020控制的网络中, 系统终端设备 6001部署在第二 NAT设备 1020 控制的网络中; 系统终端设备 6001 已经获得了注册服务装置的服务 入口。 第二 NAT设备 1020控制的网络中的联网主机、 联网设备可以 访问根 NAT设备控制的网络中的联网主机、 联网设备。 NAT设备对经 过的数据分组地源或目的地址进行修改,该图中忽略 NAT设备对数据
分组修改的描述 11 is a process of transmitting user registration information (user account opening information) to a registration service device by a system terminal device used by a user. This flowchart is an example in which the system terminal device used by the user transmits user registration information to the registration service device. The top-level registration service unit 2011 is equipped with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method. The first NAT device 1010 directly accesses the public network and is a root NAT device. The first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 1010; the second NAT device 1020 directly accesses the network controlled by the root NAT device 1010, and the second basic registration service unit 2031 is deployed in the second NAT device 1020. In the network, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1020; the system terminal device 6001 has obtained the service portal of the registration service device. The networked host and the networked device in the network controlled by the second NAT device 1020 can access the networked host and the networked device in the network controlled by the root NAT device. The NAT device modifies the source or destination address of the passed data packet. In this figure, the NAT device pair data is ignored. Description of group modification
• 系统终端设备 6001向顶级注册服务单元 201 1发"用户注册消 息", 消息中至少包括用户标识、 用户使用终端的网络地址; • 顶级注册服务单元 201 1收到用户注册消息后, 在用户注册信 息记录表中查找是否有相同用户标识,如果没有相同用户标识 将该用户用户标识及其相关信息加入用户注册信息记录表,判 断该 "用户注册消息" 是否经过 NAT设备(例如, 根据携带该 "用户注册消息"的数据分组的源地址和消息中的用户使用终 端的网络地址判断该消息是否经过 NAT设备 ), 如果经过 NAT 设备,则在子注册服务器记录中查找与该 NAT设备相关的子注 册服务单元, 如果子注册服务单元存在, 则返回重定向应答消 息, 消息中包括该注册服务单元的服务入口; 如果不经过 NAT 设备, 或该 NAT设备没有相关的注册服务单元, 则返回成功注 册消息; 如果用户标识存在, 则返回失败应答消息。 • The system terminal device 6001 sends a “user registration message” to the top-level registration service unit 201 1 , where the message includes at least the user identifier and the network address of the user-used terminal; • the top-level registration service unit 201 1 registers with the user after receiving the user registration message. If the same user identifier is found in the information record table, if the same user identifier is not added to the user registration information record table, it is determined whether the "user registration message" passes through the NAT device (for example, according to the carrying) The user registration message "the source address of the data packet and the user in the message use the network address of the terminal to determine whether the message passes through the NAT device", and if the NAT device passes, look up the sub-registration associated with the NAT device in the sub-registration server record a service unit, if the sub-registration service unit exists, returning a redirect response message including the service entry of the registration service unit; if the NAT device is not passed, or the NAT device does not have an associated registration service unit, a successful registration message is returned ; if the user is marked Presence, failed to return a reply message.
• 系统终端设备收到应答消息后,如果为失败应答消息或成功应 答消息则结束注册,如果为重定向应答消息则根据消息中的注 册服务单元服务入口发 "用户注册消息", 消息中至少包括用 户标识、 用户使用终端的网络地址; • After receiving the response message, the system terminal device ends the registration if it is a failure response message or a success response message. If it is a redirect response message, it sends a "user registration message" according to the registration service unit service entry in the message. The message includes at least User ID, the network address of the user using the terminal;
• 第一注册服务单元 2021收到用户注册消息后, 在用户注册信 息记录表中查找是否有相同用户标识,如果没有相同用户标识 将该用户的用户标识及其相关信息加入用户注册信息记录表, 判断该 "用户注册消息" 是否经过 NAT设备(例如, 根据携带 该 "用户注册消息"的数据分组的源地址和消息中的用户使用 终端的网络地址判断该消息是否经过 NAT设备 ),如果经过 NAT 设备,则在子注册服务器记录中查找与该 NAT设备相关的子注 册服务单元, 如果子注册服务单元存在, 则返回重定向应答消 息, 消息中包括该注册服务单元的服务入口; 如果不经过 NAT 设备, 或该 NAT设备没有相关的子注册服务单元, 则返回成功 注册消息; 如果用户标识存在, 则返回失败应答消息。 After the first registration service unit 2021 receives the user registration message, it searches for the same user identifier in the user registration information record table, and if the same user identifier does not add the user identifier and related information of the user to the user registration information record table, Determining whether the "user registration message" passes through the NAT device (for example, according to the source address of the data packet carrying the "user registration message" and the network address of the user using the terminal in the message to determine whether the message passes through the NAT device), if NAT is passed The device searches for a sub-registration service unit associated with the NAT device in the sub-registration server record, and if the sub-registration service unit exists, returns a redirect response message, where the message includes the service entry of the registration service unit; if not through NAT The device, or the NAT device does not have an associated sub-registration service unit, returns a successful registration message; if the user identification exists, a failure response message is returned.
• 系统终端设备收到应答消息后,如果为失败应答消息或成功应 答消息则结束注册,如果为重定向应答消息则根据消息中的注 册服务单元服务入口发 "用户注册消息", 消息中至少包括用 户标识、 用户使用终端的网络地址; • After receiving the response message, the system terminal device ends the registration if it is a failure response message or a success response message. If it is a redirect response message, it sends a "user registration message" according to the registration service unit service entry in the message. The message includes at least User ID, the network address of the user using the terminal;
• 第二注册服务单元 2031收到用户注册消息后, 在用户注册信
息记录表中查找是否有相同用户标识,如果没有相同用户标识 将该用户用户标识及其相关信息加入用户注册信息记录表,判 断该 "用户注册消息" 是否经过 NAT设备(例如, 根据携带该 "用户注册消息"的数据分组的源地址和消息中的用户使用终 端的网络地址判断该消息是否经过 NAT设备 ), 如果经过 NAT 设备,则在子注册服务器记录中查找与该 NAT设备相关的子注 册服务单元, 如果子注册服务单元存在, 则返回重定向应答消 息, 消息中包括该注册服务单元的服务入口; 如果不经过 NAT 设备, 或该 NAT设备没有相关的子注册服务单元, 则返回成功 注册消息; 如果用户标识存在, 则返回失败应答消息。 • After the second registration service unit 2031 receives the user registration message, the user registration letter If the same user identifier is not found in the information record table, if the user ID and related information are not added to the user registration information record table, it is determined whether the "user registration message" passes through the NAT device (for example, according to the carrying) The user registration message "the source address of the data packet and the user in the message use the network address of the terminal to determine whether the message passes through the NAT device", and if the NAT device passes, look up the sub-registration associated with the NAT device in the sub-registration server record a service unit, if the sub-registration service unit exists, returning a redirect response message including the service entry of the registration service unit; if the NAT device is not passed, or the NAT device does not have an associated sub-registration service unit, the successful registration is returned Message; if the user ID exists, a failure reply message is returned.
• 系统终端设备收到应答消息后,如果为失败应答消息或成功应 答消息则结束注册,如果为重定向应答消息则根据消息中的注 册服务单元服务入口发 "用户注册消息", 消息中至少包括用 户标识、 用户使用终端的网络地址; 由于用户注册信息在多级 NAT网络中按层级存在, 当注册服务单 元收到 "用户注册信息查询消息"的时候可以采用多种策略进行查询。 例如首先在本地用户注册记录表中查寻, 如果用户存在, 则向查询请 求者返回成功消息; 如果用户不存在, 向顶级注册服务单元查询, 如 果收到顶级注册服务单元返回的成功消息,则向查询请求者返回成功 消息; 如果收到顶级注册服务单元返回的失败消息, 则向查询请求者 返回失败消息。 • After receiving the response message, the system terminal device ends the registration if it is a failure response message or a success response message. If it is a redirect response message, it sends a "user registration message" according to the registration service unit service entry in the message. The message includes at least User ID, network address of the user's use terminal; Since the user registration information exists in a hierarchical manner in a multi-level NAT network, when the registration service unit receives the "user registration information query message", it can use multiple policies to query. For example, first look up in the local user registration record table, if the user exists, return a success message to the query requester; if the user does not exist, query the top-level registration service unit, if receiving the success message returned by the top-level registration service unit, The query requester returns a success message; if a failure message returned by the top-level registration service unit is received, a failure message is returned to the query requester.
4. 3 用户登录流程及方法 4. 3 User Login Process and Method
图 1 2用户使用的系统终端设备向注册服务装置发用户登录信息 的过程。该流程图是用户使用的系统终端设备向注册服务装置发用户 登录信息的例子。 顶级注册服务单元 201 1配有公有网络网络地址, 该地址及提供服务的端口在系统内为公知服务入口,或可通过系统定 义的方法获得。 第一 NAT设备 1 01 0直接接入公有网络, 为根 NAT设 备。第一基本注册服务单元 2021部署在根 NAT设备 1 01 0控制的网络 中; 第二 NAT设备 1 020直接接入根 NAT设备 1 01 0控制的网络, 第二 基本注册服务单元 2031部署在第二 NAT设备 1 020控制的网络中,系 统终端设备 6001部署在第二 NAT设备 1 020控制的网络中; 系统终端 设备 6001已经获得了注册服务装置的服务入口。 第二 NAT设备 1 020
控制的网络中的联网主机、联网设备可以访问根 NAT设备控制的网络 中的联网主机、 联网设备。 NAT设备对经过的数据分组地源或目的地 址进行修改, 该图中忽略 NAT设备对数据分组修改的描述。 Figure 1 2 shows the process in which the system terminal device used by the user sends user login information to the registration service device. This flowchart is an example in which the system terminal device used by the user transmits user login information to the registration service device. The top-level registration service unit 201 1 is provided with a public network network address, which is a well-known service portal within the system, or can be obtained by a system-defined method. The first NAT device 101 0 directly accesses the public network and is a root NAT device. The first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 101. The second NAT device 1 020 directly accesses the network controlled by the root NAT device 101, and the second basic registration service unit 2031 is deployed in the second. In the network controlled by the NAT device 1 020, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1 020; the system terminal device 6001 has obtained the service portal of the registration service device. Second NAT device 1 020 The networked host and networked device in the controlled network can access the networked host and the networked device in the network controlled by the root NAT device. The NAT device modifies the source or destination address of the passed data packet. The description of the modification of the data packet by the NAT device is ignored in the figure.
• 系统终端设备 6001 将用户登录状态设为未登录, 根据本地 存储的注册服务装置的服务入口向注册服务装置发 "用户登 录消息", 消息中至少包括用户标识、 用户登录点, 该用户 登录点为用户使用的系统终端设备的网络地址和端口 • 第二基本注册服务单元 2031 收到用户登录消息后, 根据逻 辑决定是否纪录用户标认识及相关信息, 并决定是否返回应 答消息及返回何种应答消息; 在记录用户登录信息后, 如果 本单元不是顶级注册服务单元, 根据本地目标注册服务器记 录向注册服务装置转发的用户登录消息。 • The system terminal device 6001 sets the user login status to not registered, and sends a “user login message” to the registration service device according to the service portal of the locally stored registration service device, where the message includes at least a user identifier, a user login point, and the user login point. The network address and port of the system terminal device used by the user • After receiving the user login message, the second basic registration service unit 2031 determines whether to record the user identification and related information according to logic, and decides whether to return the response message and return the response. Message; After recording the user login information, if the unit is not a top-level registration service unit, the user login message forwarded to the registration service device is recorded according to the local target registration server.
• 系统终端设备收到成功应答消息后, 将用户登录状态设为登 录, • After receiving the success response message, the system terminal device sets the user login status to login.
• 第一基本注册服务单元 2021 收到用户登录消息后, 根据逻 辑决定是否纪录用户标认识及相关信息, 并决定是否返回应 答消息及返回何种应答消息; 在记录用户登录信息后, 如果 本单元不是顶级注册服务单元, 根据本地目标注册服务器记 录向注册服务装置转发的用户登录消息, After receiving the user login message, the first basic registration service unit 2021 determines whether to record the user identification and related information according to logic, and determines whether to return the response message and return the response message; after recording the user login information, if the unit is recorded Not a top-level registration service unit, according to the local target registration server records the user login message forwarded to the registration service device,
• 顶级注册服务单元 2011 用户注册消息后, 根据逻辑决定是 否纪录用户标认识及相关信息, 并决定是否返回应答消息及 返回何种应答消息; 在记录用户登录信息后, 如果本单元不 是顶级注册服务单元, 根据本地目标注册服务器记录向注册 服务装置转发的用户登录消息。 • After the top-level registration service unit 2011 user registration message, it is logically determined whether to record the user's identification and related information, and decide whether to return the response message and return the response message; after recording the user login information, if the unit is not the top registration service The unit records the user login message forwarded to the registration service device according to the local target registration server.
另外, 用户需要定期向注册服务装置发用户登录消息, 以保证注 册服务装置中的用户状态为在线状态。如果注册服务装置在特定期限 内没有收到某个用户的用户登录消息,注册服务装置将该用户的状态 设为非在线。 如果系统终端设备移动, 系统终端设备需要重新发用户 登录消息。 In addition, the user needs to periodically send a user login message to the registration service device to ensure that the user status in the registration service device is online. If the registration service device does not receive a user login message for a certain user within a certain period of time, the registration service device sets the user's status to offline. If the system terminal device moves, the system terminal device needs to resend the user login message.
图 18为注册服务装置中的注册服务单元收到 "用户登录消息" 后的处理方法。 18 is a processing method after the registration service unit in the registration service device receives the "user login message".
S3000:开始 S3000: Getting started
S3001:等待接收数据分组 S3001: Waiting to receive data packets
S3002:是否收到数据分组,如没有收到数据分组, 转 S3001, 如
收到数据分组, 转 S3003 S3002: Whether to receive the data packet, if no data packet is received, go to S3001, such as Received data packet, go to S3003
S3003:提取数据分组中的消息; S3003: extracting a message in a data packet;
S3004:判别是否为 "用户登录消息" , 如果不是, 转 S3005, 如 果是, 转 S3100 S3004: Determine whether it is "user login message". If not, go to S3005. If yes, go to S3100.
S 3100:根据消息中的用户登录点判别该消息发送者是否为子注册 服务器, 如果是, 转 S3101, 如果不是, 转 S3200; S 3100: determining, according to the user login point in the message, whether the sender of the message is a child registration server, and if so, transferring to S3101, if not, to S3200;
S 3101:以消息中的用户标识作为用户标识、 以携带该消息的数据 分组源地址和源端口为系统终端设备访问点、 以本单元标 识作为用户登录点,存储在用户登录信息记录表中,顺序执 行 S 3300; S3101: the user identifier in the message is used as the user identifier, the data packet source address and the source port carrying the message are the system terminal device access point, and the unit identifier is used as the user login point, and is stored in the user login information record table. S3300 is executed sequentially;
S 3200:查找该用户是否在系统中注册,如没有注册,转 S 3290, 如 已经注册, 转 S3201, S 3200: Find whether the user is registered in the system. If there is no registration, go to S 3290, if already registered, go to S3201,
S 3201:根据携带消息的数据分组的源地址和消息中的用户使用的 系统终端设备的网络地址判别该系统终端设备是否在 NAT 之后, 如果不是, 转 S3202 , 如果是, 转 S3203; S 3202:将消息中的用户标识作为用户标识、将用户登录点作为用 户登录点, 存储在用户登录信息记录表中; S 3201: Determine whether the system terminal device is behind the NAT according to the source address of the data packet carrying the message and the network address of the system terminal device used by the user in the message. If not, go to S3202, and if yes, go to S3203; S 3202: The user identifier in the message is used as the user identifier, and the user login point is used as the user login point, and is stored in the user login information record table;
S 3203:将消息中的用户标识作为用户标识、 以携带该消息的数据 分组源地址和源端口为系统终端设备访问点、 以本单元标 识作为用户登录点, 存储在用户登录信息记录表中; S3204:向消息发送者返回成功应答消息; S3203: The user identifier in the message is used as the user identifier, the data packet source address and the source port carrying the message are the system terminal device access point, and the unit identifier is used as the user login point, and is stored in the user login information record table; S3204: return a success response message to the message sender;
S3300:判别本单元是否为顶级注册服务器, 如果是, 转 S 3001, 如果不是, 转 S3301; S3300: Determine whether the unit is a top-level registration server. If yes, go to S 3001, if not, go to S3301;
S 3301:使用本单元的标识代替收到消息的用户登录点生成新的 用户注册消息; S 3301: Generate a new user registration message by using the identifier of the unit instead of the user login point of the received message;
S3302:根据本地目标注册服务器记录向注册服务装置发送新的用 户登录消息, 返回 S3001 S3302: Send a new user login message to the registration service device according to the local target registration server record, and return to S3001.
S3290:向消息发送者返回失败应答消息,返回 S3001; S3290: Returning a failure response message to the sender of the message, and returning to S3001;
S3005:进行其它处理; S3005: Perform other processing;
此外, 当用户登录消息在注册服务单元间转发, 本注册服务单元 的子注册服务单元记录中存有下级网络中注册服务单元标识及 NAT 设备相关信息,因此在使用注册服务单元标识作为系统终端设备访问 点时, 可以映射到 NAT设备上的网络地址和端口。
图 19为用户通过系统终端设备向注册服务装置发用户登录信息。 S3800:开始 In addition, when the user login message is forwarded between the registration service units, the sub-registration service unit record of the registration service unit stores the registration service unit identifier and the NAT device-related information in the subordinate network, and therefore uses the registration service unit identifier as the system terminal device. When accessing a point, it can be mapped to a network address and port on the NAT device. FIG. 19 is a diagram in which a user sends user login information to a registration service device through a system terminal device. S3800: Start
S 3802:设定超时时间,设定终端为未登录状态; S 3802: setting a timeout period, setting the terminal to an unregistered state;
S3803:根据本地目标注册服务装置的记录向注册服务装置发 "用户登 录消息" , S3803: Send a "user login message" to the registration service device according to the record of the local target registration service device,
S3804:等待回复; S3804: Waiting for a reply;
S3805:判断是否超时; 如果是, 转 S3809, 如果不是, 转 S3806 S3806:判断是否为成功消息,如果不是,转 S3808 ,如果是,转 S3807; S3807:将终端状态设定为登陆; S3805: Determine whether it times out; if yes, go to S3809, if not, go to S3806 S3806: judge whether it is a success message, if not, go to S3808, if yes, go to S3807; S3807: set the terminal status to login;
S3809:结束 S3809: End
S3808:判断是否为失败消息,如果是,转 S 3809, 如果不是,转 S 3804; 开发人员不难根据上述用户登录方式, 结合用户注册的需要进行改 进, 用于完成用户注册、 开户任务。 S3808: Determine whether it is a failure message. If yes, go to S 3809. If not, go to S 3804. It is not difficult for the developer to improve according to the user login method described above and the user registration requirements, to complete the user registration and account opening tasks.
4. 4被请求用户的用户登录点获取流程及方法 4. 4 user login point acquisition process and method of the requested user
图 13为主动请求用户通过注册服务系统获取被请求用户的用户 登录点的过程, 该过程是获取被请求用户的用户登录点的过程的例 子。 顶级注册服务单元 2011配有公有网络网络地址, 该地址及提供 服务的端口在系统内为公知服务入口, 或可通过系统定义的方法获 得。 第一 NAT设备 1010直接接入公有网络, 为根 NAT设备。 第一基 本注册服务单元 2021部署在根 NAT设备 1010控制的网络中; 第二 NAT设备 1020直接接入根 NAT设备 1010控制的网络, 第二基本注册 服务单元 2031部署在第二 NAT设备 1020控制的网络中,系统终端设 备 6001部署在第二 NAT设备 1020控制的网络中;系统终端设备 6001 已经获得了注册服务装置的服务入口。 第二 NAT设备 1020控制的网 络中的联网主机、联网设备可以访问根 NAT设备控制的网络中的联网 主机、联网设备。 NAT设备对经过的数据分组源或目的地址进行修改, 该图中忽略 NAT设备对数据分组修改的描述。 FIG. 13 is a process of actively requesting a user to acquire a user login point of a requested user through a registration service system, and the process is an example of a process of acquiring a user login point of a requested user. The top-level registration service unit 2011 is equipped with a public network network address, which is a well-known service portal within the system or can be obtained by a system-defined method. The first NAT device 1010 directly accesses the public network and is the root NAT device. The first basic registration service unit 2021 is deployed in the network controlled by the root NAT device 1010; the second NAT device 1020 directly accesses the network controlled by the root NAT device 1010, and the second basic registration service unit 2031 is deployed in the second NAT device 1020. In the network, the system terminal device 6001 is deployed in the network controlled by the second NAT device 1020; the system terminal device 6001 has obtained the service portal of the registration service device. The networked host and the networked device in the network controlled by the second NAT device 1020 can access the networked host and the networked device in the network controlled by the root NAT device. The NAT device modifies the passed data packet source or destination address. The description of the data packet modification by the NAT device is ignored in the figure.
• 系统终端设备 6001根据本地存储的目标注册服务装器纪录口向注 册服务装置发 "用户登录点查找请求消息", 消息中至少包括被请 求用户标识、 随机序号。 The system terminal device 6001 sends a "user login point lookup request message" to the registration service device according to the locally stored target registration service device record port, and the message includes at least the requested user identifier and the random serial number.
• 第二注册服务单元 2031收到 "用户登录点查找请求消息" 后, 提 取消息中的被请求用户标识, 在用户登录信息记录表中查找, 如 果被请求用户标识在用户登录信息记录表中存在, 向消息发送者 返回包含被请求用户当前用户登录点的成功消息, 消息中包括对
应的原请求消息中的随机序号; 如果被请求用户标识在用户登录 信息记录表中不存在, 且本服务节点不是顶级注册服务单元, 根 据消息中的随机序号建立消息和消息发送者的映射关系, 将该映 射关系保存在消息緩存区中, 根据本地注册服务器纪录, 向注册 服务装置转发该 "用户登录点查找请求消息"; After receiving the "user login point lookup request message", the second registration service unit 2031 extracts the requested user identifier in the message, and searches in the user login information record table, if the requested user identifier exists in the user login information record table. Returning to the message sender a success message containing the current user login point of the requested user, including the pair The random sequence number in the original request message; if the requested user identifier does not exist in the user login information record table, and the service node is not the top-level registration service unit, the mapping relationship between the message and the message sender is established according to the random sequence number in the message. And saving the mapping relationship in the message buffer, and forwarding the "user login point lookup request message" to the registration service device according to the local registration server record;
• 第一注册服务单元 2021收到 "用户登录点查找请求消息" 后, 提 取消息中的被请求用户标识, 在用户登录信息记录表中查找, 如 果被请求用户标识在用户登录信息记录表中存在, 向消息发送者 返回包含被请求用户当前用户登录点的成功消息, 消息中包括对 应的原请求消息中的随机序号; 如果被请求用户标识不在用户登 录信息记录表中不存在, 且本服务节点不是顶级注册服务单元, 根据消息中的随机序号建立消息和消息发送者的映射关系, 将该 映射关系保存在消息緩存区中, 根据本地注册服务器纪录, 向注 册服务装置转发该 "用户登录点查找请求消息"; After receiving the "user login point lookup request message", the first registration service unit 2021 extracts the requested user identifier in the message, and searches in the user login information record table, if the requested user identifier exists in the user login information record table. Returning a success message including the current user login point of the requested user to the message sender, where the message includes a random sequence number in the corresponding original request message; if the requested user identifier does not exist in the user login information record table, and the service node It is not the top-level registration service unit, and the mapping relationship between the message and the sender of the message is established according to the random sequence number in the message, and the mapping relationship is saved in the message buffer area, and the user login point search is forwarded to the registration service device according to the local registration server record. Request message";
• 顶级注册服务单元 201 1收到 "用户登录点查找请求消息" 后, 提 取消息中的被请求用户标识, 在用户登录信息记录表中查找, 如 果被请求用户标识在用户登录信息记录表中存在, 向消息发送者 返回包含被请求用户当前用户登录点的成功消息, 消息中包括对 应的原请求消息中的随机序号; 如果被请求用户标识不在用户登 录信息记录表中不存在, 且本服务节点是顶级注册服务单元, 向 消息发送者返回失败消息, 消息中包括对应的原请求消息中的随 机序号; • After receiving the "user login point lookup request message", the top-level registration service unit 201 1 extracts the requested user identifier in the message, and searches in the user login information record table, if the requested user identifier exists in the user login information record table. Returning a success message including the current user login point of the requested user to the message sender, where the message includes a random sequence number in the corresponding original request message; if the requested user identifier does not exist in the user login information record table, and the service node Is a top-level registration service unit, and returns a failure message to the message sender, where the message includes a random sequence number in the corresponding original request message;
• 第一注册服务单元 2021收到应答消息后, 根据应答消息中的随机 序号找到对应的联接节点查找请求消息发送者, 并向该发送者转 发应答消息。 After receiving the response message, the first registration service unit 2021 finds the corresponding sender node lookup request message sender according to the random number in the response message, and forwards the response message to the sender.
• 第二注册服务单元 2022收到应答消息后, 根据应答消息中的随机 序号找到对应的联接节点查找请求消息发送者, 并向该发送者转 发应答消息。 After receiving the response message, the second registration service unit 2022 finds the corresponding sender node lookup request message sender according to the random number in the response message, and forwards the response message to the sender.
• 系统终端设备 6001收到应答消息后, 如果为成功应答消息, 则记 录消息中的被请求用户的用户登录点; 如果为失败应答消息, 结 束。 上述过程是查找满足条件的用户登录点的基本流程。开发人员不 难根据具体应用中的需求, 对上述流程进行扩展、 变化, 并在找到用
户登录点后对后续执行流程进行改变。但不影响根据被请求用户标识 查询用户登录点过程的本质。 图 20为注册服务装置中的注册服务单元收到 "用户登录点查找请求 消息" 后的处理方法 • After receiving the response message, the system terminal device 6001 records the user login point of the requested user in the message if it is a success response message; if it is a failure response message, it ends. The above process is the basic process of finding a user login point that satisfies the condition. It is not difficult for developers to extend, change, and find the above processes based on the needs of specific applications. After the user logs in, the subsequent execution process is changed. However, it does not affect the nature of the process of querying the user's login point based on the requested user ID. 20 is a processing method after the registration service unit in the registration service device receives the "user login point lookup request message"
S4000:开始 S4000: Start
S4001:等待接收数据分组 S4001: Waiting to receive data packets
S4002:是否收到数据分组,如没有收到数据分组, 转 S4001 , 如 收到数据分组, 转 S4003; S4002: Whether to receive the data packet, if no data packet is received, go to S4001, if the data packet is received, go to S4003;
S4003:提取数据分组中的消息; S4003: extracting a message in a data packet;
S4004:判别是否为 "用户登录点查找请求消息", 如果不是, 转 S4005 , 如果是, 转 S4100; S4004: Determine whether it is "user login point lookup request message", if not, go to S4005, if yes, go to S4100;
S4100: 提取消息中的随机序列; S4100: extracting a random sequence in the message;
S4101 :在转发关系列表中查找相应的发送者,如果有,转 S4106 , 如果没有, 转 S4102; S4101: Find the corresponding sender in the forwarding relationship list, if any, go to S4106, if not, go to S4102;
S 4102:提出消息中被请求用户标识; S 4102: presenting the requested user identifier in the message;
S4103:在用户登录信息记录表中查找被请求用户标识是否存在, 如果是, 转 S4200 , 如果不是, 转 S4104; S4103: Query whether the requested user identifier exists in the user login information record table, if yes, go to S4200, if not, go to S4104;
S4104:判断本单元是否为顶级注册服务器, 如果是, 转 S4107 , 如果不是, 转 S4105; S4104: Determine whether the unit is a top-level registration server, if yes, go to S4107, if not, go to S4105;
S 4105:根据消息中的随机序列建立消息发送者同该消息的对应关 系, 并存储在转发关系表中; S 4105: Establish a correspondence between the sender of the message and the message according to the random sequence in the message, and store the information in the forwarding relationship table.
S4106:根据本地目标注册服务器记录向注册服务装置转发 "用户 登录点查找请求消息" ,并返回 S4001 ; S4106: Forward a "user login point lookup request message" to the registration service device according to the local target registration server record, and return to S4001;
S4107:向消息发送者返回失败消息, 并返回 S4001;; S4107: returning a failure message to the sender of the message, and returning to S4001;
S4200:向消息发送者返回成功消息,该消息中包括用户登录信息 记录表中被请求用户的用户登录点, 并返回 S4001 ; S4200: returning a success message to the sender of the message, where the message includes the user login point of the requested user in the user login information record table, and returns to S4001;
S4005:判别是否为 "用户登录点查找请求消息" 的应答消息, 如 果不是, 转 S4006, 如果是, 转 S4300; S4005: Determine whether it is a response message of "user login point lookup request message", if not, go to S4006, if yes, go to S4300;
S4300:提取消息中的随机序列; S4300: extracting a random sequence in the message;
S4301 :在转发关系列表中查找相应的发送者,如果有,转 S4302, 如果没有, 转 S4001; S4301: Find the corresponding sender in the forwarding relationship list, if any, go to S4302, if not, go to S4001;
S4302:向随机序列对应的消息发送者转发该应答消息,并删除转 发关系列表中的相关项, 并返回 S4001;
图 21为用户通过系统终端设备向注册服务装置查询用户登录点。S4302: Forward the response message to the sender of the message corresponding to the random sequence, and delete the related items in the forwarding relationship list, and return to S4001; 21 is a user querying a registration service device for a user login point through a system terminal device.
S4800:开始; S4800: Start;
S4801:设定超时时间; S4801: setting a timeout period;
S4802:生成随机序号; S4802: generate a random serial number;
S4803:根据本地目标注册服务器的记录向注册服务装置发 "用户登录 点查找请求消息", 消息中包括随机序号; S4803: Send a “user login point lookup request message” to the registration service device according to the record of the local target registration server, where the message includes a random serial number;
S4804:等待回复; S4804: Waiting for a reply;
S4805:判断是否超时, 如果是, 转 S4806 , 如果不是, 转 S4810; S4810: 判断消息中的随机序号是否相同, 如果不同, 转 S4804; S4820:是否为成功消息, 如果不是, 转 S4830 , 如果是, 转 S4821; S4821:提取消息中的网络地址和端口; S4805: Determine whether it times out, if yes, go to S4806, if not, go to S4810; S4810: Determine whether the random numbers in the message are the same, if different, go to S4804; S4820: Whether it is a success message, if not, go to S4830, if yes , to S4821; S4821: extract the network address and port in the message;
S4822:结束 S4822: End
S4830:是否为失败, 如果是, 转 S4822, 如果不是, 转 S4804; S4830: Is it a failure, if yes, go to S4822, if not, go to S4804;
S4806: 根据本地目标注册服务器的记录向注册服务装置发 "用户登 录点查找请求消息", 消息中包括随机序号, 返回 S4804。 S4806: Send a "user login point lookup request message" to the registration service device according to the record of the local target registration server, and the message includes a random serial number, and returns to S4804.
5. 基本消息格式 5. Basic message format
本发明的各基本消息格式如表 2所示。 The basic message formats of the present invention are shown in Table 2.
表 2 消息名称 目的 消息基本内容 附加说明 Table 2 Message Name Purpose Message Basics Additional Notes
服务单元 向注册服务 消息类型、 网络 Service unit to registration service message type, network
注册消息 装置注册 地址、 端口、 标 Registration message device registration address, port, standard
识、 预制层级信 Knowledge, prefabricated level letter
息 Interest
广播消息 向注册服务 消息类型、 播注 Broadcast message to registration service message type, broadcast
单元广播注 册服务装置的 Unit broadcast registration service
册服务装置 服务入口 Book service device
的服务入口 Service entrance
服务入口 查询注册月良 消息类型 Service entry Query registration month good message type
查询消息 务装置的服 Query message service device
务入口 Executive entrance
用户注册 添加用户 消息类型、 用户 在系统中加入一 消息 标识 个新用户 用户注册 查找用户是 消息类型、 用户 User registration Add user Message type, user Add a message to the system Identify a new user User registration Find a user is a message type, user
消息查询 否在系统中 标识
消息 开户 用户登录 用户登录 消息类型、 用户 用户登录点可以 消息 标识、 用户登录 是网络地址和端 Message query is not identified in the system Message opening user login user login message type, user user login point can message identification, user login is network address and end
占 口,或是可以转化 Occupy, or can be transformed
为网给地址和端 口的标识 ID for the address and port for the network
用户登录 查询被请求 消息类型、 用户 User login query is requested message type, user
点查找请 用户的用户 标识、 被请求用 Click to find the user's user ID, requested
求消息 登录点 户标识、 随机序 Request message login point household identification, random order
号 number
成功应答 向消息发出 消息类型标识, 对于"用户登录点 消息 者返回成功 该应答消息对 查找请求消息 "包 Successful response To the message, the message type identifier, for the "user login point message return success, the response message pair lookup request message" package
信息 应的请求消息 括用户登录点、随 Information request message, including user login point,
类型 机序号。 Type Machine serial number.
对于" 务入口查 询消息" 包括网 给地址和端口。 For "ingress query messages" include the network address and port.
其它请求的应答, 见相关算法要求 失败应答 向消息发出 消息类型标识, For the response of other requests, see the relevant algorithm requirements. Failure response Send a message type identifier to the message.
消息 者返回失败 该应答消息对 The messager returns a failure. The response message is paired.
信息 应的请求消息 Information request message
类型 Types of
重定向消 向消息发出 消息类型标识, 重定向消息为应 息 者返回包括 对应答复的请 答消息的一种。对 The redirected outgoing message is sent with a message type identifier, and the redirected message returns one of the respondent messages including the corresponding reply for the respondent. Correct
注册服务装 求消息类型 于查询注册装置 置的网络地 服务入口的消息, 址和端口 返回相应的网络 Register service request message type Query the registration device's network location Service entry message, address and port Return to the corresponding network
地址和端口。 Address and port.
其它请求的应答, 见相关算法要求 Responses to other requests, see related algorithm requirements
6. 转发服务的获取方法 6. Forwarding service acquisition method
图 22为带有转发模块的注册服务单元。 该带有数据转发模块的 注册服务单元是注册服务装置为用户提供转发服务的例子。数据转发 服务单元 2108用于在系统终端设备间转发数据。 注册服务装置处理 转发服务请求的流程如图 23。 系统终端设备提交的 "转发服务请求"
消息中至少包括: 消息类型, 随即序号, 被请求者标识。 Figure 22 is a registration service unit with a forwarding module. The registration service unit with the data forwarding module is an example in which the registration service device provides a forwarding service for the user. The data forwarding service unit 2108 is for forwarding data between system terminal devices. The flow of the registration service device processing the forwarding service request is as shown in FIG. 23. "Forwarding Service Request" submitted by the system terminal device The message includes at least: the message type, the random number, and the identifier of the requester.
S5000: 开始 S5000: Getting started
S5001: 等待接收数据分组 S5001: Waiting to receive data packets
S5002: 是否收到数据分组 S5002: Whether to receive data packets
S5003: 提取数据分组中的消息 S5003: Extracting messages in a data packet
S5004: 判别是否为 "转发服务请求" , 如果是, 转 S5100,如果不是, 转 S5005 S5004: Determine whether it is "forwarding service request". If yes, go to S5100, if not, go to S5005
S5005: 进行其它处理 S5005: Perform other processing
S5100: 提取消息中的序号,在对应表中查找该序号是否存在,如果存 在, 转 S5202,如果不存在, 转 S5101; S5100: Extract the sequence number in the message, and find in the corresponding table whether the sequence number exists. If it exists, go to S5202. If it does not exist, go to S5101.
S5101: 判断本服务单元是否有转发服务模块,如果有,转 S5102,如果 没有, 转 S5200; S5101: Determine whether the service unit has a forwarding service module. If yes, go to S5102. If not, go to S5200.
S5102: 判断被请求者标识是否在用户登录信息记录表中, 如果是, 转 S5103 , 如果不是, 转 S5200; S5102: determining whether the requested identifier is in the user login information record table, if yes, go to S5103, if not, go to S5200;
S5103: 根据被请求者信息为请求者分配一个可以向被请求者转发数 据的网络地址和端口; S5103: Allocating a network address and a port that can forward data to the requester according to the requester information;
S5104: 向消息发送者返回成功应答消息, 消息中包括可以提供转发 服务的网络地址和端口, 返回 S5001; S5104: Returning a success response message to the message sender, where the message includes a network address and port that can provide a forwarding service, and returns to S5001;
S5200: 判断本单元是否为顶级服务单元,如果是, 转 S5203 , 如果不 是, 转 S5201; S5200: Determine whether the unit is a top-level service unit. If yes, go to S5203. If not, go to S5201.
S5201: 提取消息中的随机序号, 并基于该序号同消息发送者建立转 发对应关系, 存贮在转发对应关系表中; S5201: Extract a random sequence number in the message, and establish a forwarding correspondence relationship with the message sender based on the sequence number, and store in the forwarding correspondence table;
S5202: 根据本地目标注册服务器纪录, 向注册服务装置转发 "转发 服务请求" , 返回 S5001 ; S5202: According to the local target registration server record, forward the "forwarding service request" to the registration service device, and return to S5001;
S5203: 向消息发送者返回失败应答消息 , 返回 S5001; S5203: Returning a failure response message to the message sender, returning to S5001;
应答消息的处理流程参见图 20注册服务单元处理 "用户登录点 查找请求消息" 的处理方法中的应答消息的处理流程。
For the processing flow of the response message, refer to the processing flow of the response message in the processing method of the "user login point lookup request message" in the registration service unit of FIG.
Claims
1.一种多层 NAT 环境下面向应用的名字注册系统, 所述多层 NAT环境具有公有网络和至少一个私有网络, 所述私有网络通过地 址转换单元接入公有网络或其它私有网络; 所述面向应用的名字注 册系统包括用于发送登录请求的系统终端设备和用于接收登录请 求的注册服务单元, 所述注册服务单元包括接入公有网络的顶层注 册服务单元和接入私有网络的基本注册服务单元; 所述注册服务单 元用于接收系统终端设备的登录请求消息, 并记录该系统终端设备 的用户登录信息,该用户登录信息至少包括用户标识、 用户使用的系 统终端设备在所述注册服务单元接入的网络中的用户登录点和用户 使用的系统终端设备在所述注册服务单元接入的网络中的系统终端 设备访问点。 A multi-layer NAT environment, wherein the multi-layer NAT environment has a public network and at least one private network, and the private network accesses a public network or other private network through an address translation unit; The application-oriented name registration system includes a system terminal device for transmitting a login request and a registration service unit for receiving a login request, the registration service unit including a top-level registration service unit accessing the public network and a basic registration for accessing the private network a service unit; the registration service unit is configured to receive a login request message of the system terminal device, and record user login information of the system terminal device, where the user login information includes at least a user identifier, and the system terminal device used by the user is in the registration service. The user login point in the network accessed by the unit and the system terminal device used by the user are the system terminal device access point in the network accessed by the registration service unit.
2. 根据权利要求 1 所述的面向应用的名字注册系统, 其特征 在于, 所述注册服务单元还用于根据所记录的所述用户登录信息进 行查询, 并在系统终端设备之间确定转发节点。 The application-oriented name registration system according to claim 1, wherein the registration service unit is further configured to perform query according to the recorded user login information, and determine a forwarding node between system terminal devices. .
3. 根据权利要求 1 所述的面向应用的名字注册系统, 其特征 在于,所述用户登录点为注册服务单元或系统终端设备的网络地址和 端口,或可以被转化为注册月良务单元或系统终端设备的网络地址和端 口的标识。 3. The application-oriented name registration system according to claim 1, wherein the user login point is a network address and a port of a registration service unit or a system terminal device, or may be converted into a registration month service unit or The network address and port identification of the system terminal device.
4. 根据权利要求 2 所述的面向应用的名字注册系统, 其特征 在于, 所述查询是根据用户登录信息在被叫方所有用户登录点中查 找出被叫方到主叫方 NAT距离最短的用户登录点。 The application-oriented name registration system according to claim 2, wherein the query is to find that the called party has the shortest distance to the calling party NAT according to the user login information in all the user login points of the called party. User login point.
5. 根据权利要求 1 所述的面向应用的名字注册系统, 其特征 在于, 所述系统终端设备访问点为 NAT设备的网络地址和端口, 或可 以被转换为 NAT设备的网络地址和端口的标识。 5. The application-oriented name registration system according to claim 1, wherein the system terminal device access point is a network address and a port of the NAT device, or may be converted into a network address and a port identifier of the NAT device. .
6. 根据权利要求 1 所述的面向应用的名字注册系统, 其特征 在于, 所述顶层注册服务单元通过顶级服务总线接入公有网络, 所 述基本注册服务单元通过服务总线接入私有网络, 所述顶级注册服 务单元使用公有网络的网络地址进行编址,所述基本注册服务单元使 用相连的私有网络的网络地址进行编址。 6. The application-oriented name registration system according to claim 1, wherein the top-level registration service unit accesses a public network through a top-level service bus, and the basic registration service unit accesses a private network through a service bus. The top-level registration service unit is addressed using the network address of the public network, which is addressed using the network address of the connected private network.
7. 根据权利要求 1 所述的面向应用的名字注册系统, 其特征 在于, 所述注册服务单元包括: 注册服务逻辑控制单元、 基本配置 信息记录表、 层级信息记录、 目标注册服务器记录、 子注册服务器记 录表、 用户登录信息纪录表、 用户注册信息记录表、 消息緩存区和通
信单元; 7. The application-oriented name registration system according to claim 1, wherein the registration service unit comprises: a registration service logic control unit, a basic configuration information record table, a hierarchical information record, a target registration server record, and a sub-registration. Server record table, user login information record table, user registration information record table, message buffer and pass Letter unit
所述注册服务逻辑控制单元用于控制注册服务的执行;基本配置 信息记录表用于记录本单元标识、本单元主机地址、本单元服务端口; 层级信息记录用于记录层级信息; 目标注册服务器记录用于记录祖先 注册服务器的网络地址、端口; 子注册服务器记录表用于记录子注册 服务单元的网络地址、端口、标识及对应的 NAT设备的网络地址和端 口; 用户登录信息纪录表用于记录用户标识、 用户登录点和系统终端 设备访问点; 用户注册信息记录表用于记录用户开户信息; 消息緩存 区用于暂时保存接收到的数据分组中的信息及转发关系纪录表;通信 单元同顶级服务总线装置或服务总线装置联接, 负责收发数据。 The registration service logic control unit is configured to control execution of the registration service; the basic configuration information record table is used to record the identity of the unit, the host address of the unit, and the service port of the unit; the hierarchical information record is used for recording hierarchy information; the target registration server record Used to record the network address and port of the ancestor registration server; the sub-registration server record table is used to record the network address, port, identifier, and network address and port of the corresponding NAT device of the sub-registration service unit; the user login information record table is used for recording User identification, user login point and system terminal device access point; user registration information record table is used to record user account opening information; message buffer area is used for temporarily storing information in the received data packet and forwarding relationship record table; communication unit with top level The service bus device or the service bus device is connected and is responsible for transmitting and receiving data.
8. 根据权利要求 7 所述的面向应用的名字注册系统, 其特征 在于, 所述注册服务单元的各组成部分的相互作用关系如下: 8. The application-oriented name registration system according to claim 7, wherein the interaction relationship of each component of the registration service unit is as follows:
注册服务逻辑控制单元根据执行需要从基本配置信息记录表读 取本单元标识、 本单元主机地址、 本单元服务端口, 从层级信息记录 读取层级信息,从目标注册服务器记录读取祖先注册服务器的网络地 址、 端口,从子注册服务器记录表读取记录子注册服务单元的网络地 址、 端口、 标识及对应的 NAT设备的网络地址和端口, 从用户登录信 息纪录表读取用户标识、 用户登录点、 系统终端设备访问点, 从用户 注册信息记录表中读取用户标识;从消息緩存区读取暂时保存接收到 的数据分组中的信息及转发关系,从通信单元读取收到的数据;同时, 注册服务逻辑控制单元根据执行需要向基本配置信息记录表写入本 单元标识、 本单元主机地址、 本单元服务端口, 向目标注册服务器记 录写入祖先登录服务器的网络地址、端口, 向子注册服务器记录表写 入记录子注册服务单元的网络地址、端口、标识及对应的 NAT设备的 网络地址和端口,向用户登录信息纪录表写入用户标识、用户登录点、 及对应的系统终端设备访问点,向用户注册信息记录表中写入用户标 识; 向消息緩存区写入暂时保存接收到的数据分组中的信息, 及转发 关系, 向通信单元写入需要发出的数据。 The registration service logic control unit reads the unit identifier, the unit host address, the unit service port from the basic configuration information record table according to the execution requirement, reads the level information from the hierarchical information record, and reads the ancestor registration server from the target registration server record. The network address, the port, the network address, the port, the identifier, and the network address and port of the corresponding NAT device are read from the sub-registration server record table, and the user ID and the user login point are read from the user login information record table. a system terminal device access point, reading the user identifier from the user registration information record table; reading from the message buffer area temporarily storing the information and the forwarding relationship in the received data packet, and reading the received data from the communication unit; The registration service logic control unit writes the unit identifier, the unit host address, and the unit service port to the basic configuration information record table according to the execution requirement, records the network address and port of the ancestor login server, and registers with the target registration server. Server record table Write the network address, port, identifier, and network address and port of the corresponding NAT device of the record sub-registration service unit, and write the user ID, the user login point, and the corresponding system terminal device access point to the user login information record table. The user registration information record table writes the user identifier; writes to the message buffer area to temporarily store the information in the received data packet, and forwards the relationship, and writes the data to be sent to the communication unit.
9.根据权利要求 1所述的面向应用的名字注册系统, 其特征在 于, 所述系统终端设备包括: 终端设备控制单元、 基本配置信息记录 表、 目标注册服务装置记录、 消息緩存区和通信单元; 所述终端设备 控制单元用于控制终端设备的执行;基本配置信息记录表用于记录用 户标示、本终端设备的网络地址和端口; 目标注册服务装置记录用于 记录注册服务装置的网络地址和端口;消息緩存区用于暂时存储收到
或发出的消息; 通信单元用于与公有网络或私有网络连接。 The application-oriented name registration system according to claim 1, wherein the system terminal device comprises: a terminal device control unit, a basic configuration information record table, a target registration service device record, a message buffer area, and a communication unit. The terminal device control unit is configured to control execution of the terminal device; the basic configuration information record table is used to record the user identifier, the network address and port of the terminal device; and the target registration service device records the network address used to record the registration service device and Port; message buffer for temporary storage receipt Or a message sent; the communication unit is used to connect to a public or private network.
10. 根据权利要求 1所述的面向应用的名字注册系统, 其特征 在于, 所述终端设备控制单元在基本配置信息记录表、 目标注册服务 装置记录和消息緩存区读写信息;终端设备控制单元还通过通信单元 从网络收发数据。 10. The application-oriented name registration system according to claim 1, wherein the terminal device control unit reads and writes information in a basic configuration information record table, a target registration service device record, and a message buffer; and the terminal device control unit Data is also transmitted and received from the network through the communication unit.
1 1. 利用权利要求 1所述的多层 NAT环境下面向应用的名字注 册系统进行用户登录的方法, 其特征在于, 包括如下步骤: The method for performing user login to the name registration system of the application under the multi-layer NAT environment of claim 1 is characterized in that it comprises the following steps:
1 ) 系统终端设备获取基本注册服务单元的服务入口, 该服务入 口是网络地址和端口或者可以转化为网络地址和端口的标识; 1) The system terminal device obtains a service entry of the basic registration service unit, and the service entry is a network address and a port or an identifier that can be converted into a network address and a port;
2 )系统终端设备根据服务入口向基本注册服务单元发送用户登 录消息,所述用户登录消息携带用户登录信息;本步骤所述的用户登 录信息至少包括用户标识和使用所述系统终端设备的网络地址和端 口定义的用户登录点; 2) The system terminal device sends a user login message to the basic registration service unit according to the service portal, where the user login message carries the user login information; the user login information described in this step includes at least the user identifier and the network address of the terminal device using the system. And the user login point defined by the port;
3 )所述注册服务单元记录用户登录信息, 向上层网络的注册服 务单元转发携带该用户登录信息的用户登录消息; 本步骤所述的用 户登录信息至少包括用户标识; The registration service unit records the user login information, and the registration service unit of the upper layer network forwards the user login message carrying the user login information; the user login information described in this step includes at least the user identifier;
4 )所述上层网络的注册服务单元收到转发的用户登录消息后, 重复步骤 3 ) 的操作, 直至用户登录消息被转发至接入公有网络的 顶层注册服务单元。 4) After receiving the forwarded user login message, the registration service unit of the upper layer network repeats the operation of step 3) until the user login message is forwarded to the top-level registration service unit of the access public network.
12. 根据权利要求 1 1 所述的用户登录的方法, 其特征在于, 所述步骤 2 )中, 所述用户登录点为网络地址和端口, 或可以被转化 为网络地址和端口的标识; 所述步骤 3 )中, 所述用户登录点为网络 地址和端口, 或可以被转化为网络地址和端口的标识; 所述系统终端 设备访问点为网给地址和端口,或可以被转化为网给地址和端口的标 识。 The user login method according to claim 1 , wherein in the step 2), the user login point is a network address and a port, or may be converted into an identifier of a network address and a port; In step 3), the user login point is a network address and a port, or may be converted into an identifier of a network address and a port; the system terminal device access point is a network address and port, or may be converted into a network The identifier of the address and port.
1 3. 根据权利要求 1 1 所述的用户登录的方法, 其特征在于, 所述步骤 3 )中, 所述注册服务单元在收到系统终端设备直接发来的 用户登录消息后, 向该系统终端设备返回应答消息。 The method of user login according to claim 1 , wherein in the step 3), after receiving the user login message directly sent by the system terminal device, the registration service unit sends the user login message to the system. The terminal device returns a response message.
14. 根据权利要求 1 1 所述的用户登录的方法, 其特征在于, 在所述步骤 1 ) 前还要执行初始化步骤, 所述初始化步骤是: 首先 启动接入公有网络的顶层注册服务单元, 然后接入私有网络的基本 注册服务单元逐层启动并向所述名字注册系统注册以加入名字注 册系统。 14. The method for logging in to a user according to claim 1 , wherein an initialization step is further performed before the step 1), the initializing step is: first starting to access a top-level registration service unit of the public network, The basic registration service unit accessing the private network then initiates layer by layer and registers with the name registration system to join the name registration system.
15. 根据权利要求 1 1 所述的用户登录的方法, 其特征在于,
所述步骤 1 ) 包括如下子步骤: 15. The method of user login according to claim 11, wherein The step 1) includes the following sub-steps:
110 ) 系统终端设备向名字注册系统公知的全局服务入口发送服 务入口查询消息; 110) the system terminal device sends a service entry query message to a global service portal known to the name registration system;
111 )全局服务入口对映的注册服务单元判断是否能直接作为为 该系统终端设备提供服务的服务入口, 如果判断为是, 则返回成功消 息; 如果判断为否, 则向系统终端设备返回重定向消息, 该重定向消 息携带接入该全局服务入口对映的注册服务单元所属网络的下层网 络的注册服务单元的服务入口; 111) The registration service unit of the global service entry mapping determines whether it can directly serve as a service entry for providing service to the terminal device of the system. If the determination is yes, a success message is returned; if the determination is no, the system returns a redirect to the system terminal device. a message, the redirect message carries a service entry of a registration service unit of a lower layer network of a network to which the registration service unit to which the global service portal is mapped;
112 ) 系统终端设备向所述重定向消息提供的注册服务单元发送 服务入口查询消息; 112) the system terminal device sends a service entry query message to the registration service unit provided by the redirect message;
113 )所述注册服务单元判断是否能直接作为为该系统终端设备 提供服务的服务入口, 如果判断为是, 则返回成功消息; 如果判断为 否, 则向系统终端设备返回重定向消息, 该重定向消息携带接入当前 注册服务单元所属网络的下层网络的注册服务单元的服务入口; 113) The registration service unit determines whether it can directly serve as a service entry for providing service to the system terminal device, and if the determination is yes, returning a success message; if the determination is no, returning a redirect message to the system terminal device, the weight The directed message carries a service entry of a registration service unit that accesses a lower layer network of a network to which the current registration service unit belongs;
114 )不断重复步骤 112 )和 113 ), 直至系统终端设备接收到成 功消息, 获得最终的服务入口。 114) Steps 112) and 113) are continuously repeated until the system terminal device receives the success message to obtain the final service entry.
16. 根据权利要求 15 所述的用户登录的方法, 其特征在于, 所述步骤 110 ) 中, 所述全局服务入口是顶层注册服务单元的网络 地址和端口。 The method for logging in to a user according to claim 15, wherein in the step 110), the global service portal is a network address and a port of a top-level registration service unit.
17. 根据权利要求 11 所述的用户登录的方法, 其特征在于, 所述步骤 1 ) 包括如下子步骤: 17. The method of user login according to claim 11, wherein the step 1) comprises the following sub-steps:
120 ) 注册服务单元在所属网络中广播包含本地登录服务入口的 广播消息; 120) the registration service unit broadcasts a broadcast message containing the local login service entry in the network to which it belongs;
121 ) 系统终端设备监听所述广播消息, 得到服务入口。 121) The system terminal device listens to the broadcast message to obtain a service entry.
18. 根据权利要求 17 所述的用户登录的方法, 其特征在于, 所述步骤 120 )中, 所述注册服务单元可通过注册服务单元代理发送 所述广播消息。 The method of user login according to claim 17, wherein in the step 120), the registration service unit may send the broadcast message by using a registration service unit proxy.
19. 根据权利要求 11 所述的用户登录的方法, 其特征在于, 所述步骤 3 )中, 所述注册服务单元收到用户登录消息后的处理方法 包括如下步骤: The method for logging in to a user according to claim 11, wherein in the step 3), the processing method after the registration service unit receives the user login message includes the following steps:
31 )根据消息中的用户登录点判别该消息发送者是否为下层注册 服务单元, 如果是, 转步骤 32 ), 如果不是, 转步骤 34 ); 31) according to the user login point in the message to determine whether the message sender is the underlying registration service unit, and if so, go to step 32), if not, go to step 34);
32 )将消息中的用户标识作为用户标识、 以携带消息的数据分组 的源地址和源端口点作为系统终端设备访问点、 将本单元
标识作为用户登录点,存储在本单元的用户信息记录表中, 转步骤 38 ) ; 32) using the user identifier in the message as the user identifier, the source address and the source port point of the data packet carrying the message as the system terminal device access point, and the unit The identifier is stored as a user login point in the user information record table of the unit, and is transferred to step 38);
34 )根据携带消息的数据分组的源地址和消息中的系统终端设备 的网络地址判别该用户终端是否在 NAT之后, 如果不是, 转步骤 35 ), 如果是, 转步骤 36 ); 34) determining, according to the source address of the data packet carrying the message and the network address of the system terminal device in the message, whether the user terminal is after the NAT, if not, proceeding to step 35), if yes, proceeding to step 36);
35 )将消息中的用户标识作为用户标识、将用户登录点作为用户 登录点,存储在本单元的用户信息记录表中;转步骤 37 ); 36 )将消息中的用户标识作为用户标识、 以携带消息的数据分组 的源地址和源端口作为系统终端设备访问点、 将本单元标 识作为用户登录点, 存储在本单元的用户信息记录表中; 37 ) 向消息发送者返回成功应答消息; 35) using the user identifier in the message as the user identifier, using the user login point as the user login point, and storing it in the user information record table of the unit; going to step 37); 36) using the user identifier in the message as the user identifier, The source address and the source port of the data packet carrying the message are used as the system terminal device access point, and the identity of the unit is used as the user login point, and is stored in the user information record table of the unit; 37) returning a success response message to the message sender;
38 ) 判别本单元是否为顶级注册服务单元, 如果不是, 转步骤 39 ) ; 如果是, 注册过程结束; 38) Determine whether the unit is a top-level registration service unit, if not, go to step 39); if yes, the registration process ends;
39 )根据本地目标登录服务器记录向上层注册服务单元发送用户 登录信息; 本次操作结束; 39) sending the user login information to the upper layer registration service unit according to the local target login server record; the operation ends;
30 ) 向消息发送者返回失败应答消息。 30) Return a failure response message to the sender of the message.
20. 根据权利要求 19 所述的用户登录的方法, 其特征在于, 在所述步骤 32 )和步骤 34 )之间, 还执行步骤 33 ), 步骤 33 )如下: 判别所述用户是否可以登录, 如不可以登录, 转步骤 30 ) , 如 可以登录, 转步骤 34 )0 The user login method according to claim 19, wherein between step 32) and step 34), step 33) is further performed, step 33) is as follows: determining whether the user can log in, If you can't log in, go to step 30). If you can log in, go to step 34) 0
21. 根据权利要求 19 所述的用户登录的方法, 其特征在于, 所述步骤 39 ) 中, 向上层注册服务单元发送用户登录消息的方法如 下: The method for logging in to a user according to claim 19, wherein in the step 39), the method for sending the user login message to the upper layer registration service unit is as follows:
首先使用本注册服务单元的标识代替本地收到的用户登录消息 中的用户登录点, 生成新的用户登录消息, 然后向上层注册服务单元 发送所述新的用户登录消息。 First, the user login point in the locally received user login message is replaced with the identifier of the local registration service unit, a new user login message is generated, and then the new user login message is sent to the upper registration service unit.
22. 根据权利要求 11 所述的用户登录的方法, 其特征在于, 还包括步骤 5 ), 该步骤 5 )如下: The method for logging in to a user according to claim 11, further comprising the step 5), wherein the step 5) is as follows:
所述注册服务单元根据所记录的所述用户登录信息进行查询, 并在系统终端设备之间确定转发节点。 The registration service unit performs an inquiry according to the recorded user login information, and determines a forwarding node between the system terminal devices.
23. 利用权利要求 1所述的多层 NAT环境下面向应用的名字注 册系统进行用户登录点查询的方法, 其特征在于, 包括如下步骤: The method for performing a user login point query to the application name registration system by using the multi-layer NAT environment of claim 1 is characterized in that the method includes the following steps:
50 )系统终端设备向名字注册系统的服务入口发送用户登录点查 找请求消息, 该消息中至少包括被请求用户标识;
51 )注册服务单元在本地的用户登录信息记录表中查找所述被请 求用户的用户标识是否存在, 如果存在, 则返回被请求用户的用户登 录点; 如果不存在, 则向接入当前注册服务单元所接入网络的上层网 络的注册服务单元转发用户登录点查找请求消息; 50) the system terminal device sends a user login point lookup request message to the service portal of the name registration system, where the message includes at least the requested user identifier; 51) The registration service unit searches the local user login information record table for the presence or absence of the user identifier of the requested user, and if yes, returns the user login point of the requested user; if not, the current registration service is accessed. The registration service unit of the upper layer network of the network to which the unit is connected forwards the user login point lookup request message;
52 )接入上层网络的注册服务单元在本地的用户登录信息记录表 中查找所述被请求用户标识是否存在, 如果存在, 则返回被请求用户 的系统终端设备的用户登录点; 如果不存在, 则向接入当前注册服务 单元所接入网络的上层网络的注册服务单元转发用户登录点查找请 求消息; The registration service unit accessing the upper layer network searches the local user login information record table for the presence or absence of the requested user identifier, and if so, returns the user login point of the system terminal device of the requested user; if not, And forwarding a user login point lookup request message to a registration service unit of an upper layer network accessing the network accessed by the current registration service unit;
53 ) 重复步骤 52 ), 直至获得被请求系统终端设备的用户登录 点; 53) repeating step 52) until the user login point of the requested system terminal device is obtained;
54 )当用户登录点查找请求消息转发至顶层注册服务单元后,仍 未查找到所述被请求用户的用户标识, 则返回失败应答消息。 54) After the user login point lookup request message is forwarded to the top level registration service unit, the user identification of the requested user is still not found, and a failure response message is returned.
24. 利用权利要求 1所述的多层 NAT环境下面向应用的名字注 册系统提供转发服务的方法, 其特征在于, 所述注册服务单元还包 括数据转发模块, 所述提供转发服务的方法包括如下步骤: The method for providing a forwarding service to the name registration system of the application in the multi-layer NAT environment of claim 1, wherein the registration service unit further includes a data forwarding module, and the method for providing the forwarding service includes the following Steps:
60 )系统终端设备向名字注册系统的服务入口发送转发服务请求 消息, 该消息中至少包括被请求用户标识; 60) the system terminal device sends a forwarding service request message to the service portal of the name registration system, where the message includes at least the requested user identifier;
61 )注册服务单元在本地的用户登录信息记录表中查找所述被请 求用户的用户标识是否存在, 如果被请求用户的用户标识存在, 判断 本注册服务单元是否含有数据转发模块, 如判断有数据转发模块, 则 为请求方用户分配并返回一个可以向被请求方用户转发数据的网络 地址和端口; 如果被请求用户的用户标识不存在, 或没有数据转发模 块,则向接入当前注册服务单元所接入网络的上层网络的注册服务单 元转发所述转发服务请求消息; The registration service unit searches the local user login information record table for the presence or absence of the user identifier of the requested user. If the user identifier of the requested user exists, it is determined whether the registration service unit includes a data forwarding module, such as determining that there is data. The forwarding module allocates and returns a network address and port that can forward data to the requesting user for the requesting user; if the user identifier of the requested user does not exist, or does not have a data forwarding module, accessing the current registered service unit The registration service unit of the upper layer network of the accessed network forwards the forwarding service request message;
62 )接入上层网络的注册服务单元在本地的用户登录记录表中查 找所述被请求用户标识是否存在, 如果被请求用户的用户标识存在, 判断本注册服务单元是否含有数据转发模块, 如判断有数据转发模 块,则为请求方用户分配并返回一个可以向被请求方用户转发数据的 网络地址和端口; 如果被请求用户的用户标识不存在, 或没有数据转 发模块,则向接入当前注册服务单元所接入网络的上层网络的注册服 务单元转发所述转发服务请求消息; 62) The registration service unit accessing the upper layer network searches for the presence of the requested user identifier in the local user login record table. If the user identifier of the requested user exists, it is determined whether the registration service unit includes a data forwarding module, such as determining There is a data forwarding module, which allocates and returns a network address and port that can forward data to the requesting user for the requesting user; if the user identifier of the requested user does not exist, or does not have a data forwarding module, the current registration is accessed. The registration service unit of the upper layer network to which the service unit accesses the network forwards the forwarding service request message;
63 ) 重复步骤 62 ), 直至请求方用户获得可以向被请求方用户 转发数据的网络地址和端口;
64 )转发服务请求消息转发至顶层注册服务单元后,仍未查找到 所述被请求用户的用户标识, 或没有数据转发模块, 则返回失败应答 消息。
63) repeating step 62) until the requesting user obtains a network address and port that can forward data to the requested user; 64) After forwarding the service request message to the top-level registration service unit, if the user identifier of the requested user is not found, or there is no data forwarding module, a failure response message is returned.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101022784A CN101242421B (en) | 2008-03-19 | 2008-03-19 | Application-oriented name registration system and its service method under multi-layer NAT environment |
CN200810102278.4 | 2008-03-19 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2009114995A1 true WO2009114995A1 (en) | 2009-09-24 |
Family
ID=39933630
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2009/000298 WO2009114995A1 (en) | 2008-03-19 | 2009-03-19 | Application-oriented name registration system and service method in multi-layer nat environment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101242421B (en) |
WO (1) | WO2009114995A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242421B (en) * | 2008-03-19 | 2012-06-13 | 中国科学院计算技术研究所 | Application-oriented name registration system and its service method under multi-layer NAT environment |
CN101247408B (en) * | 2008-03-20 | 2010-11-03 | 中国科学院计算技术研究所 | Name registration system and method facing application in multi-layer NAT network |
JP5239618B2 (en) * | 2008-08-19 | 2013-07-17 | 沖電気工業株式会社 | Address translation apparatus, method and program, and node |
CN102073503B (en) * | 2011-01-19 | 2013-08-21 | 上海交通大学 | Context aware-based intemetware evolution method |
CN103023805A (en) * | 2012-11-22 | 2013-04-03 | 北京航空航天大学 | MapReduce system |
CN106559509B (en) * | 2015-09-30 | 2019-10-22 | 中国电信股份有限公司 | Registration server, CGN equipment, service provider system and index, retransmission method |
CN109561161B (en) * | 2017-09-25 | 2020-05-26 | 中国科学院声学研究所 | Name registration and analysis method based on space-time constraint field |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040139225A1 (en) * | 2002-11-01 | 2004-07-15 | Sony Corporation | Information processing system, information processing apparatus, information processing method, and information processing program |
US20040205245A1 (en) * | 2003-03-28 | 2004-10-14 | Jean-Francois Le Pennec | Data transmission system with a mechanism enabling any application to run transparently over a network address translation device |
US20050086373A1 (en) * | 2003-10-16 | 2005-04-21 | International Business Machines Corporation | Accessing data processing systems behind a NAT enabled network |
CN101098284A (en) * | 2006-07-02 | 2008-01-02 | 冼剑光 | Method for implementing network seamless interlinkage |
CN101242421A (en) * | 2008-03-19 | 2008-08-13 | 中国科学院计算技术研究所 | Application-oriented name registration system and its service method under multi-layer NAT environment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100403729C (en) * | 2004-09-28 | 2008-07-16 | 王安生 | The method of call control and media flow traversing private network in SIP softswitch system |
CN101064712B (en) * | 2006-04-24 | 2013-04-24 | 上海信息安全基础设施研究中心 | System and method for realizing Linux inner core based dual-channel through multistage NAT and fireproof wall |
-
2008
- 2008-03-19 CN CN2008101022784A patent/CN101242421B/en not_active Expired - Fee Related
-
2009
- 2009-03-19 WO PCT/CN2009/000298 patent/WO2009114995A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040139225A1 (en) * | 2002-11-01 | 2004-07-15 | Sony Corporation | Information processing system, information processing apparatus, information processing method, and information processing program |
US20040205245A1 (en) * | 2003-03-28 | 2004-10-14 | Jean-Francois Le Pennec | Data transmission system with a mechanism enabling any application to run transparently over a network address translation device |
US20050086373A1 (en) * | 2003-10-16 | 2005-04-21 | International Business Machines Corporation | Accessing data processing systems behind a NAT enabled network |
CN101098284A (en) * | 2006-07-02 | 2008-01-02 | 冼剑光 | Method for implementing network seamless interlinkage |
CN101242421A (en) * | 2008-03-19 | 2008-08-13 | 中国科学院计算技术研究所 | Application-oriented name registration system and its service method under multi-layer NAT environment |
Also Published As
Publication number | Publication date |
---|---|
CN101242421A (en) | 2008-08-13 |
CN101242421B (en) | 2012-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2009114995A1 (en) | Application-oriented name registration system and service method in multi-layer nat environment | |
WO2016119747A1 (en) | System and method for communicating in an ssl vpn | |
KR100782266B1 (en) | Packet Network Interface and Its Operation Method | |
US7792995B2 (en) | Accessing data processing systems behind a NAT enabled network | |
CN101242413B (en) | Service resource address acquisition system and method in multi-layer NAT network under one root | |
US6101552A (en) | Virtual internet protocol gate and the network constructed with the same | |
JP4354294B2 (en) | Gateway device connected to a plurality of networks having different network segments, and program and method for transferring IP packet | |
US10027623B2 (en) | Internet protocol address resolution | |
US6157950A (en) | Methods and apparatus for interfacing a computer or small network to a wide area network such as the internet | |
CN102055816A (en) | Communication method, business server, intermediate equipment, terminal and communication system | |
CN1273394A (en) | Integrated IP network | |
CN101262447B (en) | A method for system terminal to establish NAT channel penetration | |
CN112437168B (en) | Intranet penetration system | |
US8612557B2 (en) | Method for establishing connection between user-network of other technology and domain name system proxy server for controlling the same | |
CN101321128A (en) | Communication device, communication network system and communication method | |
JP3666654B2 (en) | Internet communication method {MethodforanInternetCommunication} | |
EP2095599B1 (en) | Method for setting up a peer-to-peer link between two communication media | |
WO2009114997A1 (en) | Application-oriented name registration system for used in multi-layer network address translator environment and the method thereof | |
US7440466B2 (en) | Method, apparatus and system for accessing multiple nodes on a private network | |
SE517217C2 (en) | Method and system for communication between different networks | |
JP3902597B2 (en) | Router and static domain name routing | |
CN110691113A (en) | NAT penetration method with two asymmetric sides | |
CN101572729B (en) | A method for processing virtual private network node information and related equipment and system | |
CN114629956B (en) | Method and blockchain network for enabling edge computing network acceleration | |
CN101227507B (en) | Method and system for obtaining service resource address in same root multi-layer NAT network |
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: 09722230 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: 09722230 Country of ref document: EP Kind code of ref document: A1 |