WO2021087749A1 - Switching control method, electronic device and computer readable storage medium - Google Patents

Switching control method, electronic device and computer readable storage medium Download PDF

Info

Publication number
WO2021087749A1
WO2021087749A1 PCT/CN2019/115738 CN2019115738W WO2021087749A1 WO 2021087749 A1 WO2021087749 A1 WO 2021087749A1 CN 2019115738 W CN2019115738 W CN 2019115738W WO 2021087749 A1 WO2021087749 A1 WO 2021087749A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
serial bus
universal serial
bus interface
working mode
Prior art date
Application number
PCT/CN2019/115738
Other languages
French (fr)
Chinese (zh)
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 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/115738 priority Critical patent/WO2021087749A1/en
Priority to CN201980038392.1A priority patent/CN112292672A/en
Publication of WO2021087749A1 publication Critical patent/WO2021087749A1/en

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/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
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Definitions

  • This application relates to the field of electronic technology, and in particular to a switching control method, electronic equipment, and computer-readable storage medium.
  • USB universal serial bus
  • the smart remote control works in host mode, that is, the smart remote control functions as a host.
  • external communication modules such as 4G Dongle
  • storage devices such as U disks
  • the USB interface of the smart remote control works in device mode. That is to say, the smart remote controller is used as the device terminal to connect to the host device (such as the PC ground station), communicate with the PC, and interact with the data. At this time, it can only be applied to the PC.
  • the USB host-based expansion solution and the USB device-based expansion solution have the disadvantages of single expansion function, lack of flexibility, and limited usage scenarios.
  • the embodiment of the application discloses a switching control method, an electronic device, and a computer-readable storage medium, which can realize the flexible switching of the working mode of the universal serial bus interface of the electronic device, so that the electronic device has rich extended functions and can meet the needs of diversification. Usage scenarios.
  • an embodiment of the present application provides a switching control method, which is applied to an electronic device, the electronic device includes a first universal serial bus interface and a second universal serial bus interface, and the method includes:
  • the working mode includes a host mode and a device mode.
  • an embodiment of the present application provides an electronic device that includes a processor, a memory, a display device, a first universal serial bus interface, and a second universal serial bus interface, where:
  • the memory is used to store program code
  • the processor is configured to call the program code to perform the following operations:
  • the working mode includes a host mode and a device mode.
  • an embodiment of the present invention provides a computer-readable storage medium with program instructions stored in the computer-readable storage medium, and when the program instructions are executed, they are used to implement the switching control method described in the first aspect.
  • the embodiment of the present application can obtain the mode switching instruction input through the display interface of the electronic device, and perform the operation mode of the first universal serial bus interface and/or the second universal serial bus interface of the electronic device according to the mode switching instruction.
  • Switching, working modes include host mode and device mode, so that flexible switching of the working mode of the universal serial bus interface of the electronic device can be realized, so that the electronic device has rich extended functions and can meet diversified use scenarios.
  • FIG. 1 is a schematic flowchart of a handover control method provided by an embodiment of the present application
  • Figure 2a is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • 2b is a schematic diagram of a display interface for mode switching provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another handover control method provided by an embodiment of the present application.
  • Fig. 4a is a schematic diagram of an application scenario of an electronic device provided by an embodiment of the present application.
  • 4b is a schematic diagram of another mode switching display interface provided by an embodiment of the present application.
  • 4c is a schematic diagram of another mode switching display interface provided by an embodiment of the present application.
  • FIG. 4d is a schematic diagram of a mode switching prompt information provided by an embodiment of the present application.
  • 4e is a schematic diagram of another mode switching prompt information provided by an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the smart remote control only configures one device interface, then the smart remote control can only be connected to the host device (such as a PC) in device mode (that is, as a slave) ), communicate with PC and data interaction, etc. If you also need to connect to a storage device (such as a USB flash drive) as a host host to read data, it cannot be done; another example is that the smart remote control only configures a host interface, The smart remote control can only be connected to a storage device (such as a USB flash drive) in host mode (that is, as a host) to read data. If it is also necessary to connect a host device (such as a PC) in device mode (that is, as a slave) to connect to the PC It is also impossible to communicate and exchange data.
  • the host device such as a PC
  • device mode that is, as a slave
  • the embodiments of the present application provide a switching control method, electronic devices, and computers. Reading the storage medium can realize the flexible switching of the working mode of the universal serial bus interface of the electronic device, so that the electronic device has a wealth of extended functions and can meet diversified use scenarios.
  • FIG. 1 is a schematic flowchart of a handover control method provided by an embodiment of the present application.
  • the switching control method of the embodiment of the present application is applied to an electronic device, the electronic device includes a first universal serial bus interface and a second universal serial bus interface, and the method includes the following steps:
  • the electronic device may specifically be a remote control device of a movable platform, such as a smart remote control, and the movable platform may specifically be a drone.
  • the smart remote control includes a display device and two universal serial bus interfaces (denoted as the first universal serial bus). Line bus interface and second universal serial bus interface).
  • Electronic equipment can display the working status data of the drone, collected image data, etc. through the display device, and can also receive various instructions input by the user, such as control instructions for the drone, and mode switching instructions for the universal serial bus interface ,and many more.
  • both the first universal serial bus interface and the second universal serial bus interface of the electronic device may include two working modes, and the two working modes include a host mode (host) and a device mode (device), and allow pairing The working mode of the first universal serial bus interface and/or the second universal serial bus interface is switched.
  • the user can switch the working mode of the first universal serial bus interface and/or the second universal serial bus interface according to the needs of the actual use scene.
  • the mode switching instruction can be input through the display interface of the display device of the electronic device, then The electronic device obtains the mode switching instruction input by the user through the display interface of the display device.
  • the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction, where the working modes include a host mode and a device mode.
  • the electronic device may determine the target operating mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface according to the mode switching instruction, and the target operating mode combination includes the first target corresponding to the first universal serial bus interface
  • the working mode and the second target working mode corresponding to the second universal serial bus interface can further switch the current working mode of the first universal serial bus interface to the first target working mode, and/or change the second universal serial bus interface to the first target working mode.
  • the current working mode of the bus interface is switched to the second target working mode.
  • the target working mode combination includes that the first target working mode corresponding to the first universal serial bus interface is the host mode, and the second target working mode corresponding to the second universal serial bus interface is the device mode, and the electronic device can set the first The current working mode of the universal serial bus interface is switched to the host mode, and/or the current working mode of the second universal serial bus interface is switched to the device mode.
  • the electronic device can obtain the mode switching instruction input through the display interface of the display device, and according to the mode switching instruction, the working mode of the first universal serial bus interface and/or the second universal serial bus of the electronic device can be checked.
  • the working mode of the interface is switched, and the working mode includes the host mode and the device mode, so that the flexible switching of the working mode of the universal serial bus interface of the electronic device can be realized, so that the electronic device has rich extended functions and can meet diversified use scenarios.
  • the electronic device can provide at least one combination of working modes, and the user can directly download from the at least one working mode. Selecting the required working mode combination in the working mode combination realizes the switching of the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface.
  • the electronic device can display at least one work mode combination through the display interface of the display device, and the user can select a desired work mode combination from the at least one work mode combination by inputting a mode switching instruction (denoted as a target work mode combination)
  • the electronic device obtains the mode switching instruction input by the user for the at least one work mode combination, and based on the mode switching instruction, the target work mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface can be determined, thereby
  • the working mode of the universal serial bus interface of the electronic device can be conveniently switched flexibly, so that the electronic device has rich expansion functions.
  • a maximum of four working mode combinations can be provided for users to choose, that is, the at least one working mode combination includes the working mode of the first universal serial bus interface as the host mode and the second universal serial bus interface.
  • the working mode of the first universal serial bus interface is the device mode
  • the working mode of the first universal serial bus interface is the host mode
  • the working mode of the second universal serial bus interface is the host mode
  • the working mode of the first universal serial bus interface is the device mode and the first universal serial bus interface.
  • the working mode of the second universal serial bus interface is the host mode
  • the working mode of the first universal serial bus interface is the device mode
  • the working mode of the second universal serial bus interface is one or more of the device modes.
  • the first universal serial bus interface included in the electronic device is USB1
  • the second universal serial bus interface is USB0.
  • the electronic device displays four working mode combinations for the user to choose through the display interface of the display device, that is, working mode combination 1: USB 0 Host, USB1 device (ie device), working mode combination 2: USB 0 host, USB 1 host, working mode combination 3: USB 0 device, USB 1 host, working mode combination 4: USB 0 device, USB 1 device , The user can directly click the corresponding work mode combination on the display interface to input the mode switch instruction.
  • the user selects work mode combination 3 as the target work mode combination, and the electronic device determines the target work mode combination as USB according to the mode switch instruction.
  • the working mode of USB 1 is device
  • the working mode of USB 1 is host
  • the working mode of USB 0 is switched to device
  • the working mode of USB 1 is switched to host.
  • the electronic device can be used as a slave to connect to external devices through USB 0.
  • the host device (such as PC) can be used as a host to connect external storage devices (such as U disk), communication module (such as 4G dongle), positioning module (RTK donle), docking station, etc. through USB1, so that it can be used according to the actual needs of the scene Conveniently and flexibly switch the working mode of the universal serial bus interface of the electronic device, so that the electronic device has a wealth of extended functions.
  • FIG. 3 is a schematic flowchart of another handover control method provided by an embodiment of the present application.
  • the switching control method of the embodiment of the present application is applied to an electronic device, the electronic device includes a first universal serial bus interface and a second universal serial bus interface, and the method includes the following steps:
  • the external device may specifically include one or more of a host device (such as a PC), a storage device (such as a USB flash drive), a positioning module (such as an RTK dongle), a communication module (such as a 4G dongle), and a docking station.
  • a host device such as a PC
  • a storage device such as a USB flash drive
  • a positioning module such as an RTK dongle
  • a communication module such as a 4G dongle
  • a docking station a docking station.
  • USB OTG Universal Serial Bus On-The-Go
  • the first universal serial bus interface is a USB OTG interface
  • the second universal serial bus interface is a conventional USB interface. Accordingly, the first universal serial bus interface automatically switches the working mode, and the second universal serial bus interface automatically switches the working mode.
  • the bus interface combines the user's manual operation to switch the working mode.
  • the first universal serial bus interface is a USB OTG interface
  • the electronic device can automatically recognize the device type of the external device through the first universal serial bus interface ( Marked as the first device type)
  • the device type may include a host device (such as a PC) or a slave device (such as a storage device, a positioning module, a communication module, or a docking station).
  • the electronic device can determine the operating mode (denoted as the first target operating mode) required by the first universal serial bus interface according to the first device type of the external device. If the device type of the external device is the host device, the first The first target working mode should be the device mode; if the device type of the external device is a slave device, the first target working mode should be the host mode.
  • the operating mode denoted as the first target operating mode
  • the electronic device determines the first target operating mode corresponding to the first universal serial bus interface, it can directly switch the current operating mode of the first universal serial bus interface to the first target operating mode.
  • the user can manually switch the working mode of the second universal serial bus interface according to the needs of the actual use scene.
  • the mode switching instruction can be input through the display interface of the display device of the electronic device, and the electronic device can obtain the user's display Mode switch command input from the display interface of the device.
  • the electronic device may determine the second target operating mode corresponding to the second universal serial bus interface according to the mode switching instruction, and then may call the interface controller to adjust the communication protocol of the second universal serial bus interface to work with the second target
  • the mode matching communication protocol enables the second universal serial bus interface to switch from the current working mode to the second target working mode.
  • the electronic device can call the interface controller to adjust the communication protocol of the second universal serial bus interface. Specifically, it can be adjusted to a communication protocol that matches the device mode, so as to realize the second universal serial bus interface.
  • the current working mode of the line bus interface is switched to device mode.
  • USB 1 is the first universal serial bus interface
  • USB 1 is the USB OTG interface, which can automatically switch the working mode
  • USB0 is the second universal serial bus interface.
  • Line bus interface, USB0 is a conventional USB interface, which needs to be combined with the user's manual operation to switch the working mode.
  • the external device connected to USB 1 is a 4G module (ie 4G donle) or a docking station.
  • the device type of the external device is a slave device.
  • the required working mode of USB 1 is host mode.
  • the smart remote control can automatically set the working mode of USB 1 Switch to host mode; the external device connected to USB 0 is an RTK module (ie RTK dongle) or PC.
  • USB 0 For the working mode of USB 0, as shown in Figure 4b, one can be provided at the designated position (such as the lower left corner) of the display interface. Switch the button "Switch working mode”, the user can click “Switch working mode” to flexibly switch the working mode of USB 0 between host mode and device mode. If the current working mode of USB 0 is host mode, the user clicks "Switch After working mode”, the working mode of USB 0 is switched from host mode to device mode, and the prompt message “switched successfully! host mode——>device mode” can be displayed. After the user clicks “switch working mode” again, as shown in Figure 4c It shows that the working mode of USB 0 is switched from device mode to host mode, and the prompt message "Switching successfully!
  • USB 0 device mode -> host mode
  • the user can switch the working mode of USB 0 to host mode by clicking "Switch Working Mode"; for USB 0
  • the connected external device is the use scenario of the PC. Since the device type of the PC is the host device, the user can switch the working mode of USB 0 to the device mode by clicking "Switch working mode".
  • the electronic device can obtain the first device type of the external device connected to the first universal serial bus interface, and determine the first target operating mode corresponding to the first universal serial bus interface according to the first device type, and Switch the current working mode of the first universal serial bus interface to the first target working mode.
  • the mode switching instruction input through the display interface of the display device can be acquired, and the second universal serial bus interface can be determined according to the mode switching instruction.
  • the second target working mode corresponding to the universal serial bus interface, and the current working mode of the second universal serial bus interface is switched to the second target working mode, which can realize the automatic switching of the working mode of one universal serial bus interface and the other universal serial bus interface.
  • the serial bus interface combines the user's manual operation to switch the working mode, which can realize the flexible switching of the working mode of the universal serial bus interface of the electronic device, so that the electronic device has rich expansion functions, can meet the diversified use scenarios, and greatly improve The practicality of electronic equipment.
  • the electronic device can determine the operating mode required by one or both of the two universal serial bus interfaces according to the device type of the external device connected to the universal serial bus interface, And output a prompt message for the user to confirm. After the user confirms, one or two universal serial bus interfaces can be correspondingly switched to the required working mode. Specifically, the electronic device obtains the first device type of the external device connected to the first universal serial bus interface, or the second device type of the external device connected to the second universal serial bus interface, according to the first device type or the second device The mode switching prompt information is output through the display interface of the electronic device.
  • the mode switching prompt information includes the first target operating mode corresponding to the first universal serial bus interface or the second target operating mode corresponding to the second universal serial bus interface, so that Automatically identify the working mode required by each universal serial bus interface in a specific use scenario, and prompt the user to perform mode switching, which realizes the flexible switching of the universal serial bus interface's working mode, and makes the electronic device possess rich extended functions.
  • the mode switching instruction can be input through the display interface of the electronic device, and the electronic device obtains the information input through the display interface of the electronic device.
  • the mode switching instruction may specifically include: the electronic device obtains the mode switching instruction input for the mode switching prompt information, and the mode switching instruction is used to confirm the first target working mode or the second target working mode included in the mode switching prompt information.
  • the electronic device outputs the mode switching prompt information through the display interface of the electronic device based on the first device type or the second device type, which may specifically include: the electronic device determines the first universal serial bus according to the first device type The first target working mode corresponding to the interface, or the second target working mode corresponding to the second universal serial bus interface is determined according to the second device type, and the first target working mode or the second target working mode is changed by outputting a mode switching prompt message The user is prompted, that is, the mode switching prompt information includes the first target working mode or the second target working mode.
  • the electronic device detects that the external device connected to the first universal serial bus interface is a slave device (such as a storage device, positioning module, communication module or docking station), and the external device connected to the second universal serial bus interface is A host device (such as a PC) can determine that the working mode required by the first universal serial bus interface (that is, the above-mentioned first target working mode) is the host mode, and the working mode required by the second universal serial bus interface (that is, the above-mentioned The second target working mode) is the device mode, the electronic device can output the mode switching prompt message as shown in Figure 4d through the display interface, and the content of the mode switching prompt message can include "It is detected that the first universal serial bus interface needs to be switched to host mode, the second universal serial bus interface needs to be switched to device mode, please confirm!", and two options of "switching" and “no switching” can be provided. If the user enters the mode switching command for the "switching" option, the electronic The device can perform mode switching, that is, switch,
  • the first universal serial bus interface automatically switches the working mode
  • the second universal serial bus interface combines the user's manual operation to switch the working mode.
  • the electronic device detects that the external device connected to the first universal serial bus interface is a slave device (such as a storage device, positioning module, communication module or docking station), and the external device connected to the second universal serial bus interface is a host device (such as PC), it can be determined that the working mode required by the first universal serial bus interface is host mode, and the working mode required by the second universal serial bus interface is device mode, then the electronic device can directly connect the first universal serial bus
  • the interface is switched to host mode, and the mode switching prompt message shown in Figure 4e is output through the display interface.
  • the content of the mode switching prompt message may include "detected that the first universal serial bus interface has automatically switched to host mode, and the second universal The serial bus interface needs to be switched to the device mode, please confirm! At this time, the user only needs to confirm whether the mode switch is performed on the second universal serial bus interface, and can provide two options of "switching" and “no switching", if The user inputs a mode switching instruction for the "switch” option, and the electronic device can perform mode switching for the second universal serial bus interface, that is, switch the second universal serial bus interface to the device mode.
  • FIG. 5 is a schematic structural diagram of an electronic device in an embodiment of the present application.
  • the electronic device in an embodiment of the present application includes a processor 501, a memory 502, a display device 503, a first universal serial bus interface 504, and a first universal serial bus interface 504.
  • the memory 502 may include a volatile memory (volatile memory), such as a random-access memory (random-access memory, RAM); the memory 502 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), solid-state drive (solid-state drive, SSD), etc.; the memory 502 may also include a combination of the foregoing types of memories.
  • volatile memory such as a random-access memory (random-access memory, RAM)
  • non-volatile memory such as a flash memory (flash memory), solid-state drive (solid-state drive, SSD), etc.
  • flash memory flash memory
  • solid-state drive solid-state drive
  • the display device 503 may be a display screen, such as a display screen with a touch operation function.
  • the processor 501 may be a central processing unit (CPU) 501. In an embodiment, the processor 501 may also be a graphics processor 501 (Graphics Processing Unit, GPU). The processor 501 may also be a combination of a CPU and a GPU. In one embodiment, the memory 502 is used to store program instructions. The processor 501 can call the program instructions to perform the following operations:
  • the operating mode of the first universal serial bus interface 504 and/or the operating mode of the second universal serial bus interface 505 is switched according to the mode switching instruction, and the operating mode includes a host mode and a device mode.
  • the processor 501 is specifically configured to:
  • the target operating mode combination corresponding to the first universal serial bus interface 504 and the second universal serial bus interface 505 is determined according to the mode switching instruction, and the target operating mode combination includes the first universal serial bus A first target operating mode corresponding to the interface 504 and a second target operating mode corresponding to the second universal serial bus interface 505;
  • processor 501 is further configured to:
  • processor 501 is specifically configured to:
  • the at least one working mode combination includes that the working mode of the first universal serial bus interface 504 is the host mode and the working mode of the second universal serial bus interface 505 is the device mode, and the working mode of the second universal serial bus interface 505 is the device mode.
  • the working mode of a universal serial bus interface 504 is the host mode
  • the working mode of the second universal serial bus interface 505 is the host mode
  • the working mode of the first universal serial bus interface 504 is the device mode
  • the working mode of the second universal serial bus interface 505 is the host mode
  • the working mode of the first universal serial bus interface 504 is the device mode
  • the working mode of the second universal serial bus interface 505 is the device mode.
  • processor 501 is further configured to:
  • the mode switching prompt information is output through the display interface of the display device 503, and the mode switching prompt information includes the first device corresponding to the first universal serial bus interface 504.
  • the processor 501 is specifically configured to:
  • the processor 501 is specifically configured to:
  • the mode switching prompt information is output through the display interface of the display device 503, and the mode switching prompt information includes the first target working mode or the second target working mode.
  • processor 501 is further configured to:
  • processor 501 is specifically configured to:
  • the current working mode of the second universal serial bus interface 505 is switched to the second target working mode.
  • the processor 501 is specifically configured to:
  • the calling interface controller adjusts the communication protocol of the second universal serial bus interface to a communication protocol that matches the second target working mode, so that the second universal serial bus interface is switched from the current working mode to The second target working mode.
  • the external device includes one or more of a host device, a storage device, a positioning module, a communication module, and a docking station.
  • the electronic device includes a remote control device of a movable platform.
  • the movable platform includes a drone.
  • the processor 501, the memory 502, the display device 503, the first universal serial bus interface 504, the second universal serial bus interface 505, and the communication interface 506 described in the embodiments of the present application can execute the embodiments of the present application.
  • the implementation described in the relevant embodiment of the handover control method provided in FIG. 1 or FIG. 3 will not be repeated here.
  • the embodiments of the present application also provide a computer storage medium, and the computer storage medium stores program instructions, and when the program instructions are executed, they are used to implement the corresponding methods described in the foregoing embodiments.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present invention essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device, etc., specifically a processor in a computer device
  • the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (English: Read-Only Memory, abbreviation: ROM) or random access memory (English: Random Access Memory, abbreviation: RAM) and other media that can store program codes.

