Remote terminal connection method, device, equipment and storage medium

By receiving the client's heartbeat packet and determining the target client group, and establishing only the TCP connection with the target client group, solving the problem of excessive server load, reducing server pressure and improving stability.

CN115550467BActive Publication Date: 2024-11-26SHANGHAI JINDUO YUCHEN WATER ENVIRONMENT ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211063283.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2024-11-26
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

In the prior art, when the server is connected to multiple clients, the server will be overloaded, which can easily cause the server to crash.

Method used

By receiving the heartbeat packet sent by the client, determine the target client and establish a TCP connection with the target client group, reducing unnecessary data processing and reducing server pressure.

Benefits of technology

It effectively reduces the load on the server, prevents crashes, and improves the stability and performance of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550467B_ABST
    Figure CN115550467B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of data interaction, and discloses a remote terminal connection method, device, equipment and storage medium. The method comprises: determining an identification client in each client group according to pre-stored client group information; receiving a heartbeat packet sent by each identification client; determining a target identification client according to the heartbeat packet; selecting a target client group where the target identification client is located from each client group; and establishing a TCP connection with each client to be connected in the target client group. Through the above-mentioned method, it is realized that only the heartbeat packet sent by the identification client is received and the target identification client is determined, and only a TCP connection is established with the client to be connected in the target client group, so that not all clients are connected, only the client group that needs to be called is connected, and interaction is performed with the identification client of each client group, which reduces the amount of data processing and reduces the pressure on the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data interaction technology, and in particular to a remote terminal connection method, device, equipment and storage medium. Background Art

[0002] Currently, in the interaction between the server and the client, data is transmitted mutually using the Transmission Control Protocol (TCP), which requires a TCP connection before business data transmission. Sometimes the server needs to actively send data to the terminal, but the TCP server cannot directly connect to the TCP client. Currently, some operations are implemented through a TCP long connection between the server and the terminal, but the number of devices is large and the data processing volume is large, which has a great impact on server performance and is prone to server crashes.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a remote terminal connection method, device, equipment and storage medium, aiming to solve the technical problem that the connection between a server and multiple clients in the prior art has a great impact on the performance of the server due to the heavy load.

[0005] To achieve the above object, the present invention provides a remote terminal method, the method comprising the following steps:

[0006] Determine the identified client in each client group according to the pre-stored client group information;

[0007] Receive heartbeat packets sent by each identification client;

[0008] Determine the target identification client according to the heartbeat packet;

[0009] Selecting a target client group where the target identified client is located from each client group;

[0010] Establish a TCP connection with each client to be connected in the target client group.

[0011] Optionally, before determining the identified client in each client group according to the pre-stored client group information, the method further includes:

[0012] Obtain client information of each client to be monitored;

[0013] Grouping the clients to be monitored according to the client information to obtain multiple client groups;

[0014] The client group information corresponding to each client group is determined according to the client information.

[0015] Optionally, the client devices to be monitored are grouped according to the client information to obtain a plurality of client groups, including:

[0016] Determine usage information and distribution information of each client to be monitored according to the client information;

[0017] According to the usage information and the distribution information, respectively, alternative usage groups and alternative distribution groups of each client to be monitored are obtained;

[0018] Get the grouping rules of the client group;

[0019] Selecting a target candidate group from the candidate usage group and the distribution candidate group according to the grouping rule of the client group;

[0020] Each client to be monitored is divided into a plurality of client groups according to the target candidate grouping.

[0021] Optionally, determining the identified client in each client group according to pre-stored client group information includes:

[0022] Determining the client information of the client to be monitored in each client group according to the client group information;

[0023] Determine identification information of each client to be monitored according to the client information;

[0024] Determine a client with an identification among the clients to be monitored according to the identification information;

[0025] The identified clients in each client group are determined according to the identified clients.

[0026] Optionally, establishing a TCP connection with each client to be connected in the target client group includes:

[0027] Determine a plurality of clients to be connected according to the target client group;

[0028] Determine the IP information of each client to be connected according to the heartbeat packet;

[0029] Establish a TCP connection with each client to be connected according to the IP information.

[0030] Optionally, establishing a TCP connection with each client to be connected according to the IP information includes:

[0031] Determine the IP address of each client to be connected according to the IP information;

[0032] Sending a connection instruction to each client to be connected according to the IP address, so that the client to be connected feeds back a connection initiation request;

