CN106294250A - A kind of method keeping USB (universal serial bus) communication robust and relevant device - Google Patents

A kind of method keeping USB (universal serial bus) communication robust and relevant device Download PDF

Info

Publication number
CN106294250A
CN106294250A CN201510268472.XA CN201510268472A CN106294250A CN 106294250 A CN106294250 A CN 106294250A CN 201510268472 A CN201510268472 A CN 201510268472A CN 106294250 A CN106294250 A CN 106294250A
Authority
CN
China
Prior art keywords
usb
output circuit
relay
data line
electric output
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.)
Pending
Application number
CN201510268472.XA
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510268472.XA priority Critical patent/CN106294250A/en
Publication of CN106294250A publication Critical patent/CN106294250A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The embodiment of the invention discloses a kind of method keeping USB (universal serial bus) communication robust and relevant device, the reconnect of USB between full automatic mobile terminal and the PC realizing and disconnecting.The method comprise the steps that and USB data line exists relay, and the electric output circuit of relay is used for turning on this USB data line, when detecting that the USB set up with mobile terminal by this USB data line is connected not online, control this relay and disconnect electric output circuit and reconnect after preset time period.

Description

A kind of method keeping USB (universal serial bus) communication robust and relevant device
Technical field
The present invention relates to the communications field, particularly relate to a kind of method keeping USB (universal serial bus) communication robust And relevant device.
Background technology
USB (universal serial bus) (Universal Serial Bus, USB) be a kind of for proper calculation machine with outer The external bus standard being connected and communicate with of portion's equipment, apply personal computer (personal computer, PC) interfacing in field.
Frequently with USB data line, PC is connected with mobile terminal at present, thus on PC, this is moved end The data of end update or debug this mobile terminal.
But, in the case of current mobile terminal connects PC for a long time by USB data line, can be indefinite Time the situation that communication is unstable and disconnects occurs, need continuous manual plug USB data line that this is moved Terminal reconnects with PC.Particularly under the scene of test program or test mobile terminal, when test journey When sequence or test mobile terminal are the most, if wherein there being mobile terminal to be connected disconnection with the USB of PC, need Expending substantial amounts of manpower manual intervention goes the mobile terminal of lookup disconnection plug USB data line to make USB reconnects, cause testing efficiency underground, and the strong influence full-automatic portion of testing tool Administration.
Summary of the invention
Embodiments provide a kind of method keeping USB (universal serial bus) communication robust and relevant set Standby, the reconnect of USB between full automatic mobile terminal and the PC realizing and disconnecting.
A kind of method keeping USB (universal serial bus) communication robust, including:
Set up USB by general-purpose serial bus USB data wire with mobile terminal to be connected, described USB number Including that relay, described relay include electric output circuit according to line, described electric output circuit is used In turning on described USB data line;
Detect described USB and connect the most online;
When determining that described USB connects not online, control described relay and disconnect described electric output circuit And reconnect after preset time period.
A kind of device keeping USB (universal serial bus) communication robust, including:
Set up module, be connected for setting up USB by USB data line with mobile terminal, described USB Data wire includes that relay, described relay include electric output circuit, described electric output circuit For turning on described USB data line;
Detection module, connects the most online for detecting the described USB setting up module foundation;
Control module, for when described detection module determines that described USB connects not online, controlling described Relay disconnects described electric output circuit and reconnects after preset time period.
A kind of USB data line, described USB data line includes:
Relay;
Described relay specifically includes:
Electrically output circuit, the conducting as described USB data line switchs, the two of described USB data line Section is connected to the two ends of described electric output circuit;
Control circuit, when being used for receiving reset command, disconnects described electric output circuit and when preset After length, described electric output circuit is reconnected.
A kind of USB data line, described USB data line includes:
Relay;
Described relay specifically includes:
Electrically output circuit, the conducting as described USB data line switchs, the two of described USB data line Section is connected to the two ends of described electric output circuit;
Control circuit, for when the "on" position of control circuit changes, by electric output circuit by Disconnection is switched to Guan Bi or is switched to disconnect by Guan Bi, and described "on" position includes electriferous state and power down shape State.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that the embodiment of the present invention Middle USB data line exists relay, and the electric output circuit of relay is used for turning on this usb data Line, when detecting that the USB set up with mobile terminal by this USB data line is connected not online, controls This relay disconnects electric output circuit and reconnects, due to this electric output circuit after preset time period For turning on this USB data line, disconnect electric output circuit and be i.e. equal to disconnect the thing of this USB data line Reason connects, and reconnects this electric output circuit and is i.e. equal to reconnect the physics of this USB data line even Connect, so, automatically disconnecting and reconnecting by relay, reach and artificial plug usb data The effect that line is identical, the reconnect of USB between mobile terminal and PC that full automatic realization disconnects, And it is no longer necessary to manual intervention, substantially increase testing efficiency and save human cost.
Accompanying drawing explanation
Fig. 1 is one the flow process signal of method keeping USB (universal serial bus) communication robust in the embodiment of the present invention Figure;
Fig. 2 is to keep another flow process of method of USB (universal serial bus) communication robust to show in the embodiment of the present invention It is intended to;
Fig. 3 is to keep another flow process of method of USB (universal serial bus) communication robust to show in the embodiment of the present invention It is intended to;
Fig. 4 is one structural representation of device keeping USB (universal serial bus) communication robust in the embodiment of the present invention Figure;
Fig. 5 is one structural representation of system keeping USB (universal serial bus) communication robust in the embodiment of the present invention Figure.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and It is not all, of embodiment.Based on the embodiment in the present invention, those skilled in the art are not making wound The every other embodiment obtained under the property made work premise, broadly falls into the scope of protection of the invention.
Term " relay " represents a kind of electric control device, is the input quantity (energizing quantity) when control circuit Change reach regulation when requiring, make controlled volume that predetermined Spline smoothing occurs in electric output circuit A kind of electrical equipment.
It is understood that in the embodiment of the present invention, the device keeping USB (universal serial bus) communication robust can Think a variety of, such as, can be PC, it is also possible to for server, it is also possible to for industrial computer etc., this Place is not construed as limiting.Below with this holding in each embodiment of the method for holding USB (universal serial bus) communication robust The device of USB (universal serial bus) communication robust is to illustrate as a example by PC, and in actual applications, this holding is led to May be used without identical method when being other equipment with the device that serial bus communication is stable, do not limit Fixed.
Refer to Fig. 1, the embodiment of the present invention keeps one reality of method of USB (universal serial bus) communication robust Execute example to include:
101, set up USB by USB data line with mobile terminal to be connected;
In this step, USB data line has two USB interface, and one of them USB interface is with PC's USB interface connects, and another USB interface is connected with the USB interface of mobile terminal.Two USB connect After mouth has all connected, PC can set up USB by this USB data line with this mobile terminal and be connected, Wherein, this USB data line also includes relay, and this relay includes electric output circuit, and this is electric Output circuit is used for turning on this USB data line.
It is understood that this mobile terminal can be mobile phone, it is also possible to for flat board, it is also possible to be portable Player, it is also possible to be the mobile terminal of other support USB interface, be not construed as limiting herein.
102, detect described USB and connect the most online;
PC sets up after USB is connected by USB data line with mobile terminal, and PC can detect this USB even Connect the most online, it is to be understood that USB connects online expression PC can read this USB connection also Can be connected by this USB and send data to mobile terminal;USB connects and represents that PC can not read the most online Connect to this USB or PC can not be connected to mobile terminal transmission data by this USB.
103, when determining that described USB connects not online, control described relay and disconnect described the most defeated Go out circuit and reconnect after preset time period.
In this step, when PC determines that this USB connects not online, control continuing in this USB data line Electrical equipment disconnects electric output circuit, is i.e. disconnected this USB data line, reconnects after preset time period, The most again turn on this USB data line, reach identical effect with artificial plug USB data line.
The embodiment of the present invention exists in USB data line relay, and the electric output circuit of relay is used In turning on this USB data line, when the USB set up by this USB data line being detected with mobile terminal When connecting not online, control this relay and disconnect electric output circuit and reconnect after preset time period, Owing to this electric output circuit is used for turning on this USB data line, disconnect electric output circuit and be i.e. equal to break Open the physical connection of this USB data line, reconnect this electric output circuit and be i.e. equal to reconnect be somebody's turn to do The physical connection of USB data line, so, automatically disconnecting and reconnecting by relay, reach The effect identical with artificial plug USB data line, mobile terminal and PC that full automatic realization disconnects it Between the reconnect of USB, and be no longer necessary to manual intervention, substantially increase testing efficiency and save people Power cost.
It is understood that in actual applications, the USB having multiple situation can cause establishing connects not Online, need to reconnect, a such as debugging acid (Android Debug in android system Bridge, ADB) service operation time, arise that the situation that communication is unstable, and need continuous plug USB data line reconnects, and the most once in a while during USB interface corrupt data, also has other some feelings Condition, is not construed as limiting herein.
In above example, detection USB connects the most online, in actual applications, and the triggering bar of detection Part can have multiple, on the other hand, controls relay and disconnect described electric output circuit in above example And reconnect after preset time period, in actual applications, according to the difference of relay, it would however also be possible to employ Various ways is controlled, below to the side keeping USB (universal serial bus) communication robust in the embodiment of the present invention Method is specifically described, and refers to Fig. 2, keeps USB (universal serial bus) communication robust in the embodiment of the present invention Another embodiment of method includes:
201, set up USB by USB data line with mobile terminal to be connected;
In this step, USB data line has two USB interface, and one of them USB interface is with PC's USB interface connects, and another USB interface is connected with the USB interface of mobile terminal.Two USB connect After mouth has all connected, PC can set up USB by this USB data line with this mobile terminal and be connected, Wherein, this USB data line also includes relay, and this relay includes electric output circuit, and this is electric Output circuit is used for turning on this USB data line.
It is understood that this mobile terminal can be mobile phone, it is also possible to for flat board, it is also possible to be portable Player, it is also possible to be the mobile terminal of other support USB interface, be not construed as limiting herein.
202, detect described USB and connect the most online;
PC sets up after USB is connected by USB data line with mobile terminal, and PC can detect this USB even Connect the most online, it is to be understood that USB connects online expression PC can read this USB connection also Can be connected by this USB and send data to mobile terminal;USB connects and represents that PC can not read the most online Connect to this USB or PC can not be connected to mobile terminal transmission data by this USB.
Have a variety of the most online opportunity it is understood that PC detection USB connects:
Optionally, PC can detect this USB according to during cycle and connect the most online, this during cycle Can preset, it is also possible to by User Defined, be not construed as limiting herein;
Optionally, PC can be worked as and determine and exist when being sent to the data of this mobile terminal, detect this USB Connect the most online;
Optionally, it is also possible to when PC sends data to mobile terminal failure, detecting this USB connection is No online.
In actual applications, can with select according to the actual requirements to use which kind of mode to determine detection opportunity, It is not construed as limiting herein.
It is understood that PC can detect relay (the control electricity of relay in USB data line Road) whether it is in connection status with this PC, whether can be connected with PC by this relay, judge The most whether the USB interface of this USB data line is connected with the USB interface of this PC;
In actual applications, optionally, can set only determine the USB interface of USB data line with In the case of the USB interface of this PC connects, just perform step 202.
203, when determining that described USB connects not online, reset command is sent to described relay, institute State reset command for indicate described relay disconnect described electric output circuit and after preset time period again Connect.
In this step, this relay has certain instruction processing function, can receive the instruction that PC sends, Perform the instruction received.When determining that USB connects not online, this PC sends reset command and continues to this Electrical equipment, this reset command is used for indicating this relay disconnect this electric output circuit and weigh after preset time period New connection.After relay receives this reset command, perform this reset command, disconnect electric output circuit, I.e. it is disconnected the physical connection of USB data line, reconnects after preset time period, turn on this most again USB data line, reaches identical effect with artificial plug USB data line.
In the embodiment of the present invention, various ways detection trigger USB can be used to connect the most online, increase The applicable scene of the method, and relay has the ability processing instruction, it is only necessary to directly transmit and restart life Order, to relay, simplifies operating procedure, improves treatment effeciency.
In actual applications, except sending reset command, it is also possible to use other control modes, refer to Fig. 3, keeps another embodiment of method of USB (universal serial bus) communication robust to include in the embodiment of the present invention:
301, set up USB by USB data line with mobile terminal to be connected;
In this step, USB data line has two USB interface, and one of them USB interface is with PC's USB interface connects, and another USB interface is connected with the USB interface of mobile terminal.Two USB connect After mouth has all connected, PC can set up USB by this USB data line with this mobile terminal and be connected, Wherein, this USB data line also includes relay, and this relay includes electric output circuit, and this is electric Output circuit is used for turning on this USB data line.
It is understood that this mobile terminal can be mobile phone, it is also possible to for flat board, it is also possible to be portable Player, it is also possible to be the mobile terminal of other support USB interface, be not construed as limiting herein.
302, detect described USB and connect the most online;
PC sets up after USB is connected by USB data line with mobile terminal, and PC can detect this USB even Connect the most online, it is to be understood that USB connects online expression PC can read this USB connection also Can be connected by this USB and send data to mobile terminal;USB connects and represents that PC can not read the most online Connect to this USB or PC can not be connected to mobile terminal transmission data by this USB.
Have a variety of the most online opportunity it is understood that PC detection USB connects:
Optionally, PC can detect this USB according to during cycle and connect the most online, this during cycle Can preset, it is also possible to by User Defined, be not construed as limiting herein;
Optionally, PC can be worked as and determine and exist when being sent to the data of this mobile terminal, detect this USB Connect the most online;
Optionally, it is also possible to when PC sends data to mobile terminal failure, detecting this USB connection is No online.
In actual applications, can with select according to the actual requirements to use which kind of mode to determine detection opportunity, It is not construed as limiting herein.
It is understood that PC can detect relay (the control electricity of relay in USB data line Road) whether it is in connection status with this PC, whether can be connected with PC by this relay, judge The most whether the USB interface of this USB data line is connected with the USB interface of this PC;
In actual applications, optionally, can set only determine the USB interface of USB data line with In the case of the USB interface of this PC connects, just perform step 302.
303, when determining that described USB connects not online, described relay is changed with preset time interval The "on" position twice of control circuit, described "on" position includes electriferous state and power-down state, described Control circuit is for controlling disconnection and the Guan Bi of described electric output circuit.
It is understood that the "on" position of control relay circuit (control coil) can affect the most defeated Going out disconnection and the Guan Bi of circuit, according to the difference of the contact types of this electric output circuit, control circuit is led to Electricity condition is also different on its impact.In actual applications, this electric output circuit can be snap action Contact (normally opened contact of snap action, the normally-closed contact of snap action), it is also possible to touching for timing closing Point (normally opened contact of timing closing, the normally-closed contact of timing closing).Concrete delay duration and relay Self performance relating to parameters, is not construed as limiting herein.
When the contact that this relay is snap action, this preset time interval is electric output circuit and breaks Opening the duration of re-attached, when the contact that this relay is timing closing, electric output circuit disconnects The duration of re-attached is this preset time interval delay duration plus relay.If it addition, electricity Gas output circuit is normally-closed contact, and the most generally, this control circuit should be at power-down state, to protect The conducting of card USB data line, if electrically output circuit is normally opened contact, then under general state, this control Circuit should be at electriferous state, to ensure the conducting of USB data line.According to the actual requirements, meeting Under conditions of USB data line is conducting state after accessing PC, the relay of different contact types can be chosen Device, is not construed as limiting herein.
In this step, no matter which kind of contact types relay selects, and is conducting state in USB data line Under the conditions of, changing the "on" position of control relay circuit once, then this control circuit controls electrically output Circuit disconnects, i.e. the physical connection of USB data line disconnects, and after preset time interval, then changes relay Once, then this control circuit controls electric output circuit Guan Bi, i.e. USB number to the conduction state of control circuit Again turn on according to the physical connection of line, reach identical effect with artificial plug USB data line.
In the embodiment of the present invention, the "on" position directly changing control circuit controls electric output circuit Disconnect and Guan Bi, it is not necessary to relay has too many Intelligent treatment function, provides cost savings, and improves The reaction efficiency of relay.
Additionally, in actual applications, a PC can include multiple USB interface, thus by many Root USB data line is simultaneously connected with multiple mobile device, for being connected with the USB of each mobile device, all The method described in the various embodiments described above can be respectively adopted.
For ease of understanding, total to the embodiment of the present invention keeps general serial with a concrete application scenarios below The method of line communication robust is specifically described:
3 USB interface on one PC are respectively adopted USB data line and are connected with 3 mobile phones, right These 3 mobile phones are tested.Wherein usb 1 uses USB data line 1 to be connected with mobile phone 1, USB interface 2 uses USB data line 2 to be connected with mobile phone 2, and USB interface 3 uses USB data line 3 are connected with mobile phone 3;
PC is set up USB with mobile phone 1 be connected 1 by USB data line 1, by USB data line 2 and Mobile phone 2 is set up USB and is connected 2, sets up USB by USB data line 3 with mobile phone 3 and is connected 3;
Mobile phone 3 is debugged by PC, when needing to send data to mobile phone 3, detects and sets up with mobile phone 3 USB connect 3 online, connect 3 by this USB and transmit data to mobile phone 3;
Mobile phone 2 is debugged by PC, when needing to send data to mobile phone 2, detects and sets up with mobile phone 2 USB connect 2 the most online;
The "on" position of the control circuit of PC change USB data line 2 repeat circuit twice, the electricity of relay Gas output circuit is timing closing normally-closed contact, and the control circuit of relay is the most charged, disconnects electrically output Circuit, control circuit is the most charged, the timing closing after 5 seconds of electric output circuit;
After electrically output circuit reconnects, it is online, by this USB even that PC detects that USB connects 2 Connect 2 and transmit data to mobile phone 2.
Below to the embodiment of the present invention keeping the device of USB (universal serial bus) communication robust illustrate, please Refering to Fig. 4, the embodiment of the present invention keeps one embodiment bag of device of USB (universal serial bus) communication robust Include:
Set up module 401, be connected for setting up USB by USB data line with mobile terminal, described USB data line includes that relay, described relay include electric output circuit, described electric output Circuit is used for turning on described USB data line;
Detection module 402, connects the most online for detecting the described USB setting up module 401 foundation;
Control module 403, is used for when described detection module 402 determines that described USB connects online, Control described relay disconnect described electric output circuit and reconnect after preset time period.
The embodiment of the present invention exists in USB data line relay, and the electric output circuit of relay is used In turning on this USB data line, when detection module 402 detects by this USB data line and mobile terminal When the USB set up connects not online, control module 403 controls this relay and disconnects electric output circuit also Reconnect after preset time period, owing to this electric output circuit is used for turning on this USB data line, disconnect Electrically output circuit is i.e. equal to the physical connection disconnecting this USB data line, reconnects this and electrically exports Circuit is i.e. equal to the physical connection reconnecting this USB data line, so, and automatic by relay Disconnect and reconnect, having reached the effect identical with artificial plug USB data line, full automatic realization The reconnect of USB between the mobile terminal and the PC that disconnect, and it is no longer necessary to manual intervention, significantly carry High testing efficiency also saves human cost.
In actual applications, detection module can trigger on multiple different opportunity:
Optionally, as in the embodiment of the present invention keep USB (universal serial bus) communication robust device another Embodiment, above-mentioned detection module 402 specifically may be used for, and detects described USB according to during cycle and connects The most online;
Optionally, as in the embodiment of the present invention keep USB (universal serial bus) communication robust device another Embodiment, the detection module 402 in Fig. 4 correspondence embodiment specifically may be used for, when determine exist pending When delivering to the data of described mobile terminal, detect described USB and connect the most online.
In actual applications, the described relay of above-mentioned control disconnects described electric output circuit and when preset Reconnect after length and can use various ways:
Optionally, as in the embodiment of the present invention keep USB (universal serial bus) communication robust device another Embodiment, above-mentioned control module 403 specifically for, send reset command to described relay, described heavy Open order for indicating described relay disconnect described electric output circuit and again connect after preset time period Connect.
In the embodiment of the present invention, relay has the ability processing instruction, and control module 303 only needs directly Transmission reset command, to relay, simplifies operating procedure, improves treatment effeciency.
Optionally, as in the embodiment of the present invention keep USB (universal serial bus) communication robust device another Embodiment, above-mentioned control module 403 specifically for, change described relay with preset time by interval The "on" position of control circuit twice, described "on" position includes electriferous state and power-down state, described control Circuit processed is for controlling disconnection and the Guan Bi of described electric output circuit.
In the embodiment of the present invention, control module 403 directly changes the "on" position of control circuit to control electricity The disconnection of gas output circuit and Guan Bi, it is not necessary to relay has too many Intelligent treatment function, saves into This, and improve the reaction efficiency of relay.
For the ease of understanding above-described embodiment, below with the dress of above-mentioned holding USB (universal serial bus) communication robust Put modules interaction in a concrete application scenarios to illustrate:
3 USB interface on one PC are respectively adopted USB data line and are connected with 3 mobile phones, right These 3 mobile phones are tested.Wherein usb 1 uses USB data line 1 to be connected with mobile phone 1, USB interface 2 uses USB data line 2 to be connected with mobile phone 2, and USB interface 3 uses USB data line 3 are connected with mobile phone 3;
Set up module 401 to set up USB by USB data line 1 with mobile phone 1 and be connected 1, pass through USB Data wire 2 is set up USB with mobile phone 2 and is connected 2, sets up USB by USB data line 3 and mobile phone 3 Connect 3;
Mobile phone 3 is debugged by PC, and when needing to send data to mobile phone 3, detection module 402 detects The USB set up with mobile phone 3 is connected 3 online, transmits data to mobile phone 3 by this USB connection 3;
Mobile phone 2 is debugged by PC, and when needing to send data to mobile phone 2, detection module 402 detects It is the most online that the USB set up with mobile phone 2 is connected 2;
Control module 403 changes the "on" position twice of the control circuit of USB data line 2 repeat circuit, The electric output circuit of relay is timing closing normally-closed contact, and the control circuit of relay is the most charged, disconnected Driving electric output circuit, control circuit is the most charged, the timing closing after 5 seconds of electric output circuit;
After electrically output circuit reconnects, detection module 402 detects that USB connection 2 is online, passes through This USB connects 2 and transmits data to mobile phone 2.
Below the USB data line in the embodiment of the present invention is described:
In the embodiment of the present invention, an embodiment of USB data line includes::
This USB data line includes relay;
This relay specifically includes:
Electrically output circuit, the conducting as described USB data line switchs, the two of described USB data line Section is connected to the two ends of described electric output circuit;
Control circuit, when being used for receiving reset command, disconnects described electric output circuit and when preset After length, described electric output circuit is reconnected.
The relay of the embodiment of the present invention has the ability processing instruction, after receiving reset command, from Dynamic circuit breaker is driven electric output circuit and is reconnected by described electric output circuit after preset time period, simplifies Operating procedure, improves treatment effeciency.
In the embodiment of the present invention, another embodiment of USB data line includes:
This USB data line includes relay;
This relay specifically includes:
Electrically output circuit, the conducting as described USB data line switchs, the two of described USB data line Section is connected to the two ends of described electric output circuit;
Control circuit, for when the "on" position of control circuit changes, by electric output circuit by Disconnection is switched to Guan Bi or is switched to disconnect by Guan Bi, and described "on" position includes electriferous state and power down shape State.
In the embodiment of the present invention, when the control circuit "on" position of relay changes, directly switching is the most defeated Go out the closed and disconnected state of circuit, it is not necessary to relay has too many Intelligent treatment function, saves into This, and improve the reaction efficiency of relay.
It is understood that the "on" position of control relay circuit (control coil) can affect the most defeated Going out disconnection and the Guan Bi of circuit, according to the difference of the contact types of this electric output circuit, control circuit is led to Electricity condition is also different on its impact.In actual applications, this electric output circuit can be snap action Contact (normally opened contact of snap action, the normally-closed contact of snap action), it is also possible to touching for timing closing Point (normally opened contact of timing closing, the normally-closed contact of timing closing).Concrete delay duration and relay Self performance relating to parameters, is not construed as limiting herein.
When the contact that this relay is snap action, this preset time interval is electric output circuit and breaks Opening the duration of re-attached, when the contact that this relay is timing closing, electric output circuit disconnects The duration of re-attached is this preset time interval delay duration plus relay.If it addition, electricity Gas output circuit is normally-closed contact, and the most generally, this control circuit should be at power-down state, to protect The conducting of card USB data line, if electrically output circuit is normally opened contact, then under general state, this control Circuit should be at electriferous state, to ensure the conducting of USB data line.According to the actual requirements, meeting Under conditions of USB data line is conducting state after accessing PC, the relay of different contact types can be chosen Device, is not construed as limiting herein.
Below with keep USB (universal serial bus) communication robust device as PC, the relay in USB is instantaneous The normally-closed contact of action, as a example by mobile terminal is mobile phone, total to the embodiment of the present invention keeps general serial The system of line communication robust illustrates, and refers to Fig. 5, keeps USB (universal serial bus) in the embodiment of the present invention One embodiment of the system of communication robust includes:
Keep the device 501 of USB (universal serial bus) communication robust, USB data line 502, mobile terminal 503;
The device 501 keeping USB (universal serial bus) communication robust has USB interface 5011, USB data line 502 have USB interface 5021 and USB interface 5022, and mobile terminal 503 has USB interface 5031;
USB interface 5021 is connected with USB interface 5011, USB interface 5022 and USB interface 5031 Connect;
USB data line 502 includes relay 5023;
(Fig. 5 is with the normally-closed contact of snap action to include electric output circuit 50231 in relay 5023 As a example by), this electric output circuit 50231 is used for turning on this USB data line 502, i.e. USB data line The two ends of 502 are connected on the two ends of this electric output circuit 50231;
Relay 5023 includes control circuit 50232 (in Fig. 5 as a example by control coil), this control Circuit 50232 is for controlling disconnection and the Guan Bi of electric output circuit 50231, this control circuit 50232 It is connected with the device 501 keeping USB (universal serial bus) communication robust by this USB interface 5021, can connect Receive the reset command of the device 501 of this holding USB (universal serial bus) communication robust, or be kept general serial The stable device 501 of bus communication changes "on" position, and described "on" position includes electriferous state and power down State.
Those skilled in the art is it can be understood that arrive, and for convenience and simplicity of description, above-mentioned retouches The specific works process of the system stated, device and unit, is referred to the correspondence in preceding method embodiment Process, does not repeats them here.
In several embodiments provided herein, it should be understood that disclosed system, device and Method, can realize by another way.Such as, device embodiment described above is only shown Meaning property, such as, the division of described unit, be only a kind of logic function and divide, actual can when realizing There to be other dividing mode, the most multiple unit or assembly can in conjunction with or be desirably integrated into another System, or some features can ignore, or do not perform.Another point, shown or discussed each other Coupling direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, device or unit Or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, makees The parts shown for unit can be or may not be physical location, i.e. may be located at a place, Or can also be distributed on multiple NE.Can select according to the actual needs part therein or The whole unit of person realizes the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit In, it is also possible to it is that unit is individually physically present, it is also possible to two or more unit are integrated in one In individual unit.Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ software merit The form of energy unit realizes.
If described integrated unit realizes and as independent production marketing using the form of SFU software functional unit Or when using, can be stored in a computer read/write memory medium.Based on such understanding, this The part that the most in other words prior art contributed of technical scheme of invention or this technical scheme Completely or partially can embody with the form of software product, this computer software product is stored in one In storage medium, including some instructions with so that computer equipment (can be personal computer, Server, or the network equipment etc.) perform completely or partially walking of method described in each embodiment of the present invention Suddenly.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), The various medium that can store program code such as magnetic disc or CD.
The above, above example only in order to technical scheme to be described, is not intended to limit; Although being described in detail the present invention with reference to previous embodiment, those of ordinary skill in the art should Work as understanding: the technical scheme described in foregoing embodiments still can be modified by it, or to it Middle part technical characteristic carries out equivalent;And these amendments or replacement, do not make appropriate technical solution Essence depart from various embodiments of the present invention technical scheme spirit and scope.

