CN108075947B - Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity - Google Patents

Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity Download PDF

Info

Publication number
CN108075947B
CN108075947B CN201710639737.1A CN201710639737A CN108075947B CN 108075947 B CN108075947 B CN 108075947B CN 201710639737 A CN201710639737 A CN 201710639737A CN 108075947 B CN108075947 B CN 108075947B
Authority
CN
China
Prior art keywords
mobile terminal
timer
communication connection
usb hub
packet
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
CN201710639737.1A
Other languages
Chinese (zh)
Other versions
CN108075947A (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.)
Beijing Weein Software Technology Co ltd
Original Assignee
Beijing Weein Software 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 Beijing Weein Software Technology Co ltd filed Critical Beijing Weein Software Technology Co ltd
Priority to CN201710639737.1A priority Critical patent/CN108075947B/en
Publication of CN108075947A publication Critical patent/CN108075947A/en
Application granted granted Critical
Publication of CN108075947B publication Critical patent/CN108075947B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • 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

Abstract

The invention relates to a maintenance method and a system for connectivity of storage equipment, a PC end and communication connection, wherein the maintenance method comprises the following steps: the PC end sequentially and respectively sends a detection message packet to each mobile terminal in communication connection with the PC end according to a trigger instruction of a preset trigger mechanism; the PC terminal starts corresponding timers for each mobile terminal receiving the message detection packet while sending the detection message packet, when the PC terminal receives the response packet fed back by the mobile terminal corresponding to the timer within the preset time limit of the certain timer, the PC terminal deletes the timer, and when the timing of the certain timer exceeds the preset time limit, the PC terminal sends a communication connection request to the mobile terminal corresponding to the timer. By the embodiment of the invention, the interrupted communication connection between the PC end and the mobile terminal can be timely recovered, so that a program in the mobile terminal serving as a server end is not required to be always in an operation state so as to monitor the socket port of the client end to monitor the communication connectivity between the PC end and the mobile terminal.

