WO2018058946A1 - 一种信号切换方法和装置、计算机存储介质 - Google Patents

一种信号切换方法和装置、计算机存储介质 Download PDF

Info

Publication number
WO2018058946A1
WO2018058946A1 PCT/CN2017/081525 CN2017081525W WO2018058946A1 WO 2018058946 A1 WO2018058946 A1 WO 2018058946A1 CN 2017081525 W CN2017081525 W CN 2017081525W WO 2018058946 A1 WO2018058946 A1 WO 2018058946A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
external devices
transmission interface
switching circuit
communication
Prior art date
Application number
PCT/CN2017/081525
Other languages
English (en)
French (fr)
Inventor
张静
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018058946A1 publication Critical patent/WO2018058946A1/zh

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

Definitions

  • USB Universal Serial Bus
  • the USB Type-C connector has the advantages of maximum data transmission speed of 10 Gbit/s, small size of the interface socket end, support for both front and back sides, and large power supply, which has been favored by many mobile terminal manufacturers.
  • the USB Type-C interface is used to realize the communication connection with the external device, the design of the mobile phone body is simplified, but a single USB Type-C interface makes it impossible to connect two external devices at the same time, for example, it is impossible to insert the earphone while charging. Listening to music leads to poor user experience.
  • the embodiment of the present disclosure is to provide a signal switching method and device, and a computer storage medium, which solves the problem that only one external device can be connected at the same time in the terminal of the existing USB Type-C interface, and the Connect at least two external devices to improve the user experience.
  • a signal switching method comprising:
  • Identifying a communication channel of the transmission interface of the at least two external devices by detecting that the terminal establishes a connection with the at least two external devices through the switching device; wherein the switching device passes the transmission interface of the terminal and the Terminal connection
  • the determining, according to the communication channel of the transmission interface of the at least two external devices, 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 include:
  • the working mode of the terminal is switched to an operation mode corresponding to the communication mode of the external device connected to the preset transmission interface of the switching device.
  • the method further includes:
  • 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.
  • the first switching circuit or the second switching circuit is used according to the preset rule. Switching the working mode of the transmission interface of the terminal, including:
  • the first switching circuit is used to switch the working mode of the transmission interface of the terminal according to the preset rule
  • the second switching circuit is used to switch the working mode of the transmission interface of the terminal according to the preset rule.
  • the working mode of the transmission interface of the terminal is switched according to a preset rule, including:
  • the working mode of the transmission interface of the terminal is switched according to a preset rule, including:
  • the first switching circuit or the second switching circuit is used to sequentially switch the working mode of the transmission interface of the terminal to an operating mode corresponding to the communication mode of the external device.
  • a signal switching device comprising: an identification unit and a processing unit; wherein:
  • the identification unit is configured to identify a communication channel of a transmission interface of the at least two external devices by detecting that the terminal establishes a connection with the at least two external devices through the switching device; wherein the switching device passes the The transmission interface of the terminal is connected to the terminal;
  • the processing unit is configured to determine, according to a communication channel of the transmission interface of the at least two external devices, whether to switch the working mode of the transmission interface of the terminal by using the first switching circuit or the second switching circuit; a switching circuit is disposed in the terminal, the second A switching circuit is provided in the switching device.
  • the processing unit includes: a determining module and a first processing module; wherein:
  • the determining module is configured to determine 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: 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 be an external device connected to the preset transmission interface of the switching device.
  • the working mode corresponding to the communication mode.
  • 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;
  • the third processing module is configured to switch an operation mode of the transmission interface of the terminal according to the preset rule.
  • the second processing module is configured to determine, if the communication channels of the transmission interfaces of the at least two external devices are different, determine the transmission interfaces of the at least two external devices. Whether the communication mode of the communication channel meets the preset condition;
  • the second processing module is further 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 satisfies the preset condition;
  • the second processing module is further 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 meet the preset condition;
  • the third processing module is specifically configured to switch the working mode of the transmission interface of the terminal according to the preset rule.
  • the third processing module is specifically configured to:
  • the third processing module is further configured to:
  • the first switching circuit or the second switching circuit is used to sequentially switch the working mode of the transmission interface of the terminal to an operating mode corresponding to the communication mode of the external device.
  • the identification unit, the processing unit, the determining module, the first processing module, the second processing module, and the third processing module may use a central processing unit (CPU, Central Processing) when performing processing. Unit), Digital Signal Processor (DSP, Digital Singnal Processor) or Field-Programmable Gate Array (FPGA).
  • CPU Central Processing
  • DSP Digital Signal Processor
  • FPGA Field-Programmable Gate Array
  • a computer storage medium having stored therein computer executable instructions configured to perform the signal switching method described above.
  • the signal switching scheme when detecting that the terminal establishes a connection with the at least two external devices through the switching device, identifies a communication channel of the transmission interface of the at least two external devices, and then according to the at least two external devices
  • the communication channel of the transmission interface determines whether the first switching circuit or the second switching circuit is used to switch the working mode of the transmission interface of the terminal; thus, the terminal can simultaneously connect at least two external devices through the switching device, thereby solving the existing USB Type-
  • the problem that only one external device can be connected to the terminal of the C interface can achieve the simultaneous connection of at least two external devices, thereby improving the user experience.
  • FIG. 1 is a schematic flowchart diagram of an information switching method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of another information switching method according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic flowchart of still another method for information switching according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an information switching apparatus according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of another information switching apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of still another information switching apparatus according to an embodiment of the present disclosure.
  • An embodiment of the present disclosure provides a signal switching method. Referring to FIG. 1, the method includes the following steps:
  • Step 101 If it is detected that the terminal establishes a connection with the 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.
  • the transit device is connected to the terminal through a transmission interface of the terminal.
  • the communication channel identifying the transmission interface of the at least two external devices may be implemented by the terminal.
  • the switching device is a connection system, and one end of the switching device has an interface, which can be matched with the transmission interface of the terminal, and the other end has multiple interfaces, and can connect multiple external devices, and the switching device can be used for Switching circuit for switching the working mode of the terminal transmission interface; the terminal also has a switching circuit for switching the working mode of the terminal transmission interface, which is different from the switching circuit working function of the switching device, for example, the terminal may be a mobile phone with a switching circuit, For a mobile device such as a tablet computer, the transmission interface of the terminal may be a USB Type-C interface; the external device may be a device capable of connecting and communicating with the terminal through the switching device, such as a charger, a headset, an audio device, and the like.
  • Step 102 Determine, according to a communication channel of the transmission interface 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.
  • the first switching circuit is disposed in the terminal, and the second switching circuit is disposed in the switching device.
  • step 102 determines, according to the communication channel of the transmission interface of the at least two external devices, whether the working mode of the transmission interface of the first switching circuit or the second switching circuit switching terminal is implemented by the terminal.
  • the terminal identifies and analyzes the communication channel of the transmission interface of the at least two external devices connected by the switching device, and 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 the analysis result, according to the specific The application scenario ensures that at least two external devices work properly.
  • the signal switching method when detecting that the terminal establishes a connection with the at least two external devices through the switching device, identifying communication channels of the transmission interfaces of the at least two external devices, and then according to at least two external devices
  • the communication channel of the transmission interface determines whether the first switching circuit or the second switching circuit is used to switch the working mode of the transmission interface of the terminal; thus, the terminal can simultaneously connect at least two external devices through the switching device, thereby solving the existing USB Type
  • the problem that only one external device can be connected to the terminal of the -C interface enables the connection of at least two external devices at the same time, thereby improving the user experience.
  • the embodiment of the present disclosure provides a signal switching method. Referring to FIG. 2, the method includes the following steps:
  • Step 201 If it is detected that the terminal establishes a connection with the at least two external devices through the switching device, the terminal identifies a communication channel of the transmission interface of the at least two external devices.
  • the transit device is connected to the terminal through a transmission interface of the terminal.
  • the terminal establishes a communication connection with a switching device that can connect two external devices, wherein the two external devices can be a headset and a charger, two earphones or a headset, and data is transmitted through the data line and the terminal.
  • the transmitting device, etc. the terminal identifies the working mode of the two external devices accessed through the switching device, thereby determining the communication channel of the transmission interface used by the external device.
  • Step 202 The terminal determines whether the communication channels of the transmission interfaces of the at least two external devices are the same.
  • the terminal determines whether the communication channels of the transmission interfaces of the at least two external devices connected to the terminal by the switching device are the same, and the determination result includes that the communication channels of the transmission interfaces of the at least two external devices are the same and different, wherein the communication channel is not At least one of the signal transmission channels of the communication channel including the transmission interface of at least two external devices is different.
  • the signal transmission channels of the transmission interfaces of the two earphones are 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 earphones
  • the signal transmission channel of the transmission interface of the earphone is D+, D-
  • the signal transmission channel of the transmission interface of the charger is VBus, D+, D-, that is, the D+ and D- of the transmission interface of the earphone and the charger.
  • the signal transmission channels are the same, but the charger also uses the VBus signal transmission channel, so the communication channel between the earphone and the charger is different; when the two external devices are headphones and devices that transmit data through the data line and the terminal, the earphones
  • the signal transmission channel of the transmission interface is D+, D-, and the signal transmission channel of the transmission interface of the device for data transmission through the data line and the terminal is RX, TX, the transmission interface of the earphone and the device for data transmission through the data line and the terminal.
  • the signal transmission channels are different, and the communication channels of the headphones and the devices that transmit data through the data lines to the terminals are different.
  • step 203 or step 204 is performed. If the communication channels of the transmission interfaces of the at least two external devices are the same, step 203 is performed, if at least The communication channels of the transmission interfaces of the two external devices are different, and step 204 is performed;
  • Step 203 If the communication channels of the transmission interfaces of the at least two external devices are the same, the working mode of the terminal switching terminal is an operation mode corresponding to the communication mode of the external device connected to the preset transmission interface of the switching device.
  • the preset transmission interface of the transit device may be set when the terminal is shipped from the factory, and is any one of the transmission interfaces of the transit device, for example, may be the first transmission interface of the transit device.
  • At least two external devices with the same communication channel establish a connection with the terminal through the switching device, At least two communication channels are the same, so the terminal can communicate with an external device connected to the preset transmission interface to ensure that the external device works normally, and does not need to use the first switching circuit or the second switching circuit to perform circuit switching.
  • the terminal recognizes the working mode of the two earphone communication modes and enters the working mode. Since the working modes of the two headphones are the same, the terminal can select the switching device.
  • a headset connected to a transmission interface communicates with it to make it work normally.
  • Step 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.
  • the preset rule is to ensure that at least two external devices whose communication channels of the transmission interface are different are working normally, and how to use the first switching circuit or the second switching circuit to switch the signal transmission channel of the terminal transmission interface.
  • the working mode of the transmission interface of the terminal in accordance with the preset rule in step 204 can be implemented by:
  • the terminal acquires a preset communication level of at least two external devices.
  • the terminal sequentially switches the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external device by using the first switching circuit or the second switching circuit.
  • the preset communication level of the external device may be determined according to the importance of the communication between the external device and the terminal or the impact on the terminal. For example, since charging is the most influential factor on the function of the mobile phone, in the preset communication level: the communication level of the charger can be set to be the highest, the communication level of the earphone is second, and the communication level of the device transmitting data through the data line and the terminal. lowest.
  • the connection between the terminal and the transfer device that can connect three external devices is taken as an example. When the three external devices are the earphone, the standard charger, and the device that performs data transmission through the data line and the terminal, the connection device is connected to the terminal through the transfer device.
  • the terminal When the terminal recognizes that the working mode of the earphone is the earphone Mode, standard charger working mode is charging mode, the data transmission mode of the device through the data line and the terminal is OTG (On-The-Go) mode, OTG function is simple, mobile phone, tablet The OTG is convenient for users to connect the mobile phone with a USB flash drive, a mobile hard disk, a mouse and keyboard, other digital devices, etc., and can use its functions normally.
  • the signal transmission channel corresponding to the headphone mode is D+, D-
  • the signal transmission channel corresponding to the charging mode is VBus, D+, D-
  • the signal transmission channel corresponding to the OTG mode is RX, TX; according to the preset communication level, the terminal first and the standard The charger communicates.
  • the working mode of the terminal is the same as the working mode of the standard charger (VBus, D+, D-); then when the standard charger charges the terminal stably, the terminal sends a control command to the switching device, using the first
  • the working mode of the transmission interface of the switching circuit switching terminal is the working mode of the earphone (such as the earphone mode), that is, the standard charger is charged to the terminal through the VBus signal transmission channel, and the D+, D- signal transmission is switched to the left and right sound of the earphone.
  • the channel establishes communication with the earphone to make the earphone 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 the working mode of the device for data transmission through the data line and the terminal (such as the OTG mode). ), switching the signal transmission channels RX, TX to the data line, and establishing a device for data transmission through the data line and the terminal Communication, so that the device is working.
  • the signal switching method when detecting that the terminal establishes a connection with the at least two external devices through the switching device, identifying communication channels of the transmission interfaces of the at least two external devices, and then according to at least two external devices
  • the communication channel of the transmission interface determines whether the first switching circuit or the second switching circuit is used to switch the working mode of the transmission interface of the terminal; thus, the terminal can simultaneously connect at least two external devices through the switching device, thereby solving the existing USB Type
  • the problem that only one external device can be connected to the terminal of the -C interface enables the connection of at least two external devices at the same time, thereby improving the user experience.
  • the embodiment of the present disclosure provides a signal switching method. Referring to FIG. 3, the method includes the following steps:
  • Step 301 If it is detected that the terminal establishes a connection with the at least two external devices through the switching device, the terminal identifies a communication channel of the transmission interface of the at least two external devices.
  • the transit device is connected to 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.
  • the terminal may perform step 303 or steps 304 to 306. If the communication channels of the transmission interfaces of the at least two external devices are the same, step 303 is performed. If the communication channels of the transmission interfaces of the at least two external devices are different, steps 304 to 306 are performed;
  • Step 303 If the communication channels of the transmission interfaces of the at least two external devices are the same, the working mode of the terminal switching terminal is an operation mode corresponding to the communication mode of the external device connected to the preset transmission interface of the switching 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 mode of the communication channel of the transmission interfaces of the at least two external devices meets the preset condition.
  • the preset condition is that the signal transmission channel of the communication channel of the transmission interface of the external device is not shorted.
  • the preset condition may be that the D+ and D-signal transmission channels are not shorted.
  • the terminal determines whether the communication mode of the communication channel of the at least two external devices meets the preset condition, and then may perform step 305 or step. 306. If the communication mode of the communication channel of the transmission interface of the at least two external devices meets the preset condition, go to step 305. If the communication mode of the communication channel of the transmission interface of the at least two external devices does not meet the preset condition, go to step 306. .
  • Step 305 If the communication mode of the communication channel of the transmission interface 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 a preset rule.
  • Step 306 If the communication mode of the communication channel of the transmission interface 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 a preset rule.
  • the working mode of the transmission interface of the terminal in accordance with the preset rule in steps 305 and 306 can be implemented in the following manner:
  • the terminal acquires an access sequence in which at least two external devices establish a connection with the terminal.
  • 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 to the working mode corresponding to the communication mode of the external device.
  • the access sequence is used.
  • the terminal detects that an external device accesses, the working mode of the external device is identified, and the transmission interface of the terminal is The working mode is switched to the working mode of the external device, establishing a communication connection with the external device to implement communication; and then detecting whether other devices on the other interfaces of the transit device are accessed, and when other devices access, identifying the device The working mode, and then using the first switching circuit to switch the working mode of the transmission interface of the terminal, to achieve normal operation of at least two devices.
  • the terminal when the terminal detects that another external device first establishes a communication connection with the terminal through the transit device, and detects that the charger establishes a connection with the terminal through the transit device, the terminal first terminates communication between the other external device and the terminal.
  • Communicate with the charger identify the communication channel of the charger, switch the working mode of the transmission interface of the terminal, and realize the charging of the terminal.
  • the charger When the charger is charged stably, according to the signal transmission channel D+, D- of the charger
  • the relationship between the two channels is selected to switch between the D+ and D- signal transmission channels by using the first switching circuit in the terminal or the second switching circuit in the switching device, and the working mode of the transmission interface of the switching terminal is corresponding to other external devices.
  • the terminal has three external devices (USB flash drive, non-standard charger and earphone) connected to the external device as an example. If the three external devices access the terminal, the sequence is: non-standard charger, USB flash drive and earphone; First, the terminal detects that there is a non-standard charger access on the transit device, and the terminal recognizes that the working mode of the non-standard charger is the charging mode, and the working mode of the transmission interface of the switching terminal is the charging mode to realize charging of the terminal; While the charger is charging, it continues to detect whether there is an external device connected to other interfaces of the transit device.
  • USB flash drive USB flash drive
  • the terminal detects that there is a non-standard charger access on the transit device, and the terminal recognizes that the working mode of the non-standard charger is the charging mode, and the working mode of the transmission interface of the switching terminal is the charging mode to realize charging of the terminal; While the charger is charging, it continues to detect whether there is an external device connected to other interfaces of the transit device.
  • the terminal When it is detected that there is a USB flash drive on the transit device and the non-standard charger has stabilized charging the terminal, the terminal recognizes the USB flash drive.
  • the working mode is OTG mode
  • the working mode of the transmission interface of the switching terminal is OTG mode, which realizes data transmission communication with the USB flash drive; charging with a non-standard charger and continuing to detect other interfaces of the switching device while charging with the USB flash drive Whether there is an external device to access, when the terminal detects that there is a headset access through the transit device and When the disk is stable for data transmission, the working mode of the earphone is recognized, and the working mode of the transmission interface of the terminal is switched to the earphone mode by using the first switching circuit, and finally the three external devices of the non-standard charger, the USB flash drive and the earphone are passed through the switching device.
  • the terminal After the terminal detects that the non-standard charger is in the above-mentioned access order, the terminal first terminates the communication between the USB flash drive and the terminal, or when the terminal detects the non-standard charger in the access sequence, the terminal first Terminating the communication between the USB flash drive and the terminal, the earphone and the terminal, establishing a communication connection with the non-standard charger, and then switching the working mode of the terminal by using the first switching circuit to realize communication between the USB flash drive and the terminal, the earphone and the terminal.
  • the signal switching method when detecting that the terminal establishes a connection with the at least two external devices through the switching device, identifying communication channels of the transmission interfaces of the at least two external devices, and then according to at least two external devices a communication channel of the transmission interface, 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;
  • the terminal can connect at least two external devices through the switching device at the same time, thereby solving the problem that only one external device can be connected at the same time in the terminal of the existing USB Type-C interface, thereby realizing that at least two external devices can be connected at the same time, thereby improving the number of external devices.
  • the embodiment of the present disclosure provides a signal switching device 4, which can be applied to a signal switching method provided by the embodiment corresponding to FIGS. 1 to 3.
  • the device includes: an identifying unit 41 and a processing unit 42. ,among them:
  • the identifying unit 41 is configured to identify a communication channel of the transmission interface of the at least two external devices if it is detected that the terminal establishes a connection with the at least two external devices through the switching device.
  • the transit device is connected to the terminal through a transmission interface of the terminal.
  • the processing unit 42 is configured to determine, according to the communication channel of the transmission interface 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.
  • the first switching circuit is disposed in the terminal, and the second switching circuit is disposed in the switching device.
  • the signal switching device when detecting that the terminal establishes a connection with the at least two external devices through the switching device, identifies a communication channel of the transmission interface of the at least two external devices, and then according to at least two external devices
  • the communication channel of the transmission interface determines whether the first switching circuit or the second switching circuit is used to switch the working mode of the transmission interface of the terminal; thus, the terminal can simultaneously connect at least two external devices through the switching device, thereby solving the existing USB Type
  • the problem that only one external device can be connected to the terminal of the -C interface enables the connection of at least two external devices at the same time, thereby improving the user experience.
  • the processing unit 42 includes: a determining module 421 and a first processing module 422, where:
  • the determining module 421 is configured to determine whether the communication channels of the transmission interfaces of the at least two external devices are the same.
  • the first processing module 422 is configured as a communication channel of the transmission interface of at least two external devices The same, the working mode of the switching terminal is an operating mode corresponding to the communication mode of the external device connected to the preset transmission interface of the switching device.
  • the processing unit 42 further includes: a second processing module 423 and a third processing module 424, where:
  • 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 the working mode of the transmission interface of the terminal according to a preset rule.
  • the second processing module 423 is configured to determine whether the communication mode of the communication channel of the transmission interface of the at least two external devices meets a 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 further configured to use the first switching circuit if the communication mode of the communication channel of the transmission interface of at least two external devices satisfies a preset condition.
  • the second processing module 423 is 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.
  • third processing module 424 is specifically configured to perform the following steps:
  • the first switching circuit or the second switching circuit is used to sequentially switch the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external device.
  • the third processing module 424 is specifically configured to perform the following steps:
  • the first switching circuit or the second switching circuit is used to sequentially switch the working mode of the transmission interface of the terminal to the working mode corresponding to the communication mode of the external device.
  • the signal switching device when detecting that the terminal establishes a connection with the at least two external devices through the switching device, identifies a communication channel of the transmission interface of the at least two external devices, and then according to at least two external devices
  • the communication channel of the transmission interface determines whether the first switching circuit or the second switching circuit is used to switch the working mode of the transmission interface of the terminal; thus, the terminal can simultaneously connect at least two external devices through the switching device, thereby solving the existing USB Type
  • the problem that only one external device can be connected to the terminal of the -C interface enables the connection of at least two external devices at the same time, thereby improving the user experience.
  • the identification unit 41, the determining unit 42, the determining module 421, the first processing module 422, the second processing module 423, and the third processing module 424 may each be a central processing unit (CPU, Central) located in the wireless data transmitting device.
  • CPU Central
  • Processing Unit may be a central processing unit located in the wireless data transmitting device.
  • MPU Micro Processor Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • a computer storage medium having stored therein computer executable instructions configured to perform the signal switching method described above.
  • embodiments of the present disclosure can be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware aspects. Moreover, the present disclosure 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 and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the terminal when detecting that the terminal establishes a connection with the at least two external devices through the switching device, the communication channel of the transmission interface of the at least two external devices is identified, and then the communication channel of the transmission interface according to the at least two external devices 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; thus, the terminal can simultaneously connect at least two external devices through the switching device, thereby solving the existing USB Type-C interface terminal The problem that only one external device can be connected at the same time enables the connection of at least two external devices at the same time, thereby improving the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

本公开实施例公开了一种信号切换方法,所述方法包括:若检测到终端通过转接设备与至少两个外接设备建立连接,则识别所述至少两个外接设备的传输接口的通信通道;其中,所述转接设备通过所述终端的传输接口与所述终端连接;根据所述至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换所述终端的传输接口的工作模式;其中,所述第一切换电路设置在所述终端中,所述第二切换电路设置在所述转接设备中。本公开实施例同时还公开了一种信号切换装置、计算机存储介质。

Description

一种信号切换方法和装置、计算机存储介质
相关申请的交叉引用
本申请基于申请号为201610873166.3、申请日为2016年09月30日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及通信领域中的信号切换技术,尤其涉及一种信号切换方法和装置、计算机存储介质。
背景技术
随着科学技术的飞速发展,通用串行总线(USB,Universal Serial Bus)技术也得到了快速发展,随着USB技术在移动终端的普遍推广应用,人们对USB连接技术的要求越来越高。USB Type-C连接器具有10Gbit/秒的最大数据传输速度、接口插座端尺寸较小、支持正反两面均可插入以及可提供较大电力的优点,得到了较多移动终端生产厂商的青睐。虽然采用USB Type-C接口实现与外接设备的通信连接,简化了手机机身的设计,但单个USB Type-C接口使得手机上不能同时连接两个外接设备,例如不能实现在充电的同时插入耳机听音乐,导致用户体验效果不佳。
发明内容
为解决上述技术问题,本公开实施例期望提供一种信号切换方法和装置、计算机存储介质,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。
为达到上述目的,本公开实施例的技术方案是这样实现的:
一种信号切换方法,所述方法包括:
若检测到终端通过转接设备与至少两个外接设备建立连接,则识别所述至少两个外接设备的传输接口的通信通道;其中,所述转接设备通过所述终端的传输接口与所述终端连接;
根据所述至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换所述终端的传输接口的工作模式;其中,所述第一切换电路设置在所述终端中,所述第二切换电路设置在所述转接设备中。
可选的,本公开实施例中,所述根据所述至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换所述终端的传输接口的工作模式,包括:
判断所述至少两个外接设备的传输接口的通信通道是否相同;
若所述至少两个外接设备的传输接口的通信通道相同,则切换所述终端的工作模式为与所述转接设备的预设传输接口连接的外接设备的通信模式对应的工作模式。
可选的,本公开实施例中,所述方法还包括:
若所述至少两个外接设备的传输接口的通信通道不相同,则使用所述第一切换电路或者所述第二切换电路按照所述预设规则切换所述终端的传输接口的工作模式。
可选的,本公开实施例中,所述若所述至少两个外接设备的传输接口的通信通道不相同,则使用所述第一切换电路或者所述第二切换电路按照所述预设规则切换所述终端的传输接口的工作模式,包括:
若所述至少两个外接设备的传输接口的通信通道不相同,则判断所述至少两个外接设备的传输接口的通信通道的通信方式是否满足预设条件;
当所述至少两个外接设备的传输接口的通信通道的通信方式满足所述预设条件时,使用所述第一切换电路按照所述预设规则切换所述终端的传输接口的工作模式;
若所述至少两个外接设备的传输接口的通信通道的通信方式不满足所述预设条件,则使用所述第二切换电路按照所述预设规则切换所述终端的传输接口的工作模式。
可选的,本公开实施例中,所述按照预设规则切换所述终端的传输接口的工作模式,包括:
获取所述至少两个外接设备的预设通信等级;
根据所述预设通信等级,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
可选的,本公开实施例中,所述按照预设规则切换所述终端的传输接口的工作模式,包括:
获取所述至少两个外接设备与所述终端建立连接的接入顺序;
根据所述接入顺序,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
一种信号切换装置,所述装置包括:识别单元和处理单元;其中:
所述识别单元,配置为若检测到终端通过转接设备与至少两个外接设备建立连接,则识别所述至少两个外接设备的传输接口的通信通道;其中,所述转接设备通过所述终端的传输接口与所述终端连接;
所述处理单元,配置为根据所述至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换所述终端的传输接口的工作模式;其中,所述第一切换电路设置在所述终端中,所述第二 切换电路设置在所述转接设备中。
可选的,本公开实施例中,所述处理单元包括:判断模块和第一处理模块;其中:
所述判断模块,配置为判断所述至少两个外接设备的传输接口的通信通道是否相同;
所述第一处理模块,配置为若所述至少两个外接设备的传输接口的通信通道相同,则切换所述终端的工作模式为与所述转接设备的预设传输接口连接的外接设备的通信模式对应的工作模式。
可选的,本公开实施例中,所述处理单元还包括:第二处理模块和第三处理模块;其中:
所述第二处理模块,配置为若所述至少两个外接设备的传输接口的通信通道不相同,则使用所述第一切换电路或者所述第二切换电路;
所述第三处理模块,配置为按照所述预设规则切换所述终端的传输接口的工作模式。
可选的,本公开实施例中,所述第二处理模块,具体配置为若所述至少两个外接设备的传输接口的通信通道不相同,则判断所述至少两个外接设备的传输接口的通信通道的通信方式是否满足预设条件;
所述第二处理模块,具体还配置为若所述至少两个外接设备的传输接口的通信通道的通信方式满足所述预设条件,则使用所述第一切换电路;
所述第二处理模块,具体还配置为若所述至少两个外接设备的传输接口的通信通道的通信方式不满足所述预设条件,则使用所述第二切换电路;
所述第三处理模块,具体配置为按照所述预设规则切换所述终端的传输接口的工作模式。
可选的,本公开实施例中,所述第三处理模块具体配置为:
获取所述至少两个外接设备的预设通信等级;
根据所述预设通信等级,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
可选的,本公开实施例中,所述第三处理模块具体还配置为:
获取所述至少两个外接设备与所述终端建立连接的接入顺序;
根据所述接入顺序,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
所述识别单元、所述处理单元、所述判断模块、所述第一处理模块、所述第二处理模块、所述第三处理模块在执行处理时,可以采用中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Singnal Processor)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)实现。
一种计算机存储介质,其中存储有计算机可执行指令,该计算机可执行指令配置执行上述信号切换方法。
本公开实施例所提供的信号切换方案,当检测到终端通过转接设备与至少两个外接设备建立连接时,识别至少两个外接设备的传输接口的通信通道,然后根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式;这样,终端可以通过转接设备同时连接至少两个外接设备,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。
附图说明
图1为本公开实施例提供的一种信息切换方法的流程示意图;
图2为本公开实施例提供的另一种信息切换方法的流程示意图;
图3为本公开实施例提供的又一种信息切换方法的流程示意图;
图4为本公开实施例提供的一种信息切换装置的结构示意图;
图5为本公开实施例提供的另一种信息切换装置的结构示意图;
图6为本公开实施例提供的又一种信息切换装置的结构示意图。
具体实施方式
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述。
本公开实施例提供一种信号切换方法,参照图1所示,该方法包括以下步骤:
步骤101、若检测到终端通过转接设备与至少两个外接设备建立连接,则识别至少两个外接设备的传输接口的通信通道。
其中,转接设备通过终端的传输接口与终端连接。
具体的,步骤101若检测到终端通过转接设备与至少两个外接设备建立连接,则识别至少两个外接设备的传输接口的通信通道可以由终端来实现。其中,转接设备是一种连接系统,转接设备一端具有一个接口,可以与终端的传输接口进行匹配连接,另一端具有多个接口,可以连接多个外接设备,转接设备具有能够用于切换终端传输接口的工作模式的切换电路;终端也具有与转接设备的切换电路工作功能不相同的用于切换终端传输接口的工作模式的切换电路,例如终端可以是设置了切换电路的手机、平板电脑等移动设备,终端的传输接口可以是USB Type-C接口;外接设备可以是能够通过转接设备与终端进行连接通信的设备,例如可以是充电器、耳机、音响等设备。
步骤102、根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式。
其中,第一切换电路设置在终端中,第二切换电路设置在转接设备中。
具体的,步骤102根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式可以由终端来实现。终端对通过转接设备连接的至少两个外接设备的传输接口的通信通道进行识别分析,根据分析结果确定是否使用第一切换电路或者第二切换电路对终端传输接口的工作模式进行切换,根据具体应用场景保证至少两个外接设备能正常工作。
本公开的实施例所提供的信号切换方法,当检测到终端通过转接设备与至少两个外接设备建立连接时,识别至少两个外接设备的传输接口的通信通道,然后根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式;这样,终端可以通过转接设备同时连接至少两个外接设备,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。
本公开实施例提供一种信号切换方法,参照图2所示,该方法包括以下步骤:
步骤201、若检测到终端通过转接设备与至少两个外接设备建立连接,则终端识别至少两个外接设备的传输接口的通信通道。
其中,转接设备通过终端的传输接口与终端连接。
具体的,以终端与可以连接两个外接设备的一种转接设备建立通信连接进行举例说明,其中两个外接设备可以是耳机和充电器、两个耳机或者耳机和通过数据线与终端进行数据传输的设备等,终端识别通过转接设备接入的两个外接设备的工作模式,以此确定外接设备使用的传输接口的通信通道。
步骤202、终端判断至少两个外接设备的传输接口的通信通道是否相同。
具体的,终端判断通过转接设备与终端连接的至少两个外接设备的传输接口的通信通道是否相同,判断结果包括至少两个外接设备的传输接口的通信通道相同和不相同,其中通信通道不相同包括至少两个外接设备的传输接口的通信通道的信号传输通道至少有一个不相同。例如,当两个外接设备为两个耳机时,两个耳机的传输接口的信号传输通道都为D+、D-,即两个耳机的传输接口的通信通道相同;当两个外接设备分别为耳机和充电器时,耳机的传输接口的信号传输通道为D+、D-,充电器的传输接口的信号传输通道为VBus、D+、D-,即耳机和充电器的传输接口的D+、D-两个信号传输通道相同,但充电器还使用了VBus信号传输通道,因此耳机和充电器的通信通道不相同;当两个外接设备为耳机和通过数据线与终端进行数据传输的设备时,耳机的传输接口的信号传输通道为D+、D-,通过数据线与终端进行数据传输的设备的传输接口的信号传输通道为RX、TX,耳机和通过数据线与终端进行数据传输的设备的传输接口的信号传输通道都不相同,耳机和通过数据线与终端进行数据传输的设备的通信通道不相同。
其中,步骤202终端判断至少两个外接设备的传输接口的通信通道是否相同之后,可以选择执行步骤203或者步骤204,若至少两个外接设备的传输接口的通信通道相同,执行步骤203,若至少两个外接设备的传输接口的通信通道不相同,执行步骤204;
步骤203、若至少两个外接设备的传输接口的通信通道相同,则终端切换终端的工作模式为与转接设备的预设传输接口连接的外接设备的通信模式对应的工作模式。
具体的,转接设备的预设传输接口可以是终端出厂时进行设置的,为转接设备的任意一个传输接口,例如可以是转接设备的第一传输接口。当至少两个通信通道相同的外接设备通过转接设备与终端建立连接时,由于 至少两个通信通道相同,所以终端可以与预设传输接口上接入的外接设备进行通信,保证该外接设备正常工作,无需使用第一切换电路或者第二切换电路进行电路切换。例如,当两个外接设备为两个通信通道相同的耳机时,终端识别两个耳机通信模式的工作模式并进入该工作模式,由于两个耳机的工作模式相同,所以终端可以选择转接设备第一传输接口上接入的耳机,与其进行通信使其正常工作。
步骤204、若至少两个外接设备的传输接口的通信通道不相同,则终端使用第一切换电路或者第二切换电路按照预设规则切换终端的传输接口的工作模式。
具体的,预设规则是为了保证传输接口的通信通道不相同的至少两个外接设备正常工作,规定如何采用第一切换电路或者第二切换电路对终端传输接口的信号传输通道进行切换的规则。
其中,步骤204中按照预设规则切换终端的传输接口的工作模式可以通过以下方式来实现:
a、终端获取至少两个外接设备的预设通信等级。
b、根据预设通信等级,终端使用第一切换电路或者第二切换电路依次切换终端的传输接口的工作模式为与外接设备的通信模式对应的工作模式。
具体的,外接设备的预设通信等级可以是根据外接设备与终端通信的重要程度或者对终端的影响来确定的。例如,由于充电是对手机功能影响最大的因素,所以在预设通信等级中:可以设置充电器的通信等级最高,耳机的通信等级次之,通过数据线与终端进行数据传输的设备的通信等级最低。以终端与可以连接三个外接设备的转接设备连接为例进行说明,当三个外接设备为耳机、标准充电器和通过数据线与终端进行数据传输的设备同时通过转接设备与终端建立连接时,终端识别耳机的工作模式为耳机 模式、标准充电器的工作模式为充电模式、通过数据线与终端进行数据传输的设备的工作模式为安上即可用(OTG,On-The-Go)模式,OTG功能简单地说,手机、平板上的OTG就是方便用户,将手机与U盘、移动硬盘、键鼠、其他数码设备等相连接,并能正常使用其功能。耳机模式对应的信号传输通道为D+、D-,充电模式对应的信号传输通道为VBus、D+、D-,OTG模式对应的信号传输通道为RX、TX;根据预设通信等级,终端首先与标准充电器进行通信,此时终端的工作模式与标准充电器的工作模式(VBus、D+、D-)相同;然后当标准充电器给终端充电稳定后,终端发送控制命令至转接设备,使用第二切换电路切换终端的传输接口的工作模式为耳机的工作模式(如耳机模式),即保证标准充电器通过VBus信号传输通道给终端进行充电,将D+、D-信号传输切换至耳机的左右声道,与耳机建立通信使耳机正常工作;最后当耳机正常工作后,终端使用第一切换电路切换终端的传输接口的工作模式为通过数据线与终端进行数据传输的设备的工作模式(如OTG模式),将信号传输通道RX、TX切换给数据线,建立与通过数据线与终端进行数据传输的设备之间的通信,使设备正常工作。
需要说明的是,本实施例中与其它实施例中相同步骤或者概念的解释,可以参照其它实施例中的描述,此处不再赘述。
本公开的实施例所提供的信号切换方法,当检测到终端通过转接设备与至少两个外接设备建立连接时,识别至少两个外接设备的传输接口的通信通道,然后根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式;这样,终端可以通过转接设备同时连接至少两个外接设备,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。
本公开实施例提供一种信号切换方法,参照图3所示,该方法包括以下步骤:
步骤301、若检测到终端通过转接设备与至少两个外接设备建立连接,则终端识别至少两个外接设备的传输接口的通信通道。
其中,转接设备通过终端的传输接口与终端连接。
步骤302、终端判断至少两个外接设备的传输接口的通信通道是否相同。
其中,步骤302终端判断至少两个外接设备的传输接口的通信通道是否相同之后,可以选择执行步骤303或者步骤304~306,若至少两个外接设备的传输接口的通信通道相同,执行步骤303,若至少两个外接设备的传输接口的通信通道不相同,执行步骤304~306;
步骤303、若至少两个外接设备的传输接口的通信通道相同,则终端切换终端的工作模式为与转接设备的预设传输接口连接的外接设备的通信模式对应的工作模式。
步骤304、若至少两个外接设备的传输接口的通信通道不相同,则终端判断至少两个外接设备的传输接口的通信通道的通信方式是否满足预设条件。
具体的,预设条件为外接设备的传输接口的通信通道的信号传输通道没有短接,例如预设条件可以是D+、D-信号传输通道非短接。
其中,步骤304若至少两个外接设备的传输接口的通信通道不相同,则终端判断至少两个外接设备的传输接口的通信通道的通信方式是否满足预设条件之后,可以选择执行步骤305或者步骤306,若至少两个外接设备的传输接口的通信通道的通信方式满足预设条件,执行步骤305,若至少两个外接设备的传输接口的通信通道的通信方式不满足预设条件,执行步骤306。
步骤305、若至少两个外接设备的传输接口的通信通道的通信方式满足预设条件,则终端使用第一切换电路按照预设规则切换终端的传输接口的工作模式。
步骤306、若至少两个外接设备的传输接口的通信通道的通信方式不满足预设条件,则终端使用第二切换电路按照预设规则切换终端的传输接口的工作模式。
其中,步骤305和步骤306中按照预设规则切换终端的传输接口的工作模式可以通过以下方式来实现:
a、终端获取至少两个外接设备与终端建立连接的接入顺序。
b、根据接入顺序,终端使用第一切换电路或者第二切换电路依次切换终端的传输接口的工作模式为与外接设备的通信模式对应的工作模式。
具体的,当外接设备与终端之间通过转接设备进行连接时有接入的先后顺序,当终端先检测到一个外接设备接入时,识别该外接设备的工作模式,并将终端的传输接口的工作模式切换为该外接设备的工作模式,与该外接设备建立通信连接,实现通信;然后检测转接设备的其他接口上是否有其他设备接入,当有其他设备接入时,识别该设备的工作模式,然后使用第一切换电路切换终端的传输接口的工作模式,实现至少两个设备的正常工作。需注意的是,当终端检测到其他外接设备首先通过转接设备与终端建立通信连接后,检测到充电器通过转接设备与终端建立连接时,终端首先终止其他外接设备与终端之间的通信,与充电器进行通信连接,识别充电器的通信通道,对终端的传输接口的工作模式进行切换,实现对终端的充电,当充电器充电稳定后,根据充电器的信号传输通道D+、D-两个通道之间的关系选择使用终端中的第一切换电路或者转接设备中的第二切换电路对D+、D-信号传输通道进行切换,切换终端的传输接口的工作模式为其他外接设备对应的工作模式,保证终端正常充电的同时保证其他外接设 备也正常工作。以终端通过转接设备外接有三个外接设备(优盘、非标准充电器和耳机)为例进行说明,若这个三个外接设备接入终端的先后顺序依次为:非标准充电器、优盘和耳机;首先终端检测到转接设备上有非标准充电器接入,终端识别非标准充电器的工作模式为充电模式,切换终端的传输接口的工作模式为充电模式,实现对终端的充电;利用非标准充电器进行充电的同时然后继续检测转接设备的其他接口上是否有外接设备接入,当检测到转接设备上有优盘接入且非标准充电器已经稳定给终端充电时,终端识别优盘的工作模式为OTG模式,切换终端的传输接口的工作模式为OTG模式,实现与优盘之间的数据传输通信;利用非标准充电器进行充电以及与优盘充电的同时继续检测转接设备的其他接口上是否有外接设备接入,当终端通过转接设备检测到有耳机接入且与优盘稳定进行数据传输时,识别耳机的工作模式,使用第一切换电路将终端的传输接口的工作模式切换为耳机模式,最终实现非标准充电器、优盘、耳机这三个外接设备通过转接设备与终端正常通信。当终端检测到非标准充电器在上述接入顺序中的优盘后,终端首先终止优盘与终端之间的通信,或者当终端检测到非标准充电器在上述接入顺序中的耳机后,终端首先终止优盘与终端、耳机与终端之间的通信,与非标准充电器建立通信连接,然后使用第一切换电路对终端的工作模式进行切换,实现优盘与终端、耳机与终端之间的通信。
需要说明的是,本实施例中与其它实施例中相同步骤或者概念的解释,可以参照其它实施例中的描述,此处不再赘述。
本公开的实施例所提供的信号切换方法,当检测到终端通过转接设备与至少两个外接设备建立连接时,识别至少两个外接设备的传输接口的通信通道,然后根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式;这样, 终端可以通过转接设备同时连接至少两个外接设备,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。
本公开实施例提供了一种信号切换装置4,可应用于图1~3对应的实施例提供的一种信号切换方法中,参照图4所示,该装置包括:识别单元41和处理单元42,其中:
识别单元41,配置为若检测到终端通过转接设备与至少两个外接设备建立连接,则识别至少两个外接设备的传输接口的通信通道。
其中,转接设备通过终端的传输接口与终端连接。
处理单元42,配置为根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式。
其中,第一切换电路设置在终端中,第二切换电路设置在转接设备中。
本公开的实施例所提供的信号切换装置,当检测到终端通过转接设备与至少两个外接设备建立连接时,识别至少两个外接设备的传输接口的通信通道,然后根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式;这样,终端可以通过转接设备同时连接至少两个外接设备,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。
具体的,参照图5所示,处理单元42包括:判断模块421和第一处理模块422,其中:
判断模块421,配置为判断至少两个外接设备的传输接口的通信通道是否相同。
第一处理模块422,配置为若至少两个外接设备的传输接口的通信通道 相同,则切换终端的工作模式为与转接设备的预设传输接口连接的外接设备的通信模式对应的工作模式。
具体的,参照图6所示,处理单元42还包括:第二处理模块423和第三处理模块424,其中:
第二处理模块423,配置为若至少两个外接设备的传输接口的通信通道不相同,则使用第一切换电路或者第二切换电路。
第三处理模块424,配置为按照预设规则切换终端的传输接口的工作模式。
具体的,第二处理模块423,具体配置为若至少两个外接设备的传输接口的通信通道不相同,则判断至少两个外接设备的传输接口的通信通道的通信方式是否满足预设条件。
第二处理模块423,具体还配置为若至少两个外接设备的传输接口的通信通道的通信方式满足预设条件,则使用第一切换电路。
第二处理模块423,具体还配置为当至少两个外接设备的传输接口的通信通道的通信方式不满足预设条件时,使用第二切换电路。
第三处理模块424,具体配置为按照预设规则切换终端的传输接口的工作模式。
进一步,第三处理模块424具体配置为执行以下步骤:
获取至少两个外接设备的预设通信等级。
根据预设通信等级,使用第一切换电路或者第二切换电路依次切换终端的传输接口的工作模式为与外接设备的通信模式对应的工作模式。
可选的,第三处理模块424具体还配置为执行以下步骤:
获取至少两个外接设备与终端建立连接的接入顺序。
根据接入顺序,使用第一切换电路或者第二切换电路依次切换终端的传输接口的工作模式为与外接设备的通信模式对应的工作模式。
需要说明的是,本实施例中各个单元和模块之间的交互过程,可以参照图1~3对应的实施例提供的一种信号切换方法中的交互过程,此处不再赘述。
本公开的实施例所提供的信号切换装置,当检测到终端通过转接设备与至少两个外接设备建立连接时,识别至少两个外接设备的传输接口的通信通道,然后根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式;这样,终端可以通过转接设备同时连接至少两个外接设备,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。
在实际应用中,识别单元41、判断单元42、判断模块421、第一处理模块422、第二处理模块423和第三处理模块424均可由位于无线数据发送设备中的中央处理器(CPU,Central Processing Unit,)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。
一种计算机存储介质,其中存储有计算机可执行指令,该计算机可执行指令配置执行上述信号切换方法。
本领域内的技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本公开是参照根据本公开实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和 /或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本公开的较佳实施例而已,并非用于限定本公开的保护范围。
工业实用性
采用本公开实施例,当检测到终端通过转接设备与至少两个外接设备建立连接时,识别至少两个外接设备的传输接口的通信通道,然后根据至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换终端的传输接口的工作模式;这样,终端可以通过转接设备同时连接至少两个外接设备,解决了现有USB Type-C接口的终端中只能同时连接一个外接设备的问题,实现了可以同时连接至少两个外接设备,进而提高了用户的体验效果。

Claims (13)

  1. 一种信号切换方法,所述方法包括:
    若检测到终端通过转接设备与至少两个外接设备建立连接,则识别所述至少两个外接设备的传输接口的通信通道;其中,所述转接设备通过所述终端的传输接口与所述终端连接;
    根据所述至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换所述终端的传输接口的工作模式;其中,所述第一切换电路设置在所述终端中,所述第二切换电路设置在所述转接设备中。
  2. 根据权利要求1所述的方法,其中,所述根据所述至少两个外接设备的传输接口的通信通道,判断是否使用第一切换电路或者第二切换电路切换所述终端的传输接口的工作模式,包括:
    判断所述至少两个外接设备的传输接口的通信通道是否相同;
    若所述至少两个外接设备的传输接口的通信通道相同,则切换所述终端的工作模式为与所述转接设备的预设传输接口连接的外接设备的通信模式对应的工作模式。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    若所述至少两个外接设备的传输接口的通信通道不相同,则使用所述第一切换电路或者所述第二切换电路按照所述预设规则切换所述终端的传输接口的工作模式。
  4. 根据权利要求3所述的方法,其中,所述若所述至少两个外接设备的传输接口的通信通道不相同,则使用所述第一切换电路或者所述第二切换电路按照所述预设规则切换所述终端的传输接口的工作模式,包括:
    若所述至少两个外接设备的传输接口的通信通道不相同,则判断所 述至少两个外接设备的传输接口的通信通道的通信方式是否满足预设条件;
    当所述至少两个外接设备的传输接口的通信通道的通信方式满足所述预设条件时,使用所述第一切换电路按照所述预设规则切换所述终端的传输接口的工作模式;
    若所述至少两个外接设备的传输接口的通信通道的通信方式不满足所述预设条件,则使用所述第二切换电路按照所述预设规则切换所述终端的传输接口的工作模式。
  5. 根据权利要求3或4所述的方法,其中,所述按照预设规则切换所述终端的传输接口的工作模式,包括:
    获取所述至少两个外接设备的预设通信等级;
    根据所述预设通信等级,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
  6. 根据权利要求3或4所述的方法,其中,所述按照预设规则切换所述终端的传输接口的工作模式,包括:
    获取所述至少两个外接设备与所述终端建立连接的接入顺序;
    根据所述接入顺序,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
  7. 一种信号切换装置,所述装置包括:识别单元和处理单元;其中:
    所述识别单元,配置为若检测到终端通过转接设备与至少两个外接设备建立连接,则识别所述至少两个外接设备的传输接口的通信通道;其中,所述转接设备通过所述终端的传输接口与所述终端连接;
    所述处理单元,配置为根据所述至少两个外接设备的传输接口的通 信通道,判断是否使用第一切换电路或者第二切换电路切换所述终端的传输接口的工作模式;其中,所述第一切换电路设置在所述终端中,所述第二切换电路设置在所述转接设备中。
  8. 根据权利要求7所述的装置,其中,所述处理单元包括:判断模块和第一处理模块;其中:
    所述判断模块,配置为判断所述至少两个外接设备的传输接口的通信通道是否相同;
    所述第一处理模块,配置为若所述至少两个外接设备的传输接口的通信通道相同,则切换所述终端的工作模式为与所述转接设备的预设传输接口连接的外接设备的通信模式对应的工作模式。
  9. 根据权利要求8所述的装置,其中,所述处理单元还包括:第二处理模块和第三处理模块;其中:
    所述第二处理模块,配置为若所述至少两个外接设备的传输接口的通信通道不相同,则使用所述第一切换电路或者所述第二切换电路;
    所述第三处理模块,配置为按照所述预设规则切换所述终端的传输接口的工作模式。
  10. 根据权利要求9所述的装置,其中,
    所述第二处理模块,具体配置为若所述至少两个外接设备的传输接口的通信通道不相同,则判断所述至少两个外接设备的传输接口的通信通道的通信方式是否满足预设条件;
    所述第二处理模块,具体还配置为若所述至少两个外接设备的传输接口的通信通道的通信方式满足所述预设条件,则使用所述第一切换电路;
    所述第二处理模块,具体还配置为若所述至少两个外接设备的传输接口的通信通道的通信方式不满足所述预设条件,则使用所述第二切换 电路;
    所述第三处理模块,具体配置为按照所述预设规则切换所述终端的传输接口的工作模式。
  11. 根据权利要求9或10所述的装置,其中,所述第三处理模块具体配置为:
    获取所述至少两个外接设备的预设通信等级;
    根据所述预设通信等级,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
  12. 根据权利要求9或10所述的装置,其中,所述第三处理模块具体还配置为:
    获取所述至少两个外接设备与所述终端建立连接的接入顺序;
    根据所述接入顺序,使用所述第一切换电路或者所述第二切换电路依次切换所述终端的传输接口的工作模式为与所述外接设备的通信模式对应的工作模式。
  13. 一种计算机存储介质,存储有计算机可执行指令,该计算机可执行指令配置执行上述权利要求1-6任一项所述的信号切换方法。
