Device network connection method, device, electronic device, server and system

By determining the target networking server from multiple candidate networking servers in the device network connection, and using the server to transmit network information and establish a forwarding network, the problems of network congestion and low connection efficiency in the prior art are solved, and more efficient network performance and connection efficiency are achieved.

CN115514800BActive Publication Date: 2025-04-18SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211053059.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-04-18
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

The prior art cannot effectively respond to concurrent connection requests for multiple devices when the device is connected to the network, resulting in network congestion. The forwarding and establishing forwarding network connection functions of network information are performed by different servers, reducing network connection efficiency.

Method used

By detecting the network connection request of the requesting device, obtaining its device network information, and determining the target network server from multiple candidate network servers, using the server to transmit network information and establish a forwarding network to achieve direct or indirect network connection.

Benefits of technology

Reduce network congestion, improve the system's network performance, enable the system to switch network connection mode at any time, and improve the system's network connection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514800B_ABST
    Figure CN115514800B_ABST
Patent Text Reader

Abstract

The present invention discloses a device network connection method, apparatus, electronic device, server and system, the method comprising: when a network connection request of a requesting device is detected, obtaining the first device network information of the requesting device; determining a target network server from a plurality of candidate network servers; the target network server sends the first device network information to the target connection device, and sends the second device network information of the target connection device to the requesting device; judging whether the requesting device and the target connection device have successfully established a direct network connection; if the judgment result is no, the target network server acts as a forwarding node to establish an indirect network connection between the requesting device and the target connection device. It can be seen that the present invention can reduce network congestion and improve the network performance of the system on the one hand, and can enable the system to switch the network connection mode at any time on the other hand, thereby improving the network connection efficiency of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network connection technology, and in particular to a device network connection method, device, electronic device, server and system. Background Art

[0002] With the development of network technology and the increasing sophistication of network infrastructure, the number of devices connected to the network is also increasing, which poses new challenges to network connection technology.

[0003] In the prior art, when a device connects to the network, it generally only requests the network connection through a single server, which is unable to cope with concurrent connection requests from multiple devices and may cause network congestion. At the same time, in the prior art, the functions of forwarding network information and establishing forwarding network connections are generally performed by different servers, which will lead to reduced network connection efficiency.

[0004] It can be seen that the existing technology has defects that need to be solved urgently. Summary of the invention

[0005] The present invention provides a device network connection method, apparatus, electronic equipment, server and system, which can reduce network congestion, improve the network performance of the system, enable the system to switch the network connection mode at any time, and improve the network connection efficiency of the system.

[0006] In order to solve the above technical problems, the first aspect of the present invention discloses a device network connection method, the method comprising:

[0007] When a network connection request of a requesting device to a target connection device is detected, obtaining first device network information of the requesting device;

[0008] Determine a target networked server from a plurality of candidate networked servers;

[0009] Sending the first device network information to the target networking server, which sends the first device network information to the target connection device and sends the second device network information of the target connection device to the requesting device;

[0010] Determine whether the requesting device and the target connection device successfully establish a direct network connection through the first device network information and the second device network information;

[0011] If the judgment result is no, the target networked server acts as a forwarding node to establish an indirect network connection between the requesting device and the target connection device.

[0012] As an optional implementation manner, in the first aspect of the present invention, determining a target networked server from a plurality of candidate networked servers comprises:

[0013] Obtain server load information corresponding to multiple candidate networked servers;

[0014] According to the server load information and based on a load balancing algorithm, a target networked server is determined from the plurality of candidate networked servers.

[0015] As an optional implementation, in the first aspect of the present invention, determining the target networked server from the plurality of candidate networked servers based on the server load information and a load balancing algorithm comprises:

[0016] Filter out the networked server with the smallest server load information from the multiple candidate networked servers and determine it as the target networked server;

[0017] and / or,

[0018] According to the device connection record in the server load information, determining a first networked server that has most recently performed a network service connection from the plurality of candidate networked servers;

[0019] Based on a polling algorithm, determine a second networked server that is the next in order of the first networked server in a polling sequence composed of the plurality of candidate networked servers;

[0020] The second network-connected server is determined as a target network-connected server.

[0021] As an optional implementation, in the first aspect of the present invention, the first device network information and the second device network information are used to enable the requesting device and the target connection device to establish a direct network connection through NAT penetration;

[0022] The determining whether the requesting device and the target connection device successfully establish a direct network connection through the first device network information and the second device network information includes:

[0023] Acquire network connection status information sent by the requesting device and / or the target connection device;

[0024] According to the network connection status information, it is determined whether the requesting device and the target connection device have successfully established a direct network connection through NAT penetration according to the first device network information and the second device network information.

[0025] As an optional implementation manner, in the first aspect of the present invention, the first device network information includes first target device information of the target connection device; the target networking server sending the first device network information to the target connection device, and sending the second device network information of the target connection device to the requesting device, comprises:

[0026] The target networked server determines the target connection device from a plurality of candidate connection devices with which connections are established in advance according to the first target device information in the first device network information;

[0027] The target networked server obtains the second device network information of the target connection device;

[0028] The target networking server sends the first device network information to the target connection device, and sends the second device network information to the requesting device.

