CN107885688B - Signal switching method and device - Google Patents

Signal switching method and device Download PDF

Info

Publication number
CN107885688B
CN107885688B CN201610873166.3A CN201610873166A CN107885688B CN 107885688 B CN107885688 B CN 107885688B CN 201610873166 A CN201610873166 A CN 201610873166A CN 107885688 B CN107885688 B CN 107885688B
Authority
CN
China
Prior art keywords
terminal
switching
external devices
switching circuit
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610873166.3A
Other languages
Chinese (zh)
Other versions
CN107885688A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610873166.3A priority Critical patent/CN107885688B/en
Priority to PCT/CN2017/081525 priority patent/WO2018058946A1/en
Publication of CN107885688A publication Critical patent/CN107885688A/en
Application granted granted Critical
Publication of CN107885688B publication Critical patent/CN107885688B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • 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/10Program control for peripheral devices
    • 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/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • 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/42Bus transfer protocol, e.g. handshake; Synchronisation

Abstract

The embodiment of the invention discloses a signal switching method, which comprises the following steps: if the terminal is detected to be connected with at least two external devices through the switching device, identifying communication channels of transmission interfaces of the at least two external devices; the switching equipment is connected with the terminal through a transmission interface of the terminal; judging whether a first switching circuit or a second switching circuit is used for switching the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of the at least two external devices; the first switching circuit is arranged in the terminal, and the second switching circuit is arranged in the switching equipment. The embodiment of the invention also discloses a signal switching device.

Description

Signal switching method and device
Technical Field
The present invention relates to signal switching technologies in the field of communications, and in particular, to a signal switching method and apparatus.
Background
With the rapid development of scientific technology, Universal Serial Bus (USB) technology has also been rapidly developed, and with the widespread popularization and application of USB technology in mobile terminals, people have increasingly high requirements for USB connection technology. The USB Type-C connector has the advantages of 10 Gbit/second maximum data transmission speed, small size of an interface socket end, capability of supporting insertion of a front side and a back side and capability of providing large electric power, and is favored by more mobile terminal manufacturers. Although the USB Type-C interface is adopted to realize the communication connection with the external equipment, the design of the mobile phone body is simplified, a single USB Type-C interface enables the mobile phone to be incapable of simultaneously connecting two external equipment, for example, the charging and music listening of an earphone cannot be realized, and the user experience effect is poor.
Disclosure of Invention
In order to solve the technical problem, embodiments of the present invention desirably provide a signal switching method and apparatus, so as to solve the problem that only one external device can be connected to a terminal of an existing USB Type-C interface at the same time, and achieve the purpose of connecting at least two external devices at the same time, thereby improving the experience effect of a user.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
a method of signal switching, the method comprising:
if the terminal is detected to be connected with at least two external devices through the switching device, identifying communication channels of transmission interfaces of the at least two external devices; the switching equipment is connected with the terminal through a transmission interface of the terminal;
judging whether a first switching circuit or a second switching circuit is used for switching the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of the at least two external devices; the first switching circuit is arranged in the terminal, and the second switching circuit is arranged in the switching equipment.
Optionally, the determining, according to the communication channels of the transmission interfaces of the at least two external devices, whether to use the first switching circuit or the second switching circuit to switch the working mode of the transmission interface of the terminal includes:
judging whether the communication channels of the transmission interfaces of the at least two external devices are the same;
and if the communication channels of the transmission interfaces of the at least two external devices are the same, switching the working mode of the terminal to be the working mode corresponding to the communication mode of the external device connected with the preset transmission interface of the switching device.
Optionally, the method further includes:
and if the communication channels of the transmission interfaces of the at least two external devices are different, switching the working mode of the transmission interface of the terminal by using the first switching circuit or the second switching circuit according to the preset rule.
Optionally, if the communication channels of the transmission interfaces of the at least two external devices are different, the first switching circuit or the second switching circuit is used to switch the working mode of the transmission interface of the terminal according to the preset rule, including:
if the communication channels of the transmission interfaces of the at least two external devices are different, judging whether the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet preset conditions or not;
when the communication mode of the communication channels of the transmission interfaces of the at least two external devices meets the preset condition, switching the working mode of the transmission interface of the terminal by using the first switching circuit according to the preset rule;
and if the communication mode of the communication channels of the transmission interfaces of the at least two external devices does not meet the preset condition, switching the working mode of the transmission interface of the terminal by using the second switching circuit according to the preset rule.
Optionally, the switching the working mode of the transmission interface of the terminal according to the preset rule includes:
acquiring preset communication levels of the at least two external devices;
and according to the preset communication grade, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
Optionally, the switching the working mode of the transmission interface of the terminal according to the preset rule includes:
acquiring an access sequence for establishing connection between the at least two external devices and the terminal;
and according to the access sequence, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
A signal switching apparatus, the apparatus comprising: a recognition unit and a processing unit; wherein:
the identification unit is used for identifying the communication channels of the transmission interfaces of the at least two external devices if the fact that the terminal is connected with the at least two external devices through the switching device is detected; the switching equipment is connected with the terminal through a transmission interface of the terminal;
the processing unit is used for judging whether a first switching circuit or a second switching circuit is used for switching the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of the at least two pieces of external equipment; the first switching circuit is arranged in the terminal, and the second switching circuit is arranged in the switching equipment.
Optionally, the processing unit includes: the device comprises a judging module and a first processing module; wherein:
the judging module is used for judging whether the communication channels of the transmission interfaces of the at least two external devices are the same;
the first processing module is configured to switch the working mode of the terminal to a working mode corresponding to a communication mode of the external device connected to the preset transmission interface of the switching device if the communication channels of the transmission interfaces of the at least two external devices are the same.
Optionally, the processing unit further includes: a second processing module and a third processing module; wherein:
the second processing module is configured to use the first switching circuit or the second switching circuit if the communication channels of the transmission interfaces of the at least two external devices are different;
and the third processing module is used for switching the working mode of the transmission interface of the terminal according to the preset rule.
Optionally, the second processing module is specifically configured to, if the communication channels of the transmission interfaces of the at least two external devices are different, determine whether the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet a preset condition;
the second processing module is specifically configured to use the first switching circuit if the communication mode of the communication channel of the transmission interface of the at least two external devices meets the preset condition;
the second processing module is specifically configured to use the second switching circuit if the communication mode of the communication channel of the transmission interface of the at least two external devices does not satisfy the preset condition;
the third processing module is specifically configured to switch a working mode of a transmission interface of the terminal according to the preset rule.
Optionally, the third processing module is specifically configured to:
acquiring preset communication levels of the at least two external devices;
and according to the preset communication grade, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
Optionally, the third processing module is further specifically configured to:
acquiring an access sequence for establishing connection between the at least two external devices and the terminal;
and according to the access sequence, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
According to the signal switching method and device provided by the embodiment of the invention, when the terminal is detected to be connected with at least two external devices through the switching device, the communication channels of the transmission interfaces of the at least two external devices are identified, and then whether the working mode of the transmission interface of the terminal is switched by using the first switching circuit or the second switching circuit is judged according to the communication channels of the transmission interfaces of the at least two external devices; therefore, the terminal can be simultaneously connected with at least two external devices through the switching device, the problem that only one external device can be simultaneously connected in the terminal of the existing USB Type-C interface is solved, the purpose that at least two external devices can be simultaneously connected is achieved, and the experience effect of a user is improved.
Drawings
Fig. 1 is a schematic flowchart of an information switching method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another information switching method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another information switching method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information switching apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another information switching apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another information switching apparatus according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
An embodiment of the present invention provides a signal switching method, which is shown in fig. 1 and includes the following steps:
step 101, if it is detected that the terminal establishes connection with at least two external devices through the switching device, identifying communication channels of transmission interfaces of the at least two external devices.
The switching equipment is connected with the terminal through a transmission interface of the terminal.
Specifically, in step 101, if it is detected that the terminal establishes a connection with at least two external devices through the switching device, the communication channel for identifying the transmission interfaces of the at least two external devices may be implemented by the terminal. The switching equipment is a connection system, one end of the switching equipment is provided with an interface which can be matched and connected with a transmission interface of the terminal, the other end of the switching equipment is provided with a plurality of interfaces which can be connected with a plurality of external equipment, and the switching equipment is provided with a switching circuit which can be used for switching the working mode of the transmission interface of the terminal; the terminal also has a switching circuit which is different from the switching circuit of the switching equipment in working function and is used for switching the working mode of the terminal transmission interface, for example, the terminal can be a mobile phone, a tablet computer and other mobile equipment which are provided with the switching circuit, and the transmission interface of the terminal can be a USB Type-C interface; the external device may be a device capable of performing connection communication with the terminal through the relay device, and may be, for example, a charger, an earphone, a sound device, or the like.
Step 102, judging whether to use the first switching circuit or the second switching circuit to switch the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of at least two external devices.
The first switching circuit is arranged in the terminal, and the second switching circuit is arranged in the switching equipment.
Specifically, the step 102 determines whether to use the first switching circuit or the second switching circuit to switch the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of the at least two external devices. The terminal identifies and analyzes communication channels of transmission interfaces of at least two external devices connected through the switching device, determines whether to use the first switching circuit or the second switching circuit to switch the working mode of the terminal transmission interface according to an analysis result, and ensures that the at least two external devices can work normally according to a specific application scene.
According to the signal switching method provided by the embodiment of the invention, when the terminal is detected to be connected with at least two external devices through the switching device, the communication channels of the transmission interfaces of the at least two external devices are identified, and then whether the working mode of the transmission interface of the terminal is switched by using the first switching circuit or the second switching circuit is judged according to the communication channels of the transmission interfaces of the at least two external devices; therefore, the terminal can be simultaneously connected with at least two external devices through the switching device, the problem that only one external device can be simultaneously connected in the terminal of the existing USB Type-C interface is solved, the purpose that at least two external devices can be simultaneously connected is achieved, and the experience effect of a user is improved.
An embodiment of the present invention provides a signal switching method, which is shown in fig. 2 and includes the following steps:
step 201, if it is detected that the terminal establishes connection with at least two external devices through the switching device, the terminal identifies communication channels of transmission interfaces of the at least two external devices.
The switching equipment is connected with the terminal through a transmission interface of the terminal.
Specifically, the example is given by establishing a communication connection between the terminal and a switching device capable of connecting two external devices, where the two external devices may be an earphone and a charger, two earphones, or an earphone and a device performing data transmission with the terminal through a data line, and the terminal identifies the working modes of the two external devices accessed through the switching device, so as to determine a communication channel of a transmission interface used by the external device.
Step 202, the terminal judges whether the communication channels of the transmission interfaces of at least two external devices are the same.
Specifically, the terminal judges whether the communication channels of the transmission interfaces of the at least two external devices connected with the terminal through the switching device are the same or not, the judgment result includes that the communication channels of the transmission interfaces of the at least two external devices are the same or different, and the communication channels are different and include at least one signal transmission channel of the communication channels of the transmission interfaces of the at least two external devices. For example, when the two external devices are two earphones, the signal transmission channels of the transmission interfaces of the two earphones are both D + and D-, that is, the communication channels of the transmission interfaces of the two earphones are the same; when the two external devices are respectively an earphone and a charger, the signal transmission channels of the transmission interface of the earphone are D + and D-, and the signal transmission channels of the transmission interface of the charger are VBus, D + and D-, namely the D + and D-signal transmission channels of the transmission interfaces of the earphone and the charger are the same, but the charger also uses the VBus signal transmission channel, so that the communication channels of the earphone and the charger are different; when the two external devices are earphones and the device for data transmission with the terminal through the data line, the signal transmission channel of the transmission interface of the earphones is D + or D-, the signal transmission channel of the transmission interface of the device for data transmission with the terminal through the data line is RX or TX, the signal transmission channels of the transmission interfaces of the earphones and the device for data transmission with the terminal through the data line are different, and the communication channels of the earphones and the device for data transmission with the terminal through the data line are different.
After the terminal judges whether the communication channels of the transmission interfaces of the at least two external devices are the same in step 202, step 203 or step 204 can be selectively executed, if the communication channels of the transmission interfaces of the at least two external devices are the same, step 203 is executed, and if the communication channels of the transmission interfaces of the at least two external devices are different, step 204 is executed;
step 203, if the communication channels of the transmission interfaces of the at least two external devices are the same, the terminal switches the working mode of the terminal to the working mode corresponding to the communication mode of the external device connected with the preset transmission interface of the transfer device.
Specifically, the preset transmission interface of the switching device may be set when the terminal leaves a factory, and is any one transmission interface of the switching device, for example, the preset transmission interface may be a first transmission interface of the switching device. When the external equipment with the same at least two communication channels is connected with the terminal through the switching equipment, the terminal can communicate with the external equipment accessed to the preset transmission interface due to the fact that the at least two communication channels are the same, normal work of the external equipment is guaranteed, and circuit switching does not need to be carried out through the first switching circuit or the second switching circuit. For example, when two external devices are earphones with the same communication channel, the terminal recognizes the working mode of the communication mode of the two earphones and enters the working mode, and because the working modes of the two earphones are the same, the terminal can select the earphone connected to the first transmission interface of the switching device to communicate with the earphone so as to enable the switching device to work normally.
And 204, if the communication channels of the transmission interfaces of the at least two external devices are different, the terminal uses the first switching circuit or the second switching circuit to switch the working mode of the transmission interface of the terminal according to a preset rule.
Specifically, the preset rule is a rule for specifying how to switch the signal transmission channel of the terminal transmission interface by using the first switching circuit or the second switching circuit in order to ensure that at least two external devices with different communication channels of the transmission interface operate normally.
In step 204, switching the working mode of the transmission interface of the terminal according to the preset rule may be implemented by:
a. the terminal obtains the preset communication grades of at least two external devices.
b. And according to the preset communication grade, the terminal uses the first switching circuit or the second switching circuit to sequentially switch the working mode of the transmission interface of the terminal into the working mode corresponding to the communication mode of the external equipment.
Specifically, the preset communication level of the external device may be determined according to the importance level of communication between the external device and the terminal or the influence on the terminal. For example, since charging is the most influential factor on the functions of the mobile phone, in the preset communication level: the communication grade of the charger is the highest, the communication grade of the earphone is the second, and the communication grade of the equipment for data transmission with the terminal through the data line is the lowest. The connection between a terminal and a switching device which can be connected with three external devices is taken as an example for explanation, when The three external devices are an earphone, a standard charger and a device which performs data transmission with The terminal through a data line and simultaneously establishes connection with The terminal through The switching device, The terminal identifies that The working mode of The earphone is an earphone mode, The working mode of The standard charger is a charging mode, The working mode of The device which performs data transmission with The terminal through The data line is an OTG (On-The-Go) mode, a signal transmission channel corresponding to The earphone mode is D +, D-, a signal transmission channel corresponding to The charging mode is VBus, D +, D-, and a signal transmission channel corresponding to The OTG mode is RX and TX; according to a preset communication level, the terminal firstly communicates with a standard charger, and the working mode of the terminal is the same as that (VBus, D + and D-) of the standard charger at the moment; then when the standard charger charges the terminal stably, the terminal sends a control command to the switching equipment, the working mode of a transmission interface of the terminal is switched to be the working mode (earphone mode) of the earphone by using a second switching circuit, namely the standard charger is ensured to charge the terminal through a VBus signal transmission channel, D + and D-signal transmission is switched to the left channel and the right channel of the earphone, and communication is established with the earphone to enable the earphone to work normally; finally, after the earphone works normally, the terminal uses the first switching circuit to switch the working mode of the transmission interface of the terminal to be the working mode (OTG mode) of the equipment which transmits data with the terminal through the data line, the signal transmission channels RX and TX are switched to the data line, communication between the equipment which transmits data with the terminal through the data line is established, and the equipment works normally.
It should be noted that, for the explanation of the same steps or concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described here.
According to the signal switching method provided by the embodiment of the invention, when the terminal is detected to be connected with at least two external devices through the switching device, the communication channels of the transmission interfaces of the at least two external devices are identified, and then whether the working mode of the transmission interface of the terminal is switched by using the first switching circuit or the second switching circuit is judged according to the communication channels of the transmission interfaces of the at least two external devices; therefore, the terminal can be simultaneously connected with at least two external devices through the switching device, the problem that only one external device can be simultaneously connected in the terminal of the existing USB Type-C interface is solved, the purpose that at least two external devices can be simultaneously connected is achieved, and the experience effect of a user is improved.
An embodiment of the present invention provides a signal switching method, which is shown in fig. 3 and includes the following steps:
step 301, if it is detected that the terminal establishes connection with at least two external devices through the switching device, the terminal identifies communication channels of transmission interfaces of the at least two external devices.
The switching equipment is connected with the terminal through a transmission interface of the terminal.
Step 302, the terminal determines whether the communication channels of the transmission interfaces of the at least two external devices are the same.
After the terminal judges whether the communication channels of the transmission interfaces of the at least two external devices are the same or not in step 302, step 303 or steps 304 to 306 can be selected to be executed, if the communication channels of the transmission interfaces of the at least two external devices are the same, step 303 is executed, and if the communication channels of the transmission interfaces of the at least two external devices are different, steps 304 to 306 are executed;
step 303, if the communication channels of the transmission interfaces of the at least two external devices are the same, the terminal switches the working mode of the terminal to the working mode corresponding to the communication mode of the external device connected to the preset transmission interface of the transfer device.
Step 304, if the communication channels of the transmission interfaces of the at least two external devices are different, the terminal determines whether the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet a preset condition.
Specifically, the preset condition is that a signal transmission channel of a communication channel of the transmission interface of the external device is not short-circuited, for example, the preset condition may be that the D + and D-signal transmission channels are not short-circuited.
If the communication channels of the transmission interfaces of the at least two external devices are different in step 304, after the terminal determines whether the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet the preset condition, step 305 or step 306 may be selectively executed, if the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet the preset condition, step 305 is executed, and if the communication modes of the communication channels of the transmission interfaces of the at least two external devices do not meet the preset condition, step 306 is executed.
Step 305, if the communication mode of the communication channels of the transmission interfaces of the at least two external devices meets the preset condition, the terminal uses the first switching circuit to switch the working mode of the transmission interface of the terminal according to the preset rule.
And step 306, if the communication mode of the communication channels of the transmission interfaces of the at least two external devices does not meet the preset condition, the terminal uses the second switching circuit to switch the working mode of the transmission interface of the terminal according to the preset rule.
The switching of the operation mode of the transmission interface of the terminal according to the preset rule in step 305 and step 306 may be implemented as follows:
a. the terminal acquires an access sequence of the connection between at least two external devices and the terminal.
b. And according to the access sequence, the terminal uses the first switching circuit or the second switching circuit to sequentially switch the working mode of the transmission interface of the terminal into the working mode corresponding to the communication mode of the external equipment.
Specifically, when the external device is connected with the terminal through the switching device, the external device has an access sequence, when the terminal detects that the external device is accessed first, the working mode of the external device is identified, the working mode of a transmission interface of the terminal is switched to the working mode of the external device, and communication connection is established with the external device to realize communication; and then detecting whether other equipment is accessed to other interfaces of the switching equipment, identifying the working mode of the equipment when other equipment is accessed, and then switching the working mode of the transmission interface of the terminal by using a first switching circuit to realize the normal work of at least two pieces of equipment. It should be noted that, when the terminal detects that the charger is connected to the terminal through the adapter device after detecting that the other external device is first connected to the terminal through the adapter device, the terminal firstly terminates the communication between other external devices and the terminal, is in communication connection with the charger, identifies the communication channel of the charger, the working mode of the transmission interface of the terminal is switched to realize the charging of the terminal, when the charger is charged stably, according to the relation between the two channels of the signal transmission channel D + and D-of the charger, a first switching circuit in the terminal or a second switching circuit in the switching equipment is selected to switch the D + and D-signal transmission channels, the working mode of a transmission interface of the switching terminal is a working mode corresponding to other external equipment, and the normal charging of the terminal is guaranteed while the other external equipment also works normally. Taking the example that the terminal is externally connected with three external devices (a flash disk, a non-standard charger and an earphone) through the adapter device, if the sequence of the three external devices accessing the terminal is as follows: non-standard chargers, flash disks and earphones; firstly, a terminal detects that a non-standard charger is connected to a switching device, the terminal identifies that the working mode of the non-standard charger is a charging mode, and switches the working mode of a transmission interface of the terminal to be the charging mode, so that the terminal is charged; when the switching equipment is detected to have the access of the USB flash disk and the non-standard charger stably charges the terminal, the terminal identifies that the working mode of the USB flash disk is an OTG mode and switches the working mode of a transmission interface of the terminal to the OTG mode, so that data transmission communication between the terminal and the USB flash disk is realized; whether external equipment is connected to other interfaces of the switching equipment is continuously detected while the non-standard charger is used for charging and the USB flash disk is charged, when the terminal detects that the earphone is connected to the terminal through the switching equipment and stably transmits data with the USB flash disk, the working mode of the earphone is identified, the working mode of the transmission interface of the terminal is switched to the earphone mode through the first switching circuit, and finally normal communication between the non-standard charger, the USB flash disk and the earphone and the terminal is achieved through the switching equipment. After the terminal detects the USB flash disk of the non-standard charger in the access sequence, the terminal firstly terminates the communication between the USB flash disk and the terminal, or after the terminal detects the earphone of the non-standard charger in the access sequence, the terminal firstly terminates the communication between the USB flash disk and the terminal and between the earphone and the terminal, establishes communication connection with the non-standard charger, and then uses the first switching circuit to switch the working mode of the terminal, so as to realize the communication between the USB flash disk and the terminal, and between the earphone and the terminal.
It should be noted that, for the explanation of the same steps or concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described here.
According to the signal switching method provided by the embodiment of the invention, when the terminal is detected to be connected with at least two external devices through the switching device, the communication channels of the transmission interfaces of the at least two external devices are identified, and then whether the working mode of the transmission interface of the terminal is switched by using the first switching circuit or the second switching circuit is judged according to the communication channels of the transmission interfaces of the at least two external devices; therefore, the terminal can be simultaneously connected with at least two external devices through the switching device, the problem that only one external device can be simultaneously connected in the terminal of the existing USB Type-C interface is solved, the purpose that at least two external devices can be simultaneously connected is achieved, and the experience effect of a user is improved.
An embodiment of the present invention provides a signal switching apparatus 4, which can be applied to a signal switching method provided in the embodiment corresponding to fig. 1 to 3, and as shown in fig. 4, the apparatus includes: an identification unit 41 and a processing unit 42, wherein:
the identifying unit 41 is configured to identify a communication channel of a transmission interface of at least two external devices if it is detected that the terminal is connected to the at least two external devices through the switching device.
The switching equipment is connected with the terminal through a transmission interface of the terminal.
And the processing unit 42 is configured to determine whether to use the first switching circuit or the second switching circuit to switch the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of the at least two external devices.
The first switching circuit is arranged in the terminal, and the second switching circuit is arranged in the switching equipment.
According to the signal switching device provided by the embodiment of the invention, when the terminal is detected to be connected with at least two external devices through the switching device, the communication channels of the transmission interfaces of the at least two external devices are identified, and then whether the working mode of the transmission interface of the terminal is switched by using the first switching circuit or the second switching circuit is judged according to the communication channels of the transmission interfaces of the at least two external devices; therefore, the terminal can be simultaneously connected with at least two external devices through the switching device, the problem that only one external device can be simultaneously connected in the terminal of the existing USB Type-C interface is solved, the purpose that at least two external devices can be simultaneously connected is achieved, and the experience effect of a user is improved.
Specifically, as shown in fig. 5, the processing unit 42 includes: a judging module 421 and a first processing module 422, wherein:
the determining module 421 is configured to determine whether communication channels of transmission interfaces of at least two external devices are the same.
The first processing module 422 is configured to, if the communication channels of the transmission interfaces of the at least two external devices are the same, switch the working mode of the terminal to a working mode corresponding to the communication mode of the external device connected to the preset transmission interface of the transfer device.
Specifically, referring to fig. 6, the processing unit 42 further includes: a second processing module 423 and a third processing module 424, wherein:
the second processing module 423 is configured to use the first switching circuit or the second switching circuit if the communication channels of the transmission interfaces of the at least two external devices are different.
The third processing module 424 is configured to switch an operating mode of the transmission interface of the terminal according to a preset rule.
Further specifically, the second processing module 423 is specifically configured to determine whether the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet the preset condition if the communication channels of the transmission interfaces of the at least two external devices are different.
The second processing module 423 is specifically configured to use the first switching circuit if the communication mode of the communication channel of the transmission interface of the at least two external devices meets a preset condition.
The second processing module 423 is specifically further configured to use the second switching circuit when the communication mode of the communication channel of the transmission interface of the at least two external devices does not satisfy the preset condition.
The third processing module 424 is specifically configured to switch the working mode of the transmission interface of the terminal according to a preset rule.
Further, the third processing module 424 is specifically configured to perform the following steps:
and acquiring the preset communication levels of at least two external devices.
And according to the preset communication grade, sequentially switching the working mode of the transmission interface of the terminal into the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
Further optionally, the third processing module 424 is specifically further configured to perform the following steps:
and acquiring an access sequence for establishing connection between at least two external devices and the terminal.
And according to the access sequence, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
It should be noted that, in the interaction process between each unit and each module in this embodiment, reference may be made to the interaction process in the signal switching method provided in the embodiments corresponding to fig. 1 to 3, and details are not described here.
According to the signal switching device provided by the embodiment of the invention, when the terminal is detected to be connected with at least two external devices through the switching device, the communication channels of the transmission interfaces of the at least two external devices are identified, and then whether the working mode of the transmission interface of the terminal is switched by using the first switching circuit or the second switching circuit is judged according to the communication channels of the transmission interfaces of the at least two external devices; therefore, the terminal can be simultaneously connected with at least two external devices through the switching device, the problem that only one external device can be simultaneously connected in the terminal of the existing USB Type-C interface is solved, the purpose that at least two external devices can be simultaneously connected is achieved, and the experience effect of a user is improved.
In practical applications, the identification Unit 41, the judgment Unit 42, the judgment module 421, the first Processing module 422, the second Processing module 423, and the third Processing module 424 may be implemented by a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like in the wireless data transmission device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (8)