Abstract

A switching control method, an electronic device and a computer-readable storage medium. The switching control method can be applied to an electronic device, the electronic device comprising a first universal serial bus interface and a second universal serial bus interface, and can comprise acquiring a mode switching instruction inputted by means of a display interface of the electronic device (101), and switching the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction, the working modes comprising host mode and device mode (102), thereby flexibly switching the working modes of the universal serial bus interfaces of the electronic device such that the electronic device has many expansion functions, which can meet diversified usage scenarios.

Description

一种切换控制方法、电子设备及计算机可读存储介质Switching control method, electronic equipment and computer readable storage medium 技术领域Technical field
本申请涉及电子技术领域,尤其涉及一种切换控制方法、电子设备及计算机可读存储介质。This application relates to the field of electronic technology, and in particular to a switching control method, electronic equipment, and computer-readable storage medium.
背景技术Background technique
目前,带屏智能遥控器这类电子设备是无人机的重要控制终端和交互窗口,随着无人机的应用场景和使用范围的不断扩大,无人机的业务也变得越来越繁复。智能遥控器作为无人机在地面端的计算中心,也承载了更多的业务,因此,智能遥控器的扩展性尤为重要。At present, electronic devices such as smart remote controllers with screens are important control terminals and interactive windows for drones. As the application scenarios and use ranges of drones continue to expand, the business of drones has become more and more complicated. . As the computing center of the UAV on the ground, the smart remote control also carries more services. Therefore, the scalability of the smart remote control is particularly important.
常用的智能遥控器这类电子设备的扩展性主要有以下方案:一种是智能遥控器的通用串行总线(Universal Serial Bus,USB)接口工作在主机(host)模式,也即智能遥控器作为主机端,外接通信模块(如4G dongle)、存储设备(如U盘)等,此时只能做到外设挂载;另一种是智能遥控器的USB接口工作在设备(device)模式,也即智能遥控器作为设备端,连接主机设备(如PC地面站),与PC通信以及数据交互等,此时只能适用于连接PC。可以看出,无论是基于USB host的扩展方案还是基于USB device的扩展方案,都存在扩展功能单一,缺乏灵活性,使用场景较为受限的弊端。The scalability of commonly used electronic devices such as smart remote control mainly includes the following solutions: One is that the universal serial bus (USB) interface of the smart remote control works in host mode, that is, the smart remote control functions as a host. On the host side, external communication modules (such as 4G Dongle), storage devices (such as U disks), etc., can only be mounted on peripherals; the other is that the USB interface of the smart remote control works in device mode. That is to say, the smart remote controller is used as the device terminal to connect to the host device (such as the PC ground station), communicate with the PC, and interact with the data. At this time, it can only be applied to the PC. It can be seen that both the USB host-based expansion solution and the USB device-based expansion solution have the disadvantages of single expansion function, lack of flexibility, and limited usage scenarios.
发明内容Summary of the invention
本申请实施例公开了一种切换控制方法、电子设备及计算机可读存储介质,可以实现电子设备通用串行总线接口的工作模式的灵活切换,使得电子设备具备丰富的扩展功能,可以满足多样化的使用场景。The embodiment of the application discloses a switching control method, an electronic device, and a computer-readable storage medium, which can realize the flexible switching of the working mode of the universal serial bus interface of the electronic device, so that the electronic device has rich extended functions and can meet the needs of diversification. Usage scenarios.
第一方面,本申请实施例提供一种切换控制方法,应用于电子设备,所述电子设备包括第一通用串行总线接口和第二通用串行总线接口,所述方法包括:In the first aspect, an embodiment of the present application provides a switching control method, which is applied to an electronic device, the electronic device includes a first universal serial bus interface and a second universal serial bus interface, and the method includes:
获取通过所述电子设备的显示界面输入的模式切换指令;Acquiring a mode switching instruction input through the display interface of the electronic device;
根据所述模式切换指令对所述第一通用串行总线接口的工作模式和/或所 述第二通用串行总线接口的工作模式进行切换,所述工作模式包括主机模式和设备模式。Switching the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction, and the working mode includes a host mode and a device mode.
第二方面,本申请实施例提供一种电子设备,所述电子设备包括处理器、存储器、显示装置、第一通用串行总线接口和第二通用串行总线接口,其中:In a second aspect, an embodiment of the present application provides an electronic device that includes a processor, a memory, a display device, a first universal serial bus interface, and a second universal serial bus interface, where:
所述存储器,用于存储程序代码;The memory is used to store program code;
所述处理器,用于调用所述程序代码以执行以下操作:The processor is configured to call the program code to perform the following operations:
获取通过所述显示装置的显示界面输入的模式切换指令;Acquiring a mode switching instruction input through the display interface of the display device;
根据所述模式切换指令对所述第一通用串行总线接口的工作模式和/或所述第二通用串行总线接口的工作模式进行切换,所述工作模式包括主机模式和设备模式。Switching the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction, and the working mode includes a host mode and a device mode.
第三方面,本发明实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有程序指令,该程序指令被执行时,用于实现第一方面所述的切换控制方法。In a third aspect, an embodiment of the present invention provides a computer-readable storage medium with program instructions stored in the computer-readable storage medium, and when the program instructions are executed, they are used to implement the switching control method described in the first aspect.
本申请实施例可以获取通过电子设备的显示界面输入的模式切换指令,根据模式切换指令对电子设备的第一通用串行总线接口的工作模式和/或第二通用串行总线接口的工作模式进行切换,工作模式包括主机模式和设备模式,从而可以实现电子设备通用串行总线接口的工作模式的灵活切换,使得电子设备具备丰富的扩展功能,可以满足多样化的使用场景。The embodiment of the present application can obtain the mode switching instruction input through the display interface of the electronic device, and perform the operation mode of the first universal serial bus interface and/or the second universal serial bus interface of the electronic device according to the mode switching instruction. Switching, working modes include host mode and device mode, so that flexible switching of the working mode of the universal serial bus interface of the electronic device can be realized, so that the electronic device has rich extended functions and can meet diversified use scenarios.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained from these drawings without creative labor.
图1是本申请实施例提供的一种切换控制方法的流程示意图;FIG. 1 is a schematic flowchart of a handover control method provided by an embodiment of the present application;
图2a是本申请实施例提供的一种电子设备的结构示意图;Figure 2a is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图2b是本申请实施例提供的一种模式切换的显示界面示意图;2b is a schematic diagram of a display interface for mode switching provided by an embodiment of the present application;
图3是本申请实施例提供的另一种切换控制方法的流程示意图;FIG. 3 is a schematic flowchart of another handover control method provided by an embodiment of the present application;
图4a是本申请实施例提供的一种电子设备的应用场景的示意图;Fig. 4a is a schematic diagram of an application scenario of an electronic device provided by an embodiment of the present application;
图4b是本申请实施例提供的另一种模式切换的显示界面示意图;4b is a schematic diagram of another mode switching display interface provided by an embodiment of the present application;
图4c是本申请实施例提供的又一种模式切换的显示界面示意图;4c is a schematic diagram of another mode switching display interface provided by an embodiment of the present application;
图4d是本申请实施例提供的一种模式切换提示信息的示意图;FIG. 4d is a schematic diagram of a mode switching prompt information provided by an embodiment of the present application;
图4e是本申请实施例提供的另一种模式切换提示信息的示意图;4e is a schematic diagram of another mode switching prompt information provided by an embodiment of the present application;
图5是本申请实施例提供的一种电子设备的结构示意图。Fig. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
当前的中高端消费无人机产品或者行业用途的无人机系统中,例如农业无人机、测绘等场景,配置一体化的带显示屏的智能遥控器或者地面站设备等电子设备能够为用户提供更好的飞行体验以及更专业的作业平台,这些电子设备都有很强烈的外接各种设备、进行数据交互的需求。以智能遥控器为例,目前为了满足各种不同的使用场景和日益复杂的功能扩展需求,发挥智能遥控器的计算能力以及人工智能(Artificial Intelligence,AI)能力,现有技术的做法是通常给智能遥控器只配置一个USB接口(主机host接口或者设备device接口),例如智能遥控器只配置了一个device接口,则智能遥控器只能以设备模式(即作为从机)连接主机设备(如PC),与PC进行通信以及数据交互等,如果还同时需要作为主机host连接存储设备(如U盘)以读取数据,则是无法做到的;又例如智能遥控器只配置了一个host接口,则智能遥控器只能以主机模式(即作为host)连接存储设备(如U盘)以读取数据,如果还同时需要以设备模式(即作为从机)连接主机设备(如PC),与PC进行通信以及数据交互等,则也是无法做到的。可见,目前智能遥控器上配置的host接口/device接口一方面数量是不够用的,无法满足复杂应用场景的需求,另一方面接口的功能固定无法扩展,缺乏灵活性,使用场景较为受限。In the current mid-to-high-end consumer drone products or industrial drone systems, such as agricultural drones, surveying and mapping, etc., electronic devices such as integrated smart remote controls with displays or ground station equipment can provide users To provide a better flight experience and a more professional operating platform, these electronic devices have a strong demand for external devices and data interaction. Take the smart remote control as an example. At present, in order to meet various different usage scenarios and increasingly complex function expansion requirements, and to give full play to the computing power and artificial intelligence (AI) capabilities of the smart remote control, the existing technology usually provides The smart remote control only configures one USB interface (host host interface or device device interface). For example, the smart remote control only configures one device interface, then the smart remote control can only be connected to the host device (such as a PC) in device mode (that is, as a slave) ), communicate with PC and data interaction, etc. If you also need to connect to a storage device (such as a USB flash drive) as a host host to read data, it cannot be done; another example is that the smart remote control only configures a host interface, The smart remote control can only be connected to a storage device (such as a USB flash drive) in host mode (that is, as a host) to read data. If it is also necessary to connect a host device (such as a PC) in device mode (that is, as a slave) to connect to the PC It is also impossible to communicate and exchange data. It can be seen that, on the one hand, the number of host interfaces/device interfaces configured on the smart remote control is insufficient and cannot meet the needs of complex application scenarios. On the other hand, the functions of the interface are fixed and cannot be expanded, lack flexibility, and the use scenarios are relatively limited.
针对目前智能遥控器等电子设备的通用串行总线接口普遍存在的扩展功能单一,缺乏灵活性,使用场景较为受限等弊端,本申请实施例提供了一种切换控制方法、电子设备及计算机可读存储介质,可以实现电子设备通用串行总线接口的工作模式的灵活切换,使得电子设备具备丰富的扩展功能,可以满足多样化的使用场景。In view of the ubiquitous universal serial bus interfaces of electronic devices such as smart remote controllers, such as single extended functions, lack of flexibility, and limited use scenarios, the embodiments of the present application provide a switching control method, electronic devices, and computers. Reading the storage medium can realize the flexible switching of the working mode of the universal serial bus interface of the electronic device, so that the electronic device has a wealth of extended functions and can meet diversified use scenarios.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行详细描述。The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
请参见图1,是本申请实施例提供的一种切换控制方法的流程示意图。本申请实施例的切换控制方法应用于电子设备,所述电子设备包括第一通用串行总线接口和第二通用串行总线接口,所述方法包括如下步骤:Refer to FIG. 1, which is a schematic flowchart of a handover control method provided by an embodiment of the present application. The switching control method of the embodiment of the present application is applied to an electronic device, the electronic device includes a first universal serial bus interface and a second universal serial bus interface, and the method includes the following steps:
101、获取通过所述电子设备的显示界面输入的模式切换指令。101. Acquire a mode switching instruction input through the display interface of the electronic device.
其中,电子设备具体可以是可移动平台的遥控设备,例如智能遥控器,可移动平台具体可以是无人机,智能遥控器包括显示装置以及两个通用串行总线接口(记为第一通用串行总线接口和第二通用串行总线接口)。电子设备通过显示装置可以显示无人机的工作状态数据、采集的图像数据等,还可以接收用户输入的各种指令,例如对无人机的操控指令,对通用串行总线接口的模式切换指令,等等。Among them, the electronic device may specifically be a remote control device of a movable platform, such as a smart remote control, and the movable platform may specifically be a drone. The smart remote control includes a display device and two universal serial bus interfaces (denoted as the first universal serial bus). Line bus interface and second universal serial bus interface). Electronic equipment can display the working status data of the drone, collected image data, etc. through the display device, and can also receive various instructions input by the user, such as control instructions for the drone, and mode switching instructions for the universal serial bus interface ,and many more.
具体的,电子设备的第一通用串行总线接口和第二通用串行总线接口均可以包括两种工作模式,该两种工作模式包括主机模式(host)和设备模式(device),并允许对第一通用串行总线接口和/或第二通用串行总线接口的工作模式进行切换。用户可以根据实际使用场景的需求,对第一通用串行总线接口和/或第二通用串行总线接口的工作模式进行切换,具体可以通过电子设备的显示装置的显示界面输入模式切换指令,则电子设备获取用户通过显示装置的显示界面输入的模式切换指令。Specifically, both the first universal serial bus interface and the second universal serial bus interface of the electronic device may include two working modes, and the two working modes include a host mode (host) and a device mode (device), and allow pairing The working mode of the first universal serial bus interface and/or the second universal serial bus interface is switched. The user can switch the working mode of the first universal serial bus interface and/or the second universal serial bus interface according to the needs of the actual use scene. Specifically, the mode switching instruction can be input through the display interface of the display device of the electronic device, then The electronic device obtains the mode switching instruction input by the user through the display interface of the display device.
102、根据所述模式切换指令对所述第一通用串行总线接口的工作模式和/或所述第二通用串行总线接口的工作模式进行切换,所述工作模式包括主机模式和设备模式。102. Switch the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction, where the working modes include a host mode and a device mode.
具体的,电子设备可以根据模式切换指令确定第一通用串行总线接口和第二通用串行总线接口对应的目标工作模式组合,目标工作模式组合包括第一通 用串行总线接口对应的第一目标工作模式和第二通用串行总线接口对应的第二目标工作模式,进而可以将第一通用串行总线接口当前的工作模式切换为第一目标工作模式,和/或,将第二通用串行总线接口当前的工作模式切换为第二目标工作模式。例如,目标工作模式组合包括第一通用串行总线接口对应的第一目标工作模式为host模式,第二通用串行总线接口对应的第二目标工作模式为device模式,则电子设备可以将第一通用串行总线接口当前的工作模式切换为host模式,和/或,将第二通用串行总线接口当前的工作模式切换为device模式。Specifically, the electronic device may determine the target operating mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface according to the mode switching instruction, and the target operating mode combination includes the first target corresponding to the first universal serial bus interface The working mode and the second target working mode corresponding to the second universal serial bus interface can further switch the current working mode of the first universal serial bus interface to the first target working mode, and/or change the second universal serial bus interface to the first target working mode. The current working mode of the bus interface is switched to the second target working mode. For example, the target working mode combination includes that the first target working mode corresponding to the first universal serial bus interface is the host mode, and the second target working mode corresponding to the second universal serial bus interface is the device mode, and the electronic device can set the first The current working mode of the universal serial bus interface is switched to the host mode, and/or the current working mode of the second universal serial bus interface is switched to the device mode.
本申请实施例中,电子设备可以获取通过显示装置的显示界面输入的模式切换指令,根据模式切换指令可以对电子设备的第一通用串行总线接口的工作模式和/或第二通用串行总线接口的工作模式进行切换,工作模式包括主机模式和设备模式,从而可以实现电子设备通用串行总线接口的工作模式的灵活切换,使得电子设备具备丰富的扩展功能,可以满足多样化的使用场景。In the embodiment of the present application, the electronic device can obtain the mode switching instruction input through the display interface of the display device, and according to the mode switching instruction, the working mode of the first universal serial bus interface and/or the second universal serial bus of the electronic device can be checked. The working mode of the interface is switched, and the working mode includes the host mode and the device mode, so that the flexible switching of the working mode of the universal serial bus interface of the electronic device can be realized, so that the electronic device has rich extended functions and can meet diversified use scenarios.
在一些可行的实施方式中,针对第一通用串行总线接口的工作模式和第二通用串行总线接口的工作模式,电子设备可以提供至少一种工作模式组合,用户可以直接从该至少一种工作模式组合中选择需要的工作模式组合实现对第一通用串行总线接口的工作模式和/或第二通用串行总线接口的工作模式进行切换。具体的,电子设备可以通过显示装置的显示界面显示至少一种工作模式组合,用户可以通过输入模式切换指令从该至少一种工作模式组合中选择需要的工作模式组合(记为目标工作模式组合),电子设备获取用户针对该至少一种工作模式组合输入的模式切换指令,基于该模式切换指令即可确定第一通用串行总线接口和第二通用串行总线接口对应的目标工作模式组合,从而可以便捷地对电子设备通用串行总线接口的工作模式进行灵活切换,使得电子设备具备丰富的扩展功能。In some feasible implementation manners, for the working mode of the first universal serial bus interface and the working mode of the second universal serial bus interface, the electronic device can provide at least one combination of working modes, and the user can directly download from the at least one working mode. Selecting the required working mode combination in the working mode combination realizes the switching of the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface. Specifically, the electronic device can display at least one work mode combination through the display interface of the display device, and the user can select a desired work mode combination from the at least one work mode combination by inputting a mode switching instruction (denoted as a target work mode combination) The electronic device obtains the mode switching instruction input by the user for the at least one work mode combination, and based on the mode switching instruction, the target work mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface can be determined, thereby The working mode of the universal serial bus interface of the electronic device can be conveniently switched flexibly, so that the electronic device has rich expansion functions.
在一些可行的实施方式中,最多可以提供四种工作模式组合供用户选择,即该至少一种工作模式组合包括第一通用串行总线接口的工作模式为主机模式和第二通用串行总线接口的工作模式为设备模式、第一通用串行总线接口的工作模式为主机模式和第二通用串行总线接口的工作模式为主机模式、第一通用串行总线接口的工作模式为设备模式和第二通用串行总线接口的工作模式 为主机模式、第一通用串行总线接口的工作模式为设备模式和第二通用串行总线接口的工作模式为设备模式中的一种或多种。In some feasible implementation manners, a maximum of four working mode combinations can be provided for users to choose, that is, the at least one working mode combination includes the working mode of the first universal serial bus interface as the host mode and the second universal serial bus interface. The working mode of the first universal serial bus interface is the device mode, the working mode of the first universal serial bus interface is the host mode, the working mode of the second universal serial bus interface is the host mode, and the working mode of the first universal serial bus interface is the device mode and the first universal serial bus interface. 2. The working mode of the second universal serial bus interface is the host mode, the working mode of the first universal serial bus interface is the device mode, and the working mode of the second universal serial bus interface is one or more of the device modes.
举例来说,如图2a所示,电子设备包括的第一通用串行总线接口为USB1,第二通用串行总线接口为USB0。假设提供四种工作模式组合供用户选择,如图2b所示,针对USB 0和USB 1,电子设备通过显示装置的显示界面显示四种工作模式组合供用户选择,即工作模式组合1:USB 0主机(host)、USB1设备(即device),工作模式组合2:USB 0主机、USB 1主机,工作模式组合3:USB 0设备、USB 1主机,工作模式组合4:USB 0设备、USB 1设备,用户可以直接在显示界面中点击相应的工作模式组合输入模式切换指令,图2b中用户选择了工作模式组合3作为目标工作模式组合,则电子设备根据模式切换指令确定目标工作模式组合为USB 0的工作模式为device,USB 1的工作模式为host,进而将USB 0的工作模式切换为device,将USB1的工作模式切换为host,模式切换后,电子设备通过USB 0可以作为从机连接外部的主机设备(如PC),通过USB1可以作为主机连接外部的存储设备(如U盘)、通信模块(如4G dongle)、定位模块(RTK dongle)、扩展坞等,从而可以根据使用场景的实际需求便捷地对电子设备通用串行总线接口的工作模式进行灵活切换,使得电子设备具备丰富的扩展功能。For example, as shown in FIG. 2a, the first universal serial bus interface included in the electronic device is USB1, and the second universal serial bus interface is USB0. Assuming that four working mode combinations are provided for the user to choose, as shown in Figure 2b, for USB 0 and USB 1, the electronic device displays four working mode combinations for the user to choose through the display interface of the display device, that is, working mode combination 1: USB 0 Host, USB1 device (ie device), working mode combination 2: USB 0 host, USB 1 host, working mode combination 3: USB 0 device, USB 1 host, working mode combination 4: USB 0 device, USB 1 device , The user can directly click the corresponding work mode combination on the display interface to input the mode switch instruction. In Figure 2b, the user selects work mode combination 3 as the target work mode combination, and the electronic device determines the target work mode combination as USB according to the mode switch instruction. The working mode of USB 1 is device, the working mode of USB 1 is host, and the working mode of USB 0 is switched to device, and the working mode of USB 1 is switched to host. After the mode is switched, the electronic device can be used as a slave to connect to external devices through USB 0. The host device (such as PC) can be used as a host to connect external storage devices (such as U disk), communication module (such as 4G dongle), positioning module (RTK donle), docking station, etc. through USB1, so that it can be used according to the actual needs of the scene Conveniently and flexibly switch the working mode of the universal serial bus interface of the electronic device, so that the electronic device has a wealth of extended functions.
请参见图3,是本申请实施例提供的另一种切换控制方法的流程示意图。本申请实施例的切换控制方法应用于电子设备,所述电子设备包括第一通用串行总线接口和第二通用串行总线接口,所述方法包括如下步骤:Refer to FIG. 3, which is a schematic flowchart of another handover control method provided by an embodiment of the present application. The switching control method of the embodiment of the present application is applied to an electronic device, the electronic device includes a first universal serial bus interface and a second universal serial bus interface, and the method includes the following steps:
301、获取连接所述第一通用串行总线接口的外部设备的第一设备类型。301. Acquire a first device type of an external device connected to the first universal serial bus interface.
其中,外部设备具体可以包括主机设备(如PC)、存储设备(如U盘)、定位模块(如RTK dongle)、通信模块(如4G dongle)和扩展坞中的一种或多种。电子设备的两个通用串行总线接口中,其中一个接口是具有主机host/设备device自适应匹配功能的Universal Serial Bus On-The-Go(即USB OTG)接口,另一个接口是常规的USB接口,本实施例假设第一通用串行总线接口是USB OTG接口,第二通用串行总线接口是常规的USB接口,相应地,第一通用串行总线接口自动切换工作模式,第二通用串行总线接口结合用户的手动操作来切换工作模式。Among them, the external device may specifically include one or more of a host device (such as a PC), a storage device (such as a USB flash drive), a positioning module (such as an RTK dongle), a communication module (such as a 4G dongle), and a docking station. Among the two universal serial bus interfaces of electronic devices, one interface is the Universal Serial Bus On-The-Go (ie USB OTG) interface with the adaptive matching function of the host host/device device, and the other interface is the conventional USB interface In this embodiment, it is assumed that the first universal serial bus interface is a USB OTG interface, and the second universal serial bus interface is a conventional USB interface. Accordingly, the first universal serial bus interface automatically switches the working mode, and the second universal serial bus interface automatically switches the working mode. The bus interface combines the user's manual operation to switch the working mode.
具体的,由于第一通用串行总线接口是USB OTG接口,当外部设备连接第一通用串行总线接口后,电子设备可以通过第一通用串行总线接口自动识别出该外部设备的设备类型(记为第一设备类型),设备类型可以包括主机设备(如PC)或者从机设备(如存储设备、定位模块、通信模块或扩展坞)。Specifically, since the first universal serial bus interface is a USB OTG interface, when an external device is connected to the first universal serial bus interface, the electronic device can automatically recognize the device type of the external device through the first universal serial bus interface ( Marked as the first device type), the device type may include a host device (such as a PC) or a slave device (such as a storage device, a positioning module, a communication module, or a docking station).
302、根据所述第一设备类型确定所述第一通用串行总线接口对应的第一目标工作模式。302. Determine a first target operating mode corresponding to the first universal serial bus interface according to the first device type.
具体的,电子设备根据外部设备的第一设备类型可以确定出第一通用串行总线接口所需的工作模式(记为第一目标工作模式),如果外部设备的设备类型为主机设备,则第一目标工作模式应为device模式;如果外部设备的设备类型为从机设备,则第一目标工作模式应为host模式。Specifically, the electronic device can determine the operating mode (denoted as the first target operating mode) required by the first universal serial bus interface according to the first device type of the external device. If the device type of the external device is the host device, the first The first target working mode should be the device mode; if the device type of the external device is a slave device, the first target working mode should be the host mode.
303、将所述第一通用串行总线接口当前的工作模式切换为所述第一目标工作模式。303. Switch the current working mode of the first universal serial bus interface to the first target working mode.
具体的,电子设备确定出第一通用串行总线接口对应的第一目标工作模式后,可以直接将第一通用串行总线接口当前的工作模式切换为第一目标工作模式。Specifically, after the electronic device determines the first target operating mode corresponding to the first universal serial bus interface, it can directly switch the current operating mode of the first universal serial bus interface to the first target operating mode.
304、获取通过所述电子设备的显示界面输入的模式切换指令。304. Acquire a mode switching instruction input through the display interface of the electronic device.
具体的,用户可以根据实际使用场景的需求,对第二通用串行总线接口的工作模式进行手动切换,具体可以通过电子设备的显示装置的显示界面输入模式切换指令,则电子设备获取用户通过显示装置的显示界面输入的模式切换指令。Specifically, the user can manually switch the working mode of the second universal serial bus interface according to the needs of the actual use scene. Specifically, the mode switching instruction can be input through the display interface of the display device of the electronic device, and the electronic device can obtain the user's display Mode switch command input from the display interface of the device.
305、根据所述模式切换指令确定所述第二通用串行总线接口对应的第二目标工作模式。305. Determine a second target operating mode corresponding to the second universal serial bus interface according to the mode switching instruction.
306、将所述第二通用串行总线接口当前的工作模式切换为所述第二目标工作模式。306. Switch the current working mode of the second universal serial bus interface to the second target working mode.
具体的,电子设备可以根据模式切换指令确定第二通用串行总线接口对应的第二目标工作模式,进而可以调用接口控制器将第二通用串行总线接口的通信协议调整为与第二目标工作模式匹配的通信协议,以使得第二通用串行总线接口从当前的工作模式切换为第二目标工作模式。例如,第二目标工作模式为device模式,则电子设备可以调用接口控制器调整第二通用串行总线接口的通 信协议,具体可以调整为与device模式匹配的通信协议,从而实现将第二通用串行总线接口当前的工作模式切换为device模式。Specifically, the electronic device may determine the second target operating mode corresponding to the second universal serial bus interface according to the mode switching instruction, and then may call the interface controller to adjust the communication protocol of the second universal serial bus interface to work with the second target The mode matching communication protocol enables the second universal serial bus interface to switch from the current working mode to the second target working mode. For example, if the second target working mode is the device mode, the electronic device can call the interface controller to adjust the communication protocol of the second universal serial bus interface. Specifically, it can be adjusted to a communication protocol that matches the device mode, so as to realize the second universal serial bus interface. The current working mode of the line bus interface is switched to device mode.
举例来说,以电子设备是智能遥控器为例,如图4a所示,USB 1作为第一通用串行总线接口,USB 1是USB OTG接口,可以自动切换工作模式;USB0作为第二通用串行总线接口,USB0是常规的USB接口,需结合用户的手动操作来切换工作模式。USB 1连接的外部设备为4G模块(即4G dongle)或者扩展坞,外部设备的设备类型为从机设备,USB 1所需的工作模式为host模式,智能遥控器可以自动将USB 1的工作模式切换为host模式;USB 0连接的外部设备为RTK模块(即RTK dongle)或者PC,对于USB 0的工作模式,如图4b所示,可以在显示界面的指定位置(如左下角)处提供一个切换按钮“切换工作模式”,用户点击“切换工作模式”即可将USB 0的工作模式在host模式和device模式之间灵活切换,如果USB 0当前的工作模式为host模式,则用户点击“切换工作模式”后,USB 0的工作模式从host模式切换到device模式,并可以显示提示信息“切换成功!host模式——>device模式”,用户再次点击“切换工作模式”后,如图4c所示,USB 0的工作模式从device模式切换到host模式,并可以显示提示信息“切换成功!device模式——>host模式”。从而,对于USB 0连接的外部设备为RTK dongle的使用场景,由于RTK dongle的设备类型为从机设备,则用户通过点击“切换工作模式”可以将USB0的工作模式切换成host模式;对于USB 0连接的外部设备为PC的使用场景,由于PC的设备类型为主机设备,则用户通过点击“切换工作模式”可以将USB 0的工作模式切换成device模式。For example, taking the electronic device as a smart remote controller as an example, as shown in Figure 4a, USB 1 is the first universal serial bus interface, USB 1 is the USB OTG interface, which can automatically switch the working mode; USB0 is the second universal serial bus interface. Line bus interface, USB0 is a conventional USB interface, which needs to be combined with the user's manual operation to switch the working mode. The external device connected to USB 1 is a 4G module (ie 4G donle) or a docking station. The device type of the external device is a slave device. The required working mode of USB 1 is host mode. The smart remote control can automatically set the working mode of USB 1 Switch to host mode; the external device connected to USB 0 is an RTK module (ie RTK dongle) or PC. For the working mode of USB 0, as shown in Figure 4b, one can be provided at the designated position (such as the lower left corner) of the display interface. Switch the button "Switch working mode", the user can click "Switch working mode" to flexibly switch the working mode of USB 0 between host mode and device mode. If the current working mode of USB 0 is host mode, the user clicks "Switch After working mode”, the working mode of USB 0 is switched from host mode to device mode, and the prompt message “switched successfully! host mode——>device mode” can be displayed. After the user clicks “switch working mode” again, as shown in Figure 4c It shows that the working mode of USB 0 is switched from device mode to host mode, and the prompt message "Switching successfully! device mode -> host mode" can be displayed. Therefore, for the use scenario where the external device connected to USB 0 is RTK dongle, since the device type of RTK dongle is a slave device, the user can switch the working mode of USB 0 to host mode by clicking "Switch Working Mode"; for USB 0 The connected external device is the use scenario of the PC. Since the device type of the PC is the host device, the user can switch the working mode of USB 0 to the device mode by clicking "Switch working mode".
本申请实施例中,电子设备可以获取连接第一通用串行总线接口的外部设备的第一设备类型,根据第一设备类型确定出第一通用串行总线接口对应的第一目标工作模式,并将第一通用串行总线接口当前的工作模式切换为第一目标工作模式,对于第二通用串行总线接口,可以获取通过显示装置的显示界面输入的模式切换指令,根据模式切换指令确定第二通用串行总线接口对应的第二目标工作模式,并将第二通用串行总线接口当前的工作模式切换为第二目标工作模式,可以实现一个通用串行总线接口自动切换工作模式,另一个通用串行总线接口结合用户的手动操作来切换工作模式,从而可以实现电子设备通用串 行总线接口的工作模式的灵活切换,使得电子设备具备丰富的扩展功能,可以满足多样化的使用场景,大大提高了电子设备的实用性。In the embodiment of the present application, the electronic device can obtain the first device type of the external device connected to the first universal serial bus interface, and determine the first target operating mode corresponding to the first universal serial bus interface according to the first device type, and Switch the current working mode of the first universal serial bus interface to the first target working mode. For the second universal serial bus interface, the mode switching instruction input through the display interface of the display device can be acquired, and the second universal serial bus interface can be determined according to the mode switching instruction. The second target working mode corresponding to the universal serial bus interface, and the current working mode of the second universal serial bus interface is switched to the second target working mode, which can realize the automatic switching of the working mode of one universal serial bus interface and the other universal serial bus interface. The serial bus interface combines the user's manual operation to switch the working mode, which can realize the flexible switching of the working mode of the universal serial bus interface of the electronic device, so that the electronic device has rich expansion functions, can meet the diversified use scenarios, and greatly improve The practicality of electronic equipment.
在一些可行的实施方式中,电子设备可以根据连接通用串行总线接口的外部设备的设备类型,确定两个通用串行总线接口中的一个或者两个通用串行总线接口所需的工作模式,并输出提示信息让用户确认,用户确认后即可将其中一个或者两个通用串行总线接口对应切换到所需的工作模式。具体包括:电子设备获取连接第一通用串行总线接口的外部设备的第一设备类型,或连接第二通用串行总线接口的外部设备的第二设备类型,根据第一设备类型或第二设备类型通过电子设备的显示界面输出模式切换提示信息,模式切换提示信息包括第一通用串行总线接口对应的第一目标工作模式或第二通用串行总线接口对应的第二目标工作模式,从而可以自动识别各个通用串行总线接口在具体使用场景中所需的工作模式,并提示用户执行模式切换,实现了通用串行总线接口的工作模式的灵活切换,使得电子设备具备丰富的扩展功能。In some feasible implementation manners, the electronic device can determine the operating mode required by one or both of the two universal serial bus interfaces according to the device type of the external device connected to the universal serial bus interface, And output a prompt message for the user to confirm. After the user confirms, one or two universal serial bus interfaces can be correspondingly switched to the required working mode. Specifically, the electronic device obtains the first device type of the external device connected to the first universal serial bus interface, or the second device type of the external device connected to the second universal serial bus interface, according to the first device type or the second device The mode switching prompt information is output through the display interface of the electronic device. The mode switching prompt information includes the first target operating mode corresponding to the first universal serial bus interface or the second target operating mode corresponding to the second universal serial bus interface, so that Automatically identify the working mode required by each universal serial bus interface in a specific use scenario, and prompt the user to perform mode switching, which realizes the flexible switching of the universal serial bus interface's working mode, and makes the electronic device possess rich extended functions.
进一步的,如果用户确认模式切换提示信息包括的第一目标工作模式或第二目标工作模式,则可以通过电子设备的显示界面输入模式切换指令,此时电子设备获取通过电子设备的显示界面输入的模式切换指令,具体可以包括:电子设备获取针对模式切换提示信息输入的模式切换指令,模式切换指令用于对模式切换提示信息包括的第一目标工作模式或第二目标工作模式进行确认。Further, if the user confirms that the first target working mode or the second target working mode included in the mode switching prompt information, the mode switching instruction can be input through the display interface of the electronic device, and the electronic device obtains the information input through the display interface of the electronic device. The mode switching instruction may specifically include: the electronic device obtains the mode switching instruction input for the mode switching prompt information, and the mode switching instruction is used to confirm the first target working mode or the second target working mode included in the mode switching prompt information.
在一些可行的实施方式中,电子设备基于第一设备类型或第二设备类型通过电子设备的显示界面输出模式切换提示信息,具体可以包括:电子设备根据第一设备类型确定第一通用串行总线接口对应的第一目标工作模式,或根据第二设备类型确定第二通用串行总线接口对应的第二目标工作模式,并通过输出模式切换提示信息将第一目标工作模式或第二目标工作模式提示给用户,即模式切换提示信息包括第一目标工作模式或第二目标工作模式。In some feasible implementation manners, the electronic device outputs the mode switching prompt information through the display interface of the electronic device based on the first device type or the second device type, which may specifically include: the electronic device determines the first universal serial bus according to the first device type The first target working mode corresponding to the interface, or the second target working mode corresponding to the second universal serial bus interface is determined according to the second device type, and the first target working mode or the second target working mode is changed by outputting a mode switching prompt message The user is prompted, that is, the mode switching prompt information includes the first target working mode or the second target working mode.
举例来说,电子设备检测到第一通用串行总线接口连接的外部设备是从机设备(如存储设备、定位模块、通信模块或扩展坞),第二通用串行总线接口连接的外部设备是主机设备(如PC),则可以确定第一通用串行总线接口所需的工作模式(即上述第一目标工作模式)为host模式,第二通用串行总线接口所需的工作模式(即上述第二目标工作模式)为device模式,则电子设备可 以通过显示界面输出如图4d所示的模式切换提示信息,模式切换提示信息的内容可以包括“检测到第一通用串行总线接口需切换为host模式,第二通用串行总线接口需切换为device模式,请确认!”,并可以提供“切换”和“不切换”两个选项,如果用户针对“切换”选项输入模式切换指令,则电子设备即可执行模式切换,即将第一通用串行总线接口切换为host模式,并将第二通用串行总线接口切换为device模式。For example, the electronic device detects that the external device connected to the first universal serial bus interface is a slave device (such as a storage device, positioning module, communication module or docking station), and the external device connected to the second universal serial bus interface is A host device (such as a PC) can determine that the working mode required by the first universal serial bus interface (that is, the above-mentioned first target working mode) is the host mode, and the working mode required by the second universal serial bus interface (that is, the above-mentioned The second target working mode) is the device mode, the electronic device can output the mode switching prompt message as shown in Figure 4d through the display interface, and the content of the mode switching prompt message can include "It is detected that the first universal serial bus interface needs to be switched to host mode, the second universal serial bus interface needs to be switched to device mode, please confirm!", and two options of "switching" and "no switching" can be provided. If the user enters the mode switching command for the "switching" option, the electronic The device can perform mode switching, that is, switch the first universal serial bus interface to host mode, and switch the second universal serial bus interface to device mode.
再举例来说,第一通用串行总线接口自动切换工作模式,第二通用串行总线接口结合用户的手动操作来切换工作模式。电子设备检测到第一通用串行总线接口连接的外部设备是从机设备(如存储设备、定位模块、通信模块或扩展坞),第二通用串行总线接口连接的外部设备是主机设备(如PC),则可以确定第一通用串行总线接口所需的工作模式为host模式,第二通用串行总线接口所需的工作模式为device模式,则电子设备可以直接将第一通用串行总线接口切换为host模式,并通过显示界面输出如图4e所示的模式切换提示信息,模式切换提示信息的内容可以包括“检测到第一通用串行总线接口已自动切换为host模式,第二通用串行总线接口需切换为device模式,请确认!”,此时用户只需要确认是否对第二通用串行总线接口执行模式切换,并可以提供“切换”和“不切换”两个选项,如果用户针对“切换”选项输入模式切换指令,则电子设备即可针对第二通用串行总线接口执行模式切换,即将第二通用串行总线接口切换为device模式。For another example, the first universal serial bus interface automatically switches the working mode, and the second universal serial bus interface combines the user's manual operation to switch the working mode. The electronic device detects that the external device connected to the first universal serial bus interface is a slave device (such as a storage device, positioning module, communication module or docking station), and the external device connected to the second universal serial bus interface is a host device (such as PC), it can be determined that the working mode required by the first universal serial bus interface is host mode, and the working mode required by the second universal serial bus interface is device mode, then the electronic device can directly connect the first universal serial bus The interface is switched to host mode, and the mode switching prompt message shown in Figure 4e is output through the display interface. The content of the mode switching prompt message may include "detected that the first universal serial bus interface has automatically switched to host mode, and the second universal The serial bus interface needs to be switched to the device mode, please confirm!" At this time, the user only needs to confirm whether the mode switch is performed on the second universal serial bus interface, and can provide two options of "switching" and "no switching", if The user inputs a mode switching instruction for the "switch" option, and the electronic device can perform mode switching for the second universal serial bus interface, that is, switch the second universal serial bus interface to the device mode.
请参见图5,是本申请实施例的一种电子设备的结构示意图,本申请实施例的所述电子设备包括处理器501、存储器502、显示装置503、第一通用串行总线接口504、第二通用串行总线接口505以及通信接口506。所述处理器501、存储器502、显示装置503、第一通用串行总线接口504、第二通用串行总线接口505以及通信接口506之间可以交互数据。Please refer to FIG. 5, which is a schematic structural diagram of an electronic device in an embodiment of the present application. The electronic device in an embodiment of the present application includes a processor 501, a memory 502, a display device 503, a first universal serial bus interface 504, and a first universal serial bus interface 504. Two universal serial bus interface 505 and communication interface 506. Data can be exchanged among the processor 501, the memory 502, the display device 503, the first universal serial bus interface 504, the second universal serial bus interface 505, and the communication interface 506.
所述存储器502可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器502也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),固态硬盘(solid-state drive,SSD)等;所述存储器502还可以包括上述种类的存储器的组合。The memory 502 may include a volatile memory (volatile memory), such as a random-access memory (random-access memory, RAM); the memory 502 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), solid-state drive (solid-state drive, SSD), etc.; the memory 502 may also include a combination of the foregoing types of memories.
所述显示装置503可以是显示屏,例如带触摸操作功能的显示屏等。The display device 503 may be a display screen, such as a display screen with a touch operation function.
所述处理器501可以是中央处理器501(central processing unit,CPU)。在一个实施例中,所述处理器501还可以是图形处理器501(Graphics Processing Unit,GPU)。所述处理器501也可以是由CPU和GPU的组合。在一个实施例中,所述存储器502用于存储程序指令。所述处理器501可以调用所述程序指令,执行如下操作:The processor 501 may be a central processing unit (CPU) 501. In an embodiment, the processor 501 may also be a graphics processor 501 (Graphics Processing Unit, GPU). The processor 501 may also be a combination of a CPU and a GPU. In one embodiment, the memory 502 is used to store program instructions. The processor 501 can call the program instructions to perform the following operations:
获取通过所述显示装置503的显示界面输入的模式切换指令;Acquiring the mode switching instruction input through the display interface of the display device 503;
根据所述模式切换指令对所述第一通用串行总线接口504的工作模式和/或所述第二通用串行总线接口505的工作模式进行切换,所述工作模式包括主机模式和设备模式。The operating mode of the first universal serial bus interface 504 and/or the operating mode of the second universal serial bus interface 505 is switched according to the mode switching instruction, and the operating mode includes a host mode and a device mode.
可选的,所述处理器501,具体用于:Optionally, the processor 501 is specifically configured to:
根据所述模式切换指令确定所述第一通用串行总线接口504和所述第二通用串行总线接口505对应的目标工作模式组合,所述目标工作模式组合包括所述第一通用串行总线接口504对应的第一目标工作模式和所述第二通用串行总线接口505对应的第二目标工作模式;The target operating mode combination corresponding to the first universal serial bus interface 504 and the second universal serial bus interface 505 is determined according to the mode switching instruction, and the target operating mode combination includes the first universal serial bus A first target operating mode corresponding to the interface 504 and a second target operating mode corresponding to the second universal serial bus interface 505;
将所述第一通用串行总线接口504当前的工作模式切换为所述第一目标工作模式,和/或,将所述第二通用串行总线接口505当前的工作模式切换为所述第二目标工作模式。Switch the current working mode of the first universal serial bus interface 504 to the first target working mode, and/or switch the current working mode of the second universal serial bus interface 505 to the second Target working mode.
可选的,所述处理器501,还用于:Optionally, the processor 501 is further configured to:
通过所述显示装置503的显示界面显示至少一种工作模式组合;Displaying at least one combination of working modes through the display interface of the display device 503;
其中,所述处理器501,具体用于:Wherein, the processor 501 is specifically configured to:
获取针对所述至少一种工作模式组合输入的模式切换指令,所述模式切换指令用于从所述至少一种工作模式组合中选择目标工作模式组合。Acquire a mode switch instruction input for the at least one work mode combination, where the mode switch instruction is used to select a target work mode combination from the at least one work mode combination.
可选的,所述至少一种工作模式组合包括所述第一通用串行总线接口504的工作模式为主机模式和所述第二通用串行总线接口505的工作模式为设备模式、所述第一通用串行总线接口504的工作模式为主机模式和所述第二通用串行总线接口505的工作模式为主机模式、所述第一通用串行总线接口504的工作模式为设备模式和所述第二通用串行总线接口505的工作模式为主机模式、所述第一通用串行总线接口504的工作模式为设备模式和所述第二通用 串行总线接口505的工作模式为设备模式中的一种或多种。Optionally, the at least one working mode combination includes that the working mode of the first universal serial bus interface 504 is the host mode and the working mode of the second universal serial bus interface 505 is the device mode, and the working mode of the second universal serial bus interface 505 is the device mode. The working mode of a universal serial bus interface 504 is the host mode, the working mode of the second universal serial bus interface 505 is the host mode, the working mode of the first universal serial bus interface 504 is the device mode and the The working mode of the second universal serial bus interface 505 is the host mode, the working mode of the first universal serial bus interface 504 is the device mode, and the working mode of the second universal serial bus interface 505 is the device mode. One or more.
可选的,所述处理器501,还用于:Optionally, the processor 501 is further configured to:
获取连接所述第一通用串行总线接口504的外部设备的第一设备类型,或连接所述第二通用串行总线接口505的外部设备的第二设备类型;Acquiring the first device type of the external device connected to the first universal serial bus interface 504 or the second device type of the external device connected to the second universal serial bus interface 505;
根据所述第一设备类型或所述第二设备类型通过所述显示装置503的显示界面输出模式切换提示信息,所述模式切换提示信息包括所述第一通用串行总线接口504对应的第一目标工作模式或所述第二通用串行总线接口505对应的第二目标工作模式。According to the first device type or the second device type, the mode switching prompt information is output through the display interface of the display device 503, and the mode switching prompt information includes the first device corresponding to the first universal serial bus interface 504. The target operating mode or the second target operating mode corresponding to the second universal serial bus interface 505.
可选的,所述处理器501,具体用于:Optionally, the processor 501 is specifically configured to:
获取针对所述模式切换提示信息输入的模式切换指令,所述模式切换指令用于对所述模式切换提示信息包括的所述第一目标工作模式或所述第二目标工作模式进行确认。Acquire a mode switching instruction input for the mode switching prompt information, where the mode switching instruction is used to confirm the first target operating mode or the second target operating mode included in the mode switching prompt information.
可选的,所述处理器501,具体用于:Optionally, the processor 501 is specifically configured to:
根据所述第一设备类型确定所述第一通用串行总线接口504对应的第一目标工作模式,或根据所述第二设备类型确定所述第二通用串行总线接口505对应的第二目标工作模式;Determine the first target operating mode corresponding to the first universal serial bus interface 504 according to the first device type, or determine the second target corresponding to the second universal serial bus interface 505 according to the second device type Operating mode;
通过所述显示装置503的显示界面输出模式切换提示信息,所述模式切换提示信息包括所述第一目标工作模式或所述第二目标工作模式。The mode switching prompt information is output through the display interface of the display device 503, and the mode switching prompt information includes the first target working mode or the second target working mode.
可选的,所述处理器501,还用于:Optionally, the processor 501 is further configured to:
获取连接所述第一通用串行总线接口504的外部设备的第一设备类型;Acquiring the first device type of the external device connected to the first universal serial bus interface 504;
根据所述第一设备类型确定所述第一通用串行总线接口504对应的第一目标工作模式;Determine the first target operating mode corresponding to the first universal serial bus interface 504 according to the first device type;
将所述第一通用串行总线接口504当前的工作模式切换为所述第一目标工作模式;Switch the current working mode of the first universal serial bus interface 504 to the first target working mode;
其中,所述处理器501,具体用于:Wherein, the processor 501 is specifically configured to:
根据所述模式切换指令确定所述第二通用串行总线接口505对应的第二目标工作模式;Determine the second target operating mode corresponding to the second universal serial bus interface 505 according to the mode switching instruction;
将所述第二通用串行总线接口505当前的工作模式切换为所述第二目标工作模式。The current working mode of the second universal serial bus interface 505 is switched to the second target working mode.
可选的,所述处理器501,具体用于:Optionally, the processor 501 is specifically configured to:
调用接口控制器将所述第二通用串行总线接口的通信协议调整为与所述第二目标工作模式匹配的通信协议,以使得所述第二通用串行总线接口从当前的工作模式切换为所述第二目标工作模式。The calling interface controller adjusts the communication protocol of the second universal serial bus interface to a communication protocol that matches the second target working mode, so that the second universal serial bus interface is switched from the current working mode to The second target working mode.
可选的,所述外部设备包括主机设备、存储设备、定位模块、通信模块和扩展坞中的一种或多种。Optionally, the external device includes one or more of a host device, a storage device, a positioning module, a communication module, and a docking station.
可选的,所述电子设备包括可移动平台的遥控设备。Optionally, the electronic device includes a remote control device of a movable platform.
可选的,所述可移动平台包括无人机。Optionally, the movable platform includes a drone.
具体实现中,本申请实施例中所描述的处理器501、存储器502、显示装置503、第一通用串行总线接口504、第二通用串行总线接口505以及通信接口506可执行本申请实施例图1或图3提供的切换控制方法的相关实施例中所描述的实现方式,在此不再赘述。In specific implementation, the processor 501, the memory 502, the display device 503, the first universal serial bus interface 504, the second universal serial bus interface 505, and the communication interface 506 described in the embodiments of the present application can execute the embodiments of the present application. The implementation described in the relevant embodiment of the handover control method provided in FIG. 1 or FIG. 3 will not be repeated here.
本申请实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序指令,该程序指令被执行时,用于实现上述实施例中描述的相应方法。The embodiments of the present application also provide a computer storage medium, and the computer storage medium stores program instructions, and when the program instructions are executed, they are used to implement the corresponding methods described in the foregoing embodiments.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in an embodiment, reference may be made to related descriptions of other embodiments.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可能可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described sequence of actions. Because according to the present invention, some steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the involved actions and modules are not necessarily required by the present invention.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device may be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为 单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本发明各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以为个人计算机、服务器或者网络设备等,具体可以是计算机设备中的处理器)执行本发明各个实施例上述方法的全部或部分步骤。其中,而前述的存储介质可包括:U盘、移动硬盘、磁碟、光盘、只读存储器(英文:Read-Only Memory,缩写:ROM)或者随机存取存储器(英文:Random Access Memory,缩写:RAM)等各种可以存储程序代码的介质。If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium. , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc., specifically a processor in a computer device) execute all or part of the steps of the foregoing methods of the various embodiments of the present invention. Among them, the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (English: Read-Only Memory, abbreviation: ROM) or random access memory (English: Random Access Memory, abbreviation: RAM) and other media that can store program codes.
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (25)

  1. 一种切换控制方法,其特征在于,应用于电子设备,所述电子设备包括第一通用串行总线接口和第二通用串行总线接口,所述方法包括:A switching control method, characterized in that it is applied to an electronic device, the electronic device includes a first universal serial bus interface and a second universal serial bus interface, and the method includes:
    获取通过所述电子设备的显示界面输入的模式切换指令;Acquiring a mode switching instruction input through the display interface of the electronic device;
    根据所述模式切换指令对所述第一通用串行总线接口的工作模式和/或所述第二通用串行总线接口的工作模式进行切换,所述工作模式包括主机模式和设备模式。Switching the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction, and the working mode includes a host mode and a device mode.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述模式切换指令对所述第一通用串行总线接口的工作模式和/或所述第二通用串行总线接口的工作模式进行切换,包括:The method according to claim 1, wherein the operating mode of the first universal serial bus interface and/or the operating mode of the second universal serial bus interface is performed according to the mode switching instruction. Switching, including:
    根据所述模式切换指令确定所述第一通用串行总线接口和所述第二通用串行总线接口对应的目标工作模式组合,所述目标工作模式组合包括所述第一通用串行总线接口对应的第一目标工作模式和所述第二通用串行总线接口对应的第二目标工作模式;The target operating mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface is determined according to the mode switching instruction, and the target operating mode combination includes the first universal serial bus interface corresponding The first target operating mode of and the second target operating mode corresponding to the second universal serial bus interface;
    将所述第一通用串行总线接口当前的工作模式切换为所述第一目标工作模式,和/或,将所述第二通用串行总线接口当前的工作模式切换为所述第二目标工作模式。Switch the current working mode of the first universal serial bus interface to the first target working mode, and/or switch the current working mode of the second universal serial bus interface to the second target working mode mode.
  3. 根据权利要求2所述的方法,其特征在于,所述获取通过所述电子设备的显示界面输入的模式切换指令之前,所述方法还包括:The method according to claim 2, wherein before said acquiring the mode switching instruction input through the display interface of the electronic device, the method further comprises:
    通过所述电子设备的显示界面显示至少一种工作模式组合;Displaying at least one combination of working modes through the display interface of the electronic device;
    其中,所述获取通过所述电子设备的显示界面输入的模式切换指令,包括:Wherein, the obtaining the mode switching instruction input through the display interface of the electronic device includes:
    获取针对所述至少一种工作模式组合输入的模式切换指令,所述模式切换指令用于从所述至少一种工作模式组合中选择目标工作模式组合。Acquire a mode switch instruction input for the at least one work mode combination, where the mode switch instruction is used to select a target work mode combination from the at least one work mode combination.
  4. 根据权利要求3所述的方法,其特征在于,所述至少一种工作模式组合包括所述第一通用串行总线接口的工作模式为主机模式和所述第二通用串 行总线接口的工作模式为设备模式、所述第一通用串行总线接口的工作模式为主机模式和所述第二通用串行总线接口的工作模式为主机模式、所述第一通用串行总线接口的工作模式为设备模式和所述第二通用串行总线接口的工作模式为主机模式、所述第一通用串行总线接口的工作模式为设备模式和所述第二通用串行总线接口的工作模式为设备模式中的一种或多种。The method according to claim 3, wherein the at least one working mode combination comprises the working mode of the first universal serial bus interface being a host mode and the working mode of the second universal serial bus interface Is the device mode, the working mode of the first universal serial bus interface is the host mode, the working mode of the second universal serial bus interface is the host mode, and the working mode of the first universal serial bus interface is the device Mode and the working mode of the second universal serial bus interface is the host mode, the working mode of the first universal serial bus interface is the device mode, and the working mode of the second universal serial bus interface is the device mode One or more of.
  5. 根据权利要求1所述的方法,其特征在于,所述获取通过所述电子设备的显示界面输入的模式切换指令之前,所述方法还包括:The method according to claim 1, wherein before said acquiring the mode switching instruction input through the display interface of the electronic device, the method further comprises:
    获取连接所述第一通用串行总线接口的外部设备的第一设备类型,或连接所述第二通用串行总线接口的外部设备的第二设备类型;Acquiring the first device type of the external device connected to the first universal serial bus interface or the second device type of the external device connected to the second universal serial bus interface;
    根据所述第一设备类型或所述第二设备类型通过所述电子设备的显示界面输出模式切换提示信息,所述模式切换提示信息包括所述第一通用串行总线接口对应的第一目标工作模式或所述第二通用串行总线接口对应的第二目标工作模式。Output mode switching prompt information through the display interface of the electronic device according to the first device type or the second device type, the mode switching prompt information including the first target job corresponding to the first universal serial bus interface Mode or a second target operating mode corresponding to the second universal serial bus interface.
  6. 根据权利要求5所述的方法,其特征在于,所述获取通过所述电子设备的显示界面输入的模式切换指令,包括:The method according to claim 5, wherein said acquiring a mode switching instruction input through a display interface of said electronic device comprises:
    获取针对所述模式切换提示信息输入的模式切换指令,所述模式切换指令用于对所述模式切换提示信息包括的所述第一目标工作模式或所述第二目标工作模式进行确认。Acquire a mode switching instruction input for the mode switching prompt information, where the mode switching instruction is used to confirm the first target operating mode or the second target operating mode included in the mode switching prompt information.
  7. 根据权利要求5或6所述的方法,其特征在于,所述根据所述第一设备类型或所述第二设备类型通过所述电子设备的显示界面输出模式切换提示信息,包括:The method according to claim 5 or 6, wherein the outputting mode switching prompt information through the display interface of the electronic device according to the first device type or the second device type comprises:
    根据所述第一设备类型确定所述第一通用串行总线接口对应的第一目标工作模式,或根据所述第二设备类型确定所述第二通用串行总线接口对应的第二目标工作模式;Determine the first target operating mode corresponding to the first universal serial bus interface according to the first device type, or determine the second target operating mode corresponding to the second universal serial bus interface according to the second device type ;
    通过所述电子设备的显示界面输出模式切换提示信息,所述模式切换提示信息包括所述第一目标工作模式或所述第二目标工作模式。The mode switching prompt information is output through the display interface of the electronic device, and the mode switching prompt information includes the first target working mode or the second target working mode.
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    获取连接所述第一通用串行总线接口的外部设备的第一设备类型;Acquiring the first device type of the external device connected to the first universal serial bus interface;
    根据所述第一设备类型确定所述第一通用串行总线接口对应的第一目标工作模式;Determining the first target operating mode corresponding to the first universal serial bus interface according to the first device type;
    将所述第一通用串行总线接口当前的工作模式切换为所述第一目标工作模式;Switching the current working mode of the first universal serial bus interface to the first target working mode;
    其中,所述根据所述模式切换指令对所述第一通用串行总线接口的工作模式和/或所述第二通用串行总线接口的工作模式进行切换,包括:Wherein, the switching the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction includes:
    根据所述模式切换指令确定所述第二通用串行总线接口对应的第二目标工作模式;Determining a second target operating mode corresponding to the second universal serial bus interface according to the mode switching instruction;
    将所述第二通用串行总线接口当前的工作模式切换为所述第二目标工作模式。Switching the current working mode of the second universal serial bus interface to the second target working mode.
  9. 根据权利要求8所述的方法,其特征在于,所述将所述第二通用串行总线接口当前的工作模式切换为所述第二目标工作模式,包括:The method according to claim 8, wherein the switching the current working mode of the second universal serial bus interface to the second target working mode comprises:
    调用接口控制器将所述第二通用串行总线接口的通信协议调整为与所述第二目标工作模式匹配的通信协议,以使得所述第二通用串行总线接口从当前的工作模式切换为所述第二目标工作模式。The calling interface controller adjusts the communication protocol of the second universal serial bus interface to a communication protocol that matches the second target working mode, so that the second universal serial bus interface is switched from the current working mode to The second target working mode.
  10. 根据权利要求5或8所述的方法,其特征在于,所述外部设备包括主机设备、存储设备、定位模块、通信模块和扩展坞中的一种或多种。The method according to claim 5 or 8, wherein the external device includes one or more of a host device, a storage device, a positioning module, a communication module, and a docking station.
  11. 根据权利要求1所述的方法,其特征在于,所述电子设备包括可移动平台的遥控设备。The method according to claim 1, wherein the electronic device comprises a remote control device of a movable platform.
  12. 根据权利要求11所述的方法,其特征在于,所述可移动平台包括无人机。The method of claim 11, wherein the movable platform comprises an unmanned aerial vehicle.
  13. 一种电子设备,其特征在于,所述电子设备包括处理器、存储器、显示装置、第一通用串行总线接口和第二通用串行总线接口,其中:An electronic device, characterized in that the electronic device includes a processor, a memory, a display device, a first universal serial bus interface and a second universal serial bus interface, wherein:
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述处理器,用于调用所述程序代码以执行以下操作:The processor is configured to call the program code to perform the following operations:
    获取通过所述显示装置的显示界面输入的模式切换指令;Acquiring a mode switching instruction input through the display interface of the display device;
    根据所述模式切换指令对所述第一通用串行总线接口的工作模式和/或所述第二通用串行总线接口的工作模式进行切换,所述工作模式包括主机模式和设备模式。Switching the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface according to the mode switching instruction, and the working mode includes a host mode and a device mode.
  14. 根据权利要求13所述的电子设备,其特征在于,所述处理器,具体用于:The electronic device according to claim 13, wherein the processor is specifically configured to:
    根据所述模式切换指令确定所述第一通用串行总线接口和所述第二通用串行总线接口对应的目标工作模式组合,所述目标工作模式组合包括所述第一通用串行总线接口对应的第一目标工作模式和所述第二通用串行总线接口对应的第二目标工作模式;The target operating mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface is determined according to the mode switching instruction, and the target operating mode combination includes the first universal serial bus interface corresponding The first target operating mode of and the second target operating mode corresponding to the second universal serial bus interface;
    将所述第一通用串行总线接口当前的工作模式切换为所述第一目标工作模式,和/或,将所述第二通用串行总线接口当前的工作模式切换为所述第二目标工作模式。Switch the current working mode of the first universal serial bus interface to the first target working mode, and/or switch the current working mode of the second universal serial bus interface to the second target working mode mode.
  15. 根据权利要求14所述的电子设备,其特征在于,所述处理器,还用于:The electronic device according to claim 14, wherein the processor is further configured to:
    通过所述显示装置的显示界面显示至少一种工作模式组合;Displaying at least one combination of working modes through the display interface of the display device;
    其中,所述处理器,具体用于:Wherein, the processor is specifically used for:
    获取针对所述至少一种工作模式组合输入的模式切换指令,所述模式切换指令用于从所述至少一种工作模式组合中选择目标工作模式组合。Acquire a mode switch instruction input for the at least one work mode combination, where the mode switch instruction is used to select a target work mode combination from the at least one work mode combination.
  16. 根据权利要求15所述的电子设备,其特征在于,所述至少一种工作模式组合包括所述第一通用串行总线接口的工作模式为主机模式和所述第二通用串行总线接口的工作模式为设备模式、所述第一通用串行总线接口的工作 模式为主机模式和所述第二通用串行总线接口的工作模式为主机模式、所述第一通用串行总线接口的工作模式为设备模式和所述第二通用串行总线接口的工作模式为主机模式、所述第一通用串行总线接口的工作模式为设备模式和所述第二通用串行总线接口的工作模式为设备模式中的一种或多种。The electronic device according to claim 15, wherein the at least one working mode combination comprises the working mode of the first universal serial bus interface being the host mode and the working mode of the second universal serial bus interface The mode is a device mode, the working mode of the first universal serial bus interface is a host mode, the working mode of the second universal serial bus interface is a host mode, and the working mode of the first universal serial bus interface is The device mode and the working mode of the second universal serial bus interface are the host mode, the working mode of the first universal serial bus interface is the device mode, and the working mode of the second universal serial bus interface is the device mode One or more of.
  17. 根据权利要求13所述的电子设备,其特征在于,所述处理器,还用于:The electronic device according to claim 13, wherein the processor is further configured to:
    获取连接所述第一通用串行总线接口的外部设备的第一设备类型,或连接所述第二通用串行总线接口的外部设备的第二设备类型;Acquiring the first device type of the external device connected to the first universal serial bus interface or the second device type of the external device connected to the second universal serial bus interface;
    根据所述第一设备类型或所述第二设备类型通过所述显示装置的显示界面输出模式切换提示信息,所述模式切换提示信息包括所述第一通用串行总线接口对应的第一目标工作模式或所述第二通用串行总线接口对应的第二目标工作模式。Output mode switching prompt information through the display interface of the display device according to the first device type or the second device type, the mode switching prompt information including the first target job corresponding to the first universal serial bus interface Mode or a second target operating mode corresponding to the second universal serial bus interface.
  18. 根据权利要求17所述的电子设备,其特征在于,所述处理器,具体用于:The electronic device according to claim 17, wherein the processor is specifically configured to:
    获取针对所述模式切换提示信息输入的模式切换指令,所述模式切换指令用于对所述模式切换提示信息包括的所述第一目标工作模式或所述第二目标工作模式进行确认。Acquire a mode switching instruction input for the mode switching prompt information, where the mode switching instruction is used to confirm the first target operating mode or the second target operating mode included in the mode switching prompt information.
  19. 根据权利要求17或18所述的电子设备,其特征在于,所述处理器,具体用于:The electronic device according to claim 17 or 18, wherein the processor is specifically configured to:
    根据所述第一设备类型确定所述第一通用串行总线接口对应的第一目标工作模式,或根据所述第二设备类型确定所述第二通用串行总线接口对应的第二目标工作模式;Determine the first target operating mode corresponding to the first universal serial bus interface according to the first device type, or determine the second target operating mode corresponding to the second universal serial bus interface according to the second device type ;
    通过所述显示装置的显示界面输出模式切换提示信息,所述模式切换提示信息包括所述第一目标工作模式或所述第二目标工作模式。The mode switching prompt information is output through the display interface of the display device, and the mode switching prompt information includes the first target working mode or the second target working mode.
  20. 根据权利要求13所述的电子设备,其特征在于,所述处理器,还用 于:The electronic device according to claim 13, wherein the processor is further used for:
    获取连接所述第一通用串行总线接口的外部设备的第一设备类型;Acquiring the first device type of the external device connected to the first universal serial bus interface;
    根据所述第一设备类型确定所述第一通用串行总线接口对应的第一目标工作模式;Determining the first target operating mode corresponding to the first universal serial bus interface according to the first device type;
    将所述第一通用串行总线接口当前的工作模式切换为所述第一目标工作模式;Switching the current working mode of the first universal serial bus interface to the first target working mode;
    其中,所述处理器,具体用于:Wherein, the processor is specifically used for:
    根据所述模式切换指令确定所述第二通用串行总线接口对应的第二目标工作模式;Determining a second target operating mode corresponding to the second universal serial bus interface according to the mode switching instruction;
    将所述第二通用串行总线接口当前的工作模式切换为所述第二目标工作模式。Switching the current working mode of the second universal serial bus interface to the second target working mode.
  21. 根据权利要求20所述的电子设备,其特征在于,所述处理器,具体用于:The electronic device according to claim 20, wherein the processor is specifically configured to:
    调用接口控制器将所述第二通用串行总线接口的通信协议调整为与所述第二目标工作模式匹配的通信协议,以使得所述第二通用串行总线接口从当前的工作模式切换为所述第二目标工作模式。The calling interface controller adjusts the communication protocol of the second universal serial bus interface to a communication protocol that matches the second target working mode, so that the second universal serial bus interface is switched from the current working mode to The second target working mode.
  22. 根据权利要求17或20所述的电子设备,其特征在于,所述外部设备包括主机设备、存储设备、定位模块、通信模块和扩展坞中的一种或多种。The electronic device according to claim 17 or 20, wherein the external device comprises one or more of a host device, a storage device, a positioning module, a communication module, and a docking station.
  23. 根据权利要求13所述的电子设备,其特征在于,所述电子设备包括可移动平台的遥控设备。The electronic device according to claim 13, wherein the electronic device comprises a remote control device of a movable platform.
  24. 根据权利要求23所述的电子设备,其特征在于,所述可移动平台包括无人机。The electronic device according to claim 23, wherein the movable platform comprises an unmanned aerial vehicle.
  25. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执 行时使所述处理器执行如权利要求1-12中任一项所述的切换控制方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program includes program instructions that, when executed by a processor, cause the processor to execute The switching control method described in any one of 1-12 is required.