[0029] As an optional implementation manner, in the first aspect of the present invention, the target networked server serving as a forwarding node to establish an indirect network connection between the requesting device and the target connection device includes:

[0030] Establishing connections between the requesting device and the target connecting device and the target networked server respectively;

[0031] Sending the third device network information of the requesting device to the target networked server; the third device network information includes the second target device information of the target connection device;

[0032] The target networked server establishes a forwarding communication tunnel with the target connection device according to the third device network information;

[0033] The target transmission data of the requesting device is sent to the target networking server, and the target networking server transmits the target transmission data to the target connection device through the forwarding communication tunnel.

[0034] As an optional implementation, in the first aspect of the present invention, the requesting device is a mobile terminal; and / or, the target connection device is a NAS device; and / or, the direct network connection is a KCP connection.

[0035] A second aspect of the present invention discloses a device network connection apparatus, the apparatus comprising:

[0036] An information acquisition module, configured to acquire first device network information of the requesting device when a network connection request of the requesting device for the target connection device is detected;

[0037] A server determination module, used to determine a target networked server from a plurality of candidate networked servers;

[0038] An information sending module, used for sending the first device network information to the target networking server, and the target networking server sends the first device network information to the target connection device, and sends the second device network information of the target connection device to the requesting device;

[0039] A connection determination module, used to determine whether the requesting device and the target connection device have successfully established a direct network connection through the first device network information and the second device network information;

[0040] The forwarding establishment module is used to trigger the target network server to act as a forwarding node to establish an indirect network connection between the requesting device and the target connection device when the judgment result of the connection judgment module is no.

[0041] As an optional implementation manner, in the second aspect of the present invention, the server determination module includes:

[0042] An acquisition unit, used to acquire server load information corresponding to a plurality of candidate networked servers;

[0043] The determining unit is used to determine a target network-connected server from the plurality of candidate network-connected servers based on the server load information and a load balancing algorithm.

[0044] As an optional implementation, in the second aspect of the present invention, the specific manner in which the determination unit determines the target network server from the multiple candidate network servers based on the load balancing algorithm according to the server load information includes:

[0045] Filter out the networked server with the smallest server load information from the multiple candidate networked servers and determine it as the target networked server;

[0046] and / or,

[0047] According to the device connection record in the server load information, determining a first networked server that has most recently performed a network service connection from the plurality of candidate networked servers;

[0048] Based on a polling algorithm, determine a second networked server that is the next in order of the first networked server in a polling sequence composed of the plurality of candidate networked servers;

[0049] The second network-connected server is determined as a target network-connected server.

[0050] As an optional implementation, in the second aspect of the present invention, the first device network information and the second device network information are used to enable the requesting device and the target connection device to establish a direct network connection through NAT penetration;

[0051] The specific manner in which the connection determination module determines whether the requesting device and the target connection device have successfully established a direct network connection through the first device network information and the second device network information includes:

[0052] Acquire network connection status information sent by the requesting device and / or the target connection device;

[0053] According to the network connection status information, it is determined whether the requesting device and the target connection device have successfully established a direct network connection through NAT penetration according to the first device network information and the second device network information.

[0054] As an optional implementation manner, in the second aspect of the present invention, the first device network information includes the first target device information of the target connection device; the specific manner in which the target networking server sends the first device network information to the target connection device and sends the second device network information of the target connection device to the requesting device includes:

[0055] The target networked server determines the target connection device from a plurality of candidate connection devices with which connections are established in advance according to the first target device information in the first device network information;

[0056] The target networked server obtains the second device network information of the target connection device;

[0057] The target networking server sends the first device network information to the target connection device, and sends the second device network information to the requesting device.

[0058] As an optional implementation, in the second aspect of the present invention, the specific manner in which the target networked server acts as a forwarding node to establish an indirect network connection between the requesting device and the target connection device includes:

[0059] Establishing connections between the requesting device and the target connecting device and the target networked server respectively;

[0060] Sending the third device network information of the requesting device to the target networked server; the third device network information includes the second target device information of the target connection device;

[0061] The target networked server establishes a forwarding communication tunnel with the target connected device according to the third device network information;

[0062] The target transmission data of the requesting device is sent to the target networking server, and the target networking server transmits the target transmission data to the target connection device through the forwarding communication tunnel.

[0063] As an optional implementation, in the second aspect of the present invention, the requesting device is a mobile terminal; and / or, the target connection device is a NAS device; and / or, the direct network connection is a KCP connection.

[0064] A third aspect of the present invention discloses an electronic device, comprising:

[0065] A memory storing executable program code;

[0066] a processor coupled to the memory;

[0067] The processor calls the executable program code stored in the memory to execute part or all of the steps in the device network connection method disclosed in the first aspect of the present invention.

[0068] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all of the steps in the device network connection method disclosed in the first aspect of the present invention.

[0069] A fifth aspect of the present invention discloses a computer program product, which includes a computer program / instructions, and when the computer program / instructions are executed by a processor, they implement part or all of the steps in the device network connection method disclosed in the first aspect of the present invention.

[0070] The sixth aspect of the present invention discloses a server, which establishes network connections with multiple candidate networked servers respectively, and is used to execute part or all of the steps in the device network connection method disclosed in the first aspect of the present invention.