Claims (10)

1. the method keeping USB (universal serial bus) communication robust, it is characterised in that including:
Set up USB by general-purpose serial bus USB data wire with mobile terminal to be connected, described USB number Including that relay, described relay include electric output circuit according to line, described electric output circuit is used In turning on described USB data line;
Detect described USB and connect the most online;
When determining that described USB connects not online, control described relay and disconnect described electric output circuit And reconnect after preset time period.
Method the most according to claim 1, it is characterised in that the described USB of described detection connects Specifically include the most online:
Detect described USB according to during cycle and connect the most online;
Or,
When determine exist be sent to the data of described mobile terminal time, detect described USB and connect and whether exist Line.
Method the most according to claim 1 and 2, it is characterised in that the described relay of described control Disconnect described electric output circuit reconnecting after preset time period to specifically include:
Transmission reset command is to described relay, and described reset command is used for indicating described relay to disconnect institute State electric output circuit and reconnect after preset time period.
Method the most according to claim 1 and 2, it is characterised in that the described relay of described control Disconnect described electric output circuit reconnecting after preset time period to specifically include:
Change the "on" position twice of the control circuit of described relay by interval with preset time, described logical Electricity condition includes that electriferous state and power-down state, described control circuit are used for controlling described electric output circuit Disconnection and Guan Bi.
5. the device keeping USB (universal serial bus) communication robust, it is characterised in that including:
Set up module, be connected for setting up USB by USB data line with mobile terminal, described USB Data wire includes that relay, described relay include electric output circuit, described electric output circuit For turning on described USB data line;
Detection module, connects the most online for detecting the described USB setting up module foundation;
Control module, for when described detection module determines that described USB connects not online, controlling described Relay disconnects described electric output circuit and reconnects after preset time period.
Device the most according to claim 5, it is characterised in that described detection module specifically for: Detect described USB according to during cycle and connect the most online, or, when determining that existence is sent to described shifting When moving the data of terminal, detect described USB and connect the most online.
7. according to the device described in claim 5 or 6, it is characterised in that described control module is specifically used In, transmission reset command is to described relay, and described reset command is used for indicating described relay to disconnect institute State electric output circuit and reconnect after preset time period.
8. according to the device described in claim 5 or 6, it is characterised in that described control module is specifically used In, change the "on" position twice of the control circuit of described relay by interval with preset time, described logical Electricity condition includes that electriferous state and power-down state, described control circuit are used for controlling described electric output circuit Disconnection and Guan Bi.
9. a USB data line, it is characterised in that described USB data line includes:
Relay;
Described relay specifically includes:
Electrically output circuit, the conducting as described USB data line switchs, the two of described USB data line Section is connected to the two ends of described electric output circuit;
Control circuit, when being used for receiving reset command, disconnects described electric output circuit and when preset After length, described electric output circuit is reconnected.
10. a USB data line, it is characterised in that described USB data line includes:
Relay;
Described relay specifically includes:
Electrically output circuit, the conducting as described USB data line switchs, the two of described USB data line Section is connected to the two ends of described electric output circuit;
Control circuit, for when the "on" position of control circuit changes, by electric output circuit by Disconnection is switched to Guan Bi or is switched to disconnect by Guan Bi, and described "on" position includes electriferous state and power down shape State.
CN201510268472.XA 2015-05-22 2015-05-22 A kind of method keeping USB (universal serial bus) communication robust and relevant device Pending CN106294250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510268472.XA CN106294250A (en) 2015-05-22 2015-05-22 A kind of method keeping USB (universal serial bus) communication robust and relevant device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510268472.XA CN106294250A (en) 2015-05-22 2015-05-22 A kind of method keeping USB (universal serial bus) communication robust and relevant device

