CN112292672A - Switching control method, electronic equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN112292672A
CN112292672A CN201980038392.1A CN201980038392A CN112292672A CN 112292672 A CN112292672 A CN 112292672A CN 201980038392 A CN201980038392 A CN 201980038392A CN 112292672 A CN112292672 A CN 112292672A
Authority
CN
China
Prior art keywords
mode
serial bus
universal serial
working mode
bus interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201980038392.1A
Other languages
Chinese (zh)
Inventor
徐立灿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SZ DJI Technology Co Ltd
SZ DJI Innovations Technology Co Ltd
Original Assignee
SZ DJI Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Publication of CN112292672A publication Critical patent/CN112292672A/en
Pending legal-status Critical Current

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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Systems (AREA)

Abstract

A switching control method, an electronic device and a computer readable storage medium are provided, wherein the switching control method is applicable to the electronic device, the electronic device comprises a first universal serial bus interface and a second universal serial bus interface, a mode switching instruction (101) input through a display interface of the electronic device can be obtained, a working mode of the first universal serial bus interface and/or a working mode of the second universal serial bus interface are switched according to the mode switching instruction, the working mode comprises a host mode and a device mode (102), and therefore flexible switching of the working mode of the universal serial bus interface of the electronic device can be achieved, the electronic device has rich extended functions, and diversified use scenes can be met.

Description

