CN114422571B - Quantum communication client disconnection reconnection system and method - Google Patents

Quantum communication client disconnection reconnection system and method Download PDF

Info

Publication number
CN114422571B
CN114422571B CN202111673824.1A CN202111673824A CN114422571B CN 114422571 B CN114422571 B CN 114422571B CN 202111673824 A CN202111673824 A CN 202111673824A CN 114422571 B CN114422571 B CN 114422571B
Authority
CN
China
Prior art keywords
client
reconnection
server
connection
heartbeat
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111673824.1A
Other languages
Chinese (zh)
Other versions
CN114422571A (en
Inventor
程广明
王建刚
周维源
郭邦红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Quantum Communication Guangdong Co Ltd
Original Assignee
National Quantum Communication Guangdong Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National Quantum Communication Guangdong Co Ltd filed Critical National Quantum Communication Guangdong Co Ltd
Priority to CN202111673824.1A priority Critical patent/CN114422571B/en
Publication of CN114422571A publication Critical patent/CN114422571A/en
Application granted granted Critical
Publication of CN114422571B publication Critical patent/CN114422571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/70Photonic quantum communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention discloses a system and a method for disconnecting reconnection of a quantum communication client, wherein the client of the method adopts a TCP transmission control protocol to establish connection I with a server; the client detects the connection state of the client and the service break by adopting a heartbeat mechanism: when the connection state is abnormal, judging the connection disconnection reason by adopting a logic judging method; then the client starts automatic reconnection; and enabling remote control by the client after the automatic reconnection fails. The invention adopts a dynamic mode to automatically reconnect the client, the time interval of the reconnection heartbeat packet can adapt to the change of the network, and reconnection operation is not limited to be completed within a period of time, but is carried out for a plurality of times, thereby effectively coping with the situation that the connection is missed after the restart of the server; logic judgment is adopted in the reconnection process, and network abnormal information is obtained and judged; disconnection reconnection of the client is realized through remote control, and the application range and the scene are expanded.

Description

Quantum communication client disconnection reconnection system and method
Technical Field
The invention relates to the field of quantum communication and quantum network, in particular to a system and a method for disconnecting reconnection of a quantum communication client.
Background
In the existing quantum communication and classical communication technical scheme, when the network connection is judged and automatically restarted, the following steps are generally adopted: establishing connection through TCP three-way handshake; determining the current network connection state; and performing network reconnection according to the determined current network connection state.
The connection mode established by the TCP three-way handshake is as follows: the client sends a connection request SYN to the server, the server receives a response request, returns SYN+ACK, receives the SYN+ACK back check information sent by the server, and sends ACK to the server if successful, and formally establishes network connection after the server receives the SYN+ACK.
The conventional implementation steps of the network reconnection are as follows:
starting a timing task and periodically sending a heartbeat packet; updating the local time after receiving the response of the server; a timing task periodically detects whether the local time exceeds a threshold; if the number exceeds the threshold, the server is considered to have a fault and needs reconnection. The reconnection execution unit is further configured to, if a predetermined number of reconnections is reached: and determining reconnection failure and ending reconnection.
The above prior art has the following disadvantages:
after connection is established, a KeepAlive mechanism of TCP is used for detecting the network connection state in real time, and a certain network and CPU burden is provided;
during normal communication, more data and information cannot be acquired on the basis of a heartbeat mechanism, and the data and the information are only used as detection packets;
no further diagnosis of the abnormal cause is made for the abnormal state of the network connection;
when reconnecting, a more sound heartbeat mechanism is not provided, and reconnection needs to be realized through the heartbeat mechanism in a period of time.
Accordingly, there is a need for further improvements over existing quantum communication and quantum network technologies.
Disclosure of Invention
In order to solve the technical problems, a system and a method for acquiring the quantum classical fusion network abnormality diagnosis cause and disconnecting reconnection of a dynamic client are provided.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
the utility model provides a quantum communication customer end disconnection reconnection system, includes connection module, heartbeat detection module, logic judgement module, automatic reconnection module and remote control module, wherein:
the connection module establishes connection between the client and the server by adopting a TCP transmission control protocol;
the heartbeat detection module detects the connection state of the client and the server by adopting a heartbeat mechanism;
the logic judging module adopts a logic judging method to judge the connection and disconnection reasons of the client and the server;
the automatic reconnection module starts the client to automatically reconnect with the server according to the disconnection reason analyzed by the logic judgment module;
the remote control module is used for carrying out remote control reconnection under the condition of automatic reconnection failure.
A method for disconnecting a reconnection of a quantum communication client, the method comprising the steps of:
step 1: the client establishes a connection I with the server by adopting a TCP transmission control protocol;
step 2: the client detects the connection state of the client and the service break by adopting a heartbeat mechanism:
if the connection is normal, the server returns state information to the client; if the connection is closed, jumping to the step 3;
step 3: judging the reason of disconnection by adopting a logic judging method:
step 3-1: inquiring state identification information which is stored in the client and is sent by the last time of server, and if the identification information contains the identification of the automatic closing connection of the server, determining that the reason of the abnormality is that the server automatically closes the connection by the client;
step 3-2: if the identification information is the identification of the normal operation of the server, the client confirms whether the client is down or network failure;
step 3-3: network access is carried out on nearby equipment, if the network access is successful, the service end is considered to be down, if the network access is failed, the abnormal cause is confirmed to be network failure, and the step 4 is skipped;
step 4: the client enables automatic reconnection, which comprises the following steps:
step 4-1: the client acquires the following parameters according to the reconnected configuration file: the maximum times N of heartbeat packets, the total times threshold M of reconnection, the cooling time interval T1 of reconnection and the time interval T2 of heartbeat packets at each reconnection are used for generating a connection request program logic according to the 4 parameters;
step 4-2: the client terminal reconnection operation according to the acquired parameter value process: sending a heartbeat packet at intervals T1 of every heartbeat packet, stopping sending the heartbeat packet when the heartbeat packet sent by the client reaches the maximum number N of reconnection heartbeat packets each time, entering cooling time, and if the server feeds back a response before the maximum number N of heartbeat packets is reached, reconnecting successfully;
step 4-3: if the server side does not feed back the response before the maximum number of times N of the heartbeat packet is reached, setting the maximum number of times N+1 of the heartbeat packet after the cooling time T1 is exceeded, and if the maximum number of times N+1 of the reconnection times is not reached, jumping to the step 4-2;
step 4-4: when the reconnection times exceeds the total reconnection times threshold M, the reconnection operation is stopped by the client and the step 5 is skipped;
step 5: the client enables remote control:
step 5-1: the client establishes a new connection II in a mode of adopting the step 1 through the IP and MAC addresses of the nearby server;
step 5-2: when the second connection is successfully established, the client reports the reason of the abnormal connection to the system through the adjacent server and requests to remotely control the client;
step 5-3: the server side remotely controls the client side through SSH, and sends a heartbeat packet of an SSH request to the client side through local configuration of the server side by a heartbeat mechanism;
step 5-4: if the client receives the heartbeat packet, responding to the server, establishing an SSH request to start password-based security verification, and inputting a verification account number password to remotely control the SSH;
step 5-5: the configuration of the client is modified through remote control, the connection server object of the client is customized, and a new connection is established for normal operation.
Preferably, in the step 1, the client sends a connection establishment request to the target server in a form of "three-way handshake".
Preferably, in the step 1, when the client establishes a connection with the server, a unique socket is stored, and the socket stores the IP address and the port number information of the server.
Preferably, the response return signal received by the server includes at least the status identifier of the server, IP, port, IP and MAC information of the neighboring server.
Preferably, the maximum number of times N of reconnection heartbeat packets is 600-800.
Preferably, the maximum number of times N of reconnection heartbeat packets is 720.
Preferably, the value of the reconnection total number threshold M is in the range of 5-10.
Preferably, the value range of the reconnection total number threshold M is 6.
Preferably, the value of the cooling time interval T1 of each reconnection ranges from 0.5 to 1 hour.
Preferably, the value range of the heartbeat packet time interval T2 is 5-20 seconds.
The beneficial technical effects of the invention are as follows: the invention adopts a dynamic mode to automatically reconnect the client, the time interval of the reconnection heartbeat packet can adapt to the change of the network, and reconnection operation is not limited to be completed within a period of time, but is carried out for a plurality of times, thereby effectively coping with the situation that the connection is missed after the restart of the server; logic judgment is adopted in the reconnection process, and network abnormal information is obtained and judged; disconnection reconnection of the client is realized through remote control, so that the application range and the scene are expanded, and the method can be applied to quantum communication and quantum network.
Drawings
FIG. 1 is a schematic block diagram of a quantum communication client disconnect reconnection system of the present invention;
FIG. 2 is a flow chart of steps of a method for disconnecting a reconnection of a quantum communication client according to the present invention;
FIG. 3 is a flow chart of a heartbeat mechanism of a method for disconnecting a reconnection of a quantum communication client;
FIG. 4 is a logic anomaly determination flow chart of a method for disconnecting a reconnection of a quantum communication client;
fig. 5 is a flowchart of a method for disconnecting a reconnection of a quantum communication client from an automatic reconnection of a client in the present invention.
Detailed Description
The present invention will be further described in detail with reference to the following examples, for the purpose of making the objects, technical solutions and advantages of the present invention more apparent, but the scope of the present invention is not limited to the following specific examples.
As shown in fig. 1, a quantum communication client disconnection reconnection system includes a connection module, a heartbeat detection module, a logic judgment module, an automatic reconnection module and a remote control module, wherein:
the connection module establishes connection between the client and the server by adopting a TCP transmission control protocol;
the heartbeat detection module detects the connection state of the client and the server by adopting a heartbeat mechanism;
the logic judging module adopts a logic judging method to judge the connection and disconnection reasons of the client and the server;
the automatic reconnection module starts the client to automatically reconnect with the server according to the disconnection reason analyzed by the logic judgment module;
the remote control module is used for carrying out remote control reconnection under the condition of automatic reconnection failure.
The specific implementation manner of each module in the system of the embodiment is consistent with the following method of disconnecting reconnection method of a quantum communication client.
As shown in fig. 2-5, a method for disconnecting a reconnection of a quantum communication client, the method comprising the steps of:
step 1: the client establishes a first connection with the server by adopting a TCP transmission control protocol, and the detailed steps of establishing the first connection are as follows;
step 1-2: the client and the server send a connection establishment request to the target server in a three-way handshake mode. The three-way handshake protocol refers to that three interactions are needed between the server and the client in the preparation phase of sending data: first handshake: the client SENDs SYN packet (syn=j) (SYN packet is a handshake used when the TCP/IP establishes connection) to the server, and enters a SYN_SEND (actively sent connection establishment request state) state, and waits for confirmation of the server; second handshake: the server receives the SYN packet, and must confirm the SYN (ack=j+1) of the client, and at the same time, send a SYN packet (syn=k), that is, a syn+ack packet, where the server enters a syn_recv (syn_recv refers to a state when the server passively opens, receives the SYN of the client and sends an ACK); third handshake: the client receives the syn+ack packet from the server, and sends an acknowledgement packet ACK (ack=k+1) (ACK is an acknowledgement character, and in data communication, the receiving station sends a transmission type control character to the sending station), and after the packet is sent, the client and the server enter an ESTABLISHED state (a connection state is ESTABLISHED, which indicates that two machines are communicating), three handshakes are completed, and once the network connection is ESTABLISHED, the client and the server can start data transmission.
Step 1-2: the server receives the connection establishment request and responds to the return message, the client receives the feedback message and checks the message, communication connection is established with the server after the check is successful, and the network connection adopts TCP long connection.
The heartbeat cycle is entered after the communication connection is established. In this embodiment, the client uses an application layer heartbeat mechanism, which is also called a heartbeat packet, which is a periodic signal, and detects whether the behavior is normal or not or is consistent with the computer system in a form of hardware or software, and a general rule is that: the heartbeat packet is sent every few seconds between machines, and if the receiving terminal does not receive the heartbeat packet within a designated time (typically, within a time interval of sending a few heartbeat packets), the sending terminal will be determined to have failed to send.
In this embodiment, four parameters are configured on the client: timing detection time interval, maximum duration when idle connection is allowed, maximum number of heartbeat packets in each detection, and time interval of each heartbeat packet in detection. The client sends heartbeat packets and timing time intervals to the server at regular time according to the configuration information, four parameters can be flexibly customized according to the burden capacity of the system, the idle maximum duration defaults to 2 hours, the maximum heartbeat packet number defaults to 720, the heartbeat packet time interval is 10 seconds initially (the heartbeat packets are sent out at the beginning to be just 2 hours), and then the heartbeat packet time interval is dynamically modified through RTT round trip delay. The heartbeat mechanism realized by the client through the configuration is used as the detection of long connection and real-time monitoring.
At the initial moment of each heartbeat cycle in the normal communication period, the client side can send a heartbeat packet to the server side, the state and the availability of network connection are detected, the state and other information of the server side are obtained, the server side receives the heartbeat packet response and feeds back the heartbeat packet response to the client side, the client side enters a timing detection time interval, and the client side enters the next heartbeat cycle after the interval time is finished. And when the connection is abnormal, the client side diagnoses the network state, the abnormal reason and automatic reconnection through a heartbeat mechanism.
Step 2: in the process of communication between a client and a server, the client adopts a heartbeat mechanism to detect the connection state of the client and the server in real time: if the connection is normal, the server returns state information to the client; the response return state information received by the server at least comprises the state identification of the server, IP, port, IP and MAC information of the adjacent server.
Specifically, based on TCP, the client can identify different requests, and when each connection is established, the client will store a unique socket (a socket is an abstraction of an endpoint that performs bidirectional communication between application processes on different hosts in the network), where the socket stores information such as an IP address and a port number of the server. Through this socket, the client can send information to the designated party.
During normal communication, after receiving the heartbeat packet sent by the client for detecting the connection state, the server returns information including the state identifier of the server, the IP, the port, the IP, the MAC and the like of the neighboring server in response. The information is added in a response packet returned by the server after the client sends the heartbeat packet each time, the client stops sending the heartbeat packet when receiving the response packet and stores information about the server in the response packet, then the client sends a confirmation packet, and the server stops sending the response packet after receiving the confirmation packet.
Meanwhile, the client records RTT round trip delay in each heartbeat sending period, and dynamically modifies configuration parameters of a client heartbeat mechanism by the average value thereof, namely, the time interval of each heartbeat packet during detection. RTT round trip delay is determined by three parts: the propagation time at the link, the processing time at the end system, and the queuing and processing time in the router's cache. Wherein the values of the first two parts are relatively fixed as a TCP connection, and the queuing and processing time in the router's cache changes with the overall network congestion level, so that the change in RTT reflects the change in network congestion level to some extent. And the client acquires the RTT of each heartbeat packet, and continuously adjusts according to the state of the network change, so that the adaptability and the fault tolerance of the network are improved. The method and the device avoid that when a specific network peak appears in certain daily time periods, the heartbeat packets sent by the client side at constant heartbeat packet intervals reach the maximum value without obtaining the response of the server side, and the client side is mistakenly a network fault.
If the connection is closed, jumping to the step 3;
when the server is down or actively closed, the connection is idle for a while, when the idle time exceeds the maximum time allowed by configuration, the client enters the next heartbeat period, and the client detects the connection state according to the heartbeat packet time interval of each time of detection of the parameter in the heartbeat mechanism configuration file of the client, wherein the parameter is generally 10-45 seconds in actual development, and is firstly 10 seconds in the embodiment, and then is dynamically set through Round Trip Time (RTT), and the heartbeat packet is sent to the server at intervals.
Before reaching the maximum value of the heartbeat packet, (the range of the maximum number of times N of reconnecting the heartbeat packet is 600-800, and the preferred value in the embodiment is 720), if the service end receives the heartbeat packet and responds after restarting or starting the connection through manual operation during the period, the client end establishes a new connection with the service end and waits for the next heartbeat sending period again. If the server side does not make a corresponding request to the heartbeat packet during the period, the client side confirms that the connection of the server side is abnormal, and the step 3 is skipped.
Step 3: judging the reasons of disconnection and abnormal connection by adopting a logic judging method:
step 3-1: inquiring state identification information which is stored in the client and is sent by the last time of server, and if the identification information contains the identification of the automatic closing connection of the server, determining that the reason of the abnormality is that the server automatically closes the connection by the client;
step 3-2: if the identification information is the identification of the normal operation of the server, the client confirms whether the client is down or network failure;
step 3-3: network access is carried out on nearby equipment, if the network access is successful, the service end is considered to be down, if the network access is failed, the abnormal cause is confirmed to be network failure, and the step 4 is skipped;
step 4: the client enables automatic reconnection, which comprises the following steps:
step 4-1: the client acquires the following parameters according to the reconnected configuration file: the maximum times N of heartbeat packets, the total times threshold M of reconnection, the cooling time interval T1 of reconnection and the time interval T2 of heartbeat packets at each reconnection are used for generating a connection request program logic according to the 4 parameters; the value range of the reconnection total frequency threshold M is 5-10, preferably 6; the value range of each reconnection cooling time interval T1 is 0.5-1 hour; the value range of the heartbeat packet time interval T2 is 5-20 seconds.
In general, the maximum number of times of the heartbeat packet is 720 times in each reconnection; the total reconnection frequency threshold is within 6 times (adding the total cooling time, controlling to realize automatic reconnection in about half a day, if the automatic reconnection fails, turning to remote control reconnection, and controlling the total reconnection within 1 day to reduce service loss); the cooling time interval of each reconnection is 0.5 to 1 hour; the heartbeat packet time interval takes the modified value under the condition of RTT dynamic modification, and takes the default 10 seconds (and automatically reconnects each maximum heartbeat packet to form a heartbeat period of 2 hours).
Step 4-2: the client terminal reconnection operation according to the acquired parameter value process: sending a heartbeat packet at intervals T1 of every heartbeat packet, stopping sending the heartbeat packet when the heartbeat packet sent by the client reaches the maximum number N of reconnecting the heartbeat packet each time, entering cooling time, reducing the load of the client, and simultaneously avoiding that all connection times are executed in a period of time, namely the server is restarted successfully just after connection is finished and the connection is missed; if the server feeds back a response before the maximum number N of heartbeat packets is reached, reconnection is successful;
step 4-3: if the server side does not feed back the response before the maximum number of times N of the heartbeat packet is reached, setting the maximum number of times N+1 of the heartbeat packet after the cooling time T1 is exceeded, and if the maximum number of times N+1 of the reconnection times is not reached, jumping to the step 4-2;
step 4-4: when the reconnection times exceeds the total reconnection times threshold M, the reconnection operation is stopped by the client and the step 5 is skipped;
step 5: the client enables remote control:
step 5-1: the client establishes a new connection II according to the step 1 through the IP and MAC addresses of the nearby server;
step 5-2: when the second connection is successfully established, the client reports the reason of the abnormal connection to the system through the adjacent server and requests to remotely control the client;
step 5-3: the server side remotely controls the client side through SSH, and sends a heartbeat packet of an SSH request to the client side through local configuration of the server side by a heartbeat mechanism; the parameters of the local configuration are mainly: a transmission heartbeat time interval, a heartbeat packet threshold, a request cooling time interval, and a maximum number of attempted connections. The parameter value and the specific connection mechanism refer to the step 4, and the client enables automatic reconnection.
Step 5-4: if the client receives the heartbeat packet, responding to the server, establishing an SSH request to start password-based security verification, and inputting a verification account number password to remotely control the SSH;
step 5-5: the configuration of the client is modified through remote control, the connection server object of the client is customized, and a new connection is established for normal operation.
Variations and modifications to the above would be obvious to persons skilled in the art to which the invention pertains from the foregoing description and teachings. Therefore, the invention is not limited to the specific embodiments disclosed and described above, but some modifications and changes of the invention should be also included in the scope of the claims of the invention. In addition, although specific terms are used in the present specification, these terms are for convenience of description only and do not constitute any limitation on the invention.

Claims (9)

1. The utility model provides a quantum communication client disconnection reconnection system which characterized in that, including connection module, heartbeat detection module, logic judgement module, automatic reconnection module and remote control module, wherein:
the connection module establishes connection between the client and the server by adopting a TCP transmission control protocol;
the heartbeat detection module detects the connection state of the client and the server by adopting a heartbeat mechanism;
the logic judging module adopts a logic judging method to judge the connection and disconnection reasons of the client and the server;
the automatic reconnection module starts the client to automatically reconnect with the server according to the disconnection reason analyzed by the logic judgment module;
the remote control module is used for carrying out remote control reconnection under the condition of automatic reconnection failure;
the step of enabling the remote control reconnection by the client is as follows:
step 5-1: the client establishes a new second connection with the server by adopting a TCP transmission control protocol through an IP address and an MAC address of the adjacent server;
step 5-2: when the second connection is successfully established, the client reports the reason of abnormal connection to the system through the adjacent server and requests to remotely control the client;
step 5-3: the server side remotely controls the client side through SSH, and sends a heartbeat packet of an SSH request to the client side through local configuration of the server side by a heartbeat mechanism;
step 5-4: if the client receives the heartbeat packet, responding to the server, establishing an SSH request to start password-based security verification, and inputting a verification account number password to remotely control the SSH;
step 5-5: the configuration of the client is modified through remote control, the connection server object of the client is customized, and a new connection is established for normal operation.
2. A method for disconnecting and reconnecting a quantum communication client, wherein the method for disconnecting and reconnecting a quantum communication client according to claim 1 comprises the steps of:
step 1: the client establishes a connection I with the server by adopting a TCP transmission control protocol;
step 2: the client detects the connection state of the client and the server by adopting a heartbeat mechanism:
if the connection is normal, the server returns state information to the client; if the connection is closed, jumping to the step 3;
step 3: judging the reason of disconnection by adopting a logic judging method;
step 4: according to the disconnection reason, the client starts automatic reconnection, and the method comprises the following steps:
step 4-1: the client acquires the following parameters according to the reconnected configuration file: the maximum times N of heartbeat packets, the total times threshold M of reconnection, the cooling time interval T1 of reconnection and the time interval T2 of heartbeat packets at each reconnection are used for generating a connection request program logic according to the 4 parameters;
step 4-2: the client performs reconnection operation according to the acquired parameter values: sending a heartbeat packet at intervals T2 of every heartbeat packet, stopping sending the heartbeat packet when the heartbeat packet sent by the client reaches the maximum number N of reconnection heartbeat packets each time, entering cooling time, and if the server feeds back a response before the maximum number N of heartbeat packets is reached, reconnecting successfully;
step 4-3: if the server side does not feed back the response before reaching the maximum number N of heartbeat packets, setting the maximum number of heartbeat packets to be N+1 after exceeding the cooling time T1, and jumping to the step 4-2 if the reconnection number does not exceed the reconnection total number threshold M;
step 4-4: when the reconnection times exceeds the total reconnection times threshold M, the reconnection operation is stopped by the client and the step 5 is skipped;
step 5: the client enables remote control for reconnection.
3. The method for disconnecting and reconnecting a quantum communication client according to claim 2, wherein the step 3 of determining the reason for the disconnection comprises the steps of:
step 3-1: inquiring state identification information which is stored in the client and is sent by the last time of server, and if the identification information contains the identification of the automatic closing connection of the server, determining that the reason of the abnormality is that the server automatically closes the connection by the client;
step 3-2: if the identification information is the identification of the normal operation of the server, the client confirms whether the client is down or network failure;
step 3-3: and (4) performing network access on the adjacent equipment, if the network access is successful, considering the adjacent equipment as a server terminal downtime, and if the network access is failed, confirming that the abnormal cause is a network failure, and jumping to the step (4).
4. The method for disconnecting a reconnection of a quantum communication client according to claim 2, wherein the client in step 1 sends a request for establishing a connection to a target server in the form of a "three-way handshake".
5. The method for disconnecting and reconnecting a quantum communication client according to claim 2, wherein in step 1, when the client establishes a connection with a server, a unique socket is stored, and the socket stores the IP address and port number information of the server.
6. The method for disconnecting a quantum communication client according to claim 5, wherein the state information returned from the server to the client includes at least a state identifier of the server, IP, port, IP and MAC information of the neighboring server.
7. The method for disconnecting a reconnection of a quantum communication client according to claim 2, wherein the maximum number of times N of reconnection of the heartbeat packet is in a range of 600-800.
8. The method for disconnecting a reconnection of a quantum communication client according to claim 2, wherein the maximum number N of reconnection heartbeat packets has a value of 720;
the value range of the reconnection total number threshold M is 5-10.
9. The method for disconnecting reconnection of a quantum communication client according to claim 2, wherein the value of the total number of reconnections threshold M is 6;
the value range of each reconnection cooling time interval T1 is 0.5-1 hour; the value range of the heartbeat packet time interval T2 is 5-20 seconds.
CN202111673824.1A 2021-12-31 2021-12-31 Quantum communication client disconnection reconnection system and method Active CN114422571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111673824.1A CN114422571B (en) 2021-12-31 2021-12-31 Quantum communication client disconnection reconnection system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111673824.1A CN114422571B (en) 2021-12-31 2021-12-31 Quantum communication client disconnection reconnection system and method

Publications (2)

Publication Number Publication Date
CN114422571A CN114422571A (en) 2022-04-29
CN114422571B true CN114422571B (en) 2023-08-11

Family

ID=81272190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111673824.1A Active CN114422571B (en) 2021-12-31 2021-12-31 Quantum communication client disconnection reconnection system and method

Country Status (1)

Country Link
CN (1) CN114422571B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190160A (en) * 2022-05-25 2022-10-14 杭州脸脸会网络技术有限公司 Screen-off monitoring method and device for screen equipment, electronic device and storage medium
CN115766823A (en) * 2022-10-26 2023-03-07 浪潮软件股份有限公司 Method and system for realizing disconnection reconnection of terminal APP and server based on TCP
CN117527638A (en) * 2024-01-05 2024-02-06 未势能源科技有限公司 Communication detection method, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7386610B1 (en) * 2000-09-18 2008-06-10 Hewlett-Packard Development Company, L.P. Internet protocol data mirroring
CN103685241A (en) * 2013-11-26 2014-03-26 中国科学院计算技术研究所 Adaptive heartbeat method and adaptive heartbeat system for maintaining long connection of TCP (transmission control protocol)
WO2016180175A1 (en) * 2015-08-11 2016-11-17 中兴通讯股份有限公司 Method, system and device for realizing online charging
CN106303702A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 Connection status inspection method, device and intelligent television system
US9591083B1 (en) * 2005-11-23 2017-03-07 Avaya Inc. Method and apparatus providing connection recovery for a chat client
CN111193769A (en) * 2019-11-25 2020-05-22 泰康保险集团股份有限公司 Method, system, device, electronic equipment and storage medium for recovering long connection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9438448B2 (en) * 2009-08-18 2016-09-06 Microsoft Technology Licensing, Llc Maintaining communication connections during temporary network disruptions

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7386610B1 (en) * 2000-09-18 2008-06-10 Hewlett-Packard Development Company, L.P. Internet protocol data mirroring
US9591083B1 (en) * 2005-11-23 2017-03-07 Avaya Inc. Method and apparatus providing connection recovery for a chat client
CN103685241A (en) * 2013-11-26 2014-03-26 中国科学院计算技术研究所 Adaptive heartbeat method and adaptive heartbeat system for maintaining long connection of TCP (transmission control protocol)
CN106303702A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 Connection status inspection method, device and intelligent television system
WO2016180175A1 (en) * 2015-08-11 2016-11-17 中兴通讯股份有限公司 Method, system and device for realizing online charging
CN111193769A (en) * 2019-11-25 2020-05-22 泰康保险集团股份有限公司 Method, system, device, electronic equipment and storage medium for recovering long connection

Also Published As

Publication number Publication date
CN114422571A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN114422571B (en) Quantum communication client disconnection reconnection system and method
US10649866B2 (en) Method and apparatus for indirectly assessing a status of an active entity
CN113472606B (en) Heartbeat overtime detection method, server and electronic equipment
US8212396B2 (en) Apparatus power restart method in response to network connection status
CN100553213C (en) A kind of method and apparatus of WLAN abnormal quick restoring
CA2706579C (en) Method for enabling faster recovery of client applications in the event of server failure
CN101714991B (en) Method for realizing heartbeat mechanism
JP4503934B2 (en) Server computer protection device, server computer protection method, server computer protection program, and server computer
WO2014040466A1 (en) Method and device for controlling ap
CN111147573A (en) Data transmission method and device
CN107454184B (en) Method for establishing stable network connection between Android client and server
CN107508916B (en) Server link management method for intelligent robot
JPH10336178A (en) Connection management method and management system
CN115022384B (en) HSMS communication connection method and device
CN113691591B (en) Data transmission method, device and computer readable storage medium
CN116028278A (en) Main/standby dual-machine switching method, medium and system
CN114143904B (en) CPE management method based on 5G fusion network shunt
CN113746710B (en) Relay gateway control system and method based on intelligent central control system
CN111356017B (en) Video monitoring network equipment keep-alive method and device
TWI394402B (en) Network detecting device and method of network quality detecting thereof
CN114500216A (en) Device and method for remote management and maintenance through network
JP3465183B2 (en) Network monitoring method
CN114205405B (en) BFD message sending method and device, electronic equipment and storage medium
CN111049741A (en) Method for improving communication reliability, communication system and terminal equipment
JP3666412B2 (en) Communications system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant