CN104980528A - Method, system and apparatus for realizing communication between nodes - Google Patents

Method, system and apparatus for realizing communication between nodes Download PDF

Info

Publication number
CN104980528A
CN104980528A CN201510367283.8A CN201510367283A CN104980528A CN 104980528 A CN104980528 A CN 104980528A CN 201510367283 A CN201510367283 A CN 201510367283A CN 104980528 A CN104980528 A CN 104980528A
Authority
CN
China
Prior art keywords
node
intranet
agent
identification
message packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510367283.8A
Other languages
Chinese (zh)
Inventor
蔡培峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201510367283.8A priority Critical patent/CN104980528A/en
Publication of CN104980528A publication Critical patent/CN104980528A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers
    • H04L61/2528Translation at a proxy

Landscapes

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

Abstract

The invention discloses a method, system and apparatus for realizing communication between nodes and belongs to the computer technical field. The method is applied to a system providing Internet services. The methods includes the following steps that: an inner network node transmits a connection establishment request to a proxy node through an NAT gateway; the proxy node establishes a first communication connection with the inner network node according to the connection establishment request; a public network node transmits a first information message to the proxy node through a second communication connection established between the public network node and the proxy node; and when a first target node corresponding to the first information message belongs to the inner network node, the proxy node forwards the first information message to the first target node through a first communication connection established between the proxy node and the first target node. According to the method, system and apparatus of the invention, a characteristic that the NAT gateway does not limits the inner network node to initiatively initiates a connection is utilized to realize the proxy node, and the proxy node forwards an information message which is transmitted to the inner network node by the public network node, and communication between the public network node and the inner network node can be realized.

Description