PCT/CN2019/115738 2019-11-05 2019-11-05 Switching control method, electronic device and computer readable storage medium WO2021087749A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/115738 WO2021087749A1 (en) 2019-11-05 2019-11-05 Switching control method, electronic device and computer readable storage medium
CN201980038392.1A CN112292672A (en) 2019-11-05 2019-11-05 Switching control method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/115738 WO2021087749A1 (en) 2019-11-05 2019-11-05 Switching control method, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2021087749A1 true WO2021087749A1 (en) 2021-05-14

Family

ID=74419421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/115738 WO2021087749A1 (en) 2019-11-05 2019-11-05 Switching control method, electronic device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN112292672A (en)
WO (1) WO2021087749A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328329A (en) * 2021-11-09 2022-04-12 深圳市广和通无线股份有限公司 Communication module design method and device compatible with master and slave devices

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226516A (en) * 2007-01-15 2008-07-23 奇岩电子股份有限公司 Device and method capable of automatically switching into USB host or peripherals
CN104932999A (en) * 2014-03-17 2015-09-23 联想(北京)有限公司 USB (universal serial bus) interface mode switching device and intelligent terminal
CN105938463A (en) * 2015-09-18 2016-09-14 重庆邮电大学 Method for communication between terminal and computer
CN106852188A (en) * 2016-10-31 2017-06-13 深圳市大疆创新科技有限公司 Data interactive method and universal serial bus device based on USB
WO2018058946A1 (en) * 2016-09-30 2018-04-05 中兴通讯股份有限公司 Method and device for signal switching, and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10582636B2 (en) * 2017-08-07 2020-03-03 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Server having a dual-mode serial bus port enabling selective access to a baseboard management controller

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226516A (en) * 2007-01-15 2008-07-23 奇岩电子股份有限公司 Device and method capable of automatically switching into USB host or peripherals
CN104932999A (en) * 2014-03-17 2015-09-23 联想(北京)有限公司 USB (universal serial bus) interface mode switching device and intelligent terminal
CN105938463A (en) * 2015-09-18 2016-09-14 重庆邮电大学 Method for communication between terminal and computer
WO2018058946A1 (en) * 2016-09-30 2018-04-05 中兴通讯股份有限公司 Method and device for signal switching, and computer storage medium
CN106852188A (en) * 2016-10-31 2017-06-13 深圳市大疆创新科技有限公司 Data interactive method and universal serial bus device based on USB