Description

Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity
Technical Field
The invention belongs to the field of computer networks, and particularly relates to a maintenance method and a system for connectivity of storage equipment, a PC (personal computer) end and communication connection.
Background
Android debug bridge (Android Debug Bridge, abbreviated as ADB) is a means for establishing communication connection between Android (Android) equipment and PC (Personal Computer ).
The working principle of ADB is: by listening to ports such as Socket TCP 5554, a communication connection is established between the electronic integrated drive (Integrated Drive Electronics, abbreviated IDE) and Qemu. By default, the ADB will daemon (daemon) on the relevant network port. Thus, when a user runs a program of a type such as Eclipse, the ADB process runs automatically.
If an Android device (such as a mobile phone) and a PC end are to be connected, an ADB driver is required. Specifically, if the mobile phone is to be debugged and managed by a personal computer, an ADB kit needs to be installed in advance.
When a mobile phone and a PC end are establishing a socket-based two-way communication connection to realize passing through the PC end, the mobile phone is usually controlled to serve as a server end (server socket) and the PC end serves as a client end (client socket).
Specifically, in order to establish a communication connection between a mobile phone and a PC terminal based on an ADB socket port, a server terminal needs to run a socket communication program, so that the server terminal constantly monitors the socket port of a certain client terminal, and waits for a connection application of the client terminal to establish a bidirectional communication connection. Therefore, in the communication connection mode based on the socket port, the server side actively waits for the arrival of a connection application.
When a bidirectional communication connection is established by using a socket port, a program at the server side can run a plurality of threads so as to communicate with a plurality of clients simultaneously. And, a plurality of clients can also realize communication connection between each through the server side. The method for establishing the bidirectional communication connection by utilizing the socket port is flexible, so that the method is suitable for some complex communication modes. However, when a bidirectional communication connection is established by using the socket port, the program of the server must be always in an operating state to monitor the socket port of the client.
However, according to long-term experiments of the inventor, it is sometimes required that the PC and the mobile phone are in a long connection state, that is, the communication connection is not interrupted after each operation is completed, so that the data packet is directly transmitted when the next processing is required, and although no data is sent for a long time, the communication connection is maintained; at this time, the program at the server must be always in an operating state to monitor the socket port of the client, and once the program at the server stops operating, the established communication connection is interrupted.
The background art mentioned above is merely technical information held by the inventor for deriving the embodiments of the present invention or learned during the derivation process, and is not necessarily known to the general public prior to the submission of the embodiments of the present invention.
Disclosure of Invention
The invention aims to provide a method for maintaining communication connection connectivity, which overcomes the defect that in the prior art, a program at a server end must be in an operation state to maintain the communication connection connectivity when a PC end and a mobile terminal are in a long connection state.
In order to achieve the above object, the present invention provides a method for maintaining connectivity of a communication connection, where the communication connection is an ADB socket communication connection between a PC terminal and a mobile terminal, and the mobile terminal includes a plurality of mobile terminals, including the steps of:
the PC end sequentially and respectively sends a detection message packet to each mobile terminal in communication connection with the PC end according to a trigger instruction of a preset trigger mechanism; the preset trigger mechanism comprises generating a trigger instruction at intervals of a preset time period;
the PC terminal starts a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when the PC receives a response packet fed back by the mobile terminal corresponding to the timer within a preset time limit of the timer, deleting the timer; the response packet is a message packet for the mobile terminal to respond to the detection message packet;
and when the timing of the certain timer exceeds the preset time limit, the PC end sends a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
Preferably, in an embodiment of the present invention, the selecting range of the preset period includes:
4 seconds to 6 seconds.
Preferably, in an embodiment of the present invention, the mobile terminal includes a mobile phone.
In another aspect of embodiments of the present invention, there is also provided a storage device comprising a set of instructions adapted to be loaded and executed by a processor:
according to a trigger instruction of a preset trigger mechanism, sending a detection message packet to each mobile terminal in communication connection with the mobile terminal in sequence; the preset trigger mechanism comprises generating a trigger instruction at intervals of a preset time period;
starting a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when a response packet fed back by the mobile terminal corresponding to a timer is received within a preset time limit of the timer, deleting the timer; the response packet is a message packet for the mobile terminal to respond to the detection message packet;
and when the timing of the certain timer exceeds the preset time limit, sending a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
Preferably, in an embodiment of the present invention, the selecting range of the preset period includes:
4 seconds to 6 seconds.
Preferably, in an embodiment of the present invention, the mobile terminal includes a mobile phone.
In another aspect of the embodiment of the invention, a PC side is provided, including a bus, a processor, a transceiver, and a storage device;
the storage device includes an instruction set adapted to be loaded and executed by a processor:
sending detection message packets to a plurality of mobile terminals which are in communication connection with the detection message packets in sequence at intervals of a preset period;
starting a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when a response packet fed back by the mobile terminal corresponding to a timer is received within a preset time limit of the timer, deleting the timer;
when the timing of a certain timer exceeds the preset time limit, a request for establishing socket communication connection is sent to a mobile terminal corresponding to the timer;
the processor is used for loading and executing the instruction set in the storage device;
the bus is used for connecting the processor, the transceiver and the storage device;
the transceiver is configured to communicate with a mobile terminal.
In another aspect of the embodiment of the invention, a system for maintaining connectivity of communication connection is also provided, including a PC end, a USB hub, and a plurality of mobile terminals;
the PC end comprises a storage device; the storage device includes an instruction set adapted to be loaded and executed by a processor:
according to a trigger instruction of a preset trigger mechanism, sending a detection message packet to each mobile terminal in communication connection with the mobile terminal in sequence; the preset trigger mechanism comprises generating a trigger instruction at intervals of a preset time period;
starting a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when a response packet fed back by the mobile terminal corresponding to a timer is received within a preset time limit of the timer, deleting the timer; the response packet is a message packet for the mobile terminal to respond to the detection message packet;
and when the timing of the certain timer exceeds the preset time limit, sending a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
The mobile terminal is used for feeding back a response packet to the PC side after receiving the detection message packet.
Preferably, in an embodiment of the present invention, the USB hub includes a voltage monitoring module, where the voltage fluctuation monitoring module collects real-time voltage data of the USB hub, and generates alarm information when a voltage fluctuation value of the USB hub exceeds a preset value; the alarm information can be used as a trigger instruction;
the transceiver obtains the alarm information through a connection interface with a USB hub.
From the above, in the embodiment of the present invention, the PC end is simultaneously connected with a plurality of mobile terminals in communication, and the PC end sequentially sends probe message packets to all the mobile terminals that establish socket communication with the PC end; while sending each detection message packet, starting a corresponding timer for a receiving object of the detection message packet (namely, a mobile terminal receiving the detection message packet); among a plurality of mobile terminals serving as receiving terminals, if a certain mobile terminal is in a state of communicating with a PC terminal and is active, the detection message packet is received; at this time, the mobile terminal may indicate to the PC that the communication connection between the mobile terminal and the PC is in an active state by feeding back the response packet in time (i.e., within a preset time limit of the timer). When the communication connection between a certain mobile terminal and the PC end is interrupted, the detection message packet cannot be received, and the response packet cannot be fed back to the PC end naturally, so that a timer corresponding to the mobile terminal exceeds a preset time limit; at this time, the PC side can learn that the mobile terminal corresponding to the timer has been interrupted, and then, by sending a communication connection request to the mobile terminal having been interrupted, the connectivity of the communication connection between the PC side and the mobile terminal can be recovered in time.
In the embodiment of the invention, the communication connection between the PC end and the mobile terminal can timely resume the interrupted communication connection by sending the detection message packet and receiving the response packet, so that a program in the mobile terminal serving as a server end is not required to be always in an operation state so as to monitor the socket port of the client end to monitor the communication connectivity between the PC end and the mobile terminal.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram illustrating steps of a method for maintaining connectivity of a communication connection according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a multi-mobile phone control system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of the PC side according to an embodiment of the present invention.
Detailed Description
The invention is capable of many modifications and embodiments, and specific embodiments are illustrated in the drawings and described in detail in the detailed description. The effects and features of the present invention, and the method of achieving the same, will be clearly understood with reference to the detailed description of the embodiments while referring to the accompanying drawings. However, the present invention may be implemented in various ways without being limited to the embodiments disclosed below.
In the following embodiments, the terms first, second, etc. are used for the purpose of distinguishing one component element from another, and are not intended to be limiting.
In the following embodiments, with respect to the expression in the singular, the expression in the singular also includes the expression in the plural as long as other meanings are not explicitly indicated in the article.
In the following embodiments, the terms "comprising" or "having" and the like mean that the features or constituent elements described in the specification are present, and are not intended to exclude additional possibilities of one or more other features or constituent elements in advance.
In the following embodiments, when a portion of a film, a region, a constituent element, or the like is located over or on another portion, not only a case of being located directly over the other portion but also a case of providing another film, region, constituent element, or the like therebetween is included.
The dimensions of the constituent elements may be exaggerated or reduced in the drawings for convenience of explanation. For example, the dimensions and thicknesses of the structures shown in the drawings are arbitrarily represented for convenience of explanation, and thus the present invention is not necessarily limited to the illustrations.
In the following embodiments, the x-axis, the y-axis, and the z-axis are not limited to three axes in a rectangular coordinate system, and the x-axis, the y-axis, and the z-axis can be interpreted in a broad sense including these. For example, the x-axis, y-axis, and z-axis may be orthogonal to each other, but may also refer to mutually different directions that are not orthogonal to each other.
In the case where an embodiment is implemented in other ways, the particular sequence of steps may also be implemented differently than as illustrated. For example, two processes described in succession may, in fact, be executed concurrently, and the processes may also be executed in the reverse order of the depicted order.
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings, and when the embodiments are described with reference to the drawings, the same or corresponding constituent elements will be denoted by the same reference numerals, and repeated description of the constituent elements will be omitted.
Example 1
In order to avoid that a program in a mobile terminal as a server is always in an operating state to monitor connectivity of communication between a PC and the mobile terminal, in an embodiment of the present invention, a method for maintaining connectivity of a communication connection is provided, where the communication connection is a socket communication connection between the PC and the mobile terminal, as shown in fig. 1, and includes the steps of:
s11, the PC end sequentially and respectively sends detection message packets to each mobile terminal in communication connection with the PC end according to a trigger instruction of a preset trigger mechanism; the preset trigger mechanism comprises generating a trigger instruction at intervals of a preset time period;
taking a mobile terminal as a mobile phone as an example, as shown in fig. 2, a typical application scenario for which the present invention is aimed may be that a PC terminal 20 is connected to a plurality of mobile phones 10 through a USB Hub 30 (USB Hub) to form a multi-mobile phone control system, that is, a user may control a plurality of mobile phones 10 through the PC terminal 20; the PC 20 may be referred to as a client as an execution device controlled by a user, and the mobile phone 10 may be referred to as a server as a controlled device. The inventors have studied and found that in the above-mentioned multi-phone control system, i.e., in the manner of data forwarding connection between the PC terminal 20 and the mobile phone 10 through the USB hub 30, if the control operation is not performed or the access is performed for a long time, the connection between the mobile phone and the PC terminal becomes unstable, which may cause disconnection.
In practical application, the mobile terminal mentioned in the embodiment of the invention can be a mobile phone or other mobile devices such as a PAD.
In the embodiment of the present invention, in order to monitor connectivity with a plurality of mobile phones 10, a typical manner in which a trigger mechanism is preset to generate a trigger instruction is to generate a trigger instruction every other preset period of time by the PC end 20 as a client; in this way, the polling detection of connectivity can be performed once every preset period, and each time of polling detection, a detection message packet needs to be sent to each mobile phone 10 in turn; in general, the probe packet may be a null packet including only a header, or may be a very small packet including some other content (e.g., hello message), where the content of the probe packet is not specifically limited.
Further, in the embodiment of the present invention, the trigger instruction may be generated in other manners, for example, the preset trigger mechanism may further include receiving an alarm signal from the receiver of the PC side 20, and triggering the polling detection of connectivity by using the alarm signal as the trigger instruction. In the embodiment of the present invention, the alarm signal is generated by the voltage monitoring module in the USB hub 30, that is, in the embodiment of the present invention, the voltage detecting module may be provided in the USB hub 30 to monitor the voltage data of the USB hub 30 in real time, so that when the voltage fluctuation value of the USB hub 30 exceeds the preset value, an alarm message may be generated, and in the embodiment of the present invention, the alarm message may be used as a trigger command. The alarm information may be transmitted to the PC 20 through a receiver (USB interface) of the PC 20, so that a preset trigger mechanism may generate a trigger command to trigger the polling detection of connectivity.
The inventor finds that a part of the connection interruption between the PC end 20 and the mobile phone 10 is caused by the instability of the voltage of the USB hub 30; for example, the voltage instability may eventually cause the server to exit the process, which may cause the connection between the PC 20 and the handset 10 to be disconnected. For this reason, in the embodiment of the present invention, the voltage of the USB hub 30 is monitored in real time, so that when the voltage fluctuation is too large, a polling probe can be timely performed to detect whether there is a disconnection of the mobile terminal 10.
S12, the PC terminal starts a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
in the embodiment of the present invention, the PC end 20 starts a timer for each mobile phone 10 while sending a probe message packet to the mobile phone 10, where the timer is set with a preset time limit, that is, starts a timer for the receiving object of each probe message packet; in practical applications, the preset time limit may be set by those skilled in the art according to the duration of the feedback period of the message, for example, the preset time limit may be the duration of one feedback period or the durations of multiple feedback periods.
For example, when the PC end 20 sends a probe packet to the mobile phone 11, the timer 11 is started (the timer 11 is an identifier of the timer), and the timer 11 corresponds to the mobile phone 11; the PC sends a probe packet to the mobile phone 12, and then starts the timer 12 (similarly, the timer 12 is the identifier of the timer), and the timer 12 corresponds to the mobile phone 12. With this push, each handset has a corresponding timer.
S13, deleting the timer when the PC receives a response packet fed back by the mobile terminal corresponding to the timer within a preset time limit of the timer; the response packet is a message packet for the mobile terminal to respond to the detection message packet;
if the connectivity between the PC end and the mobile phone is not problematic, the mobile phone will receive the detection message packet from the PC end, so that the mobile phone can timely feed back the corresponding response packet to the PC end.
That is, the PC end determines whether the connectivity with the mobile phone is normal by receiving the response packet within the preset time limit, and when the PC end receives the response packet within the preset time limit, it means that the mobile phone corresponding to the timer is normally connected with the PC end and is in an active state.
For example, after receiving the probe message packet, the mobile phone 11 feeds back a response packet to the PC; when the timer 11 reaches the preset time limit, the PC side receives the response packet of the mobile phone (mobile phone 11) corresponding to the timer 11, and then the PC side knows that the connectivity with the mobile phone 11 is in a normal state, and can delete the timer 11.
And S14, when the timing of the certain timer exceeds the preset time limit, the PC end sends a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
If a certain timer exceeds a preset time limit and is not deleted, the PC end does not receive a response packet of the mobile phone corresponding to the timer within the preset time limit, and then the communication between the mobile phone and the PC end is interrupted, and at the moment, the connection with the mobile phone needs to be reestablished timely.
For example, since the communication connection between the mobile phone 12 and the PC end is interrupted, the probe packet cannot be received, and thus the response packet cannot be timely fed back to the PC end, which causes the timer 12 to exceed a preset time limit, and the PC end determines that the communication connection with the mobile phone 12 is interrupted; in this way, the connectivity between the PC and the handset 12 can be maintained by reestablishing the connection with the handset 12 in time.
Further, in the embodiment of the present invention, the inventor has found that it is appropriate to set the selection range of the preset period to 4 to 6 seconds; with this interval (4 seconds), it is not only possible to discover the interruption and reestablish the connection in a timely manner, but also the increased network load has less impact on the system performance.
In summary, in the embodiment of the present invention, the PC side is simultaneously connected to a plurality of mobile terminals in communication, and may sequentially send probe message packets to all mobile terminals that establish socket communication with the PC side; while sending each detection message packet, starting a corresponding timer for a receiving object of the detection message packet (namely, a mobile terminal receiving the detection message packet); among a plurality of mobile terminals serving as receiving terminals, if a certain mobile terminal is in a state of communicating with a PC terminal and is active, the detection message packet is received; at this time, the mobile terminal may indicate to the PC that the communication connection between the mobile terminal and the PC is in an active state by feeding back the response packet in time (i.e., within a preset time limit of the timer). When the communication connection between a certain mobile terminal and the PC end is interrupted, the detection message packet cannot be received, and the response packet cannot be fed back to the PC end naturally, so that a timer corresponding to the mobile terminal exceeds a preset time limit; at this time, the PC side can learn that the mobile terminal corresponding to the timer has been interrupted, and then, by sending a communication connection request to the mobile terminal having been interrupted, the connectivity of the communication connection between the PC side and the mobile terminal can be recovered in time.
In the embodiment of the invention, the communication connection between the PC end and the mobile terminal can timely resume the interrupted communication connection by sending the detection message packet and receiving the response packet, so that a program in the mobile terminal serving as a server end is not required to be always in an operation state so as to monitor the socket port of the client end to monitor the communication connectivity between the PC end and the mobile terminal.
Example two
In another aspect of the embodiments of the present invention, there is also provided a storage device including a set of instructions adapted to be loaded and executed by a processor:
a triggering instruction of a triggering mechanism is preset, and a detection message packet is sequentially and respectively sent to each mobile terminal in communication connection with the triggering instruction; the preset trigger mechanism comprises generating a trigger instruction at intervals of a preset time period;
starting a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when a response packet fed back by the mobile terminal corresponding to a timer is received within a preset time limit of the timer, deleting the timer;
and when the timing of the certain timer exceeds the preset time limit, sending a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
In practical applications, the instruction set in the embodiment of the present invention may constitute a software program for running on an computing device (computer or other terminal) with a processor, and the computing device is exemplified by a PC, which may include the storage device in the embodiment of the present invention, and through the processor thereof, running the software program formed by the instruction set.
In the embodiment of the invention, the PC end is simultaneously in communication connection with a plurality of mobile terminals, and can sequentially send detection message packets to all mobile terminals which establish socket communication connection with the PC end every other preset time period; while sending each detection message packet, starting a corresponding timer for a receiving object of the detection message packet (namely, a mobile terminal receiving the detection message packet); among a plurality of mobile terminals serving as receiving terminals, if a certain mobile terminal is in a state of communicating with a PC terminal and is active, the detection message packet is received; at this time, the mobile terminal may indicate to the PC that the communication connection between the mobile terminal and the PC is in an active state by feeding back the response packet in time (i.e., within a preset time limit of the timer). When the communication connection between a certain mobile terminal and the PC end is interrupted, the detection message packet cannot be received, and the response packet cannot be fed back to the PC end naturally, so that a timer corresponding to the mobile terminal exceeds a preset time limit; at this time, the PC side can learn that the mobile terminal corresponding to the timer has been interrupted, and then, by sending a communication connection request to the mobile terminal having been interrupted, the connectivity of the communication connection between the PC side and the mobile terminal can be recovered in time.
In the embodiment of the invention, the communication connection between the PC end and the mobile terminal can timely resume the interrupted communication connection by continuously sending the detection message packet and receiving the response packet, so that a program in the mobile terminal serving as a server end is not required to be always in an operation state so as to monitor the socket port of the client end to monitor the communication connectivity between the PC end and the mobile terminal.
In the embodiment of the present invention, the working principle and the function of each specific step of the instruction set in the storage device when the instruction set is loaded and executed by the processor are already described and described in detail in the corresponding method for maintaining the connectivity of the communication connection in fig. 1, so that the description is omitted herein.
Example III
In another aspect of the embodiment of the present invention, as shown in fig. 3, there is further provided a PC side, where the PC side 20 includes a bus 201, a processor 204, a transceiver 203, and a storage device 202, where the storage device 202 is similar to the storage device in the second embodiment described above, and includes an instruction set, where the instruction set is adapted to be loaded and executed by the processor 204:
a triggering instruction of a triggering mechanism is preset, and a detection message packet is sequentially and respectively sent to each mobile terminal in communication connection with the triggering instruction; the preset trigger mechanism comprises generating a trigger instruction at intervals of a preset time period;
starting a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when a response packet fed back by the mobile terminal corresponding to a timer is received within a preset time limit of the timer, deleting the timer;
and when the timing of the certain timer exceeds the preset time limit, sending a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
The processor 204 is used to load and execute the instruction set in the memory device 02; bus 201 is used to connect processor 204, transceiver 203, and storage device 202; the transceiver 203 is used for communication with a mobile terminal.
In practical applications, the storage device 202 is configured to store a software program including the above instruction set, and the processor 204 may call the software program in the storage device 202 to execute the instruction set, thereby implementing functions or roles in each step of the instruction set; in this process, on the one hand, data transmission among the processor 204, the transceiver 203 and the storage device 202 may be realized by connection of the bus 201; on the other hand, communication with the mobile terminal is also required to be achieved through the transceiver 203.
In the embodiment of the present invention, the working principle and the function of each specific step when the instruction set in the storage device included in the PC side is loaded and executed by the processor are already described and described in detail in the method for maintaining connectivity of the communication connection corresponding to fig. 1, and in the second embodiment, therefore, the description is omitted herein.
Example IV
In another aspect of the embodiment of the present invention, there is further provided a communication connection connectivity maintenance system, where an application scenario of the communication connection connectivity maintenance system may refer to fig. 2, and the communication connection connectivity maintenance system includes a PC end 20, a USb hub 30, and a plurality of mobile terminals 10, where a structure of the PC end 20 may refer to fig. 3, and specifically includes a bus 201, a processor 204, a transceiver 203, and a storage device 202; the storage device 202 includes an instruction set adapted to be loaded and executed by a processor:
a triggering instruction of a triggering mechanism is preset, and a detection message packet is sequentially and respectively sent to each mobile terminal in communication connection with the triggering instruction; the preset trigger mechanism comprises generating a trigger instruction at intervals of a preset time period;
starting a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when a response packet fed back by the mobile terminal corresponding to a timer is received within a preset time limit of the timer, deleting the timer; the response packet is a message packet for the mobile terminal to respond to the detection message packet;
and when the timing of the certain timer exceeds the preset time limit, sending a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
The mobile terminal 10 is configured to reversely 20 feed back a response packet to the PC side after receiving the probe message packet; the processor 204 is used to load and execute the instruction set in the memory device 20; bus 201 is used to connect processor 204, transceiver 203, and storage device 202; the transceiver 203 is used to communicate with the mobile terminal 10.
Further, the USB hub 30 may include a voltage monitoring module, where the voltage fluctuation monitoring module collects real-time voltage data of the USB hub 30 and generates alarm information when the voltage fluctuation value of the USB hub 30 exceeds a preset value; the alarm information can be used as a trigger instruction; at this time, the preset trigger mechanism may also generate a trigger instruction according to the alarm information.
The transceiver 203 may obtain the alert information through a connection interface with the USB hub 30.
The interruption of the connection between the PC terminal 20 and the handset 10 is partly due to the instability of the voltage of the USB hub 30; for example, the voltage instability may eventually cause the server to exit the process, which may cause the connection between the PC 20 and the handset 10 to be disconnected. Therefore, in the embodiment of the present invention, the voltage of the USB hub 30 is monitored in real time, so that when the voltage fluctuation is too large, a trigger command can be generated through the alarm information to perform polling detection, so as to timely detect whether the connection of the mobile phone 10 is disconnected.
Because in the embodiment of the present invention, the working mode of the mobile terminal, each component of the PC side, including the storage device and the instruction set in the storage device, the working principle and the function of each specific step when loaded and executed by the processor are already described and described in detail in the corresponding method for maintaining the connectivity of the communication connection in fig. 1, and in the second embodiment and the third embodiment, therefore, the description is omitted herein.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A maintenance method of communication connection connectivity is used for a multi-mobile phone control system formed by connecting a PC end with a plurality of mobile phones through a USB hub; the communication connection is ADB socket communication connection between a PC end and a mobile terminal, and the mobile terminal comprises a plurality of terminals, and is characterized by comprising the following steps:
the PC end sequentially and respectively sends a detection message packet to each mobile terminal in communication connection with the PC end according to a trigger instruction of a preset trigger mechanism; the trigger instruction includes an alarm signal generated by a voltage monitoring module in the USB hub; the preset trigger mechanism comprises the step of receiving an alarm signal from a receiver of a PC end; the voltage detection module is arranged in the USB hub to monitor the voltage data of the USB hub in real time, so that alarm information is generated when the voltage fluctuation value of the USB hub exceeds a preset value; the alarm information can be transmitted to the PC end through a receiver of the PC end;
the PC terminal starts a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when the PC receives a response packet fed back by the mobile terminal corresponding to the timer within a preset time limit of the timer, deleting the timer;
and when the timing of one timer exceeds the preset time limit, the PC end sends a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
2. The method for maintaining connectivity of a communication connection according to claim 1, wherein the selecting range of the preset time limit includes:
4 seconds to 6 seconds.
3. The method for maintaining connectivity of a communication connection of claim 1, wherein the mobile terminal comprises a cell phone.
4. A memory device comprising a set of instructions adapted to be loaded and executed by a processor:
according to a trigger instruction of a preset trigger mechanism, sending a detection message packet to each mobile terminal in communication connection with the mobile terminal in sequence; the trigger instruction includes an alarm signal generated by a voltage monitoring module in the USB hub; the preset trigger mechanism comprises the step of receiving an alarm signal from a receiver of a PC end; the voltage detection module is arranged in the USB hub to monitor the voltage data of the USB hub in real time, so that alarm information is generated when the voltage fluctuation value of the USB hub exceeds a preset value; the alarm information can be transmitted to the PC end through a receiver of the PC end;
starting a corresponding timer for each mobile terminal receiving the message detection packet while sending the detection message packet, wherein the timer is set with a preset time limit;
when a response packet fed back by the mobile terminal corresponding to a timer is received within a preset time limit of the timer, deleting the timer;
and when the timing of one timer exceeds the preset time limit, sending a request for establishing socket communication connection to the mobile terminal corresponding to the timer.
5. The storage device of claim 4, wherein the selection range of the preset time limit includes:
4 seconds to 6 seconds.
6. The storage device of claim 4, wherein the mobile terminal comprises a cell phone.
7. A PC-side comprising a bus, a processor, a transceiver, and a memory device as claimed in any one of claims 4 to 6;
the processor is used for loading and executing the instruction set in the storage device;
the bus is used for connecting the processor, the transceiver and the storage device;
the transceiver is configured to communicate with a mobile terminal.
8. A maintenance system for connectivity of a communication connection, comprising a PC side, a USB hub and a plurality of mobile terminals as claimed in claim 7;
the mobile terminal is used for feeding back a response packet to the PC side after receiving the detection message packet.
9. The communication connection connectivity maintenance system according to claim 8,
the USB hub comprises a voltage monitoring module, wherein the voltage fluctuation monitoring module collects real-time voltage data of the USB hub and generates alarm information when the voltage fluctuation value of the USB hub exceeds a preset value; the alarm information can be used as a trigger instruction;
the transceiver obtains the alarm information through a connection interface with a USB hub.
CN201710639737.1A 2017-07-31 2017-07-31 Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity Active CN108075947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710639737.1A CN108075947B (en) 2017-07-31 2017-07-31 Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710639737.1A CN108075947B (en) 2017-07-31 2017-07-31 Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity

Publications (2)

Publication Number Publication Date
CN108075947A CN108075947A (en) 2018-05-25
CN108075947B true CN108075947B (en) 2024-02-27

Family

ID=62159391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710639737.1A Active CN108075947B (en) 2017-07-31 2017-07-31 Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity

Country Status (1)

Country Link
CN (1) CN108075947B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111010319B (en) * 2019-12-20 2021-11-16 锐捷网络股份有限公司 VSF-based link detection method and device
CN111427740A (en) * 2020-02-05 2020-07-17 香港乐蜜有限公司 Development environment maintenance method and device for mobile terminal
CN111328155B (en) * 2020-02-27 2022-01-07 Oppo广东移动通信有限公司 Data transmission method, device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102227114A (en) * 2010-07-23 2011-10-26 卡巴斯基实验室封闭式股份公司 System and method for detecting junk mail robot by detection data transmission
CN102546437A (en) * 2012-02-20 2012-07-04 南京邮电大学 Internet of things platform-oriented socket implementation method
WO2013124541A1 (en) * 2012-02-24 2013-08-29 Nokia Corporation Method and apparatus for dynamic server|client controlled connectivity logic
CN103973718A (en) * 2013-01-25 2014-08-06 成都勤智数码科技股份有限公司 Operation and maintenance message pushing method based on android mobile platform
CN104660474A (en) * 2015-02-13 2015-05-27 上海交通大学 Network communication method based on intelligent home control system
CN105610888A (en) * 2015-09-08 2016-05-25 华南师范大学 Method of using socket to push message based on Android and system thereof
CN106936927A (en) * 2017-04-19 2017-07-07 武汉票据交易中心有限公司 A kind of socket communication means based on pc client

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102227114A (en) * 2010-07-23 2011-10-26 卡巴斯基实验室封闭式股份公司 System and method for detecting junk mail robot by detection data transmission
CN102546437A (en) * 2012-02-20 2012-07-04 南京邮电大学 Internet of things platform-oriented socket implementation method
WO2013124541A1 (en) * 2012-02-24 2013-08-29 Nokia Corporation Method and apparatus for dynamic server|client controlled connectivity logic
CN103973718A (en) * 2013-01-25 2014-08-06 成都勤智数码科技股份有限公司 Operation and maintenance message pushing method based on android mobile platform
CN104660474A (en) * 2015-02-13 2015-05-27 上海交通大学 Network communication method based on intelligent home control system
CN105610888A (en) * 2015-09-08 2016-05-25 华南师范大学 Method of using socket to push message based on Android and system thereof
CN106936927A (en) * 2017-04-19 2017-07-07 武汉票据交易中心有限公司 A kind of socket communication means based on pc client

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
The Socket Programming and Software Design for Communication Based on Client/Server;Ming Xue等;IEEE;全文 *
基于安卓的远程监控系统的设计与实现;李光明;孙英爽;党小娟;;计算机工程与设计(第02期);全文 *