[0071] The seventh aspect of the present invention discloses a device network connection system, which includes a network management server and multiple candidate networking servers. The network management server establishes network connections with the multiple candidate networking servers respectively, and the network management server is used to execute part or all of the steps in the device network connection method disclosed in the first aspect of the present invention.

[0072] Compared with the prior art, the present invention has the following beneficial effects:

[0073] On the one hand, the present invention sets up multiple candidate servers to cope with the situation where there are too many devices requesting network connection, thereby reducing network congestion and improving the network performance of the system. On the other hand, the target networked server is used to transmit network information and establish a forwarding network at the same time, so that the system can switch the network connection mode at any time, thereby improving the network connection efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0075] Figure 1 It is a flow chart of a device network connection method disclosed in an embodiment of the present invention;

[0076] Figure 2 It is a flowchart of another device network connection method disclosed in an embodiment of the present invention;

[0077] Figure 3 It is a structural schematic diagram of a device network connection apparatus disclosed in an embodiment of the present invention;

[0078] Figure 4 It is a structural schematic diagram of another device network connection apparatus disclosed in an embodiment of the present invention;

[0079] Figure 5 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0080] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0081] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.

[0082] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0083] The present invention discloses a device network connection method, apparatus, electronic device, server and system. On the one hand, multiple candidate servers are set to cope with the situation where there are too many devices requesting network connection, thereby reducing network congestion and improving the network performance of the system. On the other hand, the target network server is used to transmit network information and establish a forwarding network at the same time, so that the system can switch the network connection mode at any time, thereby improving the network connection efficiency of the system. The following are detailed descriptions.

[0084] Embodiment 1

[0085] See also Figure 1 , Figure 1 1 is a flow chart of a device network connection method disclosed in an embodiment of the present invention. Figure 1 The described method can be applied to corresponding connection devices for providing network connection of devices, such as connection terminals, connection devices or connection servers, and the server can be a cloud server or a local server, which is not limited in the embodiments of the present invention. Figure 1 As shown, it may include the following operations:

[0086] 101. When a network connection request from a requesting device to a target connection device is detected, first device network information of the requesting device is obtained.

[0087] Optionally, the requesting device described in the present invention can be any device with network connection capability and network connection requirements. In a preferred embodiment, it can be a mobile terminal, such as a mobile phone terminal, a laptop terminal or a PDA terminal, etc., which are portable devices with networking functions, and the target connection device can be any device with network connection function. Preferably, it can be a NAS (Network Attached Storage) device, so that the solution in the present invention can be applied in the scenario where the user attempts to connect to his NAS device with a mobile terminal, and it has excellent effect in this scenario.

[0088] Optionally, the first device network information may include at least one of device identification information, network address information, network port information and network connection signature information of the requesting device.

[0089] 102. Determine a target networked server from multiple candidate networked servers.

[0090] Optionally, the execution subject of this step, such as a server or a network connection device, can be pre-connected to multiple candidate networked servers and manage multiple candidate networked servers. Optionally, it can obtain server information of multiple candidate networked servers to generate corresponding API interfaces, and when a network connection request from a requesting device is detected, the corresponding target networked server is allocated to the requesting device. Optionally, the requesting device can access the API interface of the execution subject of this step to obtain the server network information of the allocated target networked server, so as to establish a network connection with the target networked server later.

[0091] Optionally, the server network information may include at least one of a server identifier, a server network address, and a server port address of the target networked server.

[0092] 103. Send the first device network information to a target networking server, which sends the first device network information to a target connection device and sends the second device network information of the target connection device to the requesting device.

[0093] Optionally, after a TCP connection is established between the requesting device and the target networking server, the first device network information may be sent to the target networking server, or the second device network information sent by the target networking server may be received.

[0094] Optionally, the target connection device may establish a TCP connection with the target networking server in advance, so that the target networking server sends the first device network information to the target connection device, or obtains the second device network information of the target connection device.

[0095] Optionally, the second device network information may include at least one of device identification information, network address information, network port information and network connection signature information of the target connection device.

[0096] 104. Determine whether the requesting device and the target connection device successfully establish a direct network connection through the first device network information and the second device network information.

[0097] Preferably, the direct network connection may be a KCP connection, which may achieve faster and more reliable network transmission and may reduce transmission latency at the cost of greater bandwidth.

[0098] 105. If the judgment result is no, the target network server acts as a forwarding node to establish an indirect network connection between the requesting device and the target connection device.

[0099] Optionally, the execution entities of the above steps can be at least one of a cloud management platform, a network connection device, a networked server, a requesting device or a target connection device. The present invention does not intend to limit the execution entity or order thereof.

[0100] It can be seen that by implementing the method described in the embodiment of the present invention, on the one hand, multiple candidate servers can be set to cope with the situation where there are too many devices requesting network connection, thereby reducing network congestion and improving the network performance of the system. On the other hand, the target networked server can be used to transmit network information and establish a forwarding network at the same time, so that the system can switch the network connection mode at any time, thereby improving the network connection efficiency of the system.

[0101] As an optional embodiment, the first device network information includes at least the first target device information of the target connection device, so that the target network server can find the corresponding target connection device according to the first target device information. Optionally, the first target device information can be a device identifier of the target connection device, such as its corresponding device serial number.