[0033] In response to the connection initiation request, a TCP connection is established with each client to be connected.

[0034] Optionally, responding to the connection initiation request and establishing a TCP connection with each client to be connected includes:

[0035] When receiving the connection initiation request, determining the verification key information of each client to be connected according to the connection initiation request;

[0036] Compare and verify the verification key information of each client to be connected with the preset verification information to obtain a comparison and verification result;

[0037] The client to be connected whose verification result is verification failure is regarded as an unauthorized client;

[0038] Deleting the unauthorized client from the plurality of clients to be connected, to obtain an updated client to be connected;

[0039] Sending service data to the updated client to be connected, so as to establish a TCP connection with the updated client to be connected.

[0040] In addition, to achieve the above object, the present invention further provides a remote terminal device, the remote terminal device comprising:

[0041] An identification determination module, used to determine an identification client in each client group according to pre-stored client group information;

[0042] A heartbeat packet receiving module, used to receive heartbeat packets sent by each identification client;

[0043] A target determination module, used to determine a target identification client according to the heartbeat packet;

[0044] A group selection module, used to select a target client group where the target identified client is located from each client group;

[0045] The remote connection module is used to establish a TCP connection with each client to be connected in the target client group.

[0046] In addition, to achieve the above-mentioned purpose, the present invention also proposes a remote terminal device, which includes: a memory, a processor, and a remote terminal program stored in the memory and executable on the processor, wherein the remote terminal program is configured to implement the steps of the remote terminal method described above.

[0047] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a remote terminal program is stored, and when the remote terminal program is executed by a processor, the steps of the remote terminal method described above are implemented.

[0048] The present invention determines the identification client in each client group according to the pre-stored client group information; receives the heartbeat packet sent by each identification client; determines the target identification client according to the heartbeat packet; selects the target client group where the target identification client is located from each client group; and establishes a TCP connection with each client to be connected in the target client group. In this way, it is realized that only the heartbeat packet sent by the identification client is received and the target identification client is determined, and only the TCP connection is established with the client to be connected in the target client group, so that not all clients are connected, only the client group that needs to be called is connected, and interaction is performed with the identification client of each client group, which reduces the amount of data processing and reduces the pressure on the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of the structure of a remote terminal device in a hardware operating environment involved in an embodiment of the present invention;

[0050] Figure 2 It is a flowchart of the first embodiment of the remote terminal method of the present invention;

[0051] Figure 3 It is a flowchart of the second embodiment of the remote terminal method of the present invention;

[0052] Figure 4 It is a structural block diagram of the first embodiment of the remote terminal device of the present invention.

[0053] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0055] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a remote terminal device in a hardware operating environment according to an embodiment of the present invention.

[0056] like Figure 1As shown, the remote terminal device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0057] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the remote terminal device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0058] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a remote terminal program.

[0059] exist Figure 1 In the remote terminal device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the remote terminal device of the present invention can be set in the remote terminal device, and the remote terminal device calls the remote terminal program stored in the memory 1005 through the processor 1001, and executes the remote terminal method provided by the embodiment of the present invention.

[0060] The embodiment of the present invention provides a remote terminal method, referring to Figure 2 , Figure 2 The figure is a flowchart of a first embodiment of a remote terminal method of the present invention.

[0061] In this embodiment, the remote terminal method includes the following steps:

[0062] Step S10: determining the identified client in each client group according to the pre-stored client group information.

[0063] It should be noted that the execution subject of this embodiment is a server, which can be a physical server, a cloud server, or other devices that can establish a TCP connection with the client, and this embodiment does not limit this.

[0064] It should be understood that, currently, for the situation where a server is connected to multiple clients, a long connection is used to connect the server to multiple clients. However, this method will cause a large load on the server as the number of devices increases, and has a large impact on the server performance. In severe cases, it will cause the server to crash, thereby causing other losses. The solution of this embodiment only receives the heartbeat packet sent by the identification client and determines the target identification client, and only establishes a TCP connection with the client to be connected in the target client group, so that not all clients are connected, only the client group that needs to be called is connected, and the identification client of each client group is interacted with, which reduces the amount of data processing and reduces the pressure on the server.

[0065] In a specific implementation, the client group information refers to the relevant information of a plurality of groups into which a plurality of clients to be monitored are divided in advance, that is, the relevant information of a client group composed of a plurality of clients to be monitored.

