Remote networking method and device

By introducing network status monitoring process, CONE processing process and Symmetric processing process in the off-site networking method, the problems of complex, high cost, insufficient scalability and inability to penetrate the Symmetric network in the existing technology are solved, and high Cost-effective, high reliability and flexible expansion off-site networking.

CN119449644APending Publication Date: 2025-02-14SHENZHEN HISOURCE DEV OF SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411573521.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art has problems such as complex configuration, high cost, insufficient scalability and inability to penetrate the Symmetric network in off-site networking.

Method used

By introducing network status monitoring process, CONE processing process and Symmetric processing process into the off-site networking method, automatic detection and processing of CONE and Symmetric networks are realized, including uploading and downloading of network information, and algorithmic application that penetrates the Symmetric network.

Benefits of technology

It realizes high cost-effective, high reliability and flexible expansion of off-site networking, which can penetrate the Symmetric network, solves the problem of limited number of networking devices, and achieves unlimited number of networking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449644A_ABST
    Figure CN119449644A_ABST
Patent Text Reader

Abstract

The invention discloses a remote networking method and device, and the method comprises a network state monitoring process, a CONE processing process and a Symmetric processing process, and specifically comprises the steps: 1, initializing an event cycle, and starting the network state monitoring process; 2, performing corresponding initialization operation according to the network type monitored by the network state monitoring process, and uploading local network information to a server after the initialization is successful; 3, acquiring network information of other equipment on the server, wherein the network information comprises a Peer network type, an IP address of a Peer node, a port number, a node name and a supported routing list; and executing a CONE processing flow or a Symmetric processing flow according to the network type of the network information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communications, and in particular relates to a remote networking communication method and device. Background Art

[0002] With the multi-regional development of enterprise business, remote networking has become an important means to improve enterprise operational efficiency and ensure data security. Traditional VPN and dedicated line connection technologies have limitations in network performance, networking costs, flexibility and scalability. Although border routers can connect networks in different locations, their configuration is complex, costly and scalable. As an emerging technology, remote networking manages WAN connections in a software-defined manner, realizes the interconnection and management of multi-regional network resources, and has the advantages of high cost performance, high reliability and flexible expansion.

[0003] To this end, an invention patent with a publication number of CN110430478A discloses a networking communication method, device, terminal equipment and storage medium. The networking method includes: when the networker is detected to be connected to the network, the current network environment of the scheduler is updated, wherein the networker includes a first networker deployed in the IPTV private network environment and a second networker deployed in the developer network environment, and the scheduler is deployed in the public network environment; the network type of the updated network environment is determined, wherein the network type includes a public IP network, a UPnp network or a NAT network; based on the judgment result of the network type, the network is formed through the preset networking strategy corresponding to the network type, so that the first device in the IPTV private network environment corresponding to the first networker communicates with the second device in the developer network environment corresponding to the second networker, wherein the preset networking strategy includes a direct connection mode, a hole punching mode or a bridge mode. By introducing the centralized configuration of the networker and the scheduler, the complex problem of remote networking is solved and fast networking access is achieved; by determining the network type, data connection optimization is performed under different networks to improve transmission efficiency and stability. In the above networking method, the number of network devices is limited, and a first network device and a second network device are required; in addition, the first network device requires an IPTV private network environment, and the network type is limited to a public IP network, a UPnp network or a NAT network, and cannot penetrate a Symmetric network. Summary of the invention

[0004] A brief summary of embodiments of the present invention is provided below to provide a basic understanding of certain aspects of the present invention. It should be understood that the following summary is not an exhaustive summary of the present invention. It is not intended to identify key or important parts of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to provide certain concepts in a simplified form as a prelude to a more detailed description discussed later.

[0005] According to one aspect of the present application, a remote networking method is provided, including a network status monitoring process, a CONE processing process and a Symmetric processing process, which specifically includes the following steps:

[0006] Step 1: Initialize the event loop and start the network status monitoring process. The network status monitoring process includes the local network type detection service and the registration network status monitoring service. The local network type detection service is used to detect the local network information (network information of the device to be connected). The local network information includes the network type, public IP address and the port used. The network types include CONE network and Symmetric network.

[0007] Step 2: Perform corresponding initialization operations according to the network type detected by the network status monitoring process. After successful initialization, upload the local network information to the server;

[0008] Step 3: Obtain the network information of the networking peers of other devices on the server, where the network information of the networking peers includes the peer network type, the IP address, port number, node name, and supported routing list of the peer node; and execute the CONE processing flow or the Symmetric processing flow according to the peer network type.

[0009] As an implementation scheme, the network status monitoring process specifically includes:

[0010] Read and record the statistics of each network peer sending / receiving;

[0011] Determine whether the data is normal. If the data is normal, continue to wait for the next monitoring. If it is not normal, proceed to the next step.

[0012] Check whether the local network information has changed. If not, wait for the next monitoring. If changed, proceed to the next step.

[0013] If the local network is determined to be a Symmetric network, the service will be restarted; if the local network is determined to be a CONE network, the local public network IP address and port information will be updated, the local network information will be uploaded to the server, and the network information of other devices will be requested from the central server;

[0014] Start the timer event and wait for the specified time to continue checking the connection status with other devices.

[0015] As an implementation solution, the CONE processing flow specifically includes:

[0016] Get the network information of the networking peer from the server;

[0017] Determine the network type of the networking peer;

[0018] If the network type of the networking peer is CONE type, then record the public IP address, port, supported routing list and other information of the peer node, and establish a connection;

[0019] If the peer network type is Symmetric, the node ID that the peer requests to connect to is obtained, and it is determined that the node ID is not the local end (i.e., the device that is processing this data), and the routing list supported by the peer is stored in the node information that has been connected or is requesting a connection; the peer connection node is the local end, and its connection status is obtained. If it is not connected, the penetration algorithm is executed, information is sent to the random port of the peer's public IP, and a response is waited for;

[0020] Connect based on the Peer network information obtained.

[0021] The local end here refers to the local device, that is, if the device that the Peer needs to connect to is the local device, it will be processed. If it is not the local device, the Peer's routing information will be stored in the device information of the requested connection; Symmetric type devices can only connect to CONE type devices, and can only request / connect to one at a time;

[0022] As an implementation solution, the Symmetric processing flow includes:

[0023] Get the network information of the networking peer from the server;

[0024] Determine whether there is a connected device;

[0025] If there is no connected device, select a CONE type device from the Peer list to request to establish a connection;

[0026] If there is a connected device, determine whether the corresponding device information has changed; if there is a change, re-execute the penetration algorithm to perform a penetration connection; if there is no change, end the process.

[0027] As an implementation scheme, the step 1 specifically includes: initializing the event loop, detecting and saving local network information, the local network information including the public network IP and the used port; selecting CONE network resource initialization or Symmetric network resource initialization according to the network type, and entering the event loop if the initialization is successful, waiting for the server to send the network configuration; releasing resources and exiting the program if the initialization fails.

[0028] As an implementation scheme, in step 3, a CONE processing flow or a Symmetric processing flow is executed according to the network type of the network information, specifically including:

[0029] In the case of CONE network, if the Peer network type is CONE type, obtain the node ID of the Peer requesting to connect, the IP address, port number, node name and supported routing list of the node ID, and directly establish a connection; if the Peer network type is Symmetric type, obtain the node ID of the Peer requesting to connect (Peer connection node), determine whether the node ID is the local end, if not, store the routing list information supported by the Peer in the connected node information; if the node ID is the local end, obtain the connection status, if not connected, execute the penetration algorithm, send information to the random port of the Peer IP address, and wait for a response; connect according to the feedback of the Peer network information;

[0030] When the local network information is a Symmetric network, if the Peer network type is a Symmetric network, obtain the node ID that the Peer requests to connect to, record the IP address, port number, node name and supported routing list of the node ID, and update them to the local network information; if the Peer network type is a CONE type, determine whether there is a device being connected. If not, select a CONE type device from the Peer list to request to establish a connection; if so, determine whether the information of the device being connected has changed; if there is a change, re-execute the penetration algorithm to perform a penetration connection. If there is no change, end the process.

[0031] As an implementation scheme, a CONE type device is selected from the Peer list to request to establish a connection, specifically including: selecting a CONE type device from the Peer list, uploading it to the server, and executing the penetration algorithm: creating 200 (or other numbers, here is just an example, not a limitation) links, sending information to the connected Peer public network IP address and port, sending once every 2 seconds (or other times, here is just an example, not a limitation), waiting for 10 seconds (or other times, here is just an example, not a limitation) to receive data, judging whether there is data feedback, if so, recording the port of the feedback data received by the local end, as well as the public network IP address and port information of the Peer node, and establishing a connection according to the public network IP address and port information of the Peer node.

[0032] As an implementation scheme, the method also includes: after detecting that the device is connected to the network, the device automatically reports the current network information, downloads the network information of all devices in the network, and automatically forms a network according to the network information.

[0033] As an implementation scheme, the method also includes: after the current node detects that the network with the Peer node is disconnected, it will automatically detect the network status and re-report information to establish a network.

[0034] According to another aspect of the present application, a remote networking device is provided, including a network status monitoring process, a CONE processing process and a Symmetric processing process, specifically including the following modules:

[0035] Initialization module: initializes the event loop and starts the network status monitoring process. The network status monitoring process includes the local network type detection service and the registered network status monitoring service. The local network type detection service is used to detect the local network information. The local network information includes the network type, public IP address and the port used. The network types include CONE network and Symmetric network.

[0036] Monitoring module: Perform corresponding initialization operations according to the network type detected by the network status monitoring process, and upload local network information to the server after successful initialization;

[0037] Networking module: obtains network information of other devices on the server, including peer network type, peer node IP address, port number, node name and supported routing list; and executes CONE processing flow or Symmetric processing flow according to the network type of the network information.

[0038] In the prior art (the invention patent with publication number CN110430478A mentioned in the background art), the first network device requires an IPTV private network environment, and the network type is limited to a public IP network, a UPnp network or a NAT network, and cannot penetrate a Symmetric network; for this reason, the present invention divides the entire network into a CONE network and a Symmetric network through step 3, wherein the CONE network is a directly connectable network, and the obtained public network IP and port will not change within a heartbeat cycle; the Symmetric network is a non-directly connectable network, and the port corresponding to the public network IP will change randomly, penetrating To penetrate this network, the penetration method specified by the Symmetric processing flow in step 3 is required, and data is sent to random ports within the range for penetration, thereby solving the defect of being unable to penetrate the Symmetric network; in addition, in order to solve the defect that the number of networkers in the prior art is limited, the present invention automatically uploads the local end information and requests other end information from the server through steps 2 and 3, and directly establishes a connection with other ends. Therefore, there is no limit on the number of networks, and the number of nodes in the network depends on the number of node information sent by the server. When there are more than two nodes, a mesh network is automatically formed, which has good practicality.

[0039] The local end here refers to the device that is processing this data.

[0040] If the device that the Peer needs to connect to is this device, it will be processed. If it is not this device, the Peer's routing information will be stored in the device information of the requested connection.

[0041] Symmetric devices can only connect to CONE devices and can only request / connect to one at a time.

[0042] In summary, the present invention realizes a remote networking method with high cost performance, high reliability and flexible expansion through the above scheme. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The present invention may be better understood by referring to the following description in conjunction with the accompanying drawings, wherein the same or similar reference numerals are used throughout the drawings to represent the same or similar components. The accompanying drawings, together with the following detailed description, are incorporated in and form a part of this specification and are used to further illustrate the preferred embodiments of the present invention and to explain the principles and advantages of the present invention.

