CN108616914B - Method and device for reconnection of broken line - Google Patents

Method and device for reconnection of broken line Download PDF

Info

Publication number
CN108616914B
CN108616914B CN201810310818.1A CN201810310818A CN108616914B CN 108616914 B CN108616914 B CN 108616914B CN 201810310818 A CN201810310818 A CN 201810310818A CN 108616914 B CN108616914 B CN 108616914B
Authority
CN
China
Prior art keywords
mobile terminal
client
monitoring module
network
reconnection
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
CN201810310818.1A
Other languages
Chinese (zh)
Other versions
CN108616914A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810310818.1A priority Critical patent/CN108616914B/en
Publication of CN108616914A publication Critical patent/CN108616914A/en
Application granted granted Critical
Publication of CN108616914B publication Critical patent/CN108616914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a method for reconnection of broken lines, which comprises the following steps: in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client. The invention realizes the technical effects of clear processing logic, system burden reduction and reconnection speed improvement when disconnection reconnection is carried out. Meanwhile, the invention also discloses a device for reconnection after disconnection.

Description

Method and device for reconnection of broken line
Technical Field
The invention relates to the technical field of mobile interconnection, in particular to a method and a device for disconnecting and reconnecting a line.
Background
With the development of mobile internet technology, 4G networks have become widely popular, and the speed of surfing the internet of mobile terminals (e.g., smart phones) is faster and faster, people are also used to play network games using the mobile internet.
The disconnection reconnection is a technology frequently used in network games, when a mobile phone is disconnected, a game client loses contact with a game server (namely, disconnection), and then the game client and the game server need to be reestablished, namely, disconnection reconnection.
At present, when disconnection reconnection is performed, the disconnection reconnection is mainly realized based on a broadcast message issued by a mobile phone system. However, when the mobile phone is disconnected from the network, the mobile phone system will continuously send three broadcast messages, and two of the broadcast messages are the same, which may cause confusion of the processing logic of the game client, and the game client needs to establish two reconnection operations, and then the previous one is discarded, which is certainly meaningless, and also reduces the reconnection speed and increases the burden of the system.
Disclosure of Invention
The embodiment of the application provides a method and a device for reconnection of broken lines, so that the technical problems that processing logic is disordered, reconnection speed is low and system burden is heavy when the broken lines are reconnected in the prior art are solved, and the technical effects that the processing logic is clear, the system burden is reduced and the reconnection speed is improved when the broken lines are reconnected are realized.
In a first aspect, the present application provides the following technical solutions through an embodiment of the present application:
a method of disconnection reconnection comprising:
in the networking process of a client and a server, monitoring the network state of a mobile terminal through a monitoring module, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client;
when the network of the mobile terminal is found to be abnormal, a preset message is sent to a system of the mobile terminal through the monitoring module;
receiving the preset message through a reconnection module, and judging whether the network of the mobile terminal is normal or not based on the preset message, wherein the reconnection module is arranged in the client;
and if the network of the mobile terminal is recovered to be normal, reestablishing the network connection between the client and the server through the reconnection module.
Preferably, the monitoring the network status of the mobile terminal by the monitoring module includes:
monitoring the broadcast message issued by the system through a monitoring module, and determining that the network of the mobile terminal is abnormal if a first preset broadcast message is received; or
And monitoring the socket connection between the client and the server through a monitoring module, and determining that the network of the mobile terminal is abnormal if the socket connection is disconnected.
Preferably, the sending a preset message to the system of the mobile terminal through the monitoring module includes:
and sending the preset message to a system of the mobile terminal through the monitoring module at every preset time interval before the network of the mobile terminal is recovered to normal.
Preferably, the preset time period is 2-4 seconds.
Preferably, the sending the preset message to the system of the mobile terminal through the monitoring module includes:
sending the preset message to a system of the mobile terminal through the communication monitoring module based on a handle message processing mechanism; or
And sending the preset message to a system of the mobile terminal through broadcasting by the monitoring module.
Preferably, the preset message is an empty message.
In a second aspect, the present application provides the following technical solutions according to an embodiment of the present application:
a device for disconnection reconnection comprising:
the monitoring module is used for monitoring the network state of the mobile terminal in the process of networking a client and a server, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, sending a preset message to a system of the mobile terminal;
the reconnection module is used for receiving the preset message and judging whether the network of the mobile terminal is normal or not based on the preset message, wherein the reconnection module is arranged in the client; and if the network of the mobile terminal is recovered to be normal, reestablishing the network connection between the client and the server.
Preferably, the monitoring module is specifically configured to:
monitoring a broadcast message issued by the system, and determining that the network of the mobile terminal is abnormal if a first preset broadcast message is received; or monitoring the socket connection between the client and the server, and if the socket connection is found to be disconnected, determining that the network of the mobile terminal is abnormal.
In a third aspect, the present application provides the following technical solutions through an embodiment of the present application:
an apparatus for disconnection reconnection comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
in the networking process of a client and a server, monitoring the network state of a mobile terminal through a monitoring module, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, a preset message is sent to a system of the mobile terminal through the monitoring module; receiving the preset message through a reconnection module, and judging whether the network of the mobile terminal is normal or not based on the preset message, wherein the reconnection module is arranged in the client; and if the network of the mobile terminal is recovered to be normal, reestablishing the network connection between the client and the server through the reconnection module.
In a fourth aspect, the present application provides the following technical solutions according to an embodiment of the present application:
a computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
in the networking process of a client and a server, monitoring the network state of a mobile terminal through a monitoring module, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, a preset message is sent to a system of the mobile terminal through the monitoring module; receiving the preset message through a reconnection module, and judging whether the network of the mobile terminal is normal or not based on the preset message, wherein the reconnection module is arranged in the client; and if the network of the mobile terminal is recovered to be normal, reestablishing the network connection between the client and the server through the reconnection module.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
in the embodiment of the application, a method for disconnecting and reconnecting is disclosed, which comprises the following steps: in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client. Because the broadcasting information issued by the mobile phone system is not relied when the disconnection reconnection is carried out, the confusion of the processing logic is avoided, the reconnection is not required to be established twice, the reconnection speed is further improved, and the system burden is reduced. Therefore, the technical problems of disordered processing logic, low reconnection speed and heavy system burden existing in the disconnection reconnection in the prior art are solved, and the technical effects of clear processing logic, system burden reduction and reconnection speed improvement in the disconnection reconnection are achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flowchart of a method for reconnection after disconnection in an embodiment of the present application;
FIG. 2 is a block diagram of an apparatus for disconnecting and reconnecting a wire in an embodiment of the present application;
FIG. 3 is a block diagram of an apparatus for disconnecting and reconnecting a wire in an embodiment of the present application;
fig. 4 is a block diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method and a device for reconnection of broken lines, so that the technical problems that processing logic is disordered, reconnection speed is low and system burden is heavy when the broken lines are reconnected in the prior art are solved, and the technical effects that the processing logic is clear, the system burden is reduced and the reconnection speed is improved when the broken lines are reconnected are realized.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
a method of disconnection reconnection comprising: in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example one
The embodiment provides a method for reconnection after disconnection, which is applied to a mobile terminal, where the mobile terminal may be a smart phone, a tablet computer, a game machine, and the like, and the specific type of the mobile terminal is not particularly limited in this embodiment. An operating system (e.g., an Android system or an IOS system) is installed in the mobile terminal, and a client is installed on the operating system, where an execution main body of the disconnection reconnection method in this embodiment is the client.
As shown in fig. 1, the method for disconnecting and reconnecting a disconnection includes:
step S101: in the process of networking the client and the server, the monitoring module monitors the network state of the mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client.
In the implementation process, the client may be a (network) game client, and when the user uses the mobile terminal to play a network game, the client needs to be networked with a server (e.g., a game proxy server). Or the client can also be a client of a live network platform (for example, a live fish platform), and a user can open the client and live game pictures through the live network platform while playing games.
In the specific implementation process, two modules (namely, a monitoring module and a reconnection module) are arranged in the client, and the two modules can run through different threads. The monitoring module is responsible for monitoring the network state of the mobile terminal, and the reconnection module is responsible for reestablishing connection with the server when the client and the server are disconnected.
As an optional embodiment, the monitoring module monitors a network status of the mobile terminal, including:
and the monitoring module monitors the socket connection between the client and the server, and if the socket connection is found to be disconnected, the network of the mobile terminal is determined to be abnormal.
In the implementation process, the mobile terminal is connected to a mobile network connection (for example, a 3G network or a 4G network) of a mobile operator (for example, "connected", or "mobile", or "telecom"), but because the mobile network has an area with incomplete coverage, the mobile terminal is prone to network outage in the area.
In the specific implementation process, the monitoring module is responsible for monitoring the network state of the mobile terminal. Specifically, the monitoring module can monitor the socket connection between the client and the server, and in the game process, the socket of the client and the socket of the server are in a connection state, so long as the mobile terminal is disconnected, the socket connection is disconnected, and the socket reports an error, at this time, the monitoring module can know that the socket is disconnected according to the error reporting information, and then know that the network of the mobile terminal is abnormal.
Step S102: when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to the system of the mobile terminal.
As an optional embodiment, the sending, by the listening module, a preset message to the system of the mobile terminal includes:
before the network of the mobile terminal is recovered to normal (i.e. when the network of the mobile terminal is abnormal), the monitoring module may send a preset message to the system of the mobile terminal every other preset time period.
In a specific implementation process, the monitoring module may create a handle object based on a handle message processing mechanism in the Android system, and send a preset message to the system of the mobile terminal every other preset time period by using the handle object; or, the monitoring module may also send a preset message to the system of the mobile terminal once every preset time period in a broadcast manner. Here, since the reconnection module and the monitoring module run in different threads, a handle mechanism or a broadcast mode is adopted, and cross-thread message transmission can be achieved.
In a specific implementation process, the value range of the preset time is as follows: 2 seconds to 4 seconds (e.g., 2 seconds, or 3 seconds, or 4 seconds, etc.). Here, if the frequency is too high, the system load is too heavy, and too high frequency is not meaningful; if the frequency is too low, the reconnection speed is too slow, which may cause great influence on the game operation and may not be good for the user. Preferably 3 seconds, the method can realize quick reconnection, reduce the influence on game operation, ensure that the user is reconnected when not detecting (or just detecting) the disconnection, and simultaneously can not increase the system burden.
In a specific implementation process, the preset message may be an appointment message, and preferably, the preset message may be an empty message, so that the data volume of the message may be reduced, and the message sending and receiving speed may be increased.
For example, the listening module may send an empty message to the system of the mobile terminal every 3 seconds before the network of the mobile terminal returns to normal.
Step S103: and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message.
In the specific implementation process, each time the reconnection module receives the preset message (for example, an empty message), it will try to reestablish a network connection (i.e., a socket connection) with the server, if the reconnection is possible, the network representing the mobile terminal is normal, the client may normally communicate with the server, if the reconnection is not possible, the network representing the mobile terminal is still abnormal, it is necessary to continue to wait for the next 3 seconds, and after receiving the preset message, it reestablishes a network connection with the server.
In the embodiment, when the disconnection reconnection is carried out, the broadcast message is issued without depending on the system, so that the confusion of processing logic is avoided, two reconnection operations do not need to be established, the reconnection speed is further improved, and the system burden is reduced.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
in the embodiment of the application, a method for disconnecting and reconnecting is disclosed, which comprises the following steps: in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client. Because the broadcasting information issued by the mobile phone system is not relied when the disconnection reconnection is carried out, the confusion of the processing logic is avoided, the reconnection is not required to be established twice, the reconnection speed is further improved, and the system burden is reduced. Therefore, the technical problems of disordered processing logic, low reconnection speed and heavy system burden existing in the disconnection reconnection in the prior art are solved, and the technical effects of clear processing logic, system burden reduction and reconnection speed improvement in the disconnection reconnection are achieved.
Example two
Based on the same inventive concept, the present embodiment provides an apparatus 200 for disconnecting and reconnecting a wire, as shown in fig. 2, comprising:
a monitoring module 201, configured to monitor a network state of a mobile terminal in a process of networking a client and a server, where the client is installed on a system of the mobile terminal, and the monitoring module is disposed in the client; when the network of the mobile terminal is found to be abnormal, sending a preset message to a system of the mobile terminal;
a reconnection module 202, configured to receive the preset message, and reestablish a network connection between the client and the server based on the preset message, where the reconnection module is disposed in the client.
As an optional embodiment, the monitoring module 201 is specifically configured to:
monitoring socket connection between the client and the server, and if the socket connection is found to be disconnected, determining that the network of the mobile terminal is abnormal.
As an optional embodiment, the monitoring module 201 is specifically configured to:
and sending the preset message to the system of the mobile terminal once every other preset time period before the network of the mobile terminal is recovered to normal.
As an optional embodiment, the preset time period is: 2-4 seconds.
As an optional embodiment, the monitoring module 201 is specifically configured to:
based on a handle message processing mechanism, sending the preset message to a system of the mobile terminal; or sending the preset message to a system of the mobile terminal in a broadcasting mode.
As an alternative embodiment, the preset message is an empty message.
Since the apparatus for disconnecting and reconnecting described in this embodiment is an apparatus used for implementing the method for disconnecting and reconnecting in this embodiment, based on the method for disconnecting and reconnecting described in this embodiment, a person skilled in the art can understand a specific implementation manner of the apparatus for disconnecting and reconnecting in this embodiment and various variations thereof, and therefore, how to implement the method in this embodiment by the apparatus for disconnecting and reconnecting is not described in detail herein. The scope of the present application is intended to be covered by the claims so long as those skilled in the art can implement the method for disconnecting and reconnecting the disconnection in the embodiments of the present application.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
in the embodiment of the application, a device for disconnecting and reconnecting a wire is disclosed, which comprises: the monitoring module is used for monitoring the network state of the mobile terminal in the process of networking a client and a server, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, sending a preset message to a system of the mobile terminal; and the reconnection module is used for receiving the preset message and reestablishing the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client. Because the broadcasting information issued by the mobile phone system is not relied when the disconnection reconnection is carried out, the confusion of the processing logic is avoided, the reconnection is not required to be established twice, the reconnection speed is further improved, and the system burden is reduced. Therefore, the technical problems of disordered processing logic, low reconnection speed and heavy system burden existing in the disconnection reconnection in the prior art are solved, and the technical effects of clear processing logic, system burden reduction and reconnection speed improvement in the disconnection reconnection are achieved.
EXAMPLE III
Based on the same inventive concept, as shown in fig. 3, the present embodiment provides an apparatus 300 for disconnection reconnection, which includes a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320, where the processor 320 executes the computer program 311 to implement the following steps:
in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client.
In particular implementation, when the processor 320 executes the computer program 311, any one of the first embodiment may be implemented.
Example four
Based on the same inventive concept, as shown in fig. 4, the present embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored, the computer program 411 implementing the following steps when being executed by a processor:
in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client.
In a specific implementation, the computer program 411 may implement any one of the first embodiment when executed by a processor.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. A method of reconnecting a broken wire, comprising:
in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client;
when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal to realize cross-thread message transmission, and the method comprises the following steps: before the network of the mobile terminal is recovered to normal, the monitoring module sends the preset message to the system of the mobile terminal once every other preset time period;
and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client.
2. The method for disconnection and reconnection according to claim 1, wherein the monitoring module monitors the network status of the mobile terminal, and comprises:
the monitoring module monitors socket connection between the client and the server, and if the socket connection is found to be disconnected, it is determined that the network of the mobile terminal is abnormal.
3. The method for disconnecting and reconnecting according to claim 1, wherein the predetermined period of time is 2 to 4 seconds.
4. The method of claim 1, wherein the monitoring module sends a predetermined message to the system of the mobile terminal, comprising:
the monitoring module sends the preset message to a system of the mobile terminal based on a handle message processing mechanism; or
And the monitoring module sends the preset message to a system of the mobile terminal in a broadcasting mode.
5. The method for disconnection and reconnection as claimed in any one of claims 1 to 4, wherein said predetermined message is a null message.
6. A device for reconnecting a broken wire, comprising:
the monitoring module is used for monitoring the network state of the mobile terminal in the process of networking a client and a server, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, sending a preset message to a system of the mobile terminal to realize cross-thread message transmission, wherein the cross-thread message transmission comprises the following steps: before the network of the mobile terminal is recovered to normal, the monitoring module sends the preset message to the system of the mobile terminal once every other preset time period;
and the reconnection module is used for receiving the preset message and reestablishing the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client.
7. The apparatus for disconnecting and reconnecting according to claim 6, wherein the monitoring module is specifically configured to:
monitoring socket connection between the client and the server, and if the socket connection is found to be disconnected, determining that the network of the mobile terminal is abnormal.
8. An apparatus for reconnection for a disconnection, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of:
in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal to realize cross-thread message transmission, and the method comprises the following steps: before the network of the mobile terminal is recovered to normal, the monitoring module sends the preset message to the system of the mobile terminal once every other preset time period; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of:
in the process of networking a client and a server, a monitoring module monitors the network state of a mobile terminal, wherein the client is installed on a system of the mobile terminal, and the monitoring module is arranged in the client; when the network of the mobile terminal is found to be abnormal, the monitoring module sends a preset message to a system of the mobile terminal to realize cross-thread message transmission, and the method comprises the following steps: before the network of the mobile terminal is recovered to normal, the monitoring module sends the preset message to the system of the mobile terminal once every other preset time period; and the reconnection module receives the preset message and reestablishes the network connection between the client and the server based on the preset message, wherein the reconnection module is arranged in the client.
CN201810310818.1A 2018-03-30 2018-03-30 Method and device for reconnection of broken line Active CN108616914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810310818.1A CN108616914B (en) 2018-03-30 2018-03-30 Method and device for reconnection of broken line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810310818.1A CN108616914B (en) 2018-03-30 2018-03-30 Method and device for reconnection of broken line