PCT/CN2017/081525 2016-09-30 2017-04-21 一种信号切换方法和装置、计算机存储介质 WO2018058946A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610873166.3 2016-09-30
CN201610873166.3A CN107885688B (zh) 2016-09-30 2016-09-30 一种信号切换方法和装置

Publications (1)

Publication Number Publication Date
WO2018058946A1 true WO2018058946A1 (zh) 2018-04-05

Family

ID=61763145

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/081525 WO2018058946A1 (zh) 2016-09-30 2017-04-21 一种信号切换方法和装置、计算机存储介质

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021087749A1 (zh) * 2019-11-05 2021-05-14 深圳市大疆创新科技有限公司 一种切换控制方法、电子设备及计算机可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108430005B (zh) * 2018-04-26 2021-04-09 努比亚技术有限公司 一种音频电路、音频判断方法及移动终端
CN108874708B (zh) * 2018-06-28 2021-08-10 努比亚技术有限公司 Otg设备、终端充电方法、移动终端及计算机可读存储介质
CN114297108B (zh) * 2021-12-16 2024-05-14 深圳市格安电子有限公司 一种多功能多协议接口转换器

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202997245U (zh) * 2012-11-12 2013-06-12 林伟进 Usb多用转接装置
CN203588261U (zh) * 2013-10-22 2014-05-07 敏茜有限公司 扩充装置
CN104149689A (zh) * 2014-09-04 2014-11-19 北京汽车研究总院有限公司 一种音频输出装置及汽车

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202856125U (zh) * 2012-08-09 2013-04-03 深圳市江波龙电子有限公司 数据线和使用数据线的系统
CN104426025B (zh) * 2013-09-03 2018-04-17 鸿富锦精密工业(深圳)有限公司 电子装置连接系统
CN205122952U (zh) * 2015-10-28 2016-03-30 乐视移动智能信息技术(北京)有限公司 一种耳机转换器
CN205159720U (zh) * 2015-12-07 2016-04-13 乐视致新电子科技(天津)有限公司 一种USB-Type-C接口转换器
CN105867874A (zh) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 用户设备
CN105896221A (zh) * 2016-05-17 2016-08-24 乐视控股(北京)有限公司 一种转接器和双面磁吸式转换组件

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202997245U (zh) * 2012-11-12 2013-06-12 林伟进 Usb多用转接装置
CN203588261U (zh) * 2013-10-22 2014-05-07 敏茜有限公司 扩充装置
CN104149689A (zh) * 2014-09-04 2014-11-19 北京汽车研究总院有限公司 一种音频输出装置及汽车

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021087749A1 (zh) * 2019-11-05 2021-05-14 深圳市大疆创新科技有限公司 一种切换控制方法、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN107885688A (zh) 2018-04-06
CN107885688B (zh) 2021-06-04