Publications (1)

Publication Number Publication Date
CN106294250A true CN106294250A (en) 2017-01-04

Family

ID=57633280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510268472.XA Pending CN106294250A (en) 2015-05-22 2015-05-22 A kind of method keeping USB (universal serial bus) communication robust and relevant device

Country Status (1)

Country Link
CN (1) CN106294250A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664349A (en) * 2018-05-18 2018-10-16 上海商米科技有限公司 Reconnection method and device, storage medium, the processor of double screen terminal
CN108966079A (en) * 2017-05-25 2018-12-07 瑞昱半导体股份有限公司 The control method and system of audio devices
WO2019218854A1 (en) * 2018-05-14 2019-11-21 维沃移动通信有限公司 Data line and driving method thereof
WO2022017121A1 (en) * 2020-07-22 2022-01-27 中兴通讯股份有限公司 Method for searching for interrupted device, slave device, master device, and storage medium
CN114200235A (en) * 2021-12-06 2022-03-18 深圳融昕医疗科技有限公司 Calibration system and calibration method for breathing machine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120454A1 (en) * 2006-11-17 2008-05-22 Chi-Tung Chang Integrated hub control chip
US20080228982A1 (en) * 2007-03-16 2008-09-18 Microsoft Corporation Modular Expandable Mobile Navigation Device
CN101945155A (en) * 2010-09-03 2011-01-12 展讯通信(上海)有限公司 Method and terminal device for capturing terminal debugging information in real-time manner
CN102681640A (en) * 2011-03-16 2012-09-19 国基电子(上海)有限公司 Self-powering universal serial bus (USB) equipment
CN102831084A (en) * 2012-08-16 2012-12-19 刘伟 Controller and controlling method for re-identifying USB (universal serial bus) equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120454A1 (en) * 2006-11-17 2008-05-22 Chi-Tung Chang Integrated hub control chip
US20080228982A1 (en) * 2007-03-16 2008-09-18 Microsoft Corporation Modular Expandable Mobile Navigation Device
CN101945155A (en) * 2010-09-03 2011-01-12 展讯通信(上海)有限公司 Method and terminal device for capturing terminal debugging information in real-time manner
CN102681640A (en) * 2011-03-16 2012-09-19 国基电子(上海)有限公司 Self-powering universal serial bus (USB) equipment
CN102831084A (en) * 2012-08-16 2012-12-19 刘伟 Controller and controlling method for re-identifying USB (universal serial bus) equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108966079A (en) * 2017-05-25 2018-12-07 瑞昱半导体股份有限公司 The control method and system of audio devices
CN108966079B (en) * 2017-05-25 2020-12-04 瑞昱半导体股份有限公司 Control method and system of audio device
WO2019218854A1 (en) * 2018-05-14 2019-11-21 维沃移动通信有限公司 Data line and driving method thereof
CN108664349A (en) * 2018-05-18 2018-10-16 上海商米科技有限公司 Reconnection method and device, storage medium, the processor of double screen terminal
WO2022017121A1 (en) * 2020-07-22 2022-01-27 中兴通讯股份有限公司 Method for searching for interrupted device, slave device, master device, and storage medium
CN114200235A (en) * 2021-12-06 2022-03-18 深圳融昕医疗科技有限公司 Calibration system and calibration method for breathing machine