[0102] Optionally, in the above step 103, the target networked server sends the first device network information to the target connection device, and sends the second device network information of the target connection device to the requesting device, including:

[0103] The target networked server determines the target connection device from a plurality of candidate connection devices with which connections are established in advance according to the first target device information in the first device network information;

[0104] The target network server obtains the second device network information of the target connection device;

[0105] The target networking server sends the first device network information to the target connection device, and sends the second device network information to the requesting device.

[0106] Optionally, the candidate connection device can establish a network connection with the target network server in advance. For example, the candidate connection device can generate a signature and a device identification according to a fixed algorithm using a preset key, and transmit it to the target network server. The target network server calls the device authentication interface with the signature and the device identification. After the authentication is passed, a TCP network connection is established with the candidate connection device, and the signature and the device identification are stored in the memory.

[0107] Optionally, the requesting device may establish a network connection with the target network server in advance to transmit the first device network information to the target network server. For example, the requesting device may obtain token information through the cloud login interface, and transmit the token information and the device identification of the requesting device to the target network server. The target network server calls the device authentication interface with the token information and the device identification of the requesting device. After the authentication is successful, a TCP network connection is established with the requesting device, and the token information and the device identification are stored in the memory.

[0108] In a specific implementation scheme, after the requesting device and the candidate connection device establish a network connection with the target network server, the requesting device establishes a UDP connection with the three UDP port numbers of the target network server, and transmits the first device network information of the requesting device to the target network server. After the target network server receives it, it finds the TCP connection object of the corresponding target connection device in the local memory according to the device identifier of the target connection device in the first device network information, and sends an instruction to the target connection device to tell it that the UDP service needs to be started. After the target connection device starts the UDP service, it sends its second device network information to the target network server based on the UDP service, and the target network server sends the device network information on both sides to each other.

[0109] It can be seen that by implementing this optional embodiment, the target network server can automatically search for the corresponding target connection device and forward the device network information, so that a direct network connection can be established between the requesting device and the candidate connection device based on the other party's device network information, thereby improving the network connection efficiency of the system.

[0110] As an optional embodiment, the first device network information and the second device network information are specifically used to enable the requesting device and the target connection device to establish a direct network connection through NAT penetration. The first device network information and the second device network information at least include the external network IP information and dynamic port information of the requesting device or the target connection device, so as to implement NAT penetration to establish a direct network connection.

[0111] Optionally, in the above step 104, determining whether the requesting device and the target connection device successfully establish a direct network connection through the first device network information and the second device network information includes:

[0112] Obtaining network connection status information sent by a requesting device and / or a target connection device;

[0113] According to the network connection status information, it is determined whether the requesting device and the target connection device have successfully established a direct network connection through NAT penetration according to the first device network information and the second device network information.

[0114] Optionally, the network connection status information may be a specific field identifier corresponding to the requesting device and / or the target connection device, which may be updated by the requesting device and / or the target connection device according to whether a direct network connection is established or whether NAT penetration is successfully performed, so that the execution entity of the above steps can determine whether the requesting device and the target connection device have successfully established a direct network connection.

[0115] In a specific implementation scheme, the requesting device locally starts the TCP service port as the entry to access the target connection device. Then, the requesting device and the target connection device try to send a NAT penetration test message to each other based on the first device network information and the second device network information. If a normal connection response is obtained, it means that the penetration is successful. Specifically, if the penetration is successful, the local penetration success identification field of the requesting device is updated to true, and the requesting device and the target connection device establish a KCP connection based on the UDP service. If the penetration fails, the local penetration success identification field of the requesting device is updated to false, and the requesting device and the target connection device continue to perform NAT penetration. Subsequently, when the requesting device successfully establishes a KCP connection with the target connection device due to changes in the network environment and other reasons, the local penetration success identification field is updated to true, and the next data transmission request can be automatically made from the KCP connection. Therefore, it is possible to determine whether the requesting device and the target connection device have successfully established a direct network connection based on the value of the local penetration success identification field.

[0116] It can be seen that by implementing this optional embodiment, NAT penetration can be performed between the requesting device and the candidate connection device based on the other party's device network information to establish a direct network connection, and based on the network connection status information, it can be determined whether the requesting device and the target connection device have successfully established a direct network connection. In this way, NAT penetration can be performed between the requesting device and the candidate connection device, and when the subsequent establishment fails, the connection status can be promptly known to determine whether an indirect network connection is to be established, thereby improving the network connection efficiency of the system.

[0117] As an optional embodiment, in the above step 105, the target networked server acts as a forwarding node to establish an indirect network connection between the requesting device and the target connection device, including:

[0118] Establishing connections between the requesting device and the target connecting device and the target networked server respectively;

[0119] Sending the third device network information of the requesting device to the target network server, wherein the third device network information includes the second target device information of the target connection device;

[0120] The target networked server establishes a forwarding communication tunnel with the target connected device according to the network information of the third device;

[0121] The target transmission data of the requesting device is sent to the target networking server, and the target networking server transmits the target transmission data to the target connection device through the forwarding communication tunnel.

[0122] Optionally, details of establishing a connection between the requesting device or the target connecting device and the target networked server may refer to the description in the above embodiments and will not be described in detail here.