[0044] In the figure:

[0045] Figure 1 A schematic diagram of a process of a remote networking method according to an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a network status monitoring process according to an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of a CONE data processing flow in an embodiment of the present invention;

[0048] Figure 4 The figure is a schematic diagram of the Symmetric processing flow of an embodiment of the present invention. DETAILED DESCRIPTION

[0049] Embodiments of the present invention will be described below with reference to the accompanying drawings. Elements and features described in one drawing or one embodiment of the present invention may be combined with elements and features shown in one or more other drawings or embodiments. It should be noted that for the purpose of clarity, the representation and description of components and processes that are not related to the present invention and are known to those of ordinary skill in the art are omitted in the drawings and descriptions.

[0050] The Chinese terms corresponding to the English abbreviations involved in the present invention are explained as follows: P2P (Peer to Peer) is a peer-to-peer network; Cone (Cone NAT) is a cone network, specifically referring to the type of network firewall to which the device belongs is cone (can be directly penetrated); Symmetric (Symmetric NAT) is a symmetric network, specifically referring to the type of network firewall to which the device belongs is symmetric (cannot be directly penetrated); Peer is a peer device, a device networked in a P2P network; rNet (Remote Network) is a remote network.

[0051] As a specific embodiment, the remote networking method of the present invention is mainly divided into a network status monitoring process, a CONE processing process, and a Symmetric processing process (symmetric NAT penetration algorithm) from a program perspective.

[0052] See also Figure 1 The process of the remote networking method of the present invention is as follows:

[0053] Start the program and load local configuration information;

[0054] Initialize the event loop, start the local network type detection service, and register the network status monitoring service;

[0055] According to the detected network type, save the detected public network IP and the used port, select CONE network resource initialization or Symmetric network resource initialization, release the resources and exit the program if the initialization fails;

[0056] Upload local network information to the central server, and request all peer network information from the central server for networking.

[0057] After completing all initializations, upload the network information to the server, obtain the network information of other devices on the server, and execute the CONE processing flow or the Symmetric processing flow according to the network type of the network information; enter the event loop and wait for the server to send the network configuration.

[0058] See also Figure 2 ,The network status monitoring process includes:

[0059] Read and record peer statistics: collect send and receive statistics from each peer connection and store them locally or in a database for subsequent analysis and historical records;

[0060] Data normality judgment: Based on the preset threshold or condition, evaluate whether the collected data is normal; if the data is within the normal range, continue to wait for the next monitoring cycle; if the data is abnormal, perform the next step;

[0061] Detect changes in local network information: query the current network interface, IP address, subnet mask and other information; compare with the last recorded information to determine whether there are any changes; if there are no changes, wait for the next monitoring cycle; if there are changes, execute the next step.

[0062] Network type determination and corresponding processing: Determine the current network type (Symmetric or CONE) based on the collected ICE candidate information or other network diagnostic methods; if it is determined to be a Symmetric network, restart the service (a complete service restart mechanism is required to avoid data loss or service interruption); if it is determined to be a CONE network, update the local network information and upload the updated information to the server; request the server for network information of other peers to make more optimized connection or routing decisions;

[0063] Start a timed event: Set a timer or schedule task to continue the above steps after a specified time interval; wait until the next monitoring period starts, and then repeat the whole process.

[0064] See also Figure 3 , CONE processing flow includes:

[0065] Get the network information of the networking peer from the server: send a request to the server to obtain the network information of all peer nodes in the current network; the network information includes the peer's IP address, port number, NAT type, supported routing protocols, etc.

[0066] Determine the peer network type: Determine the network type of each peer based on the information obtained from the server; network types include CONE (cone NAT) and Symmetric (symmetric NAT).