[0066] It should be noted that the identification client refers to a client that has one and only one identification client in each client group and serves as an identification and representative of each client group. In each client group, only one identification client sends a heartbeat packet to the server.

[0067] Further, in order to determine the identified client, step S10 includes: determining the client information of the client to be monitored in each client group according to the client group information; determining the identification information of each client to be monitored according to the client information; determining the identified client in each client to be monitored according to the identification information; determining the identified client in each client group according to the identified client.

[0068] It should be understood that determining the identification information of each client to be monitored according to the client information means: confirming, according to the client information, whether the determination information of each client to be monitored has an identification, and using the determination information as flag information.

[0069] In a specific implementation, determining the identified clients among the clients to be monitored according to the identification information means: determining all the clients with identification among the clients to be monitored according to the identification information as the identified clients. The identification here can be any tag information or marking information for marking the client, and this embodiment does not limit this.

[0070] It should be noted that determining the identified client in each client group according to the identified client means: after the identified client is determined, determining whether there is and only one identified client in each client group. If there is no identified client in a client group, a client in the client group is randomly selected as the identified client; if there are multiple identified clients in the client group, one is selected as the identified client.

[0071] In this way, it is possible to set each client group to have only one marker client, thus preventing system errors.

[0072] Step S20: receiving the heartbeat packets sent by each identification client.

[0073] It should be understood that the heartbeat packet refers to a data packet sent by each marker client to the server within a periodic time, and the period for sending the heartbeat packet can be of any duration, for example: 30s, 1min, etc., which is not limited in this embodiment.

[0074] Step S30: Determine the target identification client according to the heartbeat packet.

[0075] In a specific implementation, after receiving the heartbeat packet, one of the identified clients is selected as the target identified client according to the information in the heartbeat packet.

[0076] It should be noted that the selection of the target identification client from the identification clients based on the heartbeat packet can be selected according to the user's needs. For example, when the heartbeat packet of a certain identification client is not sent according to the sending cycle, the identification client is used as the target identification client; or when the information and status of a certain client group need to be queried according to user needs, the identification client corresponding to the client group is used as the target identification client.

[0077] Step S40: Selecting a target client group where the target identified client is located from each client group.

[0078] It should be understood that after the target identified client is determined, the client group corresponding to the target identified client is selected from the client groups according to the pre-stored client group information as the target client group.

[0079] Step S50: Establishing a TCP connection with each client to be connected in the target client group.

[0080] In a specific implementation, after the target client group is confirmed, a plurality of clients to be connected are determined, and then a TCP connection is established with each client to be connected according to the IP information of the client to be connected.

[0081] Furthermore, in order to establish a TCP connection with the client to be connected, step S50 includes: determining multiple clients to be connected according to the target client group; determining IP information of each client to be connected according to the heartbeat packet; and establishing a TCP connection with each client to be connected according to the IP information.

[0082] It should be noted that the clients to be connected refer to all clients in the target client group that can perform TCP connection, and here refer to all clients in the target client group.

[0083] It should be understood that after the client to be connected is determined, the relevant information of the IP address of each client to be connected is obtained according to the information in the heartbeat packet as IP information, and finally a TCP connection is established with the client to be connected according to the IP information.

[0084] In this way, all the clients to be connected and the IP information of the clients to be connected can be accurately determined according to the target client group and the heartbeat packet, so that a TCP connection can be established with the clients to be connected.

[0085] Furthermore, in order to establish a TCP connection based on the IP information, the step of establishing a TCP connection with each client to be connected based on the IP information includes: determining the IP address of each client to be connected based on the IP information; sending a connection instruction to each client to be connected based on the IP address, so that the client to be connected feeds back a connection initiation request; and establishing a TCP connection with each client to be connected in response to the connection initiation request.

[0086] In a specific implementation, after obtaining the IP address of each client to be connected, a connection instruction is sent to each client to be connected according to the IP address. After receiving the connection instruction, the client to be connected will feedback a connection initiation request according to the connection instruction, and send the connection initiation request to the server. The connection instruction and the connection initiation request can be any form and any type of instruction and request that can realize the corresponding function, and this embodiment does not limit this.

[0087] It should be noted that after receiving the connection initiation request, the server can establish a TCP connection with the client to be connected corresponding to the connection initiation request. Since the server cannot actively connect to the client, the client needs to send a connection initiation request.