Realize the method, system and device of inter-node communication
Technical field
The present invention relates to field of computer technology, particularly a kind of method, system and device realizing inter-node communication.
Background technology
NAT (Network Address Translation, network address translation) technology a kind of Intranet and public network are carried out isolating and be the technology of legal effective public network IP address by private ip (Internet Protocol, Internet protocol) address transition.
NAT technology allows multiple Intranet node be in Intranet to share a public network IP address and visits public network.But because NAT technology only allows Intranet node to initiate connection request to common network node, and the connection request that common network node is initiated to Intranet node can be rejected.Therefore, under NAT networking, common network node cannot initiatively and between Intranet node establish a communications link, and causes the communication between common network node and Intranet node to have problems.
Summary of the invention
In order to solve above-mentioned technology Problems existing, embodiments provide a kind of method, system and device realizing inter-node communication.Described technical scheme is as follows:
First aspect, provide a kind of method realizing inter-node communication, described method is applied to be provided in the system of Internet service, and described system comprises: at least one Intranet node, NAT gateway, agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described method comprises:
Described Intranet node sends connection establishment request through described NAT gateway to described agent node;
Described agent node receives described connection establishment request from described NAT gateway, and sets up the first communication connection according between described connection establishment request and described Intranet node;
Described common network node sends the first message packet by being connected with the second communication set up between described agent node to described agent node, carries first object node identification in described first message packet;
Described agent node receives described first message packet, and obtains described first object node identification;
When the first object node that described first object node identification is corresponding belongs to described Intranet node, described agent node forwards described first message packet by described first communication connection of setting up between described first object node to described first object node.
Alternatively, described method also comprises:
Described Intranet node sends the second message packet by described first communication connection to described agent node, carries the second destination node marking in described second message packet;
Described agent node receives described second message packet, and obtains described second destination node marking;
When the second destination node that described second destination node marking is corresponding belongs to described Intranet node, described agent node forwards described second message packet by described first communication connection of setting up between described second destination node to described second destination node;
When the second destination node that described second destination node marking is corresponding belongs to described common network node, described agent node forwards described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
Alternatively, also comprise in described NAT networking: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Described agent node sets up the first communication connection according between described connection establishment request and described Intranet node, comprising:
Whether there is described node identification in described agent node detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
If there is described node identification in described nodal information storehouse, then set up described first between described agent node and described Intranet node and communicate to connect, and store described node identification, corresponding relation between described IP address and described port numbers.
Alternatively, described method also comprises:
To described node, described Intranet node finds that server sends registration request through described NAT gateway, described registration request comprises node identification and the port numbers of described Intranet node; Wherein, described port numbers is determined at random, or described port numbers chooses in designated ends slogan interval corresponding to described Intranet node;
Described node finds that server receives described registration request from described NAT gateway, and obtains public network IP address corresponding to described NAT gateway;
Described node finds the port numbers of server according to described public network IP address and described Intranet node, detect described Intranet node and whether meet registration condition, described registration condition refers in other node of successful registration the node not existing and use identical described public network IP address and described port numbers;
If described Intranet node meets described registration condition, then described node finds that server determines the success of described Intranet Node registry, and the nodal information corresponding to described Intranet node is sent to described agent node, at least comprise the node identification of described Intranet node in described nodal information;
Described agent node receives described nodal information, and is stored in described nodal information storehouse by described nodal information.
Alternatively, described method also comprises:
Described Intranet node sends connection maintenance request through described NAT gateway to described agent node every predetermined time interval, and described connection maintenance request comprises the node identification of described Intranet node;
Described agent node receives described connection maintenance request from described NAT gateway;
Whether set up described first between the Intranet node that described agent node detection is corresponding with described node identification to communicate to connect;
If so, then set up between described agent node continuation maintenance with described Intranet node described first communicates to connect.
Second aspect, provide a kind of system realizing inter-node communication, described system is used for providing Internet service, and described system comprises: at least one Intranet node, NAT gateway, agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described Intranet node, for sending connection establishment request through described NAT gateway to described agent node;
Described agent node, for receiving described connection establishment request from described NAT gateway; The first communication connection is set up according between described connection establishment request and described Intranet node;
Described common network node, for sending the first message packet by being connected with the second communication set up between described agent node to described agent node, carries first object node identification in described first message packet;
Described agent node, also for receiving described first message packet, and obtains described first object node identification; When the first object node that described first object node identification is corresponding belongs to described Intranet node, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
Alternatively, described Intranet node, also for sending the second message packet by described first communication connection to described agent node, carries the second destination node marking in described second message packet;
Described agent node, also for receiving described second message packet, and obtains described second destination node marking; When the second destination node that described second destination node marking is corresponding belongs to described Intranet node, forward described second message packet by described first communication connection of setting up between described second destination node to described second destination node; When the second destination node that described second destination node marking is corresponding belongs to described common network node, forward described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
Alternatively, described system also comprises: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Described agent node, specifically for:
Whether there is described node identification in detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
If there is described node identification in described nodal information storehouse, then and set up described first between described Intranet node and communicate to connect, and store described node identification, corresponding relation between described IP address and described port numbers.
Alternatively, described Intranet node, also for finding that server sends registration request through described NAT gateway to described node, described registration request comprises node identification and the port numbers of described Intranet node; Wherein, described port numbers is determined at random, or described port numbers chooses in designated ends slogan interval corresponding to described Intranet node;
Described node finds server, for receiving described registration request from described NAT gateway; Obtain the public network IP address that described NAT gateway is corresponding; According to the port numbers of described public network IP address and described Intranet node, detect described Intranet node and whether meet registration condition, described registration condition refers in other node of successful registration the node not existing and use identical described public network IP address and described port numbers; If described Intranet node meets described registration condition, then determine the success of described Intranet Node registry, and send the nodal information corresponding to described Intranet node to described agent node, in described nodal information, at least comprise the node identification of described Intranet node;
Described agent node, also for receiving described nodal information, and is stored in described nodal information in described nodal information storehouse.
Alternatively, described Intranet node, also for sending connection maintenance request through described NAT gateway to described agent node every predetermined time interval, described connection maintenance request comprises the node identification of described Intranet node;
Described agent node, also for receiving described connection maintenance request from described NAT gateway; Detect and whether set up described first between the Intranet node corresponding with described node identification and communicate to connect; If so, then continue to keep setting up between described Intranet node described first communicates to connect.
The third aspect, provides a kind of method realizing inter-node communication, is applied in the agent node provided in the system of Internet service; Described system comprises: at least one Intranet node, NAT gateway, described agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described method comprises:
Receive connection establishment request from described NAT gateway, described connection establishment request is that described Intranet node sends through described NAT gateway;
The first communication connection is set up according between described connection establishment request and described Intranet node;
By being connected with the second communication set up between common network node, receiving the first message packet that described common network node sends, in described first message packet, carrying first object node identification;
When the first object node that described first object node identification is corresponding belongs to described Intranet node, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
Alternatively, described according to after setting up the first communication connection between described connection establishment request and described Intranet node, also comprise:
Receive the second message packet that described Intranet node is sent by described first communication connection, in described second message packet, carry the second destination node marking;
When the second destination node that described second destination node marking is corresponding belongs to described Intranet node, forward described second message packet by described first communication connection of setting up between described second destination node to described second destination node;
When the second destination node that described second destination node marking is corresponding belongs to described common network node, forward described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
Alternatively, also comprise in described NAT networking: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Describedly set up the first communication connection according between described connection establishment request and described Intranet node, comprising:
Whether there is described node identification in detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
If there is described node identification in described nodal information storehouse, then and set up described first between described Intranet node and communicate to connect, and store described node identification, corresponding relation between described IP address and described port numbers.
Alternatively, before whether there is described node identification in described detection node information bank, also comprise:
Receive described node and find the nodal information that server sends; Wherein, the node identification of the Intranet node successfully finding server registration to described node is at least comprised in described nodal information;
Described nodal information is stored in described nodal information storehouse.
Alternatively, described according to after setting up the first communication connection between described connection establishment request and described Intranet node, also comprise:
Receive from described NAT gateway and connect maintenance request, described connection maintenance request is that described Intranet node sends every predetermined time interval through described NAT gateway, and described connection maintenance request comprises the node identification of described Intranet node;
Detect and whether set up described first between the Intranet node corresponding with described node identification and communicate to connect;
If so, then continue to keep setting up between described Intranet node described first communicates to connect.
Fourth aspect, provides a kind of device realizing inter-node communication, and be applied in the agent node provided in the system of Internet service, described system comprises: at least one Intranet node, described NAT gateway, agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described device comprises:
Set up request receiving module, for receiving connection establishment request from described NAT gateway, described connection establishment request is that described Intranet node sends through described NAT gateway;
Connection establishment module, for setting up the first communication connection according between described connection establishment request and described Intranet node;
First message reception module, for by being connected with the second communication set up between common network node, receiving the first message packet that described common network node sends, carrying first object node identification in described first message packet;
First message transmitting module, when belonging to described Intranet node for the first object node corresponding when described first object node identification, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
Alternatively, described device also comprises:
Second message reception module, for receiving the second message packet that described Intranet node is sent by described first communication connection, carries the second destination node marking in described second message packet;
Second message transmitting module, when belonging to described Intranet node for the second destination node corresponding when described second destination node marking, forward described second message packet by described first communication connection of setting up between described second destination node to described second destination node;
3rd message transmitting module, when belonging to described common network node for the second destination node corresponding when described second destination node marking, forward described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
Alternatively, also comprise in described NAT networking: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Described connection establishment module, comprising: label detection unit and connection establishment unit;
Described label detection unit, for whether there is described node identification in detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
Described connection establishment unit, for when there is described node identification in described nodal information storehouse, and sets up described first between described Intranet node and communicates to connect, and stores described node identification, corresponding relation between described IP address and described port numbers.
Alternatively, described device also comprises:
Information receiving module, finds for receiving described node the nodal information that server sends; Wherein, the node identification of the Intranet node successfully finding server registration to described node is at least comprised in described nodal information;
Information storage module, for being stored in described nodal information in described nodal information storehouse.
Alternatively, described device also comprises:
Maintenance request receiver module, maintenance request is connected for receiving from described NAT gateway, described connection maintenance request is that described Intranet node sends every predetermined time interval through described NAT gateway, and described connection maintenance request comprises the node identification of described Intranet node;
Whether connection detection module, set up described first between the Intranet node corresponding with described node identification communicated to connect for detecting;
Connect and keep module, for when having set up described first communication connection, continue to keep setting up between described Intranet node described first has communicated to connect.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought comprises:
Agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic diagram of a kind of network architecture involved by the embodiment of the present invention;
Fig. 2 is the flow chart realizing the method for inter-node communication that one embodiment of the invention provides;
Fig. 3 A is the flow chart realizing the method for inter-node communication that another embodiment of the present invention provides;
Fig. 3 B is the flow chart of the step 31 that relates to of another embodiment of the present invention to step 35;
Fig. 4 is the block diagram realizing the system of inter-node communication that one embodiment of the invention provides;
Fig. 5 is the flow chart realizing the method for inter-node communication that another embodiment of the present invention provides;
Fig. 6 A is the flow chart realizing the method for inter-node communication that another embodiment of the present invention provides;
Fig. 6 B is the flow chart of the step 602 involved by another embodiment of the present invention;
Fig. 6 C is the flow chart of the step 608 involved by another embodiment of the present invention to step 610;
Fig. 7 is the block diagram realizing the device of inter-node communication that one embodiment of the invention provides;
Fig. 8 is the block diagram realizing the device of inter-node communication that another embodiment of the present invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to Fig. 1, it illustrates the schematic diagram of a kind of network architecture involved by the embodiment of the present invention.This network architecture comprises: at least one Intranet node 120, NAT gateway 140, agent node 160 and at least one common network node 180.Wherein, each Intranet node 120 is arranged in same Intranet, and agent node 160 and each common network node 180 are arranged in public network.
Alternatively, this network architecture also comprises: node finds server (not shown).Node finds that server is arranged in public network.Node finds that server is used for providing registration service to Intranet node 120 and common network node 180, and the node completing registration could communicate with other node in this network architecture.
In embodiments of the present invention, the above-mentioned network architecture is applied to the system providing Internet service, and this system can be used for providing the Internet services such as such as online game, Chat communication, shopping at network to user.Within the system, each common network node can be deployed in public network, for the service processing node providing the process of every business in above-mentioned Internet service to serve for user, and the Business Processing process also namely put into effect.Common network node can be deployed in one or more server.Each Intranet node can be in the local area network (LAN) of the development group being deployed in above-mentioned Internet service, and namely developer, for carrying out the service processing node of local exploitation debugging, is also in the Business Processing process of exploitation debug phase.Intranet node can be deployed in computer in one or more local area network (LAN) or server.
Please refer to Fig. 2, it illustrates the flow chart realizing the method for inter-node communication that one embodiment of the invention provides.The present embodiment is applied in the network architecture shown in Fig. 1 in this way and is illustrated.The method can comprise following several step:
Step 202, Intranet node sends connection establishment request through NAT gateway to agent node.
Correspondingly, agent node receives connection establishment request from NAT gateway.
Step 204, agent node sets up the first communication connection according between connection establishment request and Intranet node.
Step 206, common network node sends the first message packet by being connected with the second communication set up between agent node to agent node, carries first object node identification in this first message packet.
Correspondingly, agent node receives the first message packet, and obtains first object node identification.
Step 208, when the first object node that first object node identification is corresponding belongs to Intranet node, agent node forwards the first message packet by first communication connection of setting up between first object node to first object node.
In sum, the method that the present embodiment provides, agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
Please refer to Fig. 3 A, it illustrates the flow chart realizing the method for inter-node communication that another embodiment of the present invention provides.The present embodiment is still applied in the network architecture shown in Fig. 1 in this way and is illustrated.The method can comprise following several step:
Step 301, Intranet node sends connection establishment request through NAT gateway to agent node.
Wherein, connection establishment request is used for setting up the first communication connection between request and agent node.In the present embodiment, the first communication connection is TCP (Transmission Control Protocol, transmission control protocol) connection.
In addition, connection establishment request comprises the node identification of Intranet node, IP address and port numbers.Wherein, node identification is used for unique identification Intranet node, and such as this node identification can be nodename.IP address refers to the IP address of internal network that Intranet node is corresponding, also referred to as private IP address.Port numbers refer to that Intranet node provides for setting up the first communication connection with agent node, and based on the port numbers of this first communication connection receipt message message.
Correspondingly, agent node receives connection establishment request from NAT gateway.
Step 302, agent node sets up the first communication connection according between connection establishment request and Intranet node.
After agent node receives connection establishment request, the parameter of carrying in this connection establishment request is verified, and set up the first communication connection when being verified and between the Intranet node of this connection establishment request of initiation.
Alternatively, this step can comprise following a few sub-steps:
The first, whether there is node identification in agent node detection node information bank.
The second, if there is node identification in nodal information storehouse, then set up the first communication connection between agent node and Intranet node, and memory node mark, corresponding relation between IP address and port numbers.
Wherein, nodal information storehouse is for storing the nodal information of success to the node of node discovery server registration, and nodal information at least comprises node identification.In the present embodiment, also comprise the node being arranged in public network in NAT networking and find server.Node finds that server is used for providing registration service to each node (comprising Intranet node and common network node), and the node completing registration could communicate with other node in this network architecture.Node finds that nodal information corresponding for the node succeeded in registration can be supplied to agent node by server; Correspondingly, above-mentioned nodal information is stored in nodal information storehouse by agent node.After agent node receives the connection establishment request of Intranet node initiation, the node identification of the Intranet node that read requests connects from this connection establishment request, and detect this node identification and whether be present in nodal information storehouse, also namely detect Intranet node that this request connects whether success find server registration to node; If this node identification is present in nodal information storehouse, then show the Intranet node successful registration that this request connects, in this case, agent node responds this connection establishment request, sets up the first communication connection with between the Intranet node of asking to be connected.In addition, agent node by the node identification of this Intranet node, IP address and port numbers corresponding stored, to use in follow-up repeating process.
In a kind of possible execution mode, as shown in Figure 3 B, to node, Intranet node finds that the process that server carries out registering can comprise following several step:
Step 31, to node, Intranet node finds that server sends registration request through NAT gateway.
Because node finds that server disposition is in public network, therefore to node, Intranet node finds that server sends registration request through NAT gateway.Alternatively, registration request comprises node identification and the port numbers of the Intranet node of this request registration.
Wherein, Intranet node determines its port numbers by the mode that the following two kinds is possible:
In the mode that the first is possible, Intranet node determines port numbers at random.Such as, the port numbers that uses when random selecting port numbers is registered as it from the port numbers interval of 1024-65535 of Intranet node.There is address port collision between the node adopting the mode determination port numbers of random selecting can reduce request registration as much as possible, improve and register power.
In the mode that the second is possible, Intranet node chooses port numbers in the designated ends slogan interval of its correspondence.Such as, be that the different designated ends slogan of different Intranet peer distribution is interval in advance, Intranet node chooses port numbers in the designated ends slogan interval of its correspondence, and the situation of address port collision can be avoided completely to occur, and power is registered in raising further.
Step 32, node finds that server receives registration request from NAT gateway, and obtains public network IP address corresponding to NAT gateway.
Step 33, node finds the port numbers of server according to public network IP address and Intranet node, detects Intranet node and whether meets registration condition.
Wherein, registration condition refers in other node of successful registration the node not existing and use identical public network IP address and port numbers.When the node of request registration employs identical IP address and port numbers with other node of successful registration, namely address port collision can occur, the node of request registration cannot complete registration.The public network IP address corresponding due to the multiple Intranet nodes in Intranet is identical, therefore in order to reduce or avoid the situation of address port collision to occur, need to guarantee that each Intranet node uses different port numbers to register, adopt the two kinds of mode determination port numbers introduced in above-mentioned steps 31, can fully reduce or avoid completely the situation of address port collision to occur, fully improve and register power.
Step 34, if Intranet node meets registration condition, then node finds the success of server determination Intranet Node registry, and sends the nodal information corresponding to Intranet node to agent node.
In the successful situation of Intranet Node registry determining request registration, node finds that server sends the nodal information corresponding to this Intranet node to agent node.Wherein, the node identification of this Intranet node is at least comprised in nodal information.Alternatively, the port numbers of public network IP address corresponding to this Intranet node and/or this Intranet node can also be comprised in nodal information.
Step 35, agent node receiving node information, and nodal information is stored in nodal information storehouse.
The nodal information received is stored in nodal information storehouse by agent node, verifies the Intranet node that request connects so that follow-up.
Alternatively, node finds that server also broadcasts nodal information corresponding to the Intranet node of successful registration to each other node (comprising common network node and Intranet node), so that other node obtains the relevant information of the Intranet node that can communicate in Intranet, as relevant informations such as node identification, IP address and port numbers.
In addition, the registration process that common network node carries out to node discovery server process and the Intranet node registered is similar, and the present embodiment repeats no more this.After common network node succeeds in registration, node finds that server broadcasts nodal information corresponding to the common network node of this successful registration to agent node, each Intranet node and each common network node.
Step 303, common network node sends the first message packet by being connected with the second communication set up between agent node to agent node, carries first object node identification in this first message packet.
In conjunction with reference to the network architecture shown in figure 1, set up and have second communication to be connected between each common network node with agent node, the connection of this second communication is similarly TCP and connects.When common network node needs to send message packet to the arbitrary Intranet node in Intranet, this message packet is sent to agent node by being connected with the second communication set up between agent node by common network node, is forwarded by agent node.
Such as, when common network node needs to send the first message packet to a certain target Intranet node, first this first message packet is sent to agent node by common network node, carries the node identification of above-mentioned target Intranet node in this first message packet.Wherein, from node, common network node can find that server end obtains the node identification of the Intranet node that can communicate Intranet.
Correspondingly, agent node receives the first message packet, and obtains first object node identification.
Step 304, when the first object node that first object node identification is corresponding belongs to Intranet node, agent node forwards the first message packet by first communication connection of setting up between first object node to first object node.
First object node in Intranet is by above-mentioned steps 301 with when successfully setting up the first communication connection between step 302 and agent node, agent node forwards the first message packet by this first communication connection to first object node, thus realizes common network node and the internodal communication of Intranet.
Need supplementary notes a bit: when common network node need in public network another common network node send message packet time, in conjunction with reference to the network architecture shown in figure 1, have communication connection (as TCP connects) owing to directly setting up between each common network node, therefore common network node sends message packet by the communication connection of setting up between another common network node directly to this another common network node.
What also need supplementary notes is a bit, after Intranet node successfully sets up the first communication connection between agent node, be not disconnected to keep this first communication connection, Intranet node can send connection maintenance request through NAT gateway to agent node every predetermined time interval, and this connection maintenance request comprises the node identification of Intranet node.Correspondingly, agent node receives from NAT gateway and connects maintenance request; Detect between the Intranet node corresponding with the node identification carried in this request and whether set up the first communication connection; If so, then set up between agent node continuation maintenance with Intranet node first communicates to connect.First communication connection of Intranet node by setting up between active maintenance and agent node, can guarantee that this first communication connection is not disconnected, and then guarantee that common network node can successfully communicate with self.
Describing common network node above and send the process of message packet to Intranet node and common network node to another common network node, sending the process of message packet to common network node and Intranet node to another Intranet node by introducing Intranet node below.Alternatively, also 305 to step 307 can be comprised the steps after step 302:
Step 305, Intranet node sends the second message packet by the first communication connection to agent node, carries the second destination node marking in this second message packet.
When Intranet node needs to send the second message packet to a certain target common network node, first this second message packet is sent to agent node by first communication connection of setting up between agent node by Intranet node, carries the node identification of above-mentioned target common network node in this second message packet.Wherein, from node, Intranet node can find that server end obtains the node identification of the common network node that can communicate public network.
When Intranet node needs to send the second message packet to a certain target Intranet node, this second message packet is still sent to agent node by first communication connection of setting up between agent node by Intranet node, carries the node identification of above-mentioned target Intranet node in this second message packet.Wherein, from node, Intranet node can find that server end obtains the node identification of other Intranet node that can communicate Intranet.
Correspondingly, agent node receives the second message packet, and obtains the second destination node marking.
Step 306, when the second destination node that the second destination node marking is corresponding belongs to Intranet node, agent node forwards the second message packet by first communication connection of setting up between the second destination node to the second destination node.
Step 307, when the second destination node that the second destination node marking is corresponding belongs to common network node, agent node forwards the second message packet by being connected with the second communication set up between the second destination node to the second destination node.
After agent node receives the second message packet, therefrom obtain the second destination node marking, and judge that the second destination node that this second destination node marking is corresponding belongs to Intranet node and still belongs to common network node.When judging that the second destination node belongs to Intranet node, forward the second message packet by first communication connection of setting up between this second destination node to this second destination node; And when judging that the second destination node belongs to common network node, forward the second message packet by being connected with the second communication set up between this second destination node to the second destination node.
Need supplementary notes a bit: in order to make node (comprising Intranet node and common network node) occurs in Intranet and public network move time, the operating process of self can be determined rapidly, guarantee internodal proper communication, can be the different mode of operation of each Joint Enterprise two kinds in advance, as Intranet pattern and public network mode, and the switch parameter that setting is corresponding.When needs by node deployment in Intranet time, open Intranet pattern and also close public network mode, make node perform the operating process of the Intranet node in above-described embodiment; When needs by node deployment in public network time, open public network mode and also close Intranet pattern, make node perform the operating process of the common network node in above-described embodiment.Correspondingly, node upon actuation, can check that switch parameter in configuration is to determine the mode of operation of self, and perform corresponding operating process according to determined mode of operation.By the way, when needs by node from Intranet environmental transport and transfer to public network environment time, only need the switch parameter that simple adjustment is relevant, fully raising node operating efficiency, has very large flexibility simultaneously.
In sum, the method that the present embodiment provides, agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
In addition, also determine port numbers at random by Intranet node or choose port numbers in the designated ends slogan interval of its correspondence, fully reducing or completely avoid the situation generation of address port conflict, substantially increase and register power.
Especially, when said method is applied in the system providing Internet service, the common network node put into effect and the efficient communication be between the Intranet node developing the debug phase can be realized, for exploitation debugging efforts, contribute to greatly improving exploitation debugging efficiency.
In a concrete application scenarios, the network architecture shown in Fig. 1 can be applicable to a kind of based in the network game system of cluster.Wherein, each common network node can be deployed in public network, for the service processing node providing the process of every business in game to serve for user, and the Business Processing process also namely put into effect.Common network node can be deployed in one or more server.Each Intranet node can be deployed in the local area network (LAN) of development of games group, and namely developer, for carrying out the service processing node of local exploitation debugging, is also in the Business Processing process of exploitation debug phase.Intranet node can be deployed in computer in one or more local area network (LAN) or server.When common network node needs to provide such as game parameter, customer parameter or other relevant information to Intranet node, forward to Intranet node by agent node, thus realize efficient communication between the two.For exploitation debugging efforts, contribute to the efficiency greatly improving exploitation debugging.
Alternatively, when the Intranet node completing exploitation debugging needs to migrate to public network to put into effect, by adjusting the related switch parameter in the configuration of this node, the mode of operation of this node is made to be public network mode by Intranet patten transformation.
Following is present system embodiment, for the details do not disclosed in present system embodiment, please refer to the inventive method embodiment.
Please refer to Fig. 4, it illustrates the block diagram realizing the system of inter-node communication that one embodiment of the invention provides.This system is used for providing Internet service, and this system comprises: at least one Intranet node 420, NAT gateway 440, agent node 460 and at least one common network node 480; Wherein, each Intranet node 420 is arranged in same Intranet, and agent node 460 and each common network node 480 are arranged in public network.
Intranet node 420, for sending connection establishment request through NAT gateway 440 to agent node 460.
Agent node 460, for receiving connection establishment request from NAT gateway 440; The first communication connection is set up according between connection establishment request and Intranet node 420.
Common network node 480, for sending the first message packet by being connected with the second communication set up between agent node 460 to agent node 460, carries first object node identification in this first message packet.
Agent node 460, also for receiving the first message packet, and obtains first object node identification; When the first object node that first object node identification is corresponding belongs to Intranet node 420, forward the first message packet by first communication connection of setting up between first object node to first object node.
In sum, the system that the present embodiment provides, agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
Especially, when said system is for during for providing the system of Internet service, the common network node put into effect and the efficient communication be between the Intranet node developing the debug phase can be realized, for exploitation debugging efforts, contribute to greatly improving exploitation debugging efficiency.
Based in the embodiment provided embodiment illustrated in fig. 4,
Intranet node 420, also for sending the second message packet by the first communication connection to agent node 460, carries the second destination node marking in this second message packet;
Agent node 460, also for receiving the second message packet, and obtains the second destination node marking; When the second destination node that the second destination node marking is corresponding belongs to Intranet node 420, forward the second message packet by first communication connection of setting up between the second destination node to the second destination node; When the second destination node that the second destination node marking is corresponding belongs to common network node 480, forward the second message packet by being connected with the second communication set up between the second destination node to the second destination node.
Based in the embodiment provided embodiment illustrated in fig. 4, this system also comprises: the node being arranged in public network finds server (not shown); Connection establishment request comprises the node identification of Intranet node 420, IP address and port numbers;
Agent node 460, specifically for:
Whether there is above-mentioned node identification in detection node information bank, nodal information storehouse is for storing the nodal information of success to the node of node discovery server registration, and nodal information at least comprises node identification;
If there is above-mentioned node identification in nodal information storehouse, then and between Intranet node 420 set up the first communication connection, and store above-mentioned node identification, corresponding relation between IP address and port numbers.
Based in the embodiment provided embodiment illustrated in fig. 4,
Intranet node 420, also for finding that server sends registration request through NAT gateway 440 to node, registration request comprises node identification and the port numbers of Intranet node 420; Wherein, port numbers is determined at random, or port numbers chooses in the designated ends slogan interval of Intranet node 420 correspondence;
Node finds server, for receiving registration request from NAT gateway 440; Obtain the public network IP address of NAT gateway 440 correspondence; According to the port numbers of public network IP address and Intranet node 420, detect Intranet node 420 and whether meet registration condition, this registration condition refers in other node of successful registration the node not existing and use identical public network IP address and port numbers; If Intranet node 420 meets registration condition, then determine that Intranet node 420 succeeds in registration, and send the nodal information corresponding to Intranet node 420 to agent node 460, in nodal information, at least comprise the node identification of Intranet node 420;
Agent node 460, also for receiving node information, and is stored in nodal information in nodal information storehouse.
Based in the embodiment provided embodiment illustrated in fig. 4,
Intranet node 420, also for sending connection maintenance request through NAT gateway 440 to agent node 460 every predetermined time interval, connects the node identification that maintenance request comprises Intranet node 420;
Agent node 460, also connects maintenance request for receiving from NAT gateway 440; Detect between the Intranet node 420 corresponding with node identification and whether set up the first communication connection; If so, then continue to keep setting up between this Intranet node 420 first communicates to connect.
Please refer to Fig. 5, it illustrates the flow chart realizing the method for inter-node communication that another embodiment of the present invention provides.The present embodiment is applied in this way in the agent node 160 in the network architecture shown in Fig. 1 and is illustrated.The method can comprise following several step:
Step 502, receive connection establishment request from NAT gateway, this connection establishment request is that Intranet node sends through NAT gateway.
Step 504, sets up the first communication connection according between connection establishment request and Intranet node.
Step 506, by being connected with the second communication set up between common network node, receiving the first message packet that common network node sends, carrying first object node identification in this first message packet.
Step 508, when the first object node that first object node identification is corresponding belongs to Intranet node, forwards the first message packet by first communication connection of setting up between first object node to first object node.
In sum, the method that the present embodiment provides, agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
Please refer to Fig. 6 A, it illustrates the flow chart realizing the method for inter-node communication that another embodiment of the present invention provides.The present embodiment is applied in this way in the agent node 160 in the network architecture shown in Fig. 1 and is illustrated.The method can comprise following several step:
Step 601, receive connection establishment request from NAT gateway, this connection establishment request is that Intranet node sends through NAT gateway.
Step 602, sets up the first communication connection according between connection establishment request and Intranet node.
Alternatively, also comprise in NAT networking: the node being arranged in public network finds server; Connection establishment request comprises the node identification of Intranet node, IP address and port numbers.
As shown in Figure 6B, step 602 can comprise following a few sub-steps:
Whether step 602a, exist node identification in detection node information bank, and nodal information storehouse is for storing the nodal information of success to the node of node discovery server registration, and nodal information at least comprises node identification.
Step 602b, if there is node identification in nodal information storehouse, then and between Intranet node sets up the first communication connection, and memory node mark, corresponding relation between IP address and port numbers.
In addition, before above-mentioned steps 602a, agent node also can perform following steps:
1) receiving node finds the nodal information that server sends; Wherein, the node identification of the Intranet node successfully finding server registration to node is at least comprised in nodal information;
2) nodal information is stored in nodal information storehouse.
Step 603, by being connected with the second communication set up between common network node, receiving the first message packet that common network node sends, carrying first object node identification in this first message packet.
Step 604, when the first object node that first object node identification is corresponding belongs to Intranet node, forwards the first message packet by first communication connection of setting up between first object node to first object node.
Alternatively, 605 to step 607 is also comprised the steps after above-mentioned steps 602:
Step 605, receives the second message packet that Intranet node is sent by the first communication connection, carries the second destination node marking in this second message packet.
Step 606, when the second destination node that the second destination node marking is corresponding belongs to Intranet node, forwards the second message packet by first communication connection of setting up between the second destination node to the second destination node.
Step 607, when the second destination node that the second destination node marking is corresponding belongs to common network node, forwards the second message packet by being connected with the second communication set up between the second destination node to the second destination node.
Alternatively, as shown in Figure 6 C, also 608 to step 610 can be comprised the steps after above-mentioned steps 602:
Step 608, receives from NAT gateway and connects maintenance request, and this connection maintenance request is that Intranet node sends every predetermined time interval through NAT gateway, connects the node identification that maintenance request comprises Intranet node.
Step 609, detects between the Intranet node corresponding with node identification whether set up the first communication connection.
Step 610, if so, then continue to keep setting up between Intranet node first communicates to connect.
In sum, the method that the present embodiment provides, agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
It should be noted is that: the details do not disclosed in the embodiment of the method for above-mentioned agent node side, please refer to the embodiment of the method for present system side.
Following is the device embodiment of agent node side, may be used for the embodiment of the method performing above-mentioned agent node side.For the details do not disclosed in device embodiment, please refer to said method embodiment.
Please refer to Fig. 7, it illustrates the block diagram realizing the device of inter-node communication that one embodiment of the invention provides.This device can be applicable in the agent node 160 in the network architecture shown in Fig. 1.This device can comprise: set up request receiving module 710, connection establishment module 720, first message reception module 730 and the first message transmitting module 740.
Set up request receiving module 710, for receiving connection establishment request from described NAT gateway, described connection establishment request is that described Intranet node sends through described NAT gateway.
Connection establishment module 720, for setting up the first communication connection according between described connection establishment request and described Intranet node.
First message reception module 730, for by being connected with the second communication set up between common network node, receiving the first message packet that described common network node sends, carrying first object node identification in described first message packet.
First message transmitting module 740, when belonging to described Intranet node for the first object node corresponding when described first object node identification, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
In sum, the device that the present embodiment provides, agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
Please refer to Fig. 8, it illustrates the block diagram realizing the device of inter-node communication that another embodiment of the present invention provides.This device can be applicable in the agent node 160 in the network architecture shown in Fig. 1.This device can comprise: set up request receiving module 710, connection establishment module 720, first message reception module 730 and the first message transmitting module 740.
Set up request receiving module 710, for receiving connection establishment request from described NAT gateway, described connection establishment request is that described Intranet node sends through described NAT gateway.
Connection establishment module 720, for setting up the first communication connection according between described connection establishment request and described Intranet node.
First message reception module 730, for by being connected with the second communication set up between common network node, receiving the first message packet that described common network node sends, carrying first object node identification in described first message packet.
First message transmitting module 740, when belonging to described Intranet node for the first object node corresponding when described first object node identification, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
Alternatively, described device also comprises: the second message reception module 750, second message transmitting module 760 and the 3rd message transmitting module 770.
Second message reception module 750, for receiving the second message packet that described Intranet node is sent by described first communication connection, carries the second destination node marking in described second message packet.
Second message transmitting module 760, when belonging to described Intranet node for the second destination node corresponding when described second destination node marking, forward described second message packet by described first communication connection of setting up between described second destination node to described second destination node.
3rd message transmitting module 770, when belonging to described common network node for the second destination node corresponding when described second destination node marking, forward described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
Alternatively, also comprise in described NAT networking: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers.
Described connection establishment module 720, comprising: label detection unit 720a and connection establishment unit 720b.
Described label detection unit 720a, for whether there is described node identification in detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification.
Described connection establishment unit 720b, for when there is described node identification in described nodal information storehouse, and sets up described first between described Intranet node and communicates to connect, and stores described node identification, corresponding relation between described IP address and described port numbers.
Alternatively, described device also comprises: information receiving module 712 and information storage module 714.
Information receiving module 712, finds for receiving described node the nodal information that server sends; Wherein, the node identification of the Intranet node successfully finding server registration to described node is at least comprised in described nodal information.
Information storage module 714, for being stored in described nodal information in described nodal information storehouse.
Alternatively, described device also comprises: maintenance request receiver module 722, connection detection module 724 keep module 726 with being connected.
Maintenance request receiver module 722, maintenance request is connected for receiving from described NAT gateway, described connection maintenance request is that described Intranet node sends every predetermined time interval through described NAT gateway, and described connection maintenance request comprises the node identification of described Intranet node.
Whether connection detection module 724, set up described first between the Intranet node corresponding with described node identification communicated to connect for detecting.
Connect and keep module 726, for when having set up described first communication connection, continue to keep setting up between described Intranet node described first has communicated to connect.
In sum, the device that the present embodiment provides, agent node is disposed by increasing in public network, initiatively initiate connection establishment request to set up the first communication connection to agent node by Intranet node, make the first message packet that agent node is sent to Intranet node by this first communication connection forwarding common network node; Solve because common network node cannot initiatively and between Intranet node establish a communications link in correlation technique, and cause the in-problem problem of the communication between common network node and Intranet node; Utilize NAT gateway can not limit this characteristic of connection of Intranet node active initiation, realize agent node, the identity of each Intranet node is acted on behalf of by agent node, each common network node needs to send to the message packet of Intranet node all to send to agent node, and by agent node, this message packet is forwarded to target Intranet node, achieve common network node and the internodal communication of Intranet.
It should be noted that: in the device that above-described embodiment provides, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by equipment is divided into different functional modules, to complete all or part of function described above.In addition, the device that above-described embodiment provides belongs to same design to relevant embodiment of the method, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (20)