[0123] Optionally, the third device network information may be consistent or identical to the first device network information. Similarly, the second target device information may be consistent or identical to the first target device information. The prefix serial number here is only used to illustrate the different application scenarios or steps of the technical features, and is not intended to illustrate the actual differences in the content of the technical features.

[0124] Optionally, the third device network information may include a device network address and a device identifier of the target connection device, wherein the device identifier is used to enable the target network server to directly determine the target connection device, and the device network address can be used to enable the target network server to determine whether there is a forwarding communication tunnel with the target connection device. If not, execute the above-mentioned step of establishing a forwarding communication tunnel with the target connection device based on the third device network information.

[0125] It can be seen that through this optional embodiment, the target transmission data of the requesting device can be sent to the target networking server, and the target networking server transmits the target transmission data to the target connection device through the forwarding communication tunnel. Therefore, when the requesting device and the target connection device cannot establish a direct network connection, the target networking server can establish an indirect network connection as a forwarding node, so that the system can switch the network connection mode at any time, thereby improving the network connection efficiency of the system.

[0126] Embodiment 2

[0127] See also Figure 2 , Figure 2FIG. 1 is a flow chart of another device network connection method disclosed in an embodiment of the present invention. Figure 2 The described method can be applied to corresponding connection devices for providing network connection of devices, such as connection terminals, connection devices or connection servers, and the server can be a cloud server or a local server, which is not limited in the embodiments of the present invention. Figure 2 As shown, it may include the following operations:

[0128] 201. When a network connection request from a requesting device to a target connection device is detected, first device network information of the requesting device is obtained.

[0129] 202. Obtain server load information corresponding to multiple candidate networked servers.

[0130] Optionally, the server load information may include at least one of the number of devices currently connected to the candidate networked server, information of currently connected devices, and historical device connection records.

[0131] 203. According to the server load information and based on a load balancing algorithm, a target networked server is determined from a plurality of candidate networked servers.

[0132] Optionally, the load balancing algorithm can be a preset load distribution rule algorithm, or a trained load prediction neural network model. For example, historical device connection records and server load conditions can be used as training sets to train a prediction model, so that after the current server load information is input, the optimal target network server can be directly predicted. Optionally, the load balancing algorithm can also be a dynamic programming algorithm model, so that the optimal load distribution plan can be calculated according to the server load information through preset constraints and objective functions to determine the target network server.

[0133] 204. Send the first device network information to the target networking server, and the target networking server sends the first device network information to the target connection device, and sends the second device network information of the target connection device to the requesting device.

[0134] 205. Determine whether the requesting device and the target connection device successfully establish a direct network connection through the first device network information and the second device network information.

[0135] 206. If the judgment result is no, the target network server acts as a forwarding node to establish an indirect network connection between the requesting device and the target connection device.

[0136] The specific technical details in steps 201-204 may refer to the corresponding descriptions of steps 101-104 in the first embodiment, and will not be elaborated in this embodiment.

[0137] It can be seen that the implementation of the method described in the embodiment of the present invention can determine the target network server from multiple candidate network servers based on the server load information and the load balancing algorithm, so as to execute the service established by the network connection through the target network server, thereby further reducing network congestion and improving the network performance of the system when dealing with the situation where there are too many devices requesting network connection.

[0138] As an optional embodiment, in the above step 203, determining the target networked server from multiple candidate networked servers based on the server load information and the load balancing algorithm includes:

[0139] A networked server with the smallest server load information is selected from multiple candidate networked servers and determined as a target networked server.

[0140] Optionally, the minimum server load information may be used to refer to the minimum number of devices currently connected to the server, or the minimum sum of the number of devices currently connected and the number of devices that need to be connected within a preset time period in the future.

[0141] It can be seen that by implementing this optional embodiment, the networked server with the smallest server load information can be screened out from multiple candidate networked servers and determined as the target networked server, thereby further reducing network congestion and improving the network performance of the system when dealing with a situation where there are too many devices requesting network connections.

[0142] As an optional embodiment, in the above step 203, determining the target networked server from multiple candidate networked servers based on the server load information and the load balancing algorithm includes:

[0143] Determine, according to the device connection record in the server load information, from a plurality of candidate networked servers, a first networked server that has most recently executed a network service connection;

[0144] Based on a polling algorithm, determining a second networked server that is the next in order of the first networked server in a polling sequence composed of a plurality of candidate networked servers;

[0145] The second networked server is determined as the target networked server.

[0146] It can be seen that by implementing this optional embodiment, it is possible to determine, based on a polling algorithm, the second networked server in the next order of the first networked server in a polling sequence composed of multiple candidate networked servers, and determine it as the target networked server, thereby further reducing network congestion and improving the network performance of the system when dealing with a situation where there are too many devices requesting network connections.

[0147] Embodiment 3

[0148] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of a device network connection device disclosed in an embodiment of the present invention. Figure 3 The described device can be applied to a corresponding connection device for providing a network connection for a device, such as a connection terminal, a connection device or a connection server, which can be a cloud server or a local server. Figure 3 As shown, it may include:

[0149] The information acquisition module 301 is used to acquire first device network information of the requesting device when detecting a network connection request from the requesting device for the target connection device.