Publications (2)

Publication Number Publication Date
CN108616914A CN108616914A (en) 2018-10-02
CN108616914B true CN108616914B (en) 2021-09-07

Family

ID=63659962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810310818.1A Active CN108616914B (en) 2018-03-30 2018-03-30 Method and device for reconnection of broken line

Country Status (1)

Country Link
CN (1) CN108616914B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109347966B (en) * 2018-10-31 2021-08-03 许继集团有限公司 Server cluster communication method, terminal equipment and communication server
CN109783227B (en) * 2018-12-13 2023-06-20 平安科技(深圳)有限公司 Task allocation method, device and system and computer readable storage medium
CN109756392B (en) * 2018-12-13 2022-05-17 深圳壹账通智能科技有限公司 Task processing method, device, equipment and computer readable storage medium
CN109815056A (en) * 2019-01-22 2019-05-28 珠海格力电器股份有限公司 Realize method, apparatus, storage medium and the equipment of message queue reconnection
CN109618012B (en) * 2019-02-21 2021-10-15 腾讯科技(深圳)有限公司 Method, device, terminal and storage medium for establishing connection
CN111385287A (en) * 2020-02-20 2020-07-07 视联动力信息技术股份有限公司 Network reconnection method and device for service system
CN114827240A (en) * 2022-06-30 2022-07-29 成都云智北斗科技有限公司 Network disconnection reconnection method and system
CN116055227B (en) * 2023-03-31 2023-06-16 北京国信会视科技有限公司 Intelligent terminal management and control method, system and device based on android device online security

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1700660A (en) * 2005-07-01 2005-11-23 倚天资讯股份有限公司 Automatic reconnection method when disconnecting from server
US7219223B1 (en) * 2002-02-08 2007-05-15 Cisco Technology, Inc. Method and apparatus for providing data from a service to a client based on encryption capabilities of the client
CN101163113A (en) * 2006-10-12 2008-04-16 阿里巴巴公司 Disconnection reconnecting system and method of instant communication
CN101605108A (en) * 2009-07-15 2009-12-16 阿里巴巴集团控股有限公司 A kind of method, system and device of instant messaging
CN107172060A (en) * 2017-06-06 2017-09-15 武汉票据交易中心有限公司 A kind of login method of client container

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7219223B1 (en) * 2002-02-08 2007-05-15 Cisco Technology, Inc. Method and apparatus for providing data from a service to a client based on encryption capabilities of the client
CN1700660A (en) * 2005-07-01 2005-11-23 倚天资讯股份有限公司 Automatic reconnection method when disconnecting from server
CN101163113A (en) * 2006-10-12 2008-04-16 阿里巴巴公司 Disconnection reconnecting system and method of instant communication
CN101605108A (en) * 2009-07-15 2009-12-16 阿里巴巴集团控股有限公司 A kind of method, system and device of instant messaging
CN107172060A (en) * 2017-06-06 2017-09-15 武汉票据交易中心有限公司 A kind of login method of client container