Similar Documents

Publication Publication Date Title
EP3515045B1 (en) Wireless audio output devices
US11997734B2 (en) Wireless headphone matching method, device, terminal and charging box
US7949802B2 (en) Enhanced communication via a serial interface
KR102336612B1 (ko) 외부 전자 장치의 통신 설정 정보를 이용하여 오디오 신호를 수신하기 위한 전자 장치 및 그의 동작 방법
WO2018058946A1 (zh) 一种信号切换方法和装置、计算机存储介质
WO2018176901A1 (zh) 转接头、终端设备和转接头系统
KR102215085B1 (ko) 충전 기기 및 그 동작 방법
EP3389248A2 (en) Method and apparatus for easy switching between wired and wireless headset with convenient charging
EP3675520A2 (en) Audio data routing between multiple wirelessly connected devices
US8832345B2 (en) System for communicating between two electrical devices and method therefore
TWI630486B (zh) 充電方法、移動終端和充電裝置
WO2017185686A1 (zh) 充电功率调整方法、装置及电子设备
JP2017515197A (ja) Usbハブのためのポート切断充電機能
US10380049B2 (en) Multi-host supported universal serial bus hub and automobile head unit using the same
JP2015076100A (ja) 通信制御ピンを介したシリアル通信
KR20200110086A (ko) 무선 통신 링크의 설정 방법 및 이를 지원하는 전자 장치
CN109618318A (zh) 一种tws耳机的配对方法及tws耳机
US20210200705A1 (en) Terminal, terminal peripheral, signal transmission system and signal sending and receiving method
KR20190036165A (ko) Usb 타입 c 인터페이스를 이용한 멀티 디바이스 간의 통신 방법 및 이를 구현한 전자 장치
EP3820168A1 (en) Microphone hole blockage detection method and related product
TWI675300B (zh) 通用串列匯流排裝置及其操作方法
JP2016531479A (ja) ワイヤレス接続スイッチング方法、ワイヤレス端末、及びそのシステム
CN218825507U (zh) 双接口装置和投影设备
CN108874716B (zh) 一种用于便携设备的充电通信连接装置及其方法
WO2017182001A1 (zh) 一种接口配置的方法、装置和计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17854404

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17854404

Country of ref document: EP

Kind code of ref document: A1