1. A method of signal switching, the method comprising:
if the terminal is detected to be connected with at least two external devices through the switching device, identifying communication channels of transmission interfaces of the at least two external devices; the switching equipment is connected with the terminal through a transmission interface of the terminal;
judging whether a first switching circuit or a second switching circuit is used for switching the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of the at least two external devices; the first switching circuit is arranged in the terminal, and the second switching circuit is arranged in the switching equipment;
wherein, the determining whether to use the first switching circuit or the second switching circuit to switch the working mode of the transmission interface of the terminal according to the communication channel of the transmission interface of the at least two external devices includes: judging whether the communication channels of the transmission interfaces of the at least two external devices are the same or not, and if the communication channels of the transmission interfaces of the at least two external devices are not the same, switching the working mode of the transmission interface of the terminal according to a preset rule by using the first switching circuit or the second switching circuit;
if the communication channels of the transmission interfaces of the at least two external devices are different, the first switching circuit or the second switching circuit is used for switching the working mode of the transmission interface of the terminal according to the preset rule, and the method comprises the following steps:
if the communication channels of the transmission interfaces of the at least two external devices are different, judging whether the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet a preset condition, wherein the preset condition is that the signal transmission channels of the communication channels of the transmission interfaces of the external devices are not short-circuited;
when the communication mode of the communication channels of the transmission interfaces of the at least two external devices meets the preset condition, switching the working mode of the transmission interface of the terminal by using the first switching circuit according to the preset rule;
and if the communication mode of the communication channels of the transmission interfaces of the at least two external devices does not meet the preset condition, switching the working mode of the transmission interface of the terminal by using the second switching circuit according to the preset rule.
2. The method according to claim 1, wherein the determining whether to switch the operating mode of the transmission interface of the terminal using the first switching circuit or the second switching circuit according to the communication channel of the transmission interface of the at least two external devices comprises:
and if the communication channels of the transmission interfaces of the at least two external devices are the same, switching the working mode of the terminal to be the working mode corresponding to the communication mode of the external device connected with the preset transmission interface of the switching device.
3. The method according to claim 1, wherein the switching the operation mode of the transmission interface of the terminal according to the preset rule comprises:
acquiring preset communication levels of the at least two external devices;
and according to the preset communication grade, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
4. The method according to claim 1, wherein the switching the operation mode of the transmission interface of the terminal according to the preset rule comprises:
acquiring an access sequence for establishing connection between the at least two external devices and the terminal;
and according to the access sequence, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
5. A signal switching apparatus, the apparatus comprising: a recognition unit and a processing unit; wherein:
the identification unit is used for identifying the communication channels of the transmission interfaces of the at least two external devices if the fact that the terminal is connected with the at least two external devices through the switching device is detected; the switching equipment is connected with the terminal through a transmission interface of the terminal;
the processing unit is used for judging whether a first switching circuit or a second switching circuit is used for switching the working mode of the transmission interface of the terminal according to the communication channels of the transmission interfaces of the at least two pieces of external equipment; the first switching circuit is arranged in the terminal, and the second switching circuit is arranged in the switching equipment;
wherein the processing unit comprises: a judgment module, a second processing module and a third processing module,
the judging module is used for judging whether the communication channels of the transmission interfaces of the at least two external devices are the same;
the second processing module is configured to use the first switching circuit or the second switching circuit if the communication channels of the transmission interfaces of the at least two external devices are different;
the third processing module is used for switching the working mode of the transmission interface of the terminal according to a preset rule;
the second processing module is specifically configured to, if the communication channels of the transmission interfaces of the at least two external devices are different, determine whether the communication modes of the communication channels of the transmission interfaces of the at least two external devices meet a preset condition, where the preset condition is that a signal transmission channel of the communication channel of the transmission interface of the external device is not short-circuited;
the second processing module is specifically configured to use the first switching circuit if the communication mode of the communication channel of the transmission interface of the at least two external devices meets the preset condition;
the second processing module is specifically configured to use the second switching circuit if the communication mode of the communication channel of the transmission interface of the at least two external devices does not satisfy the preset condition;
the third processing module is specifically configured to switch a working mode of a transmission interface of the terminal according to the preset rule.
6. The apparatus of claim 5, wherein the processing unit further comprises: a first processing module; wherein: the first processing module is configured to switch the working mode of the terminal to a working mode corresponding to a communication mode of the external device connected to the preset transmission interface of the switching device if the communication channels of the transmission interfaces of the at least two external devices are the same.
7. The apparatus according to claim 5, wherein the third processing module is specifically configured to:
acquiring preset communication levels of the at least two external devices;
and according to the preset communication grade, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
8. The apparatus according to claim 5, wherein the third processing module is further specifically configured to:
acquiring an access sequence for establishing connection between the at least two external devices and the terminal;
and according to the access sequence, sequentially switching the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external equipment by using the first switching circuit or the second switching circuit.
CN201610873166.3A 2016-09-30 2016-09-30 Signal switching method and device Active CN107885688B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610873166.3A CN107885688B (en) 2016-09-30 2016-09-30 Signal switching method and device
PCT/CN2017/081525 WO2018058946A1 (en) 2016-09-30 2017-04-21 Method and device for signal switching, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610873166.3A CN107885688B (en) 2016-09-30 2016-09-30 Signal switching method and device