Switching control method, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a handover control method, an electronic device, and a computer-readable storage medium.
Background
At present, electronic equipment such as an intelligent remote controller with a screen is an important control terminal and an interactive window of an unmanned aerial vehicle, and along with the continuous expansion of an application scene and a use range of the unmanned aerial vehicle, the service of the unmanned aerial vehicle is increasingly complicated. The intelligent remote controller is used as a calculation center of the unmanned aerial vehicle on the ground, and bears more services, so that the expansibility of the intelligent remote controller is particularly important.
The expansibility of electronic devices such as a common intelligent remote controller mainly comprises the following schemes: one is that the Universal Serial Bus (USB) interface of the intelligent remote controller works in host mode, i.e. the intelligent remote controller is used as host side, and is externally connected with communication module (e.g. 4G dongle), storage device (e.g. USB disk), etc., at this time, only peripheral mounting can be achieved; the other is that the USB interface of the intelligent remote controller works in a device mode, that is, the intelligent remote controller is used as a device end, connected to a host device (such as a PC ground station), and communicates with and interacts with the PC, and at this time, the USB interface is only suitable for connecting the PC. It can be seen that the extension scheme based on the USB host or the extension scheme based on the USB device have the disadvantages of single extension function, lack of flexibility, and limited use scenario.
Disclosure of Invention
The embodiment of the application discloses a switching control method, electronic equipment and a computer readable storage medium, which can realize flexible switching of working modes of a universal serial bus interface of the electronic equipment, so that the electronic equipment has rich extended functions and can meet diversified use scenes.
In a first aspect, an embodiment of the present application provides a switching control method, which is applied to an electronic device, where 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 a display interface of the electronic equipment;
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, wherein the working modes comprise a host mode and a device mode.
In a second aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, a display device, a first universal serial bus interface, and a second universal serial bus interface, where:
the memory for storing program code;
the processor is configured to call the program code to perform the following operations:
acquiring a mode switching instruction input through a display interface of the display device;
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, wherein the working modes comprise a host mode and a device mode.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where program instructions are stored in the computer-readable storage medium, and when the program instructions are executed, the computer-readable storage medium is configured to implement the handover control method according to the first aspect.
The embodiment of the application can acquire the mode switching instruction input through the display interface of the electronic equipment, and the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface of the electronic equipment are/is switched according to the mode switching instruction, wherein the working modes comprise the host mode and the equipment mode, so that the flexible switching of the working modes of the universal serial bus interface of the electronic equipment can be realized, the electronic equipment has rich extended functions, and diversified use scenes can be met.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
Fig. 1 is a schematic flowchart of a handover control method according to an embodiment of the present application;
fig. 2a is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2b is a schematic diagram of a display interface for mode switching according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another handover control method according to an embodiment of the present application;
fig. 4a is a schematic view of an application scenario of an electronic device according to an embodiment of the present application;
FIG. 4b is a schematic diagram of a display interface for switching between modes according to an embodiment of the present disclosure;
FIG. 4c is a schematic diagram of a display interface for switching between modes according to an embodiment of the present application;
fig. 4d is a schematic diagram of a mode switching prompt message provided in the embodiment of the present application;
fig. 4e is a schematic diagram of another mode switching prompt message provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
In the unmanned aerial vehicle system of present middle and high-end consumption unmanned aerial vehicle product or industry usage, for example scene such as agricultural unmanned aerial vehicle, survey and drawing, the electronic equipment such as intelligent remote controller or ground station equipment of taking the display screen of configuration integration can provide better flight experience and more professional operation platform for the user, and these electronic equipment all have very strong external various equipment, carry out the data interaction's demand. Taking an intelligent remote controller as an example, in order to meet various use scenarios and increasingly complex function expansion requirements at present, and to exert the computing capability and Artificial Intelligence (AI) capability of the intelligent remote controller, the prior art has a method that only one USB interface (host interface or device interface) is usually configured for the intelligent remote controller, for example, only one device interface is configured for the intelligent remote controller, and the intelligent remote controller can only connect a host device (such as a PC) in a device mode (i.e., as a slave), communicate with the PC, perform data interaction, and the like, and cannot perform the data reading if the intelligent remote controller needs to be connected with a storage device (such as a USB disk) as a host to read data; for example, the intelligent remote controller is configured with only one host interface, and the intelligent remote controller can only connect the storage device (e.g., a usb disk) in a host mode (i.e., as a host) to read data, and cannot also connect the host device (e.g., a PC) in an equipment mode (i.e., as a slave) to communicate with the PC and perform data interaction. Therefore, the number of host interfaces/device interfaces configured on the existing intelligent remote controller is not enough, the requirement of a complex application scene cannot be met, and on the other hand, the functions of the interfaces are fixed, cannot be expanded, lack flexibility and are limited in use scene.
Aiming at the defects that the universal serial bus interfaces of electronic equipment such as an intelligent remote controller are single in expansion function, lack of flexibility, limited in use scene and the like generally existing at present, the embodiment of the application provides a switching control method, the electronic equipment and a computer readable storage medium, which can realize flexible switching of working modes of the universal serial bus interfaces of the electronic equipment, enable the electronic equipment to have rich expansion functions and meet diversified use scenes.
The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application.
Fig. 1 is a schematic flow chart of a handover control method according to an embodiment of the present application. The switching control method of the embodiment of the application is applied to electronic equipment, the electronic equipment comprises a first universal serial bus interface and a second universal serial bus interface, and the method comprises the following steps:
101. and acquiring a mode switching instruction input through a display interface of the electronic equipment.
The electronic device may specifically be a remote control device of a movable platform, for example, an intelligent remote controller, the movable platform may specifically be an unmanned aerial vehicle, and the intelligent remote controller includes a display device and two universal serial bus interfaces (denoted as a first universal serial bus interface and a second universal serial bus interface). The electronic equipment can display the working state data of the unmanned aerial vehicle, the acquired image data and the like through the display device, and can also receive various instructions input by a user, such as an operation instruction of the unmanned aerial vehicle, a mode switching instruction of a universal serial bus interface and the like.
Specifically, the first usb interface and the second usb interface of the electronic device may each include two operating modes, which include a host mode (host) and a device mode (device), and allow switching between the operating modes of the first usb interface and/or the second usb interface. 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 requirement of an actual use scene, specifically, a mode switching instruction can be input through a display interface of a display device of the electronic equipment, and then the electronic equipment obtains the mode switching instruction input through the display interface of the display device by the user.
102. 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, wherein the working modes comprise a host mode and a device mode.
Specifically, the electronic device may determine, according to the mode switching instruction, a target working mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface, where the target working mode combination includes a first target working mode corresponding to the first universal serial bus interface and a second target working mode corresponding to the second universal serial bus interface, and may further switch a current working mode of the first universal serial bus interface to the first target working mode, and/or switch a current working mode of the second universal serial bus interface to the second target working mode. For example, if the target operation mode combination includes that the first target operation mode corresponding to the first usb interface is a host mode, and the second target operation mode corresponding to the second usb interface is a device mode, the electronic device may switch the current operation mode of the first usb interface to the host mode, and/or switch the current operation mode of the second usb interface to the device mode.
In the embodiment of the application, the electronic device can acquire the mode switching instruction input through the display interface of the display device, and can switch the working mode of the first universal serial bus interface and/or the working mode of the second universal serial bus interface of the electronic device according to the mode switching instruction, wherein the working modes comprise the host mode and the device mode, so that the flexible switching of the working modes of the universal serial bus interface of the electronic device can be realized, the electronic device has rich extended functions, and diversified use scenes can be met.
In some possible embodiments, the electronic device may provide at least one operation mode combination for the operation mode of the first usb interface and the operation mode of the second usb interface, and a user may directly select a desired operation mode combination from the at least one operation mode combination to switch the operation mode of the first usb interface and/or the operation mode of the second usb interface. Specifically, the electronic device may display at least one working mode combination through a display interface of the display device, a user may select a required working mode combination (denoted as a target working mode combination) from the at least one working mode combination by inputting a mode switching instruction, the electronic device obtains the mode switching instruction input by the user for the at least one working mode combination, and the target working mode combination corresponding to the first usb interface and the second usb interface may be determined based on the mode switching instruction, so that the working modes of the usb interface of the electronic device may be flexibly switched conveniently, and the electronic device may have rich expansion functions.
In some possible embodiments, at most four operation mode combinations may be provided for user selection, where the at least one operation mode combination includes one or more of the first usb interface having an operation mode of a host mode and the second usb interface having an operation mode of a device mode, the first usb interface having an operation mode of a host mode and the second usb interface having an operation mode of a host mode, the first usb interface having an operation mode of a device mode and the second usb interface having an operation mode of a device mode.
For example, as shown in fig. 2a, the electronic device includes a first USB interface that is USB1, and a second USB interface that is USB 0. Assuming that four operation mode combinations are provided for the user to select, as shown in fig. 2b, for USB0 and USB1, the electronic device displays the four operation mode combinations for the user to select through the display interface of the display device, that is, the operation mode combination 1: USB0 host (host), USB1 device (i.e., device), combination of operating modes 2: USB0 host, USB1 host, mode combination 3: USB0 device, USB1 host, working mode combination 4: USB0 equipment and USB1 equipment, a user can directly click a corresponding working mode combination input mode switching instruction in a display interface, a user selects a working mode combination 3 as a target working mode combination in figure 2b, the electronic equipment determines that the target working mode combination is the working mode of the USB0 as device and the working mode of the USB1 as host according to the mode switching instruction, further switches the working mode of the USB0 to device and the working mode of the USB1 to host, after the mode switching, the electronic equipment can be connected with external host equipment (such as PC) as slave through the USB0, can be connected with external storage equipment (such as U disk) as host through the USB1, communication module (such as 4G dongle), positioning module (RTK dongle), docking station and the like as host, thereby being capable of conveniently and flexibly switching the working mode of the universal serial bus interface of the electronic equipment according to the actual requirements of a use scene, the electronic equipment has abundant extended functions.
Please refer to fig. 3, which is a flowchart illustrating another handover control method according to an embodiment of the present application. The switching control method of the embodiment of the application is applied to electronic equipment, the electronic equipment comprises a first universal serial bus interface and a second universal serial bus interface, and the method comprises the following steps:
301. and acquiring a first device type of the external device connected with the first universal serial bus interface.
The external device may specifically include one or more of a host device (e.g., a PC), a storage device (e.g., a usb disk), a positioning module (e.g., an RTK dongle), a communication module (e.g., a 4G dongle), and a docking station. In The embodiment, The first Universal Serial Bus interface is assumed to be a USB OTG interface, The second Universal Serial Bus interface is assumed to be a conventional USB interface, and accordingly, The first Universal Serial Bus interface automatically switches The working mode, and The second Universal Serial Bus interface switches The working mode in combination with manual operation of a user.
Specifically, since the first USB interface is an USB OTG interface, after the external device is connected to the first USB interface, the electronic device may automatically recognize the device type of the external device (denoted as a first device type) through the first USB interface, where 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. And determining a first target working mode corresponding to the first universal serial bus interface according to the first equipment type.
Specifically, the electronic device may determine, according to a first device type of the external device, a working mode (denoted as a first target working mode) required by the first usb interface, where if the device type of the external device is the host device, the first target working mode is a device mode; if the device type of the external device is the slave device, the first target operation mode should be the host mode.
303. And switching the current working mode of the first universal serial bus interface into the first target working mode.
Specifically, after the electronic device determines a first target working mode corresponding to the first universal serial bus interface, the current working mode of the first universal serial bus interface can be directly switched to the first target working mode.
304. And acquiring a mode switching instruction input through a display interface of the electronic equipment.
Specifically, the user may manually switch the working mode of the second universal serial bus interface according to the requirement of the actual usage scenario, and specifically, a mode switching instruction may be input through a display interface of a display device of the electronic device, and then the electronic device obtains the mode switching instruction input through the display interface of the display device by the user.
305. And determining a second target working mode corresponding to the second universal serial bus interface according to the mode switching instruction.
306. And switching the current working mode of the second universal serial bus interface into the second target working mode.
Specifically, the electronic device may determine a second target operating mode corresponding to the second universal serial bus interface according to the mode switching instruction, and may further invoke the interface controller to adjust the communication protocol of the second universal serial bus interface to a communication protocol matched with the second target operating mode, so that the second universal serial bus interface is switched from the current operating mode to the second target operating mode. For example, if the second target operating mode is the device mode, the electronic device may call the interface controller to adjust the communication protocol of the second universal serial bus interface, and may specifically adjust the communication protocol to a communication protocol matched with the device mode, so as to switch the current operating mode of the second universal serial bus interface to the device mode.
For example, taking the electronic device as an intelligent remote controller as an example, as shown in fig. 4a, the USB1 is used as a first USB interface, and the USB1 is a USB OTG interface, which can automatically switch the working mode; the USB0 is used as a second universal serial bus interface, and the USB0 is a conventional USB interface, and needs to be manually operated by a user to switch the operating mode. The external device connected with the USB1 is a 4G module (namely 4G dongle) or a docking station, the device type of the external device is slave device, the working mode required by the USB1 is host mode, and the intelligent remote controller can automatically switch the working mode of the USB1 into the host mode; the external device connected to the USB0 is an RTK module (i.e. an RTK dongle) or a PC, and as for the working mode of the USB0, as shown in fig. 4b, a switch button "switch working mode" may be provided at a designated position (e.g. lower left corner) of the display interface, and the user may switch the working mode of the USB0 between the host mode and the device mode by clicking the "switch working mode", and if the current working mode of the USB0 is the host mode, the user may switch the working mode of the USB0 from the host mode to the device mode by clicking the "switch working mode", and may display a prompt message "switch success | may be displayed! host mode- > device mode ", after the user clicks" switch work mode "again, as shown in fig. 4c, the work mode of USB0 is switched from device mode to host mode, and the prompt message" switch success | can be displayed! device mode- > host mode ". Therefore, for a use scene that the external device connected with the USB0 is the RTK dongle, because the device type of the RTK dongle is the slave device, the user can switch the working mode of the USB0 to the host mode by clicking the 'switching working mode'; for the use scenario that the external device connected with the USB0 is a PC, since the device type of the PC is a host device, the user can switch the working mode of the USB0 to the device mode by clicking "switch working mode".
In the embodiment of the application, the electronic device may obtain a first device type of an external device connected to a first usb interface, determine a first target operating mode corresponding to the first usb interface according to the first device type, switch a current operating mode of the first usb interface to the first target operating mode, obtain a mode switching instruction input through a display interface of a display device for a second usb interface, determine a second target operating mode corresponding to the second usb interface according to the mode switching instruction, switch the current operating mode of the second usb interface to the second target operating mode, and implement automatic switching of the operating mode of the usb interface and switching of the operating mode of the other usb interface in combination with manual operation of a user, therefore, the flexible switching of the working modes of the universal serial bus interface of the electronic equipment can be realized, the electronic equipment has rich extended functions, diversified use scenes can be met, and the practicability of the electronic equipment is greatly improved.
In some possible embodiments, the electronic device may determine, according to a device type of an external device connected to the usb interface, a required operating mode of one or both of the two usb interfaces, and output a prompt message to confirm by a user, where the user may switch one or both of the usb interfaces to the required operating mode correspondingly after confirming. The method specifically comprises the following steps: the electronic equipment acquires a first equipment type of external equipment connected with a first universal serial bus interface or a second equipment type of external equipment connected with a second universal serial bus interface, and outputs mode switching prompt information through a display interface of the electronic equipment according to the first equipment type or the second equipment type, wherein the mode switching prompt information comprises a first target working mode corresponding to the first universal serial bus interface or a second target working mode corresponding to the second universal serial bus interface, so that the required working mode of each universal serial bus interface in a specific use scene can be automatically identified, a user is prompted to execute mode switching, the flexible switching of the working modes of the universal serial bus interfaces is realized, and the electronic equipment has rich expansion functions.
Further, if the user confirms the first target operating mode or the second target operating mode included in the mode switching prompt message, the mode switching instruction may be input through a display interface of the electronic device, and at this time, the electronic device obtains the mode switching instruction input through the display interface of the electronic device, which may specifically include: the electronic equipment acquires a mode switching instruction input aiming at the mode switching prompt message, and the mode switching instruction is used for confirming a first target working mode or a second target working mode included in the mode switching prompt message.
In some feasible embodiments, the outputting, by the electronic device, the mode switching prompt message through the display interface of the electronic device based on the first device type or the second device type may specifically include: the electronic equipment determines a first target working mode corresponding to the first universal serial bus interface according to the first equipment type or determines a second target working mode corresponding to the second universal serial bus interface according to the second equipment type, and prompts the first target working mode or the second target working mode to a user by outputting mode switching prompt information, namely the mode switching prompt information comprises the first target working mode or the second target working mode.
For example, if the electronic device detects that the external device connected to the first usb interface is a slave device (e.g., a storage device, a positioning module, a communication module, or a docking station), and the external device connected to the second usb interface is a host device (e.g., a PC), it may be determined that the operating mode required by the first usb interface (i.e., the first target operating mode) is a host mode, and the operating mode required by the second usb interface (i.e., the second target operating mode) is a device mode, and the electronic device may output a mode switching indication message as shown in fig. 4d through the display interface, where the content of the mode switching indication message may include "detecting that the first usb interface needs to be switched to the host mode, and the second usb interface needs to be switched to the device mode, please confirm | if the external device connected to the first usb interface needs to be switched to the device mode! And two options of "switch" and "do not switch" can be provided, if a user inputs a mode switching instruction for the "switch" option, the electronic device can execute mode switching, that is, the first universal serial bus interface is switched to the host mode, and the second universal serial bus interface is switched to the device mode.
For another example, the first usb interface automatically switches the operating mode, and the second usb interface combines with a manual operation of a user to switch the operating mode. When the electronic device detects that the external device connected to the first usb interface is a slave device (e.g., a storage device, a positioning module, a communication module, or a docking station), and the external device connected to the second usb interface is a host device (e.g., a PC), it may be determined that the working mode required by the first usb interface is a host mode, and the working mode required by the second usb interface is a device mode, and then the electronic device may directly switch the first usb interface to the host mode and output a mode switching prompt message as shown in fig. 4e through the display interface, where the content of the mode switching prompt message may include "detecting that the first usb interface has been automatically switched to the host mode, and the second usb interface needs to be switched to the device mode, and determining that |! And at this time, the user only needs to confirm whether to execute mode switching on the second universal serial bus interface, and can provide two options of switching and not switching, and if the user inputs a mode switching instruction for the option of switching, the electronic device can execute mode switching on the second universal serial bus interface, that is, the second universal serial bus interface is switched to the device mode.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device includes a processor 501, a memory 502, a display device 503, a first usb interface 504, a second usb interface 505, and a communication interface 506. 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 can exchange data with each other.
The memory 502 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory 502 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), etc.; the memory 502 may also comprise a combination of memories of the kind described above.
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 one embodiment, the processor 501 may also be a Graphics Processing Unit (GPU) 501. 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 may call the program instructions to perform the following operations:
acquiring a mode switching instruction input through a display interface of the display device 503;
and switching the working mode of the first universal serial bus interface 504 and/or the working mode of the second universal serial bus interface 505 according to the mode switching instruction, wherein the working modes comprise a host mode and a device mode.
Optionally, the processor 501 is specifically configured to:
determining a target working mode combination corresponding to the first universal serial bus interface 504 and the second universal serial bus interface 505 according to the mode switching instruction, wherein the target working mode combination comprises a first target working mode corresponding to the first universal serial bus interface 504 and a second target working mode corresponding to the second universal serial bus interface 505;
the current operating mode of the first usb interface 504 is switched to the first target operating mode, and/or the current operating mode of the second usb interface 505 is switched to the second target operating mode.
Optionally, the processor 501 is further configured to:
displaying at least one working mode combination through a display interface of the display device 503;
the processor 501 is specifically configured to:
and acquiring a mode switching instruction input aiming at the at least one working mode combination, wherein the mode switching instruction is used for selecting a target working mode combination from the at least one working mode combination.
Optionally, the at least one operation mode combination includes one or more of an operation mode of the first usb interface 504 being a host mode and an operation mode of the second usb interface 505 being a device mode, an operation mode of the first usb interface 504 being a host mode and an operation mode of the second usb interface 505 being a host mode, an operation mode of the first usb interface 504 being a device mode and an operation mode of the second usb interface 505 being a device mode.
Optionally, the processor 501 is further configured to:
acquiring a first device type of an external device connected with the first universal serial bus interface 504 or a second device type of an external device connected with the second universal serial bus interface 505;
and outputting a mode switching prompt message through a display interface of the display device 503 according to the first device type or the second device type, where the mode switching prompt message includes a first target operating mode corresponding to the first usb interface 504 or a second target operating mode corresponding to the second usb interface 505.
Optionally, the processor 501 is specifically configured to:
and acquiring a mode switching instruction input aiming at the mode switching prompt message, wherein the mode switching instruction is used for confirming the first target working mode or the second target working mode included in the mode switching prompt message.
Optionally, the processor 501 is specifically configured to:
determining a first target working mode corresponding to the first universal serial bus interface 504 according to the first device type, or determining a second target working mode corresponding to the second universal serial bus interface 505 according to the second device type;
and outputting a mode switching prompt message through a display interface of the display device 503, where the mode switching prompt message includes the first target operating mode or the second target operating mode.
Optionally, the processor 501 is further configured to:
acquiring a first device type of an external device connected to the first usb interface 504;
determining a first target working mode corresponding to the first universal serial bus interface 504 according to the first device type;
switching the current operating mode of the first usb interface 504 to the first target operating mode;
the processor 501 is specifically configured to:
determining a second target working mode corresponding to the second universal serial bus interface 505 according to the mode switching instruction;
and switching the current working mode of the second universal serial bus interface 505 to the second target working mode.
Optionally, the processor 501 is specifically configured to:
and calling an interface controller to adjust the communication protocol of the second universal serial bus interface to a communication protocol matched with 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 comprises one or more of a host device, a storage device, a positioning module, a communication module, and a docking station.
Optionally, the electronic device comprises a remote control device of the movable platform.
Optionally, the movable platform comprises a drone.
In a 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 this embodiment of the present application may perform the implementation manner described in the related embodiment of the switching control method provided in fig. 1 or fig. 3 in this embodiment of the present application, and are not described herein again.
The embodiment of the present application further provides a computer storage medium, in which program instructions are stored, and when the program instructions are executed, the computer storage medium is used for implementing the corresponding method described in the above embodiment.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, 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 are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute all or part of the steps of the above-described method according to the embodiments of the present invention. The storage medium may include: a U-disk, a removable hard disk, a magnetic disk, an optical disk, a Read-Only Memory (ROM) or a Random Access Memory (RAM), and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (25)