Also Published As

Publication number Publication date
CN108616914A (en) 2018-10-02

Similar Documents

Publication Publication Date Title
CN108616914B (en) Method and device for reconnection of broken line
CN110855792B (en) Message pushing method, device, equipment and medium
CN106851799B (en) Method and device for sending heartbeat packet in long connection
CN110166791B (en) Connection establishing method, device, equipment and storage medium
CN110266810B (en) Message receiving method, device and storage medium based on MQTT protocol
CN112738548B (en) Streaming media scheduling method, device, equipment and storage medium
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
CN112272291B (en) Video storage method, device, management equipment and readable storage medium
CN109962827B (en) Equipment link detection method, device, equipment and readable storage medium
CN104796473A (en) Cross-platform information push method and cross-platform information push system
CN108650667A (en) Terminal scheduling method and apparatus
CN113114778A (en) Data transmission method and device, electronic equipment and storage medium
CN111541555A (en) Group chat optimization method and related product
CN111884875A (en) Offline device determination method and device
CN113840269B (en) Multimedia data transmission method and device, electronic equipment and storage medium
EP2879354B1 (en) Webrtc communication method and corresponding user equipment
CN112839106A (en) Communication method and apparatus, electronic device, and medium
CN110224872B (en) Communication method, device and storage medium
JP6275882B2 (en) Method for switching monitoring frequency channel number by access terminal and access terminal
CN113014544B (en) Method and device for establishing centerless media link based on webRtc
CN114697339A (en) Load balancing method and device under centralized architecture
CN110474807A (en) A kind of log processing method and device
CN112333690A (en) Data transmission method, device, storage medium, terminal and network access point equipment
CN112333823A (en) VR (virtual reality) resource transmission method and system for intelligent education based on cloud computing
CN116185912B (en) Industrial bus load balancing method, device, equipment and medium of ECAT coupler

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