[0067] Processing CONE type Peers: If the Peer network type is CONE, record the public IP address, port number, and supported routing information of the Peer node; try to establish a direct connection with the Peer node and communicate using the recorded public IP and port;

[0068] Processing Symmetric type Peers: If the Peer network type is Symmetric, obtain the node ID that the Peer requests to connect to; determine whether the node ID is the local end; if it is not the local end, store the routing information supported by the Peer in the connected node information for subsequent possible routing selection. If it is the local end, perform the following steps: obtain the current connection status with the Peer; if not connected, execute the penetration algorithm;

[0069] Execute the penetration algorithm: For a Symmetric type peer that requests to connect to this end, if it is not currently connected: use the penetration algorithm to send information to the random port of the peer's public IP address; wait for the peer's response to try to establish a connection;

[0070] Connect based on the obtained peer network information: After obtaining valid network information, try to establish a stable P2P connection using the obtained public IP, port, and routing information.

[0071] At the same time, monitor the connection status to ensure the stability and reliability of the connection.

[0072] See also Figure 4 , the Symmetric processing flow is as follows:

[0073] Get the network information of the networking peer from the server;

[0074] Determine whether there is a connected device;

[0075] No connected device: Select a CONE type device from the Peer list to request a connection.

[0076] Connected devices: Determine whether the corresponding device information has changed. If there is a change, re-execute the penetration algorithm to perform penetration connection. If there is no change, end the process.

[0077] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0078] In addition, the method of the present invention is not limited to being executed in the time sequence described in the specification, and may also be executed in other time sequences, in parallel or independently. Therefore, the execution order of the method described in this specification does not limit the technical scope of the present invention.

[0079] Although the present invention has been disclosed above by describing specific embodiments of the present invention, it should be understood that all the above embodiments and examples are exemplary rather than restrictive. Those skilled in the art may design various modifications, improvements or equivalents of the present invention within the spirit and scope of the appended claims. These modifications, improvements or equivalents should also be considered to be included in the protection scope of the present invention.

Claims

1. A remote networking method, characterized in that: It includes network status monitoring process, CONE processing process and Symmetric processing process, which specifically include the following steps: Step 1: Initialize the event loop and start the network status monitoring process. The network status monitoring process includes the local network type detection service and the registered network status monitoring service. The local network type detection service is used to detect the local network information. The local network information includes the network type, public IP address and the port used. The network type includes CONE network and Symmetric network. Step 2: Perform corresponding initialization operations according to the network type detected by the network status monitoring process. After successful initialization, upload the local network information to the server; Step 3: Obtain the network information of the networking peers of other devices on the server, including the peer network type, the IP address, port number, node name, and supported routing list of the peer node; and execute the CONE processing flow or the Symmetric processing flow according to the network type of the network information.

2. The remote networking method according to claim 1, characterized in that: The network status monitoring process specifically includes: Read and record the statistics of each network peer sending / receiving; Determine whether the data is normal. If the data is normal, continue to wait for the next monitoring. If not, proceed to the next step. Detect whether the local network information has changed. If it has not changed, wait for the next monitoring. If it has changed, proceed to the next step. Determine whether the local network is a Symmetric network, then restart the service. Determine whether the local network is a CONE network, then update the local public network IP address and port information, upload the local network information to the server, and request the network information of other devices from the central server. Start the timer event and wait for the specified time to continue checking the connection status with other devices.

3. The remote networking method according to claim 1, characterized in that: The CONE processing flow specifically includes: Get the network information of the networking peer from the server; Determine the network type of the networking peer; If the network type of the networking peer is CONE type, then record the public IP address, port, supported routing list and other information of the peer node, and establish a connection; If the peer network type is Symmetric, obtain the node ID that the peer requests to connect to, determine that the node ID is not the local end, and store the routing list supported by the peer in the node information that has been connected or is requesting a connection; if the peer connection node is the local end, obtain its connection status. If it is not connected, execute the penetration algorithm, send information to the random port of the peer's public IP, and wait for a response; Connect based on the Peer network information obtained.