[0088] In this way, it is achieved to interact with each client to be connected according to the IP address of the client to be connected, so that the client to be connected initiates a connection request with the server, thereby establishing a TCP connection, so that the TCP connection can be established more quickly.

[0089] Furthermore, in order to perform verification when establishing a TCP connection, the step of establishing a TCP connection with each client to be connected in response to the connection initiation request includes: when the connection initiation request is received, determining the verification key information of each client to be connected according to the connection initiation request; comparing and verifying the verification key information of each client to be connected with preset verification information to obtain a comparison verification result; treating the client to be connected for which the comparison verification result is a verification failure as an unauthorized client; deleting the unauthorized client from the multiple clients to be connected to obtain an updated client to be connected; and sending business data to the updated client to be connected to establish a TCP connection with the updated client to be connected.

[0090] It should be understood that after the server receives the connection initiation request, it sends verification key information to the server from which the connection initiation request came. The verification key information is information for determining whether each client to be connected has the authority to connect to the TCP connection. It can be any information that can achieve this function, and this embodiment does not limit this.

[0091] In a specific implementation, the preset verification information refers to information pre-stored in the server for verifying the connection authority of the client.

[0092] It should be noted that the comparison verification result is whether the verification key information for verification fed back by each client to be connected is consistent with the preset verification information. If they are consistent, the comparison verification result of the client to be connected is determined to be successful, otherwise it is a failed verification.

[0093] It should be understood that after all the clients to be connected that have failed verification are regarded as unauthorized clients, the clients to be connected are screened according to the unauthorized clients to obtain updated clients to be connected. At this time, the updated clients to be connected do not include unauthorized clients.

[0094] In a specific implementation, after obtaining the updated client to be connected, the service data is sent to the updated client to be connected, thereby establishing a TCP connection. The service data refers to all data required for establishing a TCP connection, which is not limited in this embodiment.

[0095] In this way, it is possible to filter out authorized clients from the clients to be connected and then establish a connection, thereby preventing security problems caused by unauthorized clients in the target client group.

[0096] This embodiment determines the identification client in each client group according to the pre-stored client group information; receives the heartbeat packet sent by each identification client; determines the target identification client according to the heartbeat packet; selects the target client group where the target identification client is located from each client group; and establishes a TCP connection with each client to be connected in the target client group. In this way, it is realized that only the heartbeat packet sent by the identification client is received and the target identification client is determined, and only the TCP connection is established with the client to be connected in the target client group, so that not all clients are connected, only the client group that needs to be called is connected, and interaction is performed with the identification client of each client group, which reduces the amount of data processing and reduces the pressure on the server.

[0097] refer to Figure 3 , Figure 3 It is a flowchart diagram of a second embodiment of a remote terminal method of the present invention.

[0098] Based on the first embodiment, the remote terminal method of this embodiment further includes, before step S10:

[0099] Step S101: Acquire client information of each client to be monitored.

[0100] It should be noted that the client information refers to the client address, number and other related information of the client to be monitored. The client to be monitored refers to all the clients that can be monitored corresponding to the server of the execution subject of this embodiment, or the pre-set clients that need to establish TCP connection or are being monitored.

[0101] Step S102: grouping the clients to be monitored according to the client information to obtain a plurality of client groups.

[0102] It should be understood that after the client information is obtained, all the clients to be monitored are divided into several small groups, namely client groups, according to the client information. The number of client groups can be any number, which is not limited in this embodiment.

[0103] Furthermore, in order to obtain flexible client groups according to different grouping criteria, step S102 includes: determining the usage information and distribution information of each client to be monitored according to the client information; obtaining alternative usage groupings and alternative distribution groupings of each client to be monitored according to the usage information and the distribution information; obtaining the grouping rules of the client groups; selecting target alternative groupings from the alternative usage groupings and the distribution alternative groupings according to the grouping rules of the client groups; and dividing each client to be monitored into multiple client groups according to the target alternative groupings.

[0104] In a specific implementation, the usage information refers to the information related to the usage and function of each client to be monitored. The distribution information refers to the information related to the geographical location or distribution location corresponding to each client to be monitored.

[0105] It should be noted that obtaining alternative usage groups and alternative distribution groups for each monitored client according to the usage information and the distribution information means: grouping the monitored clients according to the usage information to obtain alternative usage groups, and then grouping the monitored clients according to the distribution information to obtain alternative distribution groups.