[0150] Optionally, the first device network information may include at least one of device identification information, network address information, network port information and network connection signature information of the requesting device.

[0151] The server determination module 302 is used to determine a target network-connected server from a plurality of candidate network-connected servers.

[0152] Optionally, the server determination module 302 may be pre-connected to a plurality of candidate networked servers and manage the plurality of candidate networked servers. Optionally, it may obtain server information of the plurality of candidate networked servers to generate corresponding API interfaces, and upon detecting a network connection request of the requesting device, allocate a corresponding target networked server to the requesting device. Optionally, the requesting device may access the API interface of the server determination module 302 to obtain server network information of the allocated target networked server, so as to subsequently establish a network connection with the target networked server.

[0153] Optionally, the server network information may include at least one of a server identifier, a server network address, and a server port address of the target networked server.

[0154] The information sending module 302 is used to send the first device network information to the target networking server, and the target networking server sends the first device network information to the target connection device, and sends the second device network information of the target connection device to the requesting device.

[0155] Optionally, the second device network information may include at least one of device identification information, network address information, network port information and network connection signature information of the target connection device.

[0156] The connection determination module 304 is used to determine whether the requesting device and the target connection device have successfully established a direct network connection through the first device network information and the second device network information.

[0157] Preferably, the direct network connection may be a KCP connection, which may achieve faster and more reliable network transmission and may reduce transmission latency at the cost of greater bandwidth.

[0158] The forwarding establishment module 303 is used to trigger the target network server to act as a forwarding node to establish an indirect network connection between the requesting device and the target connection device when the judgment result of the connection judgment module 304 is no.

[0159] Optionally, the above modules can be at least one of a cloud management platform, a network connection device, a network server, a requesting device or a target connection device.

[0160] It can be seen that by implementing the embodiments of the present invention, on the one hand, multiple candidate servers can be set to cope with the situation where there are too many devices requesting network connection, thereby reducing network congestion and improving the network performance of the system. On the other hand, the target networked server can be used to transmit network information and establish a forwarding network at the same time, so that the system can switch the network connection mode at any time, thereby improving the network connection efficiency of the system.

[0161] As an optional embodiment, Figure 4 As shown, the server determination module 302 includes:

[0162] An acquisition unit 3021 is used to acquire server load information corresponding to a plurality of candidate networked servers;

[0163] The determination unit 3022 is used to determine a target network-connected server from a plurality of candidate network-connected servers based on the server load information and a load balancing algorithm.

[0164] Optionally, the server load information may include at least one of the number of devices currently connected to the candidate networked server, information of currently connected devices, and historical device connection records.

[0165] Optionally, the load balancing algorithm can be a preset load distribution rule algorithm, or a trained load prediction neural network model. For example, historical device connection records and server load conditions can be used as training sets to train a prediction model, so that after the current server load information is input, the optimal target network server can be directly predicted. Optionally, the load balancing algorithm can also be a dynamic programming algorithm model, so that the optimal load distribution plan can be calculated according to the server load information through preset constraints and objective functions to determine the target network server.

[0166] It can be seen that by implementing this optional embodiment, it is possible to determine a target networked server from multiple candidate networked servers based on the server load information and a load balancing algorithm, so as to execute the service established by the network connection through the target networked server, thereby further reducing network congestion and improving the network performance of the system when dealing with a situation where there are too many devices requesting network connections.

[0167] As an optional embodiment, the specific manner in which the determining unit 3022 determines the target network-connected server from multiple candidate network-connected servers based on the server load information and the load balancing algorithm includes:

[0168] A networked server with the smallest server load information is selected from multiple candidate networked servers and determined as a target networked server.

[0169] Optionally, the minimum server load information may be used to refer to the minimum number of devices currently connected to the server, or the minimum sum of the number of devices currently connected and the number of devices that need to be connected within a preset time period in the future.

[0170] It can be seen that by implementing this optional embodiment, the networked server with the smallest server load information can be screened out from multiple candidate networked servers and determined as the target networked server, thereby further reducing network congestion and improving the network performance of the system when dealing with a situation where there are too many devices requesting network connections.

[0171] As an optional embodiment, the specific manner in which the determining unit 3022 determines the target network-connected server from multiple candidate network-connected servers based on the server load information and the load balancing algorithm includes:

[0172] Determine, according to the device connection record in the server load information, from a plurality of candidate networked servers, a first networked server that has most recently executed a network service connection;

[0173] Based on a polling algorithm, determining a second networked server that is the next in order of the first networked server in a polling sequence composed of a plurality of candidate networked servers;

[0174] The second networked server is determined as the target networked server.

[0175] It can be seen that by implementing this optional embodiment, it is possible to determine, based on a polling algorithm, the second networked server in the next order of the first networked server in a polling sequence composed of multiple candidate networked servers, and determine it as the target networked server, thereby further reducing network congestion and improving the network performance of the system when dealing with a situation where there are too many devices requesting network connections.

[0176] As an optional embodiment, the first device network information and the second device network information are specifically used to enable the requesting device and the target connection device to establish a direct network connection through NAT penetration. The first device network information and the second device network information at least include the external network IP information and dynamic port information of the requesting device or the target connection device, so as to implement NAT penetration to establish a direct network connection.