Also Published As

Publication number Publication date
CN108075947A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
US10715411B1 (en) Altering networking switch priority responsive to compute node fitness
CN107645529B (en) Heartbeat packet sending method and device
US10693813B1 (en) Enabling and disabling links of a networking switch responsive to compute node fitness
CN108430116B (en) Disconnected network reconnection method, medium, device and computing equipment
US10003516B2 (en) Method and apparatus for processing messages
US8630218B2 (en) Using a transmission control protocol (TCP) channel to save power for virtual private networks (VPNs) that use user datagram protocol (UDP)
CN108075947B (en) Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity
CN107135279B (en) Method and device for processing long connection establishment request
CN110266810B (en) Message receiving method, device and storage medium based on MQTT protocol
US20180006976A1 (en) Voice chat mode self-adapting method and apparatus
CN103491102A (en) Method, system and device for monitoring stability of internet audio and video
US20180373563A1 (en) Method and system for processing communication channel
CN110505309B (en) Network communication method, device, equipment and storage medium
CN110062054B (en) Remote control method and system for Internet of things equipment
EP3531676A1 (en) Task processing apparatus, intelligent device, task processing method, and baseband processor
CN109982355B (en) Method for saving and restoring network path, apparatus, terminal and storage medium thereof
CN109040295A (en) Determination method and device, terminal and the storage medium of abnormal broken line
CN110691398A (en) Network interaction method, system, equipment and storage medium of intelligent equipment
JP2015510334A (en) Network application proxy system and method
TWI577162B (en) Method for maintaining transmission control protocol connection and computer system
CN106304241B (en) Data transmission method, repeater and gateway
CN113596197B (en) Address switching method and device, electronic equipment and storage medium
CN106060959B (en) Method and device for preventing network connection message from being retransmitted and android system
CN116939000A (en) Network reconnection method, device, terminal equipment and storage medium
CN115529654A (en) Method, apparatus, storage medium, and relay device for standby communication

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