Similar Documents

Publication Publication Date Title
US10910853B2 (en) Quick charging method, power adapter and mobile terminal
CN106294250A (en) A kind of method keeping USB (universal serial bus) communication robust and relevant device
CN104578277B (en) For the method for charging for electronic equipment and electronic equipment
CN103545882B (en) Battery in-situ test method and device and battery charge system
CN103365388B (en) Power supply method of terminal device and terminal device
EP2854253B1 (en) Charger, charging terminal, charging system and control method for charging
CN105576727B (en) Method, device and system for quick charging
CN104467109B (en) Method for supplying power to electronic equipment and electronic equipment
CN102820682A (en) Device and method for communicating through universal serial bus (USB) interface and charging external device
JP2018513660A (en) CHARGE CONTROL METHOD AND DEVICE AND ELECTRONIC DEVICE
CN101853970A (en) Method and device for charging through universal serial bus (USB) interface
CN104485712B (en) Charging method and electronic equipment
CN105762883A (en) Method for charging electronic equipment, and electronic equipment
CN105576753A (en) Information processing method and electronic equipment
CN104617643A (en) Charging method, equipment to be charged, power supply equipment and charging system
CN103178980A (en) Network card management system
CN109412819A (en) Method and device for warning device power down
CN1987694A (en) Power source controller
JP7111803B2 (en) Charging method, terminal and computer storage medium
CN104954046A (en) Transmission method and device thereof based on power line communication
WO2016173081A1 (en) Method and device for implementing connection control
CN102209333B (en) Power supply control method and equipment
CN105743180B (en) Method and electronic equipment for charging for electronic equipment
CN104052131B (en) Charge control method, electric quantity monitoring device and charger
CN108254694A (en) A kind of battery operational data acquisition method, system and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170104

RJ01 Rejection of invention patent application after publication