[0106] It should be understood that the grouping rules may be rules set by the user and stored in advance, and may be usage grouping and distribution grouping, or three kinds of grouping rules set by the user.

[0107] In a specific implementation, selecting a target candidate group from the alternative purpose group and the distribution candidate group according to the grouping rule of the client group means: when the grouping rule is purpose grouping, the alternative purpose group is used as the target candidate group; when the grouping rule is distribution grouping, the alternative distribution group is used as the target candidate group.

[0108] It should be noted that, after the target candidate group is determined, all the clients to be monitored are grouped according to the grouping rule of the target candidate group, ie, the clients included in each group, to obtain multiple client groups.

[0109] In this way, the grouping of client groups is made more accurate and flexible to meet different needs.

[0110] Step S103: Determine the client group information corresponding to each client group according to the client information.

[0111] It should be understood that after the client groups are determined, the client information of the clients to be monitored in each client group is aggregated and counted to obtain the client group information corresponding to each client group.

[0112] This embodiment obtains the client information of each client to be monitored; groups each client to be monitored according to the client information to obtain multiple client groups; and determines the client group information corresponding to each client group according to the client information. In this way, the client to be monitored is grouped according to the client information, and the client information is obtained, so that the subsequent operations of identifying the client, receiving the heartbeat packet, and establishing the TCP connection can be based on the grouping, without connecting all the clients, reducing the pressure on the server.

[0113] In addition, an embodiment of the present invention further provides a storage medium, on which a remote terminal program is stored. When the remote terminal program is executed by a processor, the steps of the remote terminal method described above are implemented.

[0114] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0115] Reference Figure 4 , Figure 4 It is a structural block diagram of the first embodiment of the remote terminal device of the present invention.

[0116] like Figure 4 As shown, the remote terminal device proposed in the embodiment of the present invention includes:

[0117] The identification determination module 10 is used to determine the identification client in each client group according to the pre-stored client group information.

[0118] The heartbeat packet receiving module 20 is used to receive the heartbeat packets sent by each identification client.

[0119] The target determination module 30 is used to determine the target identification client according to the heartbeat packet.

[0120] The group selection module 40 is used to select a target client group where the target identified client is located from each client group.

[0121] The remote connection module 50 is used to establish a TCP connection with each client to be connected in the target client group.

[0122] This embodiment determines the identification client in each client group according to the pre-stored client group information; receives the heartbeat packet sent by each identification client; determines the target identification client according to the heartbeat packet; selects the target client group where the target identification client is located from each client group; and establishes a TCP connection with each client to be connected in the target client group. In this way, it is realized that only the heartbeat packet sent by the identification client is received and the target identification client is determined, and only the TCP connection is established with the client to be connected in the target client group, so that not all clients are connected, only the client group that needs to be called is connected, and interaction is performed with the identification client of each client group, which reduces the amount of data processing and reduces the pressure on the server.

[0123] In one embodiment, the identification determination module 10 is further used to obtain client information of each client to be monitored; group each client to be monitored according to the client information to obtain multiple client groups; and determine client group information corresponding to each client group according to the client information.

[0124] In one embodiment, the identification determination module 10 is further used to determine the usage information and distribution information of each client to be monitored based on the client information; obtain alternative usage grouping and alternative distribution grouping of each client to be monitored based on the usage information and the distribution information; obtain the grouping rule of the client group; select the target alternative grouping from the alternative usage grouping and the distribution alternative grouping according to the grouping rule of the client group; and divide each client to be monitored into multiple client groups according to the target alternative grouping.

[0125] In one embodiment, the identification determination module 10 is further used to determine the client information of the client to be monitored in each client group according to the client group information; determine the identification information of each client to be monitored according to the client information; determine the identified client in each client to be monitored according to the identification information; determine the identified client in each client group according to the identified client.

[0126] In one embodiment, the remote connection module 50 is further used to determine multiple clients to be connected according to the target client group; determine the IP information of each client to be connected according to the heartbeat packet; and establish a TCP connection with each client to be connected according to the IP information.

[0127] In one embodiment, the remote connection module 50 is also used to determine the IP address of each client to be connected based on the IP information; send a connection instruction to each client to be connected based on the IP address, so that the client to be connected feeds back a connection initiation request; and establish a TCP connection with each client to be connected in response to the connection initiation request.