1. A switching control method is applied to an electronic device, the electronic device comprises a first universal serial bus interface and a second universal serial bus interface, and the method comprises the following steps:
acquiring a mode switching instruction input through a display interface of the electronic equipment;
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, wherein the working modes comprise a host mode and a device mode.
2. The method according to claim 1, wherein the switching the operating mode of the first usb interface and/or the operating mode of the second usb interface according to the mode switching instruction comprises:
determining a target working mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface according to the mode switching instruction, wherein the target working mode combination comprises a first target working mode corresponding to the first universal serial bus interface and a second target working mode corresponding to the second universal serial bus interface;
and switching the current working mode of the first universal serial bus interface to the first target working mode, and/or switching the current working mode of the second universal serial bus interface to the second target working mode.
3. The method of claim 2, wherein prior to obtaining the mode switching instruction input via the display interface of the electronic device, the method further comprises:
displaying at least one working mode combination through a display interface of the electronic equipment;
the acquiring of the mode switching instruction input through the display interface of the electronic device includes:
and acquiring a mode switching instruction input aiming at the at least one working mode combination, wherein the mode switching instruction is used for selecting a target working mode combination from the at least one working mode combination.
4. The method of claim 3, wherein the at least one combination of operating modes includes one or more of a host mode for the first USB interface and a device mode for the second USB interface, a host mode for the first USB interface and a host mode for the second USB interface, a device mode for the first USB interface and a device mode for the second USB interface, and a device mode for the first USB interface and a device mode for the second USB interface.
5. The method of claim 1, wherein prior to obtaining the mode switching instruction input via the display interface of the electronic device, the method further comprises:
acquiring a first device type of an external device connected with the first universal serial bus interface or a second device type of an external device connected with the second universal serial bus interface;
and outputting mode switching prompt information through a display interface of the electronic equipment according to the first equipment type or the second equipment type, wherein the mode switching prompt information comprises a first target working mode corresponding to the first universal serial bus interface or a second target working mode corresponding to the second universal serial bus interface.
6. The method of claim 5, wherein the obtaining of the mode switching instruction input through the display interface of the electronic device comprises:
and acquiring a mode switching instruction input aiming at the mode switching prompt message, wherein the mode switching instruction is used for confirming the first target working mode or the second target working mode included in the mode switching prompt message.
7. The method according to claim 5 or 6, wherein outputting a mode switching prompt message through a display interface of the electronic device according to the first device type or the second device type comprises:
determining a first target working mode corresponding to the first universal serial bus interface according to the first equipment type, or determining a second target working mode corresponding to the second universal serial bus interface according to the second equipment type;
and outputting mode switching prompt information through a display interface of the electronic equipment, wherein the mode switching prompt information comprises the first target working mode or the second target working mode.
8. The method of claim 1, further comprising:
acquiring a first device type of an external device connected with the first universal serial bus interface;
determining a first target working mode corresponding to the first universal serial bus interface according to the first equipment type;
switching the current working mode of the first universal serial bus interface into 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 comprises:
determining a second target working mode corresponding to the second universal serial bus interface according to the mode switching instruction;
and switching the current working mode of the second universal serial bus interface into the second target working mode.
9. The method according to claim 8, wherein said switching the current operating mode of the second usb interface to the second target operating mode comprises:
and calling an interface controller to adjust the communication protocol of the second universal serial bus interface to a communication protocol matched with 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. The method of claim 5 or 8, 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.
11. The method of claim 1, wherein the electronic device comprises a remote control device of a movable platform.
12. The method of claim 11, wherein the movable platform comprises a drone.
13. An electronic device, comprising a processor, a memory, a display device, a first universal serial bus interface, and a second universal serial bus interface, wherein:
the memory for storing program code;
the processor is configured to call the program code to perform the following operations:
acquiring a mode switching instruction input through a display interface of the display device;
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, wherein the working modes comprise a host mode and a device mode.
14. The electronic device of claim 13, wherein the processor is specifically configured to:
determining a target working mode combination corresponding to the first universal serial bus interface and the second universal serial bus interface according to the mode switching instruction, wherein the target working mode combination comprises a first target working mode corresponding to the first universal serial bus interface and a second target working mode corresponding to the second universal serial bus interface;
and switching the current working mode of the first universal serial bus interface to the first target working mode, and/or switching the current working mode of the second universal serial bus interface to the second target working mode.
15. The electronic device of claim 14, wherein the processor is further configured to:
displaying at least one working mode combination through a display interface of the display device;
wherein the processor is specifically configured to:
and acquiring a mode switching instruction input aiming at the at least one working mode combination, wherein the mode switching instruction is used for selecting a target working mode combination from the at least one working mode combination.
16. The electronic device of claim 15, wherein the at least one operating mode combination includes one or more of the operating mode of the first usb interface being a host mode and the operating mode of the second usb interface being a device mode, the operating mode of the first usb interface being a host mode and the operating mode of the second usb interface being a host mode, the operating mode of the first usb interface being a device mode and the operating mode of the second usb interface being a device mode.
17. The electronic device of claim 13, wherein the processor is further configured to:
acquiring a first device type of an external device connected with the first universal serial bus interface or a second device type of an external device connected with the second universal serial bus interface;
and outputting mode switching prompt information through a display interface of the display device according to the first equipment type or the second equipment type, wherein the mode switching prompt information comprises a first target working mode corresponding to the first universal serial bus interface or a second target working mode corresponding to the second universal serial bus interface.
18. The electronic device of claim 17, wherein the processor is specifically configured to:
and acquiring a mode switching instruction input aiming at the mode switching prompt message, wherein the mode switching instruction is used for confirming the first target working mode or the second target working mode included in the mode switching prompt message.
19. The electronic device according to claim 17 or 18, wherein the processor is specifically configured to:
determining a first target working mode corresponding to the first universal serial bus interface according to the first equipment type, or determining a second target working mode corresponding to the second universal serial bus interface according to the second equipment type;
and outputting mode switching prompt information through a display interface of the display device, wherein the mode switching prompt information comprises the first target working mode or the second target working mode.
20. The electronic device of claim 13, wherein the processor is further configured to:
acquiring a first device type of an external device connected with the first universal serial bus interface;
determining a first target working mode corresponding to the first universal serial bus interface according to the first equipment type;
switching the current working mode of the first universal serial bus interface into the first target working mode;
wherein the processor is specifically configured to:
determining a second target working mode corresponding to the second universal serial bus interface according to the mode switching instruction;
and switching the current working mode of the second universal serial bus interface into the second target working mode.
21. The electronic device of claim 20, wherein the processor is specifically configured to:
and calling an interface controller to adjust the communication protocol of the second universal serial bus interface to a communication protocol matched with 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. The electronic device of 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. The electronic device of claim 13, wherein the electronic device comprises a remote control device of a movable platform.
24. The electronic device of claim 23, wherein the movable platform comprises a drone.
25. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the handover control method according to any one of claims 1-12.
CN201980038392.1A 2019-11-05 2019-11-05 Switching control method, electronic equipment and computer readable storage medium Pending CN112292672A (en)

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
CN112292672A true CN112292672A (en) 2021-01-29

