WO2018076382A1 - Universal serial bus-based method for data exchange and universal serial bus device - Google Patents

Universal serial bus-based method for data exchange and universal serial bus device Download PDF

Info

Publication number
WO2018076382A1
WO2018076382A1 PCT/CN2016/104146 CN2016104146W WO2018076382A1 WO 2018076382 A1 WO2018076382 A1 WO 2018076382A1 CN 2016104146 W CN2016104146 W CN 2016104146W WO 2018076382 A1 WO2018076382 A1 WO 2018076382A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
serial bus
universal serial
selecting
type
Prior art date
Application number
PCT/CN2016/104146
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/CN2016/104146 priority Critical patent/WO2018076382A1/en
Priority to CN201680003168.5A priority patent/CN106852188B/en
Publication of WO2018076382A1 publication Critical patent/WO2018076382A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B7/00Radio transmission systems, i.e. using radiation field
    • H04B7/14Relay systems
    • H04B7/15Active relay systems
    • H04B7/185Space-based or airborne stations; Stations for satellite systems
    • H04B7/18502Airborne stations
    • H04B7/18506Communications with or from aircraft, i.e. aeronautical mobile service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/4028Bus for use in transportation systems the transportation system being an aircraft

Definitions

  • the present invention relates to the field of data interaction, and in particular, to a method and device for selecting an operating mode of a universal serial bus device, a storage medium, a data interaction method based on a universal serial bus, a data interaction method, a universal serial bus device, and Remote control for unmanned aerial vehicles.
  • Unmanned aerial vehicles With the rapid development of science and technology, unmanned aerial vehicles have been widely used in various fields, such as film and television aerial photography, power line inspection, map mapping, forest fire prevention, disaster search and rescue, police inspection, and agricultural plant protection. Unmanned aerial vehicles used in these industries should meet higher requirements in terms of function and performance, especially the safety and stability of UAV operation and the ease of use.
  • the remote controller for remotely controlling the unmanned aerial vehicle flight plays a key role.
  • the remote controller of the unmanned aerial vehicle can connect different types through different types of connection interfaces.
  • the terminal device so that the remote control of the UAV is easy to generate signal interference when connecting with various types of terminal devices, affecting the control precision of the remote control for the UAV, and reducing the safety and reliability of the UAV flight. It also affects the communication connection between the remote control and the terminal device.
  • existing UAV remote controls are also difficult to adapt to many different types of terminal devices.
  • the present invention provides a method and apparatus for selecting an operating mode of a universal serial bus device, a storage medium, a data interaction method based on a universal serial bus, and data interaction.
  • Method, universal serial bus device and remote control for unmanned aerial vehicles are provided.
  • a first aspect of an embodiment of the present invention provides a method for selecting an operation mode of a universal serial bus device, comprising: acquiring a mode selection signal; and selecting an operation mode of the universal serial bus device according to the mode selection signal,
  • the working mode is host mode or device mode.
  • a second aspect of the embodiments of the present invention provides a storage medium in which a program code is stored, and when the program code is executed, the above-described method for selecting an operation mode of the universal serial bus device is executed.
  • a third aspect of the embodiments of the present invention provides a data exchange method based on a universal serial bus, including: acquiring a mode selection signal; and selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode; establishing a communication connection with the terminal device according to the selected working mode; transmitting or receiving data through the communication connection.
  • a fourth aspect of the embodiments of the present invention provides a data interaction method, including: acquiring a mode selection signal; and selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode; Establishing a communication connection with the terminal device in accordance with the selected mode of operation; acquiring data via an additional communication link independent of the communication connection; transmitting the data to the terminal device over the communication connection.
  • a fifth aspect of an embodiment of the present invention provides an apparatus for selecting an operation mode of a universal serial bus device, comprising: at least one processor, the at least one processor being used individually or collectively for: acquiring a mode selection a signal; selecting an operating mode of the universal serial bus device according to the mode selection signal, the working mode being a host mode or a device mode.
  • a sixth aspect of the embodiments of the present invention provides an apparatus for selecting an operation mode of a universal serial bus device, comprising: acquiring means for acquiring a mode selection signal; and selecting means for selecting a signal according to the mode selection The operating mode of a universal serial bus device, the working mode being a host mode or a device mode.
  • a seventh aspect of the embodiments of the present invention provides a universal serial bus device, including: at least one connection interface, the at least one connection interface is used for accessing a terminal device; at least one processor, the at least one processor is separate Or commonly used to: acquire a mode selection signal; select an operation mode of the universal serial bus device according to the mode selection signal, the operation mode is a host mode or a device mode; and the terminal device according to the selected working mode Establishing a communication connection; transmitting or receiving data over the communication connection.
  • An eighth aspect of the embodiments of the present invention provides a universal serial bus device, including: at least two connection interfaces, the at least two connection interfaces including a first type connection interface and a second type connection interface; at least two processing The at least two processors include a first type of processor corresponding to the first type of connection interface and a second type of processor corresponding to the second type of connection interface; wherein The working mode of the first type of processor and the first type of connection interface is a host mode, and the working mode of the second type of processor and the second type of connection interface is a device mode.
  • a ninth aspect of the embodiments of the present invention provides a remote controller for an unmanned aerial vehicle, comprising: a universal serial bus device, the universal serial bus device comprising: at least one connection interface, wherein the at least one connection interface is used for connection Incoming terminal device; at least one processor, the at least one processor being used separately or collectively for: acquiring a mode selection signal; selecting an operating mode of the universal serial bus device according to the mode selection signal, the working mode being a host a mode or device mode; establishing a communication connection with the terminal device according to the selected mode of operation; a communication device for acquiring data through an additional communication link independent of the communication connection; wherein the at least A processor is further configured to: transmit the data to the terminal device over the communication connection.
  • Embodiments of the present invention select a universal serial bus device to operate in a host mode or operate in a device mode by a mode selection signal, and switch the operation of the universal serial bus device when there are different terminals accessing the universal serial bus device. Mode to ensure data interaction between the terminal device and the universal serial bus device. Furthermore, embodiments of the present invention also avoid situations where it is necessary to establish an independent wireless transmission path, and effectively avoid interference with existing wireless communication.
  • FIG. 1 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 3 of the present invention
  • FIG. 4 is a schematic flowchart diagram of a method for selecting an operation mode of a universal serial bus device according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 5 of the present invention.
  • FIG. 6 is a schematic flowchart diagram of a data interaction method based on a universal serial bus according to Embodiment 1 of the present invention.
  • FIG. 7 is a flowchart of a data interaction method based on a universal serial bus according to Embodiment 2 of the present invention. schematic diagram;
  • FIG. 8 is a schematic flowchart diagram of a data interaction method based on a universal serial bus according to Embodiment 3 of the present invention.
  • FIG. 9 is a schematic flowchart diagram of a data interaction method according to Embodiment 1 of the present invention.
  • FIG. 10 is a schematic structural diagram of an apparatus for selecting an operation mode of a universal serial bus device according to another embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a universal serial bus device according to Embodiment 1 of the present invention.
  • FIG. 12 is a schematic structural diagram of a universal serial bus device according to Embodiment 2 of the present invention.
  • FIG. 13 is a schematic structural diagram of a universal serial bus device according to Embodiment 3 of the present invention.
  • FIG. 14 is a schematic structural diagram of a universal serial bus device according to Embodiment 4 of the present invention.
  • FIG. 15 is a schematic structural diagram of a remote controller of an unmanned aerial vehicle according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 1 of the present invention.
  • the embodiment provides a method for selecting a universal serial bus device.
  • Method of mode including:
  • the mode selection signal may be set to include: a universal serial bus device (below The access state, the switch signal, or the preset periodic signal of the connection interface of the USB device can be selected as long as the operation mode of the USB device can be selected through the above mode selection signal, and details are not described herein again.
  • S2 Select the working mode of the universal serial bus device according to the mode selection signal, and the working mode is the host mode or the device mode.
  • the analysis process for selecting the working mode of the USB device according to the mode selection signal is not limited, and those skilled in the art may set different analysis strategies according to specific design requirements and different mode selection signals, for example, according to the mode.
  • Select signal to select USB device The working mode is set to: the mode selection signal is searched for a corresponding standard mode selection signal in a preset database, wherein the database stores a mapping relationship between the standard mode selection signal and the standard working mode, and can be found by determining the standard mode selection signal.
  • the standard working mode is the working mode of the USB device to be selected; of course, those skilled in the art can also use other methods to select the working mode of the USB device, as long as the USB device can be determined quickly and accurately.
  • the working mode is OK, and will not be described here.
  • the method for selecting the working mode of the universal serial bus device provided by the embodiment, selects the universal serial bus device to work in the host mode or works in the device mode by using the mode selection signal, and when there are different terminals accessing the universal string When the bus device is connected, the data interaction between the terminal device and the universal serial bus device is ensured by switching the working mode of the universal serial bus device. Furthermore, embodiments of the present invention also avoid situations where it is necessary to establish an independent wireless transmission path, and effectively avoid interference with existing wireless communication.
  • FIG. 2 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 2 of the present invention; on the basis of the foregoing embodiment, referring to FIG. 2, when the mode selection signal is set to include When the access status of at least two connection interfaces of the universal serial bus device is further, the acquisition mode selection signal is further set to include:
  • S11 Acquire an access status of at least two connection interfaces of the universal serial bus device.
  • the universal serial bus device in this embodiment includes at least two connection interfaces, and the number of the specific connection interfaces is not limited.
  • the connection interfaces may be set to two, three, four, five, and the like.
  • the specific number of the connection interfaces may be set according to specific design requirements.
  • the connection interface in this embodiment is used to connect the terminal device, where the access state refers to the state in which the connection interface accesses the terminal device, including whether the connection interface is The connection terminal device and the connection interface of the specific access terminal device; the specific implementation process for obtaining the access state in this embodiment is not limited, and those skilled in the art can set according to specific design requirements, for example, by detecting universal serial The data flow at each connection interface of the bus device determines the access status.
  • connection interface When the data flow of a connection interface is not zero, the connection interface is connected to the terminal device, and the terminal device can perform data interaction. Then, it can be determined that the access state of the connection interface is that the terminal device is connected.
  • the access status of the connection interface is that the terminal device is connected.
  • those skilled in the art can also use other methods to obtain the access status, as long as the access status of at least two connection interfaces of the universal serial bus device can be accurately obtained. Narration.
  • the embodiment may set the operation mode of selecting the universal serial bus device according to the mode selection signal to include:
  • S21 Select a host mode as an operating mode of the universal serial bus device in response to the access terminal device on the first type of the at least two connection interfaces;
  • the device mode is selected as the operating mode of the universal serial bus device in response to the access terminal device on the second type of connection interface of the at least two connection interfaces.
  • the at least two connection interfaces in the embodiment include the first type of connection interface, and the specific interface type of the first type of connection interface is not limited, and those skilled in the art can set according to specific design requirements, and are optional.
  • the first type of connection interface can be set to the type A universal serial bus interface; when the access terminal device of the first type of connection interface is detected, the type A universal serial bus interface is connected to the terminal device, and The type A universal serial bus interface can perform data interaction with the terminal device.
  • the host mode is selected as the working mode of the universal serial bus device, thereby ensuring that the USB device performs data interaction with the terminal device through the first type of connection interface.
  • the stable reliability used by the method for selecting the operating mode of the universal serial bus device is guaranteed.
  • connection interfaces in the embodiment include a second type of connection interface
  • the specific interface type of the second type of connection interface is not limited, and can be set according to specific design requirements, and can be selected by a person skilled in the art.
  • the second type of connection interface can be set to a type B universal serial bus interface, a small universal serial bus interface or a micro universal serial bus interface; when the access terminal device is detected on the second type of connection interface, The B-type universal serial bus interface, the small universal serial bus interface or the micro universal serial bus interface has been connected to the terminal device, and the second type of connection interface performs data interaction with the terminal device.
  • the host mode is selected as the universal string.
  • the working mode of the bus device can ensure that the USB device performs data interaction with the terminal device through the second type of connection interface, thereby ensuring the stable reliability of the method for selecting the working mode of the universal serial bus device.
  • the device type of the terminal device that is connected to the first type of connection interface is not limited.
  • the terminal device that is connected to the first type of connection interface is set to be based on the Android operating system and / or the terminal device of the IOS operating system, in this case, the USB device working in the host mode can be effectively ensured to perform data interaction with the terminal device; and the device type of the terminal device accessed by the second type of connection interface is not limited.
  • the second type of connection interface is connected The terminal device is configured as a terminal device based on the Windows operating system and/or the Linux operating system. At this time, the USB device working in the device mode can be effectively ensured to perform data interaction with the terminal device.
  • the method for selecting the working mode of the universal serial bus device in this embodiment when the USB device includes at least two connection interfaces, selects the working of the USB device according to the access state through the access state of the at least two connection interfaces. State, specifically, when the first type of connection interface is connected to the terminal device, the host mode is selected as the working mode of the USB device, and when the second type of connection interface is connected to the terminal device, the working mode is selected as the working mode of the USB device.
  • the accuracy and reliability of the USB device working mode selection are effectively ensured, and the stability and reliability of data interaction between the USB device and the accessed terminal device in different working modes are ensured.
  • FIG. 3 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 3 of the present invention.
  • the mode selection signal includes a switch signal signal
  • the acquisition mode selection signal is set to include:
  • S12 Acquire a switch signal, where the switch signal includes at least two switch states.
  • the switch signal is obtained by monitoring the execution action of the preset switch device.
  • the acquisition switch signal may be set to include:
  • the hardware switch or the software switch generates a corresponding action when the hardware switch or the software switch performs an operation, thereby generating a switch signal, wherein the switch signal includes at least two switch states, which are not limited by those skilled in the art.
  • the setting is set according to specific design requirements.
  • two switch states can be set to include: an open state and a closed state, a first selected state, a second selected state, and the like.
  • the embodiment may set the operation mode of selecting the universal serial bus device according to the mode selection signal to include:
  • the device mode is selected as the mode of operation of the universal serial bus device.
  • the first switch state includes the first switch state
  • the specific content and form of the first switch state are not limited, and those skilled in the art may set according to specific design requirements, for example, the first switch state may be set to the host mode state; when the switch signal is detected as the first In the switch state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the host mode is selected as the working mode of the universal serial bus device.
  • the second switch state is included in the at least two switch states in this embodiment, and the specific content and form of the second switch state are not limited, and those skilled in the art may set according to specific design requirements, for example,
  • the second switch state can be set to the device mode state; when the switch signal is detected as the second switch state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the device mode is selected as the universal string.
  • the mode of operation of the row bus device effectively ensures the stable reliability of the method used to select the mode of operation of the universal serial bus device.
  • the acquisition mode selection signal is set to include:
  • S13 Acquire a periodic signal, and the periodic signal includes at least two signal states in a single cycle.
  • the periodic signal is generated according to a preset period, that is, the working mode of the USB device at this time is selected according to a preset working period; the specific implementation process of acquiring the periodic signal is not limited in this embodiment.
  • a person skilled in the art can set according to specific design requirements.
  • the acquisition cycle signal can be set to obtain the periodic signal by detecting the working time of the USB device and the preset period information, and in addition, for the cycle in this embodiment.
  • the specific content and type of the signal in at least two signal states in a single cycle are not limited, and those skilled in the art can set according to specific design requirements.
  • two signal states can be set to include the first half cycle signal state and after. Half cycle signal status and more.
  • the embodiment may set the working mode of selecting the universal serial bus device according to the mode selection signal to include:
  • the device mode is selected as the operating mode of the universal serial bus device.
  • the at least two signal states in this embodiment include the first signal state, and the specific content and form of the first signal state are not limited, and those skilled in the art may set according to specific design requirements, for example,
  • the first signal state is set to enable the host mode signal; when the periodic signal is detected as the first signal state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the host mode is selected as the universal serial bus.
  • the working mode of the device is set to enable the host mode signal; when the periodic signal is detected as the first signal state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices.
  • the second signal state is included in the at least two signal states in the embodiment, and the specific content and form of the second signal state are not limited, and those skilled in the art may set according to specific design requirements, for example,
  • the second signal state is set to enable the host mode signal; when the periodic signal is detected as the second signal state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the device mode is selected as the universal serial bus.
  • the mode of operation of the device effectively ensures the stable reliability of the method used to select the mode of operation of the universal serial bus device.
  • FIG. 5 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 5 of the present invention.
  • the preset The periodic signal is set to be a switching mode operation according to the periodic signal for the USB device, that is, when the USB device operates in the host mode, when the periodic signal is received in a single cycle, the USB device is caused by The host mode is switched to the device mode; or, when the USB device operates in the device mode, after receiving the periodic signal in a single cycle, the USB device is switched from the device mode to the host mode; of course, those skilled in the art can also
  • the setting is set to another selection method.
  • the operation mode of selecting the universal serial bus device according to the mode selection signal may be set to include:
  • the device mode is selected as the operating mode of the universal serial bus device.
  • the periodic signal includes the first half period and the second half period, and in the first half period of the periodic signal, the host mode is selected as the working mode of the USB device; when in the second half of the periodic signal
  • the USB device is automatically switched from the host device to the device mode to ensure the USB device and other terminal devices.
  • the data interaction improves the flexibility of selecting the working mode of the USB device, thereby improving the practicability of the method for selecting the working mode of the universal serial bus device, and is beneficial to the promotion and application of the market.
  • the embodiment provides a storage medium, where the program code is stored, and when the program code is running, the universal serial bus device for selecting a universal serial bus device according to any one of the foregoing embodiments 1 - 5 is executed.
  • the way of working mode is not limited to any one of the foregoing embodiments 1 - 5 .
  • the specific implementation process and the implementation effect of the method for selecting the working mode of the universal serial bus device performed by the storage medium in this embodiment are the same as the working mode for selecting the universal serial bus device in the first embodiment to the fifth embodiment.
  • the specific implementation process and the implementation effect of the method are the same. For details, refer to the above statement, and details are not described herein again.
  • the storage medium provided in this embodiment selects a universal serial bus device to work in a host mode or works in a device mode through a mode selection signal, and when a different terminal accesses the universal serial bus device, by switching the universal serial bus
  • the working mode of the device and the mode switching function of the universal serial bus device can be fully utilized to ensure data interaction between the terminal device and the universal serial bus device, thereby avoiding the need to establish an independent wireless transmission path, thereby effectively reducing the situation.
  • the degree of signal interference is also realized.
  • the universal serial bus device can establish communication connection with various types of terminal devices, which effectively improves the practicability of the storage medium and is beneficial to the promotion and application of the market.
  • FIG. 6 is a schematic flowchart of a data exchange method based on a universal serial bus according to Embodiment 1 of the present invention.
  • the embodiment provides a data interaction method based on a universal serial bus, and the data interaction method is provided. It is used to implement data interaction between the universal serial bus device and the terminal device.
  • the method includes:
  • S101 Acquire a mode selection signal
  • S102 Select an operating mode of the universal serial bus device according to the mode selection signal, and the working mode is a host mode or a device mode;
  • the USB device After selecting the working mode of the USB device, the USB device establishes a communication connection with the terminal device according to the selected working mode. At this time, normal data interaction between the USB device and the terminal device can be effectively ensured.
  • S104 Send or receive data through a communication connection.
  • the USB device can perform data interaction with the terminal device, where the data interaction process includes: the USB device sends data to the terminal device, and the USB device receives the data sent by the terminal device, and the specific data interaction manner can be determined according to the specific The design requirements are set as long as the data can be sent or received through the established communication connection between the terminal device and the USB device, and will not be described here.
  • the universal serial bus-based data interaction method selects the universal serial bus device to work in the host mode or in the device mode by using the mode selection signal, and after confirming the working mode, according to the selected working mode and
  • the terminal device establishes a communication connection, thereby enabling the terminal device and the universal serial bus device to transmit or receive data through the communication connection, thereby realizing that the universal serial bus device can establish a communication connection with the plurality of types of terminal devices; It is necessary to establish an independent wireless transmission path, which facilitates the communication connection between the terminal device and the universal serial bus device, effectively reduces the degree of signal interference, and ensures the normal interaction of data interaction between the terminal device and the universal serial bus device, and is effective.
  • the method improves the practicability of the method and is beneficial to the promotion and application of the market.
  • FIG. 7 is a schematic flowchart of a data exchange method based on a universal serial bus according to Embodiment 2 of the present invention. Based on the foregoing embodiment, with reference to FIG. 6-7, the present embodiment is related to the selected working mode.
  • the specific implementation process of the terminal device to establish a communication connection is not limited, and can be set by a person skilled in the art according to specific design requirements.
  • the communication connection with the terminal device according to the selected working mode is set to include:
  • the terminal device After the working mode of the universal serial bus device is selected, the terminal device is detected when the universal serial bus device operates in the corresponding working mode.
  • the specific implementation manner of the specific detecting terminal device is not limited in this embodiment, and those skilled in the art may Set according to specific design requirements, for example, it can detect the signal change of the universal serial bus device working in the selected working mode, such as whether the voltage change changes or whether the signal has a rising edge change, etc., as long as it can accurately Detection end
  • the end device can be used, and will not be described here.
  • S1032 Establish a communication connection with the terminal device in response to detecting the terminal device.
  • the universal serial bus device operating in the selected working mode detects the terminal device, it indicates that the universal serial bus device has recognized the terminal device at this time, and can establish a communication connection with the terminal device, wherein the establishment of the communication connection is It is used to implement data interaction between the universal serial bus device and the connected terminal device, and specifically includes a process of transmitting data or receiving data.
  • FIG. 8 is a schematic flowchart of a data exchange method based on a universal serial bus according to Embodiment 3 of the present invention.
  • the terminal device is established in response to detecting the terminal device.
  • the method further includes:
  • the detection process can be suspended, thereby reducing the data resources required for data processing, and improving the data resource.
  • the efficiency of data interaction between the terminal device and the communication serial interface device effectively improves the practicability of the method.
  • the method may also be set to include:
  • the universal serial interface device When it is detected that the universal serial interface device disconnects the communication connection with the terminal device, it indicates that the data interaction operation between the terminal device and the universal serial interface device has been completed, and at this time, the terminal device and the universal serial can be disconnected.
  • the communication connection between the interface devices continues to detect whether other terminal devices can establish a communication connection with the universal serial interface device, thereby effectively implementing data interaction between the universal serial interface device and the plurality of terminal devices, and further improving the method
  • the practicality is conducive to the promotion and application of the market.
  • FIG. 9 is a schematic flowchart of a data interaction method according to Embodiment 1 of the present invention.
  • the data interaction method is used to implement a data interaction process between a terminal device and a third-party device through a universal serial bus device, where the third-party device can be an unmanned aerial vehicle, specifically
  • the method includes:
  • S202 Select an operating mode of the universal serial bus device according to the mode selection signal, and the working mode is a host mode or a device mode;
  • S203 Establish a communication connection with the terminal device according to the selected working mode.
  • S204 Acquire data through another communication link that is independent of the communication connection
  • the communication connection is a communication connection established between the universal serial bus device and the terminal device, and the communication link in this embodiment is a completely different data link from the communication connection, that is, the data interaction of the communication link.
  • the data interaction process of the foregoing communication connection is completely independent; in this embodiment, the data can be obtained through the communication link.
  • the specific content of the data is not limited in this embodiment, and those skilled in the art can set according to specific design requirements.
  • the data may be set to include: image data and flight data, thereby enabling the communication serial bus device to quickly and accurately acquire image data and flight data through the communication link, wherein the image data and the flight data
  • the unmanned aerial vehicle can be sent to the communication serial bus device via the above communication link.
  • S205 Transmit data to the terminal device through a communication connection.
  • the communication serial bus device After acquiring the data information, the communication serial bus device transmits the data to the terminal device through a communication connection established with the terminal setting, thereby enabling the terminal device to quickly and accurately acquire image data and flight data, which is convenient.
  • the user analyzes and consults the image data and flight data through the terminal data, which improves the practicability of the method.
  • the data interaction method provided in this embodiment selects the universal serial bus device to work in the host mode or works in the device mode by using the mode selection signal, and after confirming the working mode, establish a communication connection with the terminal device according to the selected working mode. Further, the terminal device and the universal serial bus device can transmit or receive data through a communication connection. Further, data is acquired through another communication link independent of the communication connection, and the acquired data can be sent to the communication connection through the communication connection.
  • the terminal device avoiding the need to establish an independent wireless transmission path, effectively The degree of signal interference is reduced; the terminal device is communicably connected with the UAV and the universal serial bus device, and the data interaction between the terminal device and the UAV and the universal serial bus device is ensured, and the data is effectively performed. The practicality of the method is improved, which is beneficial to the promotion and application of the market.
  • the specific implementation process of acquiring data by using another communication link independent of the communication connection is not limited, and optionally, the communication connection is independent.
  • the additional communication link acquisition data is set to include: acquiring data over the wireless link.
  • the wireless link may be a Wi-Fi link or a Bluetooth link, etc. Further, the implementation may also set the data acquired through the wireless link to include: passing between the unmanned aerial vehicle and the unmanned aerial vehicle remote controller The wireless link acquires data.
  • the established wireless link is a communication connection between the unmanned aerial vehicle and the remote controller of the unmanned aerial vehicle, that is, during the operation of the unmanned aerial vehicle, the unmanned aerial vehicle records the operational data of the unmanned aerial vehicle, that is, the above Data, the remote controller of the UAV can obtain data from the unmanned aerial vehicle through the wireless link, and then the remote controller of the UAV can transmit the acquired data to the terminal device through a communication connection established with the terminal device. Furthermore, it is effective to ensure that the terminal device can accurately and efficiently acquire the data information of the UAV, and facilitate the user to access and analyze the data information, thereby further improving the practicability of the method.
  • the present embodiment provides an apparatus for selecting an operating mode of a universal serial bus device, comprising: at least one processor, at least one of which is used individually or collectively for:
  • the working mode of the universal serial bus device is selected according to the mode selection signal, and the working mode is the host mode or the device mode.
  • processors in this embodiment include, but are not limited to, a microprocessor (English: microcontroller), a reduced instruction set computer (English: reduced RISC), an application specific integrated circuit ( English: application specific integrated circuits (ASIC), application-specific instruction-set processor (ASIP), central processing unit (English: central processing) Unit, referred to as: CPU), physical processor English (English: physics processing unit, referred to as: PPU), digital signal processor (English: digital signal processor, referred to as DSP), field programmable gate array (English: field programmable gate array , referred to as: FPGA) and so on.
  • a microprocessor English: microcontroller
  • a reduced instruction set computer English: reduced RISC
  • an application specific integrated circuit English: application specific integrated circuits (ASIC), application-specific instruction-set processor (ASIP), central processing unit (English: central processing) Unit, referred to as: CPU)
  • physical processor English English: physics processing unit, referred to as: PPU
  • digital signal processor English: digital signal processor,
  • the embodiment provides a device for selecting an operating mode of a universal serial bus device, and the processor selects a universal serial bus device to work in a host mode or works in a device mode through a mode selection signal, and fully utilizes a universal
  • the mode switching function of the serial bus device can ensure the data interaction between the terminal and the universal serial bus device by switching the working mode of the universal serial bus device when different terminals are connected to the universal serial bus device, thereby avoiding the data interaction between the terminal and the universal serial bus device. It is also necessary to establish an independent wireless transmission path to facilitate communication connection between other terminal devices and the universal serial bus device, thereby ensuring normal data interaction between the terminal device and the universal serial bus device, and effectively improving the device. Practicality is conducive to the promotion and application of the market.
  • At least one processor in this embodiment is configured to perform the steps of the method for selecting an operation mode of a universal serial bus device according to any one of the foregoing second embodiment to fifth embodiment,
  • the processor in this embodiment For the implementation process and the implementation of the specific steps performed by the processor in this embodiment, reference may be made to the description in the foregoing Embodiment 2 - Embodiment 5, and details are not described herein again.
  • FIG. 10 is a schematic structural diagram of an apparatus for selecting an operation mode of a universal serial bus device according to another embodiment of the present invention.
  • the embodiment provides a device for selecting a universal serial bus device.
  • the working mode of the device specifically, the device includes:
  • the acquiring device 11 is configured to acquire a mode selection signal
  • the selecting device 12 is configured to select an operating mode of the universal serial bus device according to the mode selection signal, and the working mode is a host mode or a device mode.
  • the specific shape and structure of the obtaining device 11 and the selecting device 12 are not limited in this embodiment, and those skilled in the art can perform any setting according to the specific operation steps implemented by the present invention, and details are not described herein again.
  • the acquiring device in this embodiment is not described herein. 11 and the specific implementation process and implementation effect of the operation steps implemented by the selection device 12 and the specific implementation process and the implementation effect of the steps S1-S2 in the first embodiment For the same, please refer to the above statement for details, and details are not described herein again.
  • the device for selecting the working mode of the universal serial bus device provided by the embodiment, specifically, the mode selection signal is acquired by the obtaining device 11, and the selecting device 12 selects the universal serial bus device to operate in the host mode according to the mode selection signal. Or working in the device mode, fully utilizing the mode switching function of the universal serial bus device, when there are different terminals accessing the universal serial bus device, the terminal can be guaranteed by switching the working mode of the universal serial bus device.
  • the data interaction with the universal serial bus device avoids the need to establish an independent wireless transmission path, facilitates the communication connection between other terminal devices and the universal serial bus device, and ensures the data between the terminal device and the universal serial bus device.
  • the normal operation of the interaction effectively improves the practicability of the device and is beneficial to the promotion and application of the market.
  • the acquisition device 11 is set to be used. to:
  • the present embodiment may set the selection device 12 to:
  • the device mode is selected as the operating mode of the universal serial bus device in response to the access terminal device on the second type of connection interface of the at least two connection interfaces.
  • the first type of connection interface is a type A universal serial bus interface
  • the second type of connection interface is a type B universal serial bus interface, a small universal serial bus interface or a micro universal serial bus interface.
  • the device for selecting the working mode of the universal serial bus device in this embodiment when the USB device includes at least two connection interfaces, selects the working of the USB device according to the access state through the access state of the at least two connection interfaces. State, specifically, when the first type of connection interface is connected to the terminal device, The selecting device 12 selects the host mode as the working mode of the USB device. When the second type of connection interface accesses the terminal device, the selecting device 12 selects the working mode as the working mode of the USB device, thereby effectively ensuring the selection of the operating mode of the USB device. Accurate reliability ensures stable and reliable data interaction between USB devices and connected terminal devices in different working modes.
  • the obtaining device 11 is configured to:
  • the switching signal is obtained, and the switching signal includes at least two switching states.
  • the obtainable device 11 is configured to:
  • the present embodiment can set the selection device 12 to:
  • the device mode is selected as the mode of operation of the universal serial bus device.
  • the acquisition device 11 is configured to:
  • a periodic signal is acquired, the periodic signal including at least two signal states in a single cycle.
  • the present embodiment can set the selection device 12 to:
  • the device mode is selected as the operating mode of the universal serial bus device.
  • the selecting device 12 can also be configured to:
  • the host mode is selected as the operating mode of the universal serial bus device
  • the device mode is selected as the operating mode of the universal serial bus device.
  • FIG. 11 is a schematic structural diagram of a universal serial bus device according to Embodiment 1 of the present invention. and as shown in FIG. 11, the embodiment provides a universal serial bus device for performing with a terminal device. Communication connection, specifically, the device includes:
  • At least one connection interface 101 at least one connection interface 101 is used for accessing the terminal device;
  • At least one processor 102 at least one processor 102, used alone or in common:
  • a working mode of the universal serial bus device is a host mode or a device mode
  • connection interface 101 and the processor 102 are not limited in this embodiment, and can be set by a person skilled in the art according to specific design requirements.
  • the connection interface 101 and the processor 102 can be respectively set to include one. 2, 3, or 4, etc.; in addition, the specific implementation process and implementation effect of the operation steps implemented by the processor 102 in this embodiment and the specific implementation process and implementation of the steps S101-S104 in the seventh embodiment The effects are the same.
  • connection interface in the USB device can be the host mode or the device mode
  • the access terminal is a smart terminal
  • the two camps of the current operating system of the smart terminal are android and ios
  • these The devices provide a unique communication interface for the connection interface.
  • These interfaces require the usb interface in the UAV system to work in the host mode by default, and in the specific implementation of data interaction, for the android device, the ao interface can be used for communication; for the ios device
  • the role of the role switch mode and the ea native transport interface can be used.
  • the terminal device can be accurately identified, and the communication connection between the terminal device and the USB device can be established, so that a good device compatibility is achieved.
  • the universal serial bus device selects the universal serial bus device to work in the host mode or works in the device mode by using the mode selection signal, and establishes communication with the terminal device according to the selected working mode after confirming the working mode.
  • the connection can further enable the terminal device to transmit or receive data through the communication connection between the universal serial bus device; avoid the need to establish an independent wireless transmission path, and facilitate the communication connection between the terminal device and the universal serial bus device to ensure communication
  • the normal interaction of data interaction between the terminal device and the universal serial bus device effectively improves the practicability of the universal serial bus device and is beneficial to the promotion and application of the market.
  • At least one processor 102 in this embodiment is further configured to perform the method for performing a universal serial bus-based data interaction method in the above-mentioned Embodiments 8 to 9.
  • the processor 102 in this embodiment For the implementation process and the implementation of the specific steps performed by the processor 102 in this embodiment, reference may be made to the description in the foregoing Embodiment 8 - Embodiment 9, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of a universal serial bus device according to Embodiment 2 of the present invention.
  • the present embodiment sets at least one connection interface 102 to include: Connection interface 1011 and second type connection interface 1012;
  • the first type of connection interface 1011 and the second type of connection interface 1012 are connected to the same processor 102.
  • the first type of connection interface 1011 operates in a host mode
  • the second type of connection interface 1012 operates in a device mode.
  • the specific interface type of the first type of the connection interface 1011 and the second type of connection interface 1012 is not limited in this embodiment, and those skilled in the art may set according to specific design requirements.
  • the first type of connection interface is set to 1011.
  • the second type of connection interface 1012 is set to a Type B universal serial bus interface, a small universal serial bus interface, or a micro universal serial bus interface.
  • the universal serial bus device can be configured to include one processor 102.
  • the universal serial bus device includes interface A and interface B, wherein interface A corresponds to the host mode, and interface B corresponds to the device mode.
  • the two connection interfaces are connected to the same USB controller.
  • the universal serial bus device can establish a communication connection with the terminal device through interface A or interface B, thereby implementing data interaction between the universal serial bus device and the terminal device.
  • the process of the universal serial bus device at this time can only support the access of one type of terminal device at the same time.
  • the device is configured to include: a hardware switch 103 having at least a first switch state and a second switch state, the hardware switch 103 being coupled to the at least one processor 102;
  • the specific shape and structure of the hardware switch 103 are not limited, and those skilled in the art can arbitrarily set the hardware switch 103 according to the operation steps thereof, and details are not described herein. In addition, those skilled in the art can set the hardware switch 103.
  • the working mode of the first switch state is the master mode
  • the working mode of the second switch state of the hardware switch 103 is the device mode
  • the working mode of the first switch state may be set to the device mode
  • the second switch state is operated.
  • the mode is host mode and so on.
  • the number of the connection interfaces 101 at this time can be set to one.
  • the access device in order to satisfy the connection interface 101, the access device can be applied to different access devices of different device types, and the different switch states of the hardware switch 103 are processed.
  • the device 102 can select the working mode of the connection interface 101 according to the corresponding switch state, thereby ensuring the communication connection between the universal serial bus device and the terminal device.
  • FIG. 14 is a schematic structural diagram of a universal serial bus device according to Embodiment 4 of the present invention; and as shown in FIG. 14, the embodiment provides a universal serial bus device for performing with a terminal device.
  • Communication connection specifically, the device includes:
  • At least two connection interfaces 101 At least two connection interfaces 101, at least two connection interfaces 101 include a first type of connection interface and a second type of connection interface;
  • At least two processors 102 at least two processors 102 comprising a first type of processor corresponding to the first type of connection interface and a second type of processor corresponding to the second type of connection interface;
  • the working mode of the first type of processor and the first type of connection interface is a host mode
  • the working mode of the second type of processor and the second type of connection interface is a device mode
  • connection interface 101 and the processor 102 are not limited in this embodiment, and can be set by a person skilled in the art according to specific design requirements.
  • the connection interface 101 and the processor 102 can be respectively set to include one and two.
  • the connection interface 101 and the processor 102 can be set to two.
  • the connection interface 101 includes: interface A and interface B, wherein interface A corresponds to the host mode. (host mode), interface B corresponds to device Mode (device mode), the processor 102 includes: a first type processor and a second type processor, the first type of processor is connected to the interface A, and the second type of processor is connected to the interface B.
  • the serial bus device can support the access of two different terminal devices at the same time, thereby improving the practicability of the universal serial bus device and facilitating the promotion and application of the market.
  • the Bluetooth ground station will add a radio station on the ground side, and install a Bluetooth module on the radio station, which can be directly connected to the sky-side wireless control system of the UAV; and a Bluetooth module is also installed on the third-party equipment.
  • the Bluetooth module connected to the radio station interacts with the flight controller through the data link created by the Bluetooth module and the radio station; however, the ground station in the prior art has the following drawbacks: the resources existing in the UAV system are not fully utilized. It is necessary to set up an independent wireless transmission system, and the redundancy is increased, which increases the user cost and is not conducive to the promotion and application of the market.
  • FIG. 15 is a schematic structural diagram of a remote controller of an unmanned aerial vehicle according to an embodiment of the present invention.
  • the present embodiment provides a remote controller for an unmanned aerial vehicle.
  • Universal Serial Bus Device 20 includes:
  • At least one connection interface 201 at least one connection interface 201 is used to access the terminal device 10;
  • At least one processor 202 at least one processor 202, used alone or collectively, is used to:
  • a communication device 203 for acquiring data through an additional communication link that is independent of the communication connection
  • the at least one processor 202 is further configured to:
  • the data is transmitted to the terminal device 10 through a communication connection.
  • the communication device 203 can be configured to: acquire data through a wireless link; specifically, the communication device 203 is configured to: pass the unmanned aerial vehicle 30 and the unmanned aerial vehicle
  • the data is obtained by the wireless link between the remote controllers; the specific content of the data is not limited in this embodiment, and can be set by a person skilled in the art according to specific design requirements.
  • the data is set to include: an image. Data and flight data.
  • connection interface 201 the processor 203, and the communication device 203 included in the universal serial bus device 20 in this embodiment are different from the specific implementations of steps S201-S205 in the above tenth embodiment.
  • the process and the implementation effect are the same. For details, refer to the above statement, and details are not described herein again.
  • the remote controller of the UAV obtained by the embodiment obtains data through another communication link independent of the communication connection, and can send the acquired data to the terminal device through the communication connection; avoiding the need to establish independent wireless
  • the terminal device is conveniently connected with the UAV and the universal serial bus device, and the data interaction between the terminal device and the unmanned aerial vehicle and the unmanned aerial vehicle remote controller is ensured, thereby effectively improving the
  • the practicality of the remote control of the unmanned aerial vehicle is conducive to the promotion and application of the market.
  • the related apparatus and method disclosed may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described 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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • An integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium.
  • the present invention Technical Solution In essence or in part that contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product, the computer software product is stored in a storage medium, including a plurality of instructions for making A computer processor performs all or part of the steps of the various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Astronomy & Astrophysics (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Information Transfer Systems (AREA)

Abstract

A method and apparatus for selecting an operating mode of a universal serial bus device, a storage medium, a universal serial bus-based method for data exchange, a data exchange method, a universal serial bus device, and a remote controller of an unmanned aerial vehicle. The method for selecting an operating mode of a universal serial bus device comprises: acquiring a mode selection signal; selecting an operating mode of a universal serial bus device according to the mode selection signal, wherein the operating mode is a host mode or device mode. By means of embodiments of the present invention, data exchange is achieved between a universal serial bus device and different types of terminal devices by means of switching the operating mode of the universal serial bus device. In addition, the embodiments of the present invention may further avoid situations wherein a separate wireless transmission path needs to be established, while effectively avoiding interference with existing wireless communications.

Description

基于通用串行总线的数据交互方法和通用串行总线设备Universal serial bus based data interaction method and universal serial bus device 技术领域Technical field
本发明涉及数据交互领域,尤其涉及一种用于选择通用串行总线设备的工作模式的方法和设备、存储介质、基于通用串行总线的数据交互方法、数据交互方法、通用串行总线设备和无人飞行器的遥控器。The present invention relates to the field of data interaction, and in particular, to a method and device for selecting an operating mode of a universal serial bus device, a storage medium, a data interaction method based on a universal serial bus, a data interaction method, a universal serial bus device, and Remote control for unmanned aerial vehicles.
背景技术Background technique
随着科学技术的飞速发展,无人飞行器已广泛应用在各个领域,例如,影视航拍、电力巡线、地图测绘、森林防火、灾害搜救、警用巡视、农业植保等。应用在这些行业的无人飞行器在功能和性能上都应当满足更高的要求,尤其是无人飞行器运行的安全稳定性以及使用的方便程度。With the rapid development of science and technology, unmanned aerial vehicles have been widely used in various fields, such as film and television aerial photography, power line inspection, map mapping, forest fire prevention, disaster search and rescue, police inspection, and agricultural plant protection. Unmanned aerial vehicles used in these industries should meet higher requirements in terms of function and performance, especially the safety and stability of UAV operation and the ease of use.
对于无人飞行器的运行的稳定可靠性而言,用于遥控无人飞行器飞行的遥控器起到关键作用,现有技术中,无人飞行器的遥控器可以通过不同类型的连接接口连接不同类型的终端设备,这样使得无人飞行器的遥控器在与各种类型的终端设备进行连接时,容易产生信号干扰,影响遥控器对无人飞行器的控制精确度,降低了无人飞行器飞行的安全可靠性,同时也影响了遥控器与终端设备之间的通信连接。此外,现有的无人飞行器遥控器也难以兼容多种不同类型的终端设备。For the stable reliability of the operation of the unmanned aerial vehicle, the remote controller for remotely controlling the unmanned aerial vehicle flight plays a key role. In the prior art, the remote controller of the unmanned aerial vehicle can connect different types through different types of connection interfaces. The terminal device, so that the remote control of the UAV is easy to generate signal interference when connecting with various types of terminal devices, affecting the control precision of the remote control for the UAV, and reducing the safety and reliability of the UAV flight. It also affects the communication connection between the remote control and the terminal device. In addition, existing UAV remote controls are also difficult to adapt to many different types of terminal devices.
发明内容Summary of the invention
为了解决现有技术中存在的上述或其他潜在问题,本发明提供一种用于选择通用串行总线设备的工作模式的方法和设备、存储介质、基于通用串行总线的数据交互方法、数据交互方法、通用串行总线设备和无人飞行器的遥控器。In order to solve the above or other potential problems existing in the prior art, the present invention provides a method and apparatus for selecting an operating mode of a universal serial bus device, a storage medium, a data interaction method based on a universal serial bus, and data interaction. Method, universal serial bus device and remote control for unmanned aerial vehicles.
本发明实施例的第一个方面提供一种用于选择通用串行总线设备的工作模式的方法,包括:获取模式选择信号;根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式。 A first aspect of an embodiment of the present invention provides a method for selecting an operation mode of a universal serial bus device, comprising: acquiring a mode selection signal; and selecting an operation mode of the universal serial bus device according to the mode selection signal, The working mode is host mode or device mode.
本发明实施例的第二个方面提供一种存储介质,所述存储介质内存储有程序代码,当程序代码运行时,会执行上述的用于选择通用串行总线设备的工作模式的方法。A second aspect of the embodiments of the present invention provides a storage medium in which a program code is stored, and when the program code is executed, the above-described method for selecting an operation mode of the universal serial bus device is executed.
本发明实施例的第三个方面提供一种基于通用串行总线的数据交互方法,包括:获取模式选择信号;根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;根据所选择的工作模式与终端设备建立通信连接;通过所述通信连接发送或者接收数据。A third aspect of the embodiments of the present invention provides a data exchange method based on a universal serial bus, including: acquiring a mode selection signal; and selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode; establishing a communication connection with the terminal device according to the selected working mode; transmitting or receiving data through the communication connection.
本发明实施例的第四个方面提供一种数据交互方法,包括:获取模式选择信号;根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;根据所选择的工作模式与终端设备建立通信连接;通过独立于所述通信连接的另外的通信链路获取数据;将所述数据通过所述通信连接传输至所述终端设备。A fourth aspect of the embodiments of the present invention provides a data interaction method, including: acquiring a mode selection signal; and selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode; Establishing a communication connection with the terminal device in accordance with the selected mode of operation; acquiring data via an additional communication link independent of the communication connection; transmitting the data to the terminal device over the communication connection.
本发明实施例的第五个方面提供一种用于选择通用串行总线设备的工作模式的设备,包括:至少一个处理器,所述至少一个处理器单独地或者共同地用于:获取模式选择信号;根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式。A fifth aspect of an embodiment of the present invention provides an apparatus for selecting an operation mode of a universal serial bus device, comprising: at least one processor, the at least one processor being used individually or collectively for: acquiring a mode selection a signal; selecting an operating mode of the universal serial bus device according to the mode selection signal, the working mode being a host mode or a device mode.
本发明实施例的第六个方面提供一种用于选择通用串行总线设备的工作模式的设备,包括:获取装置,用于获取模式选择信号;选择装置,用于根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式。A sixth aspect of the embodiments of the present invention provides an apparatus for selecting an operation mode of a universal serial bus device, comprising: acquiring means for acquiring a mode selection signal; and selecting means for selecting a signal according to the mode selection The operating mode of a universal serial bus device, the working mode being a host mode or a device mode.
本发明实施例的第七个方面提供一种通用串行总线设备,包括:至少一个连接接口,所述至少一个连接接口用于接入终端设备;至少一个处理器,所述至少一个处理器单独地或者共同地用于:获取模式选择信号;根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;根据所选择的工作模式与所述终端设备建立通信连接;通过所述通信连接发送或者接收数据。A seventh aspect of the embodiments of the present invention provides a universal serial bus device, including: at least one connection interface, the at least one connection interface is used for accessing a terminal device; at least one processor, the at least one processor is separate Or commonly used to: acquire a mode selection signal; select an operation mode of the universal serial bus device according to the mode selection signal, the operation mode is a host mode or a device mode; and the terminal device according to the selected working mode Establishing a communication connection; transmitting or receiving data over the communication connection.
本发明实施例的第八个方面提供一种通用串行总线设备,包括:至少两个连接接口,所述至少两个连接接口包括第一类连接接口和第二类连接接口;至少两个处理器,所述至少两个处理器包括与所述第一类连接接口相对应的第一类处理器和与所述第二类连接接口相对应的第二类处理器;其中,所述 第一类处理器和所述第一类连接接口的工作模式为主机模式,并且所述第二类处理器和所述第二类连接接口的工作模式为设备模式。An eighth aspect of the embodiments of the present invention provides a universal serial bus device, including: at least two connection interfaces, the at least two connection interfaces including a first type connection interface and a second type connection interface; at least two processing The at least two processors include a first type of processor corresponding to the first type of connection interface and a second type of processor corresponding to the second type of connection interface; wherein The working mode of the first type of processor and the first type of connection interface is a host mode, and the working mode of the second type of processor and the second type of connection interface is a device mode.
本发明实施例的第九个方面提供一种无人飞行器的遥控器,包括:通用串行总线设备,所述通用串行总线设备包括:至少一个连接接口,所述至少一个连接接口用于接入终端设备;至少一个处理器,所述至少一个处理器单独地或者共同地用于:获取模式选择信号;根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;根据所选择的工作模式与所述终端设备建立通信连接;通信设备,所述通信设备用于通过独立于所述通信连接的另外的通信链路获取数据;其中,所述至少一个处理器还用于:将所述数据通过所述通信连接传输至所述终端设备。A ninth aspect of the embodiments of the present invention provides a remote controller for an unmanned aerial vehicle, comprising: a universal serial bus device, the universal serial bus device comprising: at least one connection interface, wherein the at least one connection interface is used for connection Incoming terminal device; at least one processor, the at least one processor being used separately or collectively for: acquiring a mode selection signal; selecting an operating mode of the universal serial bus device according to the mode selection signal, the working mode being a host a mode or device mode; establishing a communication connection with the terminal device according to the selected mode of operation; a communication device for acquiring data through an additional communication link independent of the communication connection; wherein the at least A processor is further configured to: transmit the data to the terminal device over the communication connection.
本发明的实施例通过模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,当存在不同终端接入该通用串行总线设备时,通过切换通用串行总线设备的工作模式,保证终端设备与通用串行总线设备的数据交互。此外,本发明的实施例还避免了需要建立独立的无线传输路径的情况,并且有效地避免了对现有的无线通信的干扰。Embodiments of the present invention select a universal serial bus device to operate in a host mode or operate in a device mode by a mode selection signal, and switch the operation of the universal serial bus device when there are different terminals accessing the universal serial bus device. Mode to ensure data interaction between the terminal device and the universal serial bus device. Furthermore, embodiments of the present invention also avoid situations where it is necessary to establish an independent wireless transmission path, and effectively avoid interference with existing wireless communication.
附图说明DRAWINGS
图1为本发明实施例一提供的用于选择通用串行总线设备的工作模式的方法的流程示意图;1 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 1 of the present invention;
图2为本发明实施例二提供的用于选择通用串行总线设备的工作模式的方法的流程示意图;2 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 2 of the present invention;
图3为本发明实施例三提供的用于选择通用串行总线设备的工作模式的方法的流程示意图;3 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 3 of the present invention;
图4为本发明实施例四提供的用于选择通用串行总线设备的工作模式的方法的流程示意图;4 is a schematic flowchart diagram of a method for selecting an operation mode of a universal serial bus device according to Embodiment 4 of the present invention;
图5为本发明实施例五提供的用于选择通用串行总线设备的工作模式的方法的流程示意图;5 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 5 of the present invention;
图6为本发明实施例一提供的基于通用串行总线的数据交互方法的流程示意图;FIG. 6 is a schematic flowchart diagram of a data interaction method based on a universal serial bus according to Embodiment 1 of the present invention; FIG.
图7为本发明实施例二提供的基于通用串行总线的数据交互方法的流程 示意图;FIG. 7 is a flowchart of a data interaction method based on a universal serial bus according to Embodiment 2 of the present invention; schematic diagram;
图8为本发明实施例三提供的基于通用串行总线的数据交互方法的流程示意图;FIG. 8 is a schematic flowchart diagram of a data interaction method based on a universal serial bus according to Embodiment 3 of the present invention; FIG.
图9为本发明实施例一提供的数据交互方法的流程示意图;FIG. 9 is a schematic flowchart diagram of a data interaction method according to Embodiment 1 of the present invention;
图10为本发明又一实施例提供的用于选择通用串行总线设备的工作模式的设备的结构示意图;FIG. 10 is a schematic structural diagram of an apparatus for selecting an operation mode of a universal serial bus device according to another embodiment of the present invention; FIG.
图11为本发明实施例一提供的通用串行总线设备的结构示意图;11 is a schematic structural diagram of a universal serial bus device according to Embodiment 1 of the present invention;
图12为本发明实施例二提供的通用串行总线设备的结构示意图;12 is a schematic structural diagram of a universal serial bus device according to Embodiment 2 of the present invention;
图13为本发明实施例三提供的通用串行总线设备的结构示意图;FIG. 13 is a schematic structural diagram of a universal serial bus device according to Embodiment 3 of the present invention; FIG.
图14为本发明实施例四提供的通用串行总线设备的结构示意图;14 is a schematic structural diagram of a universal serial bus device according to Embodiment 4 of the present invention;
图15为本发明实施例提供的无人飞行器的遥控器的结构示意图。FIG. 15 is a schematic structural diagram of a remote controller of an unmanned aerial vehicle according to an embodiment of the present invention.
具体实施方式detailed description
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. The features of the embodiments and examples described below can be combined with each other without conflict.
实施例一Embodiment 1
图1为本发明实施例一提供的用于选择通用串行总线设备的工作模式的方法的流程示意图;参考附图1可知,本实施例提供了一种用于选择通用串行总线设备的工作模式的方法,包括:1 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 1 of the present invention. Referring to FIG. 1, the embodiment provides a method for selecting a universal serial bus device. Method of mode, including:
S1:获取模式选择信号;S1: acquiring a mode selection signal;
其中,本实施例对于模式选择信号的具体内容和具体类型不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如,可以将模式选择信号设置为包括:通用串行总线设备(以下简称USB设备)的连接接口的接入状态、开关信号或者预设的周期信号等等,只要能够实现通过上述的模式选择信号可以选择USB设备的工作模式即可,在此不再赘述。The specific content and specific type of the mode selection signal are not limited in this embodiment, and those skilled in the art may set according to specific design requirements. For example, the mode selection signal may be set to include: a universal serial bus device (below The access state, the switch signal, or the preset periodic signal of the connection interface of the USB device can be selected as long as the operation mode of the USB device can be selected through the above mode selection signal, and details are not described herein again.
S2:根据模式选择信号选择通用串行总线设备的工作模式,工作模式为主机模式或设备模式。S2: Select the working mode of the universal serial bus device according to the mode selection signal, and the working mode is the host mode or the device mode.
其中,对于具体根据模式选择信号选择USB设备的工作模式的分析过程不做限定,本领域技术人员可以根据具体的设计需求以及模式选择信号的不同而设置不同的分析策略,例如,可以将根据模式选择信号选择USB设备的 工作模式设置为:将模式选择信号在预设的数据库中查找相应的标准模式选择信号,其中,数据库中存储有标准模式选择信号与标准工作模式的映射关系,通过确定标准模式选择信号即可查找到标准工作模式,该标准工作模式即为要选择的USB设备的工作模式;当然的,本领域技术人员还可以采用其他的方式来选择USB设备的工作模式,只要能够快速、准确地确定USB设备的工作模式即可,在此不再赘述。The analysis process for selecting the working mode of the USB device according to the mode selection signal is not limited, and those skilled in the art may set different analysis strategies according to specific design requirements and different mode selection signals, for example, according to the mode. Select signal to select USB device The working mode is set to: the mode selection signal is searched for a corresponding standard mode selection signal in a preset database, wherein the database stores a mapping relationship between the standard mode selection signal and the standard working mode, and can be found by determining the standard mode selection signal. To the standard working mode, the standard working mode is the working mode of the USB device to be selected; of course, those skilled in the art can also use other methods to select the working mode of the USB device, as long as the USB device can be determined quickly and accurately. The working mode is OK, and will not be described here.
本实施例提供的用于选择通用串行总线设备的工作模式的方法,通过模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,当存在不同终端接入该通用串行总线设备时,通过切换通用串行总线设备的工作模式,保证终端设备与通用串行总线设备的数据交互。此外,本发明的实施例还避免了需要建立独立的无线传输路径的情况,并且有效地避免了对现有的无线通信的干扰。The method for selecting the working mode of the universal serial bus device provided by the embodiment, selects the universal serial bus device to work in the host mode or works in the device mode by using the mode selection signal, and when there are different terminals accessing the universal string When the bus device is connected, the data interaction between the terminal device and the universal serial bus device is ensured by switching the working mode of the universal serial bus device. Furthermore, embodiments of the present invention also avoid situations where it is necessary to establish an independent wireless transmission path, and effectively avoid interference with existing wireless communication.
实施例二Embodiment 2
图2为本发明实施例二提供的用于选择通用串行总线设备的工作模式的方法的流程示意图;在上述实施例的基础上,继续参考附图2可知,当将模式选择信号设置为包括通用串行总线设备的至少两个连接接口的接入状态时,进一步的,将获取模式选择信号设置为包括:2 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 2 of the present invention; on the basis of the foregoing embodiment, referring to FIG. 2, when the mode selection signal is set to include When the access status of at least two connection interfaces of the universal serial bus device is further, the acquisition mode selection signal is further set to include:
S11:获取通用串行总线设备的至少两个连接接口的接入状态。S11: Acquire an access status of at least two connection interfaces of the universal serial bus device.
本实施例中的通用串行总线设备包括至少两个连接接口,对于具体连接接口的个数不做限定,例如,可以将连接接口设置为两个、三个、四个以及五个等等,连接接口的具体个数可以根据具体的设计需求进行设置;另外,本实施例中的连接接口用于连接终端设备,其中,接入状态是指连接接口接入终端设备的状态,包括连接接口是否连接终端设备以及具体接入终端设备的连接接口;本实施例对于获取接入状态的具体实现过程不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如,可以通过检测通用串行总线设备中的每个连接接口处的数据流来确定接入状态,当某一连接接口的数据流不为零,则说明该连接接口连接有终端设备,并且与终端设备可以进行数据交互,此时,则可以确定该连接接口的接入状态为连接有终端设备。当然的,本领域技术人员还可以采用其他的方式来获取接入状态,只要能够准确获得通用串行总线设备的至少两个连接接口的接入状态即可,在此不再 赘述。The universal serial bus device in this embodiment includes at least two connection interfaces, and the number of the specific connection interfaces is not limited. For example, the connection interfaces may be set to two, three, four, five, and the like. The specific number of the connection interfaces may be set according to specific design requirements. In addition, the connection interface in this embodiment is used to connect the terminal device, where the access state refers to the state in which the connection interface accesses the terminal device, including whether the connection interface is The connection terminal device and the connection interface of the specific access terminal device; the specific implementation process for obtaining the access state in this embodiment is not limited, and those skilled in the art can set according to specific design requirements, for example, by detecting universal serial The data flow at each connection interface of the bus device determines the access status. When the data flow of a connection interface is not zero, the connection interface is connected to the terminal device, and the terminal device can perform data interaction. Then, it can be determined that the access state of the connection interface is that the terminal device is connected. Of course, those skilled in the art can also use other methods to obtain the access status, as long as the access status of at least two connection interfaces of the universal serial bus device can be accurately obtained. Narration.
在获取到通用串行总线设备的至少两个连接接口的接入状态之后,本实施例可以将根据模式选择信号选择通用串行总线设备的工作模式设置为包括:After acquiring the access status of the at least two connection interfaces of the universal serial bus device, the embodiment may set the operation mode of selecting the universal serial bus device according to the mode selection signal to include:
S21:响应于至少两个连接接口中的第一类连接接口上接入终端设备,选择主机模式作为通用串行总线设备的工作模式;S21: Select a host mode as an operating mode of the universal serial bus device in response to the access terminal device on the first type of the at least two connection interfaces;
响应于至少两个连接接口中的第二类连接接口上接入终端设备,选择设备模式作为通用串行总线设备的工作模式。The device mode is selected as the operating mode of the universal serial bus device in response to the access terminal device on the second type of connection interface of the at least two connection interfaces.
其中,本实施例中的至少两个连接接口中包括第一类连接接口,而对于第一类连接接口的具体接口类型不做限定,本领域技术人员可以根据具体的设计需求进行设置,可选地,可以将第一类连接接口设置为A型通用串行总线接口;当检测到第一类连接接口上接入终端设备时,则说明A型通用串行总线接口已经连接上终端设备,并且该A型通用串行总线接口可以与终端设备进行数据交互,此时则选择主机模式作为通用串行总线设备的工作模式,进而可以保证USB设备通过第一类连接接口与终端设备进行数据交互,保证了该用于选择通用串行总线设备的工作模式的方法使用的稳定可靠性。The at least two connection interfaces in the embodiment include the first type of connection interface, and the specific interface type of the first type of connection interface is not limited, and those skilled in the art can set according to specific design requirements, and are optional. The first type of connection interface can be set to the type A universal serial bus interface; when the access terminal device of the first type of connection interface is detected, the type A universal serial bus interface is connected to the terminal device, and The type A universal serial bus interface can perform data interaction with the terminal device. At this time, the host mode is selected as the working mode of the universal serial bus device, thereby ensuring that the USB device performs data interaction with the terminal device through the first type of connection interface. The stable reliability used by the method for selecting the operating mode of the universal serial bus device is guaranteed.
另外,本实施例中的至少两个连接接口中包括第二类连接接口,而对于第二类连接接口的具体接口类型不做限定,本领域技术人员可以根据具体的设计需求进行设置,可选地,可以将第二类连接接口设置为B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口;当检测到第二类连接接口上接入终端设备时,则说明B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口已经连接上终端设备,并且该第二类连接接口与终端设备进行数据交互,此时则选择主机模式作为通用串行总线设备的工作模式,进而可以保证USB设备通过第二类连接接口与终端设备进行数据交互,保证了该用于选择通用串行总线设备的工作模式的方法使用的稳定可靠性。In addition, at least two connection interfaces in the embodiment include a second type of connection interface, and the specific interface type of the second type of connection interface is not limited, and can be set according to specific design requirements, and can be selected by a person skilled in the art. The second type of connection interface can be set to a type B universal serial bus interface, a small universal serial bus interface or a micro universal serial bus interface; when the access terminal device is detected on the second type of connection interface, The B-type universal serial bus interface, the small universal serial bus interface or the micro universal serial bus interface has been connected to the terminal device, and the second type of connection interface performs data interaction with the terminal device. At this time, the host mode is selected as the universal string. The working mode of the bus device can ensure that the USB device performs data interaction with the terminal device through the second type of connection interface, thereby ensuring the stable reliability of the method for selecting the working mode of the universal serial bus device.
需要说明的是,本实施例对于第一类连接接口所接入的终端设备的设备类型不做限定,可选地,将第一类连接接口所接入的终端设备设置为基于Android操作系统和/或IOS操作系统的终端设备,此时,可以有效地保证工作在主机模式下的USB设备与终端设备进行数据交互;而对于第二类连接接口所接入的终端设备的设备类型不做限定,可选地,将第二类连接接口所接 入的终端设备设置为基于Windows操作系统和/或Linux操作系统的终端设备,此时,可以有效地保证工作在设备模式下的USB设备与终端设备进行数据交互。It should be noted that, in this embodiment, the device type of the terminal device that is connected to the first type of connection interface is not limited. Optionally, the terminal device that is connected to the first type of connection interface is set to be based on the Android operating system and / or the terminal device of the IOS operating system, in this case, the USB device working in the host mode can be effectively ensured to perform data interaction with the terminal device; and the device type of the terminal device accessed by the second type of connection interface is not limited. Optionally, the second type of connection interface is connected The terminal device is configured as a terminal device based on the Windows operating system and/or the Linux operating system. At this time, the USB device working in the device mode can be effectively ensured to perform data interaction with the terminal device.
本实施例中的用于选择通用串行总线设备的工作模式的方法,当USB设备包括至少两个连接接口时,通过至少两个连接接口的接入状态,根据接入状态选择USB设备的工作状态,具体的,当第一类连接接口接入终端设备时,选择主机模式作为USB设备的工作模式,当第二类连接接口接入终端设备时,则选择工作模式作为USB设备的工作模式,有效地保证了对USB设备工作模式选择的准确可靠性,确保了不同工作模式下的USB设备与接入的终端设备进行数据交互的稳定可靠性。The method for selecting the working mode of the universal serial bus device in this embodiment, when the USB device includes at least two connection interfaces, selects the working of the USB device according to the access state through the access state of the at least two connection interfaces. State, specifically, when the first type of connection interface is connected to the terminal device, the host mode is selected as the working mode of the USB device, and when the second type of connection interface is connected to the terminal device, the working mode is selected as the working mode of the USB device. The accuracy and reliability of the USB device working mode selection are effectively ensured, and the stability and reliability of data interaction between the USB device and the accessed terminal device in different working modes are ensured.
实施例三Embodiment 3
图3为本发明实施例三提供的用于选择通用串行总线设备的工作模式的方法的流程示意图,在上述实施例的基础上,继续参考附图3可知,当模式选择信号包括开关信号信号时,将获取模式选择信号设置为包括:3 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 3 of the present invention. On the basis of the foregoing embodiment, referring to FIG. 3, when the mode selection signal includes a switch signal signal, When the acquisition mode selection signal is set to include:
S12:获取开关信号,开关信号包括至少两个开关状态。S12: Acquire a switch signal, where the switch signal includes at least two switch states.
其中,开关信号为通过对预设的开关装置的执行动作的监测获取的,具体的,可以将获取开关信号设置为包括:The switch signal is obtained by monitoring the execution action of the preset switch device. Specifically, the acquisition switch signal may be set to include:
获取由硬件开关或软件开关产生的开关信号。Get the switching signal generated by the hardware switch or software switch.
其中,当对硬件开关或软件开关执行操作时,硬件开关或软件开关会产生相应的动作,从而产生开关信号,其中,对于开关信号所包括至少两个开关状态不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如,可以将两个开关状态设置为包括:开启状态和闭合状态、第一选择状态和第二选择状态等等。The hardware switch or the software switch generates a corresponding action when the hardware switch or the software switch performs an operation, thereby generating a switch signal, wherein the switch signal includes at least two switch states, which are not limited by those skilled in the art. The setting is set according to specific design requirements. For example, two switch states can be set to include: an open state and a closed state, a first selected state, a second selected state, and the like.
在获取到开关信号之后,本实施例可以将根据模式选择信号选择通用串行总线设备的工作模式设置为包括:After acquiring the switch signal, the embodiment may set the operation mode of selecting the universal serial bus device according to the mode selection signal to include:
S22:响应于开关信号为至少两个开关状态中的第一开关状态,选择主机模式作为通用串行总线设备的工作模式;S22: responsive to the switch signal being the first switch state of the at least two switch states, selecting the host mode as the working mode of the universal serial bus device;
响应于开关信号为至少两个开关状态中的第二开关状态,选择设备模式作为通用串行总线设备的工作模式。In response to the switch signal being the second of the at least two switch states, the device mode is selected as the mode of operation of the universal serial bus device.
其中,本实施例中的至少两个两个开关状态中包括第一开关状态,而对 于第一开关状态的具体内容和形式不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如:可以将第一开关状态设置为开启主机模式状态;当检测到开关信号为第一开关状态时,此时,为了保证USB设备与其他接入的终端设备进行数据交互,选择主机模式作为通用串行总线设备的工作模式。Wherein at least two of the two switch states in this embodiment include the first switch state, and The specific content and form of the first switch state are not limited, and those skilled in the art may set according to specific design requirements, for example, the first switch state may be set to the host mode state; when the switch signal is detected as the first In the switch state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the host mode is selected as the working mode of the universal serial bus device.
另外,本实施例中的至少两个两个开关状态中包括第二开关状态,而对于第二开关状态的具体内容和形式不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如:可以将第二开关状态设置为开启设备模式状态;当检测到开关信号为第二开关状态时,此时,为了保证USB设备与其他接入的终端设备进行数据交互,选择设备模式作为通用串行总线设备的工作模式,有效地保证了该用于选择通用串行总线设备的工作模式的方法使用的稳定可靠性。In addition, the second switch state is included in the at least two switch states in this embodiment, and the specific content and form of the second switch state are not limited, and those skilled in the art may set according to specific design requirements, for example, The second switch state can be set to the device mode state; when the switch signal is detected as the second switch state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the device mode is selected as the universal string. The mode of operation of the row bus device effectively ensures the stable reliability of the method used to select the mode of operation of the universal serial bus device.
实施例四Embodiment 4
图4为本发明实施例四提供的用于选择通用串行总线设备的工作模式的方法的流程示意图,在上述实施例的基础上,继续参考附图4可知,当模式选择信号包括预设的周期信号时,将获取模式选择信号设置为包括:4 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 4 of the present invention. On the basis of the foregoing embodiment, referring to FIG. 4, when the mode selection signal includes a preset For the periodic signal, the acquisition mode selection signal is set to include:
S13:获取周期信号,周期信号在单个周期中包括至少两个信号状态。S13: Acquire a periodic signal, and the periodic signal includes at least two signal states in a single cycle.
其中,周期信号为根据预先设置的周期所产生的,即此时的USB设备的工作模式是按照预设的工作周期进行选择的;本实施例对于获取周期信号的具体实现过程不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如,可以将获取周期信号设置为通过检测USB设备的工作时间以及预设周期信息获取,从而可以获取到周期信号;另外,对于本实施例中周期信号在单个周期中的至少两个信号状态的具体内容和类型不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如,可以将两个信号状态设置为包括前半周期信号状态和后半周期信号状态等等。The periodic signal is generated according to a preset period, that is, the working mode of the USB device at this time is selected according to a preset working period; the specific implementation process of acquiring the periodic signal is not limited in this embodiment. A person skilled in the art can set according to specific design requirements. For example, the acquisition cycle signal can be set to obtain the periodic signal by detecting the working time of the USB device and the preset period information, and in addition, for the cycle in this embodiment. The specific content and type of the signal in at least two signal states in a single cycle are not limited, and those skilled in the art can set according to specific design requirements. For example, two signal states can be set to include the first half cycle signal state and after. Half cycle signal status and more.
在获取到周期信号之后,本实施例可以将根据模式选择信号选择通用串行总线设备的工作模式设置为包括:After acquiring the periodic signal, the embodiment may set the working mode of selecting the universal serial bus device according to the mode selection signal to include:
S23:响应于周期信号为第一信号状态,选择主机模式作为通用串行总线设备的工作模式;S23: responsive to the periodic signal being the first signal state, selecting the host mode as the working mode of the universal serial bus device;
响应于周期信号为第二信号状态,选择设备模式作为通用串行总线设备的工作模式。 In response to the periodic signal being the second signal state, the device mode is selected as the operating mode of the universal serial bus device.
其中,本实施例中的至少两个信号状态中包括第一信号状态,而对于第一信号状态的具体内容和形式不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如:可以将第一信号状态设置为开启主机模式信号;当检测到周期信号为第一信号状态时,此时,为了保证USB设备与其他接入的终端设备进行数据交互,选择主机模式作为通用串行总线设备的工作模式。The at least two signal states in this embodiment include the first signal state, and the specific content and form of the first signal state are not limited, and those skilled in the art may set according to specific design requirements, for example, The first signal state is set to enable the host mode signal; when the periodic signal is detected as the first signal state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the host mode is selected as the universal serial bus. The working mode of the device.
另外,本实施例中的至少两个信号状态中包括第二信号状态,而对于第二信号状态的具体内容和形式不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如:可以将第二信号状态设置为开启主机模式信号;当检测到周期信号为第二信号状态时,此时,为了保证USB设备与其他接入的终端设备进行数据交互,选择设备模式作为通用串行总线设备的工作模式,有效地保证了该用于选择通用串行总线设备的工作模式的方法使用的稳定可靠性。In addition, the second signal state is included in the at least two signal states in the embodiment, and the specific content and form of the second signal state are not limited, and those skilled in the art may set according to specific design requirements, for example, The second signal state is set to enable the host mode signal; when the periodic signal is detected as the second signal state, at this time, in order to ensure data interaction between the USB device and other accessed terminal devices, the device mode is selected as the universal serial bus. The mode of operation of the device effectively ensures the stable reliability of the method used to select the mode of operation of the universal serial bus device.
实施例五Embodiment 5
图5为本发明实施例五提供的用于选择通用串行总线设备的工作模式的方法的流程示意图,在上述实施例的基础上,继续参考附图5可知,本实施例中将预设的周期信号设置为对于USB设备而言,该单个周期内可以根据周期信号进行一次切换模式操作,即当USB设备工作在主机模式时,当在单个周期内接收到周期信号之后,则使得USB设备由主机模式切换为设备模式;或者,当USB设备工作在设备模式时,当在单个周期内接收到周期信号之后,则使得USB设备由设备模式切换为主机模式;当然的,本领域技术人员还可以进行设置为其他选择方法,可选地,可以将根据模式选择信号选择通用串行总线设备的工作模式设置为包括:FIG. 5 is a schematic flowchart of a method for selecting an operation mode of a universal serial bus device according to Embodiment 5 of the present invention. On the basis of the foregoing embodiment, referring to FIG. 5, the preset The periodic signal is set to be a switching mode operation according to the periodic signal for the USB device, that is, when the USB device operates in the host mode, when the periodic signal is received in a single cycle, the USB device is caused by The host mode is switched to the device mode; or, when the USB device operates in the device mode, after receiving the periodic signal in a single cycle, the USB device is switched from the device mode to the host mode; of course, those skilled in the art can also The setting is set to another selection method. Alternatively, the operation mode of selecting the universal serial bus device according to the mode selection signal may be set to include:
S24:在周期信号的前半个周期中,选择主机模式作为通用串行总线设备的工作模式;S24: in the first half of the periodic signal, selecting the host mode as the working mode of the universal serial bus device;
在周期信号的后半个周期中,选择设备模式作为通用串行总线设备的工作模式。In the second half of the periodic signal, the device mode is selected as the operating mode of the universal serial bus device.
其中,在单个周期内,周期信号包括前半个周期和后半个周期,在周期信号的前半个周期中时,则选择主机模式作为USB设备的工作模式;当在周期信号的后半个周期中时,则选择设备模式作为USB设备的工作模式,此时USB设备由主机设备自动切换至设备模式,以保证USB设备与其他终端设备 进行数据交互,提高了选择USB设备工作模式的灵活程度,进而提高了该用于选择通用串行总线设备的工作模式的方法的实用性,有利于市场的推广与应用。Wherein, in a single cycle, the periodic signal includes the first half period and the second half period, and in the first half period of the periodic signal, the host mode is selected as the working mode of the USB device; when in the second half of the periodic signal When the device mode is selected as the working mode of the USB device, the USB device is automatically switched from the host device to the device mode to ensure the USB device and other terminal devices. The data interaction improves the flexibility of selecting the working mode of the USB device, thereby improving the practicability of the method for selecting the working mode of the universal serial bus device, and is beneficial to the promotion and application of the market.
实施例六Embodiment 6
本实施例提供了一种存储介质,该存储介质内存储有程序代码,当程序代码运行时,会执行上述实施例一-实施例五中任意一项实施例的用于选择通用串行总线设备的工作模式的方法。The embodiment provides a storage medium, where the program code is stored, and when the program code is running, the universal serial bus device for selecting a universal serial bus device according to any one of the foregoing embodiments 1 - 5 is executed. The way of working mode.
本实施例中存储介质所执行的用于选择通用串行总线设备的工作模式的方法的具体实现过程以及实现效果与上述实施例一-实施例五中用于选择通用串行总线设备的工作模式的方法的具体实现过程以及实现效果相同,具体可参考上述陈述内容,在此不再赘述。The specific implementation process and the implementation effect of the method for selecting the working mode of the universal serial bus device performed by the storage medium in this embodiment are the same as the working mode for selecting the universal serial bus device in the first embodiment to the fifth embodiment. The specific implementation process and the implementation effect of the method are the same. For details, refer to the above statement, and details are not described herein again.
本实施例提供的存储介质,通过模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,当存在不同终端接入该通用串行总线设备时,通过切换通用串行总线设备的工作模式,充分地利用的通用串行总线设备的模式切换功能,即可保证终端设备与通用串行总线设备的数据交互,避免了还需要建立独立的无线传输路径的情况,有效地降低了信号干扰程度;同时也实现了基于通用串行总线设备可以与多种类型的终端设备建立通信连接,有效地提高了该存储介质的实用性,有利于市场的推广与应用。The storage medium provided in this embodiment selects a universal serial bus device to work in a host mode or works in a device mode through a mode selection signal, and when a different terminal accesses the universal serial bus device, by switching the universal serial bus The working mode of the device and the mode switching function of the universal serial bus device can be fully utilized to ensure data interaction between the terminal device and the universal serial bus device, thereby avoiding the need to establish an independent wireless transmission path, thereby effectively reducing the situation. The degree of signal interference is also realized. At the same time, the universal serial bus device can establish communication connection with various types of terminal devices, which effectively improves the practicability of the storage medium and is beneficial to the promotion and application of the market.
实施例七Example 7
图6为本发明实施例一提供的基于通用串行总线的数据交互方法的流程示意图;参考附图6可知,本实施例提供了一种基于通用串行总线的数据交互方法,该数据交互方法用于实现通用串行总线设备与终端设备进行数据交互,具体的,该方法包括:FIG. 6 is a schematic flowchart of a data exchange method based on a universal serial bus according to Embodiment 1 of the present invention. Referring to FIG. 6, the embodiment provides a data interaction method based on a universal serial bus, and the data interaction method is provided. It is used to implement data interaction between the universal serial bus device and the terminal device. Specifically, the method includes:
S101:获取模式选择信号;S101: Acquire a mode selection signal;
S102:根据模式选择信号选择通用串行总线设备的工作模式,工作模式为主机模式或设备模式;S102: Select an operating mode of the universal serial bus device according to the mode selection signal, and the working mode is a host mode or a device mode;
本实施例中步骤S101-S102的具体实现过程以及实现效果与上述实施例一中步骤S1-S2的具体实现过程以及实现效果,具体可参考上述陈述内容,在此不再赘述。For the specific implementation process and the implementation of the steps S101-S102 in the embodiment, and the specific implementation process and the implementation effect of the steps S1-S2 in the first embodiment, reference may be made to the above description, and details are not described herein again.
S103:根据所选择的工作模式与终端设备建立通信连接; S103: Establish a communication connection with the terminal device according to the selected working mode.
在选择USB设备的工作模式之后,将USB设备按照所选择的工作模式与终端设备建立通信连接,此时,可以有效地保证USB设备与终端设备之间进行正常的数据交互。After selecting the working mode of the USB device, the USB device establishes a communication connection with the terminal device according to the selected working mode. At this time, normal data interaction between the USB device and the terminal device can be effectively ensured.
S104:通过通信连接发送或者接收数据。S104: Send or receive data through a communication connection.
建立通信连接之后,USB设备可以与终端设备进行数据交互,其中,数据交互的过程包括:USB设备向终端设备发送数据、USB设备接收终端设备所发送的数据,以上具体的数据交互方式可以根据具体的设计需求进行设置,只要能够有效地保证终端设备与USB设备之间通过所建立的通信连接可以发送或者接收数据即可,在此不再赘述。After the communication connection is established, the USB device can perform data interaction with the terminal device, where the data interaction process includes: the USB device sends data to the terminal device, and the USB device receives the data sent by the terminal device, and the specific data interaction manner can be determined according to the specific The design requirements are set as long as the data can be sent or received through the established communication connection between the terminal device and the USB device, and will not be described here.
本实施例提供的基于通用串行总线的数据交互方法,通过模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,在确认工作模式之后,根据所选择的工作模式与终端设备建立通信连接,进而可以使得终端设备与通用串行总线设备之间通过通信连接发送或者接收数据,实现了基于通用串行总线设备可以与多种类型的终端设备建立通信连接;避免了还需要建立独立的无线传输路径的情况,方便终端设备与通用串行总线设备进行通信连接,有效地降低了信号干扰程度,保证了终端设备与通用串行总线设备之间数据交互的正常进行,有效地提高了该方法的实用性,有利于市场的推广与应用。The universal serial bus-based data interaction method provided by the embodiment selects the universal serial bus device to work in the host mode or in the device mode by using the mode selection signal, and after confirming the working mode, according to the selected working mode and The terminal device establishes a communication connection, thereby enabling the terminal device and the universal serial bus device to transmit or receive data through the communication connection, thereby realizing that the universal serial bus device can establish a communication connection with the plurality of types of terminal devices; It is necessary to establish an independent wireless transmission path, which facilitates the communication connection between the terminal device and the universal serial bus device, effectively reduces the degree of signal interference, and ensures the normal interaction of data interaction between the terminal device and the universal serial bus device, and is effective. The method improves the practicability of the method and is beneficial to the promotion and application of the market.
实施例八Example eight
图7为本发明实施例二提供的基于通用串行总线的数据交互方法的流程示意图,在上述实施例的基础上,继续参考附图6-7可知,本实施例对于根据选择的工作模式与终端设备建立通信连接的具体实现过程不做限定,本领域技术人员可以根据具体的设计需求进行设置,其中,可选地,将根据选择的工作模式与终端设备建立通信连接设置为包括:FIG. 7 is a schematic flowchart of a data exchange method based on a universal serial bus according to Embodiment 2 of the present invention. Based on the foregoing embodiment, with reference to FIG. 6-7, the present embodiment is related to the selected working mode. The specific implementation process of the terminal device to establish a communication connection is not limited, and can be set by a person skilled in the art according to specific design requirements. Optionally, the communication connection with the terminal device according to the selected working mode is set to include:
S1031:在所选择的工作模式中探测终端设备;S1031: Detecting the terminal device in the selected working mode;
在选择通用串行总线设备的工作模式之后,在通用串行总线设备工作在相应的工作模式时探测终端设备,本实施例对于具体探测终端设备的具体实现方式不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如:可以检测工作在所选择的工作模式下的通用串行总线设备的信号变化,例如变压是否发生变化或者信号是否发生上升沿变化等等,只要能准确地探测终 端设备即可,在此不再赘述。After the working mode of the universal serial bus device is selected, the terminal device is detected when the universal serial bus device operates in the corresponding working mode. The specific implementation manner of the specific detecting terminal device is not limited in this embodiment, and those skilled in the art may Set according to specific design requirements, for example, it can detect the signal change of the universal serial bus device working in the selected working mode, such as whether the voltage change changes or whether the signal has a rising edge change, etc., as long as it can accurately Detection end The end device can be used, and will not be described here.
S1032:响应于探测到终端设备,与终端设备建立通信连接。S1032: Establish a communication connection with the terminal device in response to detecting the terminal device.
当工作在所选择工作模式下的通用串行总线设备探测到终端设备时,说明此时的通用串行总线设备已经识别到终端设备,并且可以与终端设备建立通信连接,其中,建立通信连接是用于实现通用串行总线设备与所连接的终端设备之间可以进行数据交互,具体的,包括发送数据或者接收数据的过程。When the universal serial bus device operating in the selected working mode detects the terminal device, it indicates that the universal serial bus device has recognized the terminal device at this time, and can establish a communication connection with the terminal device, wherein the establishment of the communication connection is It is used to implement data interaction between the universal serial bus device and the connected terminal device, and specifically includes a process of transmitting data or receiving data.
通过上述在所选择的工作模式中探测终端设备,当探测到终端设备之后,与终端设备建立通信连接,有效地保证了根据所选择的工作模式与终端设备建立通信连接的稳定可靠性,有效地保证了终端设备与通用串行总线设备之间进行正常的数据交互,进一步提高了该方法使用的稳定可靠性。By detecting the terminal device in the selected working mode, after establishing the terminal device, establishing a communication connection with the terminal device, effectively ensuring stable communication reliability of establishing a communication connection with the terminal device according to the selected working mode, effectively The normal data interaction between the terminal device and the universal serial bus device is ensured, which further improves the stability and reliability of the method.
实施例九Example nine
图8为本发明实施例三提供的基于通用串行总线的数据交互方法的流程示意图,在上述实施例的基础上,继续参考附图8可知,在响应于探测到终端设备,与终端设备建立通信连接之后,该方法还包括:FIG. 8 is a schematic flowchart of a data exchange method based on a universal serial bus according to Embodiment 3 of the present invention. On the basis of the foregoing embodiment, referring to FIG. 8 , it is known that the terminal device is established in response to detecting the terminal device. After the communication connection, the method further includes:
S1033:响应于与终端设备建立通信连接,中止探测过程;S1033: aborting the detecting process in response to establishing a communication connection with the terminal device;
由于已经探测到终端设备,并且与所探测到的终端设备已经建立通信连接,此时,为了提高数据交互的效率和质量,可以中止探测过程,进而降低了数据处理所需要的数据资源,提高了终端设备与通信串行接口设备之间进行数据交互的效率,进而有效地提高了该方法的实用性。Since the terminal device has been detected and a communication connection has been established with the detected terminal device, in order to improve the efficiency and quality of the data interaction, the detection process can be suspended, thereby reducing the data resources required for data processing, and improving the data resource. The efficiency of data interaction between the terminal device and the communication serial interface device effectively improves the practicability of the method.
此外,在终端设备与通信串行接口设备进行数据交互完毕后,还可以将方法设置为包括:In addition, after the terminal device performs data interaction with the communication serial interface device, the method may also be set to include:
S1034:响应于与终端设备断开通信连接,恢复探测过程。S1034: Resume the detection process in response to disconnecting the communication connection with the terminal device.
当检测到通用串行接口设备与终端设备断开通信连接时,则说明该终端设备与通用串行接口设备之间的数据交互操作已经完毕,此时,可以断开该终端设备与通用串行接口设备之间的通信连接,继续探测其他终端设备是否可以与通用串行接口设备建立通信连接,有效地实现了通用串行接口设备与多个终端设备之间进行数据交互,进一步提高了该方法的实用性,有利于市场的推广与应用。When it is detected that the universal serial interface device disconnects the communication connection with the terminal device, it indicates that the data interaction operation between the terminal device and the universal serial interface device has been completed, and at this time, the terminal device and the universal serial can be disconnected. The communication connection between the interface devices continues to detect whether other terminal devices can establish a communication connection with the universal serial interface device, thereby effectively implementing data interaction between the universal serial interface device and the plurality of terminal devices, and further improving the method The practicality is conducive to the promotion and application of the market.
实施例十Example ten
图9为本发明实施例一提供的数据交互方法的流程示意图;参考附图9 可知,本实施例提供了一种数据交互方法,该数据交互方法用于实现终端设备通过通用串行总线设备与第三方设备进行数据交互的过程,其中,第三方设备可以为无人飞行器,具体的,该方法包括:FIG. 9 is a schematic flowchart of a data interaction method according to Embodiment 1 of the present invention; FIG. 9 It can be seen that the data interaction method is used to implement a data interaction process between a terminal device and a third-party device through a universal serial bus device, where the third-party device can be an unmanned aerial vehicle, specifically The method includes:
S201:获取模式选择信号;S201: Acquire a mode selection signal;
S202:根据模式选择信号选择通用串行总线设备的工作模式,工作模式为主机模式或设备模式;S202: Select an operating mode of the universal serial bus device according to the mode selection signal, and the working mode is a host mode or a device mode;
S203:根据所选择的工作模式与终端设备建立通信连接;S203: Establish a communication connection with the terminal device according to the selected working mode.
本实施例中步骤S201-S203的具体实现过程以及实现效果与上述实施例七中步骤S101-S103的具体实现过程以及实现效果,具体可参考上述陈述内容,在此不再赘述。For the specific implementation process and the implementation of the steps S201-S203 in the embodiment, and the specific implementation process and the implementation of the steps S101-S103 in the foregoing seventh embodiment, reference may be made to the foregoing content, and details are not described herein again.
S204:通过独立于所述通信连接的另外的通信链路获取数据;S204: Acquire data through another communication link that is independent of the communication connection;
其中,通信连接为通用串行总线设备与终端设备之间所建立的通信连接,而本实施例中的通信链路为与上述通信连接完全不同的数据链路,即该通信链路的数据交互过程与上述的通信连接的数据交互过程完全独立;本实施例中可以通过该通信链路获取数据,本实施例对于数据的具体内容不做限定,本领域技术人员可以根据具体的设计需求进行设置,可选地,可以将数据设置为包括:图像数据和飞行数据,进而使得通信串行总线设备通过上述通信链路可以快速、准确地获取到图像数据和飞行数据,其中,图像数据和飞行数据可以为无人飞行器通过上述通信链路发送至通信串行总线设备处。The communication connection is a communication connection established between the universal serial bus device and the terminal device, and the communication link in this embodiment is a completely different data link from the communication connection, that is, the data interaction of the communication link. The data interaction process of the foregoing communication connection is completely independent; in this embodiment, the data can be obtained through the communication link. The specific content of the data is not limited in this embodiment, and those skilled in the art can set according to specific design requirements. Optionally, the data may be set to include: image data and flight data, thereby enabling the communication serial bus device to quickly and accurately acquire image data and flight data through the communication link, wherein the image data and the flight data The unmanned aerial vehicle can be sent to the communication serial bus device via the above communication link.
S205:将数据通过通信连接传输至终端设备。S205: Transmit data to the terminal device through a communication connection.
当获取到数据信息之后,该通信串行总线设备通过与终端设置之间所建立的通信连接,将数据传输至终端设备,进而使得终端设备可以快速、准确地获取到图像数据和飞行数据,便于用户通过该终端数据对图像数据和飞行数据进行分析和查阅,提高了该方法的实用性。After acquiring the data information, the communication serial bus device transmits the data to the terminal device through a communication connection established with the terminal setting, thereby enabling the terminal device to quickly and accurately acquire image data and flight data, which is convenient. The user analyzes and consults the image data and flight data through the terminal data, which improves the practicability of the method.
本实施例提供的数据交互方法,通过模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,在确认工作模式之后,根据所选择的工作模式与终端设备建立通信连接,进而可以使得终端设备与通用串行总线设备之间通过通信连接发送或者接收数据,进一步的,通过独立于通信连接的另外的通信链路获取数据,并可以将获取的数据通过上述通信连接发送至终端设备处;避免了还需要建立独立的无线传输路径的情况,有效地 降低了信号干扰程度;方便并保证了终端设备与无人飞行器和通用串行总线设备进行通信连接,保证了终端设备与无人飞行器和通用串行总线设备之间数据交互的正常进行,有效地提高了该方法的实用性,有利于市场的推广与应用。The data interaction method provided in this embodiment selects the universal serial bus device to work in the host mode or works in the device mode by using the mode selection signal, and after confirming the working mode, establish a communication connection with the terminal device according to the selected working mode. Further, the terminal device and the universal serial bus device can transmit or receive data through a communication connection. Further, data is acquired through another communication link independent of the communication connection, and the acquired data can be sent to the communication connection through the communication connection. At the terminal device; avoiding the need to establish an independent wireless transmission path, effectively The degree of signal interference is reduced; the terminal device is communicably connected with the UAV and the universal serial bus device, and the data interaction between the terminal device and the UAV and the universal serial bus device is ensured, and the data is effectively performed. The practicality of the method is improved, which is beneficial to the promotion and application of the market.
实施例十一 Embodiment 11
在上述实施例的基础上,继续参考附图9可知,本实施例对于通过独立于通信连接的另外的通信链路获取数据的具体实现过程不做限定,可选地,将通过独立于通信连接的另外的通信链路获取数据设置为包括:通过无线链路获取数据。On the basis of the foregoing embodiments, with reference to FIG. 9, the specific implementation process of acquiring data by using another communication link independent of the communication connection is not limited, and optionally, the communication connection is independent. The additional communication link acquisition data is set to include: acquiring data over the wireless link.
其中,无线链路可以为Wi-Fi链路或者蓝牙链路等等,进一步的,本实施还可以将通过无线链路获取数据设置为包括:通过无人飞行器和无人飞行器的遥控器之间的无线链路获取数据。The wireless link may be a Wi-Fi link or a Bluetooth link, etc. Further, the implementation may also set the data acquired through the wireless link to include: passing between the unmanned aerial vehicle and the unmanned aerial vehicle remote controller The wireless link acquires data.
其中,所建立的无线链路为无人飞行器与无人飞行器的遥控器之间的通信连接,即在无人飞行器运行过程中,无人飞行器会记录无人飞行器的运行数据,即为上述的数据,无人飞行器的遥控器通过该上述无线链路可以从无人飞行器处获取数据,然后无人飞行器的遥控器可以通过与终端设备建立的通信连接将所获取的数据发送至终端设备处,进而有效地保证终端设备可以准确、有效地获取到无人飞行器的数据信息,便于用户对数据信息查阅和分析操作,进一步提高了该方法的实用性。Wherein, the established wireless link is a communication connection between the unmanned aerial vehicle and the remote controller of the unmanned aerial vehicle, that is, during the operation of the unmanned aerial vehicle, the unmanned aerial vehicle records the operational data of the unmanned aerial vehicle, that is, the above Data, the remote controller of the UAV can obtain data from the unmanned aerial vehicle through the wireless link, and then the remote controller of the UAV can transmit the acquired data to the terminal device through a communication connection established with the terminal device. Furthermore, it is effective to ensure that the terminal device can accurately and efficiently acquire the data information of the UAV, and facilitate the user to access and analyze the data information, thereby further improving the practicability of the method.
实施例十二Example twelve
本实施例提供了一种用于选择通用串行总线设备的工作模式的设备,包括:至少一个处理器,至少一个处理器单独地或者共同地用于:The present embodiment provides an apparatus for selecting an operating mode of a universal serial bus device, comprising: at least one processor, at least one of which is used individually or collectively for:
获取模式选择信号;Obtaining a mode selection signal;
根据模式选择信号选择通用串行总线设备的工作模式,工作模式为主机模式或设备模式。The working mode of the universal serial bus device is selected according to the mode selection signal, and the working mode is the host mode or the device mode.
需要说明的是,本实施例中的一个或多个处理器包括但不限于微处理器(英文:microcontroller),精简指令集计算机(英文:reduced instruction set computer,简称:RISC),专用集成电路(英文:application specific integrated circuits,简称:ASIC),专用指令集处理器(英文:application-specific instruction-set processor,简称:ASIP),中央处理单元(英文:central processing  unit,简称:CPU),物理处理器英文(英文:physics processing unit,简称:PPU),数字信号处理器(英文:digital signal processor,简称DSP),现场可编程门阵列(英文:field programmable gate array,简称:FPGA)等。It should be noted that one or more processors in this embodiment include, but are not limited to, a microprocessor (English: microcontroller), a reduced instruction set computer (English: reduced RISC), an application specific integrated circuit ( English: application specific integrated circuits (ASIC), application-specific instruction-set processor (ASIP), central processing unit (English: central processing) Unit, referred to as: CPU), physical processor English (English: physics processing unit, referred to as: PPU), digital signal processor (English: digital signal processor, referred to as DSP), field programmable gate array (English: field programmable gate array , referred to as: FPGA) and so on.
另外,本实施例中处理器所能实现的操作步骤的具体实现过程以及实现效果与上述实施例一中步骤S1-S2的具体实现过程以及实现效果相同,具体可参考上述陈述内容,在此不再赘述。In addition, the specific implementation process and the implementation effect of the operation steps that can be implemented by the processor in this embodiment are the same as the specific implementation process and the implementation effect of the steps S1-S2 in the first embodiment, and the specific content may be referred to herein. Let me repeat.
本实施例提供的一种用于选择通用串行总线设备的工作模式的设备,处理器通过模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,充分地利用的通用串行总线设备的模式切换功能,当存在不同终端接入该通用串行总线设备时,通过切换通用串行总线设备的工作模式,即可保证终端与通用串行总线设备的数据交互,避免了还需要建立独立的无线传输路径的情况,方便其他终端设备与通用串行总线设备进行通信连接,保证了终端设备与通用串行总线设备之间数据交互的正常进行,有效地提高了该设备的实用性,有利于市场的推广与应用。The embodiment provides a device for selecting an operating mode of a universal serial bus device, and the processor selects a universal serial bus device to work in a host mode or works in a device mode through a mode selection signal, and fully utilizes a universal The mode switching function of the serial bus device can ensure the data interaction between the terminal and the universal serial bus device by switching the working mode of the universal serial bus device when different terminals are connected to the universal serial bus device, thereby avoiding the data interaction between the terminal and the universal serial bus device. It is also necessary to establish an independent wireless transmission path to facilitate communication connection between other terminal devices and the universal serial bus device, thereby ensuring normal data interaction between the terminal device and the universal serial bus device, and effectively improving the device. Practicality is conducive to the promotion and application of the market.
实施例十三Example thirteen
在上述实施例的基础上,本实施例中的至少一个处理器,用于执行上述实施例二-实施例五中任意一项的用于选择通用串行总线设备的工作模式的方法的步骤,本实施例中处理器所执行的具体步骤的实现过程和实现效果可参考上述实施例二-实施例五中的描述内容,在此不再赘述。On the basis of the foregoing embodiment, at least one processor in this embodiment is configured to perform the steps of the method for selecting an operation mode of a universal serial bus device according to any one of the foregoing second embodiment to fifth embodiment, For the implementation process and the implementation of the specific steps performed by the processor in this embodiment, reference may be made to the description in the foregoing Embodiment 2 - Embodiment 5, and details are not described herein again.
实施例十四Embodiment 14
图10为本发明又一实施例提供的用于选择通用串行总线设备的工作模式的设备的结构示意图,参考附图10可知,本实施例提供了一种用于选择通用串行总线设备的工作模式的设备,具体的,该设备包括:FIG. 10 is a schematic structural diagram of an apparatus for selecting an operation mode of a universal serial bus device according to another embodiment of the present invention. Referring to FIG. 10, the embodiment provides a device for selecting a universal serial bus device. The working mode of the device, specifically, the device includes:
获取装置11,用于获取模式选择信号;The acquiring device 11 is configured to acquire a mode selection signal;
选择装置12,用于根据模式选择信号选择通用串行总线设备的工作模式,工作模式为主机模式或设备模式。The selecting device 12 is configured to select an operating mode of the universal serial bus device according to the mode selection signal, and the working mode is a host mode or a device mode.
本实施例对于获取装置11和选择装置12的具体形状结构不做限定,本领域技术人员可以根据其实现的具体操作步骤进行任意设置,在此不再赘述;另外,本实施例中的获取装置11和选择装置12所实现操作步骤的具体实现过程以及实现效果与上述实施例一中步骤S1-S2的具体实现过程以及实现效 果相同,具体可参考上述陈述内容,在此不再赘述。The specific shape and structure of the obtaining device 11 and the selecting device 12 are not limited in this embodiment, and those skilled in the art can perform any setting according to the specific operation steps implemented by the present invention, and details are not described herein again. In addition, the acquiring device in this embodiment is not described herein. 11 and the specific implementation process and implementation effect of the operation steps implemented by the selection device 12 and the specific implementation process and the implementation effect of the steps S1-S2 in the first embodiment For the same, please refer to the above statement for details, and details are not described herein again.
本实施例提供的用于选择通用串行总线设备的工作模式的设备,具体的,通过获取装置11获取到模式选择信号,选择装置12根据模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,充分地利用的通用串行总线设备的模式切换功能,当存在不同终端接入该通用串行总线设备时,通过切换通用串行总线设备的工作模式,即可保证终端与通用串行总线设备的数据交互,避免了还需要建立独立的无线传输路径的情况,方便其他终端设备与通用串行总线设备进行通信连接,保证了终端设备与通用串行总线设备之间数据交互的正常进行,有效地提高了该设备的实用性,有利于市场的推广与应用。The device for selecting the working mode of the universal serial bus device provided by the embodiment, specifically, the mode selection signal is acquired by the obtaining device 11, and the selecting device 12 selects the universal serial bus device to operate in the host mode according to the mode selection signal. Or working in the device mode, fully utilizing the mode switching function of the universal serial bus device, when there are different terminals accessing the universal serial bus device, the terminal can be guaranteed by switching the working mode of the universal serial bus device The data interaction with the universal serial bus device avoids the need to establish an independent wireless transmission path, facilitates the communication connection between other terminal devices and the universal serial bus device, and ensures the data between the terminal device and the universal serial bus device. The normal operation of the interaction effectively improves the practicability of the device and is beneficial to the promotion and application of the market.
实施例十五Example fifteen
在上述实施例的基础上,继续参考附图10可知,当将模式选择信号设置为包括通用串行总线设备的至少两个连接接口的接入状态时,进一步的,将获取装置11设置为用于:Based on the above embodiment, with continued reference to FIG. 10, when the mode selection signal is set to include the access state of at least two connection interfaces of the universal serial bus device, further, the acquisition device 11 is set to be used. to:
获取通用串行总线设备的至少两个连接接口的接入状态。Obtaining access status of at least two connection interfaces of the universal serial bus device.
在获取到通用串行总线设备的至少两个连接接口的接入状态之后,本实施例可以将选择装置12设置为用于:After acquiring the access status of at least two connection interfaces of the universal serial bus device, the present embodiment may set the selection device 12 to:
响应于至少两个连接接口中的第一类连接接口上接入终端设备,选择主机模式作为通用串行总线设备的工作模式;Selecting a host mode as an operating mode of the universal serial bus device in response to the access terminal device on the first type of connection interface of the at least two connection interfaces;
响应于至少两个连接接口中的第二类连接接口上接入终端设备,选择设备模式作为通用串行总线设备的工作模式。The device mode is selected as the operating mode of the universal serial bus device in response to the access terminal device on the second type of connection interface of the at least two connection interfaces.
其中,需要说明的是,第一类连接接口为A型通用串行总线接口,第二类连接接口为B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口。Among them, it should be noted that the first type of connection interface is a type A universal serial bus interface, and the second type of connection interface is a type B universal serial bus interface, a small universal serial bus interface or a micro universal serial bus interface.
本实施例中的获取装置11和选择装置12所实现操作步骤的具体实现过程以及实现效果与上述实施例二中步骤S11、S21的具体实现过程以及实现效果相同,具体可参考上述陈述内容,在此不再赘述。The specific implementation process and the implementation effect of the operation steps of the obtaining device 11 and the selecting device 12 in this embodiment are the same as the specific implementation processes and the implementation effects of the steps S11 and S21 in the second embodiment. For details, refer to the above statement. This will not be repeated here.
本实施例中的用于选择通用串行总线设备的工作模式的设备,当USB设备包括至少两个连接接口时,通过至少两个连接接口的接入状态,根据接入状态选择USB设备的工作状态,具体的,当第一类连接接口接入终端设备时, 选择装置12选择主机模式作为USB设备的工作模式,当第二类连接接口接入终端设备时,选择装置12则选择工作模式作为USB设备的工作模式,有效地保证了对USB设备工作模式选择的准确可靠性,确保了不同工作模式下的USB设备与接入的终端设备进行数据交互的稳定可靠性。The device for selecting the working mode of the universal serial bus device in this embodiment, when the USB device includes at least two connection interfaces, selects the working of the USB device according to the access state through the access state of the at least two connection interfaces. State, specifically, when the first type of connection interface is connected to the terminal device, The selecting device 12 selects the host mode as the working mode of the USB device. When the second type of connection interface accesses the terminal device, the selecting device 12 selects the working mode as the working mode of the USB device, thereby effectively ensuring the selection of the operating mode of the USB device. Accurate reliability ensures stable and reliable data interaction between USB devices and connected terminal devices in different working modes.
实施例十六Example sixteen
在上述实施例的基础上,继续参考附图10可知,当模式选择信号包括开关信号信号时,进一步的,将获取装置11设置为用于:Based on the above embodiment, with continued reference to FIG. 10, when the mode selection signal includes the switching signal signal, further, the obtaining device 11 is configured to:
获取开关信号,开关信号包括至少两个开关状态。The switching signal is obtained, and the switching signal includes at least two switching states.
进一步的,可以获取装置11设置为用于:Further, the obtainable device 11 is configured to:
获取由硬件开关或软件开关产生的开关信号。Get the switching signal generated by the hardware switch or software switch.
在获取到开关信号之后,本实施例可以将选择装置12设置为用于:After acquiring the switching signal, the present embodiment can set the selection device 12 to:
响应于开关信号为至少两个开关状态中的第一开关状态,选择主机模式作为通用串行总线设备的工作模式;Selecting a host mode as an operating mode of the universal serial bus device in response to the switch signal being the first one of the at least two switch states;
响应于开关信号为至少两个开关状态中的第二开关状态,选择设备模式作为通用串行总线设备的工作模式。In response to the switch signal being the second of the at least two switch states, the device mode is selected as the mode of operation of the universal serial bus device.
本实施例中的获取装置11和选择装置12所实现操作步骤的具体实现过程以及实现效果与上述实施例三中步骤S12、S22的具体实现过程以及实现效果相同,具体可参考上述陈述内容,在此不再赘述。The specific implementation process and the implementation effect of the operation steps implemented by the obtaining device 11 and the selecting device 12 in this embodiment are the same as the specific implementation processes and implementation effects of the steps S12 and S22 in the third embodiment, and may be specifically referred to the above statement. This will not be repeated here.
实施例十七Example seventeen
在上述实施例的基础上,继续参考附图10可知,当模式选择信号包括预设的周期信号时,将获取装置11设置为用于:Based on the above embodiment, with continued reference to FIG. 10, when the mode selection signal includes a preset periodic signal, the acquisition device 11 is configured to:
获取周期信号,周期信号在单个周期中包括至少两个信号状态。A periodic signal is acquired, the periodic signal including at least two signal states in a single cycle.
在获取到周期信号之后,本实施例可以将选择装置12设置为用于:After acquiring the periodic signal, the present embodiment can set the selection device 12 to:
响应于周期信号为第一信号状态,选择主机模式作为通用串行总线设备的工作模式;In response to the periodic signal being the first signal state, selecting the host mode as the operating mode of the universal serial bus device;
响应于周期信号为第二信号状态,选择设备模式作为通用串行总线设备的工作模式。In response to the periodic signal being the second signal state, the device mode is selected as the operating mode of the universal serial bus device.
进一步的,本实施例还可以将选择装置12设置为用于:Further, in this embodiment, the selecting device 12 can also be configured to:
在周期信号的前半个周期中,选择主机模式作为通用串行总线设备的工作模式; In the first half of the periodic signal, the host mode is selected as the operating mode of the universal serial bus device;
在周期信号的后半个周期中,选择设备模式作为通用串行总线设备的工作模式。In the second half of the periodic signal, the device mode is selected as the operating mode of the universal serial bus device.
本实施例中的获取装置11和选择装置12所实现操作步骤的具体实现过程以及实现效果与上述实施例四、五中步骤S13、S23-S24的具体实现过程以及实现效果相同,具体可参考上述陈述内容,在此不再赘述。The specific implementation process and the implementation effect of the operation steps of the obtaining device 11 and the selecting device 12 in the embodiment are the same as the specific implementation processes and the implementation effects of the steps S13 and S23-S24 in the fourth and fifth embodiments. The content of the statement will not be repeated here.
实施例十八Example 18
图11为本发明实施例一提供的通用串行总线设备的结构示意图;参考附图11可知,本实施例提供了一种通用串行总线设备,该通用串行总线设备用于与终端设备进行通信连接,具体的,该设备包括:FIG. 11 is a schematic structural diagram of a universal serial bus device according to Embodiment 1 of the present invention; and as shown in FIG. 11, the embodiment provides a universal serial bus device for performing with a terminal device. Communication connection, specifically, the device includes:
至少一个连接接口101,至少一个连接接口101用于接入终端设备;At least one connection interface 101, at least one connection interface 101 is used for accessing the terminal device;
至少一个处理器102,至少一个处理器102单独地或者共同地用于:At least one processor 102, at least one processor 102, used alone or in common:
获取模式选择信号;Obtaining a mode selection signal;
根据模式选择信号选择通用串行总线设备的工作模式,工作模式为主机模式或设备模式;Selecting a working mode of the universal serial bus device according to the mode selection signal, and the working mode is a host mode or a device mode;
根据所选择的工作模式与终端设备建立通信连接;Establishing a communication connection with the terminal device according to the selected working mode;
通过通信连接发送或者接收数据。Send or receive data over a communication connection.
其中,本实施例对于连接接口101和处理器102的具体个数不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如可以将连接接口101和处理器102分别设置为包括1个、2个、3个或者4个等等;另外,本实施例中处理器102所实现的操作步骤的具体实现过程以及实现效果与上述实施例七中的步骤S101-S104的具体实现过程以及实现效果相同,具体可参考上述陈述内容,在此不再赘述。The specific number of the connection interface 101 and the processor 102 is not limited in this embodiment, and can be set by a person skilled in the art according to specific design requirements. For example, the connection interface 101 and the processor 102 can be respectively set to include one. 2, 3, or 4, etc.; in addition, the specific implementation process and implementation effect of the operation steps implemented by the processor 102 in this embodiment and the specific implementation process and implementation of the steps S101-S104 in the seventh embodiment The effects are the same. For details, refer to the above statement, and details are not described herein again.
其中,需要说明的是,由于USB设备中的连接接口可以为host模式或device模式,当接入终端为智能终端时,具体的,目前智能终端的操作系统的两大阵营为android和ios,这些设备都针对连接接口提供了特有的通信接口,这些接口要求无人飞行器系统中的usb接口默认工作在host模式,而在具体实现数据交互时,对于android设备,可以采用aoa接口通信;对于ios设备,可以采用role switch模式以及ea native transport接口通信,此时可以准确地识别到终端设备,并建立终端设备与USB设备之间的通信连接,做到了很好的设备兼容。 It should be noted that, since the connection interface in the USB device can be the host mode or the device mode, when the access terminal is a smart terminal, specifically, the two camps of the current operating system of the smart terminal are android and ios, these The devices provide a unique communication interface for the connection interface. These interfaces require the usb interface in the UAV system to work in the host mode by default, and in the specific implementation of data interaction, for the android device, the ao interface can be used for communication; for the ios device The role of the role switch mode and the ea native transport interface can be used. At this time, the terminal device can be accurately identified, and the communication connection between the terminal device and the USB device can be established, so that a good device compatibility is achieved.
本实施例提供的通用串行总线设备,通过模式选择信号选择通用串行总线设备工作在主机模式下或者工作在设备模式下,在确认工作模式之后,根据所选择的工作模式与终端设备建立通信连接,进而可以使得终端设备与通用串行总线设备之间通过通信连接发送或者接收数据;避免了还需要建立独立的无线传输路径的情况,方便终端设备与通用串行总线设备进行通信连接,保证了终端设备与通用串行总线设备之间数据交互的正常进行,有效地提高了该通用串行总线设备的实用性,有利于市场的推广与应用。The universal serial bus device provided by the embodiment selects the universal serial bus device to work in the host mode or works in the device mode by using the mode selection signal, and establishes communication with the terminal device according to the selected working mode after confirming the working mode. The connection can further enable the terminal device to transmit or receive data through the communication connection between the universal serial bus device; avoid the need to establish an independent wireless transmission path, and facilitate the communication connection between the terminal device and the universal serial bus device to ensure communication The normal interaction of data interaction between the terminal device and the universal serial bus device effectively improves the practicability of the universal serial bus device and is beneficial to the promotion and application of the market.
实施例十九Example 19
在上述实施例的基础上,继续参考附图12可知,本实施例中的至少一个处理器102还用于执行上述实施例八-实施例九中的基于通用串行总线的数据交互方法的方法步骤,本实施例中处理器102所执行的具体步骤的实现过程和实现效果可参考上述实施例八-实施例九中的描述内容,在此不再赘述。On the basis of the foregoing embodiments, referring to FIG. 12, at least one processor 102 in this embodiment is further configured to perform the method for performing a universal serial bus-based data interaction method in the above-mentioned Embodiments 8 to 9. For the implementation process and the implementation of the specific steps performed by the processor 102 in this embodiment, reference may be made to the description in the foregoing Embodiment 8 - Embodiment 9, and details are not described herein again.
实施例二十Example twenty
图12为本发明实施例二提供的通用串行总线设备的结构示意图;在上述实施例的基础上,继续参考附图12可知,本实施例将至少一个连接接口102设置为包括:第一类连接接口1011和第二类连接接口1012;FIG. 12 is a schematic structural diagram of a universal serial bus device according to Embodiment 2 of the present invention. On the basis of the foregoing embodiment, referring to FIG. 12, the present embodiment sets at least one connection interface 102 to include: Connection interface 1011 and second type connection interface 1012;
第一类连接接口1011和第二类连接接口1012与同一个处理器102相连接,第一类连接接口1011的工作模式为主机模式,第二类连接接口1012的工作模式为设备模式。The first type of connection interface 1011 and the second type of connection interface 1012 are connected to the same processor 102. The first type of connection interface 1011 operates in a host mode, and the second type of connection interface 1012 operates in a device mode.
本实施例对于第一类连接接口1011和第二类连接接口1012的具体接口类型不做限定,本领域技术人员可以根据具体的设计需求进行设置,可选地,将第一类连接接口设置1011为A型通用串行总线接口,第二类连接接口1012设置为B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口。The specific interface type of the first type of the connection interface 1011 and the second type of connection interface 1012 is not limited in this embodiment, and those skilled in the art may set according to specific design requirements. Optionally, the first type of connection interface is set to 1011. For the Type A universal serial bus interface, the second type of connection interface 1012 is set to a Type B universal serial bus interface, a small universal serial bus interface, or a micro universal serial bus interface.
具体应用时,可以将通用串行总线设备设置为包括1个处理器102,此时,通用串行总线设备包括接口A和接口B,其中,接口A对应主机模式,接口B对应设备模式,这两个连接接口连接到同一个usb控制器上,此时,通用串行总线设备可以通过接口A或者接口B与终端设备建立通信连接,进而实现通用串行总线设备与终端设备之间进行数据交互的过程,此时的通用串行总线设备在同一时刻可以只支持1种终端设备的接入。 In a specific application, the universal serial bus device can be configured to include one processor 102. In this case, the universal serial bus device includes interface A and interface B, wherein interface A corresponds to the host mode, and interface B corresponds to the device mode. The two connection interfaces are connected to the same USB controller. At this time, the universal serial bus device can establish a communication connection with the terminal device through interface A or interface B, thereby implementing data interaction between the universal serial bus device and the terminal device. The process of the universal serial bus device at this time can only support the access of one type of terminal device at the same time.
实施例二十一Embodiment 21
图13为本发明实施例三提供的通用串行总线设备的结构示意图;在上述实施例的基础上,继续参考附图13可知,为了方便选择通用串行总线设备的工作模式,还可以将该设备设置为包括:至少具有第一开关状态和第二开关状态的硬件开关103,硬件开关103与至少一个处理器102相连接;13 is a schematic structural diagram of a universal serial bus device according to Embodiment 3 of the present invention; on the basis of the foregoing embodiment, with reference to FIG. 13, it can be seen that, in order to facilitate selection of the working mode of the universal serial bus device, The device is configured to include: a hardware switch 103 having at least a first switch state and a second switch state, the hardware switch 103 being coupled to the at least one processor 102;
其中,对于该硬件开关103的具体形状结构不做限定,本领域技术人员可以根据其实现的操作步骤对其进行任意设置,在此不再赘述;另外,本领域技术人员可以将硬件开关103的第一开关状态的工作模式为主机模式,将硬件开关103的第二开关状态的工作模式为设备模式,或者,也可以将第一开关状态的工作模式设置为设备模式,第二开关状态的工作模式为主机模式等等。The specific shape and structure of the hardware switch 103 are not limited, and those skilled in the art can arbitrarily set the hardware switch 103 according to the operation steps thereof, and details are not described herein. In addition, those skilled in the art can set the hardware switch 103. The working mode of the first switch state is the master mode, the working mode of the second switch state of the hardware switch 103 is the device mode, or the working mode of the first switch state may be set to the device mode, and the second switch state is operated. The mode is host mode and so on.
具体应用时,可以将此时的连接接口101的个数设置为1个,此时,为了满足连接接口101可以适用于不同设备类型的接入设备,通过该硬件开关103的不同开关状态,处理器102可以根据相应的开关状态选择连接接口101的工作模式,进而保证了该通用串行总线设备与终端设备的通信连接。In a specific application, the number of the connection interfaces 101 at this time can be set to one. In this case, in order to satisfy the connection interface 101, the access device can be applied to different access devices of different device types, and the different switch states of the hardware switch 103 are processed. The device 102 can select the working mode of the connection interface 101 according to the corresponding switch state, thereby ensuring the communication connection between the universal serial bus device and the terminal device.
实施例二十二Example twenty two
图14为本发明实施例四提供的通用串行总线设备的结构示意图;参考附图14可知,本实施例提供了一种通用串行总线设备,该通用串行总线设备用于与终端设备进行通信连接,具体的,该设备包括:14 is a schematic structural diagram of a universal serial bus device according to Embodiment 4 of the present invention; and as shown in FIG. 14, the embodiment provides a universal serial bus device for performing with a terminal device. Communication connection, specifically, the device includes:
至少两个连接接口101,至少两个连接接口101包括第一类连接接口和第二类连接接口;At least two connection interfaces 101, at least two connection interfaces 101 include a first type of connection interface and a second type of connection interface;
至少两个处理器102,至少两个处理器102包括与第一类连接接口相对应的第一类处理器和与第二类连接接口相对应的第二类处理器;At least two processors 102, at least two processors 102 comprising a first type of processor corresponding to the first type of connection interface and a second type of processor corresponding to the second type of connection interface;
其中,第一类处理器和第一类连接接口的工作模式为主机模式,并且第二类处理器和第二类连接接口的工作模式为设备模式。The working mode of the first type of processor and the first type of connection interface is a host mode, and the working mode of the second type of processor and the second type of connection interface is a device mode.
本实施例对于连接接口101和处理器102的具体个数不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如可以将连接接口101和处理器102分别设置为包括1个、2个、3个或者4个等等;具体应用时,可以将连接接口101和处理器102均设置为2个,具体的,连接接口101包括:接口A和接口B,其中,接口A对应host模式(主机模式),接口B对应device 模式(设备模式),处理器102包括:第一类处理器和第二类处理器,第一类处理器与接口A相连接,第二类处理器与接口B相连接,此时,该通用串行总线设备同一时刻可以支持2种不同的终端设备的接入,进而提高了该通用串行总线设备的实用性,有利于市场的推广与应用。The specific number of the connection interface 101 and the processor 102 is not limited in this embodiment, and can be set by a person skilled in the art according to specific design requirements. For example, the connection interface 101 and the processor 102 can be respectively set to include one and two. For the specific application, the connection interface 101 and the processor 102 can be set to two. Specifically, the connection interface 101 includes: interface A and interface B, wherein interface A corresponds to the host mode. (host mode), interface B corresponds to device Mode (device mode), the processor 102 includes: a first type processor and a second type processor, the first type of processor is connected to the interface A, and the second type of processor is connected to the interface B. The serial bus device can support the access of two different terminal devices at the same time, thereby improving the practicability of the universal serial bus device and facilitating the promotion and application of the market.
实施例二十三Example twenty-three
另外,在实施本技术方案的过程中,发明人发现现有技术中的地面站是和无人飞行器遥控系统分开的,采用独立的数据链路和无人飞行器进行交互,例如,目前最常用的蓝牙地面站会在地面端新增一个无线电台,在无线电台上安装一个蓝牙模块,该电台可直接连接到无人飞行器的天空端无线控制系统上;同时在第三方设备上也安装一个蓝牙模块,连接到无线电台的的蓝牙模块,通过蓝牙模块和无线电台创建的数据链路与飞控交互;然而,现有技术中的地面站存在以下缺陷:没有充分利用无人飞行器系统已有的资源,需要设置独立的无线传输系统,冗余度增加,提高了用户成本,不利于市场的推广与应用。In addition, in the process of implementing the technical solution, the inventor finds that the ground station in the prior art is separated from the unmanned aerial vehicle remote control system, and uses an independent data link to interact with the unmanned aerial vehicle, for example, the most commonly used ones at present. The Bluetooth ground station will add a radio station on the ground side, and install a Bluetooth module on the radio station, which can be directly connected to the sky-side wireless control system of the UAV; and a Bluetooth module is also installed on the third-party equipment. The Bluetooth module connected to the radio station interacts with the flight controller through the data link created by the Bluetooth module and the radio station; however, the ground station in the prior art has the following drawbacks: the resources existing in the UAV system are not fully utilized. It is necessary to set up an independent wireless transmission system, and the redundancy is increased, which increases the user cost and is not conducive to the promotion and application of the market.
图15为本发明实施例提供的无人飞行器的遥控器的结构示意图,参考附图15可知,为了克服上述现有技术中存在的问题,本实施例提供了一种无人飞行器的遥控器,包括:FIG. 15 is a schematic structural diagram of a remote controller of an unmanned aerial vehicle according to an embodiment of the present invention. Referring to FIG. 15 , in order to overcome the above problems in the prior art, the present embodiment provides a remote controller for an unmanned aerial vehicle. include:
通用串行总线设备20,通用串行总线设备20包括:Universal Serial Bus Device 20, Universal Serial Bus Device 20 includes:
至少一个连接接口201,至少一个连接接口201用于接入终端设备10;At least one connection interface 201, at least one connection interface 201 is used to access the terminal device 10;
至少一个处理器202,至少一个处理器202单独地或者共同地用于:At least one processor 202, at least one processor 202, used alone or collectively, is used to:
获取模式选择信号;Obtaining a mode selection signal;
根据模式选择信号选择通用串行总线设备20的工作模式,工作模式为主机模式或设备模式;Selecting an operation mode of the universal serial bus device 20 according to a mode selection signal, and the working mode is a host mode or a device mode;
根据所选择的工作模式与终端设备10建立通信连接;Establishing a communication connection with the terminal device 10 according to the selected working mode;
通信设备203,通信设备203用于通过独立于通信连接的另外的通信链路获取数据;a communication device 203 for acquiring data through an additional communication link that is independent of the communication connection;
其中,至少一个处理器202还用于:The at least one processor 202 is further configured to:
将数据通过通信连接传输至终端设备10。The data is transmitted to the terminal device 10 through a communication connection.
进一步的,本实施例可以将通信设备203设置为用于:通过无线链路获取数据;具体的,该通信设备203用于:通过无人飞行器30和无人飞行器的 遥控器之间的无线链路获取数据;本实施例中对于数据的具体内容不做限定,本领域技术人员可以根据具体的设计需求进行设置,其中,可选地,将数据设置为包括:图像数据和飞行数据。Further, in this embodiment, the communication device 203 can be configured to: acquire data through a wireless link; specifically, the communication device 203 is configured to: pass the unmanned aerial vehicle 30 and the unmanned aerial vehicle The data is obtained by the wireless link between the remote controllers; the specific content of the data is not limited in this embodiment, and can be set by a person skilled in the art according to specific design requirements. Optionally, the data is set to include: an image. Data and flight data.
本实施例中通用串行总线设备20中包括的连接接口201、处理器203以及通信设备203所实现的操作步骤的具体实现过程以及实现效果与上述实施例十中的步骤S201-S205的具体实现过程以及实现效果相同,具体可参考上述陈述内容,在此不再赘述。The specific implementation process and the implementation effect of the operation steps implemented by the connection interface 201, the processor 203, and the communication device 203 included in the universal serial bus device 20 in this embodiment are different from the specific implementations of steps S201-S205 in the above tenth embodiment. The process and the implementation effect are the same. For details, refer to the above statement, and details are not described herein again.
本实施例提供的无人飞行器的遥控器,通过独立于通信连接的另外的通信链路获取数据,并可以将获取的数据通过上述通信连接发送至终端设备处;避免了还需要建立独立的无线传输路径的情况,方便终端设备与无人飞行器和通用串行总线设备进行通信连接,保证了终端设备与无人飞行器和无人飞行器的遥控器之间数据交互的正常进行,有效地提高了该无人飞行器的遥控器的实用性,有利于市场的推广与应用。The remote controller of the UAV provided by the embodiment obtains data through another communication link independent of the communication connection, and can send the acquired data to the terminal device through the communication connection; avoiding the need to establish independent wireless In the case of the transmission path, the terminal device is conveniently connected with the UAV and the universal serial bus device, and the data interaction between the terminal device and the unmanned aerial vehicle and the unmanned aerial vehicle remote controller is ensured, thereby effectively improving the The practicality of the remote control of the unmanned aerial vehicle is conducive to the promotion and application of the market.
在本发明所提供的几个实施例中,应该理解到,所揭露的相关装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the related apparatus and method disclosed may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described 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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明 的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得计算机处理器(processor)执行本发明各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或者光盘等各种可以存储程序代码的介质。An integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium. Based on such understanding, the present invention Technical Solution In essence or in part that contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product, the computer software product is stored in a storage medium, including a plurality of instructions for making A computer processor performs all or part of the steps of the various embodiments of the present invention. The foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes.
以上仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims (51)

  1. 一种用于选择通用串行总线设备的工作模式的方法,其特征在于,包括:A method for selecting an operating mode of a universal serial bus device, comprising:
    获取模式选择信号;Obtaining a mode selection signal;
    根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式。The operating mode of the universal serial bus device is selected according to the mode selection signal, and the working mode is a host mode or a device mode.
  2. 根据权利要求1所述的方法,其特征在于,所述获取模式选择信号,包括:The method according to claim 1, wherein the acquiring a mode selection signal comprises:
    获取所述通用串行总线设备的至少两个连接接口的接入状态。Obtaining an access status of at least two connection interfaces of the universal serial bus device.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述模式选择信号选择通用串行总线设备的工作模式,包括:The method of claim 2, wherein the selecting a mode of operation of the universal serial bus device according to the mode selection signal comprises:
    响应于所述至少两个连接接口中的第一类连接接口上接入终端设备,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to an access terminal device on the first type of connection interface of the at least two connection interfaces;
    响应于所述至少两个连接接口中的第二类连接接口上接入终端设备,选择设备模式作为所述通用串行总线设备的工作模式。And in response to the access terminal device on the second type of connection interface of the at least two connection interfaces, selecting a device mode as an operation mode of the universal serial bus device.
  4. 根据权利要求3所述的方法,其特征在于,所述第一类连接接口为A型通用串行总线接口,所述第二类连接接口为B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口。The method according to claim 3, wherein the first type of connection interface is a type A universal serial bus interface, and the second type of connection interface is a type B universal serial bus interface, a small universal serial bus. Interface or micro universal serial bus interface.
  5. 根据权利要求1所述的方法,其特征在于,所述获取模式选择信号,包括:The method according to claim 1, wherein the acquiring a mode selection signal comprises:
    获取开关信号,所述开关信号包括至少两个开关状态。A switching signal is obtained, the switching signal comprising at least two switching states.
  6. 根据权利要求5所述的方法,其特征在于,所述获取开关信号,包括:The method according to claim 5, wherein the acquiring the switch signal comprises:
    获取由硬件开关或软件开关产生的开关信号。Get the switching signal generated by the hardware switch or software switch.
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述模式选择信号选择通用串行总线设备的工作模式,包括:The method according to claim 5, wherein the selecting a working mode of the universal serial bus device according to the mode selection signal comprises:
    响应于所述开关信号为所述至少两个开关状态中的第一开关状态,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to the switch signal being a first switch state of the at least two switch states;
    响应于所述开关信号为所述至少两个开关状态中的第二开关状态,选择设备模式作为所述通用串行总线设备的工作模式。 In response to the switch signal being a second switch state of the at least two switch states, a device mode is selected as an operational mode of the universal serial bus device.
  8. 根据权利要求1所述的方法,其特征在于,所述获取模式选择信号,包括:The method according to claim 1, wherein the acquiring a mode selection signal comprises:
    获取周期信号,所述周期信号在单个周期中包括至少两个信号状态。A periodic signal is acquired that includes at least two signal states in a single cycle.
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述模式选择信号选择通用串行总线设备的工作模式,包括:The method according to claim 8, wherein the selecting a working mode of the universal serial bus device according to the mode selection signal comprises:
    响应于所述周期信号为第一信号状态,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to the periodic signal being a first signal state;
    响应于所述周期信号为第二信号状态,选择设备模式作为所述通用串行总线设备的工作模式。In response to the periodic signal being the second signal state, the device mode is selected as the operational mode of the universal serial bus device.
  10. 根据权利要求8所述的方法,其特征在于,所述根据所述模式选择信号选择通用串行总线设备的工作模式,包括:The method according to claim 8, wherein the selecting a working mode of the universal serial bus device according to the mode selection signal comprises:
    在所述周期信号的前半个周期中,选择主机模式作为所述通用串行总线设备的工作模式;In the first half of the periodic signal, selecting a host mode as an operating mode of the universal serial bus device;
    在所述周期信号的后半个周期中,选择设备模式作为所述通用串行总线设备的工作模式。In the second half of the periodic signal, the device mode is selected as the operating mode of the universal serial bus device.
  11. 一种存储介质,其特征在于,所述存储介质内存储有程序代码,当所述程序代码运行时,会执行根据权利要求1-10中任意一项所述的用于选择通用串行总线设备的工作模式的方法。A storage medium, wherein the storage medium stores therein a program code, and when the program code is executed, performs the selection of a universal serial bus device according to any one of claims 1-10. The way of working mode.
  12. 一种基于通用串行总线的数据交互方法,其特征在于,包括:A universal serial bus-based data interaction method, comprising:
    获取模式选择信号;Obtaining a mode selection signal;
    根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;Selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode;
    根据所选择的工作模式与终端设备建立通信连接;Establishing a communication connection with the terminal device according to the selected working mode;
    通过所述通信连接发送或者接收数据。Data is transmitted or received over the communication connection.
  13. 根据权利要求12所述的方法,其特征在于,所述根据所选择的工作模式与终端设备建立通信连接,包括:The method according to claim 12, wherein the establishing a communication connection with the terminal device according to the selected working mode comprises:
    在所选择的工作模式中探测终端设备;Detecting the terminal device in the selected working mode;
    响应于探测到所述终端设备,与所述终端设备建立通信连接。 A communication connection is established with the terminal device in response to detecting the terminal device.
  14. 根据权利要求13所述的方法,其特征在于,还包括:The method of claim 13 further comprising:
    响应于与所述终端设备建立通信连接,中止探测过程。The probing process is aborted in response to establishing a communication connection with the terminal device.
  15. 根据权利要求14所述的方法,其特征在于,还包括:The method of claim 14 further comprising:
    响应于与所述终端设备断开通信连接,恢复所述探测过程。The probing process is resumed in response to disconnecting the communication connection with the terminal device.
  16. 一种数据交互方法,其特征在于,包括:A data interaction method, comprising:
    获取模式选择信号;Obtaining a mode selection signal;
    根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;Selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode;
    根据所选择的工作模式与终端设备建立通信连接;Establishing a communication connection with the terminal device according to the selected working mode;
    通过独立于所述通信连接的另外的通信链路获取数据;Acquiring data through an additional communication link that is independent of the communication connection;
    将所述数据通过所述通信连接传输至所述终端设备。Transmitting the data to the terminal device over the communication connection.
  17. 根据权利要求16所述的方法,其特征在于,所述通过独立于所述通信连接的另外的通信链路获取数据,包括:The method of claim 16 wherein said obtaining data via an additional communication link independent of said communication connection comprises:
    通过无线链路获取数据。Get data through a wireless link.
  18. 根据权利要求16所述的方法,其特征在于,所述通过无线链路获取数据,包括:The method according to claim 16, wherein the obtaining data by using a wireless link comprises:
    通过无人飞行器和所述无人飞行器的遥控器之间的无线链路获取数据。Data is acquired by a wireless link between the unmanned aerial vehicle and the remote control of the unmanned aerial vehicle.
  19. 根据权利要求16至18中任一项所述的方法,其特征在于,所述数据包括:图像数据和飞行数据。The method according to any one of claims 16 to 18, wherein the data comprises image data and flight data.
  20. 一种用于选择通用串行总线设备的工作模式的设备,其特征在于,包括:至少一个处理器,所述至少一个处理器单独地或者共同地用于:An apparatus for selecting an operating mode of a universal serial bus device, comprising: at least one processor, the at least one processor being used individually or collectively for:
    获取模式选择信号;Obtaining a mode selection signal;
    根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式。The operating mode of the universal serial bus device is selected according to the mode selection signal, and the working mode is a host mode or a device mode.
  21. 根据权利要求20所述的设备,其特征在于,所述至少一个处理器,用于:The device according to claim 20, wherein said at least one processor is configured to:
    获取所述通用串行总线设备的至少两个连接接口的接入状态。Obtaining an access status of at least two connection interfaces of the universal serial bus device.
  22. 根据权利要求21所述的设备,其特征在于,所述至少一个处理器, 用于:The device according to claim 21, wherein said at least one processor, Used for:
    响应于所述至少两个连接接口中的第一类连接接口上接入终端设备,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to an access terminal device on the first type of connection interface of the at least two connection interfaces;
    响应于所述至少两个连接接口中的第二类连接接口上接入终端设备,选择设备模式作为所述通用串行总线设备的工作模式。And in response to the access terminal device on the second type of connection interface of the at least two connection interfaces, selecting a device mode as an operation mode of the universal serial bus device.
  23. 根据权利要求22所述的设备,其特征在于,所述第一类连接接口为A型通用串行总线接口,所述第二类连接接口为B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口。The device according to claim 22, wherein said first type of connection interface is a type A universal serial bus interface, and said second type of connection interface is a type B universal serial bus interface, a small universal serial bus Interface or micro universal serial bus interface.
  24. 根据权利要求20所述的设备,其特征在于,所述至少一个处理器,用于:The device according to claim 20, wherein said at least one processor is configured to:
    获取开关信号,所述开关信号包括至少两个开关状态。A switching signal is obtained, the switching signal comprising at least two switching states.
  25. 根据权利要求24所述的设备,其特征在于,所述至少一个处理器,用于:The device according to claim 24, wherein said at least one processor is configured to:
    获取由硬件开关或软件开关产生的开关信号。Get the switching signal generated by the hardware switch or software switch.
  26. 根据权利要求24所述的设备,其特征在于,所述至少一个处理器,用于:The device according to claim 24, wherein said at least one processor is configured to:
    响应于所述开关信号为所述至少两个开关状态中的第一开关状态,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to the switch signal being a first switch state of the at least two switch states;
    响应于所述开关信号为所述至少两个开关状态中的第二开关状态,选择设备模式作为所述通用串行总线设备的工作模式。In response to the switch signal being a second switch state of the at least two switch states, a device mode is selected as an operational mode of the universal serial bus device.
  27. 根据权利要求20所述的设备,其特征在于,所述至少一个处理器,用于:The device according to claim 20, wherein said at least one processor is configured to:
    获取周期信号,所述周期信号在单个周期中包括至少两个信号状态。A periodic signal is acquired that includes at least two signal states in a single cycle.
  28. 根据权利要求27所述的设备,其特征在于,所述至少一个处理器,用于:The device according to claim 27, wherein said at least one processor is configured to:
    响应于所述周期信号为第一信号状态,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to the periodic signal being a first signal state;
    响应于所述周期信号为第二信号状态,选择设备模式作为所述通用串行总线设备的工作模式。In response to the periodic signal being the second signal state, the device mode is selected as the operational mode of the universal serial bus device.
  29. 根据权利要求27所述的设备,其特征在于,所述至少一个处理器, 用于:The device according to claim 27, wherein said at least one processor, Used for:
    在所述周期信号的前半个周期中,选择主机模式作为所述通用串行总线设备的工作模式;In the first half of the periodic signal, selecting a host mode as an operating mode of the universal serial bus device;
    在所述周期信号的后半个周期中,选择设备模式作为所述通用串行总线设备的工作模式。In the second half of the periodic signal, the device mode is selected as the operating mode of the universal serial bus device.
  30. 一种用于选择通用串行总线设备的工作模式的设备,其特征在于,包括:A device for selecting an operating mode of a universal serial bus device, comprising:
    获取装置,用于获取模式选择信号;Obtaining means for acquiring a mode selection signal;
    选择装置,用于根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式。And a selecting means for selecting an operating mode of the universal serial bus device according to the mode selection signal, the working mode being a host mode or a device mode.
  31. 根据权利要求30所述的设备,其特征在于,所述获取装置,用于:The device according to claim 30, wherein the obtaining means is configured to:
    获取所述通用串行总线设备的至少两个连接接口的接入状态。Obtaining an access status of at least two connection interfaces of the universal serial bus device.
  32. 根据权利要求31所述的设备,其特征在于,所述选择装置,用于:The device according to claim 31, wherein said selecting means is for:
    响应于所述至少两个连接接口中的第一类连接接口上接入终端设备,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to an access terminal device on the first type of connection interface of the at least two connection interfaces;
    响应于所述至少两个连接接口中的第二类连接接口上接入终端设备,选择设备模式作为所述通用串行总线设备的工作模式。And in response to the access terminal device on the second type of connection interface of the at least two connection interfaces, selecting a device mode as an operation mode of the universal serial bus device.
  33. 根据权利要求32所述的设备,其特征在于,所述第一类连接接口为A型通用串行总线接口,所述第二类连接接口为B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口。The device according to claim 32, wherein said first type of connection interface is a type A universal serial bus interface, and said second type of connection interface is a type B universal serial bus interface, a small universal serial bus Interface or micro universal serial bus interface.
  34. 根据权利要求30所述的设备,其特征在于,所述获取装置,用于:The device according to claim 30, wherein the obtaining means is configured to:
    获取开关信号,所述开关信号包括至少两个开关状态。A switching signal is obtained, the switching signal comprising at least two switching states.
  35. 根据权利要求34所述的设备,其特征在于,所述获取装置,用于:The device according to claim 34, wherein the obtaining means is configured to:
    获取由硬件开关或软件开关产生的开关信号。Get the switching signal generated by the hardware switch or software switch.
  36. 根据权利要求34所述的设备,其特征在于,所述选择装置,用于:The device according to claim 34, wherein said selecting means is for:
    响应于所述开关信号为所述至少两个开关状态中的第一开关状态,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to the switch signal being a first switch state of the at least two switch states;
    响应于所述开关信号为所述至少两个开关状态中的第二开关状态,选择设备模式作为所述通用串行总线设备的工作模式。 In response to the switch signal being a second switch state of the at least two switch states, a device mode is selected as an operational mode of the universal serial bus device.
  37. 根据权利要求30所述的设备,其特征在于,所述获取装置,用于:The device according to claim 30, wherein the obtaining means is configured to:
    获取周期信号,所述周期信号在单个周期中包括至少两个信号状态。A periodic signal is acquired that includes at least two signal states in a single cycle.
  38. 根据权利要求37所述的设备,其特征在于,所述选择装置,用于:The device according to claim 37, wherein said selecting means is for:
    响应于所述周期信号为第一信号状态,选择主机模式作为所述通用串行总线设备的工作模式;Selecting a host mode as an operation mode of the universal serial bus device in response to the periodic signal being a first signal state;
    响应于所述周期信号为第二信号状态,选择设备模式作为所述通用串行总线设备的工作模式。In response to the periodic signal being the second signal state, the device mode is selected as the operational mode of the universal serial bus device.
  39. 根据权利要求37所述的设备,其特征在于,所述选择装置,用于:The device according to claim 37, wherein said selecting means is for:
    在所述周期信号的前半个周期中,选择主机模式作为所述通用串行总线设备的工作模式;In the first half of the periodic signal, selecting a host mode as an operating mode of the universal serial bus device;
    在所述周期信号的后半个周期中,选择设备模式作为所述通用串行总线设备的工作模式。In the second half of the periodic signal, the device mode is selected as the operating mode of the universal serial bus device.
  40. 一种通用串行总线设备,其特征在于,包括:A universal serial bus device, comprising:
    至少一个连接接口,所述至少一个连接接口用于接入终端设备;At least one connection interface, the at least one connection interface is used to access the terminal device;
    至少一个处理器,所述至少一个处理器单独地或者共同地用于:At least one processor, the at least one processor being used individually or collectively:
    获取模式选择信号;Obtaining a mode selection signal;
    根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;Selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode;
    根据所选择的工作模式与所述终端设备建立通信连接;Establishing a communication connection with the terminal device according to the selected working mode;
    通过所述通信连接发送或者接收数据。Data is transmitted or received over the communication connection.
  41. 根据权利要求40所述的通用串行总线设备,其特征在于,所述至少一个处理器,用于:The universal serial bus device according to claim 40, wherein said at least one processor is configured to:
    在所选择的工作模式中探测终端设备;Detecting the terminal device in the selected working mode;
    响应于探测到所述终端设备,与所述终端设备建立通信连接。A communication connection is established with the terminal device in response to detecting the terminal device.
  42. 根据权利要求41所述的通用串行总线设备,其特征在于,所述至少一个处理器,还用于:The universal serial bus device according to claim 41, wherein the at least one processor is further configured to:
    响应于与所述终端设备建立通信连接,中止探测过程。The probing process is aborted in response to establishing a communication connection with the terminal device.
  43. 根据权利要求42所述的通用串行总线设备,其特征在于,所述至少一个处理器,还用于: The universal serial bus device according to claim 42, wherein said at least one processor is further configured to:
    响应于与所述终端设备断开通信连接,恢复所述探测过程。The probing process is resumed in response to disconnecting the communication connection with the terminal device.
  44. 根据权利要求40所述的通用串行总线设备,其特征在于,所述至少一个连接接口包括:第一类连接接口和第二类连接接口;The universal serial bus device according to claim 40, wherein said at least one connection interface comprises: a first type of connection interface and a second type of connection interface;
    所述第一类连接接口和所述第二类连接接口与同一个处理器相连接。The first type of connection interface and the second type of connection interface are connected to the same processor.
  45. 根据权利要求44所述的通用串行总线设备,其特征在于,所述第一类连接接口为A型通用串行总线接口,所述第二类连接接口为B型通用串行总线接口、小型通用串行总线接口或微型通用串行总线接口。The universal serial bus device according to claim 44, wherein said first type of connection interface is a type A universal serial bus interface, and said second type of connection interface is a type B universal serial bus interface, small Universal serial bus interface or micro universal serial bus interface.
  46. 根据权利要求40所述的通用串行总线设备,其特征在于,还包括:至少具有第一开关状态和第二开关状态的硬件开关,所述硬件开关与所述至少一个处理器相连接。The universal serial bus device of claim 40, further comprising: a hardware switch having at least a first switch state and a second switch state, said hardware switch being coupled to said at least one processor.
  47. 一种通用串行总线设备,其特征在于,包括:A universal serial bus device, comprising:
    至少两个连接接口,所述至少两个连接接口包括第一类连接接口和第二类连接接口;At least two connection interfaces, the at least two connection interfaces including a first type connection interface and a second type connection interface;
    至少两个处理器,所述至少两个处理器包括与所述第一类连接接口相对应的第一类处理器和与所述第二类连接接口相对应的第二类处理器;At least two processors, the at least two processors including a first type of processor corresponding to the first type of connection interface and a second type of processor corresponding to the second type of connection interface;
    其中,所述第一类处理器和所述第一类连接接口的工作模式为主机模式,并且所述第二类处理器和所述第二类连接接口的工作模式为设备模式。The working mode of the first type of processor and the first type of connection interface is a host mode, and the working mode of the second type of processor and the second type of connection interface is a device mode.
  48. 一种无人飞行器的遥控器,其特征在于,包括:A remote controller for an unmanned aerial vehicle, comprising:
    通用串行总线设备,所述通用串行总线设备包括:A universal serial bus device, the universal serial bus device comprising:
    至少一个连接接口,所述至少一个连接接口用于接入终端设备;At least one connection interface, the at least one connection interface is used to access the terminal device;
    至少一个处理器,所述至少一个处理器单独地或者共同地用于:At least one processor, the at least one processor being used individually or collectively:
    获取模式选择信号;Obtaining a mode selection signal;
    根据所述模式选择信号选择通用串行总线设备的工作模式,所述工作模式为主机模式或设备模式;Selecting an operation mode of the universal serial bus device according to the mode selection signal, where the working mode is a host mode or a device mode;
    根据所选择的工作模式与所述终端设备建立通信连接;Establishing a communication connection with the terminal device according to the selected working mode;
    通信设备,所述通信设备用于通过独立于所述通信连接的另外的通信链路获取数据;a communication device for acquiring data via an additional communication link independent of the communication connection;
    其中,所述至少一个处理器还用于: Wherein the at least one processor is further configured to:
    将所述数据通过所述通信连接传输至所述终端设备。Transmitting the data to the terminal device over the communication connection.
  49. 根据权利要求48所述的无人飞行器的遥控器,其特征在于,所述通信设备,用于:A remote controller for an unmanned aerial vehicle according to claim 48, wherein said communication device is configured to:
    通过无线链路获取数据。Get data through a wireless link.
  50. 根据权利要求49所述的无人飞行器的遥控器,其特征在于,所述通信设备,用于:A remote controller for an unmanned aerial vehicle according to claim 49, wherein said communication device is configured to:
    通过无人飞行器和所述无人飞行器的遥控器之间的无线链路获取数据。Data is acquired by a wireless link between the unmanned aerial vehicle and the remote control of the unmanned aerial vehicle.
  51. 根据权利要求48至50中任一项所述的无人飞行器的遥控器,其特征在于,所述数据包括:图像数据和飞行数据。 The remote controller for an unmanned aerial vehicle according to any one of claims 48 to 50, wherein the data comprises image data and flight data.
PCT/CN2016/104146 2016-10-31 2016-10-31 Universal serial bus-based method for data exchange and universal serial bus device WO2018076382A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/104146 WO2018076382A1 (en) 2016-10-31 2016-10-31 Universal serial bus-based method for data exchange and universal serial bus device
CN201680003168.5A CN106852188B (en) 2016-10-31 2016-10-31 Data interaction method based on universal serial bus and universal serial bus equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/104146 WO2018076382A1 (en) 2016-10-31 2016-10-31 Universal serial bus-based method for data exchange and universal serial bus device

Publications (1)

Publication Number Publication Date
WO2018076382A1 true WO2018076382A1 (en) 2018-05-03

Family

ID=59118343

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/104146 WO2018076382A1 (en) 2016-10-31 2016-10-31 Universal serial bus-based method for data exchange and universal serial bus device

Country Status (2)

Country Link
CN (1) CN106852188B (en)
WO (1) WO2018076382A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328175A (en) * 2020-11-03 2021-02-05 中电科特种飞机系统工程有限公司 Device for reading flight control data
CN113759873A (en) * 2021-09-01 2021-12-07 中国航空工业集团公司西安飞行自动控制研究所 Method for handling self-detection fault in power-on machine of flight control system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678996A (en) * 2017-09-26 2018-02-09 深圳市汉普电子技术开发有限公司 Determination method, USB device and the storage medium of USB mode
CN109062842B (en) * 2018-08-15 2020-10-23 深圳市道通智能航空技术有限公司 Communication method and device for remote controller and mobile terminal and remote controller
CN110502035A (en) * 2019-09-10 2019-11-26 深圳市道通智能航空技术有限公司 The long-range control method and unmanned plane of aerial camera
WO2021087749A1 (en) * 2019-11-05 2021-05-14 深圳市大疆创新科技有限公司 Switching control method, electronic device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581121A (en) * 2003-08-09 2005-02-16 深圳市朗科科技有限公司 Semicondustor storage device having host system operation function
WO2015047945A1 (en) * 2013-09-26 2015-04-02 Unwired Technology Llc Flexible mobile device connectivity to automotive systems with usb hubs
CN104750226A (en) * 2013-12-31 2015-07-01 联芯科技有限公司 USB (universal serial bus) OTG (on-the-go) pattern recognition system and USB OTG pattern recognition method
CN104991493A (en) * 2015-06-24 2015-10-21 广州飞米电子科技有限公司 Data transmission method, apparatus and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164355B (en) * 2011-12-13 2015-09-23 联想(北京)有限公司 A kind of changing method and electronic equipment
CN103217983B (en) * 2013-04-22 2015-09-23 北京航空航天大学 Robot remote control device in a kind of many rotors Multifunctional air
US8954623B2 (en) * 2013-04-23 2015-02-10 Mediatek Inc. Universal Serial Bus devices supporting super speed and non-super speed connections for communication with a host device and methods using the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581121A (en) * 2003-08-09 2005-02-16 深圳市朗科科技有限公司 Semicondustor storage device having host system operation function
WO2015047945A1 (en) * 2013-09-26 2015-04-02 Unwired Technology Llc Flexible mobile device connectivity to automotive systems with usb hubs
CN104750226A (en) * 2013-12-31 2015-07-01 联芯科技有限公司 USB (universal serial bus) OTG (on-the-go) pattern recognition system and USB OTG pattern recognition method
CN104991493A (en) * 2015-06-24 2015-10-21 广州飞米电子科技有限公司 Data transmission method, apparatus and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328175A (en) * 2020-11-03 2021-02-05 中电科特种飞机系统工程有限公司 Device for reading flight control data
CN113759873A (en) * 2021-09-01 2021-12-07 中国航空工业集团公司西安飞行自动控制研究所 Method for handling self-detection fault in power-on machine of flight control system
CN113759873B (en) * 2021-09-01 2023-05-23 中国航空工业集团公司西安飞行自动控制研究所 Method for handling self-detection faults in motor of flight control system

Also Published As

Publication number Publication date
CN106852188B (en) 2021-08-03
CN106852188A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
WO2018076382A1 (en) Universal serial bus-based method for data exchange and universal serial bus device
EP3575975B1 (en) Method and apparatus for operating smart network interface card
TWI581592B (en) Method for cabling connections and cabling connection system
US20200351354A1 (en) System and method for supporting data communication in a heterogeneous environment
US9231331B2 (en) Connector identification through proximity sensing
CN106843166A8 (en) Via communication network monitoring field apparatus
CN103297306B (en) A kind of agriculture Internet of things system
CN102571732A (en) Method, device and system for processing sensor protocol information
US11740997B2 (en) Method and apparatus for debugging a device
EP4274190A1 (en) Smart device control method and apparatus, electronic device, and computer readable medium
WO2017032112A1 (en) Method for communicating with board having no central processing unit and communication device
US10402214B2 (en) Device provided script to convert command
CN103957198A (en) Sensor data receiving and converting method and system
CN102752396B (en) Built-in sensing server and data control method thereof
WO2019019285A1 (en) Resource control method and apparatus
US11853247B2 (en) Interface switching apparatus, communication device, and interface switching method
CN105323748A (en) Testing error uploading method and device
CN105246170B (en) Wearable device and data receiving and transmitting method thereof
EP3317763B1 (en) Commissioning of virtualized entities
CN106373361A (en) Wireless collection and transmission device and method
US20200137533A1 (en) Bridge device for wireless sensors
US10637928B2 (en) Computer system, edge device control method, and program
US20190306073A1 (en) Method and device for enhancing the throughput between smart meter and server
US20180123953A1 (en) Virtual network switch system and method of constructing the same
CN113900715B (en) Information management system, method, device and storage medium

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

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

Country of ref document: EP

Kind code of ref document: A1