1. realize a method for inter-node communication, it is characterized in that, described method is applied to be provided in the system of Internet service, and described system comprises: at least one Intranet node, NAT gateway, agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described method comprises:
Described Intranet node sends connection establishment request through described NAT gateway to described agent node;
Described agent node receives described connection establishment request from described NAT gateway, and sets up the first communication connection according between described connection establishment request and described Intranet node;
Described common network node sends the first message packet by being connected with the second communication set up between described agent node to described agent node, carries first object node identification in described first message packet;
Described agent node receives described first message packet, and obtains described first object node identification;
When the first object node that described first object node identification is corresponding belongs to described Intranet node, described agent node forwards described first message packet by described first communication connection of setting up between described first object node to described first object node.
2. method according to claim 1, is characterized in that, described method also comprises:
Described Intranet node sends the second message packet by described first communication connection to described agent node, carries the second destination node marking in described second message packet;
Described agent node receives described second message packet, and obtains described second destination node marking;
When the second destination node that described second destination node marking is corresponding belongs to described Intranet node, described agent node forwards described second message packet by described first communication connection of setting up between described second destination node to described second destination node;
When the second destination node that described second destination node marking is corresponding belongs to described common network node, described agent node forwards described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
3. method according to claim 1, is characterized in that, also comprises in described NAT networking: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Described agent node sets up the first communication connection according between described connection establishment request and described Intranet node, comprising:
Whether there is described node identification in described agent node detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
If there is described node identification in described nodal information storehouse, then set up described first between described agent node and described Intranet node and communicate to connect, and store described node identification, corresponding relation between described IP address and described port numbers.
4. method according to claim 3, is characterized in that, described method also comprises:
To described node, described Intranet node finds that server sends registration request through described NAT gateway, described registration request comprises node identification and the port numbers of described Intranet node; Wherein, described port numbers is determined at random, or described port numbers chooses in designated ends slogan interval corresponding to described Intranet node;
Described node finds that server receives described registration request from described NAT gateway, and obtains public network IP address corresponding to described NAT gateway;
Described node finds the port numbers of server according to described public network IP address and described Intranet node, detect described Intranet node and whether meet registration condition, described registration condition refers in other node of successful registration the node not existing and use identical described public network IP address and described port numbers;
If described Intranet node meets described registration condition, then described node finds that server determines the success of described Intranet Node registry, and the nodal information corresponding to described Intranet node is sent to described agent node, at least comprise the node identification of described Intranet node in described nodal information;
Described agent node receives described nodal information, and is stored in described nodal information storehouse by described nodal information.
5., according to the arbitrary described method of Claims 1-4, it is characterized in that, described method also comprises:
Described Intranet node sends connection maintenance request through described NAT gateway to described agent node every predetermined time interval, and described connection maintenance request comprises the node identification of described Intranet node;
Described agent node receives described connection maintenance request from described NAT gateway;
Whether set up described first between the Intranet node that described agent node detection is corresponding with described node identification to communicate to connect;
If so, then set up between described agent node continuation maintenance with described Intranet node described first communicates to connect.
6. realize a system for inter-node communication, it is characterized in that, described system is used for providing Internet service, and described system comprises: at least one Intranet node, NAT gateway, agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described Intranet node, for sending connection establishment request through described NAT gateway to described agent node;
Described agent node, for receiving described connection establishment request from described NAT gateway; The first communication connection is set up according between described connection establishment request and described Intranet node;
Described common network node, for sending the first message packet by being connected with the second communication set up between described agent node to described agent node, carries first object node identification in described first message packet;
Described agent node, also for receiving described first message packet, and obtains described first object node identification; When the first object node that described first object node identification is corresponding belongs to described Intranet node, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
7. system according to claim 6, is characterized in that,
Described Intranet node, also for sending the second message packet by described first communication connection to described agent node, carries the second destination node marking in described second message packet;
Described agent node, also for receiving described second message packet, and obtains described second destination node marking; When the second destination node that described second destination node marking is corresponding belongs to described Intranet node, forward described second message packet by described first communication connection of setting up between described second destination node to described second destination node; When the second destination node that described second destination node marking is corresponding belongs to described common network node, forward described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
8. system according to claim 6, is characterized in that, described system also comprises: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Described agent node, specifically for:
Whether there is described node identification in detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
If there is described node identification in described nodal information storehouse, then and set up described first between described Intranet node and communicate to connect, and store described node identification, corresponding relation between described IP address and described port numbers.
9. system according to claim 8, is characterized in that,
Described Intranet node, also for finding that server sends registration request through described NAT gateway to described node, described registration request comprises node identification and the port numbers of described Intranet node; Wherein, described port numbers is determined at random, or described port numbers chooses in designated ends slogan interval corresponding to described Intranet node;
Described node finds server, for receiving described registration request from described NAT gateway; Obtain the public network IP address that described NAT gateway is corresponding; According to the port numbers of described public network IP address and described Intranet node, detect described Intranet node and whether meet registration condition, described registration condition refers in other node of successful registration the node not existing and use identical described public network IP address and described port numbers; If described Intranet node meets described registration condition, then determine the success of described Intranet Node registry, and send the nodal information corresponding to described Intranet node to described agent node, in described nodal information, at least comprise the node identification of described Intranet node;
Described agent node, also for receiving described nodal information, and is stored in described nodal information in described nodal information storehouse.
10., according to the arbitrary described system of claim 6 to 9, it is characterized in that,
Described Intranet node, also for sending connection maintenance request through described NAT gateway to described agent node every predetermined time interval, described connection maintenance request comprises the node identification of described Intranet node;
Described agent node, also for receiving described connection maintenance request from described NAT gateway; Detect and whether set up described first between the Intranet node corresponding with described node identification and communicate to connect; If so, then continue to keep setting up between described Intranet node described first communicates to connect.
11. 1 kinds of methods realizing inter-node communication, it is characterized in that, be applied in the agent node provided in the system of Internet service, described system comprises: at least one Intranet node, NAT gateway, described agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described method comprises:
Receive connection establishment request from described NAT gateway, described connection establishment request is that described Intranet node sends through described NAT gateway;
The first communication connection is set up according between described connection establishment request and described Intranet node;
By being connected with the second communication set up between common network node, receiving the first message packet that described common network node sends, in described first message packet, carrying first object node identification;
When the first object node that described first object node identification is corresponding belongs to described Intranet node, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
12. methods according to claim 11, is characterized in that, described according to after setting up the first communication connection between described connection establishment request and described Intranet node, also comprise:
Receive the second message packet that described Intranet node is sent by described first communication connection, in described second message packet, carry the second destination node marking;
When the second destination node that described second destination node marking is corresponding belongs to described Intranet node, forward described second message packet by described first communication connection of setting up between described second destination node to described second destination node;
When the second destination node that described second destination node marking is corresponding belongs to described common network node, forward described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
13. methods according to claim 11, is characterized in that, also comprise in described NAT networking: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Describedly set up the first communication connection according between described connection establishment request and described Intranet node, comprising:
Whether there is described node identification in detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
If there is described node identification in described nodal information storehouse, then and set up described first between described Intranet node and communicate to connect, and store described node identification, corresponding relation between described IP address and described port numbers.
14. methods according to claim 13, is characterized in that, before whether there is described node identification, also comprise in described detection node information bank:
Receive described node and find the nodal information that server sends; Wherein, the node identification of the Intranet node successfully finding server registration to described node is at least comprised in described nodal information;
Described nodal information is stored in described nodal information storehouse.
15., according to claim 11 to 14 arbitrary described methods, is characterized in that, described according to after setting up the first communication connection between described connection establishment request and described Intranet node, also comprise:
Receive from described NAT gateway and connect maintenance request, described connection maintenance request is that described Intranet node sends every predetermined time interval through described NAT gateway, and described connection maintenance request comprises the node identification of described Intranet node;
Detect and whether set up described first between the Intranet node corresponding with described node identification and communicate to connect;
If so, then continue to keep setting up between described Intranet node described first communicates to connect.
16. 1 kinds of devices realizing inter-node communication, it is characterized in that, be applied in the agent node provided in the system of Internet service, described system comprises: at least one Intranet node, NAT gateway, described agent node and at least one common network node; Wherein, at least one Intranet node described is arranged in same Intranet, and described agent node and at least one common network node described are arranged in public network;
Described device comprises:
Set up request receiving module, for receiving connection establishment request from described NAT gateway, described connection establishment request is that described Intranet node sends through described NAT gateway;
Connection establishment module, for setting up the first communication connection according between described connection establishment request and described Intranet node;
First message reception module, for by being connected with the second communication set up between common network node, receiving the first message packet that described common network node sends, carrying first object node identification in described first message packet;
First message transmitting module, when belonging to described Intranet node for the first object node corresponding when described first object node identification, forward described first message packet by described first communication connection of setting up between described first object node to described first object node.
17. devices according to claim 16, is characterized in that, described device also comprises:
Second message reception module, for receiving the second message packet that described Intranet node is sent by described first communication connection, carries the second destination node marking in described second message packet;
Second message transmitting module, when belonging to described Intranet node for the second destination node corresponding when described second destination node marking, forward described second message packet by described first communication connection of setting up between described second destination node to described second destination node;
3rd message transmitting module, when belonging to described common network node for the second destination node corresponding when described second destination node marking, forward described second message packet by being connected with the described second communication set up between described second destination node to described second destination node.
18. devices according to claim 16, is characterized in that, also comprise in described NAT networking: the node being arranged in described public network finds server; Described connection establishment request comprises the node identification of described Intranet node, IP address and port numbers;
Described connection establishment module, comprising: label detection unit and connection establishment unit;
Described label detection unit, for whether there is described node identification in detection node information bank, described nodal information storehouse is for storing the nodal information of success to the node of described node discovery server registration, and described nodal information at least comprises node identification;
Described connection establishment unit, for when there is described node identification in described nodal information storehouse, and sets up described first between described Intranet node and communicates to connect, and stores described node identification, corresponding relation between described IP address and described port numbers.
19. devices according to claim 18, is characterized in that, described device also comprises:
Information receiving module, finds for receiving described node the nodal information that server sends; Wherein, the node identification of the Intranet node successfully finding server registration to described node is at least comprised in described nodal information;
Information storage module, for being stored in described nodal information in described nodal information storehouse.
20. according to claim 16 to 19 arbitrary described devices, and it is characterized in that, described device also comprises:
Maintenance request receiver module, maintenance request is connected for receiving from described NAT gateway, described connection maintenance request is that described Intranet node sends every predetermined time interval through described NAT gateway, and described connection maintenance request comprises the node identification of described Intranet node;
Whether connection detection module, set up described first between the Intranet node corresponding with described node identification communicated to connect for detecting;
Connect and keep module, for when having set up described first communication connection, continue to keep setting up between described Intranet node described first has communicated to connect.
CN201510367283.8A 2015-06-26 2015-06-26 Method, system and apparatus for realizing communication between nodes Pending CN104980528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510367283.8A CN104980528A (en) 2015-06-26 2015-06-26 Method, system and apparatus for realizing communication between nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510367283.8A CN104980528A (en) 2015-06-26 2015-06-26 Method, system and apparatus for realizing communication between nodes