[0177] Optionally, the specific manner in which the connection determination module 304 determines whether the requesting device and the target connection device have successfully established a direct network connection through the first device network information and the second device network information includes:

[0178] Obtaining network connection status information sent by a requesting device and / or a target connection device;

[0179] According to the network connection status information, it is determined whether the requesting device and the target connection device have successfully established a direct network connection through NAT penetration according to the first device network information and the second device network information.

[0180] Optionally, the network connection status information may be a specific field identifier corresponding to the requesting device and / or the target connection device, which may be updated by the requesting device and / or the target connection device according to whether a direct network connection is established or whether NAT penetration is successfully performed, so that the connection judgment module 304 can judge whether the requesting device and the target connection device have successfully established a direct network connection.

[0181] It can be seen that by implementing this optional embodiment, NAT penetration can be performed between the requesting device and the candidate connection device based on the other party's device network information to establish a direct network connection, and based on the network connection status information, it can be determined whether the requesting device and the target connection device have successfully established a direct network connection. In this way, NAT penetration can be performed between the requesting device and the candidate connection device, and when the subsequent establishment fails, the connection status can be promptly known to determine whether an indirect network connection is to be established, thereby improving the network connection efficiency of the system.

[0182] As an optional embodiment, the first device network information includes at least the first target device information of the target connection device, so that the target network server can find the corresponding target connection device according to the first target device information. Optionally, the first target device information can be a device identifier of the target connection device, such as its corresponding device serial number.

[0183] Optionally, the specific manner in which the target networked server sends the first device network information to the target connection device, and sends the second device network information of the target connection device to the requesting device includes:

[0184] The target networked server determines the target connection device from a plurality of candidate connection devices with which connections are established in advance according to the first target device information in the first device network information;

[0185] The target network server obtains the second device network information of the target connection device;

[0186] The target networking server sends the first device network information to the target connection device, and sends the second device network information to the requesting device.

[0187] Optionally, the candidate connection device can establish a network connection with the target network server in advance. For example, the candidate connection device can generate a signature and a device identification according to a fixed algorithm using a preset key, and transmit it to the target network server. The target network server calls the device authentication interface with the signature and the device identification. After the authentication is passed, a TCP network connection is established with the candidate connection device, and the signature and the device identification are stored in the memory.

[0188] Optionally, the requesting device may establish a network connection with the target network server in advance to transmit the first device network information to the target network server. For example, the requesting device may obtain token information through the cloud login interface, and transmit the token information and the device identification of the requesting device to the target network server. The target network server calls the device authentication interface with the token information and the device identification of the requesting device. After the authentication is successful, a TCP network connection is established with the requesting device, and the token information and the device identification are stored in the memory.

[0189] It can be seen that by implementing this optional embodiment, the target network server can automatically search for the corresponding target connection device and forward the device network information, so that a direct network connection can be established between the requesting device and the candidate connection device based on the other party's device network information, thereby improving the network connection efficiency of the system.

[0190] As an optional embodiment, the target network server acts as a forwarding node, and the specific manner of establishing an indirect network connection between the requesting device and the target connection device includes:

[0191] Establishing connections between the requesting device and the target connecting device and the target networked server respectively;

[0192] Sending the third device network information of the requesting device to the target network server; the third device network information includes the second target device information of the target connection device;

[0193] The target networked server establishes a forwarding communication tunnel with the target connected device according to the network information of the third device;

[0194] The target transmission data of the requesting device is sent to the target networking server, and the target networking server transmits the target transmission data to the target connection device through the forwarding communication tunnel.

[0195] Optionally, details of establishing a connection between the requesting device or the target connecting device and the target networked server may refer to the description in the above embodiments and will not be described in detail here.

[0196] Optionally, the third device network information may be consistent or identical to the first device network information. Similarly, the second target device information may be consistent or identical to the first target device information. The prefix serial number here is only used to illustrate the different application scenarios or steps of the technical features, and is not intended to illustrate the actual differences in the content of the technical features.

[0197] Optionally, the third device network information may include a device network address and a device identifier of the target connection device, wherein the device identifier is used to enable the target network server to directly determine the target connection device, and the device network address can be used to enable the target network server to determine whether there is a forwarding communication tunnel with the target connection device. If not, execute the above-mentioned step of establishing a forwarding communication tunnel with the target connection device based on the third device network information.

[0198] It can be seen that through this optional embodiment, the target transmission data of the requesting device can be sent to the target networking server, and the target networking server transmits the target transmission data to the target connection device through the forwarding communication tunnel. Therefore, when the requesting device and the target connection device cannot establish a direct network connection, the target networking server can establish an indirect network connection as a forwarding node, so that the system can switch the network connection mode at any time, thereby improving the network connection efficiency of the system.

[0199] Embodiment 4

[0200] See also Figure 5 , Figure 5 Schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. Figure 5 As shown, the electronic device may include:

[0201] A memory 401 storing executable program codes;

[0202] a processor 402 coupled to the memory 401;

[0203] The processor 402 calls the executable program code stored in the memory 401 to execute part or all of the steps in the device network connection method disclosed in the first and second embodiments of the present invention.