Publications (2)

Publication Number Publication Date
CN107885688A CN107885688A (en) 2018-04-06
CN107885688B true CN107885688B (en) 2021-06-04

Family

ID=61763145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610873166.3A Active CN107885688B (en) 2016-09-30 2016-09-30 Signal switching method and device

Country Status (2)

Country Link
CN (1) CN107885688B (en)
WO (1) WO2018058946A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108430005B (en) * 2018-04-26 2021-04-09 努比亚技术有限公司 Audio circuit, audio judgment method and mobile terminal
CN108874708B (en) * 2018-06-28 2021-08-10 努比亚技术有限公司 OTG device, terminal charging method, mobile terminal and computer readable storage medium
WO2021087749A1 (en) * 2019-11-05 2021-05-14 深圳市大疆创新科技有限公司 Switching control method, electronic device and computer readable storage medium
CN114297108A (en) * 2021-12-16 2022-04-08 深圳市格安电子有限公司 Multifunctional multi-protocol interface converter

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202856125U (en) * 2012-08-09 2013-04-03 深圳市江波龙电子有限公司 Data line and system using the data line
CN205122952U (en) * 2015-10-28 2016-03-30 乐视移动智能信息技术(北京)有限公司 Earphone converter
CN205159720U (en) * 2015-12-07 2016-04-13 乐视致新电子科技(天津)有限公司 USB -Type -C interface converter
CN105867874A (en) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 A user device
CN105896221A (en) * 2016-05-17 2016-08-24 乐视控股(北京)有限公司 Adaptor and double-sided magnetic type conversion assembly

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202997245U (en) * 2012-11-12 2013-06-12 林伟进 USB (Universal Serial Bus) multipurpose adaption device
CN104426025B (en) * 2013-09-03 2018-04-17 鸿富锦精密工业(深圳)有限公司 Electronic device connects system
TWM482862U (en) * 2013-10-22 2014-07-21 A & A Digital Technology Co Ltd Docking device
CN104149689B (en) * 2014-09-04 2016-02-10 北京汽车研究总院有限公司 A kind of audio output device and automobile

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202856125U (en) * 2012-08-09 2013-04-03 深圳市江波龙电子有限公司 Data line and system using the data line
CN205122952U (en) * 2015-10-28 2016-03-30 乐视移动智能信息技术(北京)有限公司 Earphone converter
CN205159720U (en) * 2015-12-07 2016-04-13 乐视致新电子科技(天津)有限公司 USB -Type -C interface converter
CN105867874A (en) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 A user device
CN105896221A (en) * 2016-05-17 2016-08-24 乐视控股(北京)有限公司 Adaptor and double-sided magnetic type conversion assembly