Publications (1)

Publication Number Publication Date
CN104980528A true CN104980528A (en) 2015-10-14

Family

ID=54276620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510367283.8A Pending CN104980528A (en) 2015-06-26 2015-06-26 Method, system and apparatus for realizing communication between nodes

Country Status (1)

Country Link
CN (1) CN104980528A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454210A (en) * 2017-09-15 2017-12-08 成都西加云杉科技有限公司 Communication means and system
CN108200222A (en) * 2017-12-27 2018-06-22 郑州云海信息技术有限公司 A kind of method, apparatus and equipment of cluster accessing outer network from inner network
CN108712507A (en) * 2018-05-31 2018-10-26 中国联合网络通信集团有限公司 block chain node access method, device and block chain node
CN108810186A (en) * 2018-05-31 2018-11-13 中国联合网络通信集团有限公司 block chain node communication method, device and block chain node
CN108810120A (en) * 2018-05-31 2018-11-13 中国联合网络通信集团有限公司 block chain node communication method, device and block chain node
CN108833513A (en) * 2018-05-31 2018-11-16 中国联合网络通信集团有限公司 Block chain communication method between nodes, device and block chain node
CN108848144A (en) * 2018-05-31 2018-11-20 中国联合网络通信集团有限公司 Block chain interior joint access method, device and block chain node
CN108924165A (en) * 2018-08-24 2018-11-30 北京和利时工业软件有限公司 A kind of Intranet remote access method and its device and Intranet gateway
CN110191204A (en) * 2019-05-30 2019-08-30 深圳市网心科技有限公司 A kind of Intranet communication between devices method, system, device and computer storage medium
CN110266713A (en) * 2019-06-28 2019-09-20 深圳市网心科技有限公司 Intranet and extranet communication means, device, system and proxy server and storage medium
CN110730244A (en) * 2019-10-22 2020-01-24 深圳市网心科技有限公司 Networking method and system of DHT (distributed hash table) system, network equipment and storage medium
CN111726400A (en) * 2020-06-08 2020-09-29 北京天空卫士网络安全技术有限公司 Reverse connection method, device and server-side system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6781982B1 (en) * 1999-10-26 2004-08-24 3Com Corporation Method and system for allocating persistent private network addresses between private networks
CN1767509A (en) * 2004-10-29 2006-05-03 北京佳讯飞鸿电气有限责任公司 Method for realizing external network user crossing NAT equipment
CN101552848A (en) * 2009-05-20 2009-10-07 杭州华三通信技术有限公司 Session method and apparatus based on session initiation protocol
CN101902506A (en) * 2010-06-21 2010-12-01 中兴通讯股份有限公司 SIP call-based traversal network address translation method and system
CN102571749A (en) * 2010-12-27 2012-07-11 三星Sds株式会社 Data transmission system and method using relay server
CN103200281A (en) * 2013-01-24 2013-07-10 中国联合网络通信集团有限公司 Method, device and system for accessing intranet server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6781982B1 (en) * 1999-10-26 2004-08-24 3Com Corporation Method and system for allocating persistent private network addresses between private networks
CN1767509A (en) * 2004-10-29 2006-05-03 北京佳讯飞鸿电气有限责任公司 Method for realizing external network user crossing NAT equipment
CN101552848A (en) * 2009-05-20 2009-10-07 杭州华三通信技术有限公司 Session method and apparatus based on session initiation protocol
CN101902506A (en) * 2010-06-21 2010-12-01 中兴通讯股份有限公司 SIP call-based traversal network address translation method and system
CN102571749A (en) * 2010-12-27 2012-07-11 三星Sds株式会社 Data transmission system and method using relay server
CN103200281A (en) * 2013-01-24 2013-07-10 中国联合网络通信集团有限公司 Method, device and system for accessing intranet server

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454210A (en) * 2017-09-15 2017-12-08 成都西加云杉科技有限公司 Communication means and system
CN107454210B (en) * 2017-09-15 2020-12-01 成都西加云杉科技有限公司 Communication method and system
CN108200222A (en) * 2017-12-27 2018-06-22 郑州云海信息技术有限公司 A kind of method, apparatus and equipment of cluster accessing outer network from inner network
CN108810120A (en) * 2018-05-31 2018-11-13 中国联合网络通信集团有限公司 block chain node communication method, device and block chain node
CN108810120B (en) * 2018-05-31 2021-01-26 中国联合网络通信集团有限公司 Block chain node communication method and device and block chain node
CN108833513A (en) * 2018-05-31 2018-11-16 中国联合网络通信集团有限公司 Block chain communication method between nodes, device and block chain node
CN108848144A (en) * 2018-05-31 2018-11-20 中国联合网络通信集团有限公司 Block chain interior joint access method, device and block chain node
CN108810186A (en) * 2018-05-31 2018-11-13 中国联合网络通信集团有限公司 block chain node communication method, device and block chain node
CN108712507B (en) * 2018-05-31 2021-05-18 中国联合网络通信集团有限公司 Block link point access method and device and block link point
CN108810186B (en) * 2018-05-31 2021-05-18 中国联合网络通信集团有限公司 Block chain node communication method and device and block chain node
CN108848144B (en) * 2018-05-31 2021-03-30 中国联合网络通信集团有限公司 Method and device for accessing nodes in block chain and block chain link point
CN108833513B (en) * 2018-05-31 2021-01-26 中国联合网络通信集团有限公司 Inter-node communication method and device of block chain and block chain node
CN108712507A (en) * 2018-05-31 2018-10-26 中国联合网络通信集团有限公司 block chain node access method, device and block chain node
CN108924165A (en) * 2018-08-24 2018-11-30 北京和利时工业软件有限公司 A kind of Intranet remote access method and its device and Intranet gateway
CN110191204A (en) * 2019-05-30 2019-08-30 深圳市网心科技有限公司 A kind of Intranet communication between devices method, system, device and computer storage medium
CN110266713A (en) * 2019-06-28 2019-09-20 深圳市网心科技有限公司 Intranet and extranet communication means, device, system and proxy server and storage medium
CN110730244A (en) * 2019-10-22 2020-01-24 深圳市网心科技有限公司 Networking method and system of DHT (distributed hash table) system, network equipment and storage medium
CN111726400A (en) * 2020-06-08 2020-09-29 北京天空卫士网络安全技术有限公司 Reverse connection method, device and server-side system

