[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN108075947A - The connective maintaining method of storage device, PC ends, communication connection and system - Google Patents

The connective maintaining method of storage device, PC ends, communication connection and system Download PDF

Info

Publication number
CN108075947A
CN108075947A CN201710639737.1A CN201710639737A CN108075947A CN 108075947 A CN108075947 A CN 108075947A CN 201710639737 A CN201710639737 A CN 201710639737A CN 108075947 A CN108075947 A CN 108075947A
Authority
CN
China
Prior art keywords
mobile terminal
timer
bag
default
storage device
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.)
Granted
Application number
CN201710639737.1A
Other languages
Chinese (zh)
Other versions
CN108075947B (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 Micro Software Technology Co Ltd
Original Assignee
Beijing Micro 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 Micro Software Technology Co Ltd filed Critical Beijing Micro 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to the connective maintaining method of storage device, PC ends, communication connection and system, wherein the maintaining method includes step:PC ends send probe message bag to each mobile terminal for communicating with connection respectively successively according to the triggering command of default trigger mechanism;PC ends are while probe message bag is sent, the mobile terminal for respectively each receiving message detection bag starts corresponding timer, when in the default time limit in a certain timer, when PC terminations receive the response bag of mobile terminal feedback corresponding with timer, it deletes timer to prescribe a time limit when the timing of a certain timer is more than default, PC ends send communication connection request to mobile terminal corresponding with timer.Pass through the embodiment of the present invention, discontinued communication connection between PC ends and mobile terminal can timely be recovered, thus without as the program in the mobile terminal of server end always in operating status to monitor the socket port of client the connectedness that monitors PC ends with communicate between mobile terminal.

Description

The connective maintaining method of storage device, PC ends, communication connection and system
Technical field
The invention belongs to computer network fields, the more particularly to connective maintenance side of storage device, PC ends, communication connection Method and system.
Background technology
Android debugs bridge(Android Debug Bridge, referred to as ADB)It is Android(Android)Equipment and PC ends (Personal Computer, PC)Establish a kind of means of communication connection.
The operation principle of ADB is:By monitoring 5554 grade ports of Socket TCP, in electronic integrated driver (Integrated Drive Electronics, referred to as IDE)Communication connection is established between Qemu.In default situations, ADB can guard the relevant network port(daemon).Therefore, when user runs the program of the types such as Eclipse When, ADB processes will automatic running.
To connect Android device(Such as mobile phone)With PC ends, then ADB drivers are needed.Specifically, to PC is debugged and managed to mobile phone, then needs to install ADB kits in advance.
When mobile phone and PC ends are establishing one based on communication connection two-way socket, during realizing through PC ends, usually Server end can be used as by control mobile phone(server socket), PC ends are as client(client socket).
Specifically, for communication connection of the foundation based on ADB socket ports, server between mobile phone and PC ends End needs to run socket signal procedures, so as to which server end be allowed ceaselessly to monitor the socket port of some client, and Two-way communication connection is established after waiting the connection application of client.So in the communication connection mode based on socket port In, server end is the arrival of active wait-for connection application.
When establishing two-way communication connection using socket port, the program of server end can run multiple threads, It communicates so as to be carried out at the same time with multiple client.Also, multiple client can also be realized by server end between each Communication connection.It is this two-way communication connection is established using socket port mode it is more flexible, therefore suitable for some ratio More complicated communication mode.But when establishing two-way communication connection using socket port, the program of server end is necessary Always operating status is in monitor the socket port of client.
But found according to the long-term experiment of inventor, PC ends and mobile phone are sometimes needed under long connection status, Communication connection will not be interrupted after i.e. each end of operation so as to directly transmit data packet when processing is needed in next time, although very It comes and goes in long a period of time without data, but in order to keep communicating to connect;At this time, it may be necessary to the program of server end must be always In operating status to monitor the socket port of client, once the program stopped operation of server end, what is had built up is logical Letter connection will be interrupted.
Above-mentioned background technology is only that inventor possesses to export embodiment of the present invention or in export process The technical information of middle acquistion not necessarily has been disclosed in the known skill of general public before the submission of embodiment of the present invention Art.
The content of the invention
Communicate to connect connective maintaining method the object of the present invention is to provide a kind of, with overcome PC ends in the prior art and For mobile terminal under long connection status, the program of server end, which necessarily is in operating status, could keep the connectedness of communication connection This defect.
To achieve the above object, connective maintaining method, the communication connection are communicated to connect the present invention provides a kind of Between PC ends and mobile terminal ADB socket communication connection, the mobile terminal include it is multiple, including step:
It is sent out respectively to each mobile terminal for communicating with connection successively according to the triggering command of default trigger mechanism at the PC ends Send probe message bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
The PC ends respectively each receive the mobile terminal of the message detection bag while probe message bag is sent Start corresponding timer, the timer is set with the default time limit;
When in the default time limit in a certain timer, it is anti-that the PC terminations receive mobile terminal corresponding with the timer During the response bag of feedback, the timer is deleted;The response bag is used for probe message bag described in response for the mobile terminal Message package;
It prescribes a time limit when the timing of a certain timer is more than described default, the PC ends are to movement corresponding with the timer The request of socket communication connections is established in terminal transmission.
Preferably, in embodiments of the present invention, the selection range of the preset period of time includes:
4 seconds to 6 seconds.
Preferably, in embodiments of the present invention, the mobile terminal includes mobile phone.
In the another side of the embodiment of the present invention, a kind of storage device is additionally provided, the storage device includes instruction set, Described instruction collection is suitable for being loaded and being performed by processor:
According to the triggering command of default trigger mechanism, detection is sent to each mobile terminal for communicating with connection respectively successively and disappeared Breath bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
While the probe message bag is sent, the mobile terminal for respectively each receiving the message detection bag starts correspondence Timer, the timer is set with the default time limit;
When the response in the default time limit in a certain timer, receiving mobile terminal feedback corresponding with the timer Bao Shi deletes the timer;The response bag is used for the message package of probe message bag described in response for the mobile terminal;
It prescribes a time limit when the timing of a certain timer is more than described default, is sent to mobile terminal corresponding with the timer Establish the request of socket communication connections.
Preferably, in embodiments of the present invention, the selection range of the preset period of time includes:
4 seconds to 6 seconds.
Preferably, in embodiments of the present invention, the mobile terminal includes mobile phone.
In the another side of the embodiment of the present invention, additionally provide a kind of PC ends, including bus, processor, transceiver and, deposit Store up equipment;
The storage device includes instruction set, and described instruction collection is suitable for being loaded and being performed by processor:
Every a preset period of time, probe message bag is sent to the multiple mobile terminals for communicating with connection respectively successively;
While the probe message bag is sent, the mobile terminal for respectively each receiving the message detection bag starts correspondence Timer, the timer is set with the default time limit;
When the response in the default time limit in a certain timer, receiving mobile terminal feedback corresponding with the timer Bao Shi deletes the timer;
It prescribes a time limit when the timing of a certain timer is more than described default, is sent to mobile terminal corresponding with the timer Establish the request of socket communication connections;
The processor is used to load and perform the instruction set in the storage device;
The bus is used to connect the processor, the transceiver and the storage device;
The transceiver is used to communicate with mobile terminal.
In the another side of the embodiment of the present invention, additionally provide a kind of system for safeguarding that communication connection is connective, including PC ends, Usb hub and multiple mobile terminals;
The PC ends include storage device;The storage device includes instruction set, and described instruction collection is suitable for being loaded by processor And it performs:
According to the triggering command of default trigger mechanism, detection is sent to each mobile terminal for communicating with connection respectively successively and disappeared Breath bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
While the probe message bag is sent, the mobile terminal for respectively each receiving the message detection bag starts correspondence Timer, the timer is set with the default time limit;
When the response in the default time limit in a certain timer, receiving mobile terminal feedback corresponding with the timer Bao Shi deletes the timer;The response bag is used for the message package of probe message bag described in response for the mobile terminal;
It prescribes a time limit when the timing of a certain timer is more than described default, is sent to mobile terminal corresponding with the timer Establish the request of socket communication connections.
The mobile terminal is used for after probe message bag is received, and feeds back response bag to the PC ends.
Preferably, in embodiments of the present invention, the usb hub includes voltage monitoring module, the voltage fluctuation prison The real-time voltage data that module gathers the usb hub are surveyed, and are more than preset value in the magnitude of a voltage fluctuation of the usb hub Shi Shengcheng warning informations;Warning information can be used as triggering command;
The transceiver with the connecting interface of usb hub by obtaining the warning information.
As seen from the above, in embodiments of the present invention, PC ends are connected simultaneously with multiple communication of mobile terminal, PC ends to It is all to establish the transmission probe message bag of the mobile terminal of socket communication connections successively with it;Sending each probe message bag While, the also reception object for the probe message bag(Receive the mobile terminal of the probe message bag)Start corresponding timing Device;It, will if a certain mobile terminal is in when connecting the state of activity with PC ends as in multiple mobile terminals of receiving terminal Receive the probe message bag;The mobile terminal can be by timely at this time(That is, within the default time limit of timer)Feed back response The mode of bag shows that the mobile terminal and the communication connection at PC ends are in active state to PC ends.As a certain mobile terminal and PC During the broken communication connection at end, probe message bag can not be received, naturally also just feeds back response bag without normal direction PC ends, then Timer corresponding with the mobile terminal will be more than the default time limit;At this point, PC ends can know it is corresponding with the timer Mobile terminal has occurred that communication disruption, then, please by sending communication connection to the mobile terminal that communication disruption has occurred The mode asked can timely recover the connectedness communicated to connect between PC ends and mobile terminal.
In embodiments of the present invention, due to being communicated to connect between PC ends and mobile terminal by sending probe message bag and reception The mode of response bag can timely recover discontinued communication connection, so without as in the mobile terminal of server end Program always in operating status to monitor the socket port of client the company that monitors PC ends with communicate between mobile terminal The general character.
Description of the drawings
It in order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments described in application, for those of ordinary skill in the art, without creative efforts, It can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is the step schematic diagram that connective maintaining method is communicated to connect described in the embodiment of the present invention;
Fig. 2 is the structure diagram of more cellphone control systems described in the embodiment of the present invention;
Fig. 3 is the structure diagram at PC ends described in the embodiment of the present invention.
Specific embodiment
The present invention can carry out numerous variations, can have various embodiments, illustrate specific embodiment in the accompanying drawings, and It is described in detail in specific embodiment.If it is expressly understood that while referring to the drawings with reference to the embodiment described in detail The effect and feature of the present invention and the method for realizing these.But the present invention can be realized and is not only restricted in many ways Embodiment as disclosed below.
Below in an example, first, second grade terms are so that an element and other elements to be distinguished Purpose use, without the meaning of restriction.
Below in an example, the statement on singulative, as long as not being to conclusively show other contain in article Justice, the then statement of the singulative also include the statement of plural form.
Below in an example, the terms such as " comprising " or " having " mean that feature recorded in specification or composition will The presence of element, is not the additional possibility for excluding more than one other feature or element in advance.
Below in an example, when film, region and element when part be located at other parts above and over when, no Only include the situation positioned at the surface of other parts, be also included between it and be provided with other films, region and element etc. Situation.
The size of element can be zoomed in or out for convenience of explanation in the accompanying drawings.For example, for convenience of explanation, Arbitrarily represent the size and thickness of attached each structure shown in figure, therefore the present invention might not be limited to the content of diagram.
Below in an example, x-axis, y-axis and z-axis are not limited to three axis that rectangular co-ordinate is fastened, and can use bag These broad sense is included to explain the x-axis, y-axis and z-axis.For example, x-axis, y-axis and z-axis may be orthogonal to each other, it is also possible to refer to each other Non-orthogonal mutually different direction.
In the case where a certain embodiment can be realized as other modes, specific process sequence can also with it is illustrated suitable Sequence is differently implemented.For example, the two kinds of processes continuously illustrated can essentially be realized simultaneously, and can also with it is illustrated Sequentially opposite order carries out.
In the following, referring to the drawings, the embodiment of the present invention is described in detail, when being described with reference to the accompanying drawings, to phase With or corresponding element put on identical reference numeral, and omit the repeated explanation to the element.
Embodiment one
It is whole with movement to monitor PC ends in order to avoid the program in the mobile terminal as server end is always in operating status The connectedness to communicate between end in embodiments of the present invention, provides a kind of maintaining method for communicating to connect connectedness, the communication The socket communication connections being connected as between PC ends and mobile terminal, as shown in Figure 1, including step:
S11, the PC ends are whole to each movement for communicating with connection respectively successively according to the triggering command for presetting trigger mechanism End sends probe message bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
By taking mobile terminal is mobile phone as an example, the targeted typical case scene of the present invention can be with as shown in Fig. 2, a PC end 20 be logical Cross usb hub 30(USB Hub)It is connected with multiple mobile phones 10 and may be constructed cellphone control system more than one, i.e. user can be with Multiple mobile phones 10 are controlled by PC ends 20;Wherein, PC ends 20 can be referred to as client as the execution equipment of user's control, Mobile phone 10 is used as controlled equipment, can be referred to as server end.Inventor has found that above-mentioned more mobile phone control systems In system, i.e. carried out by usb hub 30 between PC ends 20 and mobile phone 10 under the connection mode of data forwarding, why if Long period is not carried out control operation or accesses, and the connection between mobile phone and PC ends will become very unstable, It is disconnected so as to likely result in connection.
In practical applications, the mobile terminal mentioned in the embodiment of the present invention is either mobile phone, can also be PAD etc. The mobile equipment of others.
In embodiments of the present invention, the PC ends 20 as client are preset to monitor the connectedness with multiple mobile phones 10 The typical way of trigger mechanism generation triggering command is to generate a triggering command every a preset period of time;It thus can be with Carry out the poll detection of a secondary connectivity every preset period of time, when each poll detects, it is necessary to each mobile phone 10 according to A time probe message bag of secondary transmission;Under normal circumstances, probe message bag can be an empty bag for only including packet header, can also It is the message package for the very little for including some other contents(Such as, hello message), here, not to the content of probe message bag Do specific restriction.
Further, in embodiments of the present invention, triggering command can also be generated in other way, for example, it is default Trigger mechanism can also include the alarm signal for receiving the receiver from PC ends 20, and using alarm signal as triggering command, To trigger connective poll detection.Alarm signal in the embodiment of the present invention is by the voltage monitoring mould in usb hub 30 Block generates, that is to say, that in embodiments of the present invention, voltage detection module can be equipped in usb hub 30, comes real When monitoring usb hub 30 voltage data, so when the magnitude of a voltage fluctuation of usb hub 30 is more than preset value, A warning message can be generated, in embodiments of the present invention, which can be used as triggering command.Warning message can be with Pass through the receiver at PC ends 20(USB interface)PC ends 20 are transmitted to, so default trigger mechanism can generate triggering command The connective poll of triggering detects.
Inventor has found that disconnecting between PC ends 20 and mobile phone 10 some be due to usb hub 30 voltages it is unstable caused by;For example, the unstable program that may ultimately result in server end of voltage exits, this When, it will result in the disconnection connected between PC ends 20 and mobile phone 10.For this purpose, in embodiments of the present invention, to the electricity of usb hub 30 Pressure has carried out real-time monitoring, in this way, when its voltage fluctuation is excessive, detection can be timely polled, to detect whether The connection of mobile terminal 10 is had to disconnect.
S12, the PC ends respectively each receive the message detection bag while probe message bag is sent Mobile terminal starts corresponding timer, and the timer is set with the default time limit;
In embodiments of the present invention, PC ends 20 are also opened while probe message bag is sent to each mobile phone 10 for the mobile phone 10 A timer is moved, which is set with the default time limit, that is to say, that start one for the reception object of each probe message bag A timer;In practical applications, the default time limit can be set by those skilled in the art according to the duration in message feedback cycle It is fixed, for example, the default time limit can be the duration of feedback cycle or the duration of multiple feedback cycles.
For example, PC ends 20 have sent probe message bag to mobile phone 11, then while also just start timer 11(Institute State 11 marks for the timer), timer 11 is corresponding with mobile phone 11;PC ends have sent probe message bag to mobile phone 12, that Also just start timer 12 simultaneously(Similarly, described 12 be the timer mark), timer 12 is corresponding with mobile phone 12. And so on, each mobile phone has corresponding timer.
S13, when in the default time limit in a certain timer, the PC terminations receive shifting corresponding with the timer During the response bag of dynamic terminal feedback, the timer is deleted;The response bag is the mobile terminal for detection described in response The message package of message package;
If the connectedness of PC ends and mobile phone has no problem, then the mobile phone will receive the probe message bag from PC ends, In this way, the mobile phone timely can feed back corresponding response bag to PC ends.
That is, PC ends by can receive response bag within the default time limit judge with mobile phone it is connective whether Normally, when PC ends have received response bag within the default time limit, then mean the mobile phone corresponding to the timer and PC ends Connection is normal, is in active state.
For example, after mobile phone 11 receives probe message bag, response bag is fed back to PC ends;It is reached in timer 11 default In time limit, PC terminations have received and 11 corresponding mobile phone of timer(Mobile phone 11)Response bag, then, PC is known at end and mobile phone 11 Connectedness be in normal condition, timer 11 can be deleted.
S14, when a certain timer timing be more than it is described default when prescribe a time limit, the PC ends to the timer pair The request of socket communication connections is established in the mobile terminal transmission answered.
If some timer has been more than to be deleted not yet in the default time limit, illustrate that PC ends are not received within the default time limit To the response bag of mobile phone corresponding with the timer, then it may determine that the mobile phone connects interruption with PC ends, need at this time and When re-establish and be connected with the mobile phone.
For example, due to mobile phone 12 and the broken communication connection at PC ends, so probe message bag can not be received, so as to Also just can not response bag timely be fed back to PC ends, in this way, will result in timer 12 is more than the default time limit, PC ends will at this time Judge that the communication connection with mobile phone 12 is interrupted;In this manner it is possible to timely by re-establishing the connection with mobile phone 12 To safeguard PC ends and the connectedness of mobile phone 12.
Further, in embodiments of the present invention, inventor has found that the selection range of preset period of time is set It is proper for 4 to 6 seconds;Wherein, 4 seconds are again wherein more preferred schemes, using this interval period(4 seconds), no But it can timely find to interrupt and rebuild connection, and its influence of increased network load to system performance is smaller.
In conclusion in embodiments of the present invention, PC ends are connected simultaneously with multiple communication of mobile terminal, and can be to institute Have and establish the transmission probe message bag of the mobile terminal of socket communication connections successively with it;Sending each probe message bag Meanwhile also it is the reception object of the probe message bag(Receive the mobile terminal of the probe message bag)Start corresponding timing Device;It, will if a certain mobile terminal is in when connecting the state of activity with PC ends as in multiple mobile terminals of receiving terminal Receive the probe message bag;The mobile terminal can be by timely at this time(That is, within the default time limit of timer)Feed back response The mode of bag shows that the mobile terminal and the communication connection at PC ends are in active state to PC ends.As a certain mobile terminal and PC During the broken communication connection at end, probe message bag can not be received, naturally also just feeds back response bag without normal direction PC ends, then Timer corresponding with the mobile terminal will be more than the default time limit;At this point, PC ends can know it is corresponding with the timer Mobile terminal has occurred that communication disruption, then, please by sending communication connection to the mobile terminal that communication disruption has occurred The mode asked can timely recover the connectedness communicated to connect between PC ends and mobile terminal.
In embodiments of the present invention, due to being communicated to connect between PC ends and mobile terminal by sending probe message bag and reception The mode of response bag can timely recover discontinued communication connection, so without as in the mobile terminal of server end Program always in operating status to monitor the socket port of client the company that monitors PC ends with communicate between mobile terminal The general character.
Embodiment two
Another side in embodiments of the present invention additionally provides a kind of storage device, and the storage device includes instruction set, institute Instruction set is stated to be suitable for being loaded and being performed by processor:
The triggering command of default trigger mechanism sends probe message to each mobile terminal for communicating with connection respectively successively Bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
While the probe message bag is sent, the mobile terminal for respectively each receiving the message detection bag starts correspondence Timer, the timer is set with the default time limit;
When the response in the default time limit in a certain timer, receiving mobile terminal feedback corresponding with the timer Bao Shi deletes the timer;
It prescribes a time limit when the timing of a certain timer is more than described default, is sent to mobile terminal corresponding with the timer Establish the request of socket communication connections.
In practical applications, the instruction set in the embodiment of the present invention may be constructed one for being set with the computing of processor It is standby(Computer or other-end)The software program of operation, by arithmetic facility for exemplified by PC ends, it is real that PC ends can include the present invention The storage device in example is applied, and passes through the software program that the operation of its processor is made of above-metioned instruction collection.
In embodiments of the present invention, PC ends are connected simultaneously with multiple communication of mobile terminal, can every a preset period of time, To all the transmission probe message bag of each mobile terminal of socket communication connections successively will be established with it;It is each sending While probe message bag, the reception object also for the probe message bag(Receive the mobile terminal of the probe message bag)Start Corresponding timer;As in multiple mobile terminals of receiving terminal, if a certain mobile terminal is in connects activity with PC ends During state, the probe message bag will be received;The mobile terminal can be by timely at this time(That is, in the default time limit of timer It is interior)The mode of response bag is fed back, shows that the mobile terminal and the communication connection at PC ends are in active state to PC ends.When a certain shifting When dynamic terminal and the broken communication connection at PC ends, probe message bag can not be received, is naturally also just fed back without normal direction PC ends Response bag, then timer corresponding with the mobile terminal will be more than the default time limit;Determine at this point, PC ends can be known with this When the corresponding mobile terminal of device have occurred that communication disruption, then, by have occurred communication disruption mobile terminal send The mode of communication connection request can timely recover the connectedness communicated to connect between PC ends and mobile terminal.
In embodiments of the present invention, due to being communicated to connect between PC ends and mobile terminal by constantly sending probe message bag Mode with response bag is received, can timely recover discontinued communication connection, so without the movement as server end Program in terminal is led to always with monitoring the socket port of client in operating status to monitor between PC ends and mobile terminal The connectedness of letter.
Due in the embodiment of the present invention, the instruction set in the storage device, when it is loaded and performed by processor The operation principle of specific each step and play the role of in the maintaining method of the communication connection connectedness corresponding to Fig. 1 In done detailed record and description, therefore, details are not described herein again.
Embodiment three
Another side in embodiments of the present invention additionally provides a kind of PC ends, as shown in figure 3, PC ends 20 include bus 201, place Manage device 204,203 and of transceiver, storage device 202, the storage device 202 and the storage device class in above-described embodiment two Seemingly, instruction set is included, described instruction collection is suitable for being loaded and being performed by processor 204:
The triggering command of default trigger mechanism sends probe message to each mobile terminal for communicating with connection respectively successively Bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
While the probe message bag is sent, the mobile terminal for respectively each receiving the message detection bag starts correspondence Timer, the timer is set with the default time limit;
When the response in the default time limit in a certain timer, receiving mobile terminal feedback corresponding with the timer Bao Shi deletes the timer;
It prescribes a time limit when the timing of a certain timer is more than described default, is sent to mobile terminal corresponding with the timer Establish the request of socket communication connections.
Processor 204 is used to load and perform the instruction set in storage device 02;Bus 201 for connection processing device 204, Transceiver 203 and storage device 202;Transceiver 203 is used to communicate with mobile terminal.
In practical applications, storage device 202 includes the software program of above-metioned instruction collection, processor 204 for storage The software program in storage device 202 can be called, to perform the instruction set, so as to fulfill in each step of the instruction set Function or effect;In the process, the connection by bus 201 is on the one hand needed, can realize processor 204, transceiver 203 Data transmission between storage device 202;On the other hand, it is also desirable to be realized by transceiver 203 and communicated with mobile terminal.
Due in the embodiment of the present invention, the instruction set in storage device included by the PC ends, when it is added by processor The operation principle of specific each step when carrying and performing with play the role of connecting in the communication connection corresponding to Fig. 1 And, detailed record and description are done in embodiment two, therefore, details are not described herein again in the maintaining method of property.
Example IV
Another side in embodiments of the present invention additionally provides a kind of maintenance system for communicating to connect connectedness, and communication link is in succession The application scenarios of the maintenance system of the general character may be referred to Fig. 2, and communicating to connect connective maintenance system includes a PC end 20, one A USb hubs 30 and multiple mobile terminals 10, the structure at wherein PC ends 20 may be referred to Fig. 3, specifically include bus 201, place Manage device 204,203 and of transceiver, storage device 202;The storage device 202 includes instruction set, described instruction collection be suitable for by Processor is loaded and performed:
The triggering command of default trigger mechanism sends probe message to each mobile terminal for communicating with connection respectively successively Bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
While the probe message bag is sent, the mobile terminal for respectively each receiving the message detection bag starts correspondence Timer, the timer is set with the default time limit;
When the response in the default time limit in a certain timer, receiving mobile terminal feedback corresponding with the timer Bao Shi deletes the timer;The response bag is used for the message package of probe message bag described in response for the mobile terminal;
It prescribes a time limit when the timing of a certain timer is more than described default, is sent to mobile terminal corresponding with the timer Establish the request of socket communication connections.
Mobile terminal 10 is used for after probe message bag is received, to the anti-20 feedback response bag in PC ends;Processor 204 is used to add It carries and performs the instruction set in storage device 20;Bus 201 is used for connection processing device 204, transceiver 203 and storage device 202; Transceiver 203 is used to communicate with mobile terminal 10.
Further, usb hub 30 can include voltage monitoring module, and voltage fluctuation monitoring modular gathers the USB The real-time voltage data of hub 30, and generate alarm signal when the magnitude of a voltage fluctuation of the usb hub 30 is more than preset value Breath;Warning information can be used as triggering command;At this point, default trigger mechanism can also generate triggering command according to warning information.
Transceiver 203 can be by obtaining warning information with the connecting interface of usb hub 30.
Disconnecting between PC ends 20 and mobile phone 10 some be due to unstable the causing of 30 voltage of usb hub 's;For example, the unstable program that may ultimately result in server end of voltage exits, at this point, will result in PC ends 20 The disconnection being connected between mobile phone 10.For this purpose, in embodiments of the present invention, real-time prison is carried out to the voltage of usb hub 30 It surveys, in this way, when its voltage fluctuation is excessive, to generate triggering command, to be polled detection, can be come by warning message Timely detect whether that having the connection of mobile phone 10 disconnects.
Due in the embodiment of the present invention, the working method of mobile terminal, all parts at PC ends, including its storage device And the instruction set in storage device, the operation principle of specific each step when it is loaded and performed by processor and To effect in the connective maintaining method of the communication connection corresponding to Fig. 1 and, in embodiment two and embodiment three Detailed record and description are done, therefore, details are not described herein again.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through The relevant hardware of program instruction is completed, and foregoing program can be stored in a computer read/write memory medium, the program Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light The various media that can store program code such as disk.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that:It still may be used To modify to the technical solution recorded in foregoing embodiments or carry out equivalent substitution to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical solution spirit and Scope.

Claims (9)

1. a kind of communicate to connect connective maintaining method, ADB socket of the communication connection between PC ends and mobile terminal Communication connection, the mobile terminal includes multiple, which is characterized in that including step:
It is sent out respectively to each mobile terminal for communicating with connection successively according to the triggering command of default trigger mechanism at the PC ends Send probe message bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
The PC ends respectively each receive the mobile terminal of the message detection bag while probe message bag is sent Start corresponding timer, the timer is set with the default time limit;
When in the default time limit in a certain timer, it is anti-that the PC terminations receive mobile terminal corresponding with the timer During the response bag of feedback, the timer is deleted;
It prescribes a time limit when the timing of a certain timer is more than described default, the PC ends are to movement corresponding with the timer The request of socket communication connections is established in terminal transmission.
2. the connective method of communication connection is safeguarded according to claim 1, which is characterized in that the choosing of the preset period of time Scope is taken to include:
4 seconds to 6 seconds.
3. connective maintaining method is communicated to connect according to claim 1, which is characterized in that the mobile terminal includes Mobile phone.
4. a kind of storage device, which is characterized in that the storage device includes instruction set, and described instruction collection is suitable for by processor It loads and performs:
According to the triggering command of default trigger mechanism, detection is sent to each mobile terminal for communicating with connection respectively successively and disappeared Breath bag;The default trigger mechanism includes generating a triggering command every a preset period of time;
While the probe message bag is sent, the mobile terminal for respectively each receiving the message detection bag starts correspondence Timer, the timer is set with the default time limit;
When the response in the default time limit in a certain timer, receiving mobile terminal feedback corresponding with the timer Bao Shi deletes the timer;
It prescribes a time limit when the timing of a certain timer is more than described default, is sent to mobile terminal corresponding with the timer Establish the request of socket communication connections.
5. the storage device according to claim 4, which is characterized in that the selection range of the preset period of time includes:
4 seconds to 6 seconds.
6. the storage device according to claim 4, which is characterized in that the mobile terminal includes mobile phone.
7. a kind of PC ends, which is characterized in that including bus, processor, transceiver and, as described in any in claim 4 to 6 Storage device;
The processor is used to load and perform the instruction set in the storage device;
The bus is used to connect the processor, the transceiver and the storage device;
The transceiver is used to communicate with mobile terminal.
8. a kind of communicate to connect connective maintenance system, which is characterized in that including PC ends, USB set as recited in claim 7 Line device and multiple mobile terminals;
The mobile terminal is used for after probe message bag is received, and feeds back response bag to the PC ends.
9. connective maintenance system is communicated to connect according to claim 8, which is characterized in that
The usb hub includes voltage monitoring module, and the voltage fluctuation monitoring modular gathers the real-time of the usb hub Voltage data, and generate warning information when the magnitude of a voltage fluctuation of the usb hub is more than preset value;Warning information can be made For triggering command;
The transceiver with the connecting interface of usb hub by obtaining the warning information.
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 true CN108075947A (en) 2018-05-25
CN108075947B 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)

