Multi-path channel network connection system, multi-path channel network connection method and computer readable storage medium
By establishing multiple path channels between the terminal device and the remote device and selecting appropriate paths according to the type of service, the problem that traditional network channels cannot select paths according to service needs is solved, and the quality of network services is improved.
Patent Information
- Application Number
- CN202310829997.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-06
- Filing Date
- 2023-07-07
- Publication Date
- 2024-12-06
AI Technical Summary
Traditional network channels lack multiple paths, which leads to the inability to select appropriate network paths according to different service needs, resulting in poor network service quality.
Multiple path channels are established between the terminal device and the remote device, multiple path information are collected and paired, valid paths that can be connected, and priority of the path is determined according to the service type, and appropriate paths are selected for data transmission.
The network service quality between the terminal device and the remote device is improved, and appropriate paths can be selected according to the type of service required for the process-initiated connection to improve network performance.
Smart Images

Figure CN119094431A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to network channels and network connection (or wiring) technologies, and more particularly to a multi-path channel network connection system, method and computer-readable storage medium. Background Art
[0002] Traditional network channels only use a single path between network devices at both ends of the channel to transmit packets (or packets), and do not have multiple paths, resulting in a lack of application flexibility and corresponding service quality (or quality) in traditional network channels. For example, when the network connection initiated by the network device has different types of service requirements, the traditional network channel cannot select the appropriate network path for the connection according to the required service type, resulting in poor network service quality. Summary of the invention
[0003] To solve the above problems, the present invention provides a multi-path channel network connection system, method and computer readable storage medium, which can at least partially solve the problems in the prior art.
[0004] The multi-path channel network connection method of the present invention is performed by at least one terminal device and at least one remote device, and includes the following steps: allowing the terminal device to collect multiple path information required for the terminal device to connect to the remote device from the terminal device itself and multiple relay servers; allowing the remote device to collect multiple path information required for the remote device to connect to the terminal device from the remote device itself and the relay servers; allowing the terminal device and the remote device to mutually transmit the path information through a channel server, and each pair the path information to obtain multiple candidate paths; allowing the terminal device to check whether each candidate path can connect the terminal device and the remote device, A plurality of valid paths that can connect the terminal device and the remote device are selected from the candidate paths, and each of the valid paths is added to each queue in a plurality of queues (or queues), wherein each of the queues corresponds to one of a plurality of service types; the terminal device determines the priority of each of the valid paths in each queue according to the service type corresponding to each queue; and the terminal device selects a first valid path with the highest priority in the queue corresponding to the service type specified by the first connection initiated by at least one process (or process) executed by the terminal device, so that the at least one process and the remote device can transmit packets to each other through the first valid path.
[0005] The present invention further provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are read by a terminal device and a remote device to execute the multi-path channel network connection method.
[0006] The present invention further provides a multi-path channel network connection system, comprising at least one terminal device and at least one remote device as mentioned above, so as to execute the multi-path channel network connection method as mentioned above.
[0007] The technical solution of the present invention can establish a multi-path channel between a terminal device and a remote device, so as to select a suitable path for the connection in multiple paths according to the type of service required by the connection initiated by the process, thereby improving the network service quality between the terminal device and the remote device. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 FIG. 4 is a diagram of an application environment architecture of a multi-path channel network connection system according to an embodiment of the present invention.
[0009] Figures 2 to 5 The figure is a flow chart of a multi-path channel network connection method according to an embodiment of the present invention.
[0010] Main component symbols
[0011] 10 Multi-path channel network connection system
[0012] 11 Terminal Devices
[0013] 12 Remote Device
[0014] 13,14 Firewall
[0015] 15 Network
[0016] 16 Cloud Interface Server
[0017] 17 Relay Server
[0018] 18 Channel Server
[0019] Steps 21-27,31-39,41-46,51-56. DETAILED DESCRIPTION
[0020] The following describes the implementation of the present invention through specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.
[0021] Figure 1 FIG. 1 is an application environment architecture diagram of a multi-path channel network connection system 10 according to an embodiment of the present invention. The multi-path channel network connection system 10 includes at least one terminal device 11 and at least one remote device 12. The terminal device 11 can be an electronic device such as a smart phone or a computer. The remote device 12 can be an electronic device such as a computer, a server, or a network attached storage (NAS).
[0022] In one embodiment, the terminal device 11 and the remote device 12 are respectively connected to the network 15 through the firewalls 13 and 14. In addition, the application environment of the multi-path channel network connection system 10 is further provided with a cloud interface server 16, at least one relay server 17, and a tunnel server 18, wherein the cloud interface server 16, the relay server 17, and the tunnel server 18 are all connected to the network 15.
[0023] In this embodiment, the terminal device 11 and the remote device 12 are located inside the firewalls 13 and 14, respectively, while the network 15, the cloud interface server 16, the relay server 17, and the channel server 18 are located outside the firewalls 13 and 14. In addition, the firewalls 13 and 14 will block the connection or communication initiated from the outside to the inside, but allow the connection or communication initiated from the inside to the outside. Therefore, due to the blocking of the firewalls 13 and 14, the terminal device 11 and the remote device 12 cannot communicate with each other directly, but can communicate with each other through the firewalls 13 and 14 via the relay server 17 or the channel server 18.
[0024] Figure 2 The figure is a flow chart of channel establishment of a multi-path channel network connection method according to an embodiment of the present invention.
[0025] First, in step 21 , the remote device 12 registers with the cloud interface server 16 and then connects with the channel server 18 .
[0026] In step 22, the terminal device 11 queries the cloud interface server 16 for information about which relay servers are in the area where the remote device 12 is located. In this embodiment, at least one relay server 17 is set up in the area where the remote device 12 is located. Therefore, the cloud interface server 16 transmits the relevant information of each relay server 17 to the terminal device 11.
[0027] In step 23 , the terminal device 11 queries the cloud interface server 16 for the channel server to which the remote device 12 is connected. The cloud interface server 16 transmits the channel server information of the remote device 12 to the terminal device 11 , whereby the terminal device 11 can know that the remote device 12 is connected to the channel server 18 .
[0028] In step 24, the terminal device 11 and the remote device 12 each collect path information required for mutual communication, and transmit the path information to each other. In detail, the path information of the terminal device 11 is the path information required for the terminal device 11 to connect to the remote device 12, and the path information may include at least one local host address (or website) of the terminal device 11 (for example, the address of the network interface of the terminal device 11), at least one public address of the terminal device 11 outside the firewall 13, and / or the usage information of each relay server 17. In addition, the terminal device 11 can collect the local host address of the terminal device 11 from the terminal device 11 itself, and collect the public address of the terminal device 11 and the usage information of the relay server 17 from the relay server 17. After completing the collection of the path information, the terminal device 11 will transmit its path information to the remote device 12 through the channel server 18.
[0029] On the other hand, the path information of the remote device 12 is the path information required for the remote device 12 to connect to the terminal device 11, and the path information may include at least one local host address of the remote device 12 (e.g., the address of the network interface of the remote device 12), at least one public address of the remote device 12 outside the firewall 14, and / or the usage information of each relay server 17. In addition, the remote device 12 can collect the local host address of the remote device 12 from the remote device 12 itself, and collect the public address of the remote device 12 and the usage information of the relay server 17 from the relay server 17. After completing the collection of the path information, the remote device 12 will transmit its path information to the terminal device 11 through the channel server 18.
[0030] In step 25, the terminal device 11 and the remote device 12 each pair their path information to obtain multiple candidate paths. Since the terminal device 11 and the remote device 12 transmit packets to each other, the terminal device 11 and the remote device 12 need to pair their path information to generate candidate paths.
[0031] There are two types of candidate paths. The first type of candidate path is generated by pairing the local host address and the public address of the terminal device 11 and the remote device 12. One end of this candidate path is a local host address or a public address of the terminal device 11, and the other end is a local host address or a public address of the remote device 12. In one embodiment, if the total number of local host addresses and public addresses of the terminal device 11 is m, and the total number of local host addresses and public addresses of the remote device 12 is n, then m*n first type candidate paths can be paired and generated. In addition, the second type of candidate path is a network path connecting the terminal device 11 and the remote device 12 through the relay server 17. For each relay server 17, a second type of candidate path corresponding to the relay server will be paired, that is, the network path connecting the terminal device 11 and the remote device 12 through the relay server.
[0032] In step 26, the terminal device 11 checks whether each candidate path can connect the terminal device 11 and the remote device 12, so as to select a plurality of valid paths that can connect the terminal device 11 and the remote device 12 from the candidate paths. Specifically, for each candidate path, the terminal device 11 can send a request to the remote device 12 through the candidate path, and check whether a response to the request is received from the remote device 12 within a time limit.
[0033] If the terminal device 11 does not receive a response from the remote device 12 within the time limit, it is determined that the candidate path cannot connect the terminal device 11 and the remote device 12, and therefore, the candidate path will not be selected as a valid path. On the contrary, if the terminal device 11 receives a response from the remote device 12 within the time limit, it will send a request to the remote device 12 again through the candidate path after a preset time, and check whether a response to the second request from the remote device 12 is received within the time limit.
[0034] If the terminal device 11 does not receive a response from the remote device 12 to the second request within the time limit, it is determined that the candidate path cannot connect the terminal device 11 and the remote device 12, and therefore, the candidate path will not be selected as a valid path. On the contrary, if the terminal device 11 receives a response from the remote device 12 to the second request within the time limit, it is determined that the candidate path can connect the terminal device 11 and the remote device 12.
[0035] For the aforementioned first candidate path, the terminal device 11 will select a candidate path with the highest priority among all the first candidate paths that can connect the terminal device 11 and the remote device 12 as a valid path, and the remaining first candidate paths will not be selected as valid paths. Since the priority of the local host address is before the public address, the terminal device 11 will preferentially select a candidate path with both ends being local host addresses among all the first candidate paths that can connect the terminal device 11 and the remote device 12, that is, a candidate path with one end being the local host address of the terminal device 11 and the other end being the local host address of the remote device 12, as a valid path.
[0036] If there is no candidate path with local host addresses at both ends available for selection, the terminal device 11 will select a candidate path with a local host address at one end and a public address at the other end from all first candidate paths that can connect the terminal device 11 and the remote device 12 as a valid path.
[0037] If there is no candidate path with a local host address at one end and a public address at the other end available for selection, the terminal device 11 will select a candidate path with public addresses at both ends from all first candidate paths that can connect the terminal device 11 and the remote device 12 as a valid path.
[0038] For each of the aforementioned second candidate paths, the terminal device 11 will use the above-mentioned request and response method to check whether the candidate path can connect the terminal device 11 and the remote device 12 through the relay server 17 corresponding to the candidate path. If the candidate path can connect the terminal device 11 and the remote device 12 through the relay server 17, the terminal device 11 selects the candidate path as the valid path.
[0039] As mentioned above, if both the terminal device 11 and the remote device 12 have a local host address and / or a public address, and Figure 1 In the application environment, N relay servers 17 (N is a positive integer) are set, and the terminal device 11 can pair and select at most 1 first valid path and N second valid paths, which is 1+N valid paths in total.
[0040] The candidate paths and valid paths mentioned above are not network connections such as Transmission Control Protocol (TCP) connections, but network paths through which connectionless packets such as User Datagram Protocol (UDP) packets can pass. Figure 1In the embodiment, firewalls 13 and 14 are provided, so each valid path is a network path that can pass through the firewalls 13 and 14 and connect the terminal device 11 and the remote device 12.
[0041] In step 27, the terminal device 11 adds each valid path to each of the plurality of queues, wherein each queue corresponds to a different service type, such as high throughput, low latency, or other service types. These valid paths may constitute a multi-path channel between the terminal device 11 and the remote device 12. In addition, each queue is an independent event of a process requirement. In one embodiment, the same application needs to select different paths according to different process requirements.
[0042] Finish Figure 2 After the channel building process, you can then execute Figure 3 The process shown. Figure 3 The figure is a flow chart of path binding of a multi-path channel network connection method according to an embodiment of the present invention.
[0043] First, in step 31, the terminal device 11 starts measuring the delay time of each effective path (details will be described later).
[0044] In step 32, the terminal device 11 opens a port, such as a TCP port, and then waits for a process executed by the terminal device 11 to initiate a connection. The operating system of the terminal device 11 can execute at least one process. When a process of the terminal device 11 needs to send a request to the remote device 12, it will not directly initiate a connection to the remote device 12, but will initiate a connection to the port to utilize the Figure 2 Multi-path channel for process construction.
[0045] In step 33, the terminal device 11 checks the service type specified by the connection. If the connection specifies a high throughput service, the process proceeds to step 34, and if the connection specifies a low latency service, the process proceeds to step 36.
[0046] In step 34, the terminal device 11 selects a valid path with the highest priority (details to be described later) in the high throughput queue corresponding to the high throughput service designated by the connection, that is, a valid path at the head of the high throughput queue.
[0047] In step 35 , the terminal device 11 starts measuring the network throughput of the selected valid path (details will be described later), and then the process enters step 37 .
[0048] On the other hand, in step 36 , the terminal device 11 selects the valid path with the highest priority in the low-latency queue corresponding to the low-latency service specified by the connection, that is, the valid path located at the head end of the low-latency queue, and then the process enters step 37 .
[0049] In step 37 , the terminal device 11 binds the selected valid path to the connection initiated by the above process.
[0050] In step 38 , due to the above binding, the process of the terminal device 11 transmits packets of the connection to the remote device 12 via the effective path, such as request packets of the process and response packets of the remote device 12 .
[0051] The process may issue multiple requests to the remote device 12 via the connection and the selected active path.
[0052] For example, the remote device 12 may be a web server, and the request of the process may be a HyperText Transfer Protocol (HTTP) request for the user of the terminal device 11 to browse the web. For another example, the remote device 12 may be a database server, and the request of the process may be a request to access data. For another example, the remote device 12 may be a network attached storage (NAS), and the request of the process may be a request to write, read or delete a file stored in the remote device 12. If the process no longer issues a request, then in step 39, the terminal device 11 closes the connection and unbinds the connection from the valid path.
[0053] Then, the process returns to step 32 to wait for the next connection initiated by the process of the terminal device 11. If the process executed by the terminal device 11 initiates multiple connections, and these connections specify different service types, the terminal device 11 will switch between the queues corresponding to these service types, so as to select a valid path with the highest priority in the queue corresponding to the service type specified by the connection for each connection, and bind the valid path to the connection.
[0054] The terminal device 11 determines the priority of each valid path in each queue according to the service type corresponding to each queue. In detail, the service type of each queue has a corresponding quality value, for example, the quality value corresponding to the high throughput service is the network throughput, and the quality value corresponding to the low delay service is the delay time.
[0055] For each queue, the terminal device 11 measures the quality value of each valid path in the queue, and determines the priority of the valid path in the queue according to the quality value of the valid path in the queue. The priority of the valid path in the queue is proportional to or inversely proportional to the quality value. For example, in a high-throughput queue, the priority of each valid path is proportional to its quality value, that is, the greater the network throughput, the higher the priority. In a low-latency queue, the priority of each valid path is inversely proportional to its quality value, that is, the shorter the delay time, the higher the priority.
[0056] Taking low latency service as an example, Figure 4 FIG. 1 is a flowchart of a method for connecting a multi-path channel network according to an embodiment of the present invention for measuring the delay time of an effective path, that is, Figure 3 For each valid path, the terminal device 11 will periodically execute Figure 4 process.
[0057] First, in step 41 , the terminal device 11 checks whether the valid path can still connect the terminal device 11 and the remote device 12 . If not, the process proceeds to step 42 . If still, the process proceeds to step 43 .
[0058] In step 42 , the terminal device 11 removes the valid path from each queue.
[0059] In step 43, the terminal device 11 transmits a packet, such as a heartbeat packet, to the remote device 12 via the valid path.
[0060] In step 44, the terminal device 11 receives a response to the packet from the remote device 12 via the valid path.
[0061] In step 45, the terminal device 11 calculates the round trip time of the packet, that is, the length of time from when the terminal device 11 sends the packet to when it receives the response, which is the delay time of the effective path.
[0062] In step 46, the terminal device 11 updates the priority of the valid path according to the delay time. Specifically, the terminal device 11 reorders all valid paths in the low delay queue according to the delay time of each valid path. After reordering, the valid path with the shortest delay time is located at the head of the low delay queue, that is, has the highest priority, and the valid path with the longest delay time is located at the tail of the low delay queue, that is, has the lowest priority.
[0063] For Figure 2For the valid path newly added to the low-latency queue in step 27, the terminal device 11 sets the delay time of the valid path to the maximum integer allowed by the operating system of the terminal device 11, and places the valid path at the tail end of the low-latency queue so that the newly added valid paths all have the lowest priority.
[0064] Taking high throughput service as an example, Figure 5 FIG. 1 is a flow chart of measuring the network throughput of an effective path according to a multi-path channel network connection method according to an embodiment of the present invention, that is, Figure 3 Flowchart of step 35 in FIG. Figure 3 The terminal device 11 will execute for the valid path selected in step 34. Figure 5 The network throughput of the effective path has a preset measurement time, such as ten seconds, and each time an effective path in the high-throughput queue is selected, its network throughput is measured only during this measurement time.
[0065] The following instructions Figure 5 The process, first, in step 51, the terminal device 11 accumulates the amount of data transmitted and received by the terminal device 11 through the effective path, and accumulates the duration of the terminal device 11 transmitting and receiving packets through the effective path, wherein the aforementioned data amount and duration are accumulated by combining transmission and reception.
[0066] In step 52, the terminal device 11 checks whether the measurement time of the valid path has ended. If so, the process proceeds to step 53. Otherwise, the process returns to step 51 to continue accumulating the aforementioned data volume and duration.
[0067] In step 53, the terminal device 11 checks whether the measurement is valid. If the data volume is greater than a preset threshold value and the duration is greater than another preset threshold value, the terminal device 11 determines that the measurement is valid, and the process proceeds to step 54. Otherwise, the terminal device 11 determines that the measurement is invalid, and the process proceeds to step 56.
[0068] In step 54, the terminal device 11 calculates the network throughput of the effective path. For example, the network throughput may be equal to the data volume divided by the duration.
[0069] In step 55, the terminal device 11 updates the priority of the valid path according to the network throughput. Specifically, the terminal device 11 reorders all valid paths in the high throughput queue according to the network throughput of each valid path. After reordering, the valid path with the maximum network throughput will be located at the head of the high throughput queue, that is, it has the highest priority, and the valid path with the minimum network throughput will be located at the tail of the high throughput queue, that is, it has the lowest priority.
[0070] For Figure 2 For the valid path newly added to the high-throughput queue in step 27, the terminal device 11 sets the network throughput of the valid path to the maximum integer allowed by the operating system of the terminal device 11, and places the valid path at the head of the high-throughput queue so that the newly added valid paths have the highest priority.
[0071] In step 56 , the terminal device 11 reduces the network throughput of the valid path by one, and then reorders all valid paths in the high throughput queue in the same manner as step 55 to lower the priority of the valid path.
[0072] In one embodiment, the present invention further provides a computer-readable storage medium, such as at least one centralized or decentralized memory, floppy disk, hard disk or optical disk. The computer-readable storage medium can store a plurality of instructions that can be read by the terminal device 11 and the remote device 12 to execute the multi-path channel network connection method described above.
[0073] Figure 1 In the application environment shown, two firewalls 13 and 14 are provided, but the present invention is not limited thereto. In another embodiment, one or both of the firewalls 13 and 14 may be omitted. Alternatively, only one firewall may be provided, and the terminal device 11 and the remote device 12 may be located inside the firewall. In yet another embodiment, the multi-path channel network connection system 10 may include a plurality of terminal devices 11 and / or a plurality of remote devices 12.
[0074] In summary, the technical solution of the present invention can establish a multi-path channel between a terminal device and a remote device, and can select a suitable path for the connection in the multi-path according to the type of service required by the connection initiated by the process, so as to improve the network service quality between the terminal device and the remote device.
[0075] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Any person skilled in the art may modify and alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be as set forth in the claims.
Claims
1. A multi-path channel network connection method, performed by at least one terminal device and at least one remote device, the method comprising the following steps: The terminal device collects a plurality of path information required for the terminal device to communicate with the remote device from the terminal device itself and a plurality of relay servers; The remote device collects a plurality of path information required for the remote device to connect to the terminal device from the remote device itself and the relay server; The terminal device and the remote device transmit the path information to each other through a channel server, so as to respectively pair the path information to obtain a plurality of candidate paths; Instructing the terminal device to check whether each candidate path can connect the terminal device and the remote device, so as to select a plurality of valid paths that can connect the terminal device and the remote device from the candidate paths, and to add each of the valid paths to each of a plurality of queues, wherein each of the queues corresponds to one of a plurality of service types; Instructing the terminal device to determine the priority of each valid path in each queue according to the service type corresponding to each queue; and The terminal device is caused to select a first valid path with the highest priority in the queue corresponding to the service type specified by the first connection initiated by at least one process executed by the terminal device, so that the at least one process and the remote device can transmit packets to each other through the first valid path.
2. The multi-path channel network connection method according to claim 1, wherein: The path information of the terminal device includes at least one local host address collected from the terminal device itself and at least one public address collected from the relay server, and / or the path information of the remote device includes at least one local host address collected from the remote device itself and at least one public address collected from the relay server.
3. The multi-path channel network connection method as claimed in claim 2, wherein: The local host address has a priority order before the public address, and one of the valid paths is a candidate path selected from the pairing of the local host address and the public address according to the priority order.
4. The multi-path channel network connection method according to claim 1, wherein: The path information of the terminal device includes the usage information of each relay server, and the path information of the remote device also includes the usage information of each relay server. For each relay server, the candidate path includes the network path connecting the terminal device and the remote device through the relay server.
5. The multi-path channel network connection method according to claim 1, wherein: For each candidate path, the multi-path channel network connection method further includes the following steps: The terminal device transmits at least one request to the remote device via the candidate path to check whether a response to each request from the remote device is received within a time limit, wherein if the terminal device receives the response to each request within the time limit, it is determined that the candidate path can connect the terminal device and the remote device.
6. The multi-path channel network connection method according to claim 1, wherein: At least one firewall is disposed between the terminal device and the remote device, and each of the effective paths is a network path that can pass through the at least one firewall to connect the terminal device and the remote device.
7. The multi-path channel network connection method according to claim 1, wherein: The service type of each queue has a corresponding quality value, and for each queue, the multi-path channel network connection method further includes the following steps: The terminal device is enabled to measure the quality value of each of the valid paths in the queue to determine the priority of the valid paths in the queue according to the quality value, wherein the priority of the valid paths in the queue is proportional to or inversely proportional to the quality value.
8. The multi-path channel network connection method according to claim 1, wherein: The method further comprises the steps of: The terminal device selects a second valid path with the highest priority in the queue corresponding to the service type specified by the second connection initiated by the at least one process, so that the at least one process and the remote device can transmit packets to each other through the second valid path, wherein the first connection and the second connection respectively specify different service types of different queues.
9. A computer-readable storage medium storing a plurality of instructions, wherein the instructions are read by a terminal device and a remote device to execute the multi-path channel network connection method according to any one of claims 1 to 8.
10. A multi-path channel network connection system, comprising: At least one terminal device, used to collect multiple path information required for the terminal device to communicate with the remote device from the terminal device itself and multiple relay servers; at least one remote device, used to collect, from the remote device itself and the relay server, a plurality of path information required for the remote device to connect to the terminal device; and One channel server, The terminal device and the remote device are further used to transmit the path information to each other through the channel server, so as to pair the path information to obtain multiple candidate paths. The terminal device is also used to: Checking whether each candidate path can connect the terminal device and the remote device, so as to select a plurality of valid paths that can connect the terminal device and the remote device from the candidate paths, and adding each of the valid paths to each of a plurality of queues, wherein each of the queues corresponds to one of a plurality of service types; Determining the priority of each valid path in each queue according to the service type corresponding to each queue; and A first valid path with the highest priority in the queue corresponding to the service type specified by the first connection initiated by at least one process executed by the terminal device is selected so that the at least one process and the remote device can mutually transmit packets through the first valid path.