4. The remote networking method according to claim 1, characterized in that: The Symmetric processing flow includes: Get the network information of the networking peer from the server; Determine whether there is a connected device; If there is no connected device, select a CONE type device from the Peer list to request to establish a connection; If there is a connected device, determine whether the corresponding device information has changed; if there is a change, re-execute the penetration algorithm to perform a penetration connection; if there is no change, end the process.

5. The remote networking method according to claim 1, characterized in that: The step 1 specifically includes: initializing the event loop, detecting and saving the local network information, the local network information including the public network IP and the port used; selecting CONE network resource initialization or Symmetric network resource initialization according to the network type, and entering the event loop if the initialization is successful, waiting for the server to send the network configuration; if the initialization fails, releasing the resources and exiting the program.

6. The remote networking method according to claim 1, characterized in that: In the step 3, a CONE processing flow or a Symmetric processing flow is executed according to the network type of the network information, specifically including: when the local network information is a CONE network, if the Peer network type is a CONE type, the node ID requested by the Peer to connect, the IP address, port number, node name and supported routing list of the node ID are obtained, and a connection is directly established; if the Peer network type is a Symmetric type, the node ID requested by the Peer to connect is obtained, and it is determined whether the node ID is the local end. If not, the routing list information supported by the Peer is stored in the connected node information; if the node ID is the local end, the connection status is obtained. If not connected, the penetration algorithm is executed, information is sent to a random port of the Peer IP address, and a response is waited for; the connection is made according to the fed-back Peer network information; When the local network information is a Symmetric network, if the Peer network type is a Symmetric network, obtain the node ID that the Peer requests to connect to, record the IP address, port number, node name and supported routing list of the node ID, and update them to the local network information; if the Peer network type is a CONE type, determine whether there is a device being connected. If not, select a CONE type device from the Peer list to request to establish a connection; if so, determine whether the information of the device being connected has changed; if there is a change, re-execute the penetration algorithm to perform a penetration connection. If there is no change, end the process.

7. The remote networking method according to claim 6, characterized in that: Select a CONE type device from the Peer list to request to establish a connection, specifically including: selecting a CONE type device from the Peer list, uploading it to the server, and executing the penetration algorithm: creating 200 links, sending information to the connected Peer public IP address and port, sending once every 2 seconds, waiting for 10 seconds to receive data, and determining whether there is data feedback. If so, record the port of the feedback data received by this end, as well as the public IP address and port information of the Peer node, and establish a connection based on the public IP address and port information of the Peer node.

8. The remote networking method according to claim 1, characterized in that: The method also includes: after detecting that the device is connected to the network, the device automatically reports the current network information, downloads the network information of all devices in the network, and automatically forms a network according to the network information.

9. The remote networking method according to claim 1, characterized in that: The method also includes: after the current node detects that the network with the Peer node is disconnected, it will automatically detect the network status and re-report information to establish a network.

10. A remote networking device, characterized in that: It includes network status monitoring process, CONE processing process and Symmetric processing process, which specifically include the following modules: Initialization module: initializes the event loop and starts the network status monitoring process. The network status monitoring process includes the local network type detection service and the registered network status monitoring service. The local network type detection service is used to detect the local network information. The local network information includes the network type, public IP address and the port used. The network types include CONE network and Symmetric network. Monitoring module: Perform corresponding initialization operations according to the network type detected by the network status monitoring process, and upload local network information to the server after successful initialization; Networking module: obtains network information of other devices on the server, including peer network type, peer node IP address, port number, node name, and supported routing list; and executes CONE processing flow or Symmetric processing flow according to the network type of the network information; When executed, the remote networking device implements the steps of the method as claimed in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Networking communication method, device, terminal equipment and storage medium

    CN110430478A