Cited By (3)

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

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
MING XUE等: "The Socket Programming and Software Design for Communication Based on Client/Server", IEEE *
李光明;孙英爽;党小娟;: "基于安卓的远程监控系统的设计与实现", 计算机工程与设计, no. 02 *

Cited By (4)

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

Also Published As

Publication number Publication date
CN108075947B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
JP4805990B2 (en) MONITOR COMMUNICATION TERMINAL MONITOR DEVICE AND MONITOR CONTROL METHOD
US7957402B2 (en) UDP to TCP bridge
CN103401714B (en) Method for detecting network connection state and client side
CN101953139B (en) DHCP in response to Internet connectedness initializes
CN108075947A (en) The connective maintaining method of storage device, PC ends, communication connection and system
CN102571492B (en) Method and device for detecting failure of routing equipment
CN109271273A (en) A kind of method, abnormal restoring equipment and storage medium that communication abnormality restores
KR20040028571A (en) Data communication method and information processing apparatus
CN109101371B (en) Disaster recovery switching method and device
CN105487937A (en) RDMA (Remote Direct Memory Access) implementation method and device
US8948020B2 (en) Detecting and isolating dropped or out-of-order packets in communication networks
CN101808043B (en) Method and device for detecting service message forwarding state of TRUNK members
CN108647131A (en) Output system of running log
CN105210043A (en) Information processing device
US6467041B1 (en) Third party host packet replication
CN207835479U (en) Communicate to connect the maintenance system of connectivity
CN101355483A (en) Method and equipment for transmitting data packet by multiple network ports
CN101848165A (en) Method for controlling recovery of interrupted communication link and interface board
CN112491810B (en) Data connection method and mobile terminal
US6396806B1 (en) Transmission line duplexing processing method and apparatus thereof, and recording medium for recording its processing procedure
CN102291266A (en) Loopback (LB) detection method and device
JP2967569B2 (en) Uninterruptible power system
CN109450683A (en) Fault detection method, device, application system and storage medium
CN110535712A (en) BFD parameter setting method, device, electronic equipment
CN108174458A (en) A kind of mobile terminal and method, apparatus, mobile terminal and the wearable device of wearable device wireless connection

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