Also Published As

Publication number Publication date
CN112292672A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
US20130179825A1 (en) System and method of managing states of computer screen and controlling mobile communication terminal
CN105389074A (en) Control method for smart watch and smart watch
US20120225621A1 (en) Electronic device with the function of supporting multiple cards
KR20170125652A (en) Electronic device and controlling method thereof
US20130145071A1 (en) Electronic device and method for switching modes of thunderbolt connector thereof
CN110875871A (en) Management method of instant messaging application and electronic equipment
JP6405384B2 (en) Method, apparatus and recording medium for interworking with external terminal
US20140059257A1 (en) Keyboard-video-mouse system and method of providing and using the same
WO2015172562A1 (en) Shortcut operation method and apparatus for touch-screen digital terminal
JP2016524771A (en) Method and device for updating program data
WO2021087749A1 (en) Switching control method, electronic device and computer readable storage medium
US20160210257A1 (en) Communication controller for electronic devices
CN114967952A (en) Cursor control method and device, storage medium and video processing equipment
US20150143261A1 (en) Information processing terminal, information processing method, and information processing system
US20210048813A1 (en) Load control methods, mobile platforms, and computer-readable storage media
CN215646815U (en) WiFi Wireless network adapter
CN112578774A (en) Operation mode switching method and device, electronic equipment, system and storage medium
TWI545438B (en) Computer management system and method thereof
WO2020087967A1 (en) Electronic building block and control method therefor, control device and storage medium
WO2020113421A1 (en) Method for mounting file system, terminal device, and storage medium
CN105391810B (en) Terminal equipment interface device
US20130103886A1 (en) Dual-firmware for next generation emulation
US20160277454A1 (en) Image sharing apparatus, image sharing system, and graphical user interface
CN113220613A (en) WiFi wireless network adapter and control method thereof
CN110908934A (en) Physical network platform module, physical network platform equipment and control instruction processing system

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: 19951536

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: 19951536

Country of ref document: EP

Kind code of ref document: A1