WO2022052801A1 - Data transmission apparatus and method - Google Patents

Data transmission apparatus and method Download PDF

Info

Publication number
WO2022052801A1
WO2022052801A1 PCT/CN2021/114192 CN2021114192W WO2022052801A1 WO 2022052801 A1 WO2022052801 A1 WO 2022052801A1 CN 2021114192 W CN2021114192 W CN 2021114192W WO 2022052801 A1 WO2022052801 A1 WO 2022052801A1
Authority
WO
WIPO (PCT)
Prior art keywords
data transmission
data
power supply
signal
transmission device
Prior art date
Application number
PCT/CN2021/114192
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 陈林
Publication of WO2022052801A1 publication Critical patent/WO2022052801A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a data transmission device and method.
  • the external computer supplies power to the screen-casting device, but the data transmission module in the screen-casting device is connected between the screen-casting device and the external computer.
  • the configuration process such as initialization can be started only after the power is turned on. After a period of configuration is completed, the data transmission module starts to work, which makes the configuration time of the screen projection device time-consuming and reduces the response speed and work efficiency of the screen projection device.
  • the present application provides a data transmission device and method, which are used to solve the technical problems of slow response and low work efficiency of screen projection equipment in the prior art.
  • the data transmission device includes a power supply, a microcontroller, a communication interface, a vibration sensor, a controllable switch and a data transmission module
  • the communication interface is a TypeC interface
  • the transmission module includes a Wi-Fi module and a microprocessor, the microprocessor is connected to the TypeC interface; the controllable switch is connected between the power supply and the data transmission module; the TypeC interface Used to receive media data in DP protocol format sent by an external computer; the vibration sensor is used to generate detection data according to the movement of the data transmission device, and the detection data carries the acceleration value of the vibration sensor itself;
  • the data transmission module is used to receive the media data transmitted from the TypeC interface, process the media data, and send it to the display device;
  • the media data is the media data in the DP protocol format or the The video data in MIPI format and/or the audio data in I2S format generated after the media data in the DP protocol format is processed;
  • the microcontroller is used to control the controllable control according to the detection data of the vibration sensor and a preset acceleration threshold switch on and off.
  • the microcontroller controls the power supply to supply power to the data transmission module, so that the data transmission module starts before the data transmission device is connected to the external computer.
  • the data transmission device receives the media data in the DP protocol format transmitted from the external computer through its TypeC interface, and sends it to the display device through the wireless channel after processing, which improves the performance of the data transmission device. response efficiency.
  • Fig. 1 is the schematic diagram of the application scenario of the application
  • FIG. 2 is a schematic structural diagram of a data transmission device in a technology
  • FIG. 3 is a schematic structural diagram of a data transmission device in another technology
  • FIG. 4 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a connection relationship between a microcontroller and a vibration sensor provided by an embodiment of the application;
  • FIG. 6 is a schematic structural diagram of a vibration sensor provided by some embodiments of the present application.
  • FIG. 7 is a schematic structural diagram of a microcontroller according to some embodiments of the present application.
  • FIG. 8 is a schematic flowchart of a data transmission method provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a data transmission method according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of an application scenario framework of a data transmission apparatus provided by an embodiment of the present application
  • FIG. 12 is a schematic diagram of a charging management IC chip and peripheral circuits provided by some embodiments of the present application.
  • FIG. 13 is a schematic diagram of a power chip and peripheral circuits provided by some embodiments of the present application.
  • FIG. 14 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application.
  • 15 is a schematic structural diagram of a related circuit of a controllable switch and an AND gate circuit provided by some embodiments of the present application;
  • 16 is a schematic diagram of a partial circuit structure of an external power detection module provided by some embodiments of the present application.
  • 17 is a schematic flowchart of a control method of a data transmission device provided by an embodiment of the present application.
  • FIG. 18 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application.
  • 19 is a schematic state diagram of a data transmission module according to some embodiments of the present application when a data transmission device control method is executed;
  • 20 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application.
  • 21 is a schematic diagram of a partial circuit structure of an external power supply detection module provided by an embodiment of the application.
  • 22 is a schematic state diagram of a microcontroller according to some embodiments of the present application when a method for controlling a data transmission device is executed;
  • FIG. 23 is a schematic diagram of an application scenario framework of an embodiment of a data transmission device provided by the present application.
  • 24 is a schematic diagram of an application scenario framework of an embodiment of a data transmission device provided by the present application.
  • 25 is a schematic flowchart of a data transmission method provided by an embodiment of the application.
  • 26 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application.
  • FIG. 27 is a schematic flowchart of an embodiment of a data transmission method provided by the present application.
  • 29 is a schematic structural diagram of another embodiment of the data transmission device provided by the application.
  • Figure 30 is a pinout diagram of the TypeC interface
  • FIG. 31 is a schematic structural diagram of another embodiment of the data transmission apparatus provided by the present application.
  • FIG. 1 is a schematic diagram of the application scenario of the application, in which, taking the scenario where the user needs to share the presentation in the electronic device 1 as an example, the electronic device 1 can be an external computer. Due to the limitation of the screen size of the electronic device 1, the user can After the electronic device 1 is connected to the data transmission device 3 using the connecting line 2 , the data transmission device 3 projects the presentation screen displayed on the display interface of the electronic device 1 to the display device 4 hung on the wall for display.
  • the electronic device 1 can also be a notebook computer, a tablet computer, an external computer, a desktop computer or a workstation, etc. with a display interface; data communication can be performed between the electronic device 1 and the data transmission device 3, for example, the electronic device 1 and data
  • a connection line 2 may be provided between the transmission devices 3 to be connected to each other through wired communication.
  • the connection line 2 may be a Universal Serial Bus (Universal Serial Bus, referred to as: USB) connection cable, a High Definition Multimedia Interface (High Definition Multimedia Interface, referred to as: HDMI) connection cable or a network cable or the like.
  • the USB cable may be a TypeC cable.
  • connection line 2 can be integrated with the data transmission device 3 , that is, the connection line 2 and the data transmission device 3 together form an integral device. At this time, the connection line 2 can be regarded as a part of the data transmission device 3 In this way, when the user connects the data transmission device 3 to the electronic device 1, the step of connecting the data transmission device 3 to one end of the connecting wire 2 can be omitted, and the user only needs to connect the electronic device 1 to the other end of the connecting wire, thereby The efficiency is improved, and the situation that the data transmission device 3 cannot be connected to the electronic device 1 can be avoided because the connecting wire 2 cannot be found.
  • the data transmission device 3 and the display device 4 can be connected through wireless communication, the wireless communication includes but is not limited to: Wireless Fidelity (Wireless Fidelity, Wi-Fi), Bluetooth or other short-range wireless communication, etc.; in some implementations
  • the data transmission device 3 may also be referred to as a screen projection device, a screen projection device, a wireless screen projection device, a screen transmission device or a wireless screen transmission device, etc.
  • the display device 4 may also be referred to as a large-screen tablet, etc.
  • the display device 4 The sharing of presentations in the electronic device 1 can be realized together with the data transmission device 3 .
  • the display device 4 can also independently implement functions such as remote instant communication and providing a writing canvas through a touch-sensitive panel.
  • FIG. 2 is a schematic structural diagram of a data transmission device in a technology, wherein the data transmission device 3 includes: a communication interface 31 and a data transmission module 32, and the data transmission module 32 can be connected to the connection line 2 through the communication interface 31. Then, the data transmitted by the electronic device 1 is received.
  • the communication interface 31 can be a TypeC interface, and the TypeC interface can be compatible with USB and Type-C data, that is, the TypeC interface can transmit DP data and also transmit USB data.
  • the electronic device 1 may also provide a USB interface, so that after the USB connection line 2 establishes the connection between the electronic device 1 and the two USB interfaces of the data transmission device 3, the connection between the electronic device 1 and the data transmission device 3 is established. . Since the USB connection line can transmit both data and power, the electronic device 1 can provide data and power to the data transmission module 32 through the connection line 2 and the communication interface 31 in turn, so that the data transmission module 32 and the communication interface 31 are connected between the data transmission module 32 and the communication interface 31.
  • the data transmission module 32 can receive the power transmitted from the electronic device 1 through the path 1 in the figure, and can also receive the power from the electronic device through the path 2 in the figure. 1 After transmitting the data of the display interface, the display interface is projected to the display device 4 for display through wireless communication.
  • the data transmission module 32 may include a Wi-Fi module and a microprocessor, and the microprocessor is connected to the TypeC interface.
  • the communication interface of the data transmission device 3 is a TypeC interface
  • the structure of the data transmission module 32 of the data transmission device 3 the connection between the data transmission module 32 and the TypeC interface, and the structure and implementation of the peripheral circuit are specifically described.
  • the electronic device 1 since the power required for the data transmission module 32 to complete the startup and the projection of the display interface is completely provided by the electronic device 1 , the electronic device 1 needs to send the data to the electronic device 1 through the connecting line 2 at the same time.
  • the data transmission module transmits data and power, and the data transmission module 32 is in a shutdown state because there is no input power when the data transmission device 3 is not connected to the electronic device 1 .
  • the data transmission module 32 cannot immediately receive data and perform operations such as projection of the display interface, but needs to first receive power through the path 1 for data transmission.
  • the data transmission module 32 can only receive data through the path 2 after operations such as startup, initialization, and communication configuration of the transmission module 32 make the data transmission module 32 switch from the shutdown state to the working state. It can be understood that the moment when the electronic equipment 1 and the data transmission device 3 are connected through the connecting line 2 is recorded as the first moment, and the moment when the data transmission module 32 is switched from the shutdown state to the working state is recorded as the second moment, then. Between the first time and the second time, even if the electronic device 1 transmits the data of the display interface to the data transmission module 32 through the path 2, the data transmission module 32 cannot project the display interface to the display device 4 for display.
  • the data transmission module 32 Only when the data transmission module 32 is switched to the working state, that is, after the data transmission module 32 is ready for screen projection, after the second moment, the data of the display interface transmitted by the electronic device 1 to the data transmission module through the path 2 is It can be received by the data transmission module 32 through the path 2 and projected to the display device 4 for display.
  • the intuitive feeling caused to the user is that when the electronic device 1 and the data transmission device 3 are connected through the connecting line 2 (the first moment).
  • FIG. 3 is a schematic structural diagram of a data transmission device in another technology, wherein, in addition to the communication interface 31 and the data transmission module 32 in the data transmission device 3, a power supply for supplying power to the data transmission module 32 is also specially set 33, when the communication interface 21 in the data transmission device 3 is not connected with the electronic equipment 1, the power supply 33 set in the data transmission device 3 provides power to the data transmission module 32 through the path 3, so that the data transmission module 32 is in the data transmission module 32.
  • the transmission device 3 When the transmission device 3 is not connected to the electronic device 1 through the connecting wire 2, it can still maintain the working state. After the user connects the electronic device 1 and the communication interface 31 of the data transmission device 3 through the connecting line 2 (recorded as the first time), the data transmission module 32 can start to pass the path after the first time because the data transmission module 32 is always in the working state. 2Receive the data of the display interface of the electronic device 1, and project the display interface to the display device 4 for display. After the user connects the electronic device 1 and the data transmission device 3 through the connecting line 2, the projected display interface of the electronic device 1 can be quickly seen on the display device 4, which improves the response speed and work efficiency, and provides users with Come to the intuitive feeling of "plug and play".
  • the data transmission device 3 shown in FIG. 3 improves the response speed and work efficiency, in order to keep the data transmission module 32 in the data transmission device 3 in a working state at any time, to extend the data transmission device 3 as much as possible to achieve " The battery life of the "plug and play” function, the capacity and volume of the power supply 33 in the data transmission device 3 are relatively large, occupying a large amount of space in the data transmission device 3, and seriously affecting the internal layout and external appearance of the data transmission device 3. design.
  • the data transmission device shown in Figure 2 has the problems of slow response speed and low work efficiency
  • the data transmission device shown in Figure 3 has the shortage of equipment space and capacity, and how to take into account the space and efficiency, Under the condition that the power supply in the data transmission device does not need excessive capacity and volume, it can also improve the response speed and work efficiency of the data transmission device when transmitting data, which is a technical problem to be solved urgently in the art.
  • the present application provides a data transmission method and a data transmission device.
  • the data transmission device is provided with a microcontroller and a vibration sensor.
  • the microcontroller will not control the power supply to supply power to the data transmission module through the controllable switch, so that the data transmission module is not powered And keep the shutdown state; only when the vibration sensor detects that the user moves the data transmission device (for example, when the user picks up the data transmission device), then the microcontroller controls the power supply to supply power to the data transmission module through the controllable switch, so that the data transmission
  • the module starts to start before the data transmission device is connected to the electronic equipment, and starts to switch from the shutdown state to the working state, so as to improve the response speed and work efficiency of the data transmission device, and at the same time, the power supply does not need to supply power to the data transmission module all the time.
  • the microcontroller in the data transmission device may be in a standby state when the vibration sensor does not detect that the user moves the data transmission device, wherein the power consumption of the microcontroller in the standby state is less than that in the normal working state, In order to save the power consumption of the microcontroller itself, the microcontroller can be powered by the power supply in the data transmission device.
  • the microcontroller when the microcontroller is in the standby state, only when the vibration sensor detects that the user moves the data transmission device (for example, when the user picks up the data transmission device), the microcontroller is woken up, switched from the standby state to the working state, and then the microcontroller The controller controls the power supply to supply power to the data transmission module through the controllable switch, so that the data transmission module starts to start before the data transmission device is connected with the electronic equipment.
  • FIG. 4 is a schematic diagram of an application scenario framework of the data transmission device provided by an embodiment of the present application.
  • the data transmission device 3 provided in this embodiment includes: a communication interface 31 , a data transmission module 32 and a power supply 33 .
  • the module 32 can receive the power transmitted from the electronic device 1 through the path 1 in the figure, and can also receive the data from the display interface transmitted by the electronic device 1 through the path 2 in the figure, and communicate with the display device 4 through wireless communication. Data communication is carried out, which includes projecting the display interface to the display device 4 for display.
  • the power supply 33 can provide power to the data transmission module 32 through the path 3, so that the data transmission module 32 is in a working state.
  • the The power supply 33 does not always provide power to the data module 32 through the path 3, but supplies power to the data module according to the on state or off state of the controllable switch 36 connected between the power supply 33 and the data transmission module 32. 32 provides electrical energy.
  • the controllable switch 36 when the controllable switch 36 is turned on, the power supply 33 can transmit power to the data transmission module 32 through the controllable switch 36, and when the controllable switch 36 is turned off, the power supply 33 cannot pass the controllable switch 36 to the data transmission module. 32 powered.
  • the on-off control of the controllable switch 36 is realized through the microcontroller 34 and the vibration sensor 35 .
  • the vibration sensor 35 inside the data transmission device 3
  • the movement conditions generate detection data, which can be sent to the microcontroller 34 .
  • the vibration sensor 35 is an acceleration sensor in this embodiment, and the vibration sensor 35 generates detection data according to the movement of the data transmission device, and the detection data includes at least the acceleration value of the vibration sensor 35 itself.
  • the microcontroller 34 can control the controllable switch 36 between the power supply 33 and the data transmission module 32 to be turned on or off according to the detection data generated by the vibration sensor 35, thereby controlling whether the power supply 33 passes the path 3 to the data transmission module 32.
  • Provide power That is to say, although the data transmission device 3 in this embodiment is provided with a power supply 33 connected to the data transmission module 32, whether the power supply 33 provides power to the data transmission module 32 is determined by the microcontroller 34 according to the vibration sensor. 35 detection data to control.
  • the data transmission device 3 is usually placed on the table in the conference room, and the table will be subjected to various external forces to generate large or small vibrations.
  • the data transmission device 3 will be slightly moved and accidentally triggered, so that the vibration sensor will generate useless signals.
  • the microcontroller 34 can store the preset acceleration threshold by pre-storing the acceleration threshold. The device 34 receives the detection data sent by the vibration sensor 35 and carries the acceleration value of the vibration sensor 35 itself.
  • the control power supply 33 and the data transmission module 32 are connected between the The controllable switch 36 is turned on, so that the power supply 33 provides power to the data transmission module 32 through the path 3; or, in another possible implementation, the vibration sensor 35 can also pre-store an acceleration threshold, and the vibration sensor 35 determines that in the detection data
  • the vibration sensor 35 sends an interrupt signal to the microcontroller 34, and when the microcontroller 34 receives the interrupt signal, the controllable switch 36 between the control power supply 33 and the data transmission module 32 is turned on , so that the power supply 33 provides power to the data transmission module 32 through the path 3.
  • the vibration sensor 35 may specifically be an acceleration sensor provided in the data transmission device 3 , and the acceleration sensor may obtain the current data transmission device 3 in the three reference axes according to the movement of the data transmission device 3 .
  • the real-time acceleration values in a total of six directions are negative, and the real-time acceleration values in these six directions can be used as the detection data generated by the vibration sensor 35 .
  • FIG. 5 is a schematic diagram of a connection relationship between a microcontroller and a vibration sensor provided by an embodiment of the application, wherein the connection relationship between the microcontroller 34 and the vibration sensor 35 includes at least I2C (Inter-Integrated Circuit). Connection and/or Interrupt (abbreviation: INT) connection.
  • I2C Inter-Integrated Circuit
  • connection relationship may be a plurality of physical connection lines or an integrated connection line, and the specific implementation of the connection relationship is not limited in this application. ), the connection relationship may be a conductive line printed on the circuit board.
  • the microcontroller 34 can initialize the vibration sensor 35 through the I2C connection, and the microcontroller 34 can also read the detection data of the vibration sensor 35 through the I2C connection. At this time, the microcontroller 34 needs to actively obtain the vibration sensor 35 detection data.
  • the vibration sensor 35 can send an interrupt (INT for short) signal to the microcontroller through the INT connection.
  • INT interrupt
  • the I2C connection is set when only the I2C signal is transmitted between the microcontroller 34 and the vibration sensor 35, or
  • the INT connection is set when only the INT signal is transmitted between the microcontroller 34 and the vibration sensor 35 .
  • the power supply 33 in the data transmission device 3 provided in this embodiment may also be used to supply power to the microcontroller 34 .
  • the microcontroller 34 may have two power consumption states, a first power consumption operating state and a second power consumption operating state, respectively. Before the microcontroller 34 receives the detection data or the interrupt signal, the microcontroller 34 is in the first power consumption working state under the power supply of the power supply of the data transmission device 3; after the microcontroller 34 receives the detection data or the interrupt signal, it is in the second power consumption state. Power consumption working state. In some application scenarios, the power consumption of the microcontroller 34 in the first power consumption working state is lower than that in the second power consumption working state.
  • the first power consumption working state may be a low power consumption working state
  • the second power consumption working state may be a high power consumption working state.
  • the microcontroller 34 can be selected as a micro control unit (Micro Control Unit, MCU for short) with a low power consumption working state. When the microcontroller 34 is in a standby state, the microcontroller 34 can be maintained in a low power consumption state, and its work The current can be limited to uA level, so as to minimize the power consumption of the power supply 33 by the microcontroller 34 itself when the data transmission device 3 is not connected to the electronic device 1 .
  • FIG. 6 is a schematic structural diagram of a vibration sensor provided by some embodiments of the application, wherein the vibration sensor can be selected as an acceleration sensor chip of type “LIS3DHTR”, and FIG. 7 is a schematic diagram of a vibration sensor provided by some embodiments of the application.
  • a schematic diagram of the structure of a microcontroller wherein the microcontroller can be selected as an MCU chip of the model "STM32L011D3P6".
  • the INT1 pin of the vibration sensor is connected to the PC15/OSC32_OUT pin of the microcontroller to achieve the "INT connection" shown in Figure 5.
  • the vibration sensor can be connected to the micro controller through the INT1 pin.
  • the PC15/OSC32_OUT pin of the controller sends an interrupt signal.
  • the SCL/SPC pin of the vibration sensor is connected to the PA9/I2C1_SCL/USART2_TX pin of the microcontroller, and the SDA/SDI/SDO pin of the vibration sensor is connected to the PA10/I2C1_SDA/USART2_RX pin of the microcontroller.
  • the "I2C connection" shown, the vibration sensor can send I2C data (I2C serial data) to the PA10/I2C1_SDA/USART2_RX pin of the microcontroller through the SDA/SDI/SDO pin, and the vibration sensor can send the micro-controller through the SCL/SPC pin.
  • FIG. 6 and FIG. 7 only show a possible selection of the microcontroller and the vibration sensor in the embodiment of the present application, and the present application does not limit the specific implementation of the microcontroller and the vibration sensor.
  • controllable switch 36 provided in this embodiment may be a switch tube such as a triode, a field effect transistor, etc.
  • controllable signal sent by the microcontroller 34 to the control terminal of the controllable switch 36 may be a high level or low level.
  • controllable switch 36 is a field effect transistor
  • the control terminal of the field effect transistor is the gate, and the source and drain are respectively connected to the data transmission module 32 and the power supply 33.
  • the first turn-on signal when the gate of the field effect transistor receives A signal in the form of a high level (corresponding to the N-channel type) or a low level (corresponding to the P-channel type) is denoted as the first turn-on signal, the first turn-on signal can make the field effect transistor close, and the field effect transistor source
  • the power supply 33 can supply power to the data transmission module 32 through the controllable switch 36; and when the field effect transistor receives a low level (corresponding to the N-channel type) or a high level (corresponding to the P-channel type) Type) form signal, denoted as the first off signal, the first off signal can control the FET to turn off, the source and drain of the FET are turned off, and the power supply 33 will not transmit to the data transmission module 32. powered by.
  • the data transmission device 3 is provided with a power supply interface, the power supply interface is used to connect the power supply 33 , and the power supply 33 can provide power to the data transmission module 32 through the power supply interface.
  • the power supply 33 in the data transmission device 3 may include a non-removable battery, and the battery is connected to the data transmission module 32 through the power interface in the data transmission device 3 , so that the battery can provide the data transmission module 32 electrical energy.
  • the power supply 33 in the data transmission device 3 may include a detachable battery. When the data transmission device 3 is equipped with a battery, the battery is connected to the data transmission module 32 through the power interface in the data transmission device 3 , so that the battery can provide power for the data transmission module 32 .
  • FIG. 8 is a schematic flowchart of a data transmission method provided by an embodiment of the present application, which can be used for execution by the data transmission device 3 shown in FIG. 4 .
  • the Methods include:
  • the microcontroller 34 receives detection data sent by the vibration sensor 35, where the detection data carries the acceleration value of the vibration sensor 35 itself.
  • the microcontroller 34 when the microcontroller 34 controls the data transmission device 3 , it first needs to acquire the detection data obtained by the vibration sensor 35 to detect the movement of the data transmission device 3 .
  • the detection data includes at least the acceleration value of the vibration sensor itself.
  • the vibration sensor 35 is an acceleration sensor, and the acceleration sensor will detect the motion state of the movement of the data transmission device 3 in real time, and generate acceleration data in six directions (for example, the acceleration data detected in a certain embodiment are 0 mg, 200 mg, and 100 mg). , 150mg, 0mg, 400mg).
  • the microcontroller 34 can obtain the detection data detected by the vibration sensor 35 in real time through the connection with the vibration sensor 35 at regular intervals; or, the vibration sensor 35 can send the detection data detected in real time to the microcontroller 34 at regular intervals. .
  • the microcontroller 34 may store the preset acceleration threshold by means of pre-storing the acceleration threshold. Subsequently, the microcontroller 34 determines whether the acceleration value of the vibration sensor 35 itself received from the vibration sensor 35 exceeds the acceleration threshold. If so, it means that the data transmission device 3 has moved, possibly because the user is about to connect the electronic device through the connecting line 2 1 and the data transmission device 3, the data transmission device 3 has been moved; if not, it means that the data transmission device 3 has not moved and is in a stationary state.
  • the microcontroller 34 sends the first conduction signal to the controllable switch 36 .
  • the microcontroller 34 only needs to determine that the acceleration value in at least one direction exceeds the acceleration threshold. Both send a first turn-on signal to the controllable switch 36 .
  • the controllable switch 36 is closed according to the first conduction signal to conduct the power supply connection between the power supply 33 and the data transmission module 32 , and the power supply 33 supplies power to the data transmission module 32 through the controllable switch 36 .
  • the data transmission module 32 performs communication configuration.
  • the power supply 33 supplies power to the data transmission module 32, so that the data transmission module 32 can start to perform a communication configuration after being powered on, and the communication configuration includes: communication The communication configuration of the interface 31 ; and/or the communication configuration of the data transmission module 32 to perform data communication with the display device 4 .
  • the vibration sensor 35 determines the detection data Whether the self-acceleration value reaches the preset acceleration threshold value, when the vibration sensor 35 judges that the self-acceleration value reaches the preset acceleration threshold value, it can be sent to the microcontroller 34 through the INT connection set between the microcontroller 34 and the vibration sensor 35
  • the interrupt signal enables the microcontroller 34 to control the on-off of the controllable switch 36 according to whether the interrupt signal is received.
  • FIG. 9 is a schematic flowchart of a data transmission method provided by an embodiment of the application, which can be used for execution by the data transmission device 3 shown in FIG. 4 .
  • the data transmission device shown in FIG. 4 3 can be configured to perform any one of the data transmission methods in the embodiments shown in FIG. 8 or FIG. 9; According to the instructions or settings of the user of the data transmission device 3, any one of the data transmission methods is executed, thereby enriching the functions of the data transmission device 3, allowing the user to flexibly select and set, thereby improving the user experience.
  • the method includes:
  • the vibration sensor 35 generates detection data according to the movement of the data transmission device 3, wherein the detection data includes at least the acceleration value of the vibration sensor 35 itself.
  • the vibration sensor 35 will continuously generate detection data carrying its own acceleration value at preset time intervals, and will not directly send the detection data to the microcontroller 34 after each generation of detection data. , but compare the acceleration value in the detected data with a preset acceleration threshold; wherein, in some embodiments, the preset acceleration threshold may be pre-stored in the vibration sensor 35 by sending an instruction from the microcontroller 34, and In other embodiments, the vibration sensor 35 may also preset the trigger threshold of the vibration sensor 35 as the preset acceleration threshold by means of hardware parameters of the peripheral hardware circuit of the vibration sensor 35 .
  • the vibration sensor 35 When the acceleration value in the detection data generated by the vibration sensor 35 does not exceed the preset acceleration threshold, the vibration sensor 35 does not perform other operations, but continues to generate detection data at intervals; When the acceleration value in the detected data exceeds the preset acceleration threshold, it means that the data transmission device 3 has moved, and the vibration sensor 35 can send an interrupt signal to the microcontroller 34 through the INT connection with the microcontroller 34 .
  • the microcontroller 34 After receiving the interrupt signal sent by the vibration sensor 35 through the INT connection in S202, it sends a first turn-on signal to the controllable switch.
  • S204 The controllable switch 36 is closed according to the first conduction signal, and the power supply connection between the power supply 33 and the data transmission module 32 is turned on.
  • controllable switch 36 is closed according to the first conduction signal, and the power supply connection between the power supply 33 and the data transmission module 32 is turned on, and the power supply 33 supplies power to the data transmission module 32 through the controllable switch 36 .
  • the data transmission module 32 performs communication configuration.
  • the power supply 33 supplies power to the data transmission module 32, so that the data transmission module 32 can start to perform a communication configuration after being powered on, and the communication configuration includes: communication The communication configuration of the interface 31 ; and/or the communication configuration of the data transmission module 32 to perform data communication with the display device 4 .
  • a vibration sensor for detecting whether the data transmission device is moving is set in the data transmission device, and the switch between the power supply and the data transmission module can be controlled according to the detection data of the vibration sensor.
  • a microcontroller that controls the switch to be turned on so that the power supply can supply power to the data transmission module. Only when the microcontroller detects the movement of the data transmission device according to the vibration sensor, will the controllable switch between the power supply and the data transmission module be turned on. , so that the power supply supplies power to the data transmission module.
  • the power supply may not supply power to the data transmission module; and when the user uses the data transmission device in this embodiment, once it is detected that the user moves the data transmission device ( Denoted as time T0), which means that the user may be about to connect the electronic equipment with the data transmission device through the connecting line, and at time T0 the microcontroller controls the power supply to supply power to the data transmission module, so that the data transmission module is connected between the data transmission device and the data transmission module. Before the electronic device is connected, it starts to start and performs communication configuration.
  • the data transmission module completes configuration operations such as communication configuration at time T1
  • the data transmission device is connected by a connecting line, and since the data transmission module in the data transmission device has completed the configuration operations such as communication configuration, it can start to receive the data of the display interface sent by the electronic device from the communication interface after time T2 and project it to the display interface.
  • the display device if the user connects the electronic device and the data transmission device through a connecting line at time T3 between time T0-T1, the process from the user picking up the data transmission device to inserting the electronic device is shorter, but also It is only necessary to wait for the time between time T3 and time T1.
  • the data transmission module can receive the display interface data sent by the electronic device from the communication interface. and cast to the display device.
  • the data transmission device Compared with the data transmission device shown in FIG. 2 , the data transmission device provided in this embodiment, because the data transmission module starts to start before the data transmission device is connected to the electronic device, reduces the waiting time of the user when using the data transmission device , ideally, no waiting time is required, so the response speed and work efficiency of the data transmission device are improved; compared with the data transmission device shown in The movement detection module actually detects that the user may have moved the data transmission device, and then controls the power supply to supply power to the data transmission module, thereby reducing the need for the power supply to provide power to the data transmission module, and can reduce the amount of power set in the data transmission device. The capacity and volume of the power supply.
  • the data transmission device provided by the present application can take into account both space and efficiency, and can also improve the response speed and work efficiency of the data transmission device during data transmission when the power supply in the data transmission device does not require excessive capacity and volume.
  • a controllable switch is set between the power supply and the data transmission module, and whether the power supply supplies power to the data transmission module can be controlled by turning on and off the switch, so that a relatively simple
  • the circuit structure realizes the control of the power supply by the microcontroller.
  • the power supply 33 directly supplies power to the data transmission module 32 and the microcontroller 34 as an example.
  • the electrical energy provided by the electronic device 1 also directly supplies power to the data transmission module 32 and the microcontroller 34 through the communication interface 31 .
  • the power source 33 may be a battery that can be charged and discharged in the data transmission device 3, and then the timing of charging and discharging the battery needs to be controlled. Therefore, in a possible specific implementation of the power source 33, FIG. 10 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application. In the data transmission device shown in FIG.
  • the power supply 33 may specifically include a power management module 331 and The battery 332, wherein the battery 332 is used to store electrical energy, the battery 332 set in the data transmission device in this embodiment can be a lithium battery, for example, the power consumption can be selected below 1mA, and the capacity is between 50-100mAH; the power management module 331
  • the communication interface 31 and the battery 332 are connected, and the power management module 331 performs electric energy charge and discharge management on the battery 332 according to the electric energy from the electronic device 1 obtained by the communication interface 31 .
  • the battery 332 supplies power to the microcontroller 34 and the data transmission module 32 through the power management module 331 .
  • the power management module 331 may include an IC (Integrated Circuit, integrated circuit) chip for performing charge and discharge management of the battery 332 .
  • the power management module 331 can transmit the power received by the communication interface 31 to the battery 332 as a battery 332 charge.
  • the power management module 331 can control the battery 332 to output power, so that the power output by the battery 332 is transmitted to the microcontroller 34 to supply power, and is transmitted to the data transmission through the path 3 in FIG. 10 Module 32 is powered.
  • FIG. 11 is a schematic diagram of an application scenario framework of the data transmission device provided by an embodiment of the application.
  • the data transmission device shown in FIG. 11 is based on the embodiment shown in FIG.
  • the management module 331 may specifically include a charge management IC chip 3311 and a power supply chip 3312, and the power supply chip 3312 may be a DC-DC converter (DC to DC converter) or an LDO (low dropout regulator, low dropout linear regulator), It is used to convert the voltage provided by the power supply 322 (typically 3.5V-4.2V) into a suitable voltage (eg, 3.3V) to power the microcontroller 34 .
  • DC-DC converter DC to DC converter
  • LDO low dropout regulator, low dropout linear regulator
  • the charging management module is specifically used to manage the battery 332 when it is being charged, and the electrical energy transmitted by the electronic device 1 is received through the communication interface 31 to charge the battery 332.
  • the battery 332 is a lithium battery, it can convert the direct current into a constant current output power supply.
  • the battery 332 is charged, and when discharged, power is supplied to the data transmission module 32 through the path 3, and power is supplied to the microcontroller 34 through the power chip 3312 .
  • FIG. 12 is a schematic diagram of a charge management IC chip and peripheral circuits provided by some embodiments of the application, wherein the charge management IC chip can be selected as a power management chip of the model "SY6952B", wherein the " The IN" pin is connected to the communication interface 31, and the power VBUS transmitted by the electronic device 1 can be received through the communication interface 31.
  • the "LX" pin of the charge management IC chip is connected to the battery B1, and the charge management IC chip can be used to control the slave "IN” tube.
  • the power VBUS received by the pin charges the battery 1.
  • FIG. 13 is a schematic diagram of a power supply chip and peripheral circuits provided by some embodiments of the application, wherein the power supply chip can be selected as a power supply chip of the model "LC1458CB5TR33", wherein the VIN pin of the power supply chip is connected to the power VBAT provided by the battery, and the VOUT tube The pin is connected to the power supply pin of the microcontroller 34 , and the power supply chip can be used to convert VBAT into a voltage suitable for the operation of the microcontroller, such as (3.3V), and provide it to the microcontroller 34 .
  • FIG. 12 and FIG. 13 only show a possible selection of the charging management IC chip and the power supply chip in the embodiment of the present application, and the specific implementation of the charging management IC chip and the power supply chip is not limited in the present application. .
  • the data transmission device provided in this embodiment on the basis of the data transmission device in the previous embodiment, further refines the structure of the power supply, and the management module provided in the power supply controls the charging and discharging of the battery.
  • the electrical energy provided by the electronic device to the data transmission device can be charged to the battery, so that after the subsequent data transmission device is disconnected from the electronic device, the battery can be used to charge the microcontroller and the micro-controller in the data transmission device.
  • the data transmission module and the like are used to supply power, thereby increasing the battery life of the power supply in the data transmission device, and since the battery can be charged, the requirements for the battery capacity can be further reduced.
  • the power supply pin of the interface of the electronic device 1 provides power to the data transmission device 3.
  • the battery 332 of the transmission device 3 has a higher voltage, so the power supply of the electronic device 1 can directly charge the battery 332 through the path of “communication interface 31-controllable switch 36-battery 332”. Because the charging current and/or charging voltage is not processed by the power management module 331 (see the above for the processing, for example, including converting the output voltage and/or output current of the electronic device into a suitable output voltage and/or output current) , the charging current and/or charging voltage is too high or too low, so that the battery 332 may be damaged.
  • an external power supply detection module can be provided, and the external power supply detection module can detect whether the data transmission device 3 is provided with working power by the electronic device 1, and if so, Then, the external power detection module sends a level signal to the controllable switch 36 to indicate that the controllable switch 36 is disconnected. Since the controllable switch 36 is turned off, the power supply of the electronic device 1 cannot directly charge the battery 332 through the path of "communication interface 31 - controllable switch 36 - battery 332 ".
  • the data transmission device 3 further includes an external power detection module, and the external power detection module is used to detect the communication in the data transmission device 3 Whether the interface 21 is connected to an external power supply, wherein, the communication interface 21 in the data transmission device 3 is connected to an external power supply, which may be the data transmission device 3 in the scenario shown in FIG. Power supply; the communication interface 21 in the data transmission device 3 is not connected to an external power supply, which may be that the data transmission device 3 is not connected to the electronic device 1 through the connecting line 2 in the scenario shown in FIG.
  • FIG. 14 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the application.
  • the data transmission device 3 shown in FIG. 10 further includes an external power detection module on the basis of the embodiment shown in FIG. 4 . 37.
  • the external power supply detection module 37 is respectively connected with the communication interface 31 and the controllable switch 36, and is used to detect whether the communication interface 31 has external power supply access, and when it is detected that the communication interface 31 has no external power supply access, to the available power supply.
  • the controllable switch 36 sends a second conduction signal, and the second conduction signal is used to instruct the controllable switch 36 to close.
  • the electronic device 1 can transmit power to the communication interface 31 of the data transmission device 3 through the connection line 2.
  • the electronic device 1 received by the data transmission device 3 Therefore, the electronic device 1 can be referred to as an external power source, and correspondingly, the power source 33 provided in the data transmission device 3 can be referred to as an internal power source.
  • the microcontroller 34 When the microcontroller 34 detects the movement of the data transmission device 3, it will send the first conduction signal to the controllable switch 36, indicating that the controllable switch 36 is closed, and the external power detection module 37 detects that the communication interface 31 has no external power connection. At the time of entry, a second conduction signal is also sent to the controllable switch 36 to instruct the controllable switch 36 to be closed. Therefore, the controllable switch 36 in the data transmission device 3 can be provided with a related control circuit, so that the first conduction signal provided by the microcontroller 34 and the second conduction signal of the external power detection module 37 can be jointly used to control the controllable switch 36 switch 36.
  • the microcontroller 34 determines according to the detection data of the vibration sensor 35 that the data transmission device 3 is currently being moved by the user, and the user may connect an electronic device later, the microcontroller 34 provides the controllable switch 36 with a first conduction signal.
  • the communication interface 31 is already connected to the electronic device 1 through the connection line 2, it is meaningless to conduct the controllable switch 36 according to the first conduction signal. Therefore, when the external power supply detection module 37 determines that the current communication interface 31 is not connected to the external power supply, it can send the second conduction signal to the controllable switch 36, so that the controllable switch 36 receives the first conduction signal and the second conduction signal at the same time.
  • the ON signal can only be closed.
  • the external power supply detection module 37 detects that the external power supply is connected to the communication interface 31 (that is, the data transmission device 3 is connected to the electronic device 1), it is not The second conduction signal will be sent to the controllable switch (in one implementation, when the second conduction signal is high, the low level can be regarded as not sending the second conduction signal; or, when the second conduction signal is When the turn-on signal is low, the high level can be regarded as not sending the second turn-on signal, or recorded as the second turn-off signal), at this time, no matter whether the controllable switch 36 receives the signal sent by the microcontroller 34 or not. For the first turn-on signal, the controllable switch 36 will be disconnected without receiving the second turn-on signal, so that the power supply connection between the internal power supply and the data transmission module 32 is disconnected.
  • FIG. 4 is a schematic diagram of the related circuit structure of the controllable switch and the AND gate circuit provided by some embodiments of the application, as shown in FIG.
  • the turn-on and turn-off of the switch 36 can be realized by the turn-on and turn-off of the field effect transistor Q4 in the figure.
  • the source S of the field effect transistor Q4 is connected to the pin VBAT of the internal power supply, and the drain D is connected to the data transmission module. 32's power supply terminal VIN_805_7911.
  • the optional type of the field effect transistor Q4 is a p-channel enhancement type field effect transistor, then when the gate G is used as the control terminal of Q4, when a low level signal is received, the field effect transistor Q4 is closed, and the source S and the drain D are turned on; when receiving a high level signal, the field effect transistor Q4 is turned off, and the source S and the drain D are turned off.
  • a logic gate circuit is also provided before the field effect transistor Q4 for combining the first turn-on signal provided by the microcontroller 34 and the second turn-on signal provided by the external power detection module 37, The two turn-on signals together determine the high-level signal or the low-level signal sent to the field effect transistor Q4.
  • the logic gate circuit is an AND gate circuit as an example.
  • the first input terminal of the AND gate circuit D36 can be used to receive the "MCU_CL” signal, wherein the low-level signal output by the microcontroller through the STM32_1108_IO pin is denoted as the first turn-on signal, this low-level signal
  • the signal can be used to indicate that the field effect transistor Q4 is closed, then in the circuit shown in Figure 15, the low level signal output by the STM32_1108_IO pin can make the transistor QM2 (marked as the second transistor) disconnected to obtain a high voltage
  • the flat "MCU_CL” signal ie, the low-level signal output by the microcontroller 34 is processed in reverse), and the high-level "MCU_CL” signal is input to the AND gate circuit D36.
  • the high-level signal output by the microcontroller through the STM32_1108_IO pin can be recorded as the first disconnection signal, this high-level signal can be used to indicate that the field effect transistor Q4 is disconnected, as shown in Figure 15.
  • the high-level signal output by the STM32_1108_IO pin is reversely processed by the transistor QM2 and input to the AND gate circuit D36 is the low-level "MCU_CL” signal. At this time, the low-level "MCU_CL” signal input and Gate circuit D36.
  • the second input terminal of the AND gate circuit D36 can be used to receive the “VBS_CL” signal
  • FIG. 16 is a schematic diagram of a partial circuit structure of an external power supply detection module provided by some embodiments of the application, wherein the external power supply detection module 37 may include a triode QM1 (denoted as the first triode), the base of the triode QM1 can be connected to the communication interface of the data transmission device 3, and is used to detect whether the communication interface is connected to the external power supply VBUS, the emitter is grounded, and the collector is grounded.
  • the internal power supply (VBAT) is connected and can be used to output the "VBS_CL” signal.
  • the transistor QM1 is disconnected, and the output "VBS_CL” signal is a high-level signal (VBAT), which can be recorded as the second conduction signal.
  • VBAT high-level signal
  • the user can instruct the FET Q4 to close; and when the communication interface is connected to an external power supply and VBUS is at a high level, the transistor QM1 is turned on, and the output "VBS_CL” signal is a low level signal (ground), which can be recorded as the second off On signal, this low level signal can be used to instruct the FET Q4 to be disconnected.
  • the AND gate circuit D36 can jointly determine the output of the AND gate circuit D36 to the field effect according to the "MCU_CL” signal sent by the microcontroller in the first aspect and the "VBS_CL” signal sent by the external power supply detection module 37 in the second aspect.
  • the signal sent by the transistor Q4 is specifically a low-level signal or a high-level signal to control the closing and opening of the field effect transistor Q4.
  • Table 1 The logical correspondence between the "MCU_CL” signal and the "VBS_CL” signal is shown in Table 1 below.
  • the "MCU_CL" signal output by an input terminal is a low-level signal.
  • the diode under the AND gate circuit D36 is turned on, so that the AND gate circuit D36 outputs a low-level signal, so that the transistor QM3 (denoted as the third transistor ) is disconnected, the final input signal to the gate G of the field effect transistor Q4 is a high level signal (the high level signal output by the internal power supply VBAT through the resistors RM7 and RM9), the field effect transistor Q4 is disconnected, the source S and drain When it is turned off between D, the internal power supply will not supply power to the data transmission module 32 through the field effect transistor Q4.
  • the final input signal to the gate G of the field effect transistor Q4 is a low level signal (ground), the field effect transistor Q4 is closed, the source S and the drain D are turned on, and the internal power supply transmits the data through the field effect transistor Q4 Module 32 is powered.
  • the electronic device 1 can provide power to the data transmission device 3 through the connection line 2, and the external power detection module 37 provides the AND gate circuit D36 with power.
  • Output the second disconnection signal that is, in the circuit shown in Figure 15, the "VBS_CL” signal output by the external power supply module 37 to the second input terminal of the AND gate circuit D36 is a low level signal, and the diode above the AND gate D36 in Figure 15 If it is turned on, then no matter whether the "MCU_CL" signal sent by the microcontroller 34 to the first input terminal of the AND gate circuit D36 is a high-level signal or a low-level signal, the AND gate D36 outputs a low-level signal to the transistor QM3 The base of the transistor QM3 is disconnected, and finally the signal input to the gate G of the field effect transistor Q4 is a high level signal (the high level signal output by the internal power supply VBAT through the resistors RM7 and RM9),
  • capacitors, resistors and other devices provided in the circuit structures shown in FIG. 15 and FIG. 16 are for the purpose of voltage division and protection, and belong to the above-mentioned functional elements such as field effect transistors, triodes, and AND gate circuits in this application.
  • this application does not limit whether resistors and capacitors are set at various positions in the circuit, as well as the size and specifications of the set resistors and capacitors. In practical applications, it can be based on specific circuit requirements and the work of functional components. Parameters can be set and adjusted adaptively.
  • the microcontroller controls the power supply to quickly supply power to the data transmission module, so that the data transmission module can be powered and started as soon as possible.
  • the data transmission module itself, even if the data transmission device is not connected to the electronic equipment, it can start the initialization and related communication configuration process after power on, and cooperate with the microcontroller to achieve fast startup, so that subsequent data
  • the data transmission device can transmit the data transmitted by the electronic device to the display device, for example, project the display interface of the electronic device to the display device.
  • FIG. 17 is a schematic flowchart of a control method of a data transmission device provided by an embodiment of the application.
  • the execution body of the method shown in FIG. 17 may be a data transmission module in a data transmission device, or a data transmission module.
  • the processor in the module for example, a central processing unit (CPU for short), a system-on-chip (SoC for short), etc.
  • the method shown in FIG. 17 can be shown in FIG. 8 .
  • the microcontroller controls the power supply to supply power to the data transmission module
  • the data transmission module executes it.
  • the method includes:
  • the data transmission module 32 is powered on and performs The initialization configuration of itself, and the relevant communication configuration, wherein, the communication configuration includes: the communication configuration of the data transmission module 32 to the communication interface 31; and/or the data transmission module 32 is used for data transmission with the display device 4. Communication configuration for communication.
  • the data transmission module 32 needs to perform communication configuration on the USB interface based on the USB communication protocol; when the data transmission module 32 projects the display interface to the display device 4 through Wi-Fi, the data transmission module The group 32 needs to perform Wi-Fi protocol-based communication configuration on the data transmission module 32 .
  • the data transmission module receives media data from the communication interface, and encodes the media data.
  • Media data includes, but is not limited to, video stream data and audio stream data. If the communication interface is a TypeC interface, the data transmission module can receive media data in the DP protocol format.
  • the media data corresponding to the display interface of the electronic device 1 sent by the electronic device 1 can be received from the communication interface 31, and the media data can be encoded.
  • the function of encoding is to make the media data satisfy the communication protocol between the data transmission module 32 and the display device 4. For example, if the data transmission module 32 and the display device 4 communicate through Wi-Fi, the data transmission module 32 in S302 will The media data is encoded according to the Wi-Fi protocol, and the encoded media data can be subsequently sent to the display device 4 via Wi-Fi.
  • the data transmission module 32 completes the communication configuration through S302
  • the communication interface receives and encodes media data from the electronic device 1 . If the user has not connected the data transmission device 3 to the electronic device 1 after the data transmission module 32 completes the communication configuration through S301, the data transmission module 32 cannot temporarily receive media data from the communication interface 31; After the data transmission device 3 is connected through the connection line 2 , the data transmission module 32 can start to execute S302 , receive the media data from the electronic device 1 from the communication interface and encode it, and then send the encoded media data to the display device 4 .
  • the data transmission module 32 in the data transmission device 3 obtains the power provided by the power supply 33, even if the current data transmission device 3 is not connected to the electronic device 1, it can first perform the configuration process of the relevant communication, After the subsequent user uses the connection line 2 to connect the data transmission device 3 to the electronic device 1, the data transmission device 3 can receive the media data corresponding to the display interface transmitted by the electronic device 1, and perform subsequent processing such as encoding, thereby improving data transmission.
  • the response speed and transmission efficiency of the module 32 is that after the data transmission device 3 is inserted into the electronic device 1, the data transmission device 3 can process the media data of the display interface on the electronic device 1 in a short time or even immediately and project it to the display device. 4, bring a "plug and display" user experience, and improve work efficiency.
  • the data transmission module sends the media data encoded in S302 to a display device for display. Alternatively, after receiving the start instruction input by the user, the data transmission module sends the media data to the display device.
  • the data transmission module 32 may send the media data encoded in S302 to the display device 4 for display through the configured communication method.
  • the data transmission module 32 executes S303 to send the encoded media data to the display device 4 for display through the configured communication method.
  • the media data may be video stream data received in real time, so that the screen of the electronic device 1 and the screen of the display device 4 are substantially synchronized.
  • the data transmission module when it sends the media data to the display device 4 in S303, it can also synchronously send a data transmission instruction (take the screen-sharing instruction as an example in this specification) to the display device 4, so that the display device 4 is in the display device 4.
  • a data transmission instruction take the screen-sharing instruction as an example in this specification
  • the screen transfer instruction is taken as an example
  • the received media data sent from the data transmission module is processed and displayed.
  • the meaning of the screen transfer instruction is to instruct the display device to perform decoding and other processing and display. For example, during the data transmission process, the user inputs a stop instruction in the data transmission device 3 (for example, the user presses the stop button on the data transmission device), and the data transmission device 3 stops.
  • a stop transmission instruction in this specification, the stop screen sharing instruction is taken as an example
  • the stop transmission instruction in this specification, the stop screen transmission instruction is Example
  • FIG. 18 is a schematic diagram of an application scenario framework of a data transmission apparatus provided by an embodiment of the application.
  • the data transmission apparatus 3 shown in FIG. 18 further includes physical buttons 38 on the basis of the embodiment shown in FIG. 4 .
  • the physical button 38 can be arranged on the surface of the data transmission device 3 , and the physical button 38 is connected with the data transmission module 32 inside the data transmission device 3 .
  • the user can send a start instruction to the data transmission module 32 by pressing the physical button 38 .
  • the data transmission module 32 sends the encoded media data to the display device 4 .
  • FIG. 19 is a schematic state diagram of the data transmission module provided by some embodiments of the application when the data transmission device control method is executed, wherein the SoC in the data transmission module is used as the execution body, and the data transmission module is on the top. The detailed operations performed after power-on to data transmission will be explained.
  • the SoC is initialized first. Operations, initialization operations include but are not limited to: SOC UBoot loading, SoC Linux kernel loading, and Type-C driver loading, etc. And after the initialization of the SoC itself is completed, the configuration of the communication interface (USB interface) and the configuration of the data communication (Wi-Fi) are performed.
  • the configuration of the USB interface shown by the left arrow in FIG. - The configuration of Fi can be executed by the SoC simultaneously or sequentially, and the execution order is not limited.
  • the Wi-Fi configuration process includes the following steps: loading the Wi-Fi driver, connecting and displaying the Wi-Fi hotspot corresponding to the device according to the preset account and password, and establishing the corresponding network port after connecting the hotspot, so that The SoC can perform data communication with the display device 4 via Wi-Fi.
  • the configuration process of the USB interface includes the following steps: loading the image file and preparing the USB gadget storage.
  • the SoC completes the above initialization process and the data transmission device 32 is connected to the electronic device 1
  • the USB device (the data transmission device 32) is recognized by the electronic device 1, and the SoC can receive the media data sent by the electronic device 1 through the USB interface.
  • the SoC After encoding the media data according to the configured Wi-Fi protocol parameters, wait for the user to press the physical button.
  • the SoC receives the start command sent by the user through the physical button, it can send the encoded media data to the display device 4 by pre-establishing the network port, and also send the screen transfer instruction to the display device 4, and then the display device 4 pairs The received media data is decoded and then displayed.
  • the data transmission module 32 after the data transmission module 32 sends the media data to the display device 4, it also includes: after receiving the stop instruction input by the user, the data transmission module 32 stops sending the screen transmission instruction to the display device 4. , and the data transmission module 32 itself also stops sending media data to the display device, wherein the user inputting the stop instruction may be pressing the physical button 38 again.
  • FIG. 20 is a schematic diagram of an application scenario framework of the data transmission device provided by an embodiment of the present application.
  • the external power detection module 37 can also be connected to the microcontroller 34 and the data transmission module 32 to detect whether the communication interface 31 has an external power supply connected, and to the controller 34 and/or the data according to the detection result.
  • the transmission module 32 sends a corresponding indication signal (for example, a high-level signal can be used to indicate that the communication interface 31 has external power access, and a low-level signal can be used to indicate that the communication interface 31 has no external power access; or, a low-level signal It can be used to indicate that the communication interface 31 has an external power supply, and a high-level signal is used to indicate that the communication interface 31 has no external power supply, etc.).
  • a corresponding indication signal for example, a high-level signal can be used to indicate that the communication interface 31 has external power access, and a low-level signal can be used to indicate that the communication interface 31 has no external power access; or, a low-level signal It can be used to indicate that the communication interface 31 has an external power supply, and a high-level signal is used to indicate that the communication interface 31 has no external power supply, etc.
  • the external power detection module 37 can be connected to the microcontroller 34 without being connected to the data transmission module 32, and when the external power detection module 37 is connected to both the microcontroller 34 and the data transmission module 32, the data transmission module The group 32 can also detect whether an external power source is connected to the communication interface 31, so as to determine whether to send media data to the display device.
  • a scenario may be: after the data transmission module 32 sends the media data to the display device 4, the data transmission module 3 set in the data transmission device 3 can pass the data transmission module.
  • the instruction signal sent by the external power supply detection module 37 connected to 32 detects whether the external power supply is detached from the communication interface 31.
  • the data transmission module 32 receives the instruction signal sent by the external power supply detection module 37 to indicate that the external power supply has been disconnected, then The data transmission module 32 stops sending the screen transfer instruction to the display device 4 , and the data transmission module 32 itself also stops sending media data to the display device 4 .
  • the microcontroller 34 when the microcontroller 34 receives an indication signal sent by the external power supply detection module 37 indicating that the external power supply has been disconnected, the microcontroller 34 starts a timer, and then counts a preset time (for example, 60 times) on the timer.
  • the microcontroller 34 sends a signal indicating that the controllable switch 36 is disconnected to the controllable switch 36 (that is, the above-mentioned first disconnection signal), at this time, the external power detection module 37 also sends to the controllable switch 36 a signal indicating that the controllable switch 36 is disconnected (ie, the above-mentioned second disconnection signal), so the controllable switch 36 is controlled to be disconnected, and the micro-controller
  • the controller 34 enters the standby state; and within the preset time (for example, 60 seconds) of the timer counts, if it receives the instruction signal sent by the external power detection module 37 indicating that the external power is connected to the communication interface 31, the microcontroller 34 sends the control switch to the controllable switch.
  • controllable switch 36 continues to send a signal indicating that the controllable switch 36 is closed (ie the above-mentioned first conduction signal), and the external power detection module 37 sends a signal indicating that the controllable switch 36 is open to the controllable switch 36 at this time (ie the above-mentioned second open signal). signal), so control the controllable switch 36 to open.
  • FIG. 21 is a schematic diagram of a partial circuit structure of an external power supply detection module provided by an embodiment of the application.
  • the external power supply detection module 37 provided in FIG. 21 further includes a resistor R28 on the basis of the partial circuit shown in FIG. 16 . (denoted as the first resistance), resistor R84 (denoted as the fourth resistance), resistor R101 (denoted as the second resistance), and resistor R100 (denoted as the third resistance).
  • the external power supply detection module 37 needs to set a triode after the connected external power supply VBUS for reverse processing, while the external power supply detection module 37 needs to set a transistor for reverse processing. When connecting the microcontroller 34 and the data transmission module 32, no triode is required.
  • the power supply connected to the communication interface 31 is denoted as VBUS, then VBUS is grounded through resistors R28 and R84, and VBUS is also connected to data through resistors R28 and R100.
  • the USB0_DET pin of the transmission module 32 the data transmission module can determine whether the communication interface of the data transmission device 3 is connected to the external power supply VBUS according to the level value of the USB0_DET pin; VBUS is also connected to the microcontroller through the resistor R28 and the resistor R101.
  • the MCU_DET pin of the controller 34 the microcontroller 34 can determine whether the communication interface of the data transmission device 3 is connected to the external power supply VBUS through the level value of the MCU_DET pin.
  • the external power supply detection module 37 transmits the same high level to the data transmission module 32 through the USB0_DET pin.
  • This high level signal can be It is regarded as an indication signal indicating that the communication interface 31 is connected to the external power supply, so that the data transmission module 32 can determine that the communication interface 31 is connected to the external power supply according to the high-level indication signal; when the communication interface 31 is not connected to the external power supply, VBUS At this time, the external power detection module 37 transmits the same low level to the data transmission module 32 through the USB0_DET pin.
  • This low level signal can be regarded as an indication that the communication interface is not connected to the external power supply.
  • the data transmission module 32 can determine that the communication interface 31 is not connected to an external power source according to the low-level indication signal.
  • the communication interface is connected to an external power supply and VBUS is at a high level
  • the external power supply detection module 37 transmits the same high level to the microcontroller 34 through the MCU_DET pin. This high level signal can be seen.
  • the microcontroller 34 can determine that the communication interface 31 is connected to the external power supply according to the high-level indication signal; when the communication interface 31 is not connected to the external power supply, VBUS is low power At this time, the external power detection module 37 transmits the same low level to the microcontroller 34 through the MCU_DET pin.
  • This low level signal can be regarded as an indication signal indicating that the communication interface 31 is not connected to the external power supply, so that the The microcontroller 34 may determine that the communication interface 31 is not connected to the external power source according to the external power source disconnection signal.
  • the resistors R28, R84, R100 and R101 shown in Figure 21 are all from the perspective of circuit safety to ensure the reliability of the circuit.
  • the access shown in Figure 21 The detection circuit may also not set a resistance or set a resistance value of 0, so that the MCU_DET pin of the microcontroller 34 and the USB0_DET pin of the data transmission module 32 can be directly connected to the external power supply VBUS to achieve more direct detection.
  • the data transmission module as the execution body after the data transmission module as the execution body sends the media data to the display device for display, it can detect according to the user's stop instruction or according to the external power detection module. After the external power supply is disconnected from the communication interface, the data transmission module immediately stops sending the screen transfer command to the display device, so that the display device does not continue to display the display interface of the electronic device.
  • the user after the user connects the electronic device to the data transmission device, if it is found that the interface displayed by the current electronic device is inconvenient to display on the display device, the user can send a stop command or directly connect the data transmission device to the screen.
  • the transmission efficiency can also protect the user's privacy to a certain extent, so that the user can prevent the display in time when the private information is mistakenly projected to the screen, thereby improving the user experience of the data transmission device.
  • the microcontroller 34 when it is detected that the data transmission device 3 is moved, the microcontroller 34 will control the power supply 33 to supply power to the data transmission module 32.
  • the movement of the data transmission device 3 may not be because the user wants to use the data transmission device 3 for data transmission, but the user accidentally touches the data transmission device 3 or just wants to move the data transmission device 3, and the data transmission device 3 will not be connected to the data transmission device 3.
  • the electronic device 1 is connected, if the internal power supply 33 continues to supply power to the data transmission module 32, the power of the power supply 33 will be wasted. Therefore, the embodiments of the present application further propose a dual power saving protection mechanism to address this technical problem.
  • the microcontroller 34 determines whether to send an acceleration threshold to the controllable switch. 36 sends a conduction signal, and by setting the acceleration threshold, some tiny vibrations or invalid vibration signals can be filtered out, so as to prevent the microcontroller 34 from sending a conduction signal to the controllable switch 36, so that the power supply 33 supplies power to the data transmission module 32, Waste electric energy; however, even when the acceleration value of the data detected by some vibration sensors 35 exceeds the preset acceleration threshold value, it is not necessarily that the user wants to use the data transmission device 3. Therefore, in order to further reduce the waste of electric energy of the power supply 33, the micro-controller After the power supply connection between the internal power supply 33 and the data transmission module 32 is turned on, the controller 34 further includes the steps:
  • the microcontroller 34 receives the detection data or the interruption signal from the vibration sensor 35, if the The external power detection module 37 sends an indication signal that detects that the communication interface 31 has an external power connection, and the microcontroller 34 continues to send a signal to the controllable switch 36 to indicate that the controllable switch 36 is closed (ie, the above-mentioned first conduction signal), At this time, the external power detection module 37 sends a signal indicating that the controllable switch 36 is disconnected (ie, the above-mentioned second disconnection signal) to the controllable switch 36, so the controllable switch 36 is controlled to be disconnected, and the internal power supply 33 and the data transmission module are controlled.
  • the power supply connection between 32 is disconnected; within the first preset time after the microcontroller 34 receives the detection data or the interruption signal of the vibration sensor 35, if the detection communication interface 31 sent by the external power detection module 37 is not received There is an indication signal that the external power supply is connected, then after the first preset time, the microcontroller 34 sends a signal indicating that the controllable switch 36 is disconnected (ie, the first disconnection signal) to the controllable switch 36.
  • the external power detection module 37 sends a signal indicating that the controllable switch 36 is turned on (ie, the above-mentioned second conduction signal) to the controllable switch 36, so it controls the controllable switch 36 to turn off, and controls the connection between the internal power supply 33 and the data transmission module 32. The power supply connection between them is disconnected.
  • the execution body of this step may be the microcontroller 34.
  • the execution body of this step may be the microcontroller 34.
  • it may send the signal by setting the STM32_1108_IO pin of the microcontroller 34 to a low level signal as shown in FIG. 15 .
  • the first conduction signal controls the conduction of the controllable switch 36, so that the internal power supply 33 supplies power to the data transmission module 32 through the controllable switch 36, and at the same time, the microcontroller 34 will start a first preset time (for example, 60 seconds) timer.
  • the microcontroller 34 After controlling the controllable switch 36 to be turned on, the microcontroller 34 will detect whether the communication interface 31 is connected to an external power supply.
  • the level of the MCU_DET pin determines whether the communication interface 31 is connected to an external power supply. If it is determined that an external power supply is connected according to the indication signal before the 60-second timer expires, the timing ends, and the microcontroller 34 keeps the STM32_1108_IO pin set to a low level signal (instructing the controllable switch 36 to be closed). If after the 60-second timer expires, it is determined according to the indication signal that no external power supply has been connected during the 60-second period, then after the 60-second timer expires, the microcontroller 34 adjusts the STM32_1108_IO pin to be set to a high-level signal.
  • the first disconnection signal (instructing the controllable switch 36 to be disconnected) is sent in the method, and the controllable switch 36 is controlled to be disconnected, so that the power supply does not continue to supply power to the data transmission module 32 after 60 seconds, thereby ensuring that users of non-data transmission devices can
  • the movement caused by the accidental touch of the data transmission device 3 will not cause the power supply 33 to continuously supply power to the data transmission module 32 , thereby reducing power loss and improving the integrity of the microcontroller 34 in controlling the data transmission device.
  • the microcontroller 34 continues to send a signal indicating that the controllable switch 36 is closed to the controllable switch 36 (that is, the above-mentioned first conduction signal ), at this time, since the external power detection module 37 sends a signal indicating that the controllable switch 36 is disconnected (ie, the second disconnection signal) to the controllable switch 36, the controllable switch 36 is controlled to be disconnected, and the internal power supply 33 and data The power supply connection between the transmission modules 32 is disconnected.
  • the microcontroller 34 does not send a signal indicating disconnection to the controllable switch 36 (that is, the above-mentioned first disconnection signal)
  • it will start a A timer for the second preset time (for example, 60 seconds), and before the timer expires, it continues to send a signal indicating that the controllable switch 36 is closed (ie, the above-mentioned first conduction signal), and the external power detection module 37 sends a signal to the controllable switch 36 .
  • the switch 36 sends a signal indicating that the controllable switch 36 is turned on (ie, the above-mentioned second conduction signal), so the controllable switch 36 is controlled to be turned on, and the power supply connection between the internal power supply 33 and the data transmission module 32 is controlled to be turned on again.
  • the controllable switch 36 is controlled to be turned on, and the power supply connection between the internal power supply 33 and the data transmission module 32 is controlled to be turned on again.
  • the microcontroller 34 controls the controllable switch 36 to be turned on, if the vibration sensor 35 does not detect the subsequent movement of the data transmission device 3, the microcontroller 24 can enter the standby mode, and then When the vibration sensor 35 detects the movement of the data transmission device, it can wake up the microcontroller 34 by sending an interrupt signal to the microcontroller 34, so that the microcontroller 34 switches back to the working state and immediately sets the STM32_1108_IO pin to a low level signal, and start a timer for a preset time and detect whether the external power supply is connected.
  • FIG. 22 is a schematic state diagram of a microcontroller executing a data transmission device control method according to some embodiments of the present application, wherein, taking the microcontroller 34 as the MCU set in the data transmission device 3 as an example, when the MCU is powered on ( For example, after the data transmission device 3 is powered on when it leaves the factory, the initialization configuration of the MCU is performed, including the configuration of the acceleration threshold. After completing the above startup work, the MCU sets the STM32_1108_IO pin to a low level signal, and starts a timer for 60 seconds when it detects that the communication interface of the data transmission device 3 is not connected to an external power supply.
  • the MCU While the timer is within 60 seconds, the MCU continues to detect whether there is an external power supply connected to the communication interface. If the external power supply is detected within 60 seconds, the MCU keeps the STM32_1108_IO pin set to a low level signal; if at 60 If the external power supply is not detected within seconds, the MCU will enter the standby state after setting the STM32_1108_IO pin to a high level signal.
  • the vibration sensor 35 detects the movement of the data transmission device (that is, the real-time acceleration value exceeds the preset acceleration threshold)
  • the MCU ends the standby and switches to the working state, and according to the interrupt signal, the STM32_1108_IO pin is Set to a low level signal, then repeat the above process of starting the 60-second timer, and continue to cycle.
  • the MCU keeps the STM32_1108_IO pin as a low level signal to the controllable switch 36 to instruct the controllable switch 36 to close.
  • the VBS_CL signal sent by the control switch 36 is a low level signal to indicate that the controllable switch 36 is disconnected, so the controllable switch 36 is controlled to be disconnected, and the power supply connection between the control internal power supply 33 and the data transmission module 32 is disconnected.
  • the data transmission device 3 is pulled out by the user again, because the microcontroller 34 continues to hold the low level signal to the controllable switch 36 to instruct the controllable switch 36 to close, and the external power detection module 37 sends the VBS_CL signal to the controllable switch 36 It is a high level signal to indicate that the controllable switch 36 is closed, so the controllable switch 36 is controlled to be turned on, and the power supply connection between the internal power supply 33 and the data transmission module 32 is controlled to be turned on again. In this way, even after the data transmission device 3 is pulled out, the data transmission module 32 will continue to be in a working state, and will not be powered down due to the loss of the external power supply after the data transmission device 3 is pulled out.
  • the electronic device 1 can quickly perform data transmission and improve work efficiency.
  • an embodiment of the present application further provides a method for controlling a data transmission device, which is applied to the process of switching the connection relationship between the same data transmission device and different electronic devices, and the execution body may be a microcontroller.
  • the microcontroller can also detect whether the communication interface is connected to the external power supply through the MCU_DET pin in the external power supply detection module as shown in Figure 21. When it is detected that the external power supply of the communication interface is disconnected, the internal power supply is controlled by Power is supplied to the data transmission module, so that the data transmission module maintains a wireless connection with the display device.
  • the data transmission module can send the media data transmitted by the current electronic device to the display device without performing initialization and related communication configuration steps, so that the data
  • the transmission device reduces the preparation time required for the switched electronic device to use the data transmission device, thereby reducing the need for users to view the data transmission device on the display device after connecting the switched electronic device to the data transmission device.
  • the waiting time to the projected display interface improves the data transmission efficiency of the data transmission device and improves the user experience.
  • the external power detection module 37 may only be connected to one of the microcontroller 34 and the data transmission module 32, and at the same time, there is a communication connection between the microcontroller 34 and the data transmission module 32 (for example, through I2C, UART (Universal Asynchronous Receiver/Transmitter, general asynchronous transceiver) or GPIO (General-purpose input/output, general-purpose input and output) and other connection methods).
  • I2C Universal Asynchronous Receiver/Transmitter, general asynchronous transceiver
  • GPIO General-purpose input/output, general-purpose input and output
  • FIG. 23 is a schematic diagram of an application scenario framework of an embodiment of the data transmission device provided by the present application, wherein the external power detection module 37 set is connected to the communication interface 31 and the data transmission module 32, and the data transmission module 32 can pass the external
  • the indication signal of the power detection module 37 determines whether the communication interface 31 is connected to an external power supply, for example, through the USB_DET pin shown in FIG. FIG.
  • 24 is a schematic diagram of an application scenario framework of an embodiment of the data transmission device provided by the present application, wherein the external power detection module 37 set is connected to the communication interface 31 and the microcontroller 34 , and the microcontroller 34 can pass the external power detection module 37
  • the indication signal of determines whether the communication interface 31 is connected to an external power supply, for example, through the MCU_DET pin shown in FIG.
  • FIG. 25 is a schematic flowchart of a data transmission method provided by an embodiment of the present application. Specifically, based on the embodiments of FIGS. 4 , 7 , 15 , 16 and 21 , A data transmission method, as shown in Figure 25, includes:
  • Step S401 the MCU receives the information sent by the sensor
  • the information sent by the sensor can be detection data or an interrupt signal.
  • the MCU may also be referred to as a microcontroller, a microcontroller unit, or the like.
  • the vibration sensor 35 sends detection data to the MCU as an example.
  • the detection data carries the acceleration value of the vibration sensor 35 itself.
  • the MCU pre-stores the acceleration threshold.
  • the MCU compares the acceleration value in the detection data with the pre-stored acceleration threshold according to the comparison result. It is judged whether or not the data transmission device 3 has been moved.
  • the vibration sensor 35 can be an acceleration sensor, and the acceleration sensor can detect the motion state of the movement of the data transmission device 3 in real time, and generate acceleration data in six directions (for example, the acceleration data detected in a certain embodiment are 0 mg, 200 mg, 100mg, 150mg, 0mg, 400mg).
  • the MCU may acquire detection data detected by the vibration sensor 35 in real time through communication with the vibration sensor 35 at regular intervals; alternatively, the vibration sensor 35 may send the detection data detected by the vibration sensor 35 in real time to the MCU at regular intervals.
  • the built-in power supply 33 of the data transmission device 3 may also be used to supply power to the MCU.
  • the MCU can set two power consumption working states, namely a first power consumption working state and a second power consumption working state, wherein, before the MCU receives the detection data or the interrupt signal, the MCU is in the data transmission device. 3 is in the first power consumption working state under the power supply of the built-in power supply 33; after the MCU receives the detection data (its acceleration value exceeds the preset acceleration threshold) or the interrupt signal, it is in the second power consumption working state, and the MCU can be set in the first power consumption working state.
  • the power consumption in the power consumption working state is lower than the power consumption in the second power consumption working state.
  • the first power consumption working state may be a low power consumption working state
  • the second power consumption working state may be a high power consumption working state. condition.
  • the MCU can choose a device with a low-power working state. When the MCU is in a standby state, the MCU can be maintained in a low-power state, and its operating current can be limited to the uA level, so as to minimize the number of data transmission devices 3 Not connected to electronic equipment 1 When the MCU consumes the power of the power supply 33 .
  • step S402 if the MCU determines that the data transmission device 3 is moved, it sends a first conduction signal for instructing the controllable switch 36 to be turned on to one of the input pins of the AND gate circuit D36.
  • the MCU determines whether the acceleration value of the vibration sensor 35 itself received from the vibration sensor 35 exceeds the acceleration threshold. If so, it means that the data transmission device 3 has moved; if not, it means that the data transmission device 3 has not moved. at rest.
  • the MCU presets the acceleration threshold of 350mg, if the acceleration values obtained by the MCU in the six directions are (0mg, 200mg, 100mg, 150mg, 0mg, 400mg), it means that the data transmission device 3 has moved, and the STM32_1108_IO tube of the MCU
  • the pin sends the first turn-on signal to one of the input pins of the AND gate circuit D36 (the cathode of the diode under the AND gate circuit D36 as shown in FIG. 15 ).
  • the first turn-on signal is used to instruct the controllable switch 36 to turn on, and the first turn-on signal may be a low-level signal.
  • the first conduction signal used to instruct the controllable switch 36 to be turned on is a low-level signal output by the STM32_1108_IO pin of the MCU.
  • the signal output by the MCU is a low-level signal, which is reversed by the transistor QM2.
  • the level signal reaching one of the pins of the AND gate circuit D36 is the high level MCU_CL signal.
  • the signal output by the MCU indicating that the controllable switch 36 is turned on can directly control the AND gate circuit D36. one of the pins.
  • the MCU determines that the data transmission device 3 is moved if it receives the interrupt signal sent by the vibration sensor 35 .
  • the timer of the MCU starts to count the preset time (eg, 60 seconds).
  • Step S403 when it is detected that the communication interface 31 of the data transmission device 3 is not connected to an external power supply, the external power supply detection module 37 sends a second conduction signal to another input pin of the AND gate circuit D36 .
  • the second conduction signal is used to indicate that the controllable switch 36 is turned on, and the second conduction signal may be a high-level signal.
  • the external power detection module 37 and the AND gate circuit D36 A pin (as shown in Figure 15, the diode cathode above the AND gate circuit D36) is connected, and the external power detection module 37 is used to detect whether the communication interface 31 has external power access.
  • the external power detection module 37 sends a high-level signal to the input pin of the AND gate circuit D36 to indicate that the controllable switch 36 is turned on.
  • a high-level VBS_CL signal turns on the control switch 36 .
  • step S404 the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the first conduction signal and the second conduction signal to make the controllable switch 36 close, thereby connecting the power supply 33 of the data transmission device 3 and the data transmission module 32.
  • the power supply connection between is turned on.
  • the second conduction signal and the first conduction signal of the two input pins of the AND gate circuit D36 are the VBS_CL signal and the MCU_CL signal respectively, the "VBS_CL” signal is a high level signal, and the "MCU_CL” signal
  • the signal is a high-level signal
  • the two diodes of the AND gate circuit D36 are both turned off, and the high-level signal of the internal power supply VBAT passes through the resistor RM8 and the resistor RM11 to make the transistor QM3 turn on, and finally input as the gate of the field effect transistor Q4 of the controllable switch 36
  • the signal of the pole G is a low level signal (the gate G is grounded through the resistor RM9 and the transistor QM3), the field effect transistor Q4 is turned on, the source S and the drain D are turned on, and the internal power supply (power supply 33) passes through the field effect.
  • the transistor Q4 supplies power to the data transmission module 32 .
  • the built-in power supply 33 of the data transmission device 3 supplies power to the data transmission module 32, and the data transmission module 32 is activated and performs a related communication configuration, for example, a communication configuration in which the data transmission module 32 communicates with the communication interface, and/or data transmission
  • a related communication configuration for example, a communication configuration in which the data transmission module 32 communicates with the communication interface, and/or data transmission
  • the data transmission module 32 can be a Wi-Fi module, and the data transmission module 32 can complete the Wi-Fi connection with the display device 4.
  • the establishment of the communication link of the Fi module, the Wi-Fi module of the display device 4 can also be an external device.
  • a communication link with the display device can be established to directly establish a communication link with the display device 4; when the display device 4 communicates through an external Wi-Fi module, it can be A communication link is established with the external Wi-Fi module, and the external Wi-Fi module establishes a communication link when the display device 4 is in a working state.
  • the data transmission module 32 Since the data transmission module 32 has completed the establishment of the communication link with the display device 4 before the data transmission device 3 is connected to the electronic device 1, when the data transmission device 3 is connected to the electronic device 1, the data to be transmitted by the electronic device 1 directly passes through the The data transmission device 3 performs processing and sends it to the display device 4 for display, avoiding the configuration of the communication link when the data transmission device 3 is connected to the electronic device 1, reducing the waiting time of the user when using the data transmission device 3, and realizing Plug and play, thus improving the response speed and work efficiency of the data transmission device.
  • a possible application scenario is further provided: the user picks up or moves the data transmission device 3, and prepares to insert the communication interface 31 of the data transmission device 3 into the communication interface of the electronic device 1, such as an electronic
  • the communication interface 31 of the data transmission device 3 into the communication interface of the electronic device 1, such as an electronic
  • the USB interface or the TYPE-C interface of the device 1 generally provides a power pin to provide power to the electronic device plugged into it.
  • step S405 after the external power detection module 37 detects that the communication interface 31 of the data transmission device 3 is connected to the external power supply, the external power detection module 37 sends a signal to another input pin of the AND gate circuit D36 to indicate that the controllable switch 36 is turned off. open second disconnect signal.
  • the second disconnection signal may be a low-level signal.
  • the external power detection module 37 sends a low-level VBS_CL signal to the diode cathode above the AND gate circuit D36 to indicate that the controllable switch 36 is disconnected .
  • Step S406 within the above preset time, after the external power detection module 37 detects that the communication interface 31 of the data transmission device 3 is connected to an external power supply, the external power detection module 37 sends a signal to the MCU for indicating that the external power supply has been connected , the MCU still keeps sending the first turn-on signal for instructing the controllable switch 36 to turn on to one of the input pins of the AND gate circuit D36. It can be understood that, at this time, the MCU still continues to send the first turn-on signal for instructing the controllable switch 36 to be turned on to one of the input pins of the AND gate circuit D36.
  • the above preset time is the preset time that the timer of the MCU starts to count after the MCU determines that the data transmission device 3 is moved. Specifically, as shown in FIG. 21 , when the communication interface 31 is connected to an external power supply and VBUS is at a high level, the external power supply detection module 37 transmits a high level to the MCU_DET pin of the MCU as well.
  • the level signal is regarded as an indication signal indicating that the communication interface 31 is connected to an external power supply, so that the MCU can determine that the communication interface 31 is connected to an external power supply according to the high-level indication signal; when the communication interface 31 is not connected to an external power supply, VBUS is low At this time, the external power detection module 37 transmits the same low level to the MCU_DET pin of the MCU (the MCU_DET pin is grounded through the resistor R101 and the resistor R84), and this low level signal is regarded as indicating that the communication interface 31 has no
  • the indication signal of connecting to the external power source enables the MCU to determine that the communication interface 31 is not connected to the external power source according to the low-level indication signal.
  • the MCU determines that the communication interface 31 is connected to the external power supply according to the high-level signal sent by the external power supply detection module 37, then the MCU stops the timing of the preset time, and at the same time, the MCU still keeps the AND gate circuit.
  • One of the input pins of D36 sends a signal for instructing the controllable switch 36 to be turned on, and the "MCU_CL" signal is still a high-level signal at this time.
  • step S407 the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the first turn-on signal and the second turn-off signal, so that the controllable switch 36 is turned off.
  • the second disconnection signal and the first turn-on signal of the two input pins of the AND gate circuit D36 are the VBS_CL signal and the MCU_CL signal respectively, the "VBS_CL” signal is a low level signal, and the "MCU_CL” signal
  • the signal is still a high-level signal, the diode above the AND gate circuit D36 is turned on and the diode below is turned off, and the AND gate circuit D36 outputs a low-level signal, the low-level signal controls the transistor QM3 to be cut off through the resistor RM11, and the internal power supply VBAT passes through.
  • the resistors RM7 and RM9 make the signal of the gate G of the field effect transistor Q4 a high level signal, the field effect transistor Q4 is turned off, and the source S and the drain D are disconnected.
  • a possible application scenario is further provided: within a preset time (for example, 60 seconds) after the MCU determines that the data transmission device 3 is moved, the user connects the data transmission device 3 to the electronic device 1. connect.
  • a preset time for example, 60 seconds
  • step S408 the external power supply detection module 37 detects that the communication interface 31 of the data transmission device 3 is disconnected from the external power supply, and the external power supply detection module 37 sends another input pin of the AND gate circuit D36 to instruct the controllable switch 36 to be turned on.
  • the second turn-on signal of the external power source detection module 37 sends to the MCU a signal indicating that the communication interface 31 is not connected to the external power source, and the signal may be a low-level signal.
  • a possible application scenario is: after the user connects the data transmission device 3 with the electronic device 1, the user dials the data transmission device 3 out of the electronic device 1 again.
  • step S409 after the MCU receives the signal sent by the external power detection module 37 to indicate that the communication interface 31 is not connected to the external power, the timer of the MCU starts timing according to a preset time (for example, 60 seconds).
  • a preset time (for example, 60 seconds) may be stored in the MCU.
  • the preset time may be 60 seconds in this embodiment, and may be other time, such as 50 seconds, in other embodiments, and the time may be set according to a specific application scenario.
  • Step S410 within the preset time, the MCU still keeps sending a first turn-on signal for instructing the controllable switch 36 to turn on to one of the input pins of the AND gate circuit D36.
  • the STM32_1108_IO pin of the MCU sends a low-level signal to one of the input pins of the AND gate circuit D36 (the diode cathode below the AND gate circuit D36), and the low-level signal makes the transistor QM2 disconnected , so as to obtain a high-level "MCU_CL" signal (the cathode of the diode under the AND gate circuit D36 is connected to the +3V3_SB high level provided by the internal power supply through the resistor RM6).
  • step S411 the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the first conduction signal and the second conduction signal, so that the controllable switch 36 is closed.
  • the internal power supply of the data transmission device 3 supplies power to the data transmission module 32, so that the communication link between the data transmission module 32 and the display device 4 continues to be in a connected state, ensuring that the data transmission device 3 Even after dialing out from the electronic device 1, within the preset time, after the user dials out the data transmission device 3 from the electronic device 1, and inserts the next electronic device within the preset time, the The data of the electronic equipment is rapidly transmitted, so as to realize the plug-and-play of the data transmission device 3 in the alternate switching data transmission process of multiple electronic equipments.
  • a possible application scenario is: after the user dials out the data transmission device 3 from the electronic device 1, the next electronic device 1 (possibly pulled out) is inserted again within the preset time.
  • the electronic device 1 may also be another electronic device), during this switching time period, the communication link between the data transmission module 32 and the display device 4 continues to maintain a connected state.
  • the loop after step S404 may be returned to detect whether an external power source is connected within a preset time.
  • the external power detection module 37 detects that the communication interface 31 of the data transmission device 3 is connected to the external power supply within the preset time range of the timer, the external power detection module 37 sends a low-level signal to the AND gate circuit D36
  • the AND gate circuit D36 sends a signal to the controllable switch 36 to disconnect the controllable switch 36 according to the low-level signal and the high-level signal sent by the MCU.
  • step S412 after the user dials the data transmission device 3 out of the electronic device 1, the timing of the preset time is started, and within the preset time, if the external power detection module 37 does not detect the communication interface 31 and If the external power supply is connected, after the timer of the MCU finishes timing according to the preset time, the MCU sends a first disconnection signal to one of the input pins of the AND gate circuit D36 for instructing the controllable switch 36 to be disconnected.
  • the first disconnection signal received by the AND gate circuit D36 may be a low-level signal.
  • the STM32_1108_IO pin of the MCU is connected to one of the input pins of the AND gate circuit D36 ( The diode cathode under the AND gate circuit D36) sends a high-level signal, which makes the transistor QM2 conduct, thereby obtaining a low-level "MCU_CL" signal (the diode cathode under the AND gate circuit D36 is grounded through the transistor QM2) .
  • Step S413 the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the second turn-on signal and the first turn-off signal, so that the controllable switch 36 is turned off.
  • the second on-signal and the first off-signal of the two input pins of the AND gate circuit D36 are the VBS_CL signal and the MCU_CL signal, respectively, the "VBS_CL” signal is a high-level signal, and the "MCU_CL” signal
  • the signal is a low level signal, the diode below the AND gate circuit D36 is turned on and the diode above it is turned off, the AND gate circuit D36 outputs a low level signal, the low level signal controls the transistor QM3 to be cut off through the resistor RM11, and the internal power supply VBAT passes through the resistor.
  • RM7 and RM9 make the signal of the gate G of the field effect transistor Q4 a high level signal, the field effect transistor Q4 is disconnected, the source S and the drain D are disconnected, the internal power supply of the data transmission device 3 and the data transmission module 32 The power supply connection between is disconnected.
  • a possible application scenario is: after the user dials out the data transmission device 3 from the electronic device 1, the next electronic device 1 is not inserted within the preset time (maybe the user has completed the Data transmission does not need to use the data transmission device 3).
  • the preset time it can be considered that within the preset time, if the data transmission device 3 is not connected to an external power supply, it is considered that the user has completed this data transmission requirement, Then, the internal power supply is disconnected to save the power of the internal power supply of the data transmission device 3 .
  • the MCU may be in the second power consumption working state under the power supply of the power supply of the data transmission device 3 . Therefore, it can be understood that before S401, if the MCU does not receive the detection data or the interrupt signal, it will keep the first power consumption working state, and after receiving the detection data or the interrupt signal in S401, it will switch to the second function. Consumption work status. Further, the first power consumption working state may be a low power consumption working state, and the second power consumption working state may be a high power consumption working state.
  • the power supply 33 provided by the data transmission device 3 is set inside the data transmission device 3 as an example.
  • each implementation of the present application The data transmission device 3 described in the example can also be powered by an external power supply when the electronic device 1 is not connected.
  • FIG. 26 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application, wherein the data transmission device 3 is provided with a power interface 39 .
  • the data transmission device 3 can be powered by the external power supply 5.
  • the power supply function realized by the power supply 5 through the power supply interface 39 is different from the embodiments shown in FIGS. 4 to 25 of the present application.
  • the power supply function implemented by the middle power supply 33 is the same, and will not be repeated here.
  • the data transmission methods of the above-mentioned embodiments can be executed by an integrated circuit such as an MCU or an SoC, and the integrated circuit such as the MCU or the SoC includes one or more processors, a memory, and a program, wherein the program is stored in the memory and stored in the memory. Configured to be executed by the one or more processors, the program is configured to execute the data transmission methods of the above-described embodiments.
  • FIG. 27 is a schematic flowchart of an embodiment of a data transmission method provided by the present application.
  • the execution subject may be a data transmission device, or more specifically a processor in the data transmission device, such as CPU, GPU, SoC or MCU in the data transmission device.
  • the execution subject is a data transmission device as an exemplary description.
  • the data transmission method shown in FIG. 27 includes:
  • S501 Receive detection data or an interruption signal of the vibration sensor.
  • the method provided in this embodiment can be applied to a data transmission device, where a vibration sensor, a power supply, and a data transmission module are provided; the power supply can be used to supply power to the data transmission module, and the data transmission module can be used for Data communication with the display device.
  • the vibration sensor set in the data transmission device is used to generate detection data according to the movement of the data transmission device, and the detection data includes the acceleration value of the vibration sensor itself, then when the data transmission device receives the vibration sensor in S501 After the detection data is obtained, it can be determined in S502 that when the acceleration value of the vibration sensor in the detection data exceeds the preset acceleration threshold, the power supply of the data transmission device is controlled to supply power to the data transmission module.
  • the vibration sensor when the acceleration value of the vibration sensor exceeds a preset acceleration threshold according to the generated detection data, the vibration sensor sends an interruption signal, then when the data transmission device receives the interruption sent by the vibration sensor at S501 After the signal is received, in S502, the power supply of the data transmission device can be controlled to supply power to the data transmission module according to the interruption signal.
  • the data transmission method provided in this embodiment enables the data transmission device to control the power supply of the data transmission device to supply power to the data transmission module after the movement of the data transmission device is detected according to the vibration sensor, so that the data transmission device is not in use.
  • the power supply may not supply power to the data transmission module, and when the user moves the data transmission device, the power supply can be controlled to supply power to the data transmission module.
  • the data transmission device implementing the method of this embodiment can take into account both space and efficiency, and can also improve the response speed and work efficiency of the data transmission device during data transmission when the power supply in the data transmission device does not require excessive capacity and volume.
  • S503 is further included: after determining that the electronic device is connected to the communication interface of the data transmission apparatus, receive media data from the communication interface, encode the media data, and send the encoded media data to the display device.
  • the data transmission module after the data transmission module receives the power supply from the power supply and completes the relevant configuration of startup, it can start to receive the media data corresponding to the display interface of the electronic device sent by the electronic device from the communication interface, and encode the media data, sent to the display device.
  • the response speed of the data transmission device to the media data sent by the electronic device connected by the user through the communication interface is improved, and a "plug and display" user experience is brought to improve the working efficiency of the data transmission module.
  • the data transmission device also needs to determine that when the acceleration value of the vibration sensor itself exceeds the preset acceleration threshold or receives the interrupt signal, it also needs to determine that the communication interface has no external power supply. , in order to be able to control the power supply of the data transmission device to supply power to the data transmission module.
  • the data transmission device determines that the communication interface has access to an external power supply, it can control the power supply to stop supplying power to the data transmission module. That is to say, the data transmission device can control the power supply to supply power to the data transmission module only when the external power supply is not connected, and when the communication interface is connected to the external power supply of other electronic devices, the power supply can not continue to supply the data transmission module power supply, thereby reducing power loss.
  • the data transmission device can control the power supply to stop supplying the data transmission module after the first preset time. powered by.
  • the purpose of the data transmission device setting the first preset time is to ensure that the movement caused by the user of the non-data transmission device accidentally touching the data transmission device will not cause the power supply to continuously supply power to the data transmission module, reducing the loss of the power supply.
  • the data transmission apparatus executes S502, when the data transmission apparatus determines that the external power supply is connected to the communication interface and is disconnected from the communication interface, within the second preset time after the disconnection, if there is no external power supply When the communication interface is connected, the data transmission device keeps the control power supply to supply power to the data transmission module within the second preset time.
  • the data transmission device controls the power supply to stop supplying power to the data transmission module after the second preset time.
  • the data transmission device keeps controlling the power supply to supply power to the data transmission module during the second preset time, so that when the user switches the data transmission device from one electronic device to another electronic device,
  • the data transmission module can maintain the working state during the switching process, and will not be powered off immediately due to the loss of external power after the data transmission device is pulled out.
  • the device can quickly transfer data and improve work efficiency.
  • the data transmission apparatus also sends a data transmission instruction to the display device while sending the encoded media data to the display device.
  • the data transmission instruction can be used to instruct the display device to process and display the received encoded media data.
  • the data transmission apparatus may also send a stop transmission instruction to the display device, which is used to instruct the display device not to continue to display the received encoded media data.
  • the data transmission apparatus may send the encoded media data and the data transmission instruction to the display device after receiving the start instruction input by the user; or, after receiving the stop instruction input by the user, stop encoding The latter media data is sent to the display device, and a stop transmission instruction is sent to the display device.
  • the data transmission apparatus detects that the external power supply is disconnected from the communication interface, it stops sending the encoded media data to the display device, and sends a stop transmission instruction to the display device.
  • the data transmission module can stop sending the screen sharing command immediately after the data transmission device detects that the external power supply is disconnected from the communication interface according to the user's stop instruction or according to the external power supply detection module.
  • the display device will not continue to display the display interface of the electronic device, thereby improving the response speed of the data transmission device to the user's disconnection instructions and actions, and improving the response speed and screen projection efficiency of the data transmission device.
  • the privacy of the user is protected to a certain extent, so that the user can prevent the display of private information in time when the user mistakenly projects the private information to the screen, thereby improving the user experience of the data transmission device.
  • FIG. 28 is a schematic flowchart of an embodiment of the data transmission method provided by the present application.
  • another data transmission device is shown to implement the data transmission method provided by the present application through software.
  • the schematic diagram can be applied to the scenario shown in FIG. 1 , and the execution subject may be a data transmission device, or a processor in the data transmission device, or the like.
  • the data transmission method shown in Figure 28 includes:
  • S601 According to the information sent by the sensor, start the built-in power supply of the data transmission device to supply power to the data transmission module.
  • the method provided in this embodiment can be applied to a data transmission device, and a sensor is provided in the data transmission device, and the sensor is used to detect whether the data transmission device is moved.
  • the sensor may be a vibration detector.
  • the sensor detects that the data transmission device is moved (for example, the vibration detector detects that the acceleration of the data transmission device exceeds a preset acceleration threshold)
  • the user may want to use the data transmission device for data transmission, and the sensor can send a message that the data transmission device is receiving
  • the built-in power supply set inside the data transmission device is activated to supply power to the data transmission module.
  • S602 Establish a communication link with the display device.
  • the data transmission module can perform a related configuration for startup, and the related configuration at least includes a communication configuration for communication between the data transmission module and the display device, and establishes a data transmission module.
  • the data transmission device receives the data from the electronic device, encodes the data, and sends the encoded data through the established communication link.
  • the data transmission module may be a Wi-Fi module
  • the communication link may be a Wi-Fi communication link.
  • S603 It is detected that the connection with the electronic device is detected, and the built-in power supply of the data transmission device is stopped to supply power to the data transmission module.
  • the power supply of the electronic device can provide power to the data transmission device, and can control the power supply inside the data transmission device to stop supplying power to the data transmission module, so as to prevent the electronic device from being damaged.
  • the power supply directly charges the power supply inside the data transmission device.
  • S604 Receive data from the electronic device, and send the data to the display device through the established communication link.
  • the data transmission apparatus may receive data corresponding to the display interface of the electronic device from the electronic device, encode the data, and pass the encoded data through the established The communication link is sent to the display device.
  • the data transmission apparatus may execute S603 and S604 at the same time, or the sequence of the steps is not limited.
  • the data transmission device when the data transmission device detects that it is disconnected from the connected electronic device, the data transmission device starts the built-in power supply to supply power to the data transmission module, and at the same time, also The established communication link between the data transmission device and the display device is maintained. And within the preset time, if it is not detected that the data transmission device is connected to any electronic equipment, after the preset time, the built-in power supply of the data transmission device will be stopped to continue supplying power to the data transmission module. The communication link established between the data transmission device and the display device will also be disconnected.
  • the data transmission device when the user switches the data transmission device from one electronic device to another electronic device, the data transmission device can be switched to the built-in power supply in time during the switching process, so that the data transmission device can be powered from the external power supply to the built-in power supply.
  • the seamless switching enables the data transmission device to maintain the working state and maintain the established communication link.
  • the data transmission device when the data transmission device detects that it is disconnected from the connected electronic device, because the data transmission device loses the power supply of the electronic device, the data transmission device is powered down, The communication link between the data transmission device and the display device is disconnected, and then the data transmission device starts the built-in power supply of the data transmission device to supply power to the data transmission module.
  • the data transmission module receives the power supply from the built-in power supply of the data transmission device , reconfigure the communication between the data transmission device and the display device, and re-establish the communication link between the data transmission device and the display device.
  • the data transmission device Since the data transmission device starts to configure the communication with the display device before inserting the next electronic device, the data transmission device can quickly perform data transmission when the next electronic device is inserted, reducing or even eliminating the user's waiting time and realizing data transmission.
  • the plug-and-play of the transmission device during the data transmission process of alternate switching of multiple electronic devices improves the response speed and work efficiency of the data transmission device during data transmission.
  • the embodiment of the present invention further provides an improved way to further improve the data reception, processing speed and efficiency of the data transmission device 3 .
  • the connection line between the electronic device 1 and the data transmission device 3 is a TypeC connection line
  • the data transmission device 3 needs to use a TypeC interface, and the TypeC interface can directly obtain the media data in the DP protocol format output by the external computer.
  • the external computer can send the media data in its cache to the data transmission device without installing a specific driver, and the media data includes the media data of video data or audio data.
  • the data transmission device automatically obtains the media data displayed on the screen of the external computer through the TypeC interface and sends it to the display device, so that the external computer can send the media data displayed on the screen of the external computer to the display device through the data transmission device without installing a driver. It is shown that the time for installing the driver program is reduced, and the data receiving and processing speed and efficiency of the data transmission device 3 are further improved.
  • FIG. 29 is a schematic structural diagram of another implementation manner of the data transmission device 3 provided by the embodiment of the present invention.
  • the data transmission device is designed to include the TypeC interface 21 shown in FIG. 29 , and the differential signal transmission pins in the TypeC interface 21 are
  • the media data receiving port is used to receive the media data transmitted from the external computer, and the media data can be the audio and video data displayed or played by the external computer on the screen.
  • the uncompressed first audio and video data output by the video signal interface of the external computer is DP audio and video data, and the video signal interface may be a TypeC interface.
  • the data transmission device includes the above-mentioned TypeC interface 21, namely USB-Type-C, hereinafter referred to as the TypeC interface 21, USB-Type-C is a hardware interface specification of a universal serial bus (USB), which has more Fast transmission speed (up to 10Gbps) and more powerful power transmission (up to 100W), and compatible with USB2.0, USB3.0 and DP (DisplayPort).
  • Type C interface 21 has a total of 24 pins, including two rows of pins with the same function. See Figure 30. Pins A1 to A12 in Figure 30 are one row, and pins B1 to B12 are the other row, supporting positive or negative insertion. .
  • the Type C interface 21 includes two pairs of power pins, four pairs of differential pins, and CC pins used for pairing communication when inserted and paired.
  • the two pairs of power pins refer to A9, B4, B9, and A4 in Figure 3.
  • the four pairs The differential pins are detailed in A11, B2, A10, B3, A4, B10, A2, and B11 in Figure 3, and the CC pins are detailed in A5 in Figure 3.
  • TX+, TX-, RX+ and RX- in each group of pins are differential signal transmission pins, and each group of differential signal transmission pins supports working in USB mode or DP (DisplayPort) mode.
  • DP DisplayPort
  • the external computer After the data transmission device is powered on, the external computer will send an inquiry data packet to the data transmission device through the CC pin of the USB-Type-C interface.
  • the inquiry data packet can be a VDM (Vendor Defined Message) signal.
  • VDM Vehicle Defined Message
  • the response information is sent to the external computer through the CC pin in the TypeC interface 21.
  • the response information includes the current working mode of the data transmission device or the supported working mode is DP (DisplayPort) mode.
  • DP DisplayPort
  • the response information also Information such as the specific power supply range of the data transmission device may be included.
  • the external computer After the external computer receives the response information sent by the data transmission device, it adjusts the power supply voltage to the data transmission device according to the power supply range information; at the same time, the external computer recognizes that the current working mode of the data transmission device or the supported working mode is DP (DisplayPort ) mode, set the USB-Type-C interface of the external computer to work in DP (DisplayPort) mode, and call the operating system of the external computer to pre-install the DP (DisplayPort) driver, through the differential pins in the USB-Type-C interface of the external computer To transmit media content including audio and video to the data transmission device, the content may be media data in DP protocol format.
  • the media data comprises at least one from the video data or the audio data on the processing device
  • the differential signal transmission pins are used to transmit differential signals.
  • the differential signal transmission pins may be four pairs of differential pins. See A11, B2, A10, B3, A4, B10, A2, B11 in Figure 3.
  • this step is an optional step. If the microprocessor of the data transmission device cannot directly support converting the media data in the DP protocol format into the data in the H.264/H.265 format and/or the data in the AAC format, the data transmission device needs to convert the media data in the DP protocol format first.
  • the data is converted into a data format that the microprocessor can process.
  • a data conversion chip may be added to the data transmission device to convert media data in DP protocol format into video data in MIPI format and/or audio data in I2S format.
  • MIPI Mobile Industry Processor Interface, Mobile Industry Processor Interface
  • MIPI is an open standard and a specification for mobile application processors initiated by the MIPI Alliance. Standardized integration; I2S (Inter-IC Sound, integrated circuit built-in audio) bus, which is specially used for data transmission between audio devices.
  • the first format data is compressed and encoded into the second format data, wherein the second format data is compressed media data;
  • step 4) is a mandatory step
  • the MIPI format video data and/or the I2S format audio data are then compressed into H.264/H.265 format data and/or AAC format by the microprocessor
  • step 4) is an optional step
  • the media data in DP protocol format can be directly compressed into data in H.264/H.265 format and/or data in AAC format.
  • the compressed data can occupy less bandwidth, and more data can be transmitted under the same transmission requirements.
  • the compressed data can be sent to the display device through a wireless network.
  • the wireless network may be a Wi-Fi network, a 3G/4G/5G communication network, or other networks with a data transmission function.
  • a user's screen-sharing startup instruction is also received, and the screen-sharing startup instruction inputted by the user is started. The instruction compresses the above data, and after the compression is sent to a large-screen display device for display through a wireless network.
  • the display device has a touch function, and can receive the user's touch operation or touch behavior in real time, the display device converts the touch operation or touch behavior into a touch signal, and converts the touch signal to the touch signal.
  • the touch signal is transmitted to the data transmission device through the wireless network, and the microprocessor of the data transmission device receives the touch signal. Since the DP pin of the TypeC interface only supports receiving media data from an external computer, there is also a connection between the microprocessor and the TypeC interface. To set up another USB transmission channel, the details are shown in the USB transmission channel in Figure 29 and Figure 31.
  • the microcontroller sends the touch signal to the external computer through the USB transmission channel between the microcontroller and the TypeC interface.
  • the external computer responds to the touch signal or starts a corresponding application program according to the touch signal, so as to realize the touch return function and increase the experience of human-computer interaction.
  • the redesign of the data transmission device enables the data transmission device to directly use its own TypeC interface to communicate with the external computer.
  • the TypeC interface of the computer is connected, and the external computer directly sends the media data in the DP protocol format to the data transmission device through the TypeC interface.
  • the external computer can send the media content including audio and video data to the data transmission device without driver installation without the need to install a specific driver, which saves the time for the external computer to install the driver.
  • the media data in the DP protocol format needs to be converted into the video data in the MIPI format and/or the audio data in the I2S format, and then compress the video data in the MIPI format and/or the audio data in the I2S format
  • the solution of this embodiment can be implemented by arranging a data conversion chip in the data processing device, and the chip can run the DP protocol.
  • the data processing device is a wireless screen sharing device as an example for description.
  • the wireless screen transmitter includes a TypeC interface, a wireless module, a data conversion chip and a microprocessor; the TypeC interface is connected with the data conversion chip, the wireless module can be a Wi-Fi module, and the data conversion chip is connected to the TypeC The interface and the microprocessor are respectively connected, and the microprocessor is connected with the wireless module.
  • the specific implementation is as follows:
  • the data conversion chip of the wireless screen feeder sends a request signal to the external computer through the paired communication pin of the TypeC interface, and the request signal is used to request the external computer to send the DP protocol format to the at least one pair of differential signal transmission pins.
  • the data conversion chip of the wireless screen transmission device receives the media data of the DP protocol format through the differential signal transmission pin, wherein the media data includes at least one of the video data or the audio data from the external computer;
  • the data conversion chip of the wireless screen transmission device converts the media data into the first format data
  • the data conversion chip of the wireless screencaster converts the media data in the DP protocol format into video data in the MIPI format and/or audio data in the I2S format.
  • the data conversion chip of the wireless screen sharing device sends the video data of MIPI format and/or the audio data of I2S format to the microprocessor of the wireless screen sharing device;
  • the microprocessor of the wireless screen transfer device When the microprocessor of the wireless screen transfer device receives the screen transfer instruction output by the user, it starts to compress the video data in MIPI format and/or the audio data in I2S format into data in H.264/H.265 format and/or Data in AAC format; otherwise, discard the video data in MIPI format and/or the audio data in I2S format;
  • the microprocessor of the wireless screen sharing device can receive the screen sharing instruction through the screen sharing button of the wireless screen sharing device; wherein, the screen sharing button of the wireless screen sharing device is a hardware button, which is arranged on the upper surface of the wireless screen sharing device. or side; the screen transfer button of the wireless screen transmitter can also be a soft button.
  • the soft button is realized by a program and is set on the interface of the display screen of the wireless screen transmitter, or on the display interface of an external computer. Users can click This soft key starts the compression and encoding of video data in MIPI format and/or audio data in I2S format.
  • the compressed data in H.264/H.265 format and/or data in AAC format is sent to a large-screen display device for display through a wireless network.
  • the wireless network may be a Wi-Fi network, a 3G/4G/5G communication network, or other networks with a data transmission function.
  • the wireless screen transmitter can directly use its own TypeC interface. It is connected with the TypeC interface of the processing device, and the processing device directly sends the media data in the DP protocol format to the wireless screen sharing device through the TypeC interface.
  • the external computer can send media content including audio and video data to the wireless screen sharing device without the need to install a specific driver, saving the time for the external computer to install the driver. , to improve the efficiency of the meeting.
  • TypeC interface 21 also has the power signal transmission pins VBUS (A9, B4, B9, A4) shown in Figure 30, there is no need to add an additional interface to connect the power supply, and the power supply signal of the external computer can be obtained, which is the microcomputer in the data processing device.
  • the processor 24 and other components that need power supply are powered.
  • the TypeC interface 21 also has the USB2.0 data transmission pins D+ and D- shown in FIG. 30, which can be used to transmit other data. Therefore, this embodiment
  • the data processing device includes a TypeC interface 21, and the differential signal transmission pins in the TypeC interface 21 are used as screen data receiving ports, which has the advantage of diversifying the functions of the data processing device.
  • the data transmission device also includes a first conversion IC23, that is, a first data conversion chip, which is used to convert the media content in the data packet corresponding to the DP (Displayport) protocol received from the user's external computer to suitable for the microprocessor 24. It can be converted into a data format.
  • the first data conversion chip can convert the video part of the media content into data in MIPI format, and convert the audio part of the media content into data in I2S format, both of which are also called first format data.
  • MIPI video data may contain a sequence of image frames including pixels represented in YUV format; I2S audio signals may be presented in Pulse Code Modulation (PCM) format.
  • PCM Pulse Code Modulation
  • the media data in the two formats can be provided to the microprocessor 24.
  • the microprocessor 24 is a hardware processor (such as an ARM processor), Microprocessor 24 may be programmed to support video/audio encoders to compress video data and audio data.
  • the microprocessor 24 can encode MIPI video data according to video compression standards (such as H.264, H.265, etc.), and encode I2S audio data according to audio compression standards (such as OPUS audio codec standard or MP3 standard or AAC) Encoding, both are also called second format data.
  • the microprocessor 24 sends the encoded video data and audio data to the wireless module 12.
  • the wireless module 12 is specifically the first wireless transmitter/receiver.
  • the wireless module 12 can transmit the encoded and compressed video data through the wireless network. and audio data are transmitted to the second wireless transmitter/receiver of the large-size display screen or the large-size touch display screen paired with the data transmission device.
  • the wireless module 12 may include a wireless network card paired with a wireless network for communicating with a second wireless transmitter/receiver connected to the display device. Therefore, the user does not need to perform any network configuration on the external computer, and the user only needs to insert the data transmission device into the USB-Type-C port of the external computer to complete the sharing process.
  • the present embodiment also includes a trigger device that is connected to and paired with the microprocessor 24.
  • the user can control the trigger device to control the working state of the microprocessor 24 and the wireless module 12, and freely participate in sharing or exit the sharing.
  • the microprocessor 24 responds to the triggering of the triggering device, thereby starting to compress and encode the video data and audio data, so as to transmit through the wireless module 12 to a large-size display screen or a large-size touch display screen; or, when the user generates a second user operation for instructing to stop the screen transmission through the trigger device, the microprocessor 24 responds to another trigger from the trigger device, thereby stopping the video Data and audio data are compressed, encoded, and sent to a large-size display screen or a large-size touch display screen through the wireless module 12, and the video data and audio data received from the first data conversion chip are discarded.
  • the triggering device can be physical hardware or virtual
  • the data transmission device further includes a first conversion IC23 for converting the input DP video data into MIPI video data for output, and the first conversion IC23 is connected to Between the differential signal transmission pin and the first data input port of the microprocessor 24, the input end of the first conversion IC23 is connected to the differential signal transmission pin, and the output end of the first conversion IC23 is connected to the first data input port of the microprocessor 24.
  • a data input port Since there are few types of microprocessors that can be used to transmit video data on the market at present, there are also fewer types of ports that can be supported. MIPI port is one of the most widely used microprocessor ports, and converts DP video data into MIPI video.
  • the data conversion IC is also relatively widely used, so the first data input port is the MIPI port, and the first conversion IC 23 converts the DP video data into MIPI video data and outputs it to the microprocessor 24, which is more convenient for those skilled in the art to implement the present invention. technical solutions to improve practicability.
  • the data transmission device further includes a power supply module 26, which may include a DC-DC (direct current to direct current) circuit and/or an LDO (low dropout regulator, low dropout linear voltage regulator). device) circuit.
  • the input end of the power supply module 26 is connected to the power signal transmission pin of the TypeC interface 21 , and the output end is connected to the power supply port of the first conversion IC 23 .
  • the first audio and video data compressed and encoded by the microprocessor 24 is H264 audio and video data, H265 audio and video data or MPEG audio and video data.
  • IP Camera IP Camera
  • the IP camera processor is a relatively mature microprocessor used to transmit video data in the communication network. It can realize the function of compression and coding, and has a built-in Web-based operating system, so that the video data can be sent to the end user through the network.
  • microprocessor 24 is further configured to provide a second operating system to implement pairing management of the WiFi module.
  • FIG. 31 is a schematic structural diagram of another implementation manner of a data transmission apparatus provided by an embodiment of the present invention.
  • This embodiment replaces the first conversion IC in the above technical solution with the second conversion IC 28 and the third conversion IC 29 .
  • the second conversion IC28 is used to convert the input DP video data into HDMI video data for output
  • the third conversion IC29 is used to convert the input HDMI video data into BT1120 data or BT656 data for output.
  • the second conversion IC 28 and the third conversion IC 29 are connected between the differential signal transmission pin and the first data input port of the microprocessor 24, wherein the input end of the second conversion IC 28 is connected to the differential signal transmission pin , the output end of the second conversion IC 28 is connected to the input end of the third conversion IC 29, and the output end of the third conversion IC 29 is connected to the first data input port of the microprocessor 24.
  • the BT1120 or BT656 port is also a common port of the microprocessor 24, and the second conversion IC28 and the third conversion IC29 are also relatively widely used. Therefore, the embodiment of FIG. 31 provides another method to improve the usability of peripheral devices. plan.
  • the schematic structural diagram of the data transmission device shown in FIG. 31 further includes a power supply module 26 , a power management module 27 or a flash memory 25 , and the corresponding connection structure and function can be set with reference to the technical solution corresponding to FIG. 29 .
  • the data transmission device includes a screen data receiving port that can directly acquire screen data of the processing device, and also includes a wireless module that can transmit the screen data to the wireless communication network.
  • the data transmission device automatically obtains the screen data output by the external computer to the monitor and sends it to the communication network, so that the screen can be transmitted to other network nodes in the communication network for display without installing the driver.
  • the USB interface is used to transmit the compressed and encoded data to the wireless module, and the technical solution of this embodiment has the effects of driving-free screen transfer, reducing the preparation time before screen transfer, and not occupying the resources of the processing device.

Abstract

The present application provides a data transmission apparatus and method. The data transmission apparatus is provided with a microcontroller, a power supply, a data transmission module, a TypeC interface, and a vibration sensor. Once the vibration sensor detects that the data transmission apparatus is moved by a user, the microcontroller controls the power supply to supply power to the data transmission module, such that the data transmission module is powered on and started before the data transmission apparatus is connected to an external computer; after the data transmission apparatus is connected to the external computer, the data transmission apparatus receives, by means of the TypeC interface, media data in a DP protocol format transmitted from the external computer; the media data is processed and then sent, by means of a wireless channel, to a display device for display. Therefore, the response efficiency of the data transmission apparatus is improved.

Description

数据传输装置及方法Data transmission device and method 技术领域technical field
本申请涉及通信技术领域,尤其涉及一种数据传输装置及方法。The present application relates to the field of communication technologies, and in particular, to a data transmission device and method.
背景技术Background technique
传统技术中,投屏设备(例如,可立享)在与外接电脑连接之后,由外接电脑向投屏设备供电,但是,投屏设备内的数据传输模组在投屏设备与外接电脑连接上电之后才能开始进行初始化等配置流程,在经过一段时间配置完成之后,数据传输模组才开始工作,使得投屏设备的配置时间耗时较长,降低了投屏设备的响应速度和工作效率。In the traditional technology, after the screen-casting device (for example, ClickShare) is connected to the external computer, the external computer supplies power to the screen-casting device, but the data transmission module in the screen-casting device is connected between the screen-casting device and the external computer. The configuration process such as initialization can be started only after the power is turned on. After a period of configuration is completed, the data transmission module starts to work, which makes the configuration time of the screen projection device time-consuming and reduces the response speed and work efficiency of the screen projection device.
发明内容SUMMARY OF THE INVENTION
本申请提供一种数据传输装置及方法,用于解决现有技术中投屏设备响应慢,工作效率较低的技术问题。The present application provides a data transmission device and method, which are used to solve the technical problems of slow response and low work efficiency of screen projection equipment in the prior art.
本申请实施例提供的数据传输装置及方法,所述数据传输装置包括电源、微控制器、通信接口、振动传感器、可控开关和数据传输模组,所述通信接口为TypeC接口,所述数据传输模组包括Wi-Fi模组及微处理器,所述微处理器与所述TypeC接口连接;所述可控开关连接在所述电源和所述数据传输模组之间;所述TypeC接口用于接收外接电脑发送的DP协议格式的媒体数据;所述振动传感器用于根据所述数据传输装置的移动情况生成检测数据,所述检测数据携带所述振动传感器自身的加速度值;In the data transmission device and method provided by the embodiments of the present application, the data transmission device includes a power supply, a microcontroller, a communication interface, a vibration sensor, a controllable switch and a data transmission module, the communication interface is a TypeC interface, the data transmission The transmission module includes a Wi-Fi module and a microprocessor, the microprocessor is connected to the TypeC interface; the controllable switch is connected between the power supply and the data transmission module; the TypeC interface Used to receive media data in DP protocol format sent by an external computer; the vibration sensor is used to generate detection data according to the movement of the data transmission device, and the detection data carries the acceleration value of the vibration sensor itself;
所述数据传输模组用于接收从所述TypeC接口传输过来的媒体数据,并将所述媒体数据处理后,发送至显示设备;所述媒体数据为所述DP协议格式的媒体数据或将所述DP协议格式的媒体数据处理后生成的MIPI格式的视频数据和/或I2S格式的音频数据;所述微控制器用于根据所述振动传感器的检测数据和预设的加速度阈值控制所述可控开关的通断。The data transmission module is used to receive the media data transmitted from the TypeC interface, process the media data, and send it to the display device; the media data is the media data in the DP protocol format or the The video data in MIPI format and/or the audio data in I2S format generated after the media data in the DP protocol format is processed; the microcontroller is used to control the controllable control according to the detection data of the vibration sensor and a preset acceleration threshold switch on and off.
本申请提供的数据传输装置及方法,在振动传感器检测到用户移动数据传输装置时,微控制器控制电源向数据传输模组供电,使得数据传输模组在数据传输装置与外接电脑连接之前就开始启动,在数据传输装置与外接电脑连接后,数据传输装置通过其TypeC接口接收从外接电脑传输过来的DP协议格式的媒体数据,处理后通过无线信道发送至显示设备显示,提高了数据传输装置的响应效率。In the data transmission device and method provided by the present application, when the vibration sensor detects that the user moves the data transmission device, the microcontroller controls the power supply to supply power to the data transmission module, so that the data transmission module starts before the data transmission device is connected to the external computer. After startup, after the data transmission device is connected to the external computer, the data transmission device receives the media data in the DP protocol format transmitted from the external computer through its TypeC interface, and sends it to the display device through the wireless channel after processing, which improves the performance of the data transmission device. response efficiency.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为本申请所应用场景的示意图;Fig. 1 is the schematic diagram of the application scenario of the application;
图2为一种技术中数据传输装置的结构示意图;2 is a schematic structural diagram of a data transmission device in a technology;
图3为另一种技术中数据传输装置的结构示意图;3 is a schematic structural diagram of a data transmission device in another technology;
图4为本申请一实施例提供的数据传输装置的应用场景框架示意图;FIG. 4 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application;
图5为本申请一实施例提供的微控制器和振动传感器连接关系的示意图;5 is a schematic diagram of a connection relationship between a microcontroller and a vibration sensor provided by an embodiment of the application;
图6为本申请一些实施例提供的一种振动传感器的结构示意图;6 is a schematic structural diagram of a vibration sensor provided by some embodiments of the present application;
图7为本申请一些实施例提供的一种微控制器的结构示意图;FIG. 7 is a schematic structural diagram of a microcontroller according to some embodiments of the present application;
图8为本申请一实施例提供的一种数据传输方法的流程示意图;FIG. 8 is a schematic flowchart of a data transmission method provided by an embodiment of the present application;
图9为本申请一实施例提供的一种数据传输方法的流程示意图;FIG. 9 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
图10为本申请一实施例提供的数据传输装置的应用场景框架示意图;10 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application;
图11为本申请一实施例提供的数据传输装置的应用场景框架示意图FIG. 11 is a schematic diagram of an application scenario framework of a data transmission apparatus provided by an embodiment of the present application
图12为本申请一些实施例提供的充电管理IC芯片和周边电路示意图;12 is a schematic diagram of a charging management IC chip and peripheral circuits provided by some embodiments of the present application;
图13为本申请一些实施例提供的电源芯片和周边电路示意图;13 is a schematic diagram of a power chip and peripheral circuits provided by some embodiments of the present application;
图14为本申请一实施例提供的数据传输装置的应用场景框架示意图;14 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application;
图15为本申请一些实施例提供的可控开关和与门电路的相关电路结构示意图;15 is a schematic structural diagram of a related circuit of a controllable switch and an AND gate circuit provided by some embodiments of the present application;
图16为本申请一些实施例提供的外部电源检测模块的部分电路结构示意图;16 is a schematic diagram of a partial circuit structure of an external power detection module provided by some embodiments of the present application;
图17为本申请一实施例提供的数据传输装置的控制方法的流程示意图;17 is a schematic flowchart of a control method of a data transmission device provided by an embodiment of the present application;
图18为本申请一实施例提供的数据传输装置的应用场景框架示意图;18 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application;
图19为本申请一些实施例提供的数据传输模组执行数据传输装置控制方法时的状态示意图;19 is a schematic state diagram of a data transmission module according to some embodiments of the present application when a data transmission device control method is executed;
图20为本申请一实施例提供的数据传输装置的应用场景框架示意图;20 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application;
图21为本申请一实施例提供的一种外部电源检测模块的部分电路结构示意图;21 is a schematic diagram of a partial circuit structure of an external power supply detection module provided by an embodiment of the application;
图22为本申请一些实施例提供的微控制器执行数据传输装置控制方法时的状态示意图;22 is a schematic state diagram of a microcontroller according to some embodiments of the present application when a method for controlling a data transmission device is executed;
图23为本申请提供的数据传输装置一实施例的应用场景框架示意图;23 is a schematic diagram of an application scenario framework of an embodiment of a data transmission device provided by the present application;
图24为本申请提供的数据传输装置一实施例的应用场景框架示意图;24 is a schematic diagram of an application scenario framework of an embodiment of a data transmission device provided by the present application;
图25为本申请一实施例提供的一种数据传输方法的流程示意图;25 is a schematic flowchart of a data transmission method provided by an embodiment of the application;
图26为本申请一实施例提供的数据传输装置的应用场景框架示意图;26 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application;
图27为本申请提供的数据传输方法一实施例的流程示意图;27 is a schematic flowchart of an embodiment of a data transmission method provided by the present application;
图28为本申请提供的数据传输方法一实施例的流程示意图;28 is a schematic flowchart of an embodiment of a data transmission method provided by this application;
图29为本申请提供的数据传输装置的另一种实施方式的结构示意图;29 is a schematic structural diagram of another embodiment of the data transmission device provided by the application;
图30为TypeC接口的引脚排列图;Figure 30 is a pinout diagram of the TypeC interface;
图31为本申请提供的数据传输装置的的另一种实施方式的结构示意图。FIG. 31 is a schematic structural diagram of another embodiment of the data transmission apparatus provided by the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
图1为本申请所应用场景的示意图,其中,以用户需要会议上分享电子设备1中演示文稿的场景作为示例,电子设备1可以是外接电脑,由于电子设备1屏幕大小的限制,用户可以将电子设备1使用连接线2与数据传输装置3连接后,通过数据传输装置3将电子设备1的显示界面中所显示的演示文稿的画面投射到挂设在墙体上的显示设备4进行显示。FIG. 1 is a schematic diagram of the application scenario of the application, in which, taking the scenario where the user needs to share the presentation in the electronic device 1 as an example, the electronic device 1 can be an external computer. Due to the limitation of the screen size of the electronic device 1, the user can After the electronic device 1 is connected to the data transmission device 3 using the connecting line 2 , the data transmission device 3 projects the presentation screen displayed on the display interface of the electronic device 1 to the display device 4 hung on the wall for display.
其中,电子设备1还可以是笔记本电脑、平板电脑、、外接电脑、台式机或者工作站等具有显示界面的设备;电子设备1与数据传输装置3之间能够进行数据通信,例如电子设备1与数据传输装置3之间可以设置连接线2以通过有线通信方式相互连接。连接线2可以是通用串行总线(Universal Serial Bus,简称:USB)连接线、高清多媒体接口(High Definition Multimedia Interface,简称:HDMI)连接线或者网线等。在一种实施例中,USB连接线可以是TypeC连接线。在一些实施例中,连接线2可以和数据传输装置3一体化设置,即连接线2和数据传输装置3一起形成一个整体的设备,此时连接线2可以视视为是数据传输装置3的一部分,这样用户在将数据传输装置3连接电子设备1时,可以省略了数据传输装置3与连接线2的一端进行连接的步骤,只需要将电子设备1与连接线的另一端进行连接,从而提高了效率,也能够避免因为找不到连接线2而导致数据传输装置3无法连接电子设备1的情形。Wherein, the electronic device 1 can also be a notebook computer, a tablet computer, an external computer, a desktop computer or a workstation, etc. with a display interface; data communication can be performed between the electronic device 1 and the data transmission device 3, for example, the electronic device 1 and data A connection line 2 may be provided between the transmission devices 3 to be connected to each other through wired communication. The connection line 2 may be a Universal Serial Bus (Universal Serial Bus, referred to as: USB) connection cable, a High Definition Multimedia Interface (High Definition Multimedia Interface, referred to as: HDMI) connection cable or a network cable or the like. In one embodiment, the USB cable may be a TypeC cable. In some embodiments, the connection line 2 can be integrated with the data transmission device 3 , that is, the connection line 2 and the data transmission device 3 together form an integral device. At this time, the connection line 2 can be regarded as a part of the data transmission device 3 In this way, when the user connects the data transmission device 3 to the electronic device 1, the step of connecting the data transmission device 3 to one end of the connecting wire 2 can be omitted, and the user only needs to connect the electronic device 1 to the other end of the connecting wire, thereby The efficiency is improved, and the situation that the data transmission device 3 cannot be connected to the electronic device 1 can be avoided because the connecting wire 2 cannot be found.
数据传输装置3与显示设备4可以通过无线通信方式连接,所述无线通信方式包括但不限于:无线保真(Wireless Fidelity,Wi-Fi)、蓝牙或者其他短距离无线通信方式等;在一些实施例中,数据传输装置3又可称为投屏设备、投屏器、无线投屏器、传屏器或者无线传屏器等,显示设备4又可被称为大屏幕平板等,显示设备4能够配合数据传输装置3共同实现电子设备1中演示文稿的分享。在一些实施例中,显示设备4还能够单独实现远程即时通信以及通过可触控面板提供书写画布等功能。The data transmission device 3 and the display device 4 can be connected through wireless communication, the wireless communication includes but is not limited to: Wireless Fidelity (Wireless Fidelity, Wi-Fi), Bluetooth or other short-range wireless communication, etc.; in some implementations In an example, the data transmission device 3 may also be referred to as a screen projection device, a screen projection device, a wireless screen projection device, a screen transmission device or a wireless screen transmission device, etc., and the display device 4 may also be referred to as a large-screen tablet, etc., and the display device 4 The sharing of presentations in the electronic device 1 can be realized together with the data transmission device 3 . In some embodiments, the display device 4 can also independently implement functions such as remote instant communication and providing a writing canvas through a touch-sensitive panel.
由于数据传输装置3通过有线连接方式与电子设备1连接,因此数据传输装置3可以在不外接电源的情况下,当电子设备1与数据传输装置3连接之后,由电子设备1通过连接线2向数据传输装置3供电。例如,图2为一种技术中数据传输装置的结构示意图,其中,数据传输装置3中包括:通信接口31和数据传输模组32,数据传输模组32可以通过通信接口31与连接线2连接进而接收电子设备1传输的数据。当连接线2是USB连接线时,所述通信接口31可以是TypeC接口,该TypeC接口可以兼容USB及Type-C数据,即:该TypeC接口可以传输DP数据,也可以传输USB数据。相应地,电子设备1也可以提供USB接口,使得USB连接线2通过建立电子设备1和数据传输装置3的两个USB接口之间的连接之后,实现建立电子设备1与数据传输装置3的连接。由于USB连接线既能够传输数据,还能够传输电能,因此电子设备1可以依次 通过连接线2和通信接口31向数据传输模组32提供数据和电能,使得数据传输模组32与通信接口31之间至少存在数据连接和电能连接的两种连接逻辑,例如数据传输模组32可以通过图中的路径①接收来自于电子设备1传输的电能,还可以通过图中的路径②接收来自于电子设备1传输的显示界面的数据后,通过无线通信方式将显示界面投射到显示设备4进行显示。数据传输模组32可以包括Wi-Fi模组及微处理器,所述微处理器与所述TypeC接口连接,具体的实施方式请参见本发明实施例的图29,图30及图31,其具体说明了在数据传输装置3的通信接口为TypeC接口时,数据传输装置3的数据传输模组32的构成方式,及数据传输模组32与TypeC接口的连接及外围电路的构成、实现方式。Since the data transmission device 3 is connected to the electronic device 1 through a wired connection, the data transmission device 3 can be connected to the electronic device 1 through the connection line 2 after the electronic device 1 is connected to the data transmission device 3 without an external power supply. The data transmission device 3 is powered. For example, FIG. 2 is a schematic structural diagram of a data transmission device in a technology, wherein the data transmission device 3 includes: a communication interface 31 and a data transmission module 32, and the data transmission module 32 can be connected to the connection line 2 through the communication interface 31. Then, the data transmitted by the electronic device 1 is received. When the connection line 2 is a USB connection line, the communication interface 31 can be a TypeC interface, and the TypeC interface can be compatible with USB and Type-C data, that is, the TypeC interface can transmit DP data and also transmit USB data. Correspondingly, the electronic device 1 may also provide a USB interface, so that after the USB connection line 2 establishes the connection between the electronic device 1 and the two USB interfaces of the data transmission device 3, the connection between the electronic device 1 and the data transmission device 3 is established. . Since the USB connection line can transmit both data and power, the electronic device 1 can provide data and power to the data transmission module 32 through the connection line 2 and the communication interface 31 in turn, so that the data transmission module 32 and the communication interface 31 are connected between the data transmission module 32 and the communication interface 31. There are at least two connection logics of data connection and power connection. For example, the data transmission module 32 can receive the power transmitted from the electronic device 1 through the path ① in the figure, and can also receive the power from the electronic device through the path ② in the figure. 1 After transmitting the data of the display interface, the display interface is projected to the display device 4 for display through wireless communication. The data transmission module 32 may include a Wi-Fi module and a microprocessor, and the microprocessor is connected to the TypeC interface. For specific implementations, please refer to FIG. 29 , FIG. 30 and FIG. 31 in the embodiment of the present invention. When the communication interface of the data transmission device 3 is a TypeC interface, the structure of the data transmission module 32 of the data transmission device 3, the connection between the data transmission module 32 and the TypeC interface, and the structure and implementation of the peripheral circuit are specifically described.
在如图2所示的数据传输装置3中,由于数据传输模组32完成启动以及显示界面的投射等操作所需的电能完全由电子设备1提供,因此电子设备1需要通过连接线2同时向数据传输模组传输数据和电能,而数据传输模组32在数据传输装置3未接入电子设备1时由于没有输入电能处于关停状态。当用户将电子设备1与数据传输装置3通过连接线2连接之后,数据传输模组32无法立即接收数据并进行显示界面的投射等操作,而是需要首先通过路径①接收电能,用以进行数据传输模组32的启动、初始化、进行通信配置等操作使得数据传输模组32从关停状态切换为工作状态之后,才能够通过路径②接收数据。可以理解的是,将电子设备1与数据传输装置3通过连接线2连接的时刻记为第一时刻、将数据传输模组32由关停状态切换为工作状态的时刻记为第二时刻,则在第一时刻与第二时刻之间,即使电子设备1通过路径②向数据传输模组32传输了显示界面的数据,数据传输模组32也无法将显示界面投射到显示设备4上显示。只有当数据传输模组32切换为工作状态,也就是数据传输模组32做好投屏准备之后,在第二时刻之后,电子设备1通过路径②向数据传输模组传输的显示界面的数据,才能够由数据传输模组32通过路径②接收并投射到显示设备4上显示。使得用户在开始使用数据传输装置3、将数据传输装置3与电子设备1连接时,给用户造成的直观感受是,在将电子设备1与数据传输装置3通过连接线2连接好(第一时刻)之后,还需要等待10到20秒的时间(直到第二时刻之后)才能够在显示设备4上看到电子设备1所投射的显示界面,而在这等待的10秒到20秒的时间之间电子设备1的显示界面都不能被数据传输装置3投射到显示设备4上,降低了数据传输装置3进行投屏时的响应速度和工作效率,影响用户体验。In the data transmission device 3 shown in FIG. 2 , since the power required for the data transmission module 32 to complete the startup and the projection of the display interface is completely provided by the electronic device 1 , the electronic device 1 needs to send the data to the electronic device 1 through the connecting line 2 at the same time. The data transmission module transmits data and power, and the data transmission module 32 is in a shutdown state because there is no input power when the data transmission device 3 is not connected to the electronic device 1 . After the user connects the electronic device 1 and the data transmission device 3 through the connecting line 2, the data transmission module 32 cannot immediately receive data and perform operations such as projection of the display interface, but needs to first receive power through the path ① for data transmission. The data transmission module 32 can only receive data through the path ② after operations such as startup, initialization, and communication configuration of the transmission module 32 make the data transmission module 32 switch from the shutdown state to the working state. It can be understood that the moment when the electronic equipment 1 and the data transmission device 3 are connected through the connecting line 2 is recorded as the first moment, and the moment when the data transmission module 32 is switched from the shutdown state to the working state is recorded as the second moment, then. Between the first time and the second time, even if the electronic device 1 transmits the data of the display interface to the data transmission module 32 through the path ②, the data transmission module 32 cannot project the display interface to the display device 4 for display. Only when the data transmission module 32 is switched to the working state, that is, after the data transmission module 32 is ready for screen projection, after the second moment, the data of the display interface transmitted by the electronic device 1 to the data transmission module through the path ② is It can be received by the data transmission module 32 through the path ② and projected to the display device 4 for display. When the user starts to use the data transmission device 3 and connects the data transmission device 3 with the electronic device 1, the intuitive feeling caused to the user is that when the electronic device 1 and the data transmission device 3 are connected through the connecting line 2 (the first moment). ), it is necessary to wait 10 to 20 seconds (until the second time) before the display interface projected by the electronic device 1 can be seen on the display device 4, and during the waiting time of 10 to 20 seconds The display interface of the electronic device 1 cannot be projected onto the display device 4 by the data transmission device 3, which reduces the response speed and work efficiency when the data transmission device 3 performs screen projection, and affects the user experience.
数据传输装置中还可以通过单独供电的方式,使数据传输装置中数据传输模组一直保持工作状态,来提高数据传输装置对输入的显示界面投射的响应速度。例如,图3为另一种技术中数据传输装置的结构示意图,其中,数据传输装置3中除了通信接口31和数据传输模组32之外,还专门设置了为数据传输模组32供电的电源33,当数据传输装置3中的通信接口21未与电子设备1连接时,由数据传输装置3中设置的电源33通过路径③向数据传输模组32提供电能,使得数据传输模组32在数据传输装置3没有通过连接线2与电子设备1连接时依然能够保持工作状态。当用户将电子设备1与数据传输装置3的通信接口31通过连接线2连接(记为第一时刻)后,数据传输模组32由于一直处于工作状态,可以在第一时刻之后,开始通过路径②接收电子设备1显示界面的数据,并将显示界面投射到显示设备4上显示。当用户将电子设备1与数据传输装置3通过连接线2连接好之后,可以很快在显示设备4上看到所投射的电子设备1的显示界面,提高了响应速度和工作效率,给用户带来“即插即用”的直观感受。In the data transmission device, a separate power supply can also be used to keep the data transmission module in the data transmission device in a working state, so as to improve the response speed of the data transmission device to the projection of the input display interface. For example, FIG. 3 is a schematic structural diagram of a data transmission device in another technology, wherein, in addition to the communication interface 31 and the data transmission module 32 in the data transmission device 3, a power supply for supplying power to the data transmission module 32 is also specially set 33, when the communication interface 21 in the data transmission device 3 is not connected with the electronic equipment 1, the power supply 33 set in the data transmission device 3 provides power to the data transmission module 32 through the path ③, so that the data transmission module 32 is in the data transmission module 32. When the transmission device 3 is not connected to the electronic device 1 through the connecting wire 2, it can still maintain the working state. After the user connects the electronic device 1 and the communication interface 31 of the data transmission device 3 through the connecting line 2 (recorded as the first time), the data transmission module 32 can start to pass the path after the first time because the data transmission module 32 is always in the working state. ②Receive the data of the display interface of the electronic device 1, and project the display interface to the display device 4 for display. After the user connects the electronic device 1 and the data transmission device 3 through the connecting line 2, the projected display interface of the electronic device 1 can be quickly seen on the display device 4, which improves the response speed and work efficiency, and provides users with Come to the intuitive feeling of "plug and play".
然而,如图3所示的数据传输装置3虽然提高了响应速度和工作效率,但是为了保持数据传输装置3中的数据传输模组32随时处于工作状态,来尽可能延长数据传输装置3实现“即插即用”功能的续航时间,数据传输装置3中的电源33的容量和体积都较大,占用了数据传输设3备内大量的空间,严重影响数据传输装置3内部布局以及外部外观的设计。However, although the data transmission device 3 shown in FIG. 3 improves the response speed and work efficiency, in order to keep the data transmission module 32 in the data transmission device 3 in a working state at any time, to extend the data transmission device 3 as much as possible to achieve " The battery life of the "plug and play" function, the capacity and volume of the power supply 33 in the data transmission device 3 are relatively large, occupying a large amount of space in the data transmission device 3, and seriously affecting the internal layout and external appearance of the data transmission device 3. design.
综上,在如图2所示的数据传输装置存在着响应速度慢和工作效率较低的问题,图3所示的数据传输装置存在着设备空间和容量的不足,而如何兼顾空间和效率,在数据传输装置中电源不需要过大容量和体积的情况下,还能够提高数据传输装置在传输数据时的响应速度和工作效率,是本领域亟待解决的技术问题。To sum up, the data transmission device shown in Figure 2 has the problems of slow response speed and low work efficiency, and the data transmission device shown in Figure 3 has the shortage of equipment space and capacity, and how to take into account the space and efficiency, Under the condition that the power supply in the data transmission device does not need excessive capacity and volume, it can also improve the response speed and work efficiency of the data transmission device when transmitting data, which is a technical problem to be solved urgently in the art.
因此,本申请提供一种数据传输方法及数据传输装置,数据传输装置中设置有微控制器和振动传感器。在数据传输装置未连接电子设备时,其中,当振动传感器没有检测到用户移动数据传输装置时,微控制器不会控制电源通过可控开关向数据传输模组供电,使得数据传输模组没有供电而保持关停状态;只有在振动传感器检测到用户移动数据传输装置时(例如用户拿起数据传输装置时),然后微控制器才控制电源通过可控开关向数据传输模组供电,使得数据传输模组在数 据传输装置与电子设备连接之前就开始启动,开始从关停状态切换为工作状态,从而在提高数据传输装置响应速度和工作效率的同时,使得电源不用一直向数据传输模组供电,同时减小了电源的容量和体积。可选的,数据传输装置中的微控制器在振动传感器没有检测到用户移动数据传输装置时,可以处于待机状态,其中,微控制器处于待机状态的功耗小于处于正常工作状态的功耗,以节省微控制器本身的对电能的消耗,微控制器可以由数据传输装置中的电源供电。而当微控制器处于待机状态时,只有在振动传感器检测到用户移动数据传输装置(例如用户拿起数据传输装置时),微控制器才被唤醒,从待机状态切换到工作状态,然后微控制器才控制电源通过可控开关向数据传输模组供电,使得数据传输模组在数据传输装置与电子设备连接之前就开始启动。Therefore, the present application provides a data transmission method and a data transmission device. The data transmission device is provided with a microcontroller and a vibration sensor. When the data transmission device is not connected to the electronic device, when the vibration sensor does not detect that the user moves the data transmission device, the microcontroller will not control the power supply to supply power to the data transmission module through the controllable switch, so that the data transmission module is not powered And keep the shutdown state; only when the vibration sensor detects that the user moves the data transmission device (for example, when the user picks up the data transmission device), then the microcontroller controls the power supply to supply power to the data transmission module through the controllable switch, so that the data transmission The module starts to start before the data transmission device is connected to the electronic equipment, and starts to switch from the shutdown state to the working state, so as to improve the response speed and work efficiency of the data transmission device, and at the same time, the power supply does not need to supply power to the data transmission module all the time. At the same time, the capacity and volume of the power supply are reduced. Optionally, the microcontroller in the data transmission device may be in a standby state when the vibration sensor does not detect that the user moves the data transmission device, wherein the power consumption of the microcontroller in the standby state is less than that in the normal working state, In order to save the power consumption of the microcontroller itself, the microcontroller can be powered by the power supply in the data transmission device. And when the microcontroller is in the standby state, only when the vibration sensor detects that the user moves the data transmission device (for example, when the user picks up the data transmission device), the microcontroller is woken up, switched from the standby state to the working state, and then the microcontroller The controller controls the power supply to supply power to the data transmission module through the controllable switch, so that the data transmission module starts to start before the data transmission device is connected with the electronic equipment.
下面以具体地实施例对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present application will be described in detail below with specific examples. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
图4为本申请一实施例提供的数据传输装置的应用场景框架示意图,如图4所示的电子设备1、连接线2、数据传输装置3和显示设备4可应用于如图1所示的场景中,具体地,本实施例提供的数据传输装置3包括:通信接口31、数据传输模组32和电源33,其中,当数据传输装置3通过连接线2与电子设备1连接后,数据传输模组32可以通过图中的路径①接收来自于电子设备1传输的电能,还可以通过图中的路径②接收来自于电子设备1传输的显示界面的数据,并通过无线通信方式与显示设备4进行数据通信,所述数据通信包括将显示界面投射到显示设备4进行显示。当数据传输装置3中的通信接口31未与电子设备1连接时,电源33可以通过路径③向数据传输模组32提供电能,使得数据传输模组32处于工作状态,但是,本实施例中的电源33并不是一直通过路径③向数据模组32提供电能,而是在根据连接在电源33和数据传输模组32之间的可控开关36的导通状态或关断状态,向数据模组32提供电能。其中,当可控开关36导通时,电源33可以通过可控开关36向数据传输模组32传输电能,当可控开关36关断时,电源33无法通过可控开关36向数据传输模组32供电。FIG. 4 is a schematic diagram of an application scenario framework of the data transmission device provided by an embodiment of the present application. The electronic device 1, the connecting line 2, the data transmission device 3 and the display device 4 shown in FIG. In the scenario, specifically, the data transmission device 3 provided in this embodiment includes: a communication interface 31 , a data transmission module 32 and a power supply 33 . The module 32 can receive the power transmitted from the electronic device 1 through the path ① in the figure, and can also receive the data from the display interface transmitted by the electronic device 1 through the path ② in the figure, and communicate with the display device 4 through wireless communication. Data communication is carried out, which includes projecting the display interface to the display device 4 for display. When the communication interface 31 in the data transmission device 3 is not connected to the electronic device 1, the power supply 33 can provide power to the data transmission module 32 through the path ③, so that the data transmission module 32 is in a working state. However, in this embodiment, the The power supply 33 does not always provide power to the data module 32 through the path ③, but supplies power to the data module according to the on state or off state of the controllable switch 36 connected between the power supply 33 and the data transmission module 32. 32 provides electrical energy. Wherein, when the controllable switch 36 is turned on, the power supply 33 can transmit power to the data transmission module 32 through the controllable switch 36, and when the controllable switch 36 is turned off, the power supply 33 cannot pass the controllable switch 36 to the data transmission module. 32 powered.
本实施例通过微控制器34和振动传感器35实现对可控开关36通断的控制,具体地,数据传输装置3内部的振动传感器35能够在数据传输装置3移动时,根据数据传输装置3的移动情况生成检测数据,并可以将检测数据发送至微控制器34。例如,振动传感器35在本实施例中为加速度传感器,则振动传感器35根据数据传输装置的移动情况生成检测数据,所述检测数据至少包括振动传感器35自身的加速度值。微控制器34可以根据振动传感器35生成的检测数据,控制电源33和数据传输模组32之间的可控开关36导通或关断,从而控制电源33是否通过路径③向数据传输模组32提供电能。也就是说,本实施例中的数据传输装置3中虽然设置了与数据传输模组32连接的电源33,但是电源33是否向数据传输模组32提供电能,是由微控制器34根据振动传感器35的检测数据来控制的。In this embodiment, the on-off control of the controllable switch 36 is realized through the microcontroller 34 and the vibration sensor 35 . Specifically, the vibration sensor 35 inside the data transmission device 3 The movement conditions generate detection data, which can be sent to the microcontroller 34 . For example, the vibration sensor 35 is an acceleration sensor in this embodiment, and the vibration sensor 35 generates detection data according to the movement of the data transmission device, and the detection data includes at least the acceleration value of the vibration sensor 35 itself. The microcontroller 34 can control the controllable switch 36 between the power supply 33 and the data transmission module 32 to be turned on or off according to the detection data generated by the vibration sensor 35, thereby controlling whether the power supply 33 passes the path ③ to the data transmission module 32. Provide power. That is to say, although the data transmission device 3 in this embodiment is provided with a power supply 33 connected to the data transmission module 32, whether the power supply 33 provides power to the data transmission module 32 is determined by the microcontroller 34 according to the vibration sensor. 35 detection data to control.
需要说明的是,通常数据传输装置3会放在会议室的桌子上,而桌子会受到各种外力产生或大或小的振动,在一种可能的场景中,由于振动传感器的灵敏度很高,数据传输装置3会被轻微移动而被误触动,从而振动传感器会产生无用信号,为了过滤掉这些无用信号,微控制器34可以通过预存加速度阈值的方式对预设的加速度阈值进行存储,微控制器34接收振动传感器35发送的检测数据中携带振动传感器35自身的加速度值,微控制器34确定振动传感器35自身的加速度值超过预存的加速度阈值时,控制电源33和数据传输模组32之间的可控开关36导通,从而电源33通过路径③向数据传输模组32提供电能;或者,在另一种可能的实现方式中振动传感器35也可以预存加速度阈值,振动传感器35确定检测数据中加速度值超过预存的加速度阈值时,振动传感器35向微控制器34发送中断信号,当微控制器34接收到中断信号后,控制电源33和数据传输模组32之间的可控开关36导通,从而电源33通过路径③向数据传输模组32提供电能。It should be noted that the data transmission device 3 is usually placed on the table in the conference room, and the table will be subjected to various external forces to generate large or small vibrations. In a possible scenario, due to the high sensitivity of the vibration sensor, The data transmission device 3 will be slightly moved and accidentally triggered, so that the vibration sensor will generate useless signals. In order to filter out these useless signals, the microcontroller 34 can store the preset acceleration threshold by pre-storing the acceleration threshold. The device 34 receives the detection data sent by the vibration sensor 35 and carries the acceleration value of the vibration sensor 35 itself. When the microcontroller 34 determines that the acceleration value of the vibration sensor 35 itself exceeds the pre-stored acceleration threshold, the control power supply 33 and the data transmission module 32 are connected between the The controllable switch 36 is turned on, so that the power supply 33 provides power to the data transmission module 32 through the path ③; or, in another possible implementation, the vibration sensor 35 can also pre-store an acceleration threshold, and the vibration sensor 35 determines that in the detection data When the acceleration value exceeds the pre-stored acceleration threshold, the vibration sensor 35 sends an interrupt signal to the microcontroller 34, and when the microcontroller 34 receives the interrupt signal, the controllable switch 36 between the control power supply 33 and the data transmission module 32 is turned on , so that the power supply 33 provides power to the data transmission module 32 through the path ③.
可选地,在一些实施例中,振动传感器35具体可以是设置在数据传输装置3中的加速度传感器,加速度传感器可以根据数据传输装置3的运动,得到当前数据传输装置3在三个参考轴正负共六个方向的实时加速度值,这六个方向的实时加速度值可作为振动传感器35所生成的检测数据。更为具体地,图5为本申请一实施例提供的微控制器和振动传感器连接关系的示意图,其中,微控制器34和振动传感器35之间的连接关系至少包括I2C(Inter-Integrated Circuit)连接和/或中断(Interrupt,简称:INT)连接。该连接关系可以是多条实体的连接线、或者是一条集成的连接线,本申请对连接关系的具体实现不做限定,示例性地,在具体的印刷电路板(printed circuit boards,简称:PCB)上,该连接关系可以是印制在电路板上的导电线。其中,微控制器34可以通过I2C连接对振动传感器35进行初始化等设置,微控制器34还可以通过I2C连接读取振动传感器35的检测数据,此时,微控制器34需要主动获取振动传感器35的检测数据。振动传感器35可以通过INT连接向微控制器发送中断(interrupt,简称INT)信号。如图5所示的微控制器34和振动传感器35之间的I2C连接和INT连接可以同时设置, 或者当微控制器34和振动传感器35之间仅传输的I2C信号时设置I2C连接、又或者当微控制器34和振动传感器35之间仅传输的INT信号时设置INT连接。Optionally, in some embodiments, the vibration sensor 35 may specifically be an acceleration sensor provided in the data transmission device 3 , and the acceleration sensor may obtain the current data transmission device 3 in the three reference axes according to the movement of the data transmission device 3 . The real-time acceleration values in a total of six directions are negative, and the real-time acceleration values in these six directions can be used as the detection data generated by the vibration sensor 35 . More specifically, FIG. 5 is a schematic diagram of a connection relationship between a microcontroller and a vibration sensor provided by an embodiment of the application, wherein the connection relationship between the microcontroller 34 and the vibration sensor 35 includes at least I2C (Inter-Integrated Circuit). Connection and/or Interrupt (abbreviation: INT) connection. The connection relationship may be a plurality of physical connection lines or an integrated connection line, and the specific implementation of the connection relationship is not limited in this application. ), the connection relationship may be a conductive line printed on the circuit board. The microcontroller 34 can initialize the vibration sensor 35 through the I2C connection, and the microcontroller 34 can also read the detection data of the vibration sensor 35 through the I2C connection. At this time, the microcontroller 34 needs to actively obtain the vibration sensor 35 detection data. The vibration sensor 35 can send an interrupt (INT for short) signal to the microcontroller through the INT connection. The I2C connection and the INT connection between the microcontroller 34 and the vibration sensor 35 as shown in FIG. 5 can be set at the same time, or the I2C connection is set when only the I2C signal is transmitted between the microcontroller 34 and the vibration sensor 35, or The INT connection is set when only the INT signal is transmitted between the microcontroller 34 and the vibration sensor 35 .
可选地,本实施例提供的数据传输装置3中电源33还可以用于向微控制器34供电。在一种实施例中,微控制器34可以具有两种功耗状态,分别为第一功耗工作状态和第二功耗工作状态。在微控制器34接收检测数据或中断信号之前,微控制器34在数据传输装置3的电源的供电下处于第一功耗工作状态;微控制器34接收检测数据或中断信号后,处于第二功耗工作状态。在一些应用场景中,微控制器34在第一功耗工作状态下的功耗比在第二功耗工作状态的功耗低,具体的,第一功耗工作状态可以为低功耗工作状态,第二功耗工作状态可以为高功耗工作状态。微控制器34可选用具有低功耗工作状态的微控制单元(Micro Control Unit,简称:MCU),在微控制器34处于待机状态时,微控制器34可以维持在低功耗状态,其工作电流可以限制在uA级别,从而尽可能减少数据传输装置3未连接电子设备1时微控制器34本身对电源33的电能消耗。Optionally, the power supply 33 in the data transmission device 3 provided in this embodiment may also be used to supply power to the microcontroller 34 . In one embodiment, the microcontroller 34 may have two power consumption states, a first power consumption operating state and a second power consumption operating state, respectively. Before the microcontroller 34 receives the detection data or the interrupt signal, the microcontroller 34 is in the first power consumption working state under the power supply of the power supply of the data transmission device 3; after the microcontroller 34 receives the detection data or the interrupt signal, it is in the second power consumption state. Power consumption working state. In some application scenarios, the power consumption of the microcontroller 34 in the first power consumption working state is lower than that in the second power consumption working state. Specifically, the first power consumption working state may be a low power consumption working state , the second power consumption working state may be a high power consumption working state. The microcontroller 34 can be selected as a micro control unit (Micro Control Unit, MCU for short) with a low power consumption working state. When the microcontroller 34 is in a standby state, the microcontroller 34 can be maintained in a low power consumption state, and its work The current can be limited to uA level, so as to minimize the power consumption of the power supply 33 by the microcontroller 34 itself when the data transmission device 3 is not connected to the electronic device 1 .
示例性地,图6为本申请一些实施例提供的一种振动传感器的结构示意图,其中,振动传感器可以选型为型号“LIS3DHTR”的加速度传感器芯片,图7为本申请一些实施例提供的一种微控制器的结构示意图,其中,微控制器可以选型为型号“STM32L011D3P6”的MCU芯片。则结合图6和图7所示的示例,振动传感器的INT1管脚连接微控制器的PC15/OSC32_OUT管脚,实现如图5所示的“INT连接”,振动传感器可以通过INT1管脚向微控制器的PC15/OSC32_OUT管脚发送中断信号。振动传感器的SCL/SPC管脚连接微控制器的PA9/I2C1_SCL/USART2_TX管脚,振动传感器的SDA/SDI/SDO管脚连接微控制器的PA10/I2C1_SDA/USART2_RX管脚,共同实现如图5所示的“I2C连接”,振动传感器可以通过SDA/SDI/SDO管脚向微控制器的PA10/I2C1_SDA/USART2_RX管脚发送I2C数据(I2C serial data)、振动传感器可以通过SCL/SPC管脚向微控制器的PA9/I2C1_SCL/USART2_TX管脚发送I2C时钟信号(I2C serialclock)等。需要说明的是,如图6和图7仅示出了一种本申请实施例中微控制器和振动传感器可能的选型,本申请对微控制器和振动传感器的具体实现不做限定。Exemplarily, FIG. 6 is a schematic structural diagram of a vibration sensor provided by some embodiments of the application, wherein the vibration sensor can be selected as an acceleration sensor chip of type “LIS3DHTR”, and FIG. 7 is a schematic diagram of a vibration sensor provided by some embodiments of the application. A schematic diagram of the structure of a microcontroller, wherein the microcontroller can be selected as an MCU chip of the model "STM32L011D3P6". Combined with the examples shown in Figure 6 and Figure 7, the INT1 pin of the vibration sensor is connected to the PC15/OSC32_OUT pin of the microcontroller to achieve the "INT connection" shown in Figure 5. The vibration sensor can be connected to the micro controller through the INT1 pin. The PC15/OSC32_OUT pin of the controller sends an interrupt signal. The SCL/SPC pin of the vibration sensor is connected to the PA9/I2C1_SCL/USART2_TX pin of the microcontroller, and the SDA/SDI/SDO pin of the vibration sensor is connected to the PA10/I2C1_SDA/USART2_RX pin of the microcontroller. The "I2C connection" shown, the vibration sensor can send I2C data (I2C serial data) to the PA10/I2C1_SDA/USART2_RX pin of the microcontroller through the SDA/SDI/SDO pin, and the vibration sensor can send the micro-controller through the SCL/SPC pin. The PA9/I2C1_SCL/USART2_TX pin of the controller sends the I2C clock signal (I2C serialclock), etc. It should be noted that, FIG. 6 and FIG. 7 only show a possible selection of the microcontroller and the vibration sensor in the embodiment of the present application, and the present application does not limit the specific implementation of the microcontroller and the vibration sensor.
可选地,本实施例中提供的可控开关36可以是三极管、场效应晶体管等开关管,则微控制器34向可控开关36的控制端所发送的可控信号可以是高电平或者低电平。示例性地,当可控开关36是场效应晶体管,场效应晶体管的控制端为栅极,源极和漏极分别连接数据传输模组32和电源33,此时,当场效应晶体管的栅极接收到高电平(对应N沟道类型)或者低电平(对应P沟道类型)形式的信号,记为第一导通信号,第一导通信号能够使场效应晶体管闭合,场效应晶体管源极和漏极之间导通,电源33可以通过可控开关36向数据传输模组32供电;而当场效应晶体管接收到低电平(对应N沟道类型)或者高电平(对应P沟道类型)形式的信号,记为第一断开信号,第一关断信号能够控制场效应管断开,场效应晶体管源极和漏极之间关断,电源33不会向数据传输模组32供电。Optionally, the controllable switch 36 provided in this embodiment may be a switch tube such as a triode, a field effect transistor, etc., and the controllable signal sent by the microcontroller 34 to the control terminal of the controllable switch 36 may be a high level or low level. Exemplarily, when the controllable switch 36 is a field effect transistor, the control terminal of the field effect transistor is the gate, and the source and drain are respectively connected to the data transmission module 32 and the power supply 33. At this time, when the gate of the field effect transistor receives A signal in the form of a high level (corresponding to the N-channel type) or a low level (corresponding to the P-channel type) is denoted as the first turn-on signal, the first turn-on signal can make the field effect transistor close, and the field effect transistor source The power supply 33 can supply power to the data transmission module 32 through the controllable switch 36; and when the field effect transistor receives a low level (corresponding to the N-channel type) or a high level (corresponding to the P-channel type) Type) form signal, denoted as the first off signal, the first off signal can control the FET to turn off, the source and drain of the FET are turned off, and the power supply 33 will not transmit to the data transmission module 32. powered by.
在本申请的实施例中,数据传输装置3中设置有电源接口,该电源接口用于连接电源33,电源33通过电源接口可以为数据传输模组32提供电能。在一些实施例中,数据传输装置3中的电源33可以包括不可拆卸式的电池,电池通过数据传输装置3中的电源接口与数据传输模组32连接,从而电池可以为数据传输模组32提供电能。而在一些实施例中,数据传输装置3中的电源33可以包括可拆卸式的电池,当数据传输装置3装上电池时,电池通过数据传输装置3中的电源接口与数据传输模组32连接,从而电池可以为数据传输模组32提供电能。In the embodiment of the present application, the data transmission device 3 is provided with a power supply interface, the power supply interface is used to connect the power supply 33 , and the power supply 33 can provide power to the data transmission module 32 through the power supply interface. In some embodiments, the power supply 33 in the data transmission device 3 may include a non-removable battery, and the battery is connected to the data transmission module 32 through the power interface in the data transmission device 3 , so that the battery can provide the data transmission module 32 electrical energy. In some embodiments, the power supply 33 in the data transmission device 3 may include a detachable battery. When the data transmission device 3 is equipped with a battery, the battery is connected to the data transmission module 32 through the power interface in the data transmission device 3 , so that the battery can provide power for the data transmission module 32 .
则上述数据传输装置3在传输数据给显示设备4时,例如投屏到显示设备4时,微控制器34可根据振动传感器35的检测数据,对电源33是否向数据传输模组32提供电能进行控制,例如,图8为本申请一实施例提供的一种数据传输方法的流程示意图,可用于如图4所示的数据传输装置3执行,在数据传输装置3未连接电子设备1时,该方法包括:Then, when the above-mentioned data transmission device 3 transmits data to the display device 4, for example, when the screen is projected to the display device 4, the microcontroller 34 can determine whether the power supply 33 provides power to the data transmission module 32 according to the detection data of the vibration sensor 35. Control, for example, FIG. 8 is a schematic flowchart of a data transmission method provided by an embodiment of the present application, which can be used for execution by the data transmission device 3 shown in FIG. 4 . When the data transmission device 3 is not connected to the electronic device 1, the Methods include:
S101:微控制器34接收振动传感器35发送的检测数据,该检测数据携带振动传感器35自身的加速度值。S101: The microcontroller 34 receives detection data sent by the vibration sensor 35, where the detection data carries the acceleration value of the vibration sensor 35 itself.
具体地,微控制器34在对数据传输装置3进行控制时,首先需要获取振动传感器35检测数据传输装置3运动所得到的检测数据。所述检测数据中至少包括了振动传感器自身的加速度值。本实施例中,振动传感器35是加速度传感器,加速度传感器会实时检测数据传输装置3运动的运动状态,生成六个方向的加速度数据(例如某实施例中检测到的加速度数据为0mg,200mg,100mg,150mg,0mg,400mg)。微控制器34可以每间隔一段时间通过与振动传感器35之间的连接,获取振动传感器35实时检测的检测数据;或者,振动传感器35可以每间隔一段时间向微控制器34发送实时检测的检测数据。Specifically, when the microcontroller 34 controls the data transmission device 3 , it first needs to acquire the detection data obtained by the vibration sensor 35 to detect the movement of the data transmission device 3 . The detection data includes at least the acceleration value of the vibration sensor itself. In this embodiment, the vibration sensor 35 is an acceleration sensor, and the acceleration sensor will detect the motion state of the movement of the data transmission device 3 in real time, and generate acceleration data in six directions (for example, the acceleration data detected in a certain embodiment are 0 mg, 200 mg, and 100 mg). , 150mg, 0mg, 400mg). The microcontroller 34 can obtain the detection data detected by the vibration sensor 35 in real time through the connection with the vibration sensor 35 at regular intervals; or, the vibration sensor 35 can send the detection data detected in real time to the microcontroller 34 at regular intervals. .
S102:微控制器34确定振动传感器35自身的加速度值超过预设的加速度阈值时,微控制器34向可控开关36发送第一导通信号。S102 : When the microcontroller 34 determines that the acceleration value of the vibration sensor 35 itself exceeds a preset acceleration threshold, the microcontroller 34 sends a first conduction signal to the controllable switch 36 .
微控制器34可以通过预存加速度阈值的方式,对预设的加速度阈值进行存储。随后,微控制器34判断从振动传感器35所接收的振动传感器35自身的加速度值是否超过加速度阈值,若是,则说明数据传输装置3发生了移动,可能是由于用户将要通过连接线2连接电子设备1与数据传输装置3时,移动了数据传输装置3;若否,则说明数据传输装置3未发生移动处于静止状态。例如,假设微控制器34预存的加速度阈值为350mg(mg为加速度传感器单位,G-Sensor的分辨率),当微控制器34所获取的振动传感器35自身的加速度值的六个方向的加速度值为(0mg,200mg,100mg,150mg,0mg,400mg),其中有一个方向400mg的加速度值超过了加速度阈值350mg,则微控制器34向可控开关36发送第一导通信号。其中,当振动传感器35自身加速度值在任何一个方向超过了加速度阈值,都说明数据传输装置3在这个方向上发生了运动,因此,微控制器34只要判断至少一个方向的加速度值超过加速度阈值,都会向可控开关36发送第一导通信号。The microcontroller 34 may store the preset acceleration threshold by means of pre-storing the acceleration threshold. Subsequently, the microcontroller 34 determines whether the acceleration value of the vibration sensor 35 itself received from the vibration sensor 35 exceeds the acceleration threshold. If so, it means that the data transmission device 3 has moved, possibly because the user is about to connect the electronic device through the connecting line 2 1 and the data transmission device 3, the data transmission device 3 has been moved; if not, it means that the data transmission device 3 has not moved and is in a stationary state. For example, assuming that the pre-stored acceleration threshold value of the microcontroller 34 is 350 mg (mg is the unit of the acceleration sensor, the resolution of the G-Sensor), when the acceleration value of the vibration sensor 35 itself acquired by the microcontroller 34 is the acceleration value of the six directions is (0mg, 200mg, 100mg, 150mg, 0mg, 400mg), and the acceleration value of 400mg in one direction exceeds the acceleration threshold of 350mg, then the microcontroller 34 sends the first conduction signal to the controllable switch 36 . Among them, when the acceleration value of the vibration sensor 35 exceeds the acceleration threshold in any direction, it means that the data transmission device 3 has moved in this direction. Therefore, the microcontroller 34 only needs to determine that the acceleration value in at least one direction exceeds the acceleration threshold. Both send a first turn-on signal to the controllable switch 36 .
S103:可控开关36根据第一导通信号闭合,将电源33和数据传输模组32之间的供电连接导通。S103 : The controllable switch 36 is closed according to the first conduction signal to conduct the power supply connection between the power supply 33 and the data transmission module 32 .
其中,可控开关36根据第一导通信号闭合,将电源33和数据传输模组32之间的供电连接导通,电源33通过可控开关36向数据传输模组32供电。The controllable switch 36 is closed according to the first conduction signal to conduct the power supply connection between the power supply 33 and the data transmission module 32 , and the power supply 33 supplies power to the data transmission module 32 through the controllable switch 36 .
S104:数据传输模组32进行通信配置。S104: The data transmission module 32 performs communication configuration.
具体地,当电源和数据传输模组之间的供电连接导通之后,电源33向数据传输模组32供电,使得数据传输模组32上电后可以开始进行通信配置,该通信配置包括:通信接口31的通信配置;和/或数据传输模组32与显示设备4进行数据通信的通信配置。Specifically, after the power supply connection between the power supply and the data transmission module is turned on, the power supply 33 supplies power to the data transmission module 32, so that the data transmission module 32 can start to perform a communication configuration after being powered on, and the communication configuration includes: communication The communication configuration of the interface 31 ; and/or the communication configuration of the data transmission module 32 to perform data communication with the display device 4 .
为了避免微控制器34与振动传感器35之间频繁的发送和接收检测数据从而导致微控制器34与振动传感器35功耗偏高的问题,在另一种实现中,由振动传感器35判断检测数据的自身加速度值是否达到预设的加速度阈值,当振动传感器35判断自身加速度值达到预设的加速度阈值时,可以通过微控制器34和振动传感器35之间设置的INT连接向微控制器34发送中断信号,使得微控制器34根据是否接收到中断信号控制可控开关36的通断。In order to avoid the problem of high power consumption between the microcontroller 34 and the vibration sensor 35 due to the frequent sending and receiving of detection data between the microcontroller 34 and the vibration sensor 35, in another implementation, the vibration sensor 35 determines the detection data Whether the self-acceleration value reaches the preset acceleration threshold value, when the vibration sensor 35 judges that the self-acceleration value reaches the preset acceleration threshold value, it can be sent to the microcontroller 34 through the INT connection set between the microcontroller 34 and the vibration sensor 35 The interrupt signal enables the microcontroller 34 to control the on-off of the controllable switch 36 according to whether the interrupt signal is received.
具体地,图9为本申请一实施例提供的一种数据传输方法的流程示意图,可用于如图4所示的数据传输装置3执行,可以理解的是,如图4所示的数据传输装置3可以被配置为执行如图8或者如图9所示实施例中任一种数据传输方法;或者,数据传输装置3还可以被配置为可以执行如图8和如图9所示实施例的数据传输方法,并根据数据传输装置3的用户的指示或者设置,执行其中任一种数据传输方法,从而丰富了数据传输装置3的功能,让用户灵活地选择与设置,进而提高用户体验。Specifically, FIG. 9 is a schematic flowchart of a data transmission method provided by an embodiment of the application, which can be used for execution by the data transmission device 3 shown in FIG. 4 . It can be understood that the data transmission device shown in FIG. 4 3 can be configured to perform any one of the data transmission methods in the embodiments shown in FIG. 8 or FIG. 9; According to the instructions or settings of the user of the data transmission device 3, any one of the data transmission methods is executed, thereby enriching the functions of the data transmission device 3, allowing the user to flexibly select and set, thereby improving the user experience.
具体地,如图9所示的数据传输方法,在数据传输装置3未连接电子设备1时,该方法包括:Specifically, as shown in the data transmission method shown in FIG. 9, when the data transmission device 3 is not connected to the electronic device 1, the method includes:
S201:振动传感器35根据数据传输装置3的移动情况生成检测数据,其中,检测数据至少包括振动传感器35自身的加速度值。S201: The vibration sensor 35 generates detection data according to the movement of the data transmission device 3, wherein the detection data includes at least the acceleration value of the vibration sensor 35 itself.
S202:振动传感器35确定振动传感器35自身的加速度值超过加速度阈值时,向微控制器34发送中断信号。S202: When the vibration sensor 35 determines that the acceleration value of the vibration sensor 35 itself exceeds the acceleration threshold, it sends an interrupt signal to the microcontroller 34.
具体地,在本实施例中,振动传感器35会以预设的时间间隔不断生成携带自身加速度值的检测数据,并且在每次生成检测数据之后,都不会直接向微控制器34发送检测数据,而是将检测数据中的加速度值与预设的加速度阈值进行比较;其中,在一些实施例中,预设的加速度阈值可以通过微控制器34发送指令的方式预存在振动传感器35中,而在另一些实施例中,振动传感器35也可以通过振动传感器35外围硬件电路的硬件参数的方式预设振动传感器35的触发阈值作为所述预设的加速度阈值。当振动传感器35所生成的检测数据中的加速度值未超过预设的加速度阈值时,振动传感器35不进行其他操作,而是继续间隔一段时间继续生成检测数据;而当振动传感器35某一次所生成的检测数据中的加速度值超过预设的加速度阈值时,说明此时数据传输装置3发生了移动,振动传感器35就可以通过与微控制器34的INT连接向微控制器34发送中断信号。Specifically, in this embodiment, the vibration sensor 35 will continuously generate detection data carrying its own acceleration value at preset time intervals, and will not directly send the detection data to the microcontroller 34 after each generation of detection data. , but compare the acceleration value in the detected data with a preset acceleration threshold; wherein, in some embodiments, the preset acceleration threshold may be pre-stored in the vibration sensor 35 by sending an instruction from the microcontroller 34, and In other embodiments, the vibration sensor 35 may also preset the trigger threshold of the vibration sensor 35 as the preset acceleration threshold by means of hardware parameters of the peripheral hardware circuit of the vibration sensor 35 . When the acceleration value in the detection data generated by the vibration sensor 35 does not exceed the preset acceleration threshold, the vibration sensor 35 does not perform other operations, but continues to generate detection data at intervals; When the acceleration value in the detected data exceeds the preset acceleration threshold, it means that the data transmission device 3 has moved, and the vibration sensor 35 can send an interrupt signal to the microcontroller 34 through the INT connection with the microcontroller 34 .
S203:微控制器34接收到中断信号后,微控制器34向可控开关36发送第一导通信号。S203 : After the microcontroller 34 receives the interrupt signal, the microcontroller 34 sends a first turn-on signal to the controllable switch 36 .
对于微控制器34,当接收到S202振动传感器35通过INT连接发送的中断信号后,向可控开关发送第一导通信号。For the microcontroller 34, after receiving the interrupt signal sent by the vibration sensor 35 through the INT connection in S202, it sends a first turn-on signal to the controllable switch.
S204:可控开关36根据第一导通信号闭合,将电源33和数据传输模组32之间的供电连接导通。S204: The controllable switch 36 is closed according to the first conduction signal, and the power supply connection between the power supply 33 and the data transmission module 32 is turned on.
最终,可控开关36根据第一导通信号闭合,将电源33和数据传输模组32之间的供电连接导通,电源33通过可控开关36向数据传输模组32供电。Finally, the controllable switch 36 is closed according to the first conduction signal, and the power supply connection between the power supply 33 and the data transmission module 32 is turned on, and the power supply 33 supplies power to the data transmission module 32 through the controllable switch 36 .
S205:数据传输模组32进行通信配置。S205: The data transmission module 32 performs communication configuration.
具体地,当电源和数据传输模组之间的供电连接导通之后,电源33向数据传输模组32供电,使得数据传输模组32上电后可以开始进行通信配置,该通信配置包括:通信接口31的通信配置;和/或数据传输模组32与显示设备4进行数据通信的通信配置。Specifically, after the power supply connection between the power supply and the data transmission module is turned on, the power supply 33 supplies power to the data transmission module 32, so that the data transmission module 32 can start to perform a communication configuration after being powered on, and the communication configuration includes: communication The communication configuration of the interface 31 ; and/or the communication configuration of the data transmission module 32 to perform data communication with the display device 4 .
综上,本申请实施例提供的数据传输装置,在数据传输装置中设置用于检测数据传输装置是否移动的振动传感器,以及能够根据振动传感器的检测数据控制电源和数据传输模组之间的可控开关导通从而电源可以向数据传输模组供电的微控制器,只有当微控制器根据振动传感器检测到数据传输装置移动后,才控制电源和数据传输模组之间的可控开关导通,从而电源向数据传输模组供电。因此,本实施例中的数据传输装置在未被使用时,电源可以不向数据传输模组供电;而在用户在使用本实施例中的数据传输装置时,一旦检测到用户移动数据传输装置(记为时刻T0),也就意味着用户可能即将通过连接线将电子设备与数据传输装置连接,在时刻T0微控制器控制电源向数据传输模组供电,使得数据传输模组在数据传输装置与电子设备连接之前就开始启动并进行通信配置,假设数据传输模组在时刻T1完成通信配置等配置操作,对于使用数据传输装置的用户来说,若用户在时刻T1之后的时刻T2将电子设备与数据传输装置通过连接线连接,则数据传输装置中的数据传输模组由于已经完成通信配置等配置操作,即可在时刻T2之后开始从通信接口接收电子设备所发送的显示界面的数据并投射到显示设备上;若用户在时刻T0-T1之间的时刻T3,将电子设备与数据传输装置通过连接线连接,此时从用户拿起数据传输装置到插入电子设备这个过程时间较短,但是也只需要等待时刻T3-时刻T1之间的时间,在时刻T1当数据传输模组完成通信配置等配置操作之后,数据传输模组即可将从通信接口接收到电子设备所发送的显示界面的数据并投射到显示设备上。To sum up, in the data transmission device provided by the embodiments of the present application, a vibration sensor for detecting whether the data transmission device is moving is set in the data transmission device, and the switch between the power supply and the data transmission module can be controlled according to the detection data of the vibration sensor. A microcontroller that controls the switch to be turned on so that the power supply can supply power to the data transmission module. Only when the microcontroller detects the movement of the data transmission device according to the vibration sensor, will the controllable switch between the power supply and the data transmission module be turned on. , so that the power supply supplies power to the data transmission module. Therefore, when the data transmission device in this embodiment is not in use, the power supply may not supply power to the data transmission module; and when the user uses the data transmission device in this embodiment, once it is detected that the user moves the data transmission device ( Denoted as time T0), which means that the user may be about to connect the electronic equipment with the data transmission device through the connecting line, and at time T0 the microcontroller controls the power supply to supply power to the data transmission module, so that the data transmission module is connected between the data transmission device and the data transmission module. Before the electronic device is connected, it starts to start and performs communication configuration. Assuming that the data transmission module completes configuration operations such as communication configuration at time T1, for users using the data transmission device, if the user connects the electronic device to the electronic device at time T2 after time T1 The data transmission device is connected by a connecting line, and since the data transmission module in the data transmission device has completed the configuration operations such as communication configuration, it can start to receive the data of the display interface sent by the electronic device from the communication interface after time T2 and project it to the display interface. On the display device; if the user connects the electronic device and the data transmission device through a connecting line at time T3 between time T0-T1, the process from the user picking up the data transmission device to inserting the electronic device is shorter, but also It is only necessary to wait for the time between time T3 and time T1. After the data transmission module completes configuration operations such as communication configuration at time T1, the data transmission module can receive the display interface data sent by the electronic device from the communication interface. and cast to the display device.
本实施例提供的数据传输装置,与如图2所示数据传输装置相比,由于在数据传输装置连接电子设备之前数据传输模组就开始启动,减少了用户使用数据传输装置时的等待的时间,理想情况下甚至可以不需要等待时间,因此提高了数据传输装置响应速度和工作效率;与图3所示的数据传输装置相比,由于电源不用一直向数据传输模组供电,而只需要在移动检测模块实际检测到用户可能移动了数据传输装置,再控制电源向数据传输模组供电,从而减少了电源所需要向数据传输模组提供电能的需求,能够减小数据传输装置中所设置的电源的容量和体积。综上,本申请提供的数据传输装置,能够兼顾空间和效率,在数据传输装置中电源不需要过大容量和体积的情况下,还能够提高数据传输装置在数据传输时的响应速度和工作效率。此外,本实施例提供的数据传输装置中,在电源和数据传输模组之间设置可控开关,通过开关的开启和关闭即可控制电源是否向数据传输模组供电,从而能够通过较为简单的电路结构,实现微控制器对电源的控制。Compared with the data transmission device shown in FIG. 2 , the data transmission device provided in this embodiment, because the data transmission module starts to start before the data transmission device is connected to the electronic device, reduces the waiting time of the user when using the data transmission device , ideally, no waiting time is required, so the response speed and work efficiency of the data transmission device are improved; compared with the data transmission device shown in The movement detection module actually detects that the user may have moved the data transmission device, and then controls the power supply to supply power to the data transmission module, thereby reducing the need for the power supply to provide power to the data transmission module, and can reduce the amount of power set in the data transmission device. The capacity and volume of the power supply. To sum up, the data transmission device provided by the present application can take into account both space and efficiency, and can also improve the response speed and work efficiency of the data transmission device during data transmission when the power supply in the data transmission device does not require excessive capacity and volume. . In addition, in the data transmission device provided in this embodiment, a controllable switch is set between the power supply and the data transmission module, and whether the power supply supplies power to the data transmission module can be controlled by turning on and off the switch, so that a relatively simple The circuit structure realizes the control of the power supply by the microcontroller.
可选地,在上述如图4所示的数据传输装置3中,以电源33直接向数据传输模组32和微控制器34供电作为示例,同样地,当数据传输装置3通过通信接口31连接电子设备1后,电子设备1所提供的电能同样通过通信接口31直接向数据传输模组32和微控制器34供电。所述电源33可以是数据传输装置3中设置的可进行充放电的电池,则此时需要对电池的充电和放电的时机进行控制,因此,在电源33的一种可能的具体实现方式中,图10为本申请一实施例提供的数据传输装置的应用场景框架示意图,如图10所示的数据传输装置在如图4所示实施例的基础上,电源33具体可以包括电源管理模块331和电池332,其中,电池332用于存储电能,本实施例数据传输装置中所设置的电池332可以是锂电池,例如可以选择功耗在1mA以下,50-100mAH之间的容量;电源管理模块331连接通信接口31和电池332,由电源管理模块331根据通信接口31所获取的来自于电子设备1的电能,对电池332进行电能的充放电管理。电池332通过电源管理模块331为微控制器34和数据传输模组32供电。Optionally, in the above data transmission device 3 shown in FIG. 4 , the power supply 33 directly supplies power to the data transmission module 32 and the microcontroller 34 as an example. Similarly, when the data transmission device 3 is connected through the communication interface 31 After the electronic device 1 is installed, the electrical energy provided by the electronic device 1 also directly supplies power to the data transmission module 32 and the microcontroller 34 through the communication interface 31 . The power source 33 may be a battery that can be charged and discharged in the data transmission device 3, and then the timing of charging and discharging the battery needs to be controlled. Therefore, in a possible specific implementation of the power source 33, FIG. 10 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application. In the data transmission device shown in FIG. 10 , based on the embodiment shown in FIG. 4 , the power supply 33 may specifically include a power management module 331 and The battery 332, wherein the battery 332 is used to store electrical energy, the battery 332 set in the data transmission device in this embodiment can be a lithium battery, for example, the power consumption can be selected below 1mA, and the capacity is between 50-100mAH; the power management module 331 The communication interface 31 and the battery 332 are connected, and the power management module 331 performs electric energy charge and discharge management on the battery 332 according to the electric energy from the electronic device 1 obtained by the communication interface 31 . The battery 332 supplies power to the microcontroller 34 and the data transmission module 32 through the power management module 331 .
具体地,电源管理模块331可以包括用于进行对电池332进行充放电管理的IC(Integrated Circuit,集成电路)芯片。当数据传输装置3通过连接线2与电子设备1连接,则电子设备1通过连接线2向通信接口31传输电能,电源管理模块331即可将通信接口31接收到的电能传输给电池332为电池332充电。当数据传输装置2没有与电子设备1连接时,电源管理模块331可以控制电池332输出电能,使得电池332输出的电能传输给微控制器34供电,并通过图10中的路径③传输给数据传输模组32供电。Specifically, the power management module 331 may include an IC (Integrated Circuit, integrated circuit) chip for performing charge and discharge management of the battery 332 . When the data transmission device 3 is connected to the electronic device 1 through the connecting line 2, the electronic device 1 transmits power to the communication interface 31 through the connecting line 2, and the power management module 331 can transmit the power received by the communication interface 31 to the battery 332 as a battery 332 charge. When the data transmission device 2 is not connected to the electronic device 1, the power management module 331 can control the battery 332 to output power, so that the power output by the battery 332 is transmitted to the microcontroller 34 to supply power, and is transmitted to the data transmission through the path ③ in FIG. 10 Module 32 is powered.
进一步地,图11为本申请一实施例提供的数据传输装置的应用场景框架示意图,如图11所示的数据传输装置在如图10所示实施例的基础上,电源33中所设置的电源管理模块331具体可以包括充电管理IC芯片3311和电源芯片3312,所述电源芯片3312可以是DC-DC转换器(直流变直流转换器)或者LDO(low dropout regulator,低压差线性稳压器),用于将电源322提供的电压(一般为3.5V-4.2V)转化为合适的电压(例如3.3V)给微控制器34供电。则充电管理模块具体用于管理电池332在充电时,通过通信接口31接收到电子设备1传输的电能向电池332充电,其中,当电池332为锂电池时,能够 将直流电转化为恒流输出电源为电池332充电,在放电时,通过路径③向数据传输模组32供电,以及通过电源芯片3312向微控制器34供电。Further, FIG. 11 is a schematic diagram of an application scenario framework of the data transmission device provided by an embodiment of the application. The data transmission device shown in FIG. 11 is based on the embodiment shown in FIG. The management module 331 may specifically include a charge management IC chip 3311 and a power supply chip 3312, and the power supply chip 3312 may be a DC-DC converter (DC to DC converter) or an LDO (low dropout regulator, low dropout linear regulator), It is used to convert the voltage provided by the power supply 322 (typically 3.5V-4.2V) into a suitable voltage (eg, 3.3V) to power the microcontroller 34 . The charging management module is specifically used to manage the battery 332 when it is being charged, and the electrical energy transmitted by the electronic device 1 is received through the communication interface 31 to charge the battery 332. When the battery 332 is a lithium battery, it can convert the direct current into a constant current output power supply. The battery 332 is charged, and when discharged, power is supplied to the data transmission module 32 through the path ③, and power is supplied to the microcontroller 34 through the power chip 3312 .
示例性地,图12为本申请一些实施例提供的充电管理IC芯片和周边电路示意图,其中,充电管理IC芯片可以选型为型号“SY6952B”的电源管理芯片,其中,充电管理IC芯片的“IN”管脚连接通信接口31,可以通过通信接口31接收到电子设备1传输的电能VBUS,充电管理IC芯片的“LX”管脚连接电池B1,充电管理IC芯片可用于控制从“IN”管脚接收的电能VBUS为电池1充电。图13为本申请一些实施例提供的电源芯片和周边电路示意图,其中,电源芯片可以选型为型号“LC1458CB5TR33”的电源芯片,其中,电源芯片的VIN管脚连接电池提供的电能VBAT,VOUT管脚连接微控制器34的供电管脚,电源芯片可用于将VBAT转换为适合微控制器工作的电压例如(3.3V)提供给微控制器34。需要说明的是,如图12和图13仅示出了一种本申请实施例中充电管理IC芯片和电源芯片可能的选型,本申请对充电管理IC芯片和电源芯片的具体实现不做限定。Exemplarily, FIG. 12 is a schematic diagram of a charge management IC chip and peripheral circuits provided by some embodiments of the application, wherein the charge management IC chip can be selected as a power management chip of the model "SY6952B", wherein the " The IN" pin is connected to the communication interface 31, and the power VBUS transmitted by the electronic device 1 can be received through the communication interface 31. The "LX" pin of the charge management IC chip is connected to the battery B1, and the charge management IC chip can be used to control the slave "IN" tube. The power VBUS received by the pin charges the battery 1. 13 is a schematic diagram of a power supply chip and peripheral circuits provided by some embodiments of the application, wherein the power supply chip can be selected as a power supply chip of the model "LC1458CB5TR33", wherein the VIN pin of the power supply chip is connected to the power VBAT provided by the battery, and the VOUT tube The pin is connected to the power supply pin of the microcontroller 34 , and the power supply chip can be used to convert VBAT into a voltage suitable for the operation of the microcontroller, such as (3.3V), and provide it to the microcontroller 34 . It should be noted that, FIG. 12 and FIG. 13 only show a possible selection of the charging management IC chip and the power supply chip in the embodiment of the present application, and the specific implementation of the charging management IC chip and the power supply chip is not limited in the present application. .
综上,本实施例提供的数据传输装置,在前述实施例中数据传输装置的基础上,进一步细化了电源的结构,由电源中设置的管理模块对电池的充电和放电进行控制,当数据传输装置连接电子设备后,电子设备向数据传输装置提供的电能并可以向电池进行充电,使得后续数据传输装置断开与电子设备的连接后,可以使用电池向数据传输装置中的微控制器以及数据传输模组等进行供电,从而增加了数据传输装置中电源的续航能力,并且由于可以对电池进行充电,也可以进一步降低对电池容量的要求。To sum up, the data transmission device provided in this embodiment, on the basis of the data transmission device in the previous embodiment, further refines the structure of the power supply, and the management module provided in the power supply controls the charging and discharging of the battery. After the transmission device is connected to the electronic device, the electrical energy provided by the electronic device to the data transmission device can be charged to the battery, so that after the subsequent data transmission device is disconnected from the electronic device, the battery can be used to charge the microcontroller and the micro-controller in the data transmission device. The data transmission module and the like are used to supply power, thereby increasing the battery life of the power supply in the data transmission device, and since the battery can be charged, the requirements for the battery capacity can be further reduced.
在一些实施例中,请参阅图11,当数据传输装置3插入外部电子设备1时,由电子设备1的接口电源引脚向数据传输装置3提供电源,由于电子设备1的电源通常会比数据传输装置3的电池332拥有更高的电压,因此电子设备1的电源可以经过“通信接口31-可控开关36-电池332”的路径直接给电池332充电。由于该充电的充电电流和/或充电电压没有经过电源管理模块331的处理(该处理见上述,例如包括将电子设备的输出电压和/或输出电流转化为合适的输出电压和/或输出电流),充电电流和/或充电电压过高或过低,使得电池332可能会被损坏。因此,为了避免电子设备1的电源直接对数据传输装置3的电池332进行充电,可以设置外部电源检测模块,该外部电源检测模块可以检测数据传输装置3是否由电子设备1提供工作电源,若是,则外部电源检测模块向可控开关36发送用于指示可控开关36断开的电平信号。由于可控开关36断开,电子设备1的电源不能经过“通信接口31-可控开关36-电池332”的路径直接给电池332充电。In some embodiments, please refer to FIG. 11 , when the data transmission device 3 is inserted into the external electronic device 1, the power supply pin of the interface of the electronic device 1 provides power to the data transmission device 3. The battery 332 of the transmission device 3 has a higher voltage, so the power supply of the electronic device 1 can directly charge the battery 332 through the path of “communication interface 31-controllable switch 36-battery 332”. Because the charging current and/or charging voltage is not processed by the power management module 331 (see the above for the processing, for example, including converting the output voltage and/or output current of the electronic device into a suitable output voltage and/or output current) , the charging current and/or charging voltage is too high or too low, so that the battery 332 may be damaged. Therefore, in order to prevent the power supply of the electronic device 1 from directly charging the battery 332 of the data transmission device 3, an external power supply detection module can be provided, and the external power supply detection module can detect whether the data transmission device 3 is provided with working power by the electronic device 1, and if so, Then, the external power detection module sends a level signal to the controllable switch 36 to indicate that the controllable switch 36 is disconnected. Since the controllable switch 36 is turned off, the power supply of the electronic device 1 cannot directly charge the battery 332 through the path of "communication interface 31 - controllable switch 36 - battery 332 ".
因此,在上述如图4-图13所示实施例的基础上,在一些实施例中,数据传输装置3还包括外部电源检测模块,该外部电源检测模块用于检测数据传输装置3中的通信接口21是否有外部电源接入,其中,数据传输装置3中的通信接口21有外部电源接入,可以是如图4所示的场景中数据传输装置3由电子设备1通过连接线2提供工作电源;数据传输装置3中的通信接口21没有外部电源接入,可以是如图4所示的场景中数据传输装置3没有通过连接线2连接电子设备1。Therefore, on the basis of the above embodiments shown in FIGS. 4-13 , in some embodiments, the data transmission device 3 further includes an external power detection module, and the external power detection module is used to detect the communication in the data transmission device 3 Whether the interface 21 is connected to an external power supply, wherein, the communication interface 21 in the data transmission device 3 is connected to an external power supply, which may be the data transmission device 3 in the scenario shown in FIG. Power supply; the communication interface 21 in the data transmission device 3 is not connected to an external power supply, which may be that the data transmission device 3 is not connected to the electronic device 1 through the connecting line 2 in the scenario shown in FIG.
具体地,图14为本申请一实施例提供的数据传输装置的应用场景框架示意图,如图10所示的数据传输装置3在图4所示实施例的基础上,还包括:外部电源检测模块37,所述外部电源检测模块37分别与通信接口31和可控开关36连接,用于检测通信接口31是否有外部电源接入,并且在检测到通信接口31没有外部电源接入时,向可控开关36发送第二导通信号,所述第二导通信号用于指示可控开关36闭合。其中,当数据传输装置3通过连接线2连接电子设备1后,电子设备1可以通过连接线2将电能传输至数据传输装置3的通信接口31,此时数据传输装置3接收到的电子设备1提供的电能,因此电子设备1可称为外部电源,对应的,数据传输装置3中设置的电源33可称为内部电源。Specifically, FIG. 14 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the application. The data transmission device 3 shown in FIG. 10 further includes an external power detection module on the basis of the embodiment shown in FIG. 4 . 37. The external power supply detection module 37 is respectively connected with the communication interface 31 and the controllable switch 36, and is used to detect whether the communication interface 31 has external power supply access, and when it is detected that the communication interface 31 has no external power supply access, to the available power supply. The controllable switch 36 sends a second conduction signal, and the second conduction signal is used to instruct the controllable switch 36 to close. Wherein, after the data transmission device 3 is connected to the electronic device 1 through the connection line 2, the electronic device 1 can transmit power to the communication interface 31 of the data transmission device 3 through the connection line 2. At this time, the electronic device 1 received by the data transmission device 3 Therefore, the electronic device 1 can be referred to as an external power source, and correspondingly, the power source 33 provided in the data transmission device 3 can be referred to as an internal power source.
由于微控制器34在检测到数据传输装置3移动时,会向可控开关36发送第一导通信号,指示可控开关36闭合,外部电源检测模块37在检测到通信接口31没有外部电源接入时,也会向可控开关36发送第二导通信号,指示可控开关36闭合。因此,数据传输装置3中的可控开关36可以设置相关的控制电路,使得微控制器34提供的第一导通信号和外部电源检测模块37的第二导通信号可共同用于控制可控开关36。When the microcontroller 34 detects the movement of the data transmission device 3, it will send the first conduction signal to the controllable switch 36, indicating that the controllable switch 36 is closed, and the external power detection module 37 detects that the communication interface 31 has no external power connection. At the time of entry, a second conduction signal is also sent to the controllable switch 36 to instruct the controllable switch 36 to be closed. Therefore, the controllable switch 36 in the data transmission device 3 can be provided with a related control circuit, so that the first conduction signal provided by the microcontroller 34 and the second conduction signal of the external power detection module 37 can be jointly used to control the controllable switch 36 switch 36.
具体地,当微控制器34根据振动传感器35的检测数据确定数据传输装置3当前被用户移动,可能后续用户将要连接电子设备,则微控制器34向可控开关36提供第一导通信号。但是若通信接口31已通过连接线2连接电子设备1,此时可控开关36再根据第一导通信号导通是没有意义。因此外部电源检测模块37确定当前通信接口31没有接入外部电源的情况下,可以向可控开关36发送第二导通信号,使得可控开关36在同时接收到第一导通信号和第二导通信号才能够闭合。并且,在内部电源33和数据传输模组32之间建立供电连接之后,后续如外部电源检测模块37检测到外部电源与通信接口31连接(即数据传输装置3与电子设备1连接),则不会向可控开关发送第二导通信号(在一种实现 中,当第二导通信号为高电平时,低电平即可被视为不发送第二导通信号;或者,当第二导通信号为低电平时,高电平即可被视为不发送第二导通信号,或者记为第二断开信号),此时无论可控开关36是否接收到微控制器34发送的第一导通信号,可控开关36都会在没有接收到第二导通信号的情况下断开,从而内部电源和数据传输模组32之间的供电连接断开。Specifically, when the microcontroller 34 determines according to the detection data of the vibration sensor 35 that the data transmission device 3 is currently being moved by the user, and the user may connect an electronic device later, the microcontroller 34 provides the controllable switch 36 with a first conduction signal. However, if the communication interface 31 is already connected to the electronic device 1 through the connection line 2, it is meaningless to conduct the controllable switch 36 according to the first conduction signal. Therefore, when the external power supply detection module 37 determines that the current communication interface 31 is not connected to the external power supply, it can send the second conduction signal to the controllable switch 36, so that the controllable switch 36 receives the first conduction signal and the second conduction signal at the same time. The ON signal can only be closed. In addition, after the power supply connection is established between the internal power supply 33 and the data transmission module 32, if the external power supply detection module 37 detects that the external power supply is connected to the communication interface 31 (that is, the data transmission device 3 is connected to the electronic device 1), it is not The second conduction signal will be sent to the controllable switch (in one implementation, when the second conduction signal is high, the low level can be regarded as not sending the second conduction signal; or, when the second conduction signal is When the turn-on signal is low, the high level can be regarded as not sending the second turn-on signal, or recorded as the second turn-off signal), at this time, no matter whether the controllable switch 36 receives the signal sent by the microcontroller 34 or not. For the first turn-on signal, the controllable switch 36 will be disconnected without receiving the second turn-on signal, so that the power supply connection between the internal power supply and the data transmission module 32 is disconnected.
更为具体地,为了实现上述数据传输装置的控制方法,使得可控开关36能够根据第一导通信号和第二导通信号共同确定是否闭合,本申请还提供一种如图4所示的数据传输装置3中可控开关36以及相关的控制电路的具体结构设计,图15为本申请一些实施例提供的可控开关和与门电路的相关电路结构示意图,如图15所示,可控开关36的导通和关断可以由图中的场效应晶体管Q4的导通和关断来实现,场效应晶体管Q4的源极S连接内部电源的引脚VBAT,漏极D连接数据传输模组32的供电端VIN_805_7911。在图15所示的示例中,场效应晶体管Q4的类型可选型为p沟道增强型场效应晶体管,则栅极G作为Q4的控制端时,当接收到低电平信号,场效应晶体管Q4闭合,源极S和漏极D之间导通;当接收到高电平信号,场效应晶体管Q4断开,源极S和漏极D之间关断。More specifically, in order to realize the above-mentioned control method of the data transmission device, so that the controllable switch 36 can jointly determine whether to close according to the first conduction signal and the second conduction signal, the present application also provides a method as shown in FIG. 4 . The specific structural design of the controllable switch 36 and the related control circuit in the data transmission device 3, FIG. 15 is a schematic diagram of the related circuit structure of the controllable switch and the AND gate circuit provided by some embodiments of the application, as shown in FIG. The turn-on and turn-off of the switch 36 can be realized by the turn-on and turn-off of the field effect transistor Q4 in the figure. The source S of the field effect transistor Q4 is connected to the pin VBAT of the internal power supply, and the drain D is connected to the data transmission module. 32's power supply terminal VIN_805_7911. In the example shown in FIG. 15 , the optional type of the field effect transistor Q4 is a p-channel enhancement type field effect transistor, then when the gate G is used as the control terminal of Q4, when a low level signal is received, the field effect transistor Q4 is closed, and the source S and the drain D are turned on; when receiving a high level signal, the field effect transistor Q4 is turned off, and the source S and the drain D are turned off.
在如图15所示的电路中,在场效应晶体管Q4之前还设置有逻辑门电路,用于结合微控制器34提供的第一导通信号以及外部电源检测模块37提供的第二导通信号,两个导通信号共同确定向场效应晶体管Q4所发送的高电平信号或者低电平信号。在一种具体的实现方式中,以逻辑门电路为与门电路作为示例。In the circuit shown in FIG. 15 , a logic gate circuit is also provided before the field effect transistor Q4 for combining the first turn-on signal provided by the microcontroller 34 and the second turn-on signal provided by the external power detection module 37, The two turn-on signals together determine the high-level signal or the low-level signal sent to the field effect transistor Q4. In a specific implementation manner, the logic gate circuit is an AND gate circuit as an example.
第一方面,对于与门电路D36的第一输入端可用于接收“MCU_CL”信号,其中,将微控制器通过STM32_1108_IO管脚输出的低电平信号记为第一导通信号,这个低电平信号可以用于指示场效应管Q4闭合,则在如图15所示的电路中,STM32_1108_IO管脚输出的低电平信号可以使得三极管QM2(记为第二三极管)断开从而得到高电平的“MCU_CL”信号(即微控制器34输出的低电平信号进行反向处理),高电平的“MCU_CL”信号输入与门电路D36。可以理解的是,如微控制器通过STM32_1108_IO管脚输出的高电平信号可以记为第一断开信号,这个高电平信号可以用于指示场效应晶体管Q4断开,则在如图15所示的电路中,STM32_1108_IO管脚输出的高电平信号经过三极管QM2反向处理后输入与门电路D36的是低电平的“MCU_CL”信号,此时,低电平的“MCU_CL”信号输入与门电路D36。In the first aspect, the first input terminal of the AND gate circuit D36 can be used to receive the "MCU_CL" signal, wherein the low-level signal output by the microcontroller through the STM32_1108_IO pin is denoted as the first turn-on signal, this low-level signal The signal can be used to indicate that the field effect transistor Q4 is closed, then in the circuit shown in Figure 15, the low level signal output by the STM32_1108_IO pin can make the transistor QM2 (marked as the second transistor) disconnected to obtain a high voltage The flat "MCU_CL" signal (ie, the low-level signal output by the microcontroller 34 is processed in reverse), and the high-level "MCU_CL" signal is input to the AND gate circuit D36. It can be understood that, if the high-level signal output by the microcontroller through the STM32_1108_IO pin can be recorded as the first disconnection signal, this high-level signal can be used to indicate that the field effect transistor Q4 is disconnected, as shown in Figure 15. In the circuit shown, the high-level signal output by the STM32_1108_IO pin is reversely processed by the transistor QM2 and input to the AND gate circuit D36 is the low-level "MCU_CL" signal. At this time, the low-level "MCU_CL" signal input and Gate circuit D36.
第二方面,对于与门电路D36的第二输入端可用于接收“VBS_CL”信号,其中,图16为本申请一些实施例提供的外部电源检测模块的部分电路结构示意图,其中,外部电源检测模块37可以包括三极管QM1(记为第一三极管),三极管QM1的基极可以连接数据传输装置3的通信接口,用于对通信接口是否接入外部电源VBUS进行检测,发射极接地,集电极连接内部电源(VBAT)并可用于输出“VBS_CL”信号。则当通信接口没有接入外部电源,VBUS为低电平时,三极管QM1断开,输出的“VBS_CL”信号为高电平信号(VBAT),可以记为第二导通信号,这个高电平信号可以用户指示场效应管Q4闭合;而当通信接口接入外部电源,VBUS为高电平时,三极管QM1导通,输出的“VBS_CL”信号为低电平信号(接地),可以记为第二断开信号,这个低电平信号可以用户指示场效应管Q4断开。In the second aspect, the second input terminal of the AND gate circuit D36 can be used to receive the “VBS_CL” signal, wherein FIG. 16 is a schematic diagram of a partial circuit structure of an external power supply detection module provided by some embodiments of the application, wherein the external power supply detection module 37 may include a triode QM1 (denoted as the first triode), the base of the triode QM1 can be connected to the communication interface of the data transmission device 3, and is used to detect whether the communication interface is connected to the external power supply VBUS, the emitter is grounded, and the collector is grounded. The internal power supply (VBAT) is connected and can be used to output the "VBS_CL" signal. Then when the communication interface is not connected to the external power supply and VBUS is at a low level, the transistor QM1 is disconnected, and the output "VBS_CL" signal is a high-level signal (VBAT), which can be recorded as the second conduction signal. This high-level signal The user can instruct the FET Q4 to close; and when the communication interface is connected to an external power supply and VBUS is at a high level, the transistor QM1 is turned on, and the output "VBS_CL" signal is a low level signal (ground), which can be recorded as the second off On signal, this low level signal can be used to instruct the FET Q4 to be disconnected.
最终,与门电路D36即可根据上述第一方面微控制器发送的“MCU_CL”信号和上述第二方面外部电源检测模块37发送的“VBS_CL”信号共同确定与门电路D36的输出端向场效应晶体管Q4所发出的信号具体是低电平信号或是高电平信号,来控制场效应晶体管Q4的闭合与断开。“MCU_CL”信号和“VBS_CL”信号的逻辑对应关系如下表1所示。Finally, the AND gate circuit D36 can jointly determine the output of the AND gate circuit D36 to the field effect according to the "MCU_CL" signal sent by the microcontroller in the first aspect and the "VBS_CL" signal sent by the external power supply detection module 37 in the second aspect. The signal sent by the transistor Q4 is specifically a low-level signal or a high-level signal to control the closing and opening of the field effect transistor Q4. The logical correspondence between the "MCU_CL" signal and the "VBS_CL" signal is shown in Table 1 below.
表1Table 1
情况condition VBS_CL电平VBS_CL level MCU_CL电平MCU_CL level 与门输出电平AND gate output level Q4状态Q4 status
11 高(无外部电源接入)High (no external power access) 低(指示断开)low (indicates disconnection) Low 断开disconnect
22 高(无外部电源接入)High (no external power access) 高(指示闭合)High (indicates closed) high 闭合closure
33 低(有外部电源接入)Low (with external power supply) 低(指示断开)low (indicates disconnection) Low 断开disconnect
44 低(有外部电源接入)Low (with external power supply) 高(指示闭合)High (indicates closed) Low 断开disconnect
具体地,在表1所示的情况1中,当数据传输装置3没有连接电子设备1,通信接口21没有外部电源接入时,外部电源检测模块37向与门电路D36输出第二导通信号,即如图15所示的电路中外部电源检测模块37向与门电路D36第二输入端输出的“VBS_CL”信号为高电平信号,此时,微控制器34在未检测到数据传输装置3被移动时,输出高电平的第一断开信号,高电平的第一断开信号经过如图15所示的电路中三极管QM2的反向处理后,最终向与门电路D36的第一输入端输出的“MCU_CL”信号为低电平信号,图15中与门电路D36下面的二极管导通,使得与门电路D36输出低电平信号,从而三极管QM3(记为第三三极管)断开,最终输入场效应晶体管Q4栅极G的信号为高电平信号(内部电源VBAT通过电阻RM7和RM9输出的高电平信号),场效应晶体管Q4断开,源极S和漏极D之间关断,内 部电源不会通过场效应晶体管Q4向数据传输模组32供电。Specifically, in Case 1 shown in Table 1, when the data transmission device 3 is not connected to the electronic device 1 and the communication interface 21 is not connected to an external power source, the external power source detection module 37 outputs a second conduction signal to the AND gate circuit D36 , that is, in the circuit shown in FIG. 15 , the “VBS_CL” signal output by the external power detection module 37 to the second input terminal of the AND gate circuit D36 is a high-level signal. At this time, the microcontroller 34 does not detect the data transmission device. When 3 is moved, the first disconnection signal of high level is output, and the first disconnection signal of high level is processed in the reverse direction of transistor QM2 in the circuit shown in Fig. The "MCU_CL" signal output by an input terminal is a low-level signal. In Figure 15, the diode under the AND gate circuit D36 is turned on, so that the AND gate circuit D36 outputs a low-level signal, so that the transistor QM3 (denoted as the third transistor ) is disconnected, the final input signal to the gate G of the field effect transistor Q4 is a high level signal (the high level signal output by the internal power supply VBAT through the resistors RM7 and RM9), the field effect transistor Q4 is disconnected, the source S and drain When it is turned off between D, the internal power supply will not supply power to the data transmission module 32 through the field effect transistor Q4.
在表1所示的情况2中,同样是没有外部电源接入,外部电源检测模块37向与门电路D36第二输入端“VBS_CL”信号为高电平信号,此时,当微控制器34通过振动传感器35检测到数据传输装置3发生了移动,向与门电路D36输出低电平的第一导通信号,低电平的第一导通信号经过如图15所示的电路中三极管QM2的反向处理后,最终向与门电路D36的第一输入端输出的“MCU_CL”信号为高电平信号,图15中与门电路D36的两个二极管均截止,内部电源VBAT使得三极管QM3导通,最终输入场效应晶体管Q4栅极G的信号为低电平信号(接地),场效应晶体管Q4闭合,源极S和漏极D之间导通,内部电源通过场效应晶体管Q4向数据传输模组32供电。In case 2 shown in Table 1, there is also no external power supply, and the external power detection module 37 sends a high-level signal to the second input terminal of the AND gate circuit D36 "VBS_CL" signal. At this time, when the microcontroller 34 The vibration sensor 35 detects that the data transmission device 3 has moved, and outputs a low-level first conduction signal to the AND gate circuit D36, and the low-level first conduction signal passes through the transistor QM2 in the circuit shown in FIG. 15 . After the reverse processing, the "MCU_CL" signal finally output to the first input terminal of the AND gate circuit D36 is a high-level signal. In Figure 15, the two diodes of the AND gate circuit D36 are both turned off, and the internal power supply VBAT makes the transistor QM3 conduct. The final input signal to the gate G of the field effect transistor Q4 is a low level signal (ground), the field effect transistor Q4 is closed, the source S and the drain D are turned on, and the internal power supply transmits the data through the field effect transistor Q4 Module 32 is powered.
而在表1中的情况3和情况4中,数据传输装置3与电子设备1连接之后,电子设备1可以通过连接线2向数据传输装置3提供电能,外部电源检测模块37向与门电路D36输出第二断开信号,即如图15所示的电路中外部电源模块37向与门电路D36第二输入端输出的“VBS_CL”信号为低电平信号,图15中与门D36上面的二极管导通,则后续无论微控制器34向与门电路D36的第一输入端所发出的“MCU_CL”信号是高电平信号或是低电平信号,与门D36输出低电平信号到三极管QM3的基极使得三极管QM3断开,最终输入场效应晶体管Q4栅极G的信号为高电平信号(内部电源VBAT通过电阻RM7和RM9输出的高电平信号),场效应晶体管Q4断开,源极S和漏极D之间关断,因此数据传输装置连接外部电源接入之后,无论微控制器如何指示,内部电源都不会通过场效应晶体管Q4向数据传输模组供电。In case 3 and case 4 in Table 1, after the data transmission device 3 is connected to the electronic device 1, the electronic device 1 can provide power to the data transmission device 3 through the connection line 2, and the external power detection module 37 provides the AND gate circuit D36 with power. Output the second disconnection signal, that is, in the circuit shown in Figure 15, the "VBS_CL" signal output by the external power supply module 37 to the second input terminal of the AND gate circuit D36 is a low level signal, and the diode above the AND gate D36 in Figure 15 If it is turned on, then no matter whether the "MCU_CL" signal sent by the microcontroller 34 to the first input terminal of the AND gate circuit D36 is a high-level signal or a low-level signal, the AND gate D36 outputs a low-level signal to the transistor QM3 The base of the transistor QM3 is disconnected, and finally the signal input to the gate G of the field effect transistor Q4 is a high level signal (the high level signal output by the internal power supply VBAT through the resistors RM7 and RM9), the field effect transistor Q4 is disconnected, the source The connection between the pole S and the drain D is turned off, so after the data transmission device is connected to the external power supply, no matter how the microcontroller is instructed, the internal power supply will not supply power to the data transmission module through the field effect transistor Q4.
需要说明的是,如图15和图16中所示的电路结构中设置的电容、电阻等器件以分压、保护为目的,属于在本申请上述场效应晶体管、三极管以及与门电路等功能元件的基础上适应性的设置,本申请对电路中各位置处是否设置电阻、电容,以及所设置的电阻、电容的大小与规格不作限定,实际应用中可以根据具体的电路需求以及功能元件的工作参数进行适应性的设置与调整。It should be noted that the capacitors, resistors and other devices provided in the circuit structures shown in FIG. 15 and FIG. 16 are for the purpose of voltage division and protection, and belong to the above-mentioned functional elements such as field effect transistors, triodes, and AND gate circuits in this application. On the basis of adaptive settings, this application does not limit whether resistors and capacitors are set at various positions in the circuit, as well as the size and specifications of the set resistors and capacitors. In practical applications, it can be based on specific circuit requirements and the work of functional components. Parameters can be set and adjusted adaptively.
本申请上述各实施例中,以数据传输装置设置的微控制器的角度出发,说明了微控制器如何控制电源为数据传输模组进行快速供电,使得数据传输模组能够尽快得电并启动。而对于数据传输模组本身,即使在数据传输装置还暂未连接电子设备的情况下,也可以在得电后开始初始化以及相关的通信配置流程,配合微控制器共同实现快速启动,使得后续数据传输装置与电子设备连接之后,数据传输装置即可将电子设备所传输的数据传输给显示设备上,例如将电子设备的显示界面投射到显示设备上。In the above-mentioned embodiments of the present application, from the perspective of the microcontroller provided in the data transmission device, it is described how the microcontroller controls the power supply to quickly supply power to the data transmission module, so that the data transmission module can be powered and started as soon as possible. As for the data transmission module itself, even if the data transmission device is not connected to the electronic equipment, it can start the initialization and related communication configuration process after power on, and cooperate with the microcontroller to achieve fast startup, so that subsequent data After the transmission device is connected to the electronic device, the data transmission device can transmit the data transmitted by the electronic device to the display device, for example, project the display interface of the electronic device to the display device.
具体地,图17为本申请一实施例提供的数据传输装置的控制方法的流程示意图,如图17所示的方法的执行主体可以是数据传输装置中的数据传输模组,或者,是数据传输模组中的处理器,例如,中央处理器(central processing unit,简称:CPU)、系统级芯片(System on Chip,简称:SoC)等,如图17所示的方法可以在如图8所示的S103或者如图9所示的S204之后,当微控制器控制电源向数据传输模组供电之后,由数据传输模组执行。具体地,该方法包括:Specifically, FIG. 17 is a schematic flowchart of a control method of a data transmission device provided by an embodiment of the application. The execution body of the method shown in FIG. 17 may be a data transmission module in a data transmission device, or a data transmission module. The processor in the module, for example, a central processing unit (CPU for short), a system-on-chip (SoC for short), etc. The method shown in FIG. 17 can be shown in FIG. 8 . After S103 or S204 as shown in FIG. 9 , after the microcontroller controls the power supply to supply power to the data transmission module, the data transmission module executes it. Specifically, the method includes:
S301:数据传输模组在上电之后,进行通信配置。S301: After the data transmission module is powered on, the communication configuration is performed.
具体地,以如图4所示实施例中的数据传输装置3为例,数据传输装置3中微控制器34控制电源33向数据传输模组32供电之后,数据传输模组32上电并进行自身的初始化配置,以及相关的通信配置,其中,所述通信配置包括:数据传输模组32对通信接口31的通信配置;和/或数据传输模组32对其用于与显示设备4进行数据通信的通信配置。例如,当通信接口31是USB接口,则数据传输模组32需要对USB接口基于USB通信协议进行通信配置;当数据传输模组32通过Wi-Fi向显示设备4投射显示界面,则数据传输模组32需要对数据传输模组32进行基于Wi-Fi协议的通信配置。Specifically, taking the data transmission device 3 in the embodiment shown in FIG. 4 as an example, after the microcontroller 34 in the data transmission device 3 controls the power supply 33 to supply power to the data transmission module 32, the data transmission module 32 is powered on and performs The initialization configuration of itself, and the relevant communication configuration, wherein, the communication configuration includes: the communication configuration of the data transmission module 32 to the communication interface 31; and/or the data transmission module 32 is used for data transmission with the display device 4. Communication configuration for communication. For example, when the communication interface 31 is a USB interface, the data transmission module 32 needs to perform communication configuration on the USB interface based on the USB communication protocol; when the data transmission module 32 projects the display interface to the display device 4 through Wi-Fi, the data transmission module The group 32 needs to perform Wi-Fi protocol-based communication configuration on the data transmission module 32 .
S302:数据传输模组从通信接口接收媒体数据,并对媒体数据进行编码。媒体数据包括但不限于视频流数据和音频流数据。若通信接口是TypeC接口,则数据传输模组可以接收DP协议格式的媒体数据。S302: The data transmission module receives media data from the communication interface, and encodes the media data. Media data includes, but is not limited to, video stream data and audio stream data. If the communication interface is a TypeC interface, the data transmission module can receive media data in the DP protocol format.
随后,当数据传输模组32块完成通信相关的配置之后,即可将从通信接口31接收电子设备1所发送的该电子设备1的显示界面对应的媒体数据,并对媒体数据进行编码。编码的作用是让媒体数据满足数据传输模组32与显示设备4之间通信协议,例如,数据传输模组32与显示设备4之间通过Wi-Fi通信,则S302中数据传输模组32将媒体数据按照Wi-Fi协议进行编码,后续可以将编码后的媒体数据通过Wi-Fi发送给显示设备4。Subsequently, after the data transmission module 32 completes the communication-related configuration, the media data corresponding to the display interface of the electronic device 1 sent by the electronic device 1 can be received from the communication interface 31, and the media data can be encoded. The function of encoding is to make the media data satisfy the communication protocol between the data transmission module 32 and the display device 4. For example, if the data transmission module 32 and the display device 4 communicate through Wi-Fi, the data transmission module 32 in S302 will The media data is encoded according to the Wi-Fi protocol, and the encoded media data can be subsequently sent to the display device 4 via Wi-Fi.
其中,若数据传输模组32通过S301完成通信配置之前,用户已经将电子设备1与数据传输装置3之间通过连接线2连接好,则数据传输模组在S301完成通信配置之后,通过S302从通信接口接收来自电子设备1的媒体数据并进行编码。若数据传输模组32通过S301完成通信配置之后,用户尚未将数据传输装置3与电子设备1连接,则数据传输模组32暂时从通信接口31不能接收到媒体数据;当 用户将电子设备1与数据传输装置3通过连接线2连接后,数据传输模组32可以开始执行S302,从通信接口接收来自电子设备1的媒体数据并进行编码,接着将编码后的媒体数据发送给显示设备4。Wherein, if the user has connected the electronic device 1 and the data transmission device 3 through the connecting line 2 before the data transmission module 32 completes the communication configuration through S301, then the data transmission module completes the communication configuration through S302, The communication interface receives and encodes media data from the electronic device 1 . If the user has not connected the data transmission device 3 to the electronic device 1 after the data transmission module 32 completes the communication configuration through S301, the data transmission module 32 cannot temporarily receive media data from the communication interface 31; After the data transmission device 3 is connected through the connection line 2 , the data transmission module 32 can start to execute S302 , receive the media data from the electronic device 1 from the communication interface and encode it, and then send the encoded media data to the display device 4 .
因此,在本实施例中,数据传输装置3中的数据传输模组32在得到电源33提供的电能之后,即使当前数据传输装置3尚未连接电子设备1,也可以先进行相关通信的配置流程,使得后续用户使用连接线2将数据传输装置3接入电子设备1之后,数据传输装置3就能够接收到电子设备1传输的显示界面对应的媒体数据,并进行编码等后续处理,提高了数据传输模组32的响应速度和传输效率。给用户带来的直观感受是,将数据传输装置3插入电子设备1之后,数据传输装置3即可在短时间内甚至立即对电子设备1上的显示界面的媒体数据进行处理并投射到显示设备4上,带来一种“即插即显示”的用户体验,并提高了工作效率。Therefore, in this embodiment, after the data transmission module 32 in the data transmission device 3 obtains the power provided by the power supply 33, even if the current data transmission device 3 is not connected to the electronic device 1, it can first perform the configuration process of the relevant communication, After the subsequent user uses the connection line 2 to connect the data transmission device 3 to the electronic device 1, the data transmission device 3 can receive the media data corresponding to the display interface transmitted by the electronic device 1, and perform subsequent processing such as encoding, thereby improving data transmission. The response speed and transmission efficiency of the module 32. The intuitive feeling brought to the user is that after the data transmission device 3 is inserted into the electronic device 1, the data transmission device 3 can process the media data of the display interface on the electronic device 1 in a short time or even immediately and project it to the display device. 4, bring a "plug and display" user experience, and improve work efficiency.
S303:数据传输模组将S302中编码后的媒体数据发送给显示设备进行显示。或者,在接收到用户输入的开始指令之后,数据传输模组再将媒体数据发送给显示设备。S303: The data transmission module sends the media data encoded in S302 to a display device for display. Alternatively, after receiving the start instruction input by the user, the data transmission module sends the media data to the display device.
随后,在S303中,数据传输模组32可以将S302中所进行编码的媒体数据通过已经配置好的通信方式发送给显示设备4进行显示。或者,数据传输模组32在接收到用户输入的指令之后,才执行S303将编码后媒体数据通过已经配置好的通信方式发送给显示设备4进行显示。媒体数据可以是实时接收的视频流数据,以使得电子设备1的画面和显示设备4的画面基本同步。Subsequently, in S303, the data transmission module 32 may send the media data encoded in S302 to the display device 4 for display through the configured communication method. Alternatively, after receiving the instruction input by the user, the data transmission module 32 executes S303 to send the encoded media data to the display device 4 for display through the configured communication method. The media data may be video stream data received in real time, so that the screen of the electronic device 1 and the screen of the display device 4 are substantially synchronized.
可选地,数据传输模组在S303中将媒体数据发送给显示设备4时,还可以将数据传输指令(本说明书中以传屏指令为例)同步发送给显示设备4,使得显示设备4在接收到数据传输指令(本说明书中以传屏指令为例)后,对接收到来自于数据传输模组发送的媒体数据进行处理并显示。传屏指令的意义是指示显示设备进行解码等处理以及显示,例如数据传输过程中用户在数据传输装置3输入了停止指令(例如用户按了数据传输装置上的停止按键),数据传输装置3停止将编码后的媒体数据发送给显示设备4,并将停止传输指令(本说明书中以停止传屏指令为例)发送给显示设备4,所述停止传输指令(本说明书中以停止传屏指令为例)用于指示显示设备4不显示接收到的媒体数据,则显示设备4就会停止显示根据数据传输装置3传输来的媒体数据所生成的显示界面。Optionally, when the data transmission module sends the media data to the display device 4 in S303, it can also synchronously send a data transmission instruction (take the screen-sharing instruction as an example in this specification) to the display device 4, so that the display device 4 is in the display device 4. After receiving the data transmission instruction (in this specification, the screen transfer instruction is taken as an example), the received media data sent from the data transmission module is processed and displayed. The meaning of the screen transfer instruction is to instruct the display device to perform decoding and other processing and display. For example, during the data transmission process, the user inputs a stop instruction in the data transmission device 3 (for example, the user presses the stop button on the data transmission device), and the data transmission device 3 stops. Send the encoded media data to the display device 4, and send a stop transmission instruction (in this specification, the stop screen sharing instruction is taken as an example) to the display device 4, and the stop transmission instruction (in this specification, the stop screen transmission instruction is Example) is used to instruct the display device 4 not to display the received media data, then the display device 4 will stop displaying the display interface generated according to the media data transmitted by the data transmission device 3 .
可选地,图18为本申请一实施例提供的数据传输装置的应用场景框架示意图,如图18所示的数据传输装置3在如图4所示实施例的基础上,还包括物理按键38,该物理按键38可以设置在数据传输装置3的表面,物理按键38在数据传输装置3内部与数据传输模组32连接。则用户可以通过按压物理按键38的方式,向数据传输模组32发出开始指令。数据传输模组32接收到该开始指令后,将编码后的媒体数据发送给显示设备4。Optionally, FIG. 18 is a schematic diagram of an application scenario framework of a data transmission apparatus provided by an embodiment of the application. The data transmission apparatus 3 shown in FIG. 18 further includes physical buttons 38 on the basis of the embodiment shown in FIG. 4 . , the physical button 38 can be arranged on the surface of the data transmission device 3 , and the physical button 38 is connected with the data transmission module 32 inside the data transmission device 3 . Then, the user can send a start instruction to the data transmission module 32 by pressing the physical button 38 . After receiving the start instruction, the data transmission module 32 sends the encoded media data to the display device 4 .
更为具体地,图19为本申请一些实施例提供的数据传输模组执行数据传输装置控制方法时的状态示意图,其中以数据传输模组中的SoC作为执行主体,对数据传输模组在上电后到数据传输时所进行的详细操作进行说明。More specifically, FIG. 19 is a schematic state diagram of the data transmission module provided by some embodiments of the application when the data transmission device control method is executed, wherein the SoC in the data transmission module is used as the execution body, and the data transmission module is on the top. The detailed operations performed after power-on to data transmission will be explained.
如图19所示,以通信接口为USB Type-C接口、数据传输模组与显示设备通过Wi-Fi进行数据通信为例,当数据传输模组32由电源33供电之后,首先进行SoC的初始化操作,初始化操作包括但不限于:SOC UBoot加载、SoC Linux内核加载以及Type-C驱动加载等。并在SoC自身的初始化完成之后,进行通信接口(USB接口)的配置以及数据通信(Wi-Fi)的配置,图19中左侧箭头示出的USB接口的配置和右侧箭头示出的Wi-Fi的配置可以由SoC同时执行或者先后执行,执行顺序不作限定。对于Wi-Fi的配置过程,包括如下步骤:Wi-Fi驱动的加载、Wi-Fi根据预设账号和密码连接显示设备对应的Wi-Fi热点、并在连接热点之后建立对应的网络端口,使得SoC能够与显示设备4之间通过Wi-Fi进行数据通信。对于USB接口的配置过程,包括如下步骤:镜像文件(image file)加载、USB gadget storage准备就绪。As shown in FIG. 19 , taking the communication interface as the USB Type-C interface and the data communication between the data transmission module and the display device through Wi-Fi as an example, after the data transmission module 32 is powered by the power supply 33 , the SoC is initialized first. Operations, initialization operations include but are not limited to: SOC UBoot loading, SoC Linux kernel loading, and Type-C driver loading, etc. And after the initialization of the SoC itself is completed, the configuration of the communication interface (USB interface) and the configuration of the data communication (Wi-Fi) are performed. The configuration of the USB interface shown by the left arrow in FIG. - The configuration of Fi can be executed by the SoC simultaneously or sequentially, and the execution order is not limited. The Wi-Fi configuration process includes the following steps: loading the Wi-Fi driver, connecting and displaying the Wi-Fi hotspot corresponding to the device according to the preset account and password, and establishing the corresponding network port after connecting the hotspot, so that The SoC can perform data communication with the display device 4 via Wi-Fi. The configuration process of the USB interface includes the following steps: loading the image file and preparing the USB gadget storage.
随后,当SoC执行完上述初始化流程且数据传输装置32与电子设备1连接后,USB设备(数据传输装置32)被电子设备1识别,SoC即可通过USB接口接收电子设备1发送的媒体数据,并按照配置好的Wi-Fi协议参数对媒体数据进行编码后,等待用户按下物理按键。当SoC接收到用户通过物理按键发出的开始指令,即可通过预先建立网络端口,将编码后的媒体数据发送给显示设备4,同时将传屏指令也发送给显示设备4,然后显示设备4对接收到的媒体数据进行解码等处理后进行显示。Subsequently, when the SoC completes the above initialization process and the data transmission device 32 is connected to the electronic device 1, the USB device (the data transmission device 32) is recognized by the electronic device 1, and the SoC can receive the media data sent by the electronic device 1 through the USB interface. After encoding the media data according to the configured Wi-Fi protocol parameters, wait for the user to press the physical button. When the SoC receives the start command sent by the user through the physical button, it can send the encoded media data to the display device 4 by pre-establishing the network port, and also send the screen transfer instruction to the display device 4, and then the display device 4 pairs The received media data is decoded and then displayed.
此外,可选地,当数据传输模组32将媒体数据发送给显示设备4之后,还包括:在接收到用户输入的停止指令后,数据传输模组32停止将传屏指令发送给显示设备4,并且数据传输模组32自身也停止继续向显示设备继续发送媒体数据,其中,用户输入停止指令可以是对物理按键38的再次按压。In addition, optionally, after the data transmission module 32 sends the media data to the display device 4, it also includes: after receiving the stop instruction input by the user, the data transmission module 32 stops sending the screen transmission instruction to the display device 4. , and the data transmission module 32 itself also stops sending media data to the display device, wherein the user inputting the stop instruction may be pressing the physical button 38 again.
在另一种实现方式中,图20为本申请一实施例提供的数据传输装置的应用场景框架示意图,其中,外部电源检测模块37除了可以与可控开关36连接,向可控开关36发送第二导通信号,外部电源检测 模块37还可以与微控制器34和数据传输模组32连接,用于检测通信接口31是否有外部电源接入,并根据检测结果向控制器34和/或数据传输模组32发送对应的指示信号(例如,高电平信号可用于指示通信接口31有外部电源接入、低电平信号用于指示通信接口31无外部电源接入;或者,低电平信号可用于指示通信接口31有外部电源接入、高电平信号用于指示通信接口31无外部电源接入等)。可以理解,外部电源检测模块37可以与微控制器34而不和数据传输模组32连接,而外部电源检测模块37与微控制器34和数据传输模组32均连接的情况下,数据传输模组32也可以检测外部电源是否接入通信接口31,从而判断是否向显示设备发送媒体数据。In another implementation manner, FIG. 20 is a schematic diagram of an application scenario framework of the data transmission device provided by an embodiment of the present application. With the second conduction signal, the external power detection module 37 can also be connected to the microcontroller 34 and the data transmission module 32 to detect whether the communication interface 31 has an external power supply connected, and to the controller 34 and/or the data according to the detection result. The transmission module 32 sends a corresponding indication signal (for example, a high-level signal can be used to indicate that the communication interface 31 has external power access, and a low-level signal can be used to indicate that the communication interface 31 has no external power access; or, a low-level signal It can be used to indicate that the communication interface 31 has an external power supply, and a high-level signal is used to indicate that the communication interface 31 has no external power supply, etc.). It can be understood that the external power detection module 37 can be connected to the microcontroller 34 without being connected to the data transmission module 32, and when the external power detection module 37 is connected to both the microcontroller 34 and the data transmission module 32, the data transmission module The group 32 can also detect whether an external power source is connected to the communication interface 31, so as to determine whether to send media data to the display device.
具体地,在外部电源检测模块37的实际应用中,一种场景可以是:当数据传输模组32将媒体数据发送给显示设备4之后,可以通过数据传输装置3中设置的与数据传输模组32连接的外部电源检测模块37发送的指示信号,对外部电源是否从通信接口31脱离进行检测,当数据传输模组32接收到外部电源检测模块37发送的指示信号指示外部电源已断开,则数据传输模组32停止将传屏指令发送给显示设备4,并且数据传输模组32自身也停止继续向显示设备4继续发送媒体数据。在另一种场景中,当微控制器34接收到外部电源检测模块37发送的指示信号指示外部电源已断开,则微控制器34启动计时器,随后在计时器计时预设时间(例如60秒)内如没有接收到外部电源检测模块37发送的指示外部电源接入通信接口31的指示信号,微控制器34向可控开关36发送指示可控开关36断开的信号(即上述第一断开信号),此时外部电源检测模块37也向可控开关36发送指示可控开关36断开的信号(即上述第二断开信号),所以控制可控开关36断开,并且微控制器34进入待机状态;而在计时器计时预设时间(例如60秒)内如接收到外部电源检测模块37发送的指示外部电源接入通信接口31的指示信号,微控制器34向可控开关36继续发送指示可控开关36闭合的信号(即上述第一导通信号),此时外部电源检测模块37向可控开关36发送指示可控开关36断开的信号(即上述第二断开信号),所以控制可控开关36断开。Specifically, in the actual application of the external power supply detection module 37, a scenario may be: after the data transmission module 32 sends the media data to the display device 4, the data transmission module 3 set in the data transmission device 3 can pass the data transmission module. The instruction signal sent by the external power supply detection module 37 connected to 32 detects whether the external power supply is detached from the communication interface 31. When the data transmission module 32 receives the instruction signal sent by the external power supply detection module 37 to indicate that the external power supply has been disconnected, then The data transmission module 32 stops sending the screen transfer instruction to the display device 4 , and the data transmission module 32 itself also stops sending media data to the display device 4 . In another scenario, when the microcontroller 34 receives an indication signal sent by the external power supply detection module 37 indicating that the external power supply has been disconnected, the microcontroller 34 starts a timer, and then counts a preset time (for example, 60 times) on the timer. If the instruction signal indicating that the external power source is connected to the communication interface 31 sent by the external power source detection module 37 is not received within seconds), the microcontroller 34 sends a signal indicating that the controllable switch 36 is disconnected to the controllable switch 36 (that is, the above-mentioned first disconnection signal), at this time, the external power detection module 37 also sends to the controllable switch 36 a signal indicating that the controllable switch 36 is disconnected (ie, the above-mentioned second disconnection signal), so the controllable switch 36 is controlled to be disconnected, and the micro-controller The controller 34 enters the standby state; and within the preset time (for example, 60 seconds) of the timer counts, if it receives the instruction signal sent by the external power detection module 37 indicating that the external power is connected to the communication interface 31, the microcontroller 34 sends the control switch to the controllable switch. 36 continues to send a signal indicating that the controllable switch 36 is closed (ie the above-mentioned first conduction signal), and the external power detection module 37 sends a signal indicating that the controllable switch 36 is open to the controllable switch 36 at this time (ie the above-mentioned second open signal). signal), so control the controllable switch 36 to open.
图21为本申请一实施例提供的一种外部电源检测模块的部分电路结构示意图,如图21所提供的外部电源检测模块37在如图16所示的部分电路基础上,还包括:电阻R28(记为第一电阻)、电阻R84(记为第四电阻)、电阻R101(记为第二电阻)和电阻R100(记为第三电阻)。可以理解的是,外部电源检测模块37在如图16所示结构中为了配合可控开关36的电路需要在所连接的外部电源VBUS之后设置三极管用于反向处理,而外部电源检测模块37中连接微控制器34和数据传输模组32时无需设置三极管。FIG. 21 is a schematic diagram of a partial circuit structure of an external power supply detection module provided by an embodiment of the application. The external power supply detection module 37 provided in FIG. 21 further includes a resistor R28 on the basis of the partial circuit shown in FIG. 16 . (denoted as the first resistance), resistor R84 (denoted as the fourth resistance), resistor R101 (denoted as the second resistance), and resistor R100 (denoted as the third resistance). It can be understood that, in the structure shown in FIG. 16 , in order to cooperate with the circuit of the controllable switch 36, the external power supply detection module 37 needs to set a triode after the connected external power supply VBUS for reverse processing, while the external power supply detection module 37 needs to set a transistor for reverse processing. When connecting the microcontroller 34 and the data transmission module 32, no triode is required.
具体地,在外部电源检测模块37中如图21所示的部分电路,通信接口31所接入的电源记为VBUS,则VBUS通过电阻R28和电阻R84接地,VBUS还通过电阻R28和R100连接数据传输模组32的USB0_DET管脚,则数据传输模组可以根据USB0_DET管脚的电平值确定数据传输装置3的通信接口是否接入了外部电源VBUS;VBUS还通过电阻R28和电阻R101连接微控制器34的MCU_DET管脚,微控制器34可以通过MCU_DET管脚的电平值确定数据传输装置3的通信接口是否接入了外部电源VBUS。Specifically, in the part of the circuit shown in FIG. 21 in the external power supply detection module 37, the power supply connected to the communication interface 31 is denoted as VBUS, then VBUS is grounded through resistors R28 and R84, and VBUS is also connected to data through resistors R28 and R100. The USB0_DET pin of the transmission module 32, the data transmission module can determine whether the communication interface of the data transmission device 3 is connected to the external power supply VBUS according to the level value of the USB0_DET pin; VBUS is also connected to the microcontroller through the resistor R28 and the resistor R101. the MCU_DET pin of the controller 34, the microcontroller 34 can determine whether the communication interface of the data transmission device 3 is connected to the external power supply VBUS through the level value of the MCU_DET pin.
例如,当通信接口31接入了外部电源,VBUS为高电平,此时外部电源检测模块37通过USB0_DET管脚向数据传输模组32传输的同样也为高电平,这个高电平信号可以看作是指示通信接口31接入了外部电源的指示信号,使得数据传输模组32可以根据高电平的指示信号确定通信接口31连接了外部电源;当通信接口31没有连接外部电源时,VBUS为低电平,此时外部电源检测模块37通过USB0_DET管脚向数据传输模组32传输的同样也为低电平,这个低电平信号可以看作是指示通信接口未接入外部电源的指示信号,使得数据传输模组32可以根据低电平的指示信号确定通信接口31没有连接外部电源。又例如,当通信接口接入了外部电源,VBUS为高电平,此时外部电源检测模块37通过MCU_DET管脚向微控制器34传输的同样也为高电平,这个高电平信号可以看作是指示通信接口31接入了外部电源的指示信号,使得微控制器34可以根据高电平的指示信号确定通信接口31连接外部电源;当通信接口31没有连接外部电源时,VBUS为低电平,此时外部电源检测模块37通过MCU_DET管脚向微控制器34传输的同样也为低电平,这个低电平信号可以看作是指示通信接口31未接入外部电源的指示信号,使得微控制器34可以根据外部电源断开信号确定通信接口31没有连接外部电源。For example, when the communication interface 31 is connected to an external power supply and VBUS is at a high level, the external power supply detection module 37 transmits the same high level to the data transmission module 32 through the USB0_DET pin. This high level signal can be It is regarded as an indication signal indicating that the communication interface 31 is connected to the external power supply, so that the data transmission module 32 can determine that the communication interface 31 is connected to the external power supply according to the high-level indication signal; when the communication interface 31 is not connected to the external power supply, VBUS At this time, the external power detection module 37 transmits the same low level to the data transmission module 32 through the USB0_DET pin. This low level signal can be regarded as an indication that the communication interface is not connected to the external power supply. signal, so that the data transmission module 32 can determine that the communication interface 31 is not connected to an external power source according to the low-level indication signal. For another example, when the communication interface is connected to an external power supply and VBUS is at a high level, at this time the external power supply detection module 37 transmits the same high level to the microcontroller 34 through the MCU_DET pin. This high level signal can be seen. As an indication signal indicating that the communication interface 31 is connected to the external power supply, the microcontroller 34 can determine that the communication interface 31 is connected to the external power supply according to the high-level indication signal; when the communication interface 31 is not connected to the external power supply, VBUS is low power At this time, the external power detection module 37 transmits the same low level to the microcontroller 34 through the MCU_DET pin. This low level signal can be regarded as an indication signal indicating that the communication interface 31 is not connected to the external power supply, so that the The microcontroller 34 may determine that the communication interface 31 is not connected to the external power source according to the external power source disconnection signal.
可选地,如图21所示的电阻R28、R84、R100和R101都是从电路安全角度出发,用于保证电路的可靠性,在最为简易的实现方式中,如图21所示的接入检测电路也可以不设置电阻或者设置的电阻阻值为0,使得微控制器34的MCU_DET管脚和数据传输模组32的USB0_DET管脚可以直接连接外部电源VBUS,实现更为直接的检测。Optionally, the resistors R28, R84, R100 and R101 shown in Figure 21 are all from the perspective of circuit safety to ensure the reliability of the circuit. In the simplest implementation, the access shown in Figure 21 The detection circuit may also not set a resistance or set a resistance value of 0, so that the MCU_DET pin of the microcontroller 34 and the USB0_DET pin of the data transmission module 32 can be directly connected to the external power supply VBUS to achieve more direct detection.
综上,本实施例提供的数据传输装置的控制方法中,作为执行主体的数据传输模组在将媒体数据发送给显示设备进行显示之后,能够根据用户的停止指令、或者根据外部电源检测模块检测到外部电 源从通信接口脱离后,数据传输模组随即停止将传屏指令发送给显示设备,使得显示设备不会继续显示电子设备的显示界面。在实际使用时,当用户将电子设备连接数据传输装置之后,若发现当前电子设备所显示的界面不方便在显示设备上投屏显示之后,即可通过发送停止指令、或者通过直接将数据传输装置从电子设备拔出,使得显示设备不再显示该数据传输装置所发送的媒体数据,从而提高了数据传输装置对用户断开连接指令、动作的响应速度,提高了数据传输装置的响应速度和数据传输效率,还能够一定程度上保护用户的隐私,使得用户在误将隐私信息投屏时能及时阻止显示,进而也提高了数据传输装置的用户体验。To sum up, in the control method of the data transmission device provided in this embodiment, after the data transmission module as the execution body sends the media data to the display device for display, it can detect according to the user's stop instruction or according to the external power detection module. After the external power supply is disconnected from the communication interface, the data transmission module immediately stops sending the screen transfer command to the display device, so that the display device does not continue to display the display interface of the electronic device. In actual use, after the user connects the electronic device to the data transmission device, if it is found that the interface displayed by the current electronic device is inconvenient to display on the display device, the user can send a stop command or directly connect the data transmission device to the screen. Pull out from the electronic device, so that the display device no longer displays the media data sent by the data transmission device, thereby improving the response speed of the data transmission device to user disconnection instructions and actions, and improving the response speed and data transmission speed of the data transmission device. The transmission efficiency can also protect the user's privacy to a certain extent, so that the user can prevent the display in time when the private information is mistakenly projected to the screen, thereby improving the user experience of the data transmission device.
进一步地,在本申请实施例提供的数据传输装置3中,当检测到数据传输装置3被移动,微控制器34就会控制电源33给数据传输模组32供电,然而在一些应用场景中,数据传输装置3的移动可能并非用户想使用数据传输装置3进行数据传输,而是用户不小心碰触到了数据传输装置3或仅仅想移动数据传输装置3,后续也不会将数据传输装置3与电子设备1连接,此时如果内部电源33一直持续向数据传输模组32供电,就会浪费电源33的电能。因此,本申请实施例针对该技术问题进一步提出了双重省电保护机制。在本申请实施例中,首先,提出了在振动传感器35或者微控制器34设置加速度阈值(具体的请参照阈值实施例的设置方式),通过比较结果,微控制器34确定是否向可控开关36发送导通信号,通过设置加速度阈值,可以将部分微小的振动或者无效振动信号过滤掉,避免微控制器34向可控开关36发送导通信号,使得电源33向数据传输模组32供电,浪费电能;但是,即使在部分振动传感器35检测数据的加速度值超过预设的加速度阈值时,也不一定是用户想使用数据传输装置3,因此,为了进一步减少电源33的电能的浪费,微控制器34在内部电源33和数据传输模组32之间供电连接导通之后,还包括步骤:Further, in the data transmission device 3 provided in the embodiment of the present application, when it is detected that the data transmission device 3 is moved, the microcontroller 34 will control the power supply 33 to supply power to the data transmission module 32. However, in some application scenarios, The movement of the data transmission device 3 may not be because the user wants to use the data transmission device 3 for data transmission, but the user accidentally touches the data transmission device 3 or just wants to move the data transmission device 3, and the data transmission device 3 will not be connected to the data transmission device 3. When the electronic device 1 is connected, if the internal power supply 33 continues to supply power to the data transmission module 32, the power of the power supply 33 will be wasted. Therefore, the embodiments of the present application further propose a dual power saving protection mechanism to address this technical problem. In the embodiment of the present application, first, it is proposed to set an acceleration threshold value in the vibration sensor 35 or the microcontroller 34 (for details, please refer to the setting method of the threshold value embodiment), and through the comparison result, the microcontroller 34 determines whether to send an acceleration threshold to the controllable switch. 36 sends a conduction signal, and by setting the acceleration threshold, some tiny vibrations or invalid vibration signals can be filtered out, so as to prevent the microcontroller 34 from sending a conduction signal to the controllable switch 36, so that the power supply 33 supplies power to the data transmission module 32, Waste electric energy; however, even when the acceleration value of the data detected by some vibration sensors 35 exceeds the preset acceleration threshold value, it is not necessarily that the user wants to use the data transmission device 3. Therefore, in order to further reduce the waste of electric energy of the power supply 33, the micro-controller After the power supply connection between the internal power supply 33 and the data transmission module 32 is turned on, the controller 34 further includes the steps:
在微控制器34接收到振动传感器35的检测数据或中断信号后的第一预设时间(例如60秒,这段时间足够用户将数据传输装置3与电子设备1进行连接)内,若接收到外部电源检测模块37发送的检测到通信接口31有外部电源接入的指示信号,微控制器34向可控开关36继续发送指示可控开关36闭合的信号(即上述第一导通信号),此时外部电源检测模块37向可控开关36发送指示可控开关36断开的信号(即上述第二断开信号),所以控制可控开关36断开,控制内部电源33和数据传输模组32之间的供电连接断开;在微控制器34接收到振动传感器35的检测数据或中断信号后的第一预设时间内,若未接收到外部电源检测模块37发送的检测到通信接口31有外部电源接入的指示信号,则在该第一预设时间之后,微控制器34向可控开关36发送指示可控开关36断开的信号(即上述第一断开信号),此时外部电源检测模块37向可控开关36发送指示可控开关36导通的信号(即上述第二导通信号),所以控制可控开关36断开,控制内部电源33和数据传输模组32之间的供电连接断开。Within the first preset time (for example, 60 seconds, which is sufficient for the user to connect the data transmission device 3 to the electronic device 1) after the microcontroller 34 receives the detection data or the interruption signal from the vibration sensor 35, if the The external power detection module 37 sends an indication signal that detects that the communication interface 31 has an external power connection, and the microcontroller 34 continues to send a signal to the controllable switch 36 to indicate that the controllable switch 36 is closed (ie, the above-mentioned first conduction signal), At this time, the external power detection module 37 sends a signal indicating that the controllable switch 36 is disconnected (ie, the above-mentioned second disconnection signal) to the controllable switch 36, so the controllable switch 36 is controlled to be disconnected, and the internal power supply 33 and the data transmission module are controlled. The power supply connection between 32 is disconnected; within the first preset time after the microcontroller 34 receives the detection data or the interruption signal of the vibration sensor 35, if the detection communication interface 31 sent by the external power detection module 37 is not received There is an indication signal that the external power supply is connected, then after the first preset time, the microcontroller 34 sends a signal indicating that the controllable switch 36 is disconnected (ie, the first disconnection signal) to the controllable switch 36. At this time The external power detection module 37 sends a signal indicating that the controllable switch 36 is turned on (ie, the above-mentioned second conduction signal) to the controllable switch 36, so it controls the controllable switch 36 to turn off, and controls the connection between the internal power supply 33 and the data transmission module 32. The power supply connection between them is disconnected.
具体地,本步骤的执行主体可以是微控制器34,在确定数据传输装置3移动之后,可以通过如图15所示的将微控制器34的STM32_1108_IO管脚置为低电平信号的方式发送第一导通信号,控制可控开关36导通,使得内部电源33通过可控开关36向数据传输模组32供电,同时,微控制器34会启动一个第一预设时间(例如60秒)的计时器。在控制可控开关36导通之后,微控制器34会检测通信接口31是否有外部电源接入,可选地,微控制器34可以通过例如图21中外部电源检测模块37输出的指示信号,即MCU_DET管脚的电平确定通信接口31是否有外部电源接入。如果在60秒的计时器结束之前根据指示信号确定有外部电源接入,则计时结束,微控制器34保持STM32_1108_IO管脚置为低电平信号(指示可控开关36闭合)。若在60秒的计时器结束之后,根据指示信号确定在这60秒内一直没有外部电源接入,则在60秒计时结束后,微控制器34根据调整STM32_1108_IO管脚置为高电平信号的方式发送第一断开信号(指示可控开关36断开),控制可控开关36断开,使得电源在60秒之后不用继续向数据传输模组32供电,从而保证了非数据传输装置用户对数据传输装置3误触所产生的移动不会造成电源33持续向数据传输模组32供电,减少了电源的损耗,提高了微控制器34在进行数据传输装置控制时的完备性。Specifically, the execution body of this step may be the microcontroller 34. After determining that the data transmission device 3 has moved, it may send the signal by setting the STM32_1108_IO pin of the microcontroller 34 to a low level signal as shown in FIG. 15 . The first conduction signal controls the conduction of the controllable switch 36, so that the internal power supply 33 supplies power to the data transmission module 32 through the controllable switch 36, and at the same time, the microcontroller 34 will start a first preset time (for example, 60 seconds) timer. After controlling the controllable switch 36 to be turned on, the microcontroller 34 will detect whether the communication interface 31 is connected to an external power supply. That is, the level of the MCU_DET pin determines whether the communication interface 31 is connected to an external power supply. If it is determined that an external power supply is connected according to the indication signal before the 60-second timer expires, the timing ends, and the microcontroller 34 keeps the STM32_1108_IO pin set to a low level signal (instructing the controllable switch 36 to be closed). If after the 60-second timer expires, it is determined according to the indication signal that no external power supply has been connected during the 60-second period, then after the 60-second timer expires, the microcontroller 34 adjusts the STM32_1108_IO pin to be set to a high-level signal. The first disconnection signal (instructing the controllable switch 36 to be disconnected) is sent in the method, and the controllable switch 36 is controlled to be disconnected, so that the power supply does not continue to supply power to the data transmission module 32 after 60 seconds, thereby ensuring that users of non-data transmission devices can The movement caused by the accidental touch of the data transmission device 3 will not cause the power supply 33 to continuously supply power to the data transmission module 32 , thereby reducing power loss and improving the integrity of the microcontroller 34 in controlling the data transmission device.
此外,在本申请另一个实施例中,数据传输装置3在连接了电子设备1后,微控制器34向可控开关36继续发送指示可控开关36闭合的信号(即上述第一导通信号),此时由于外部电源检测模块37向可控开关36发送指示可控开关36断开的信号(即上述第二断开信号),所以控制可控开关36断开,控制内部电源33和数据传输模组32之间的供电连接断开。如果此后数据传输装置3又被用户拔出,由于微控制器34向可控开关36并不向可控开关36发送指示断开的信号(即上述第一断开信号),而是会启动一个第二预设时间(例如60秒)的计时器,并在计时器结束之前,继续发送指示可控开关36闭合的信号(即上述第一导通信号),而外部电源检测模块37向可控开关36发送指示可控开关36导通的信号(即上述第二导通信号),所以控制可控开关36导通,控制内部电源33和数据传输模组32 之间的供电连接恢复导通。这样,即使数据传输装置3被拔出后,在计时器结束该第二预设时间的计时之前,若数据传输装置3连接电子设备1,由于可控开关36导通,电源33向数据传输模组32供电,使得数据传输模组32处于工作状态,而不会由于数据传输装置3被拔出后失去外部电源而立即掉电,从而在数据传输装置3被用户拔出一个电子设备1、并插入下一个电子设备1时能够迅速进行数据传输,提高工作效率。In addition, in another embodiment of the present application, after the data transmission device 3 is connected to the electronic device 1, the microcontroller 34 continues to send a signal indicating that the controllable switch 36 is closed to the controllable switch 36 (that is, the above-mentioned first conduction signal ), at this time, since the external power detection module 37 sends a signal indicating that the controllable switch 36 is disconnected (ie, the second disconnection signal) to the controllable switch 36, the controllable switch 36 is controlled to be disconnected, and the internal power supply 33 and data The power supply connection between the transmission modules 32 is disconnected. If the data transmission device 3 is pulled out by the user after that, since the microcontroller 34 does not send a signal indicating disconnection to the controllable switch 36 (that is, the above-mentioned first disconnection signal), it will start a A timer for the second preset time (for example, 60 seconds), and before the timer expires, it continues to send a signal indicating that the controllable switch 36 is closed (ie, the above-mentioned first conduction signal), and the external power detection module 37 sends a signal to the controllable switch 36 . The switch 36 sends a signal indicating that the controllable switch 36 is turned on (ie, the above-mentioned second conduction signal), so the controllable switch 36 is controlled to be turned on, and the power supply connection between the internal power supply 33 and the data transmission module 32 is controlled to be turned on again. In this way, even after the data transmission device 3 is pulled out, before the timer ends the timing of the second preset time, if the data transmission device 3 is connected to the electronic device 1, since the controllable switch 36 is turned on, the power supply 33 turns to the data transmission mode. The group 32 is powered, so that the data transmission module 32 is in a working state, and will not be powered off immediately due to the loss of external power after the data transmission device 3 is pulled out. When the next electronic device 1 is inserted, data transmission can be performed quickly, thereby improving work efficiency.
可选地,在上述实施例中,当微控制器34控制可控开关36导通之后,若振动传感器35没有检测到后续数据传输装置3的移动,则微控制器24可以进入待机模式,随后当振动传感器35检测到数据传输装置移动,可以通过向微控制器34发送中断信号的方式唤醒微控制器34,使得微控制器34切换回工作状态后,立即将STM32_1108_IO管脚置为低电平信号,并启动预设时间的计时器,并检测外部电源是否接入。Optionally, in the above embodiment, after the microcontroller 34 controls the controllable switch 36 to be turned on, if the vibration sensor 35 does not detect the subsequent movement of the data transmission device 3, the microcontroller 24 can enter the standby mode, and then When the vibration sensor 35 detects the movement of the data transmission device, it can wake up the microcontroller 34 by sending an interrupt signal to the microcontroller 34, so that the microcontroller 34 switches back to the working state and immediately sets the STM32_1108_IO pin to a low level signal, and start a timer for a preset time and detect whether the external power supply is connected.
例如,图22为本申请一些实施例提供的微控制器执行数据传输装置控制方法时的状态示意图,其中,以微控制器34为数据传输装置3中设置的MCU作为示例,当MCU上电(例如数据传输装置3出厂时上电)工作后,进行MCU的初始化配置,包括配置加速度阈值。MCU在完成上述启动工作后将STM32_1108_IO管脚置为低电平信号,并在检测数据传输装置3的通信接口没有外部电源接入的情况下开启60秒的计时器开始计时。而计时器在60秒的时间内,MCU继续检测通信接口是否有外部电源接入,若在60秒内检测到外部电源接入,则MCU保持STM32_1108_IO管脚置为低电平信号;若在60秒内未检测到外部电源接入,则MCU将STM32_1108_IO管脚置为高电平信号后,进入待机状态。直到下一次振动传感器35检测到数据传输装置运动(即实时加速度值超过预设的加速度阈值)时,向MCU发送中断信号后,MCU结束待机并切换为工作状态,并根据中断信号将STM32_1108_IO管脚置为低电平信号,随后重复上述开启60秒计时器的过程,并不断循环。For example, FIG. 22 is a schematic state diagram of a microcontroller executing a data transmission device control method according to some embodiments of the present application, wherein, taking the microcontroller 34 as the MCU set in the data transmission device 3 as an example, when the MCU is powered on ( For example, after the data transmission device 3 is powered on when it leaves the factory, the initialization configuration of the MCU is performed, including the configuration of the acceleration threshold. After completing the above startup work, the MCU sets the STM32_1108_IO pin to a low level signal, and starts a timer for 60 seconds when it detects that the communication interface of the data transmission device 3 is not connected to an external power supply. While the timer is within 60 seconds, the MCU continues to detect whether there is an external power supply connected to the communication interface. If the external power supply is detected within 60 seconds, the MCU keeps the STM32_1108_IO pin set to a low level signal; if at 60 If the external power supply is not detected within seconds, the MCU will enter the standby state after setting the STM32_1108_IO pin to a high level signal. Until the next time the vibration sensor 35 detects the movement of the data transmission device (that is, the real-time acceleration value exceeds the preset acceleration threshold), after sending an interrupt signal to the MCU, the MCU ends the standby and switches to the working state, and according to the interrupt signal, the STM32_1108_IO pin is Set to a low level signal, then repeat the above process of starting the 60-second timer, and continue to cycle.
数据传输装置3在预设时间内连接了电子设备1后,MCU向可控开关36将STM32_1108_IO管脚保持为低电平信号以指示可控开关36闭合,此时由于外部电源检测模块37向可控开关36发送的VBS_CL信号为低电平信号以指示可控开关36断开,所以控制可控开关36断开,控制内部电源33和数据传输模组32之间的供电连接断开,如果此后数据传输装置3又被用户拔出,由于微控制器34向可控开关36继续保持为低电平信号以指示可控开关36闭合,而外部电源检测模块37向可控开关36发送的VBS_CL信号为高电平信号以指示可控开关36闭合,所以控制可控开关36导通,控制内部电源33和数据传输模组32之间的供电连接恢复导通。这样,即使数据传输装置3被拔出后数据传输模组32也继续处于工作状态,而不会由于数据传输装置3被拔出后失去外部电源而掉电,从而在数据传输装置3插入下一个电子设备1时能够迅速进行数据传输,提高工作效率。After the data transmission device 3 is connected to the electronic device 1 within the preset time, the MCU keeps the STM32_1108_IO pin as a low level signal to the controllable switch 36 to instruct the controllable switch 36 to close. The VBS_CL signal sent by the control switch 36 is a low level signal to indicate that the controllable switch 36 is disconnected, so the controllable switch 36 is controlled to be disconnected, and the power supply connection between the control internal power supply 33 and the data transmission module 32 is disconnected. The data transmission device 3 is pulled out by the user again, because the microcontroller 34 continues to hold the low level signal to the controllable switch 36 to instruct the controllable switch 36 to close, and the external power detection module 37 sends the VBS_CL signal to the controllable switch 36 It is a high level signal to indicate that the controllable switch 36 is closed, so the controllable switch 36 is controlled to be turned on, and the power supply connection between the internal power supply 33 and the data transmission module 32 is controlled to be turned on again. In this way, even after the data transmission device 3 is pulled out, the data transmission module 32 will continue to be in a working state, and will not be powered down due to the loss of the external power supply after the data transmission device 3 is pulled out. The electronic device 1 can quickly perform data transmission and improve work efficiency.
可选地,本申请实施例还提供一种数据传输装置的控制方法,应用于同一个数据传输装置切换与不同的电子设备的连接关系的过程中,执行主体可以是微控制器。其中,微控制器也可以通过如图21所示的外部电源检测模块中的MCU_DET管脚,对通信接口是否连接外部电源进行检测,当检测到通信接口的外部电源断开之后,通过控制内部电源向数据传输模组供电,使得数据传输模组保持与显示设备的无线连接。当后续用户将另一个电子设备与数据传输装置连接,此时数据传输模组不需要再进行初始化以及相关通信配置的步骤,便可以向显示设备发送当前电子设备所传输的媒体数据,使得在数据传输装置在从不同电子设备切换的过程中,减少了切换后的电子设备使用数据传输装置所需的准备时间,从而减少了用户将切换后的电子设备连接数据传输装置后,在显示设备上看到投射的显示界面的等待时间,进而提高了数据传输装置的数据传输效率,并提高了用户体验。Optionally, an embodiment of the present application further provides a method for controlling a data transmission device, which is applied to the process of switching the connection relationship between the same data transmission device and different electronic devices, and the execution body may be a microcontroller. Among them, the microcontroller can also detect whether the communication interface is connected to the external power supply through the MCU_DET pin in the external power supply detection module as shown in Figure 21. When it is detected that the external power supply of the communication interface is disconnected, the internal power supply is controlled by Power is supplied to the data transmission module, so that the data transmission module maintains a wireless connection with the display device. When the subsequent user connects another electronic device to the data transmission device, the data transmission module can send the media data transmitted by the current electronic device to the display device without performing initialization and related communication configuration steps, so that the data In the process of switching from different electronic devices, the transmission device reduces the preparation time required for the switched electronic device to use the data transmission device, thereby reducing the need for users to view the data transmission device on the display device after connecting the switched electronic device to the data transmission device. The waiting time to the projected display interface improves the data transmission efficiency of the data transmission device and improves the user experience.
在一种实现中,外部电源检测模块37可以仅连接微控制34器和数据传输模组32中之一,同时,微控制器34与数据传输模组32之间存在通信连接(例如通过I2C、UART(Universal Asynchronous Receiver/Transmitter,通用非同步收发传输器)或者GPIO(General-purpose input/output,通用输入与输出)等连接方式)。例如,图23为本申请提供的数据传输装置一实施例的应用场景框架示意图,其中,所设置的外部电源检测模块37连接通信接口31和数据传输模组32,数据传输模组32可以通过外部电源检测模块37的指示信号确定通信接口31是否连接外部电源,例如通过图21所示的USB_DET管脚确定通信接口是否外接电源VBUS,并将确定结果发送至微控制器34。图24为本申请提供的数据传输装置一实施例的应用场景框架示意图,其中,所设置的外部电源检测模块37连接通信接口31和微控制器34,微控制器34可以通过外部电源检测模块37的指示信号确定通信接口31是否连接外部电源,例如通过图21所示的MCU_DET管脚确定通信接口是否外接电源VBUS,并将确定结果发送至数据传输模组32。In one implementation, the external power detection module 37 may only be connected to one of the microcontroller 34 and the data transmission module 32, and at the same time, there is a communication connection between the microcontroller 34 and the data transmission module 32 (for example, through I2C, UART (Universal Asynchronous Receiver/Transmitter, general asynchronous transceiver) or GPIO (General-purpose input/output, general-purpose input and output) and other connection methods). For example, FIG. 23 is a schematic diagram of an application scenario framework of an embodiment of the data transmission device provided by the present application, wherein the external power detection module 37 set is connected to the communication interface 31 and the data transmission module 32, and the data transmission module 32 can pass the external The indication signal of the power detection module 37 determines whether the communication interface 31 is connected to an external power supply, for example, through the USB_DET pin shown in FIG. FIG. 24 is a schematic diagram of an application scenario framework of an embodiment of the data transmission device provided by the present application, wherein the external power detection module 37 set is connected to the communication interface 31 and the microcontroller 34 , and the microcontroller 34 can pass the external power detection module 37 The indication signal of , determines whether the communication interface 31 is connected to an external power supply, for example, through the MCU_DET pin shown in FIG.
本申请提供另外一个实施例,图25为本申请一实施例提供的一种数据传输方法的流程示意图,具 体的,基于图4、图7、图15,图16、图21的实施例,提供一种数据传输方法,如图25所示的数据传输方法包括:The present application provides another embodiment. FIG. 25 is a schematic flowchart of a data transmission method provided by an embodiment of the present application. Specifically, based on the embodiments of FIGS. 4 , 7 , 15 , 16 and 21 , A data transmission method, as shown in Figure 25, includes:
步骤S401,MCU接收传感器发送的信息;Step S401, the MCU receives the information sent by the sensor;
传感器发送的信息可以为检测数据或中断信号。该MCU又可被称为微控制器、微控制单元等。The information sent by the sensor can be detection data or an interrupt signal. The MCU may also be referred to as a microcontroller, a microcontroller unit, or the like.
本实施例以振动传感器35向MCU发送检测数据为例,该检测数据携带振动传感器35自身的加速度值,MCU预存有加速度阈值,MCU根据该检测数据中的加速度值和预存的加速度阈值的比较结果判断数据传输装置3是否被移动。In this embodiment, the vibration sensor 35 sends detection data to the MCU as an example. The detection data carries the acceleration value of the vibration sensor 35 itself. The MCU pre-stores the acceleration threshold. The MCU compares the acceleration value in the detection data with the pre-stored acceleration threshold according to the comparison result. It is judged whether or not the data transmission device 3 has been moved.
本实施例中,振动传感器35可以是加速度传感器,加速度传感器会实时检测数据传输装置3运动的运动状态,生成六个方向的加速度数据(例如某实施例中检测到的加速度数据为0mg,200mg,100mg,150mg,0mg,400mg)。MCU可以每间隔一段时间通过与振动传感器35之间的通信,获取振动传感器35实时检测的检测数据;或者,振动传感器35可以每间隔一段时间向MCU发送实时检测的检测数据。In this embodiment, the vibration sensor 35 can be an acceleration sensor, and the acceleration sensor can detect the motion state of the movement of the data transmission device 3 in real time, and generate acceleration data in six directions (for example, the acceleration data detected in a certain embodiment are 0 mg, 200 mg, 100mg, 150mg, 0mg, 400mg). The MCU may acquire detection data detected by the vibration sensor 35 in real time through communication with the vibration sensor 35 at regular intervals; alternatively, the vibration sensor 35 may send the detection data detected by the vibration sensor 35 in real time to the MCU at regular intervals.
可选地,本实施例提供的数据传输装置3内置的电源33还可以用于向MCU供电。在一种实施例中,MCU可以设置两种功耗工作状态,分别为第一功耗工作状态和第二功耗工作状态,其中,在MCU接收检测数据或中断信号之前,MCU在数据传输装置3的内置电源33的供电下处于第一功耗工作状态;MCU接收检测数据(其加速度值超过预设的加速度阈值)或中断信号后,处于第二功耗工作状态,可以设置MCU在第一功耗工作状态下的功耗比在第二功耗工作状态的功耗低,具体的,第一功耗工作状态可以为低功耗工作状态,第二功耗工作状态可以为高功耗工作状态。MCU可选用具有低功耗工作状态的器件,在MCU处于待机状态时,MCU可以维持在低功耗状态,其工作电流可以限制在uA级别,从而尽可能减少数据传输装置3未连接电子设备1时MCU对电源33的电能消耗。Optionally, the built-in power supply 33 of the data transmission device 3 provided in this embodiment may also be used to supply power to the MCU. In an embodiment, the MCU can set two power consumption working states, namely a first power consumption working state and a second power consumption working state, wherein, before the MCU receives the detection data or the interrupt signal, the MCU is in the data transmission device. 3 is in the first power consumption working state under the power supply of the built-in power supply 33; after the MCU receives the detection data (its acceleration value exceeds the preset acceleration threshold) or the interrupt signal, it is in the second power consumption working state, and the MCU can be set in the first power consumption working state. The power consumption in the power consumption working state is lower than the power consumption in the second power consumption working state. Specifically, the first power consumption working state may be a low power consumption working state, and the second power consumption working state may be a high power consumption working state. condition. The MCU can choose a device with a low-power working state. When the MCU is in a standby state, the MCU can be maintained in a low-power state, and its operating current can be limited to the uA level, so as to minimize the number of data transmission devices 3 Not connected to electronic equipment 1 When the MCU consumes the power of the power supply 33 .
步骤S402,MCU如果确定数据传输装置3被移动,向与门电路D36的其中一个输入引脚发送用于指示可控开关36导通的第一导通信号。In step S402, if the MCU determines that the data transmission device 3 is moved, it sends a first conduction signal for instructing the controllable switch 36 to be turned on to one of the input pins of the AND gate circuit D36.
具体的,MCU判断从振动传感器35所接收的振动传感器35自身的加速度值是否超过加速度阈值,若是,则说明数据传输装置3发生了移动;若否,则说明数据传输装置3未发生移动,可能处于静止状态。例如,MCU预设有加速度阈值350mg,则若MCU所获取的六个方向的加速度值为(0mg,200mg,100mg,150mg,0mg,400mg),说明数据传输装置3发生了移动,MCU的STM32_1108_IO管脚向与门电路D36的其中一个输入引脚(如图15所示的与门电路D36下面的二极管阴极)发送第一导通信号。Specifically, the MCU determines whether the acceleration value of the vibration sensor 35 itself received from the vibration sensor 35 exceeds the acceleration threshold. If so, it means that the data transmission device 3 has moved; if not, it means that the data transmission device 3 has not moved. at rest. For example, the MCU presets the acceleration threshold of 350mg, if the acceleration values obtained by the MCU in the six directions are (0mg, 200mg, 100mg, 150mg, 0mg, 400mg), it means that the data transmission device 3 has moved, and the STM32_1108_IO tube of the MCU The pin sends the first turn-on signal to one of the input pins of the AND gate circuit D36 (the cathode of the diode under the AND gate circuit D36 as shown in FIG. 15 ).
在本实施例中,第一导通信号用于指示可控开关36导通,该第一导通信号可以是低电平信号。具体的,该用于指示可控开关36导通的第一导通信号是MCU的STM32_1108_IO管脚输出的低电平信号,需要说明是,MCU输出的信号是低电平信号,经过三极管QM2反向处理后,达到与门电路D36的其中一个引脚的电平信号是高电平的MCU_CL信号。第一导通信号是高电平信号还是低电平信号可以根据电路实际情况而设置,例如在其他实施例中,MCU输出的指示可控开关36导通的信号可以直接控制与门电路D36的其中一个引脚。In this embodiment, the first turn-on signal is used to instruct the controllable switch 36 to turn on, and the first turn-on signal may be a low-level signal. Specifically, the first conduction signal used to instruct the controllable switch 36 to be turned on is a low-level signal output by the STM32_1108_IO pin of the MCU. It should be noted that the signal output by the MCU is a low-level signal, which is reversed by the transistor QM2. After processing, the level signal reaching one of the pins of the AND gate circuit D36 is the high level MCU_CL signal. Whether the first turn-on signal is a high-level signal or a low-level signal can be set according to the actual situation of the circuit. For example, in other embodiments, the signal output by the MCU indicating that the controllable switch 36 is turned on can directly control the AND gate circuit D36. one of the pins.
在其他实施例中,MCU如果接收到振动传感器35发送的中断信号,则确定数据传输装置3被移动。In other embodiments, the MCU determines that the data transmission device 3 is moved if it receives the interrupt signal sent by the vibration sensor 35 .
在MCU确定数据传输装置3被移动后,MCU的计时器开始进行预设时间(例如60秒)的计时。After the MCU determines that the data transmission device 3 is moved, the timer of the MCU starts to count the preset time (eg, 60 seconds).
步骤S403,在检测到数据传输装置3的通信接口31未接入外部电源时,外部电源检测模块37向与门电路D36的另外一个输入引脚发送第二导通信号。Step S403 , when it is detected that the communication interface 31 of the data transmission device 3 is not connected to an external power supply, the external power supply detection module 37 sends a second conduction signal to another input pin of the AND gate circuit D36 .
参考附图,该第二导通信号用于指示可控开关36导通的信号,该第二导通信号可以为高电平信号,具体的,外部电源检测模块37与与门电路D36的另外一个引脚(如图15所示的与门电路D36上面的二极管阴极)连接,外部电源检测模块37用于检测通信接口31是否有外部电源接入,若其没有检测到有外部电源接入,外部电源检测模块37则向与门电路D36的该输入引脚发送用于指示可控开关36导通的高电平信号,具体的,其向与门电路D36上面的二极管阴极发送用于指示可控开关36导通的高电平的VBS_CL信号。Referring to the drawings, the second conduction signal is used to indicate that the controllable switch 36 is turned on, and the second conduction signal may be a high-level signal. Specifically, the external power detection module 37 and the AND gate circuit D36 A pin (as shown in Figure 15, the diode cathode above the AND gate circuit D36) is connected, and the external power detection module 37 is used to detect whether the communication interface 31 has external power access. The external power detection module 37 sends a high-level signal to the input pin of the AND gate circuit D36 to indicate that the controllable switch 36 is turned on. A high-level VBS_CL signal turns on the control switch 36 .
步骤S404,与门电路D36根据第一导通信号和第二导通信号,向可控开关36发送控制信号使得可控开关36闭合,从而将数据传输装置3的电源33和数据传输模组32之间的供电连接导通。In step S404, the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the first conduction signal and the second conduction signal to make the controllable switch 36 close, thereby connecting the power supply 33 of the data transmission device 3 and the data transmission module 32. The power supply connection between is turned on.
具体的如图15所示,与门电路D36两个输入引脚的第二导通信号和第一导通信号分别为VBS_CL信号和MCU_CL信号,“VBS_CL”信号为高电平信号,“MCU_CL”信号为高电平信号,与门电路D36的两个二极管均截止,内部电源VBAT高电平信号经过电阻RM8和电阻RM11使得三极管QM3导通,最终输入作为可控开关36的场效应晶体管Q4栅极G的信号为低电平信号(栅极G通过电阻RM9和三极管QM3接地),场效应晶体管Q4导通,源极S和漏极D之间导通,内部电源(电源33)通过场效应晶体管Q4向数据传输模组32供电。Specifically, as shown in Figure 15, the second conduction signal and the first conduction signal of the two input pins of the AND gate circuit D36 are the VBS_CL signal and the MCU_CL signal respectively, the "VBS_CL" signal is a high level signal, and the "MCU_CL" signal The signal is a high-level signal, the two diodes of the AND gate circuit D36 are both turned off, and the high-level signal of the internal power supply VBAT passes through the resistor RM8 and the resistor RM11 to make the transistor QM3 turn on, and finally input as the gate of the field effect transistor Q4 of the controllable switch 36 The signal of the pole G is a low level signal (the gate G is grounded through the resistor RM9 and the transistor QM3), the field effect transistor Q4 is turned on, the source S and the drain D are turned on, and the internal power supply (power supply 33) passes through the field effect. The transistor Q4 supplies power to the data transmission module 32 .
数据传输装置3的内置电源33向数据传输模组32供电,数据传输模组32启动并进行相关的通信配置,例如,数据传输模组32与通信接口进行通信的通信配置,和/或数据传输模组32与显示设备4进行数据通信的通信配置,例如,在Wi-Fi通信环境下,数据传输模组32可以为Wi-Fi模组,数据传输模组32可以完成与显示设备4的Wi-Fi模组的通信链路的建立,显示设备4的Wi-Fi模组也可以是一个外置的设备。当显示设备4内置Wi-Fi模组时,建立与显示设备的通信链路为可以直接与显示设备4建立通信链路;当显示设备4通过外置的Wi-Fi模组通信时,可以先与该外置的Wi-Fi模组建立通信链路,该外置的Wi-Fi模组在显示设备4处于工作状态下时建立通信链路。The built-in power supply 33 of the data transmission device 3 supplies power to the data transmission module 32, and the data transmission module 32 is activated and performs a related communication configuration, for example, a communication configuration in which the data transmission module 32 communicates with the communication interface, and/or data transmission The communication configuration for the data communication between the module 32 and the display device 4. For example, in a Wi-Fi communication environment, the data transmission module 32 can be a Wi-Fi module, and the data transmission module 32 can complete the Wi-Fi connection with the display device 4. -The establishment of the communication link of the Fi module, the Wi-Fi module of the display device 4 can also be an external device. When the display device 4 has a built-in Wi-Fi module, a communication link with the display device can be established to directly establish a communication link with the display device 4; when the display device 4 communicates through an external Wi-Fi module, it can be A communication link is established with the external Wi-Fi module, and the external Wi-Fi module establishes a communication link when the display device 4 is in a working state.
由于在数据传输装置3连接电子设备1之前,数据传输模组32已经完成与显示设备4的通信链路的建立,当数据传输装置3连接电子设备1时,电子设备1待传输的数据直接通过数据传输装置3进行处理,发送至显示设备4端进行显示,避免数据传输装置3连接电子设备1时,再进行通信链路的配置,减少了用户使用数据传输装置3时的等待时间,可以实现即插即用,因此提高了数据传输装置响应速度和工作效率。Since the data transmission module 32 has completed the establishment of the communication link with the display device 4 before the data transmission device 3 is connected to the electronic device 1, when the data transmission device 3 is connected to the electronic device 1, the data to be transmitted by the electronic device 1 directly passes through the The data transmission device 3 performs processing and sends it to the display device 4 for display, avoiding the configuration of the communication link when the data transmission device 3 is connected to the electronic device 1, reducing the waiting time of the user when using the data transmission device 3, and realizing Plug and play, thus improving the response speed and work efficiency of the data transmission device.
基于上述实施例的步骤S401-S404,进一步提供一种可能的应用场景:用户拿起或移动了数据传输装置3,准备将数据传输装置3的通信接口31插入电子设备1的通信接口,例如电子设备1的USB接口或TYPE-C接口,本申请实施例对电子设备1的通信接口不做限定。需要说明的是,电子设备1的USB接口或TYPE-C接口一般会提供电源引脚,对插入其的电子设备提供电源。Based on the steps S401-S404 of the above embodiment, a possible application scenario is further provided: the user picks up or moves the data transmission device 3, and prepares to insert the communication interface 31 of the data transmission device 3 into the communication interface of the electronic device 1, such as an electronic The USB interface or the TYPE-C interface of the device 1, the embodiment of this application does not limit the communication interface of the electronic device 1. It should be noted that the USB interface or the TYPE-C interface of the electronic device 1 generally provides a power pin to provide power to the electronic device plugged into it.
步骤S405,外部电源检测模块37检测到数据传输装置3的通信接口31接入外部电源后,则外部电源检测模块37向与门电路D36的另外一个输入引脚发送用于指示可控开关36断开的第二断开信号。In step S405, after the external power detection module 37 detects that the communication interface 31 of the data transmission device 3 is connected to the external power supply, the external power detection module 37 sends a signal to another input pin of the AND gate circuit D36 to indicate that the controllable switch 36 is turned off. open second disconnect signal.
具体的,第二断开信号可以为低电平信号,结合附图,外部电源检测模块37向与门电路D36上面的二极管阴极发送用于指示可控开关36断开的低电平的VBS_CL信号。Specifically, the second disconnection signal may be a low-level signal. With reference to the drawings, the external power detection module 37 sends a low-level VBS_CL signal to the diode cathode above the AND gate circuit D36 to indicate that the controllable switch 36 is disconnected .
步骤S406,在上述预设时间内,外部电源检测模块37检测到数据传输装置3的通信接口31接入外部电源后,则外部电源检测模块37向MCU发送用于指示已接入外部电源的信号,MCU仍然保持向与门电路D36的其中一个输入引脚发送用于指示可控开关36导通的第一导通信号。可以理解的是,此时,MCU仍继续向与门电路D36的其中一个输入引脚发送用于指示可控开关36导通的第一导通信号。Step S406, within the above preset time, after the external power detection module 37 detects that the communication interface 31 of the data transmission device 3 is connected to an external power supply, the external power detection module 37 sends a signal to the MCU for indicating that the external power supply has been connected , the MCU still keeps sending the first turn-on signal for instructing the controllable switch 36 to turn on to one of the input pins of the AND gate circuit D36. It can be understood that, at this time, the MCU still continues to send the first turn-on signal for instructing the controllable switch 36 to be turned on to one of the input pins of the AND gate circuit D36.
需要说明的是,上述预设时间为在MCU确定数据传输装置3被移动后,MCU的计时器开始进行计时的预设时间。具体的,如图21所示,当通信接口31接入了外部电源,VBUS为高电平,此时外部电源检测模块37向MCU的MCU_DET管脚传输的同样也为高电平,这个高电平信号看作是指示通信接口31接入了外部电源的指示信号,使得MCU可以根据该高电平的指示信号确定通信接口31连接外部电源;当通信接口31没有连接外部电源时,VBUS为低电平,此时外部电源检测模块37向MCU的MCU_DET管脚传输的同样也为低电平(MCU_DET管脚通过电阻R101和电阻R84接地),这个低电平信号看作是指示通信接口31没有接入外部电源的指示信号,使得MCU可以根据该低电平的指示信号确定通信接口31没有连接外部电源。It should be noted that the above preset time is the preset time that the timer of the MCU starts to count after the MCU determines that the data transmission device 3 is moved. Specifically, as shown in FIG. 21 , when the communication interface 31 is connected to an external power supply and VBUS is at a high level, the external power supply detection module 37 transmits a high level to the MCU_DET pin of the MCU as well. The level signal is regarded as an indication signal indicating that the communication interface 31 is connected to an external power supply, so that the MCU can determine that the communication interface 31 is connected to an external power supply according to the high-level indication signal; when the communication interface 31 is not connected to an external power supply, VBUS is low At this time, the external power detection module 37 transmits the same low level to the MCU_DET pin of the MCU (the MCU_DET pin is grounded through the resistor R101 and the resistor R84), and this low level signal is regarded as indicating that the communication interface 31 has no The indication signal of connecting to the external power source enables the MCU to determine that the communication interface 31 is not connected to the external power source according to the low-level indication signal.
在上述预设时间内,MCU根据外部电源检测模块37发送的高电平信号确定通信接口31接入了外部电源,则MCU终止所述预设时间的计时,同时,MCU仍保持向与门电路D36的其中一个输入引脚发送用于指示可控开关36导通的信号,此时“MCU_CL”信号仍然为高电平信号。During the above preset time, the MCU determines that the communication interface 31 is connected to the external power supply according to the high-level signal sent by the external power supply detection module 37, then the MCU stops the timing of the preset time, and at the same time, the MCU still keeps the AND gate circuit. One of the input pins of D36 sends a signal for instructing the controllable switch 36 to be turned on, and the "MCU_CL" signal is still a high-level signal at this time.
步骤S407,与门电路D36根据第一导通信号和第二断开信号,向可控开关36发送控制信号,使得可控开关36断开。In step S407, the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the first turn-on signal and the second turn-off signal, so that the controllable switch 36 is turned off.
具体的如图15所示,与门电路D36两个输入引脚的第二断开信号和第一导通信号分别为VBS_CL信号和MCU_CL信号,“VBS_CL”信号为低电平信号,“MCU_CL”信号仍然为高电平信号,与门电路D36上面的二极管导通而下面的二极管截止,与门电路D36输出低电平信号,该低电平信号通过电阻RM11控制三极管QM3截止,内部电源VBAT通过电阻RM7和RM9使得场效应晶体管Q4栅极G的信号为高电平信号,场效应晶体管Q4断开,源极S和漏极D之间断开。Specifically, as shown in Figure 15, the second disconnection signal and the first turn-on signal of the two input pins of the AND gate circuit D36 are the VBS_CL signal and the MCU_CL signal respectively, the "VBS_CL" signal is a low level signal, and the "MCU_CL" signal The signal is still a high-level signal, the diode above the AND gate circuit D36 is turned on and the diode below is turned off, and the AND gate circuit D36 outputs a low-level signal, the low-level signal controls the transistor QM3 to be cut off through the resistor RM11, and the internal power supply VBAT passes through. The resistors RM7 and RM9 make the signal of the gate G of the field effect transistor Q4 a high level signal, the field effect transistor Q4 is turned off, and the source S and the drain D are disconnected.
由于作为可控开关36的场效应晶体管Q4断开,电子设备1的电源不能经过“通信接口31-可控开关36-电池332”的路径直接给电池332充电,可避免对电池332造成损坏。Since the field effect transistor Q4 as the controllable switch 36 is turned off, the power supply of the electronic device 1 cannot directly charge the battery 332 through the path of “communication interface 31-controllable switch 36-battery 332”, which can avoid damage to the battery 332.
基于上述实施例的步骤S405-S407,进一步提供一种可能的应用场景:在MCU确定数据传输装置3被移动后的预设时间(例如60秒)内,用户将数据传输装置3和电子设备1连接。Based on steps S405-S407 of the above-mentioned embodiment, a possible application scenario is further provided: within a preset time (for example, 60 seconds) after the MCU determines that the data transmission device 3 is moved, the user connects the data transmission device 3 to the electronic device 1. connect.
步骤S408,外部电源检测模块37检测到数据传输装置3的通信接口31和外部电源断开,外部电源检测模块37向与门电路D36的另外一个输入引脚发送用于指示可控开关36导通的第二导通信号,外部电源检测模块37向MCU发送用于指示通信接口31未接入外部电源的信号,该信号可以为低电平信号。In step S408, the external power supply detection module 37 detects that the communication interface 31 of the data transmission device 3 is disconnected from the external power supply, and the external power supply detection module 37 sends another input pin of the AND gate circuit D36 to instruct the controllable switch 36 to be turned on. The second turn-on signal of the external power source detection module 37 sends to the MCU a signal indicating that the communication interface 31 is not connected to the external power source, and the signal may be a low-level signal.
上述的步骤S408,一种可能的应用场景是:用户将数据传输装置3和电子设备1连接后,用户又将数据传输装置3从电子设备1中拨出来。In the above step S408, a possible application scenario is: after the user connects the data transmission device 3 with the electronic device 1, the user dials the data transmission device 3 out of the electronic device 1 again.
步骤S409,MCU接收到外部电源检测模块37发送的用于指示通信接口31未接入外部电源的信号后,MCU的计时器开始根据预设时间(例如60秒)启动计时。In step S409, after the MCU receives the signal sent by the external power detection module 37 to indicate that the communication interface 31 is not connected to the external power, the timer of the MCU starts timing according to a preset time (for example, 60 seconds).
在本实施例中,为了满足在用户间轮流使用同一个数据传输装置3进行数据传输的需求,保证下一个用户也能实现数据传输装置3的即插即用,需要对MCU进行相应的设置,具体的,可以在MCU存储一个预设时间(例如60秒)。该预设的时间在本实施例中可以是60秒,在其他实施例中可以是其他时间,例如50秒,该时间可以根据具体的应用场景设置。In this embodiment, in order to meet the requirement of using the same data transmission device 3 for data transmission among users in turn, and to ensure that the next user can also realize the plug-and-play of the data transmission device 3, the MCU needs to be set accordingly. Specifically, a preset time (for example, 60 seconds) may be stored in the MCU. The preset time may be 60 seconds in this embodiment, and may be other time, such as 50 seconds, in other embodiments, and the time may be set according to a specific application scenario.
步骤S410,在该预设时间内,MCU仍然保持向与门电路D36的其中一个输入引脚发送用于指示可控开关36导通的第一导通信号。Step S410, within the preset time, the MCU still keeps sending a first turn-on signal for instructing the controllable switch 36 to turn on to one of the input pins of the AND gate circuit D36.
具体的如图15所示,MCU的STM32_1108_IO管脚向与门电路D36的其中一个输入引脚(与门电路D36下面的二极管阴极)发送低电平信号,该低电平信号使得三极管QM2断开,从而得到高电平的“MCU_CL”信号(与门电路D36下面的二极管阴极通过电阻RM6连接内部电源提供的+3V3_SB高电平)。Specifically, as shown in Figure 15, the STM32_1108_IO pin of the MCU sends a low-level signal to one of the input pins of the AND gate circuit D36 (the diode cathode below the AND gate circuit D36), and the low-level signal makes the transistor QM2 disconnected , so as to obtain a high-level "MCU_CL" signal (the cathode of the diode under the AND gate circuit D36 is connected to the +3V3_SB high level provided by the internal power supply through the resistor RM6).
步骤S411,与门电路D36根据第一导通信号和第二导通信号,向可控开关36发送控制信号使得可控开关36闭合。In step S411, the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the first conduction signal and the second conduction signal, so that the controllable switch 36 is closed.
具体的,可控开关36闭合后,数据传输装置3的内部电源向数据传输模组32供电,使得数据传输模组32与显示设备4之间的通信链路继续保持连通状态,保证数据传输装置3即使在从电子设备1拨出后,在该预设时间内,用户将数据传输装置3从电子设备1中拨出来后,在该预设时间内又插入了下一电子设备时,也能快速的对电子设备的数据进行快速传输,实现数据传输装置3在多电子设备的交替切换数据传输过程中的即插即用。Specifically, after the controllable switch 36 is closed, the internal power supply of the data transmission device 3 supplies power to the data transmission module 32, so that the communication link between the data transmission module 32 and the display device 4 continues to be in a connected state, ensuring that the data transmission device 3 Even after dialing out from the electronic device 1, within the preset time, after the user dials out the data transmission device 3 from the electronic device 1, and inserts the next electronic device within the preset time, the The data of the electronic equipment is rapidly transmitted, so as to realize the plug-and-play of the data transmission device 3 in the alternate switching data transmission process of multiple electronic equipments.
上述的步骤S410-S411,一种可能的应用场景是:用户将数据传输装置3从电子设备1中拨出后,在该预设时间内又插入了下一电子设备1(可能是被拔出的电子设备1,也可能是另外一台电子设备),在这个切换的时间段内,数据传输模组32与显示设备4之间的通信链路继续保持连通状态。For the above steps S410-S411, a possible application scenario is: after the user dials out the data transmission device 3 from the electronic device 1, the next electronic device 1 (possibly pulled out) is inserted again within the preset time. The electronic device 1 may also be another electronic device), during this switching time period, the communication link between the data transmission module 32 and the display device 4 continues to maintain a connected state.
进一步的,在一些实施例中,在此步骤S411之后,又可以回到步骤S404之后的循环,检测在预设时间内是否有外部电源的接入。Further, in some embodiments, after this step S411, the loop after step S404 may be returned to detect whether an external power source is connected within a preset time.
具体的,当在计时器预设时间范围内,外部电源检测模块37检测到数据传输装置3的通信接口31和外部电源连接时,外部电源检测模块37向与门电路D36发送一个低电平信号;与门电路D36根据该低电平信号,及根据MCU发送的高电平信号,向可控开关36发送使得可控开关36断开的信号。Specifically, when the external power detection module 37 detects that the communication interface 31 of the data transmission device 3 is connected to the external power supply within the preset time range of the timer, the external power detection module 37 sends a low-level signal to the AND gate circuit D36 The AND gate circuit D36 sends a signal to the controllable switch 36 to disconnect the controllable switch 36 according to the low-level signal and the high-level signal sent by the MCU.
步骤S412,用户将数据传输装置3从电子设备1中拨出后,启动预设时间的计时,在该预设时间内,如果外部电源检测模块37没有检测到数据传输装置3的通信接口31和外部电源连接,则在MCU的计时器根据预设的时间计时完毕后,MCU向与门电路D36的其中一个输入引脚发送用于指示可控开关36断开的第一断开信号。In step S412, after the user dials the data transmission device 3 out of the electronic device 1, the timing of the preset time is started, and within the preset time, if the external power detection module 37 does not detect the communication interface 31 and If the external power supply is connected, after the timer of the MCU finishes timing according to the preset time, the MCU sends a first disconnection signal to one of the input pins of the AND gate circuit D36 for instructing the controllable switch 36 to be disconnected.
在本实施例中,与门电路D36收到的第一断开信号可以为低电平信号,具体的如图15所示,MCU的STM32_1108_IO管脚向与门电路D36的其中一个输入引脚(与门电路D36下面的二极管阴极)发送高电平信号,该高电平信号使得三极管QM2导通,从而得到低电平的“MCU_CL”信号(与门电路D36下面的二极管阴极通过三极管QM2接地)。In this embodiment, the first disconnection signal received by the AND gate circuit D36 may be a low-level signal. Specifically, as shown in FIG. 15 , the STM32_1108_IO pin of the MCU is connected to one of the input pins of the AND gate circuit D36 ( The diode cathode under the AND gate circuit D36) sends a high-level signal, which makes the transistor QM2 conduct, thereby obtaining a low-level "MCU_CL" signal (the diode cathode under the AND gate circuit D36 is grounded through the transistor QM2) .
步骤S413,与门电路D36根据第二导通信号和第一断开信号,向可控开关36发送控制信号使得可控开关36断开。Step S413, the AND gate circuit D36 sends a control signal to the controllable switch 36 according to the second turn-on signal and the first turn-off signal, so that the controllable switch 36 is turned off.
具体的如图15所示,与门电路D36两个输入引脚的第二导通信号和第一断开信号分别为VBS_CL信号和MCU_CL信号,“VBS_CL”信号为高电平信号,“MCU_CL”信号为低电平信号,与门电路D36下面的二极管导通而上面的二极管截止,与门电路D36输出低电平信号,该低电平信号通过电阻RM11控制三极管QM3截止,内部电源VBAT通过电阻RM7和RM9使得场效应晶体管Q4栅极G的信号为高电平信号,场效应晶体管Q4断开,源极S和漏极D之间断开,数据传输装置3的内部电源和数据传输模组32之间的供电连接被断开。Specifically, as shown in Figure 15, the second on-signal and the first off-signal of the two input pins of the AND gate circuit D36 are the VBS_CL signal and the MCU_CL signal, respectively, the "VBS_CL" signal is a high-level signal, and the "MCU_CL" signal The signal is a low level signal, the diode below the AND gate circuit D36 is turned on and the diode above it is turned off, the AND gate circuit D36 outputs a low level signal, the low level signal controls the transistor QM3 to be cut off through the resistor RM11, and the internal power supply VBAT passes through the resistor. RM7 and RM9 make the signal of the gate G of the field effect transistor Q4 a high level signal, the field effect transistor Q4 is disconnected, the source S and the drain D are disconnected, the internal power supply of the data transmission device 3 and the data transmission module 32 The power supply connection between is disconnected.
上述的步骤S412-S413,一种可能的应用场景是:用户将数据传输装置3从电子设备1中拨出来后,在该预设时间内未插入了下一电子设备1(可能是用户已经完成数据传输而不再需要使用数据传输装置3),在这种场景下,可以认为在该预设时间内,若数据传输装置3没有连接外部电源,则认为用户已经完成本次的数据传输需求,则断开内部供电,予以节省数据传输装置3的内部电源的电能。For the above steps S412-S413, a possible application scenario is: after the user dials out the data transmission device 3 from the electronic device 1, the next electronic device 1 is not inserted within the preset time (maybe the user has completed the Data transmission does not need to use the data transmission device 3). In this scenario, it can be considered that within the preset time, if the data transmission device 3 is not connected to an external power supply, it is considered that the user has completed this data transmission requirement, Then, the internal power supply is disconnected to save the power of the internal power supply of the data transmission device 3 .
可选地,在上述步骤S401-S413的过程中,MCU可以在数据传输装置3的电源的供电下处于第二功耗工作状态。因此可以理解的是,在S401之前,若MCU没有接收到检测数据或中断信号之前将一直保 持第一功耗工作状态,而在S401中接收到检测数据或者中断信号后,将切换到第二功耗工作状态。进一步的,第一功耗工作状态可以为低功耗工作状态,第二功耗工作状态可以为高功耗工作状态。Optionally, in the process of the above steps S401 - S413 , the MCU may be in the second power consumption working state under the power supply of the power supply of the data transmission device 3 . Therefore, it can be understood that before S401, if the MCU does not receive the detection data or the interrupt signal, it will keep the first power consumption working state, and after receiving the detection data or the interrupt signal in S401, it will switch to the second function. Consumption work status. Further, the first power consumption working state may be a low power consumption working state, and the second power consumption working state may be a high power consumption working state.
此外,本申请如图4-图25所示的各实施例中,数据传输装置3所提供的电源33以设置在数据传输装置3内部作为示例,在其他可能的实现方式中,本申请各实施例中所述的数据传输装置3还可以通过外接电源的方式,在没有接入电子设备1时,通过外接电源供电。In addition, in the embodiments shown in FIG. 4 to FIG. 25 of the present application, the power supply 33 provided by the data transmission device 3 is set inside the data transmission device 3 as an example. In other possible implementations, each implementation of the present application The data transmission device 3 described in the example can also be powered by an external power supply when the electronic device 1 is not connected.
例如,图26为本申请一实施例提供的数据传输装置的应用场景框架示意图,其中,数据传输装置3中设置有电源接口39,用户在使用该数据传输装置3时,在将电源接口39与外部的电源5连接之后,可以由外部的电源5向数据传输装置3供电,此时,电源5通过电源接口39所实现的供电功能,与本申请如图4-图25所示的各实施例中电源33实现的供电功能相同,不再赘述。For example, FIG. 26 is a schematic diagram of an application scenario framework of a data transmission device provided by an embodiment of the present application, wherein the data transmission device 3 is provided with a power interface 39 . After the external power supply 5 is connected, the data transmission device 3 can be powered by the external power supply 5. At this time, the power supply function realized by the power supply 5 through the power supply interface 39 is different from the embodiments shown in FIGS. 4 to 25 of the present application. The power supply function implemented by the middle power supply 33 is the same, and will not be repeated here.
上述各实施例的数据传输方法,可以由MCU或SoC等集成电路来执行,该MCU或SoC等集成电路包括一个或多个处理器、存储器和程序,其中该程序被存储在该存储器中并被配置为由该一个或多个处理器执行,该程序被配置用于执行上述实施例的数据传输方法。The data transmission methods of the above-mentioned embodiments can be executed by an integrated circuit such as an MCU or an SoC, and the integrated circuit such as the MCU or the SoC includes one or more processors, a memory, and a program, wherein the program is stored in the memory and stored in the memory. Configured to be executed by the one or more processors, the program is configured to execute the data transmission methods of the above-described embodiments.
例如,图27为本申请提供的数据传输方法一实施例的流程示意图,如图27所示的实施例中,示出了一种数据传输装置通过软件方式实现本申请提供的数据传输方法的示意图,可应用于如图1所示的场景中,执行主体可以是数据传输装置、或者更为具体的是数据传输装置中的处理器,例如数据传输装置中的CPU、GPU、SoC或者MCU等。下面以执行主体是数据传输装置作为示例性的说明,具体地,如图27所示的数据传输方法包括:For example, FIG. 27 is a schematic flowchart of an embodiment of a data transmission method provided by the present application. In the embodiment shown in FIG. 27 , a schematic diagram of a data transmission apparatus implementing the data transmission method provided by the present application through software is shown. , which can be applied to the scenario shown in FIG. 1 , the execution subject may be a data transmission device, or more specifically a processor in the data transmission device, such as CPU, GPU, SoC or MCU in the data transmission device. In the following, the execution subject is a data transmission device as an exemplary description. Specifically, the data transmission method shown in FIG. 27 includes:
S501:接收振动传感器的检测数据或中断信号。S501: Receive detection data or an interruption signal of the vibration sensor.
S502:确定振动传感器自身的加速度值超过加速度阈值时,或者接收到中断信号时,控制数据传输装置的电源向数据传输模组供电。S502: When it is determined that the acceleration value of the vibration sensor itself exceeds the acceleration threshold, or when an interruption signal is received, control the power supply of the data transmission device to supply power to the data transmission module.
具体地,本实施例提供的方法可应用于数据传输装置中,在数据传输装置中设置有振动传感器,电源以及数据传输模组;电源可用于向数据传输模组供电,数据传输模组可用于与显示设备进行数据通信。Specifically, the method provided in this embodiment can be applied to a data transmission device, where a vibration sensor, a power supply, and a data transmission module are provided; the power supply can be used to supply power to the data transmission module, and the data transmission module can be used for Data communication with the display device.
在一种具体的实现方式中,数据传输装置中设置的振动传感器用于根据数据传输装置的移动情况生成检测数据,检测数据包括振动传感器自身的加速度值,则当数据传输装置在S501接收振动传感器得到的检测数据后,在S502中可以确定检测数据中振动传感器自身的加速度值超过预设的加速度阈值时,控制数据传输装置的电源向数据传输模组供电。In a specific implementation, the vibration sensor set in the data transmission device is used to generate detection data according to the movement of the data transmission device, and the detection data includes the acceleration value of the vibration sensor itself, then when the data transmission device receives the vibration sensor in S501 After the detection data is obtained, it can be determined in S502 that when the acceleration value of the vibration sensor in the detection data exceeds the preset acceleration threshold, the power supply of the data transmission device is controlled to supply power to the data transmission module.
在另一种具体的实现方式中,振动传感器根据生成的检测数据中自身的加速度值超过预设的加速度阈值时,振动传感器发出中断信号,则当数据传输装置在S501接收到振动传感器发出的中断信号后,在S502中可以根据该中断信号控制数据传输装置的电源向数据传输模组供电。In another specific implementation manner, when the acceleration value of the vibration sensor exceeds a preset acceleration threshold according to the generated detection data, the vibration sensor sends an interruption signal, then when the data transmission device receives the interruption sent by the vibration sensor at S501 After the signal is received, in S502, the power supply of the data transmission device can be controlled to supply power to the data transmission module according to the interruption signal.
因此,本实施例提供的数据传输方法,能够让数据传输装置在根据振动传感器检测到数据传输装置移动后,才控制数据传输装置的电源向数据传输模组供电,使得数据传输装置在未被使用时,电源可以不向数据传输模组供电,而当用户移动数据传输装置后,可以控制电源向数据传输模组供电。使得执行本实施例方法的数据传输装置能够兼顾空间和效率,在数据传输装置中电源不需要过大容量和体积的情况下,还能够提高数据传输装置在数据传输时的响应速度和工作效率。Therefore, the data transmission method provided in this embodiment enables the data transmission device to control the power supply of the data transmission device to supply power to the data transmission module after the movement of the data transmission device is detected according to the vibration sensor, so that the data transmission device is not in use. When the power supply is used, the power supply may not supply power to the data transmission module, and when the user moves the data transmission device, the power supply can be controlled to supply power to the data transmission module. The data transmission device implementing the method of this embodiment can take into account both space and efficiency, and can also improve the response speed and work efficiency of the data transmission device during data transmission when the power supply in the data transmission device does not require excessive capacity and volume.
可选地,在S502之后还包括S503:确定电子设备接入数据传输装置的通信接口后,从通信接口接收媒体数据,并对媒体数据进行编码后,将编码后的媒体数据发送给显示设备。Optionally, after S502, S503 is further included: after determining that the electronic device is connected to the communication interface of the data transmission apparatus, receive media data from the communication interface, encode the media data, and send the encoded media data to the display device.
其中,当数据传输模组得到电源的供电并完成启动的相关配置后,即可可开始将从通信接口接收电子设备所发送的该电子设备的显示界面对应的媒体数据,并对媒体数据进行编码,发送给显示设备。从而提高了数据传输装置对用户通过通信接口连接的电子设备所发送的媒体数据的响应速度,带来一种“即插即显示”的用户体验,以提高数据传输模组的工作效率。Wherein, after the data transmission module receives the power supply from the power supply and completes the relevant configuration of startup, it can start to receive the media data corresponding to the display interface of the electronic device sent by the electronic device from the communication interface, and encode the media data, sent to the display device. Thereby, the response speed of the data transmission device to the media data sent by the electronic device connected by the user through the communication interface is improved, and a "plug and display" user experience is brought to improve the working efficiency of the data transmission module.
更为具体地,在S502中,数据传输装置还需要在确定振动传感器自身的加速度值超过预设的加速度阈值或接收到所述中断信号的同时,还需要确定满足通信接口没有外部电源接入时,才能够控制数据传输装置的电源向数据传输模组供电。而在S502之后,当数据传输装置确定通信接口有外部电源接入时,可以控制电源停止向数据传输模组供电。也就是说,数据传输装置可以控制电源只在外部电源没有接入时,可以向数据传输模组供电,而当通信接口连接其他电子设备的外部电源,则电源就可以不继续向数据传输模组供电,从而减少了电源的损耗。More specifically, in S502, the data transmission device also needs to determine that when the acceleration value of the vibration sensor itself exceeds the preset acceleration threshold or receives the interrupt signal, it also needs to determine that the communication interface has no external power supply. , in order to be able to control the power supply of the data transmission device to supply power to the data transmission module. After S502, when the data transmission device determines that the communication interface has access to an external power supply, it can control the power supply to stop supplying power to the data transmission module. That is to say, the data transmission device can control the power supply to supply power to the data transmission module only when the external power supply is not connected, and when the communication interface is connected to the external power supply of other electronic devices, the power supply can not continue to supply the data transmission module power supply, thereby reducing power loss.
可选地,在数据传输装置执行S502之后的第一预设时间内,若一直都没有外部电源接入通信接口,则数据传输装置可以在第一预设时间后控制电源停止向数据传输模组供电。具体地,数据传输装置设置第一预设时间的目的是保证了非数据传输装置用户对数据传输装置误触所产生的移动不会造成电源 持续向数据传输模组供电,减少了电源的损耗。Optionally, in the first preset time after the data transmission device executes S502, if there is no external power supply connected to the communication interface, the data transmission device can control the power supply to stop supplying the data transmission module after the first preset time. powered by. Specifically, the purpose of the data transmission device setting the first preset time is to ensure that the movement caused by the user of the non-data transmission device accidentally touching the data transmission device will not cause the power supply to continuously supply power to the data transmission module, reducing the loss of the power supply.
可选地,在数据传输装置执行S502之后,当数据传输装置确定外部电源接入了通信接口,并且又从通信接口脱离之后,则在脱离后的第二预设时间之内,如果没有外部电源接入通信接口,则在该第二预设时间内,数据传输装置保持控制电源向数据传输模组供电。相应地,若在第二预设时间内,如果没有外部电源接入通信接口,则在该第二预设时间后,数据传输装置控制电源停止向数据传输模组供电。如果没有外部电源接入通信接口,则在该第二预设时间内,数据传输装置保持控制电源向数据传输模组供电,使得用户将数据传输装置从一个电子设备切换到另一个电子设备时,数据传输模组在切换过程中能够保持工作状态,而不会由于数据传输装置被拔出后失去外部电源而立即掉电,从而在数据传输装置被用户拔出一个电子设备、并插入下一个电子设备时能够迅速进行数据传输,提高工作效率。Optionally, after the data transmission apparatus executes S502, when the data transmission apparatus determines that the external power supply is connected to the communication interface and is disconnected from the communication interface, within the second preset time after the disconnection, if there is no external power supply When the communication interface is connected, the data transmission device keeps the control power supply to supply power to the data transmission module within the second preset time. Correspondingly, if no external power supply is connected to the communication interface within the second preset time, the data transmission device controls the power supply to stop supplying power to the data transmission module after the second preset time. If no external power supply is connected to the communication interface, the data transmission device keeps controlling the power supply to supply power to the data transmission module during the second preset time, so that when the user switches the data transmission device from one electronic device to another electronic device, The data transmission module can maintain the working state during the switching process, and will not be powered off immediately due to the loss of external power after the data transmission device is pulled out. The device can quickly transfer data and improve work efficiency.
可选地,在上述实施例中,数据传输装置在将编码后的媒体数据发送给显示设备的同时,还将数据传输指令发送给显示设备。该数据传输指令可用于指示显示设备对接收到的编码后的媒体数据进行处理并显示。对应地,数据传输装置还可以向显示设备发送停止传输指令,用于指示显示设备不继续显示所接收到的编码后的媒体数据。Optionally, in the above embodiment, the data transmission apparatus also sends a data transmission instruction to the display device while sending the encoded media data to the display device. The data transmission instruction can be used to instruct the display device to process and display the received encoded media data. Correspondingly, the data transmission apparatus may also send a stop transmission instruction to the display device, which is used to instruct the display device not to continue to display the received encoded media data.
在一种场景中,数据传输装置可以在接收到用户输入的开始指令后,将编码后的媒体数据和数据传输指令发送给显示设备;或者,在接收到用户输入的停止指令后,停止将编码后的媒体数据发送给显示设备,并向显示设备发送停止传输指令。在另一种场景中,当数据传输装置检测到外部电源从通信接口脱离,则停止将编码后的媒体数据发送给显示设备,并向显示设备发送停止传输指令。In one scenario, the data transmission apparatus may send the encoded media data and the data transmission instruction to the display device after receiving the start instruction input by the user; or, after receiving the stop instruction input by the user, stop encoding The latter media data is sent to the display device, and a stop transmission instruction is sent to the display device. In another scenario, when the data transmission apparatus detects that the external power supply is disconnected from the communication interface, it stops sending the encoded media data to the display device, and sends a stop transmission instruction to the display device.
具体地,通过本实施例的数据传输方法,能够使得数据传输装置根据用户的停止指令、或者根据外部电源检测模块检测到外部电源从通信接口脱离后,数据传输模组随即停止将传屏指令发送给显示设备,使得显示设备不会继续显示电子设备的显示界面,从而提高了数据传输装置对用户断开连接指令、动作的响应速度,提高了数据传输装置的响应速度和投屏效率,还能够一定程度上保护用户的隐私,使得用户在误将隐私信息投屏时能及时阻止显示,进而也提高了数据传输装置的用户体验。Specifically, through the data transmission method in this embodiment, the data transmission module can stop sending the screen sharing command immediately after the data transmission device detects that the external power supply is disconnected from the communication interface according to the user's stop instruction or according to the external power supply detection module. For the display device, the display device will not continue to display the display interface of the electronic device, thereby improving the response speed of the data transmission device to the user's disconnection instructions and actions, and improving the response speed and screen projection efficiency of the data transmission device. The privacy of the user is protected to a certain extent, so that the user can prevent the display of private information in time when the user mistakenly projects the private information to the screen, thereby improving the user experience of the data transmission device.
又例如,图28为本申请提供的数据传输方法一实施例的流程示意图,如图28所示的实施例中,示出了另一种数据传输装置通过软件方式实现本申请提供的数据传输方法的示意图,可应用于如图1所示的场景中,执行主体可以是数据传输装置、或者是数据传输装置中的处理器等。具体地,如图28所示的数据传输方法包括:For another example, FIG. 28 is a schematic flowchart of an embodiment of the data transmission method provided by the present application. In the embodiment shown in FIG. 28 , another data transmission device is shown to implement the data transmission method provided by the present application through software. The schematic diagram can be applied to the scenario shown in FIG. 1 , and the execution subject may be a data transmission device, or a processor in the data transmission device, or the like. Specifically, the data transmission method shown in Figure 28 includes:
S601:根据传感器发送的信息,启动数据传输装置的内置电源向数据传输模组供电。S601: According to the information sent by the sensor, start the built-in power supply of the data transmission device to supply power to the data transmission module.
具体地,本实施例提供的方法可应用于数据传输装置,在数据传输装置中设置有传感器,该传感器用于检测数据传输装置是否被移动。该传感器可以是振动检测器。当传感器检测到数据传输装置被移动(例如,振动检测器检测数据传输装置的加速度超过了预设加速度阈值),用户可能将要使用数据传输装置进行数据传输则传感器可以发出信息,数据传输装置在接收到传感器发送的信息后,启动设置在数据传输装置内部的内置电源向数据传输模组供电。Specifically, the method provided in this embodiment can be applied to a data transmission device, and a sensor is provided in the data transmission device, and the sensor is used to detect whether the data transmission device is moved. The sensor may be a vibration detector. When the sensor detects that the data transmission device is moved (for example, the vibration detector detects that the acceleration of the data transmission device exceeds a preset acceleration threshold), the user may want to use the data transmission device for data transmission, and the sensor can send a message that the data transmission device is receiving After receiving the information sent by the sensor, the built-in power supply set inside the data transmission device is activated to supply power to the data transmission module.
S602:建立与显示设备的通信链路。S602: Establish a communication link with the display device.
具体地,在S601,内置电源向数据传输模组供电之后,数据传输模组可以进行启动的相关配置,该相关配置至少包括数据传输模组与显示设备之间进行通信的通信配置,并建立数据传输模组与显示设备之间的通信链路。进一步的,当数据传输装置接入电子设备且该通信链路建立好后,数据传输装置接收来自于电子设备的数据,并对数据进行编码,将编码后的数据通过已建立的通信链路发送给显示设备。可选地,该数据传输模组可以是Wi-Fi模组,则该通信链路可以是Wi-Fi通信链路。Specifically, in S601, after the built-in power supply supplies power to the data transmission module, the data transmission module can perform a related configuration for startup, and the related configuration at least includes a communication configuration for communication between the data transmission module and the display device, and establishes a data transmission module. The communication link between the transmission module and the display device. Further, when the data transmission device is connected to the electronic device and the communication link is established, the data transmission device receives the data from the electronic device, encodes the data, and sends the encoded data through the established communication link. to the display device. Optionally, the data transmission module may be a Wi-Fi module, and the communication link may be a Wi-Fi communication link.
S603:检测到与电子设备连接,停止数据传输装置的内置电源向数据传输模组供电。S603: It is detected that the connection with the electronic device is detected, and the built-in power supply of the data transmission device is stopped to supply power to the data transmission module.
具体地,数据传输装置检测到数据传输装置与电子设备连接,此时电子设备的电源可以向数据传输装置提供电能,可以控制数据传输装置内部的电源停止向数据传输模组供电,避免电子设备的电源直接对数据传输装置内部的电源进行充电。Specifically, when the data transmission device detects that the data transmission device is connected to the electronic device, the power supply of the electronic device can provide power to the data transmission device, and can control the power supply inside the data transmission device to stop supplying power to the data transmission module, so as to prevent the electronic device from being damaged. The power supply directly charges the power supply inside the data transmission device.
S604:接收来自于电子设备的数据,并将数据通过已建立的通信链路发送至显示设备。S604: Receive data from the electronic device, and send the data to the display device through the established communication link.
在一些实施例中,在检测到与电子设备连接之后,数据传输装置可以接收来自于电子设备的该电子设备的显示界面对应的数据,并对数据进行编码,将编码后的数据通过已建立的通信链路发送给显示设备。可选地,在检测到与电子设备连接之后,数据传输装置可以同时执行S603和S604,或者对其先后顺序不作限定。In some embodiments, after detecting the connection with the electronic device, the data transmission apparatus may receive data corresponding to the display interface of the electronic device from the electronic device, encode the data, and pass the encoded data through the established The communication link is sent to the display device. Optionally, after detecting the connection with the electronic device, the data transmission apparatus may execute S603 and S604 at the same time, or the sequence of the steps is not limited.
进一步的,在一些实施例中,在如图28所示的S604之后,当数据传输装置检测到与连接的电子设备断开,则数据传输装置启动内置电源向数据传输模组供电,同时,还保持所建立的数据传输装置 与显示设备之间的通信链路。而在预设时间内,若没有检测到数据传输装置与任何电子设备连接,则在该预设时间后停止数据传输装置内置电源继续向数据传输模组供电,则数据传输模组失去供电后,也将断开数据传输装置与显示设备之间所建立的通信链路。因此,本实施例能够在用户将数据传输装置从一个电子设备切换到另一个电子设备时,数据传输装置在切换过程中及时切换到内置电源供电,实现数据传输装置从外部电源供电向内置电源供电的无缝切换,使得数据传输装置能够保持工作状态,保持所建立的通信链路,不会由于数据传输装置被拔出后,数据传输装置失去外部电源而立即掉电,从而在数据传输装置被用户拔出一个电子设备、并插入下一个电子设备时能够迅速进行数据传输,实现数据传输装置在多电子设备的交替切换数据传输过程中的即插即用,提高工作效率。Further, in some embodiments, after S604 as shown in FIG. 28 , when the data transmission device detects that it is disconnected from the connected electronic device, the data transmission device starts the built-in power supply to supply power to the data transmission module, and at the same time, also The established communication link between the data transmission device and the display device is maintained. And within the preset time, if it is not detected that the data transmission device is connected to any electronic equipment, after the preset time, the built-in power supply of the data transmission device will be stopped to continue supplying power to the data transmission module. The communication link established between the data transmission device and the display device will also be disconnected. Therefore, in this embodiment, when the user switches the data transmission device from one electronic device to another electronic device, the data transmission device can be switched to the built-in power supply in time during the switching process, so that the data transmission device can be powered from the external power supply to the built-in power supply. The seamless switching enables the data transmission device to maintain the working state and maintain the established communication link. When the user pulls out one electronic device and inserts the next electronic device, data transmission can be performed quickly, realizing the plug-and-play of the data transmission device in the alternate switching data transmission process of multiple electronic devices, and improving work efficiency.
而在另一些实施例中,在如图28所示的S604之后,当数据传输装置检测到与连接的电子设备断开,由于数据传输装置失去电子设备的电源供电,因此数据传输装置掉电,数据传输装置与显示设备之间的通信链路断开,然后数据传输装置又启动数据传输装置的内置电源向数据传输模组供电,数据传输模组在接收到数据传输装置的内置电源的供电后,重新进行数据传输装置与显示设备的通信配置,并重新建立数据传输装置与显示设备之间的通信链路。由于数据传输装置在插入下一个电子设备前就开始进行与显示设备的通信配置,使得在数据传输装置在插入下一个电子设备时能够快速进行数据传输,减少甚至免去用户的等待时间,实现数据传输装置在多电子设备的交替切换数据传输过程中的即插即用,提高了数据传输装置进行数据传输时的响应速度和工作效率。In other embodiments, after S604 as shown in FIG. 28 , when the data transmission device detects that it is disconnected from the connected electronic device, because the data transmission device loses the power supply of the electronic device, the data transmission device is powered down, The communication link between the data transmission device and the display device is disconnected, and then the data transmission device starts the built-in power supply of the data transmission device to supply power to the data transmission module. After the data transmission module receives the power supply from the built-in power supply of the data transmission device , reconfigure the communication between the data transmission device and the display device, and re-establish the communication link between the data transmission device and the display device. Since the data transmission device starts to configure the communication with the display device before inserting the next electronic device, the data transmission device can quickly perform data transmission when the next electronic device is inserted, reducing or even eliminating the user's waiting time and realizing data transmission. The plug-and-play of the transmission device during the data transmission process of alternate switching of multiple electronic devices improves the response speed and work efficiency of the data transmission device during data transmission.
在上述实施例的基础上,本发明实施例再提供一种改进方式,进一步的提升数据传输装置3的数据接收、处理速度及效率。具体的,当电子设备1与数据传输装置3之间的连接线为TypeC连接线时,数据传输装置3需要采用TypeC接口,TypeC接口能够直接获取外接电脑输出的DP协议格式的媒体数据,在DP(DisplayPort)的工作模式下,外接电脑在无需安装特定驱动的情况下,就可以将其缓存中的媒体数据发送给数据传输装置,该媒体数据包含视频数据或音频数据的媒体数据。数据传输装置通过TypeC接口自动获取外接电脑的屏幕上展示的媒体数据并发送到显示设备,实现外接电脑不用安装驱动程序就可以通过数据传输装置将外接电脑的屏幕上展示的媒体数据发送至显示设备显示,减少了安装驱动程序的时间,进一步提升了数据传输装置3的数据接收、处理速度及效率。On the basis of the above embodiment, the embodiment of the present invention further provides an improved way to further improve the data reception, processing speed and efficiency of the data transmission device 3 . Specifically, when the connection line between the electronic device 1 and the data transmission device 3 is a TypeC connection line, the data transmission device 3 needs to use a TypeC interface, and the TypeC interface can directly obtain the media data in the DP protocol format output by the external computer. In the working mode of (DisplayPort), the external computer can send the media data in its cache to the data transmission device without installing a specific driver, and the media data includes the media data of video data or audio data. The data transmission device automatically obtains the media data displayed on the screen of the external computer through the TypeC interface and sends it to the display device, so that the external computer can send the media data displayed on the screen of the external computer to the display device through the data transmission device without installing a driver. It is shown that the time for installing the driver program is reduced, and the data receiving and processing speed and efficiency of the data transmission device 3 are further improved.
图29是本发明实施例提供的数据传输装置3的另一种实施方式的结构示意图,对数据传输装置设计一个包括图29所示的TypeC接口21,TypeC接口21中的差分信号传输引脚为媒体数据接收口,该媒体数据接收口用于接收从外接电脑传输过来的媒体数据,该媒体数据可以为外接电脑在屏幕上显示或播放的音视频数据。外接电脑的视频信号接口输出的未压缩的第一音视频数据为DP音视频数据,该视频信号接口可以为TypeC接口。数据传输装置包括上述提及的TypeC接口21,即USB-Type-C,以下将简称为TypeC接口21,USB-Type-C是一种通用串行总线(USB)的硬件接口规范,其具有更快的传输速度(最高10Gbps)以及更强悍的电力传输(最高100W),并且兼容USB2.0、USB3.0以及DP(DisplayPort)。TypeC接口21共有24个引脚,包括两行相同功能的引脚,参阅图30,图30中的引脚A1至A12为其中一行,引脚B1至B12为另一行,支持正插或反插。TypeC接口21包括两对电源引脚、四对差分引脚以及用于插入配对时候用于配对通讯的CC脚,两对电源引脚详见图3中的A9、B4、B9、A4,四对差分引脚详见图3中的A11、B2、A10、B3、A4、B10、A2、B11,CC脚详见图3中的A5。其中,每一组引脚中的TX+、TX-、RX+和RX-是差分信号传输引脚,每一组差分信号传输引脚均支持工作在USB模式或者DP(DisplayPort)模式。当差分信号传输引脚对工作在USB模式下时,该信号传输引脚对传输USB3.0信号;当差分信号传输引脚对工作在DP模式下时,该信号传输引脚对作为DP(DisplayPort)接口使用。FIG. 29 is a schematic structural diagram of another implementation manner of the data transmission device 3 provided by the embodiment of the present invention. The data transmission device is designed to include the TypeC interface 21 shown in FIG. 29 , and the differential signal transmission pins in the TypeC interface 21 are The media data receiving port is used to receive the media data transmitted from the external computer, and the media data can be the audio and video data displayed or played by the external computer on the screen. The uncompressed first audio and video data output by the video signal interface of the external computer is DP audio and video data, and the video signal interface may be a TypeC interface. The data transmission device includes the above-mentioned TypeC interface 21, namely USB-Type-C, hereinafter referred to as the TypeC interface 21, USB-Type-C is a hardware interface specification of a universal serial bus (USB), which has more Fast transmission speed (up to 10Gbps) and more powerful power transmission (up to 100W), and compatible with USB2.0, USB3.0 and DP (DisplayPort). Type C interface 21 has a total of 24 pins, including two rows of pins with the same function. See Figure 30. Pins A1 to A12 in Figure 30 are one row, and pins B1 to B12 are the other row, supporting positive or negative insertion. . The Type C interface 21 includes two pairs of power pins, four pairs of differential pins, and CC pins used for pairing communication when inserted and paired. The two pairs of power pins refer to A9, B4, B9, and A4 in Figure 3. The four pairs The differential pins are detailed in A11, B2, A10, B3, A4, B10, A2, and B11 in Figure 3, and the CC pins are detailed in A5 in Figure 3. Among them, TX+, TX-, RX+ and RX- in each group of pins are differential signal transmission pins, and each group of differential signal transmission pins supports working in USB mode or DP (DisplayPort) mode. When the differential signal transmission pin pair works in USB mode, the signal transmission pin pair transmits USB3.0 signals; when the differential signal transmission pin pair works in DP mode, the signal transmission pin pair is used as DP (DisplayPort ) interface is used.
本发明实施例的方案可以通过下列方法实现:The scheme of the embodiment of the present invention can be realized by the following methods:
数据传输装置上电后,外接电脑会通过USB-Type-C接口的CC引脚向数据传输装置发送询问数据包,该询问数据包可以为VDM(Vendor Defined Message)信号,数据传输装置在接收到该VDM信号后,通过其TypeC接口21中的CC引脚向外接电脑发送应答信息,应答信息包括该数据传输装置当前的的工作模式或支持的工作模式为DP(DisplayPort)模式,该应答信息也可以包括该数据传输装置具体的供电范围等信息。外接电脑收到数据传输装置发送过来的应答信息后,根据供电范围信息,调整对数据传输装置的供电电压;同时,外接电脑识别数据传输装置当前的的工作模式或支持的工作模式为DP(DisplayPort)模式时,设置外接电脑的USB-Type-C接口工作在DP(DisplayPort)模式,并且调用外接电脑操作系统预装DP(DisplayPort)驱动,通过外接电脑USB-Type-C接口中的差分引脚对向数据传输装置传输包含音频、视频在内的媒体内容,该内容可以是DP协议格式的媒体数据。After the data transmission device is powered on, the external computer will send an inquiry data packet to the data transmission device through the CC pin of the USB-Type-C interface. The inquiry data packet can be a VDM (Vendor Defined Message) signal. After the VDM signal, the response information is sent to the external computer through the CC pin in the TypeC interface 21. The response information includes the current working mode of the data transmission device or the supported working mode is DP (DisplayPort) mode. The response information also Information such as the specific power supply range of the data transmission device may be included. After the external computer receives the response information sent by the data transmission device, it adjusts the power supply voltage to the data transmission device according to the power supply range information; at the same time, the external computer recognizes that the current working mode of the data transmission device or the supported working mode is DP (DisplayPort ) mode, set the USB-Type-C interface of the external computer to work in DP (DisplayPort) mode, and call the operating system of the external computer to pre-install the DP (DisplayPort) driver, through the differential pins in the USB-Type-C interface of the external computer To transmit media content including audio and video to the data transmission device, the content may be media data in DP protocol format.
3)通过差分信号传输引脚接收DP协议格式的媒体数据,其中媒体数据包括来自于处理装置上的视 频数据或音频数据中的至少一个;3) receive the media data of the DP protocol format by the differential signal transmission pin, wherein the media data comprises at least one from the video data or the audio data on the processing device;
具体的,在本发明实施例中,差分信号传输引脚用来传输差分信号,可选的,在本发明实施例中,参阅图3,差分信号传输引脚可以是四对差分引脚,详见图3中的A11、B2、A10、B3、A4、B10、A2、B11。Specifically, in the embodiment of the present invention, the differential signal transmission pins are used to transmit differential signals. Optionally, in the embodiment of the present invention, referring to FIG. 3 , the differential signal transmission pins may be four pairs of differential pins. See A11, B2, A10, B3, A4, B10, A2, B11 in Figure 3.
4)将媒体数据转换成第一格式数据;4) converting media data into first format data;
具体的,该步骤为可选步骤。若数据传输装置的微处理器不能直接支持将DP协议格式的媒体数据转换为H.264/H.265格式的数据和/或AAC格式的数据,则数据传输装置需要先将DP协议格式的媒体数据转换为微处理器可以处理的数据格式。具体而言,可以在数据传输装置中新增一个数据转换芯片,将DP协议格式的媒体数据转换为MIPI格式的视频数据和/或I2S格式的音频数据。MIPI(Mobile Industry Processor Interface,移动产业处理器接口),MIPI是MIPI联盟发起的为移动应用处理器制定的开放标准和一个规范,主要将移动设备的摄像头、显示屏接口、射频/基带接口等接口进行标准化集成;I2S(Inter—IC Sound,集成电路内置音频)总线,该总线专门用于音频设备之间的数据传输。Specifically, this step is an optional step. If the microprocessor of the data transmission device cannot directly support converting the media data in the DP protocol format into the data in the H.264/H.265 format and/or the data in the AAC format, the data transmission device needs to convert the media data in the DP protocol format first. The data is converted into a data format that the microprocessor can process. Specifically, a data conversion chip may be added to the data transmission device to convert media data in DP protocol format into video data in MIPI format and/or audio data in I2S format. MIPI (Mobile Industry Processor Interface, Mobile Industry Processor Interface), MIPI is an open standard and a specification for mobile application processors initiated by the MIPI Alliance. Standardized integration; I2S (Inter-IC Sound, integrated circuit built-in audio) bus, which is specially used for data transmission between audio devices.
5)根据编码方案,将第一格式数据压缩编码为第二格式数据,其中,第二格式数据为压缩媒体数据;5) According to the coding scheme, the first format data is compressed and encoded into the second format data, wherein the second format data is compressed media data;
具体的,若步骤4)为必选步骤,则再通过微处理器将该MIPI格式的视频数据和/或I2S格式的音频数据压缩为H.264/H.265格式的数据和/或AAC格式的数据;若步骤4)为非必选步骤,则可以将DP协议格式的媒体数据直接压缩为H.264/H.265格式的数据和/或AAC格式的数据。压缩后的数据,可以占用较少的带宽,在相同的传输要求下,可以传输更多的数据。Specifically, if step 4) is a mandatory step, the MIPI format video data and/or the I2S format audio data are then compressed into H.264/H.265 format data and/or AAC format by the microprocessor If step 4) is an optional step, the media data in DP protocol format can be directly compressed into data in H.264/H.265 format and/or data in AAC format. The compressed data can occupy less bandwidth, and more data can be transmitted under the same transmission requirements.
6)将所述压缩媒体数据通过通信网络进行发送;6) sending the compressed media data through a communication network;
具体的,将压缩后数据可以通过无线网络发送至显示设备。可选的,该无线网络可以为Wi-Fi网络,3G/4G/5G通信网络,或者其他具有数据传输功能的网络。可选的,在对MIPI格式的视频数据和/或I2S格式的音频数据压缩之前,或者将DP协议格式的媒体数据压缩之前,还接收用户的传屏启动指令,根据用户的输入的传屏启动指令对上述数据进行压缩,压缩后通过无线网络发送至大屏幕显示装置用于显示。Specifically, the compressed data can be sent to the display device through a wireless network. Optionally, the wireless network may be a Wi-Fi network, a 3G/4G/5G communication network, or other networks with a data transmission function. Optionally, before compressing video data in MIPI format and/or audio data in I2S format, or before compressing media data in DP protocol format, a user's screen-sharing startup instruction is also received, and the screen-sharing startup instruction inputted by the user is started. The instruction compresses the above data, and after the compression is sent to a large-screen display device for display through a wireless network.
可选的,在接收到用户的传屏启动指令之前,对接收到的MIPI格式的视频数据和/或I2S格式的音频数据或DP协议格式的媒体数据进行丢弃,不进行压缩或传输处理,节省数据传输装置的微处理器的资源。Optionally, before receiving the user's screen sharing start instruction, discard the received video data in MIPI format and/or audio data in I2S format or media data in DP protocol format, without performing compression or transmission processing, saving The resources of the microprocessor of the data transmission device.
7)接收来自显示设备的触摸信号,并将该触摸信号传输至外接电脑。7) Receive the touch signal from the display device and transmit the touch signal to the external computer.
具体的,在会议场景中,显示设备具有触控功能,能够实时的接收用户的触控操作或触控行为,显示设备将该触控操作或触控行为转化为触摸信号,并将该触摸信号通过无线网络传输给数据传输装置,数据传输装置的微处理器接收到该触摸信号,由于TypeC接口的DP引脚只支持从外接电脑接收媒体数据,因此,在微处理器与TypeC接口之间还要再设置一个USB传输通道,具体的如图29及图31中的USB传输通道所示。所述微控制器通过其与所述TypeC接口之间的USB传输通道,向所述外接电脑发送所述触摸信号。外接电脑对该触摸信号进行响应或根据触摸信号启动相应的应用程序,以便实现触摸回传功能,增加人机交互的体验性。Specifically, in a conference scenario, the display device has a touch function, and can receive the user's touch operation or touch behavior in real time, the display device converts the touch operation or touch behavior into a touch signal, and converts the touch signal to the touch signal. The touch signal is transmitted to the data transmission device through the wireless network, and the microprocessor of the data transmission device receives the touch signal. Since the DP pin of the TypeC interface only supports receiving media data from an external computer, there is also a connection between the microprocessor and the TypeC interface. To set up another USB transmission channel, the details are shown in the USB transmission channel in Figure 29 and Figure 31. The microcontroller sends the touch signal to the external computer through the USB transmission channel between the microcontroller and the TypeC interface. The external computer responds to the touch signal or starts a corresponding application program according to the touch signal, so as to realize the touch return function and increase the experience of human-computer interaction.
在本发明实施例中,由于外接电脑的操作系统自身支持通过DP(DisplayPort)接口进行音视频数据发送,因此,通过对数据传输装置的重新设计,使得数据传输装置直接采用自身的TypeC接口与外接电脑的TypeC接口连接,外接电脑通过TypeC接口直接向数据传输装置发送DP协议格式的媒体数据。在该DP(DisplayPort)的工作模式下,外接电脑在无需安装特定驱动程序的情况下,就可以向数据传输装置免驱发送包含音视频数据的媒体内容,节省了外接电脑安装驱动程序的时间。In the embodiment of the present invention, since the operating system of the external computer itself supports audio and video data transmission through the DP (DisplayPort) interface, the redesign of the data transmission device enables the data transmission device to directly use its own TypeC interface to communicate with the external computer. The TypeC interface of the computer is connected, and the external computer directly sends the media data in the DP protocol format to the data transmission device through the TypeC interface. In the DP (DisplayPort) working mode, the external computer can send the media content including audio and video data to the data transmission device without driver installation without the need to install a specific driver, which saves the time for the external computer to install the driver.
可选的,当需要对DP协议格式的媒体数据进行转换为MIPI格式的视频数据和/或I2S格式的音频数据,再对该MIPI格式的视频数据和/或I2S格式的音频数据进行压缩时,本实施例的方案可以通过在数据处理装置中设置一个数据转换芯片实现,该芯片能够运行DP协议。在本发明实施例中,以数据处理装置为无线传屏器为例进行说明。该无线传屏器包括TypeC接口、无线模组、数据转换芯片及微处理器;该TypeC接口与该数据转换芯片相连接,无线模组可以为Wi-Fi模组,该数据转换芯片与该TypeC接口、该微处理器分别连接,该微处理器与该无线模组连接。具体的实现方式如下:Optionally, when the media data in the DP protocol format needs to be converted into the video data in the MIPI format and/or the audio data in the I2S format, and then compress the video data in the MIPI format and/or the audio data in the I2S format, The solution of this embodiment can be implemented by arranging a data conversion chip in the data processing device, and the chip can run the DP protocol. In the embodiment of the present invention, the data processing device is a wireless screen sharing device as an example for description. The wireless screen transmitter includes a TypeC interface, a wireless module, a data conversion chip and a microprocessor; the TypeC interface is connected with the data conversion chip, the wireless module can be a Wi-Fi module, and the data conversion chip is connected to the TypeC The interface and the microprocessor are respectively connected, and the microprocessor is connected with the wireless module. The specific implementation is as follows:
1)无线传屏器的数据转换芯片通过TypeC接口的配对通讯引脚向外接电脑发送请求信号,所述请求信号用于请求外接电脑向所述至少一对差分信号传输引脚发送DP协议格式的媒体数据;1) The data conversion chip of the wireless screen feeder sends a request signal to the external computer through the paired communication pin of the TypeC interface, and the request signal is used to request the external computer to send the DP protocol format to the at least one pair of differential signal transmission pins. media data;
3)无线传屏器的数据转换芯片通过差分信号传输引脚接收DP协议格式的媒体数据,其中媒体数据包括来自于外接电脑上的视频数据或音频数据中的至少一个;3) The data conversion chip of the wireless screen transmission device receives the media data of the DP protocol format through the differential signal transmission pin, wherein the media data includes at least one of the video data or the audio data from the external computer;
4)根据预设的编码方案,无线传屏器的数据转换芯片将媒体数据转换成第一格式数据;4) According to the preset coding scheme, the data conversion chip of the wireless screen transmission device converts the media data into the first format data;
具体而言,无线传屏器的数据转换芯片将DP协议格式的媒体数据转换为MIPI格式的视频数据和/或I2S格式的音频数据。Specifically, the data conversion chip of the wireless screencaster converts the media data in the DP protocol format into video data in the MIPI format and/or audio data in the I2S format.
5)无线传屏器的数据转换芯片将MIPI格式的视频数据和/或I2S格式的音频数据发送给无线传屏器的微处理器;5) The data conversion chip of the wireless screen sharing device sends the video data of MIPI format and/or the audio data of I2S format to the microprocessor of the wireless screen sharing device;
6)无线传屏器的微处理器接收到用户输出的传屏指令时,启动将MIPI格式的视频数据和/或I2S格式的音频数据压缩为H.264/H.265格式的数据和/或AAC格式的数据;否则,将该MIPI格式的视频数据和/或I2S格式的音频数据丢弃;6) When the microprocessor of the wireless screen transfer device receives the screen transfer instruction output by the user, it starts to compress the video data in MIPI format and/or the audio data in I2S format into data in H.264/H.265 format and/or Data in AAC format; otherwise, discard the video data in MIPI format and/or the audio data in I2S format;
具体的,无线传屏器的微处理器可以通过无线传屏器的的传屏按键接收传屏指令;其中,无线传屏器的传屏按键为硬件按键,设置在无线传屏器的上表面或侧面;无线传屏器的传屏按键也可以是软按键,该软按键通过程序实现,设置在无线传屏器的的显示屏的界面,或者设置在外接电脑的显示界面,用户可以通过点击该软按键,启动对MIPI格式的视频数据和/或I2S格式的音频数据的压缩及编码。Specifically, the microprocessor of the wireless screen sharing device can receive the screen sharing instruction through the screen sharing button of the wireless screen sharing device; wherein, the screen sharing button of the wireless screen sharing device is a hardware button, which is arranged on the upper surface of the wireless screen sharing device. or side; the screen transfer button of the wireless screen transmitter can also be a soft button. The soft button is realized by a program and is set on the interface of the display screen of the wireless screen transmitter, or on the display interface of an external computer. Users can click This soft key starts the compression and encoding of video data in MIPI format and/or audio data in I2S format.
将所述压缩后的媒体数据通过通信网络进行发送;sending the compressed media data through a communication network;
具体的,将压缩后的H.264/H.265格式的数据和/或AAC格式的数据通过无线网络发送至大屏幕显示装置用于显示。可选的,该无线网络可以为Wi-Fi网络,3G/4G/5G通信网络,或者其他具有数据传输功能的网络。Specifically, the compressed data in H.264/H.265 format and/or data in AAC format is sent to a large-screen display device for display through a wireless network. Optionally, the wireless network may be a Wi-Fi network, a 3G/4G/5G communication network, or other networks with a data transmission function.
在本发明实施例中,由于外接电脑的操作系统自身支持通过DP(DisplayPort)接口进行音视频数据发送,因此,通过对无线传屏器的重新设计,使得无线传屏器直接采用自身的TypeC接口与处理装置的TypeC接口连接,处理装置通过TypeC接口直接向无线传屏器发送DP协议格式的媒体数据。在该DP(DisplayPort)的工作模式下,外接电脑在无需安装特定驱动程序的情况下,就可以向无线传屏器免驱发送包含音视频数据的媒体内容,节省了外接电脑安装驱动程序的时间,提高了会议的效率。In the embodiment of the present invention, since the operating system of the external computer itself supports audio and video data transmission through the DP (DisplayPort) interface, therefore, through the redesign of the wireless screen transmitter, the wireless screen transmitter can directly use its own TypeC interface. It is connected with the TypeC interface of the processing device, and the processing device directly sends the media data in the DP protocol format to the wireless screen sharing device through the TypeC interface. In this DP (DisplayPort) working mode, the external computer can send media content including audio and video data to the wireless screen sharing device without the need to install a specific driver, saving the time for the external computer to install the driver. , to improve the efficiency of the meeting.
由于TypeC接口21还有图30所示的电源信号传输引脚VBUS(A9、B4、B9、A4),无需另外增设接口连接电源,即可获取外接电脑的电源信号,为数据处理装置中的微处理器24等需要供电的部件供电,此外,TypeC接口21还有图30所示的USB2.0数据传输引脚D+和D-,可以利用这两个引脚传输其他数据,因此,本实施例数据处理装置包括TypeC接口21,以TypeC接口21中的差分信号传输引脚作为屏幕数据接收口,具有可以使数据处理装置功能多样化的优点。数据传输装置还包括第一转换IC23,即第一数据转换芯片,用于将从用户的外接电脑中接收到的DP(Displayport)协议对应的数据包中的媒体内容转换为适用于微处理器24可转换成数据格式,具体地,第一数据转换芯片可将媒体内容的视频部分转换成MIPI格式的数据,并将媒体内容的音频部分转换成I2S格式的数据,两者也称第一格式数据。MIPI视频数据可以包含包括以YUV格式表示的像素的图像帧序列;I2S音频信号可以以脉冲编码调制(PCM)格式呈现。经过第一数据转换芯片的格式转换后可以向微处理器24提供这种两种格式化的媒体数据,在一个具体的实施例中,微处理器24为硬件处理器(如ARM处理器),微处理器24可以通过编程支持视频/音频编码器来压缩视频数据和音频数据。该微处理器24可以根据视频压缩标准(如H.264、H.265等)对MIPI视频数据进行编码,并根据音频压缩标准(如OPUS音频编解码标准或MP3标准或AAC)对I2S音频数据进行编码,两者也称第二格式数据。Since the TypeC interface 21 also has the power signal transmission pins VBUS (A9, B4, B9, A4) shown in Figure 30, there is no need to add an additional interface to connect the power supply, and the power supply signal of the external computer can be obtained, which is the microcomputer in the data processing device. The processor 24 and other components that need power supply are powered. In addition, the TypeC interface 21 also has the USB2.0 data transmission pins D+ and D- shown in FIG. 30, which can be used to transmit other data. Therefore, this embodiment The data processing device includes a TypeC interface 21, and the differential signal transmission pins in the TypeC interface 21 are used as screen data receiving ports, which has the advantage of diversifying the functions of the data processing device. The data transmission device also includes a first conversion IC23, that is, a first data conversion chip, which is used to convert the media content in the data packet corresponding to the DP (Displayport) protocol received from the user's external computer to suitable for the microprocessor 24. It can be converted into a data format. Specifically, the first data conversion chip can convert the video part of the media content into data in MIPI format, and convert the audio part of the media content into data in I2S format, both of which are also called first format data. . MIPI video data may contain a sequence of image frames including pixels represented in YUV format; I2S audio signals may be presented in Pulse Code Modulation (PCM) format. After format conversion by the first data conversion chip, the media data in the two formats can be provided to the microprocessor 24. In a specific embodiment, the microprocessor 24 is a hardware processor (such as an ARM processor), Microprocessor 24 may be programmed to support video/audio encoders to compress video data and audio data. The microprocessor 24 can encode MIPI video data according to video compression standards (such as H.264, H.265, etc.), and encode I2S audio data according to audio compression standards (such as OPUS audio codec standard or MP3 standard or AAC) Encoding, both are also called second format data.
微处理器24将编码后的视频数据、音频数据发送至无线模组12,无线模组12具体为第一无线发射机/接收器,无线模组12可通过无线网络将编码、压缩的视频数据和音频数据传送给与数据传输装置相互配对好的大尺寸显示屏或者大尺寸触控显示屏的第二无线发射机/接收器。无线模组12可以包括与无线网络配对的无线网卡,用于与显示设备相连的第二无线发射机/接收器进行通信。因此,用户不需要在外接电脑上执行任何网络配置,用户只需将数据传输装置插入外接电脑的USB-Type-C接口,即可完成分享过程。The microprocessor 24 sends the encoded video data and audio data to the wireless module 12. The wireless module 12 is specifically the first wireless transmitter/receiver. The wireless module 12 can transmit the encoded and compressed video data through the wireless network. and audio data are transmitted to the second wireless transmitter/receiver of the large-size display screen or the large-size touch display screen paired with the data transmission device. The wireless module 12 may include a wireless network card paired with a wireless network for communicating with a second wireless transmitter/receiver connected to the display device. Therefore, the user does not need to perform any network configuration on the external computer, and the user only needs to insert the data transmission device into the USB-Type-C port of the external computer to complete the sharing process.
具体地,本实施例中还包括与微处理器24连接、配对的触发装置,用户可以通过控制该触发装置,从而控制微处理器24以及无线模组12的工作状态,自由参与分享或者退出分享。例如,在用户通过触发装置产生用于指示开始传屏的第一用户操作时,微处理器24响应触发装置触发,从而开始对视频数据、音频数据进行压缩、编码,从而通过无线模组12发送至大尺寸显示屏或者大尺寸触控显示屏;又或,在用户通过触发装置产生用于指示停止屏幕传输的第二用户操作时,微处理器24响应触发装置另一次触发,从而停止对视频数据、音频数据的压缩、编码以及停止通过无线模组12发送至大尺寸显 示屏或者大尺寸触控显示屏,对从第一数据转换芯片接收到的视频数据、音频数据作丢弃处理。具体地,触发装置可以为实体硬件,也可为虚拟按键,可以与数据传输装置一体设置,也可以与数据传输装置分体设置,例如触发装置可以为与数据传输装置相互配对好的红外遥控器。Specifically, the present embodiment also includes a trigger device that is connected to and paired with the microprocessor 24. The user can control the trigger device to control the working state of the microprocessor 24 and the wireless module 12, and freely participate in sharing or exit the sharing. . For example, when the user generates the first user operation for instructing the start of screen sharing through the triggering device, the microprocessor 24 responds to the triggering of the triggering device, thereby starting to compress and encode the video data and audio data, so as to transmit through the wireless module 12 to a large-size display screen or a large-size touch display screen; or, when the user generates a second user operation for instructing to stop the screen transmission through the trigger device, the microprocessor 24 responds to another trigger from the trigger device, thereby stopping the video Data and audio data are compressed, encoded, and sent to a large-size display screen or a large-size touch display screen through the wireless module 12, and the video data and audio data received from the first data conversion chip are discarded. Specifically, the triggering device can be physical hardware or virtual keys, and can be set integrally with the data transmission device or separately from the data transmission device. For example, the triggering device can be an infrared remote control that is paired with the data transmission device. .
在上述方案的基础上,本实施例还提供可选的进一步的改进方案:数据传输装置还包括用于将输入的DP视频数据转换为MIPI视频数据输出的第一转换IC23,第一转换IC23连接于差分信号传输引脚与微处理器24的第一数据输入端口之间,其中,第一转换IC23的输入端连接差分信号传输引脚,第一转换IC23的输出端连接微处理器24的第一数据输入端口。由于目前市场上可用于传输视频数据的微处理器类型较少,可以支持的端口类型也较少,MIPI端口为其中一种应用较为广泛的微处理器端口,而将DP视频数据转换为MIPI视频数据的转换IC也相对应用较为广泛,因此第一数据输入端口为MIPI端口,第一转换IC23将DP视频数据转换为MIPI视频数据输出到微处理器24,更方便本领域技术人员实施本发明提供的技术方案,提高实用性。On the basis of the above solution, this embodiment also provides an optional further improvement solution: the data transmission device further includes a first conversion IC23 for converting the input DP video data into MIPI video data for output, and the first conversion IC23 is connected to Between the differential signal transmission pin and the first data input port of the microprocessor 24, the input end of the first conversion IC23 is connected to the differential signal transmission pin, and the output end of the first conversion IC23 is connected to the first data input port of the microprocessor 24. a data input port. Since there are few types of microprocessors that can be used to transmit video data on the market at present, there are also fewer types of ports that can be supported. MIPI port is one of the most widely used microprocessor ports, and converts DP video data into MIPI video. The data conversion IC is also relatively widely used, so the first data input port is the MIPI port, and the first conversion IC 23 converts the DP video data into MIPI video data and outputs it to the microprocessor 24, which is more convenient for those skilled in the art to implement the present invention. technical solutions to improve practicability.
一般地,第一转换IC23也需要供电,为了节省能耗,数据传输装置还包括供电模块26,可以包括DC-DC(直流转直流)电路和/或LDO(low dropout regulator,低压差线性稳压器)电路。供电模块26的输入端连接TypeC接口21的电源信号传输引脚,输出端连接第一转换IC23的供电端口。Generally, the first conversion IC 23 also needs power supply. In order to save energy, the data transmission device further includes a power supply module 26, which may include a DC-DC (direct current to direct current) circuit and/or an LDO (low dropout regulator, low dropout linear voltage regulator). device) circuit. The input end of the power supply module 26 is connected to the power signal transmission pin of the TypeC interface 21 , and the output end is connected to the power supply port of the first conversion IC 23 .
优选地,经微处理器24压缩编码后的第一音视频数据为H264音视频数据、H265音视频数据或MPEG音视频数据。Preferably, the first audio and video data compressed and encoded by the microprocessor 24 is H264 audio and video data, H265 audio and video data or MPEG audio and video data.
如前文所述,目前市场上可用于传输视频数据的微处理器类型较少,本实施例优选地以网络摄像机(IP Camera)处理器作为微处理器24。网络摄像机处理器是一种应用较为成熟的用于在通信网络中传输视频数据的微处理器,可实现压缩编码功能,并内置基于Web的操作系统,使得视频数据可通过网络送至终端用户。As mentioned above, currently there are few types of microprocessors that can be used for transmitting video data on the market. In this embodiment, an IP Camera (IP Camera) processor is preferably used as the microprocessor 24 . The IP camera processor is a relatively mature microprocessor used to transmit video data in the communication network. It can realize the function of compression and coding, and has a built-in Web-based operating system, so that the video data can be sent to the end user through the network.
进一步地,微处理器24还用于提供第二操作系统实现所述WiFi模块的配对管理。Further, the microprocessor 24 is further configured to provide a second operating system to implement pairing management of the WiFi module.
图31是本发明实施例提供的数据传输装置的另一种实施方式的结构示意图。FIG. 31 is a schematic structural diagram of another implementation manner of a data transmission apparatus provided by an embodiment of the present invention.
这种实施方式将上述技术方案中的第一转换IC替换为第二转换IC28和第三转换IC29。其中第二转换IC28用于将输入的DP视频数据转换为HDMI视频数据输出,第三转换IC29用于将输入的HDMI视频数据转换为BT1120数据或BT656数据输出。第二转换IC 28和第三转换IC 29连接于差分信号传输引脚与微处理器24的第一数据输入端口之间,其中,第二转换IC 28的输入端连接所述差分信号传输引脚,第二转换IC 28的输出端连接第三转换IC 29的输入端,所述第三转换IC 29的输出端连接微处理器24的第一数据输入端口。BT1120或BT656端口也是微处理器24的一种常见端口,第二转换IC28和第三转换IC29也相对应用较为广泛,因此,图31的实施方式是提供了另一种提高外围装置易用性的方案。This embodiment replaces the first conversion IC in the above technical solution with the second conversion IC 28 and the third conversion IC 29 . The second conversion IC28 is used to convert the input DP video data into HDMI video data for output, and the third conversion IC29 is used to convert the input HDMI video data into BT1120 data or BT656 data for output. The second conversion IC 28 and the third conversion IC 29 are connected between the differential signal transmission pin and the first data input port of the microprocessor 24, wherein the input end of the second conversion IC 28 is connected to the differential signal transmission pin , the output end of the second conversion IC 28 is connected to the input end of the third conversion IC 29, and the output end of the third conversion IC 29 is connected to the first data input port of the microprocessor 24. The BT1120 or BT656 port is also a common port of the microprocessor 24, and the second conversion IC28 and the third conversion IC29 are also relatively widely used. Therefore, the embodiment of FIG. 31 provides another method to improve the usability of peripheral devices. plan.
可选的,图31所示的数据传输装置结构示意图还包括供电模块26、电源管理模块27或flash存储器25,相应的连接结构和功能可参考上述与图29对应的技术方案设置。Optionally, the schematic structural diagram of the data transmission device shown in FIG. 31 further includes a power supply module 26 , a power management module 27 or a flash memory 25 , and the corresponding connection structure and function can be set with reference to the technical solution corresponding to FIG. 29 .
综上所述,本发明实施例的技术方案,数据传输装置包括能够直接获取处理装置的屏幕数据的屏幕数据接收口,还包括能将屏幕数据传输到无线通信网络中的无线模组,则当数据传输装置插入外接电脑时,数据传输装置自动获取外接电脑输出到显示器的屏幕数据,并发送到通信网络中,实现不用安装驱动程序则可以传屏到通信网络中其他网络节点进行显示,相比现有技术采用USB接口传递压缩编码后的数据到无线模组,本实施例的技术方案具有免驱动传屏、减少传屏前的准备时间且不占用处理装置资源的效果。To sum up, in the technical solutions of the embodiments of the present invention, the data transmission device includes a screen data receiving port that can directly acquire screen data of the processing device, and also includes a wireless module that can transmit the screen data to the wireless communication network. When the data transmission device is inserted into the external computer, the data transmission device automatically obtains the screen data output by the external computer to the monitor and sends it to the communication network, so that the screen can be transmitted to other network nodes in the communication network for display without installing the driver. In the prior art, the USB interface is used to transmit the compressed and encoded data to the wireless module, and the technical solution of this embodiment has the effects of driving-free screen transfer, reducing the preparation time before screen transfer, and not occupying the resources of the processing device.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application. Scope.

Claims (10)

  1. 一种数据传输装置,其特征在于,所述数据传输装置包括电源、微控制器、通信接口、振动传感器、可控开关和数据传输模组,所述通信接口为TypeC接口,所述数据传输模组包括Wi-Fi模组及微处理器,所述微处理器与所述TypeC接口连接;A data transmission device, characterized in that the data transmission device comprises a power supply, a microcontroller, a communication interface, a vibration sensor, a controllable switch and a data transmission module, the communication interface is a TypeC interface, and the data transmission module The group includes a Wi-Fi module and a microprocessor, and the microprocessor is connected to the TypeC interface;
    所述可控开关连接在所述电源和所述数据传输模组之间;the controllable switch is connected between the power supply and the data transmission module;
    所述TypeC接口用于接收外接电脑发送的DP协议格式的媒体数据;The TypeC interface is used to receive media data in the DP protocol format sent by an external computer;
    所述振动传感器用于根据所述数据传输装置的移动情况生成检测数据,所述检测数据携带所述振动传感器自身的加速度值;The vibration sensor is configured to generate detection data according to the movement of the data transmission device, and the detection data carries the acceleration value of the vibration sensor itself;
    所述数据传输模组用于接收从所述TypeC接口传输过来的媒体数据,并将所述媒体数据处理后,发送至显示设备;所述媒体数据为所述DP协议格式的媒体数据或将所述DP协议格式的媒体数据处理后生成的MIPI格式的视频数据和/或I2S格式的音频数据;The data transmission module is used to receive the media data transmitted from the TypeC interface, process the media data, and send it to the display device; the media data is the media data in the DP protocol format or the The video data in MIPI format and/or the audio data in I2S format generated after the media data in the DP protocol format is processed;
    所述微控制器用于根据所述振动传感器的检测数据和预设的加速度阈值控制所述可控开关的通断。The microcontroller is configured to control the on-off of the controllable switch according to the detection data of the vibration sensor and a preset acceleration threshold.
  2. 根据权利要求1所述数据传输装置,其特征在于,The data transmission device according to claim 1, wherein:
    当所述可控开关闭合,所述电源和所述数据传输模组之间的供电连接导通,所述数据传输模组还用于进行通信配置;When the controllable switch is closed, the power supply connection between the power supply and the data transmission module is turned on, and the data transmission module is also used for communication configuration;
    所述通信配置包括:所述通信接口的通信配置;和/或所述数据传输模组与所述显示设备进行数据通信的通信配置。The communication configuration includes: a communication configuration of the communication interface; and/or a communication configuration of the data transmission module for data communication with the display device.
  3. 根据权利要求1所述的数据传输装置,其特征在于,还包括:The data transmission device according to claim 1, further comprising:
    外部电源检测模块,所述外部电源检测模块连接所述通信接口和所述可控开关;an external power detection module, the external power detection module is connected to the communication interface and the controllable switch;
    所述外部电源检测模块用于检测所述通信接口是否有外部电源接入。The external power supply detection module is used to detect whether the communication interface has an external power supply connected.
  4. 一种数据传输方法,应用于数据传输设备,所述数据传输设备包括数据传输模组,所述数据传输模组包括Wi-Fi模组及微处理器,其特征在于,包括:A data transmission method, applied to a data transmission device, the data transmission device comprising a data transmission module, the data transmission module comprising a Wi-Fi module and a microprocessor, characterized in that it comprises:
    微控制器接收检测数据或中断信号;Microcontroller receives detection data or interrupt signal;
    外部电源检测模块向与门电路发送用于指示可控开关导通的第二导通信号;The external power detection module sends a second conduction signal to the AND gate circuit for instructing the conduction of the controllable switch;
    所述微控制器向所述与门电路发送用于指示可控开关导通的第一导通信号;The microcontroller sends a first turn-on signal to the AND gate circuit for instructing the turn-on of the controllable switch;
    所述与门电路根据输入的所述第一导通信号和所述第二导通信号向所述可控开关发送控制信号使得所述可控开关闭合,以将所述数据传输设备的电源和数据传输模组之间的供电连接导通;The AND gate circuit sends a control signal to the controllable switch according to the input first conduction signal and the second conduction signal, so that the controllable switch is closed, so as to connect the power supply of the data transmission device to the controllable switch. The power supply connection between the data transmission modules is turned on;
    所述微处理器通过TypeC接口接收外接电脑传输过来的DP协议格式的媒体数据,并将所述媒体数据处理后通过所述Wi-Fi模组向显示设备发送。The microprocessor receives the media data in the DP protocol format transmitted from the external computer through the TypeC interface, and sends the media data to the display device through the Wi-Fi module after processing the media data.
  5. 根据权利要求4所述的数据传输方法,其特征在于,还包括:The data transmission method according to claim 4, further comprising:
    所述外部电源检测模块检测到外部电源接入时,向所述与门电路发送用于指示可控开关断开的第二断开信号;When the external power supply detection module detects that the external power supply is connected, it sends a second disconnection signal to the AND gate circuit for instructing the controllable switch to be disconnected;
    所述外部电源检测模块向所述微控制器发送用于指示已接入外部电源的信号;The external power supply detection module sends a signal to the microcontroller for indicating that the external power supply has been connected;
    所述微控制器向所述与门电路发送用于指示可控开关导通的第一导通信号;The microcontroller sends a first turn-on signal to the AND gate circuit for instructing the turn-on of the controllable switch;
    所述与门电路根据输入的所述第一导通信号和第二断开信号,向所述可控开关发送控制信号使得所述可控开关断开。The AND gate circuit sends a control signal to the controllable switch to turn off the controllable switch according to the inputted first turn-on signal and the second turn-off signal.
  6. 根据权利要求5所述的数据传输方法,其特征在于,还包括:The data transmission method according to claim 5, further comprising:
    所述外部电源检测模块检测到外部电源断开时,向所述与门电路发送用于指示可控开关导通的第二导通信号;When the external power supply detection module detects that the external power supply is disconnected, it sends a second conduction signal for instructing the controllable switch to be turned on to the AND gate circuit;
    所述外部电源检测模块向所述微控制器发送用于指示未接入外部电源的信号;The external power supply detection module sends a signal to the microcontroller indicating that the external power supply is not connected;
    所述微控制器的计时器开始根据预设时间启动计时;The timer of the microcontroller starts timing according to the preset time;
    所述与门电路根据所述外部电源检测模块发送的所述第二导通信号及所述微控制器发送的所述第一导通信号,向所述可控开关发送控制信号使得所述可控开关闭合。The AND gate circuit sends a control signal to the controllable switch according to the second turn-on signal sent by the external power supply detection module and the first turn-on signal sent by the microcontroller to make the controllable switch. The control switch is closed.
  7. 根据权利要求6所述的数据传输方法,其特征在于,包括:The data transmission method according to claim 6, characterized in that, comprising:
    在所述预设时间内,所述外部电源检测模块检测到外部电源接入时,所述外部电源检测模块向所述与门电路发送用于指示可控开关断开的第二断开信号;所述与门电路根据所述第二断开信号,及根据所述微控制器发送的第一导通信号,向所述可控开关发送控制信号使得所述可控开关断开。Within the preset time, when the external power detection module detects that the external power is connected, the external power detection module sends a second disconnection signal to the AND gate circuit for indicating that the controllable switch is disconnected; The AND gate circuit sends a control signal to the controllable switch to turn off the controllable switch according to the second disconnection signal and the first turn-on signal sent by the microcontroller.
  8. 根据权利要求7所述的数据传输方法,其特征在于,包括:The data transmission method according to claim 7, characterized in that, comprising:
    在所述预设时间内,如果所述外部电源检测模块没有检测到外部电源接入,则在所述微控制器的计时器根据预设时间计时完毕后,所述微控制器向所述与门电路发送用于指示所述可控开关断开的第一断开信号;Within the preset time, if the external power detection module does not detect that the external power is connected, after the timer of the microcontroller finishes counting according to the preset time, the microcontroller sends the The gate circuit sends a first disconnection signal for instructing the controllable switch to be disconnected;
    所述与门电路根据所述微控制器发送的用于指示所述可控开关断开的第一断开信号和所述外部电源检测模块发送的用于指示可控开关导通的第二导通信号,向所述可控开关发送控制信号使得所述可控开关断开。The AND gate circuit is based on the first disconnection signal sent by the microcontroller for instructing the controllable switch to be turned off and the second conduction signal sent by the external power detection module for instructing the controllable switch to be turned on. An on signal is sent, and a control signal is sent to the controllable switch so that the controllable switch is turned off.
  9. 根据权利要求6所述的数据传输方法,其特征在于,在所述微控制器接收检测数据或中断信号之前,所述方法还包括:The data transmission method according to claim 6, wherein before the microcontroller receives the detection data or the interrupt signal, the method further comprises:
    所述微控制器在所述数据传输设备的电源的供电下处于第一功耗工作状态。The microcontroller is in a first power consumption working state when powered by the power supply of the data transmission device.
  10. 根据权利要求4所述的数据传输方法,其特征在于,所述方法还包括:The data transmission method according to claim 4, wherein the method further comprises:
    所述微控制器接收所述显示设备发送的触摸信号,所述触摸信号由用户对所述显示设备的触摸行为产生;The microcontroller receives a touch signal sent by the display device, where the touch signal is generated by a user's touch behavior on the display device;
    所述微控制器通过其与所述TypeC接口之间的USB传输通道,向所述外接电脑发送所述触摸信号。The microcontroller sends the touch signal to the external computer through the USB transmission channel between the microcontroller and the TypeC interface.
PCT/CN2021/114192 2020-09-08 2021-08-24 Data transmission apparatus and method WO2022052801A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010936264.3 2020-09-08
CN202010936264.3A CN114158137A (en) 2020-09-08 2020-09-08 Data transmission device and method

Publications (1)

Publication Number Publication Date
WO2022052801A1 true WO2022052801A1 (en) 2022-03-17

Family

ID=80460846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/114192 WO2022052801A1 (en) 2020-09-08 2021-08-24 Data transmission apparatus and method

Country Status (2)

Country Link
CN (1) CN114158137A (en)
WO (1) WO2022052801A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030223049A1 (en) * 2002-05-31 2003-12-04 Toru Ohara Projection type display apparatus
CN101876959A (en) * 2009-11-10 2010-11-03 神州付(北京)软件技术有限公司 Data transmission device and method thereof
CN104424794A (en) * 2013-09-11 2015-03-18 深圳市云立方信息科技有限公司 Data transmission device and data transmission method thereof
CN107153384A (en) * 2017-06-29 2017-09-12 北京宏动科技有限公司 Active MEMS inertia switches
US20170287347A1 (en) * 2016-04-01 2017-10-05 Teh-Chau LIAU Multi-screen casting system for flipped teaching classroom
CN206894811U (en) * 2017-06-30 2018-01-16 西安万像电子科技有限公司 Multimedia overhead projector equipment and multi-media transmission system
WO2019179399A1 (en) * 2018-03-19 2019-09-26 广州视源电子科技股份有限公司 Data transmission device, and data transmission method
CN111641431A (en) * 2019-11-08 2020-09-08 广州视源电子科技股份有限公司 Data transmission method and data transmission equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030223049A1 (en) * 2002-05-31 2003-12-04 Toru Ohara Projection type display apparatus
CN101876959A (en) * 2009-11-10 2010-11-03 神州付(北京)软件技术有限公司 Data transmission device and method thereof
CN104424794A (en) * 2013-09-11 2015-03-18 深圳市云立方信息科技有限公司 Data transmission device and data transmission method thereof
US20170287347A1 (en) * 2016-04-01 2017-10-05 Teh-Chau LIAU Multi-screen casting system for flipped teaching classroom
CN107153384A (en) * 2017-06-29 2017-09-12 北京宏动科技有限公司 Active MEMS inertia switches
CN206894811U (en) * 2017-06-30 2018-01-16 西安万像电子科技有限公司 Multimedia overhead projector equipment and multi-media transmission system
WO2019179399A1 (en) * 2018-03-19 2019-09-26 广州视源电子科技股份有限公司 Data transmission device, and data transmission method
CN111641431A (en) * 2019-11-08 2020-09-08 广州视源电子科技股份有限公司 Data transmission method and data transmission equipment

Also Published As

Publication number Publication date
CN114158137A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
WO2021089060A1 (en) Data transmission method and data transmission device
KR102408273B1 (en) Data transmission devices and data transmission methods
US11205397B2 (en) Data transmission device and data transmission method
US20080278894A1 (en) Docking station for projection display applications
WO2017215139A1 (en) Electronic apparatus
WO2011088674A1 (en) Mobile internet terminal
TWI585581B (en) Control method of an audio/video system
US10929090B2 (en) Wireless display screen
WO2022052801A1 (en) Data transmission apparatus and method
TWI462560B (en) Portable electronic device, charging system and charging method
CN102857626A (en) Mobile communication terminal
KR20160108119A (en) Projecting system
WO2015027834A1 (en) Mobile power supply terminal and power supply method therefor
TWI803925B (en) Conference system with low standby power consumption
WO2023124699A1 (en) Control method, apparatus, screen projection device, and storage medium
CN114554084B (en) Multi-device collaborative photographing system based on STM32 single chip microcomputer
CN213182735U (en) Universal serial bus adapter and system
CN115706771A (en) Conference system with low standby power consumption and transmission device

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

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

Country of ref document: EP

Kind code of ref document: A1