Family

ID=74419421

Family Applications (1)

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

Country Status (2)

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

Cited By (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
US20190045654A1 (en) * 2017-08-07 2019-02-07 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Server having a dual-mode serial bus port enabling selective access to a baseboard management controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885688B (en) * 2016-09-30 2021-06-04 中兴通讯股份有限公司 Signal switching method and device

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
CN106852188A (en) * 2016-10-31 2017-06-13 深圳市大疆创新科技有限公司 Data interactive method and universal serial bus device based on USB
US20190045654A1 (en) * 2017-08-07 2019-02-07 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Server having a dual-mode serial bus port enabling selective access to a baseboard management controller

Cited By (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

Also Published As

Publication number Publication date
WO2021087749A1 (en) 2021-05-14

Similar Documents

Publication Publication Date Title
CN110581919A (en) Information transmission and data processing method, device, system and storage medium
CN110888615A (en) Multi-input equipment interaction method, device and medium for double-screen different display of Android system
CN105389074A (en) Control method for smart watch and smart watch
US11231836B2 (en) Multi-window displaying apparatus and method and mobile electronic equipment
CN111766945B (en) Interface display method and device
US11209951B2 (en) Method and apparatus for displaying application program, terminal device, and storage medium
CN111831181A (en) Application switching display method and device and electronic equipment
CN113296871A (en) Method, equipment and system for processing container group instance
CN104007820A (en) Information processing method and electronic equipment
CN112292672A (en) Switching control method, electronic equipment and computer readable storage medium
CN112578774A (en) Operation mode switching method and device, electronic equipment, system and storage medium
CN110651255B (en) Load control method, movable platform and computer readable storage medium
CN111382004B (en) Parameter backup method and device, parameter restoration method and device and backup restoration system
CN113377583B (en) Display screen controller backup method, device and system
CN112328138B (en) Data display method, device and storage medium
CN115567901A (en) Method, device, equipment and storage medium for operating user identity identification card
CN111973984B (en) Coordinate control method and device for virtual scene, electronic equipment and storage medium
CN114020676A (en) Data transmission method, device thereof, electronic equipment and computer program product
CN104580672A (en) Information processing method and electronic equipment
CN113304477A (en) Game interface display method, device, equipment and medium
CN112291519A (en) Display screen switching method and device, electronic equipment and storage medium
CN111737372A (en) Map data generation method and device
CN105184379A (en) Method utilizing robot to achieve real-time automatic room reservation
JP2559687B2 (en) Monitor device for sequence controller
CN113064543B (en) Signal processing method, system and device of spliced screen and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210129

WD01 Invention patent application deemed withdrawn after publication