Similar Documents

Publication Publication Date Title
CN104980528A (en) Method, system and apparatus for realizing communication between nodes
CN108650182B (en) Network communication method, system, device, equipment and storage medium
CN102291320B (en) MAC (media access control) address learning method and edge device
CN110601906B (en) Data transmission method and device based on block chain
CN112470436A (en) Multi-cloud connectivity using SRV6 and BGP
US20130318239A1 (en) Concept for providing information on a data packet association and for forwarding a data packet
CN103209108B (en) A kind of route generating method based on DVPN and equipment
KR20100087213A (en) Method of establishing a connection
US20110060830A1 (en) Method, system and device for device capabilities exchange
CN1985525A (en) Mobile station mobility in a wireless LAN
US9294548B2 (en) Mobility handling in a communication network
CN105634956A (en) Message forwarding method, device and system
US6654350B1 (en) Method and apparatus for tracking a transaction across a multi-hop network
CN113841363B (en) System and method for establishing communication between networks and devices of different routing protocols
CN103986638A (en) Method and device for binding multiple public network links for ADVPN tunnel
CN102045409A (en) Network penetrating method and network communication system
Bless et al. The underlay abstraction in the spontaneous virtual networks (SpoVNet) architecture
CN101651721A (en) Method and system for judging type of network address translation equipment
EP3354053B1 (en) Improved handling of communication exchanges between a telecommunications network and an user equipment
US7684796B2 (en) Mobile communication system, management agent apparatus, and server function moving method
CN110995829B (en) Instance calling method and device and computer storage medium
US9565098B2 (en) Method and system for implementing border gateway protocol on network devices
CN110601989A (en) Network traffic balancing method and device
CN112910704B (en) Local area network system, method and device supporting dynamic self-adaptive network configuration
CN107104892A (en) The method and apparatus of network acceleration

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 510655, Guangzhou, Whampoa Avenue, No. 2, creative industrial park, building 3-08,

Applicant before: Guangzhou Huaduo Network Technology Co., Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20151014

RJ01 Rejection of invention patent application after publication