Also Published As

Publication number Publication date
CN107885688A (en) 2018-04-06
WO2018058946A1 (en) 2018-04-05

Similar Documents

Publication Publication Date Title
US9904267B2 (en) Method and apparatus for determining direction of power delivery
CN108666826B (en) Adapter, terminal equipment and adapter system
US7949802B2 (en) Enhanced communication via a serial interface
CN107885688B (en) Signal switching method and device
CN106571663B (en) Charging method, terminal and charging adapter
US10389153B2 (en) Charging control method and mobile terminal
EP2879014A1 (en) Tablet interface extension method and device
CN105576727B (en) Method, device and system for quick charging
CN105762863B (en) A kind of charging method and charging unit
CN105281398A (en) Portable device, cable assembly, and USB system
CN103376871A (en) System, apparatus, and method of performing charging operation in host mode
EP3820168A1 (en) Microphone hole blockage detection method and related product
WO2017197736A1 (en) Charging method, charger and terminal
CN105956458A (en) Interaction control method and device for terminals
US20180097315A1 (en) Power adapter, terminal device, charging system, and charging method
CN110492575B (en) Quick charging system and method for handheld device and handheld device
CN113949167A (en) Charging device and electronic equipment
CN205015885U (en) Switching circuit and electron device
CN105048018A (en) Charging method and device for terminal having on-the-go (OTG) function
CN109275058B (en) Dual mode earphone system, bluetooth device and cable
CN107276180B (en) Charging control method, device and system and user equipment
CN103036276B (en) Charger, terminal, controller, system and charger recognition method
CN106774769B (en) Terminal working mode switching method and device and handheld terminal
CN106856289B (en) Electronic equipment and circuit thereof, switching equipment and circuit thereof and signal processing system
CN106899061B (en) Mobile terminal, charging device and charging method

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