[0128] In one embodiment, the remote connection module 50 is also used to determine the verification key information of each client to be connected according to the connection initiation request when the connection initiation request is received; compare and verify the verification key information of each client to be connected with the preset verification information to obtain a comparison verification result; regard the client to be connected for which the comparison verification result is a verification failure as an unauthorized client; delete the unauthorized client from the multiple clients to be connected to obtain an updated client to be connected; and send business data to the updated client to be connected to establish a TCP connection with the updated client to be connected.

[0129] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0130] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0131] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the remote terminal method provided in any embodiment of the present invention, and will not be repeated here.

[0132] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0133] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0135] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A remote terminal connection method, characterized in that: The remote terminal connection method comprises: Determine the identification client in each client group according to the pre-stored client group information, wherein if there is no identified client in a client group, randomly select a client in the client group as the identification client, and if there are multiple identified clients in the client group, select one as the identification client; Receive heartbeat packets sent by each identification client; Determine the target identification client according to the heartbeat packet; Selecting a target client group where the target identified client is located from each client group; Establish a TCP connection with each client to be connected in the target client group.

2. The method according to claim 1, characterized in that Before determining the identified client in each client group according to the pre-stored client group information, the method further includes: Obtain client information of each client to be monitored; Grouping the clients to be monitored according to the client information to obtain multiple client groups; The client group information corresponding to each client group is determined according to the client information.

3. The method according to claim 2, characterized in that The client devices to be monitored are grouped according to the client device information to obtain a plurality of client device groups, including: Determine usage information and distribution information of each client to be monitored according to the client information; According to the usage information and the distribution information, respectively, alternative usage groups and alternative distribution groups of each client to be monitored are obtained; Get the grouping rules of the client group; Selecting a target candidate group from the candidate usage group and the candidate distribution group according to the grouping rule of the client group; Each client to be monitored is divided into a plurality of client groups according to the target candidate grouping.

4. The method according to claim 2, characterized in that The step of determining the identified client in each client group according to the pre-stored client group information includes: Determining the client information of the client to be monitored in each client group according to the client group information; Determine identification information of each client to be monitored according to the client information; Determine a client with an identification among the clients to be monitored according to the identification information; The identified clients in each client group are determined according to the identified clients.

5. The method according to claim 1, characterized in that The step of establishing a TCP connection with each client to be connected in the target client group includes: Determine a plurality of clients to be connected according to the target client group; Determine the IP information of each client to be connected according to the heartbeat packet; Establish a TCP connection with each client to be connected according to the IP information.

6. The method according to claim 5, characterized in that The step of establishing a TCP connection with each client to be connected according to the IP information includes: Determine the IP address of each client to be connected according to the IP information; Sending a connection instruction to each client to be connected according to the IP address, so that the client to be connected feeds back a connection initiation request; In response to the connection initiation request, a TCP connection is established with each client to be connected.

7. The method according to claim 6, characterized in that The step of responding to the connection initiation request and establishing a TCP connection with each client to be connected includes: When receiving the connection initiation request, determining the verification key information of each client to be connected according to the connection initiation request; Compare and verify the verification key information of each client to be connected with the preset verification information to obtain a comparison and verification result; The client to be connected whose verification result is verification failure is regarded as an unauthorized client; Deleting the unauthorized client from the plurality of clients to be connected, to obtain an updated client to be connected; Sending service data to the updated client to be connected, so as to establish a TCP connection with the updated client to be connected.

8. A remote terminal connection device, characterized in that: The remote terminal connection device comprises: An identification determination module, used to determine the identification client in each client group according to the pre-stored client group information, wherein if there is no identified client in a client group, a client in the client group is randomly selected as the identification client, and if there are multiple identified clients in the client group, one is selected as the identification client; A heartbeat packet receiving module, used to receive heartbeat packets sent by each identification client; A target determination module, used to determine a target identification client according to the heartbeat packet; A group selection module, used to select a target client group where the target identified client is located from each client group; The remote connection module is used to establish a TCP connection with each client to be connected in the target client group.

9. A remote terminal connection device, characterized in that: The device comprises: a memory, a processor, and a remote terminal connection program stored in the memory and executable on the processor, wherein the remote terminal connection program is configured to implement the remote terminal connection method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a remote terminal connection program, and when the remote terminal connection program is executed by the processor, the remote terminal connection method according to any one of claims 1 to 7 is implemented.