[0204] The specific technical details of achieving network connection of the device when the electronic device executes the computer program have been discussed in detail in the aforementioned method steps, so they will not be repeated here.

[0205] Embodiment 5

[0206] An embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute part or all of the steps in the device network connection method disclosed in Embodiments 1 and 2 of the present invention.

[0207] Embodiment 6

[0208] An embodiment of the present invention discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements part or all of the steps in the device network connection method disclosed in Embodiments 1 and 2 of the present invention.

[0209] Embodiment 7

[0210] An embodiment of the present invention discloses a server, which establishes network connections with multiple candidate networked servers respectively, and is used to execute part or all of the steps in the device network connection method disclosed in the first and second embodiments of the present invention.

[0211] Embodiment 8

[0212] An embodiment of the present invention discloses a device network connection system, which includes a network management server and multiple candidate networking servers. The network management server establishes network connections with the multiple candidate networking servers respectively, and the network management server is used to execute some or all of the steps in the device network connection method disclosed in embodiments one and two of the present invention.

[0213] The above describes specific embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0214] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0215] The apparatus, device, non-volatile computer-readable storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, device, and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device, and non-volatile computer storage medium will not be repeated here.

[0216] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0217] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0218] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0219] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0220] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0221] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0222] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0223] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0224] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0225] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0226] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0227] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0228] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0229] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0230] Finally, it should be noted that the device network connection method, apparatus, electronic device, server and system disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A device network connection method, characterized in that: The method comprises: When a network connection request of a requesting device for a target connection device is detected, first device network information of the requesting device is obtained, wherein the first device network information includes at least one of device identification information, network port information and network connection signature information of the requesting device, and first target device information of the target connection device; Determine a target networked server from a plurality of candidate networked servers; The first device network information is sent to the target networking server, and the target networking server determines the target connection device from multiple candidate connection devices that have pre-established connections based on the first target device information in the first device network information; the target networking server obtains the second device network information of the target connection device; the target networking server sends the first device network information to the target connection device, and sends the second device network information to the requesting device, the first device network information and the second device network information are used to enable the requesting device and the target connection device to establish a direct network connection through NAT penetration, and the direct network connection is a KCP connection; Acquire network connection status information sent by the requesting device and / or the target connection device, where the network connection status information is a specific field identifier corresponding to the requesting device and / or the target connection device; According to the network connection status information, determining whether the requesting device and the target connection device successfully establish a direct network connection through NAT penetration according to the first device network information and the second device network information; If the judgment result is no, establishing connections between the requesting device and the target connection device and the target networked server respectively; Sending the third device network information of the requesting device to the target networking server, the third device network information including the second target device information of the target connecting device; The target networked server establishes a forwarding communication tunnel with the target connected device according to the third device network information; sending the target transmission data of the requesting device to the target networked server; The target networked server transmits the target transmission data to the target connection device through the forwarding communication tunnel.

2. The device network connection method according to claim 1, characterized in that: The step of determining a target networked server from a plurality of candidate networked servers comprises: Obtain server load information corresponding to multiple candidate networked servers; According to the server load information and based on a load balancing algorithm, a target networked server is determined from the plurality of candidate networked servers.

3. The device network connection method according to claim 2, characterized in that: The step of determining a target networked server from the plurality of candidate networked servers based on the server load information and a load balancing algorithm includes: Filter out the networked server with the smallest server load information from the multiple candidate networked servers and determine it as the target networked server; and / or, According to the device connection record in the server load information, determining a first networked server that has most recently performed a network service connection from the plurality of candidate networked servers; Based on a polling algorithm, determine a second networked server that is the next in order of the first networked server in a polling sequence composed of the plurality of candidate networked servers; The second network-connected server is determined as a target network-connected server.

4. The device network connection method according to claim 1, characterized in that: The requesting device is a mobile terminal; and / or the target connection device is a NAS device.

5. A device network connection device, characterized in that: The device is used to execute the device network connection method according to any one of claims 1 to 4, and the device includes: An information acquisition module, configured to acquire first device network information of the requesting device when a network connection request of the requesting device for the target connection device is detected; A server determination module, used to determine a target networked server from a plurality of candidate networked servers; An information sending module, used for sending the first device network information to the target networking server, and the target networking server sends the first device network information to the target connection device, and sends the second device network information of the target connection device to the requesting device; A connection determination module, used to determine whether the requesting device and the target connection device have successfully established a direct network connection through the first device network information and the second device network information; The forwarding establishment module is used to establish an indirect network connection between the requesting device and the target connection device by using the target network server as a forwarding node when the judgment result of the connection judgment module is no.

6. An electronic device, characterized in that: The electronic device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the device network connection method according to any one of claims 1 to 4.

7. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the device network connection method according to any one of claims 1 to 4.

8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the device network connection method according to any one of claims 1 to 4 is implemented.

9. A server, characterized in that: The server establishes network connections with multiple candidate networked servers respectively, and the server is used to execute the device network connection method as described in any one of claims 1-4.

10. A device network connection system, characterized in that: The device network connection system includes a network management server and multiple candidate networking servers. The network management server establishes network connections with the multiple candidate networking servers respectively. The network management server is used to execute the device network connection method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • NAT penetration method and system, electronic device and storage medium

    CN109951562A